]> granicus.if.org Git - libvpx/commitdiff
Fix rate control issue with layers and aq-mode=3.
authorMarco <marpan@google.com>
Mon, 11 May 2015 16:38:02 +0000 (09:38 -0700)
committerMarco <marpan@google.com>
Mon, 11 May 2015 17:04:18 +0000 (10:04 -0700)
When aq-mode=3 is enabled, only for base layer frames should the
qp of the frame incorporate the segment delta-qp.

This was causing more rate mismatch for the enhancement layer frames
when running temporal layers with aq-mode=3 on.

Change-Id: I1c5e69d1ef8a51188af8696753c17fd8f67699b3

vp9/encoder/vp9_ratectrl.c

index 4c33ffd977b588d09c435097da67aa7c3da695cf..7ddb6356f8af1e2dc8fda9b4c16b4c8ca9736ec0 100644 (file)
@@ -491,7 +491,10 @@ int vp9_rc_regulate_q(const VP9_COMP *cpi, int target_bits_per_frame,
   i = active_best_quality;
 
   do {
-    if (cpi->oxcf.aq_mode == CYCLIC_REFRESH_AQ && cm->seg.enabled) {
+    if (cpi->oxcf.aq_mode == CYCLIC_REFRESH_AQ &&
+        cm->seg.enabled &&
+        cpi->svc.temporal_layer_id == 0 &&
+        cpi->svc.spatial_layer_id == 0) {
       bits_per_mb_at_this_q =
           (int)vp9_cyclic_refresh_rc_bits_per_mb(cpi, i, correction_factor);
     } else {