]> granicus.if.org Git - libvpx/commitdiff
vp9-svc: Fix to resetting rc flags on change_config
authorMarco Paniconi <marpan@google.com>
Mon, 27 Jan 2020 01:54:02 +0000 (17:54 -0800)
committerMarco Paniconi <marpan@google.com>
Mon, 27 Jan 2020 02:13:43 +0000 (18:13 -0800)
Condition should account for spatial layers.

Change-Id: I53ef27800d6cba1ae9d313d8f476e5137734d3d8

vp9/encoder/vp9_encoder.c

index d849a25110470c976eddc22de39df314fae9eec4..131c3c950718aa5fa7997ba1ec6088c3008bb22b 100644 (file)
@@ -2060,7 +2060,7 @@ void vp9_change_config(struct VP9_COMP *cpi, const VP9EncoderConfig *oxcf) {
   // configuration change has a large change in avg_frame_bandwidth.
   // For SVC check for resetting based on spatial layer average bandwidth.
   // Also reset buffer level to optimal level.
-  if (cm->current_video_frame > 0) {
+  if (cm->current_video_frame > (unsigned int)cpi->svc.number_spatial_layers) {
     if (cpi->use_svc) {
       vp9_svc_check_reset_layer_rc_flag(cpi);
     } else {