aboutsummaryrefslogtreecommitdiff
path: root/webrtc/modules/video_coding/codecs/vp8/vp8_impl.cc
diff options
context:
space:
mode:
authorsprang <sprang@webrtc.org>2015-10-01 06:26:10 -0700
committerCommit bot <commit-bot@chromium.org>2015-10-01 13:26:16 +0000
commitfb30c1b5d1effcc82a96fdf40814a03baf0727bf (patch)
tree526907c16d04dba5851abc9d06b09cdbebefaab2 /webrtc/modules/video_coding/codecs/vp8/vp8_impl.cc
parent5b14b42e93f17d0ea57f1f8b3e8224082c514946 (diff)
downloadwebrtc-fb30c1b5d1effcc82a96fdf40814a03baf0727bf.tar.gz
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}
Diffstat (limited to 'webrtc/modules/video_coding/codecs/vp8/vp8_impl.cc')
-rw-r--r--webrtc/modules/video_coding/codecs/vp8/vp8_impl.cc4
1 files changed, 3 insertions, 1 deletions
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<vp8e_token_partitions>(token_partitions_));