summaryrefslogtreecommitdiff
path: root/vp9/encoder/vp9_ratectrl.c
diff options
context:
space:
mode:
authorMarco <marpan@google.com>2017-12-07 17:24:41 -0800
committerMarco <marpan@google.com>2017-12-13 10:41:38 -0800
commita40fa1f95d3c49424f6366cd91771f801cbac6c3 (patch)
tree2442c98df61038250f0fb76b188b06954bc28572 /vp9/encoder/vp9_ratectrl.c
parent94eaecaa91661dfc3ecd00a0963211b9704a5bd5 (diff)
downloadlibvpx-a40fa1f95d3c49424f6366cd91771f801cbac6c3.tar
libvpx-a40fa1f95d3c49424f6366cd91771f801cbac6c3.tar.gz
libvpx-a40fa1f95d3c49424f6366cd91771f801cbac6c3.tar.bz2
libvpx-a40fa1f95d3c49424f6366cd91771f801cbac6c3.zip
vp9: Reset rc flags on some configuration changes.
For large dynamic changes in target avg_frame_bandwidth, or a change in resolution, via the update in change_config()), reset the under/overshoot flags (rc_1_frame, rc_2_frame) to prevent constraining the QP for the first few frames following the change. For SVC use the spatial stream avg_frame_bandwidth in reset condition. For the avg_frame_bandwidth condition, use fairly large threshold (~50%) for now in reset. This allows for better/faster QP response if, for example, application dynamically changes bitrate by large amount. Change-Id: Ib6e3761732d956949d79c9247e50dba744a535c0
Diffstat (limited to 'vp9/encoder/vp9_ratectrl.c')
-rw-r--r--vp9/encoder/vp9_ratectrl.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/vp9/encoder/vp9_ratectrl.c b/vp9/encoder/vp9_ratectrl.c
index 3f7fb1e88..b7f3a0e89 100644
--- a/vp9/encoder/vp9_ratectrl.c
+++ b/vp9/encoder/vp9_ratectrl.c
@@ -1488,6 +1488,8 @@ void vp9_rc_postencode_update(VP9_COMP *cpi, uint64_t bytes_used) {
cpi->rc.last_frame_is_src_altref = cpi->rc.is_src_frame_alt_ref;
}
if (cm->frame_type != KEY_FRAME) rc->reset_high_source_sad = 0;
+
+ rc->last_avg_frame_bandwidth = rc->avg_frame_bandwidth;
}
void vp9_rc_postencode_update_drop_frame(VP9_COMP *cpi) {