summaryrefslogtreecommitdiff
path: root/vp9/encoder/vp9_ratectrl.c
diff options
context:
space:
mode:
authorMarco <marpan@google.com>2015-03-05 17:26:52 -0800
committerMarco <marpan@google.com>2015-03-10 10:54:00 -0700
commitfb31aa09e245bdc24ebee252b5acf4093bc9213b (patch)
treea51cb163803f316aee090449f1f3a3b776deef51 /vp9/encoder/vp9_ratectrl.c
parent78df71221656b0a0d37bff6c16efd743347fa30d (diff)
downloadlibvpx-fb31aa09e245bdc24ebee252b5acf4093bc9213b.tar
libvpx-fb31aa09e245bdc24ebee252b5acf4093bc9213b.tar.gz
libvpx-fb31aa09e245bdc24ebee252b5acf4093bc9213b.tar.bz2
libvpx-fb31aa09e245bdc24ebee252b5acf4093bc9213b.zip
Modify update golden reference update under aq-mode=3 mode.
For non-SVC 1 pass CBR: make the GF update interval a multiple of the cyclic refresh period, and use encoding stats to prevent GF update at certain times. Change-Id: I4c44cacc2f70f1d27391a47644837e1eaa065017
Diffstat (limited to 'vp9/encoder/vp9_ratectrl.c')
-rw-r--r--vp9/encoder/vp9_ratectrl.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/vp9/encoder/vp9_ratectrl.c b/vp9/encoder/vp9_ratectrl.c
index 79a89af90..eb6eef082 100644
--- a/vp9/encoder/vp9_ratectrl.c
+++ b/vp9/encoder/vp9_ratectrl.c
@@ -1229,7 +1229,7 @@ void vp9_rc_postencode_update(VP9_COMP *cpi, uint64_t bytes_used) {
const int qindex = cm->base_qindex;
if (cpi->oxcf.aq_mode == CYCLIC_REFRESH_AQ && cm->seg.enabled) {
- vp9_cyclic_refresh_update_actual_count(cpi);
+ vp9_cyclic_refresh_postencode(cpi);
}
// Update rate control heuristics
@@ -1535,7 +1535,10 @@ void vp9_rc_get_one_pass_cbr_params(VP9_COMP *cpi) {
cm->frame_type = INTER_FRAME;
}
if (rc->frames_till_gf_update_due == 0) {
- rc->baseline_gf_interval = DEFAULT_GF_INTERVAL;
+ if (cpi->oxcf.aq_mode == CYCLIC_REFRESH_AQ)
+ vp9_cyclic_refresh_set_golden_update(cpi);
+ else
+ rc->baseline_gf_interval = DEFAULT_GF_INTERVAL;
rc->frames_till_gf_update_due = rc->baseline_gf_interval;
// NOTE: frames_till_gf_update_due must be <= frames_to_key.
if (rc->frames_till_gf_update_due > rc->frames_to_key)