Fix high bd quantization for cb4x4 mode
Use c functions for 2x2 transform block quantization. This fixes
the enc/dec mismatch issue in cb4x4 mode when high bit-depth is
turned on.
BUG=aomedia:364
Change-Id: I532db14de9795f04bf296cd9a12c80350350c112
diff --git a/av1/encoder/av1_quantize.c b/av1/encoder/av1_quantize.c
index 185460b..c1b7bc8 100644
--- a/av1/encoder/av1_quantize.c
+++ b/av1/encoder/av1_quantize.c
@@ -730,6 +730,18 @@
const qm_val_t *iqm_ptr = qparam->iqmatrix;
#endif // CONFIG_AOM_QM
+ if (n_coeffs < 16) {
+ av1_highbd_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,
+#endif
+ qparam->log_scale);
+ return;
+ }
+
av1_highbd_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,