Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(271)

Unified Diff: webrtc/modules/video_coding/codecs/vp8/vp8_impl.cc

Issue 2724153003: vp8_impl.cc: Apply boost on golden frames. (Closed)
Patch Set: Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/modules/video_coding/codecs/vp8/vp8_impl.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/modules/video_coding/codecs/vp8/vp8_impl.cc
diff --git a/webrtc/modules/video_coding/codecs/vp8/vp8_impl.cc b/webrtc/modules/video_coding/codecs/vp8/vp8_impl.cc
index bef4e6397358850ba3fae5190e85792164a3ff6b..73e2fac9ab825570d579f91af909485ce28cc0f1 100644
--- a/webrtc/modules/video_coding/codecs/vp8/vp8_impl.cc
+++ b/webrtc/modules/video_coding/codecs/vp8/vp8_impl.cc
@@ -126,6 +126,7 @@ VP8EncoderImpl::VP8EncoderImpl()
token_partitions_(VP8_ONE_TOKENPARTITION),
down_scale_requested_(false),
down_scale_bitrate_(0),
+ use_gf_boost_(webrtc::field_trial::IsEnabled("WebRTC-VP8-GfBoost")),
key_frame_request_(kMaxSimulcastStreams, false) {
uint32_t seed = rtc::Time32();
srand(seed);
@@ -634,6 +635,12 @@ int VP8EncoderImpl::InitAndSetControlSettings() {
// rate control (drop frames on large target bitrate overshoot)
vpx_codec_control(&(encoders_[i]), VP8E_SET_SCREEN_CONTENT_MODE,
codec_.mode == kScreensharing ? 2 : 0);
+ // Apply boost on golden frames (has only effect when resilience is off).
+ if (use_gf_boost_ && codec_.VP8()->resilience == kResilienceOff) {
+ const int kGfBoostPercent = 50;
brandtr 2017/03/10 08:21:31 Maybe we should send in this value as part of the
åsapersson 2017/03/10 11:01:40 Sounds good. Done.
+ vpx_codec_control(&(encoders_[i]), VP8E_SET_GF_CBR_BOOST_PCT,
+ kGfBoostPercent);
+ }
}
inited_ = true;
return WEBRTC_VIDEO_CODEC_OK;
« no previous file with comments | « webrtc/modules/video_coding/codecs/vp8/vp8_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698