diff options
author | Marco Paniconi <marpan@google.com> | 2019-02-05 10:54:28 -0800 |
---|---|---|
committer | Marco Paniconi <marpan@google.com> | 2019-02-12 11:22:35 -0800 |
commit | 6581817991801224d5016c86115daf79e74bad85 (patch) | |
tree | 0f2a6517145d342025bd0dabd7a1839ca328d232 /vp8/encoder/onyx_if.c | |
parent | 91a9935717a1dc74b89f68fa272eb0542b7710d7 (diff) | |
download | libvpx-6581817991801224d5016c86115daf79e74bad85.tar libvpx-6581817991801224d5016c86115daf79e74bad85.tar.gz libvpx-6581817991801224d5016c86115daf79e74bad85.tar.bz2 libvpx-6581817991801224d5016c86115daf79e74bad85.zip |
vp8: Limit Q change for screen content CBR mode
Add last_q[] to layer context, and add limit on
Q change from previous layer/frame. For now put
hard limit of 12 for decrease.
For 1 pass CBR sreen content mode.
Change-Id: Ifb972c9b6831440c80b1cb07a054c577ece930ec
Diffstat (limited to 'vp8/encoder/onyx_if.c')
-rw-r--r-- | vp8/encoder/onyx_if.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/vp8/encoder/onyx_if.c b/vp8/encoder/onyx_if.c index 07be0d989..a30821ac1 100644 --- a/vp8/encoder/onyx_if.c +++ b/vp8/encoder/onyx_if.c @@ -218,6 +218,8 @@ static void save_layer_context(VP8_COMP *cpi) { lc->frames_since_last_drop_overshoot = cpi->frames_since_last_drop_overshoot; lc->force_maxqp = cpi->force_maxqp; lc->last_frame_percent_intra = cpi->last_frame_percent_intra; + lc->last_q[0] = cpi->last_q[0]; + lc->last_q[1] = cpi->last_q[1]; memcpy(lc->count_mb_ref_frame_usage, cpi->mb.count_mb_ref_frame_usage, sizeof(cpi->mb.count_mb_ref_frame_usage)); @@ -255,6 +257,8 @@ static void restore_layer_context(VP8_COMP *cpi, const int layer) { cpi->frames_since_last_drop_overshoot = lc->frames_since_last_drop_overshoot; cpi->force_maxqp = lc->force_maxqp; cpi->last_frame_percent_intra = lc->last_frame_percent_intra; + cpi->last_q[0] = lc->last_q[0]; + cpi->last_q[1] = lc->last_q[1]; memcpy(cpi->mb.count_mb_ref_frame_usage, lc->count_mb_ref_frame_usage, sizeof(cpi->mb.count_mb_ref_frame_usage)); |