From fb30c1b5d1effcc82a96fdf40814a03baf0727bf Mon Sep 17 00:00:00 2001 From: sprang Date: Thu, 1 Oct 2015 06:26:10 -0700 Subject: [PATCH] Update VP8 settings to avoid spending bitrate on static areas. PERF NOTE This CL changes the threshold where we consider a block to be static and of sufficient quality to not spend bits/CPU encoding it. Perf note: This change may result in a minor degradation of PSNR/SSIM and available send bitrate. CPU usage and bitrate sent should however be greately reduced. BUG=webrtc:5015 Review URL: https://codereview.webrtc.org/1383533002 Cr-Commit-Position: refs/heads/master@{#10134} --- webrtc/modules/video_coding/codecs/vp8/vp8_impl.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/webrtc/modules/video_coding/codecs/vp8/vp8_impl.cc b/webrtc/modules/video_coding/codecs/vp8/vp8_impl.cc index 651406abf9..5714a07f2e 100644 --- a/webrtc/modules/video_coding/codecs/vp8/vp8_impl.cc +++ b/webrtc/modules/video_coding/codecs/vp8/vp8_impl.cc @@ -664,7 +664,9 @@ int VP8EncoderImpl::InitAndSetControlSettings() { denoiser_state : kDenoiserOff); } for (size_t i = 0; i < encoders_.size(); ++i) { - vpx_codec_control(&(encoders_[i]), VP8E_SET_STATIC_THRESHOLD, 1); + // Allow more screen content to be detected as static. + vpx_codec_control(&(encoders_[i]), VP8E_SET_STATIC_THRESHOLD, + codec_.mode == kScreensharing ? 300 : 1); vpx_codec_control(&(encoders_[i]), VP8E_SET_CPUUSED, cpu_speed_[i]); vpx_codec_control(&(encoders_[i]), VP8E_SET_TOKEN_PARTITIONS, static_cast(token_partitions_));