]> granicus.if.org Git - libvpx/commitdiff
Recalculate zbin_extra only if regular quantizer is being used
authorAlpha Lam <hclam@google.com>
Tue, 30 Aug 2011 18:23:34 +0000 (19:23 +0100)
committerAlpha Lam <hclam@google.com>
Tue, 30 Aug 2011 18:23:34 +0000 (19:23 +0100)
vp8_update_zbin_extra() is called all the time even though the fast
quantizer doesn't use it. Skip this call if fast quantizer is used.

Change-Id: Ia711c38431930cc2486cf59b8466060ef0e9d9db

vp8/encoder/encodeframe.c

index 5d4e7e71eb02e784836dd0c723d0d066b4275378..a19425993a06ba390a07d89753b7e8f94441d92e 100644 (file)
@@ -1257,7 +1257,11 @@ int vp8cx_encode_inter_macroblock
                     cpi->zbin_mode_boost = MV_ZBIN_BOOST;
             }
         }
-        vp8_update_zbin_extra(cpi, x);
+
+        /* The fast quantizer doesn't use zbin_extra, only do so with
+         * the regular quantizer. */
+        if (cpi->sf.improved_quant)
+            vp8_update_zbin_extra(cpi, x);
     }
 
     cpi->count_mb_ref_frame_usage[xd->mode_info_context->mbmi.ref_frame] ++;