diff options
author | Marco <marpan@chromium.org> | 2015-07-15 18:00:03 -0700 |
---|---|---|
committer | Marco <marpan@chromium.org> | 2015-07-16 09:27:20 -0700 |
commit | 7ae1aa6b374aa86d70638e38b0fe6abdbb832475 (patch) | |
tree | 90aeaad51ec68a3c1ba49a5877ba44622906cdde | |
parent | b946e5ce0f0038babb610c2a071bcff6abdb7a39 (diff) | |
download | libvpx-7ae1aa6b374aa86d70638e38b0fe6abdbb832475.tar libvpx-7ae1aa6b374aa86d70638e38b0fe6abdbb832475.tar.gz libvpx-7ae1aa6b374aa86d70638e38b0fe6abdbb832475.tar.bz2 libvpx-7ae1aa6b374aa86d70638e38b0fe6abdbb832475.zip |
Dynamic resize for 1 pass: update of golden frame.
In aq-mode=3 under a resizing action (i.e., resize_pending != 0),
force an update of the golden reference frame.
Change-Id: I14806f6db71b5f8c827678cc5e1fc913c138a9a4
-rw-r--r-- | vp9/encoder/vp9_aq_cyclicrefresh.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/vp9/encoder/vp9_aq_cyclicrefresh.c b/vp9/encoder/vp9_aq_cyclicrefresh.c index 6270bf452..b61906388 100644 --- a/vp9/encoder/vp9_aq_cyclicrefresh.c +++ b/vp9/encoder/vp9_aq_cyclicrefresh.c @@ -347,7 +347,10 @@ void vp9_cyclic_refresh_check_golden_update(VP9_COMP *const cpi) { // For video conference clips, if the background has high motion in current // frame because of the camera movement, set this frame as the golden frame. // Use 70% and 5% as the thresholds for golden frame refreshing. - if (cnt1 * 10 > (70 * rows * cols) && cnt2 * 20 < cnt1) { + // Also, force this frame as a golden update frame if this frame will change + // the resolution (resize_pending != 0). + if (cpi->resize_pending != 0 || + (cnt1 * 10 > (70 * rows * cols) && cnt2 * 20 < cnt1)) { vp9_cyclic_refresh_set_golden_update(cpi); rc->frames_till_gf_update_due = rc->baseline_gf_interval; @@ -562,4 +565,5 @@ void vp9_cyclic_refresh_reset_resize(VP9_COMP *const cpi) { CYCLIC_REFRESH *const cr = cpi->cyclic_refresh; memset(cr->map, 0, cm->mi_rows * cm->mi_cols); cr->sb_index = 0; + cpi->refresh_golden_frame = 1; } |