Upgrade libvpx to 6b66c01 and enabling temporal denoising.
BUG= TEST= Review URL: https://webrtc-codereview.appspot.com/448006 git-svn-id: http://webrtc.googlecode.com/svn/trunk@1921 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
@@ -513,6 +513,7 @@ struct VideoCodecVP8
|
||||
VideoCodecComplexity complexity;
|
||||
VP8ResilienceMode resilience;
|
||||
unsigned char numberOfTemporalLayers;
|
||||
bool denoisingOn;
|
||||
};
|
||||
|
||||
// Unknown specific
|
||||
|
||||
@@ -148,11 +148,10 @@ TEST_F(VideoProcessorIntegrationTest, ProcessZeroPacketLoss) {
|
||||
}
|
||||
|
||||
// Run with 5% packet loss. Quality should be a bit lower.
|
||||
// TODO(mflodman): Reenable this once it's not flaky.
|
||||
TEST_F(VideoProcessorIntegrationTest, Process5PercentPacketLoss) {
|
||||
config_.networking_config.packet_loss_probability = 0.05;
|
||||
double minimum_avg_psnr = 21;
|
||||
double minimum_min_psnr = 17;
|
||||
double minimum_min_psnr = 16;
|
||||
double minimum_avg_ssim = 0.6;
|
||||
double minimum_min_ssim = 0.4;
|
||||
ProcessFramesAndVerify(minimum_avg_psnr, minimum_min_psnr,
|
||||
@@ -164,8 +163,8 @@ TEST_F(VideoProcessorIntegrationTest, Process10PercentPacketLoss) {
|
||||
config_.networking_config.packet_loss_probability = 0.10;
|
||||
double minimum_avg_psnr = 19;
|
||||
double minimum_min_psnr = 16;
|
||||
double minimum_avg_ssim = 0.6;
|
||||
double minimum_min_ssim = 0.4;
|
||||
double minimum_avg_ssim = 0.5;
|
||||
double minimum_min_ssim = 0.35;
|
||||
ProcessFramesAndVerify(minimum_avg_psnr, minimum_min_psnr,
|
||||
minimum_avg_ssim, minimum_min_ssim);
|
||||
}
|
||||
|
||||
@@ -107,7 +107,7 @@ class VP8Encoder : public VideoEncoder {
|
||||
VP8Encoder();
|
||||
|
||||
// Call encoder initialize function and set control settings.
|
||||
int InitAndSetControlSettings();
|
||||
int InitAndSetControlSettings(const VideoCodec* inst);
|
||||
|
||||
// Update frame size for codec.
|
||||
int UpdateCodecFrameSize(WebRtc_UWord32 input_image_width,
|
||||
|
||||
@@ -268,10 +268,10 @@ int VP8Encoder::InitEncode(const VideoCodec* inst,
|
||||
break;
|
||||
}
|
||||
rps_->Init();
|
||||
return InitAndSetControlSettings();
|
||||
return InitAndSetControlSettings(inst);
|
||||
}
|
||||
|
||||
int VP8Encoder::InitAndSetControlSettings() {
|
||||
int VP8Encoder::InitAndSetControlSettings(const VideoCodec* inst) {
|
||||
vpx_codec_flags_t flags = 0;
|
||||
// TODO(holmer): We should make a smarter decision on the number of
|
||||
// partitions. Eight is probably not the optimal number for low resolution
|
||||
@@ -287,7 +287,8 @@ int VP8Encoder::InitAndSetControlSettings() {
|
||||
vpx_codec_control(encoder_, VP8E_SET_CPUUSED, cpu_speed_);
|
||||
vpx_codec_control(encoder_, VP8E_SET_TOKEN_PARTITIONS,
|
||||
static_cast<vp8e_token_partitions>(token_partitions_));
|
||||
vpx_codec_control(encoder_, VP8E_SET_NOISE_SENSITIVITY, 2);
|
||||
vpx_codec_control(encoder_, VP8E_SET_NOISE_SENSITIVITY,
|
||||
inst->codecSpecific.VP8.denoisingOn ? 1 : 0);
|
||||
#if WEBRTC_LIBVPX_VERSION >= 971
|
||||
vpx_codec_control(encoder_, VP8E_SET_MAX_INTRA_BITRATE_PCT,
|
||||
rc_max_intra_target_);
|
||||
|
||||
@@ -173,6 +173,7 @@ VCMCodecDataBase::Codec(WebRtc_UWord8 listId, VideoCodec *settings)
|
||||
settings->numberOfSimulcastStreams = 0;
|
||||
settings->codecSpecific.VP8.resilience = kResilientStream;
|
||||
settings->codecSpecific.VP8.numberOfTemporalLayers = 1;
|
||||
settings->codecSpecific.VP8.denoisingOn = false;
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user