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}
This commit is contained in:
sprang
2015-10-01 06:26:10 -07:00
committed by Commit bot
parent 5b14b42e93
commit fb30c1b5d1

View File

@ -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_));