Use C code quantization function for tx_size below 4x4
This avoids the alignment issue in the SIMD implementation.
Change-Id: I0cfe1f2ef8e1ea866e0c6f32e34c6b22ac5febd2
diff --git a/av1/encoder/quantize.c b/av1/encoder/quantize.c
index c58c048..bddb61d 100644
--- a/av1/encoder/quantize.c
+++ b/av1/encoder/quantize.c
@@ -452,14 +452,25 @@
switch (qparam->log_scale) {
case 0:
- av1_quantize_fp(coeff_ptr, n_coeffs, skip_block, p->zbin, p->round_fp,
- p->quant_fp, p->quant_shift, qcoeff_ptr, dqcoeff_ptr,
- pd->dequant, eob_ptr, sc->scan, sc->iscan
+ if (n_coeffs < 16) {
+ av1_quantize_fp_c(coeff_ptr, n_coeffs, skip_block, p->zbin, p->round_fp,
+ p->quant_fp, p->quant_shift, qcoeff_ptr, dqcoeff_ptr,
+ pd->dequant, eob_ptr, sc->scan, sc->iscan
#if CONFIG_AOM_QM
- ,
- qm_ptr, iqm_ptr
+ ,
+ qm_ptr, iqm_ptr
#endif
- );
+ );
+ } else {
+ av1_quantize_fp(coeff_ptr, n_coeffs, skip_block, p->zbin, p->round_fp,
+ p->quant_fp, p->quant_shift, qcoeff_ptr, dqcoeff_ptr,
+ pd->dequant, eob_ptr, sc->scan, sc->iscan
+#if CONFIG_AOM_QM
+ ,
+ qm_ptr, iqm_ptr
+#endif
+ );
+ }
break;
case 1:
av1_quantize_fp_32x32(coeff_ptr, n_coeffs, skip_block, p->zbin,