]> granicus.if.org Git - libvpx/commitdiff
Update correct macroblock quantize_b function ptrs
authorScott LaVarnway <slavarnway@google.com>
Mon, 10 Dec 2012 23:23:11 +0000 (15:23 -0800)
committerScott LaVarnway <slavarnway@google.com>
Mon, 10 Dec 2012 23:23:11 +0000 (15:23 -0800)
WIP: Fixing unsafe threading in VP8 encoder.
Use the passed in macroblock instead of the macroblock located in
cpi.

Change-Id: I1bfa07de6ea463f2baeaae1bae5d950691bc4afc

vp8/encoder/encodeframe.c

index 219f7f3b77ba63b136a387e0f77c5fd8903be313..ec5e3a20103797053a29515605dc439b9c5f4458 100644 (file)
@@ -1234,8 +1234,8 @@ int vp8cx_encode_inter_macroblock
         /* Are we using the fast quantizer for the mode selection? */
         if(cpi->sf.use_fastquant_for_pick)
         {
-            cpi->mb.quantize_b      = vp8_fast_quantize_b;
-            cpi->mb.quantize_b_pair = vp8_fast_quantize_b_pair;
+            x->quantize_b      = vp8_fast_quantize_b;
+            x->quantize_b_pair = vp8_fast_quantize_b_pair;
 
             /* the fast quantizer does not use zbin_extra, so
              * do not recalculate */
@@ -1247,8 +1247,8 @@ int vp8cx_encode_inter_macroblock
         /* switch back to the regular quantizer for the encode */
         if (cpi->sf.improved_quant)
         {
-            cpi->mb.quantize_b      = vp8_regular_quantize_b;
-            cpi->mb.quantize_b_pair = vp8_regular_quantize_b_pair;
+            x->quantize_b      = vp8_regular_quantize_b;
+            x->quantize_b_pair = vp8_regular_quantize_b_pair;
         }
 
         /* restore cpi->zbin_mode_boost_enabled */