ref: cc91d655e4573eda35307b8f888dd53d4c0f6471
parent: 3a19eebe4d39d5e3016c74b46bcaf9fde94e0e09
author: Scott LaVarnway <slavarnway@google.com>
date: Mon Dec 10 10:23:11 EST 2012
Update correct macroblock quantize_b function ptrs WIP: Fixing unsafe threading in VP8 encoder. Use the passed in macroblock instead of the macroblock located in cpi. Change-Id: I1bfa07de6ea463f2baeaae1bae5d950691bc4afc
--- a/vp8/encoder/encodeframe.c
+++ b/vp8/encoder/encodeframe.c
@@ -1234,8 +1234,8 @@
/* 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 @@
/* 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 */