summaryrefslogtreecommitdiff
path: root/vp9/encoder/vp9_ratectrl.c
diff options
context:
space:
mode:
authorYaowu Xu <yaowu@google.com>2014-11-21 11:55:27 -0800
committerGerrit Code Review <gerrit@gerrit.golo.chromium.org>2014-11-25 14:32:07 -0800
commite4234b3f8b704250dfcf8f97096534a3eef114d9 (patch)
tree2b9a4cc3c307296b86fd50ef25d816111e9fa27d /vp9/encoder/vp9_ratectrl.c
parenta04ed98482700550bf6603c58ce23427390262a8 (diff)
downloadlibvpx-e4234b3f8b704250dfcf8f97096534a3eef114d9.tar
libvpx-e4234b3f8b704250dfcf8f97096534a3eef114d9.tar.gz
libvpx-e4234b3f8b704250dfcf8f97096534a3eef114d9.tar.bz2
libvpx-e4234b3f8b704250dfcf8f97096534a3eef114d9.zip
Separate rate_correction_factor for boosted GFs
When the golden frame is boosted, the rate correction factor is not correlated well with other inter frames even in CBR mode. This commit changes to use GF specific rate_correction_factor when gf_cbr_boost is greater than 20%. Change-Id: I6312c1564387bcacc11f4c5e8a9cfdc781b5c3ab
Diffstat (limited to 'vp9/encoder/vp9_ratectrl.c')
-rw-r--r--vp9/encoder/vp9_ratectrl.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/vp9/encoder/vp9_ratectrl.c b/vp9/encoder/vp9_ratectrl.c
index 32acea0ff..97ededc5d 100644
--- a/vp9/encoder/vp9_ratectrl.c
+++ b/vp9/encoder/vp9_ratectrl.c
@@ -370,7 +370,7 @@ static double get_rate_correction_factor(const VP9_COMP *cpi) {
} else {
if ((cpi->refresh_alt_ref_frame || cpi->refresh_golden_frame) &&
!rc->is_src_frame_alt_ref && !cpi->use_svc &&
- cpi->oxcf.rc_mode != VPX_CBR)
+ (cpi->oxcf.rc_mode != VPX_CBR || cpi->oxcf.gf_cbr_boost_pct > 20))
return rc->rate_correction_factors[GF_ARF_STD];
else
return rc->rate_correction_factors[INTER_NORMAL];
@@ -389,7 +389,7 @@ static void set_rate_correction_factor(VP9_COMP *cpi, double factor) {
} else {
if ((cpi->refresh_alt_ref_frame || cpi->refresh_golden_frame) &&
!rc->is_src_frame_alt_ref && !cpi->use_svc &&
- cpi->oxcf.rc_mode != VPX_CBR)
+ (cpi->oxcf.rc_mode != VPX_CBR || cpi->oxcf.gf_cbr_boost_pct > 20))
rc->rate_correction_factors[GF_ARF_STD] = factor;
else
rc->rate_correction_factors[INTER_NORMAL] = factor;