From f23f27bb807794fe5773d0343e6281527ad5f640 Mon Sep 17 00:00:00 2001 From: Johann Date: Mon, 14 Nov 2022 16:47:33 +0900 Subject: [PATCH] Reland "quantize: use scan_order instead of passing scan/iscan" This is a reland of commit 14fc40040ff30486c45111056db44ee18590a24a Parent change fixed in crrev.com/c/webm/libvpx/+/4305500 Original change's description: > quantize: use scan_order instead of passing scan/iscan > > further reduces the arguments for the 32x32. This will be applied to the base > version as well. > > Change-Id: I25a162b5248b14af53d9e20c6a7fa2a77028a6d1 Change-Id: I2a7654558eaddd68bd09336bf317b297f18559d2 --- test/vp9_quantize_test.cc | 42 +++++++++++++++---------------- vp9/common/vp9_scan.h | 2 +- vp9/encoder/vp9_encodemb.c | 8 +++--- vpx_dsp/arm/highbd_quantize_neon.c | 7 +++--- vpx_dsp/arm/quantize_neon.c | 7 +++--- vpx_dsp/quantize.c | 9 ++++--- vpx_dsp/vpx_dsp_rtcd_defs.pl | 5 ++-- vpx_dsp/x86/highbd_quantize_intrin_avx2.c | 5 ++-- vpx_dsp/x86/highbd_quantize_intrin_sse2.c | 5 ++-- vpx_dsp/x86/quantize_avx.c | 7 +++--- vpx_dsp/x86/quantize_avx2.c | 5 ++-- vpx_dsp/x86/quantize_ssse3.c | 6 ++--- 12 files changed, 55 insertions(+), 53 deletions(-) diff --git a/test/vp9_quantize_test.cc b/test/vp9_quantize_test.cc index bff2fa5..e9b17d5 100644 --- a/test/vp9_quantize_test.cc +++ b/test/vp9_quantize_test.cc @@ -42,7 +42,7 @@ typedef void (*QuantizeFunc)(const tran_low_t *coeff, intptr_t count, const macroblock_plane *const mb_plane, tran_low_t *qcoeff, tran_low_t *dqcoeff, const int16_t *dequant, uint16_t *eob, - const int16_t *scan, const int16_t *iscan); + const struct scan_order *const scan_order); typedef std::tuple QuantizeParam; @@ -60,9 +60,10 @@ template void QuantWrapper(const tran_low_t *coeff, intptr_t count, const macroblock_plane *const mb_plane, tran_low_t *qcoeff, tran_low_t *dqcoeff, const int16_t *dequant, uint16_t *eob, - const int16_t *scan, const int16_t *iscan) { + const struct scan_order *const scan_order) { fn(coeff, count, mb_plane->zbin, mb_plane->round, mb_plane->quant, - mb_plane->quant_shift, qcoeff, dqcoeff, dequant, eob, scan, iscan); + mb_plane->quant_shift, qcoeff, dqcoeff, dequant, eob, scan_order->scan, + scan_order->iscan); } // Wrapper for 32x32 version which does not use count @@ -70,16 +71,16 @@ typedef void (*Quantize32x32Func)(const tran_low_t *coeff, const macroblock_plane *const mb_plane, tran_low_t *qcoeff, tran_low_t *dqcoeff, const int16_t *dequant, uint16_t *eob, - const int16_t *scan, const int16_t *iscan); + const struct scan_order *const scan_order); template void Quant32x32Wrapper(const tran_low_t *coeff, intptr_t count, const macroblock_plane *const mb_plane, tran_low_t *qcoeff, tran_low_t *dqcoeff, const int16_t *dequant, uint16_t *eob, - const int16_t *scan, const int16_t *iscan) { + const struct scan_order *const scan_order) { (void)count; - fn(coeff, mb_plane, qcoeff, dqcoeff, dequant, eob, scan, iscan); + fn(coeff, mb_plane, qcoeff, dqcoeff, dequant, eob, scan_order); } // Wrapper for FP version which does not use zbin or quant_shift. @@ -93,9 +94,9 @@ template void QuantFPWrapper(const tran_low_t *coeff, intptr_t count, const macroblock_plane *const mb_plane, tran_low_t *qcoeff, tran_low_t *dqcoeff, const int16_t *dequant, uint16_t *eob, - const int16_t *scan, const int16_t *iscan) { + const struct scan_order *const scan_order) { fn(coeff, count, mb_plane->round_fp, mb_plane->quant_fp, qcoeff, dqcoeff, - dequant, eob, scan, iscan); + dequant, eob, scan_order->scan, scan_order->iscan); } void GenerateHelperArrays(ACMRandom *rnd, int16_t *zbin, int16_t *round, @@ -232,8 +233,7 @@ class VP9QuantizeTest : public VP9QuantizeBase, void VP9QuantizeTest::Run() { quantize_op_(coeff_.TopLeftPixel(), count_, mb_plane_, qcoeff_.TopLeftPixel(), - dqcoeff_.TopLeftPixel(), dequant_ptr_, &eob_, scan_->scan, - scan_->iscan); + dqcoeff_.TopLeftPixel(), dequant_ptr_, &eob_, scan_); } void VP9QuantizeTest::Speed(bool is_median) { @@ -306,7 +306,7 @@ void VP9QuantizeTest::Speed(bool is_median) { ref_quantize_op_(coeff_.TopLeftPixel(), count_, mb_plane_, ref_qcoeff.TopLeftPixel(), ref_dqcoeff.TopLeftPixel(), dequant_ptr_, &ref_eob, - scan_->scan, scan_->iscan); + scan_); } vpx_usec_timer_mark(&timer); @@ -314,7 +314,7 @@ void VP9QuantizeTest::Speed(bool is_median) { for (int n = 0; n < kNumTests; ++n) { quantize_op_(coeff_.TopLeftPixel(), count_, mb_plane_, qcoeff_.TopLeftPixel(), dqcoeff_.TopLeftPixel(), - dequant_ptr_, &eob_, scan_->scan, scan_->iscan); + dequant_ptr_, &eob_, scan_); } vpx_usec_timer_mark(&simd_timer); @@ -455,12 +455,11 @@ TEST_P(VP9QuantizeTest, OperationCheck) { quant_fp_ptr_); ref_quantize_op_(coeff_.TopLeftPixel(), count_, mb_plane_, ref_qcoeff.TopLeftPixel(), ref_dqcoeff.TopLeftPixel(), - dequant_ptr_, &ref_eob, scan_->scan, scan_->iscan); + dequant_ptr_, &ref_eob, scan_); - ASM_REGISTER_STATE_CHECK(quantize_op_(coeff_.TopLeftPixel(), count_, - mb_plane_, qcoeff_.TopLeftPixel(), - dqcoeff_.TopLeftPixel(), dequant_ptr_, - &eob_, scan_->scan, scan_->iscan)); + ASM_REGISTER_STATE_CHECK(quantize_op_( + coeff_.TopLeftPixel(), count_, mb_plane_, qcoeff_.TopLeftPixel(), + dqcoeff_.TopLeftPixel(), dequant_ptr_, &eob_, scan_)); EXPECT_TRUE(qcoeff_.CheckValues(ref_qcoeff)); EXPECT_TRUE(dqcoeff_.CheckValues(ref_dqcoeff)); @@ -512,12 +511,11 @@ TEST_P(VP9QuantizeTest, EOBCheck) { quant_fp_ptr_); ref_quantize_op_(coeff_.TopLeftPixel(), count_, mb_plane_, ref_qcoeff.TopLeftPixel(), ref_dqcoeff.TopLeftPixel(), - dequant_ptr_, &ref_eob, scan_->scan, scan_->iscan); + dequant_ptr_, &ref_eob, scan_); - ASM_REGISTER_STATE_CHECK(quantize_op_(coeff_.TopLeftPixel(), count_, - mb_plane_, qcoeff_.TopLeftPixel(), - dqcoeff_.TopLeftPixel(), dequant_ptr_, - &eob_, scan_->scan, scan_->iscan)); + ASM_REGISTER_STATE_CHECK(quantize_op_( + coeff_.TopLeftPixel(), count_, mb_plane_, qcoeff_.TopLeftPixel(), + dqcoeff_.TopLeftPixel(), dequant_ptr_, &eob_, scan_)); EXPECT_TRUE(qcoeff_.CheckValues(ref_qcoeff)); EXPECT_TRUE(dqcoeff_.CheckValues(ref_dqcoeff)); diff --git a/vp9/common/vp9_scan.h b/vp9/common/vp9_scan.h index 72a9a5e..efa0e23 100644 --- a/vp9/common/vp9_scan.h +++ b/vp9/common/vp9_scan.h @@ -23,7 +23,7 @@ extern "C" { #define MAX_NEIGHBORS 2 -typedef struct { +typedef struct scan_order { const int16_t *scan; const int16_t *iscan; const int16_t *neighbors; diff --git a/vp9/encoder/vp9_encodemb.c b/vp9/encoder/vp9_encodemb.c index 6a5f628..515c7a9 100644 --- a/vp9/encoder/vp9_encodemb.c +++ b/vp9/encoder/vp9_encodemb.c @@ -512,7 +512,7 @@ void vp9_xform_quant(MACROBLOCK *x, int plane, int block, int row, int col, case TX_32X32: highbd_fdct32x32(x->use_lp32x32fdct, src_diff, coeff, diff_stride); vpx_highbd_quantize_b_32x32(coeff, p, qcoeff, dqcoeff, pd->dequant, eob, - scan_order->scan, scan_order->iscan); + scan_order); break; case TX_16X16: vpx_highbd_fdct16x16(src_diff, coeff, diff_stride); @@ -542,7 +542,7 @@ void vp9_xform_quant(MACROBLOCK *x, int plane, int block, int row, int col, case TX_32X32: fdct32x32(x->use_lp32x32fdct, src_diff, coeff, diff_stride); vpx_quantize_b_32x32(coeff, p, qcoeff, dqcoeff, pd->dequant, eob, - scan_order->scan, scan_order->iscan); + scan_order); break; case TX_16X16: vpx_fdct16x16(src_diff, coeff, diff_stride); @@ -856,7 +856,7 @@ void vp9_encode_block_intra(int plane, int block, int row, int col, src_stride, dst, dst_stride, xd->bd); highbd_fdct32x32(x->use_lp32x32fdct, src_diff, coeff, diff_stride); vpx_highbd_quantize_b_32x32(coeff, p, qcoeff, dqcoeff, pd->dequant, - eob, scan_order->scan, scan_order->iscan); + eob, scan_order); } if (args->enable_coeff_opt && !x->skip_recode) { *a = *l = vp9_optimize_b(x, plane, block, tx_size, entropy_ctx) > 0; @@ -946,7 +946,7 @@ void vp9_encode_block_intra(int plane, int block, int row, int col, dst_stride); fdct32x32(x->use_lp32x32fdct, src_diff, coeff, diff_stride); vpx_quantize_b_32x32(coeff, p, qcoeff, dqcoeff, pd->dequant, eob, - scan_order->scan, scan_order->iscan); + scan_order); } if (args->enable_coeff_opt && !x->skip_recode) { *a = *l = vp9_optimize_b(x, plane, block, tx_size, entropy_ctx) > 0; diff --git a/vpx_dsp/arm/highbd_quantize_neon.c b/vpx_dsp/arm/highbd_quantize_neon.c index 3b1fec3..5a40f12 100644 --- a/vpx_dsp/arm/highbd_quantize_neon.c +++ b/vpx_dsp/arm/highbd_quantize_neon.c @@ -13,6 +13,7 @@ #include "./vpx_config.h" #include "./vpx_dsp_rtcd.h" #include "vpx_dsp/arm/mem_neon.h" +#include "vp9/common/vp9_scan.h" #include "vp9/encoder/vp9_block.h" static VPX_FORCE_INLINE void highbd_calculate_dqcoeff_and_store( @@ -227,10 +228,11 @@ static VPX_FORCE_INLINE int16x8_t highbd_quantize_b_32x32_neon( void vpx_highbd_quantize_b_32x32_neon( const tran_low_t *coeff_ptr, const struct macroblock_plane *const mb_plane, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, - uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan) { + uint16_t *eob_ptr, const struct scan_order *const scan_order) { const int16x8_t neg_one = vdupq_n_s16(-1); uint16x8_t eob_max; int i; + const int16_t *iscan = scan_order->iscan; // Only the first element of each vector is DC. // High half has identical elements, but we can reconstruct it from the low @@ -300,7 +302,4 @@ void vpx_highbd_quantize_b_32x32_neon( vst1_lane_u16(eob_ptr, eob_max_2, 0); } #endif // __aarch64__ - // Need this here, else the compiler complains about mixing declarations and - // code in C90 - (void)scan; } diff --git a/vpx_dsp/arm/quantize_neon.c b/vpx_dsp/arm/quantize_neon.c index e81738a..84b6d8c 100644 --- a/vpx_dsp/arm/quantize_neon.c +++ b/vpx_dsp/arm/quantize_neon.c @@ -14,6 +14,7 @@ #include "./vpx_config.h" #include "./vpx_dsp_rtcd.h" #include "vpx_dsp/arm/mem_neon.h" +#include "vp9/common/vp9_scan.h" #include "vp9/encoder/vp9_block.h" static INLINE void calculate_dqcoeff_and_store(const int16x8_t qcoeff, @@ -218,10 +219,11 @@ void vpx_quantize_b_32x32_neon(const tran_low_t *coeff_ptr, const struct macroblock_plane *const mb_plane, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, - const int16_t *scan, const int16_t *iscan) { + const struct scan_order *const scan_order) { const int16x8_t neg_one = vdupq_n_s16(-1); uint16x8_t eob_max; int i; + const int16_t *iscan = scan_order->iscan; // Only the first element of each vector is DC. int16x8_t zbin = vrshrq_n_s16(vld1q_s16(mb_plane->zbin), 1); @@ -285,7 +287,4 @@ void vpx_quantize_b_32x32_neon(const tran_low_t *coeff_ptr, vst1_lane_u16(eob_ptr, eob_max_2, 0); } #endif // __aarch64__ - // Need these here, else the compiler complains about mixing declarations and - // code in C90 - (void)scan; } diff --git a/vpx_dsp/quantize.c b/vpx_dsp/quantize.c index c464281..f51bf25 100644 --- a/vpx_dsp/quantize.c +++ b/vpx_dsp/quantize.c @@ -14,6 +14,7 @@ #include "vpx_dsp/quantize.h" #include "vpx_dsp/vpx_dsp_common.h" #include "vpx_mem/vpx_mem.h" +#include "vp9/common/vp9_scan.h" #include "vp9/encoder/vp9_block.h" void vpx_quantize_dc(const tran_low_t *coeff_ptr, int n_coeffs, @@ -213,7 +214,7 @@ void vpx_quantize_b_32x32_c(const tran_low_t *coeff_ptr, const struct macroblock_plane *const mb_plane, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, - const int16_t *scan, const int16_t *iscan) { + const struct scan_order *const scan_order) { const int n_coeffs = 32 * 32; const int zbins[2] = { ROUND_POWER_OF_TWO(mb_plane->zbin[0], 1), ROUND_POWER_OF_TWO(mb_plane->zbin[1], 1) }; @@ -221,11 +222,11 @@ void vpx_quantize_b_32x32_c(const tran_low_t *coeff_ptr, const int16_t *round_ptr = mb_plane->round; const int16_t *quant_ptr = mb_plane->quant; const int16_t *quant_shift_ptr = mb_plane->quant_shift; + const int16_t *scan = scan_order->scan; int idx = 0; int idx_arr[32 * 32 /* n_coeffs */]; int i, eob = -1; - (void)iscan; memset(qcoeff_ptr, 0, n_coeffs * sizeof(*qcoeff_ptr)); memset(dqcoeff_ptr, 0, n_coeffs * sizeof(*dqcoeff_ptr)); @@ -274,7 +275,7 @@ void vpx_quantize_b_32x32_c(const tran_low_t *coeff_ptr, void vpx_highbd_quantize_b_32x32_c( const tran_low_t *coeff_ptr, const struct macroblock_plane *const mb_plane, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, - uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan) { + uint16_t *eob_ptr, const struct scan_order *const scan_order) { const intptr_t n_coeffs = 32 * 32; const int zbins[2] = { ROUND_POWER_OF_TWO(mb_plane->zbin[0], 1), ROUND_POWER_OF_TWO(mb_plane->zbin[1], 1) }; @@ -282,11 +283,11 @@ void vpx_highbd_quantize_b_32x32_c( const int16_t *round_ptr = mb_plane->round; const int16_t *quant_ptr = mb_plane->quant; const int16_t *quant_shift_ptr = mb_plane->quant_shift; + const int16_t *scan = scan_order->scan; int idx = 0; int idx_arr[1024]; int i, eob = -1; - (void)iscan; memset(qcoeff_ptr, 0, n_coeffs * sizeof(*qcoeff_ptr)); memset(dqcoeff_ptr, 0, n_coeffs * sizeof(*dqcoeff_ptr)); diff --git a/vpx_dsp/vpx_dsp_rtcd_defs.pl b/vpx_dsp/vpx_dsp_rtcd_defs.pl index 9853ba5..7cd3a0b 100644 --- a/vpx_dsp/vpx_dsp_rtcd_defs.pl +++ b/vpx_dsp/vpx_dsp_rtcd_defs.pl @@ -19,6 +19,7 @@ print < #include "./vpx_dsp_rtcd.h" +#include "vp9/common/vp9_scan.h" #include "vp9/encoder/vp9_block.h" static VPX_FORCE_INLINE void init_one_qp(const __m128i *p, __m256i *qp) { @@ -225,12 +226,12 @@ static VPX_FORCE_INLINE void quantize_b_32x32( void vpx_highbd_quantize_b_32x32_avx2( const tran_low_t *coeff_ptr, const struct macroblock_plane *const mb_plane, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, - uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan) { + uint16_t *eob_ptr, const struct scan_order *const scan_order) { const unsigned int step = 8; intptr_t n_coeffs = 32 * 32; + const int16_t *iscan = scan_order->iscan; __m256i eob = _mm256_setzero_si256(); __m256i qp[5]; - (void)scan; init_qp(mb_plane->zbin, mb_plane->round, mb_plane->quant, dequant_ptr, mb_plane->quant_shift, qp, 1); diff --git a/vpx_dsp/x86/highbd_quantize_intrin_sse2.c b/vpx_dsp/x86/highbd_quantize_intrin_sse2.c index 6a8f42b..58d5a3a 100644 --- a/vpx_dsp/x86/highbd_quantize_intrin_sse2.c +++ b/vpx_dsp/x86/highbd_quantize_intrin_sse2.c @@ -15,6 +15,7 @@ #include "vpx_dsp/vpx_dsp_common.h" #include "vpx_mem/vpx_mem.h" #include "vpx_ports/mem.h" +#include "vp9/common/vp9_scan.h" #include "vp9/encoder/vp9_block.h" #if CONFIG_VP9_HIGHBITDEPTH @@ -96,16 +97,16 @@ void vpx_highbd_quantize_b_sse2(const tran_low_t *coeff_ptr, intptr_t count, void vpx_highbd_quantize_b_32x32_sse2( const tran_low_t *coeff_ptr, const struct macroblock_plane *const mb_plane, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, - uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan) { + uint16_t *eob_ptr, const struct scan_order *const scan_order) { __m128i zbins[2]; __m128i nzbins[2]; int idx = 0; int idx_arr[1024]; int i, eob = 0; const intptr_t n_coeffs = 32 * 32; + const int16_t *iscan = scan_order->iscan; const int zbin0_tmp = ROUND_POWER_OF_TWO(mb_plane->zbin[0], 1); const int zbin1_tmp = ROUND_POWER_OF_TWO(mb_plane->zbin[1], 1); - (void)scan; zbins[0] = _mm_set_epi32(zbin1_tmp, zbin1_tmp, zbin1_tmp, zbin0_tmp); zbins[1] = _mm_set1_epi32(zbin1_tmp); diff --git a/vpx_dsp/x86/quantize_avx.c b/vpx_dsp/x86/quantize_avx.c index d52f6c6..d05a937 100644 --- a/vpx_dsp/x86/quantize_avx.c +++ b/vpx_dsp/x86/quantize_avx.c @@ -19,6 +19,8 @@ #include "vpx_dsp/x86/bitdepth_conversion_sse2.h" #include "vpx_dsp/x86/quantize_sse2.h" #include "vpx_dsp/x86/quantize_ssse3.h" +#include "vp9/common/vp9_scan.h" +#include "vp9/encoder/vp9_block.h" void vpx_quantize_b_avx(const tran_low_t *coeff_ptr, intptr_t n_coeffs, const int16_t *zbin_ptr, const int16_t *round_ptr, @@ -144,10 +146,11 @@ void vpx_quantize_b_32x32_avx(const tran_low_t *coeff_ptr, const struct macroblock_plane *const mb_plane, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, - const int16_t *scan, const int16_t *iscan) { + const struct scan_order *const scan_order) { const __m128i zero = _mm_setzero_si128(); const __m256i big_zero = _mm256_setzero_si256(); int index; + const int16_t *iscan = scan_order->iscan; __m128i zbin, round, quant, dequant, shift; __m128i coeff0, coeff1; @@ -156,8 +159,6 @@ void vpx_quantize_b_32x32_avx(const tran_low_t *coeff_ptr, __m128i all_zero; __m128i eob = zero, eob0; - (void)scan; - load_b_values32x32(mb_plane, &zbin, &round, &quant, dequant_ptr, &dequant, &shift); diff --git a/vpx_dsp/x86/quantize_avx2.c b/vpx_dsp/x86/quantize_avx2.c index a8412c5..1c82542 100644 --- a/vpx_dsp/x86/quantize_avx2.c +++ b/vpx_dsp/x86/quantize_avx2.c @@ -13,6 +13,7 @@ #include "./vpx_dsp_rtcd.h" #include "vpx/vpx_integer.h" +#include "vp9/common/vp9_scan.h" #include "vp9/encoder/vp9_block.h" static VPX_FORCE_INLINE void load_b_values_avx2( @@ -255,11 +256,11 @@ void vpx_quantize_b_32x32_avx2(const tran_low_t *coeff_ptr, const struct macroblock_plane *const mb_plane, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, - const int16_t *scan, const int16_t *iscan) { + const struct scan_order *const scan_order) { __m256i v_zbin, v_round, v_quant, v_dequant, v_quant_shift; __m256i v_eobmax = _mm256_setzero_si256(); intptr_t count; - (void)scan; + const int16_t *iscan = scan_order->iscan; load_b_values_avx2(mb_plane->zbin, &v_zbin, mb_plane->round, &v_round, mb_plane->quant, &v_quant, dequant_ptr, &v_dequant, diff --git a/vpx_dsp/x86/quantize_ssse3.c b/vpx_dsp/x86/quantize_ssse3.c index 6fe54d7..6401b28 100644 --- a/vpx_dsp/x86/quantize_ssse3.c +++ b/vpx_dsp/x86/quantize_ssse3.c @@ -16,6 +16,7 @@ #include "vpx_dsp/x86/bitdepth_conversion_sse2.h" #include "vpx_dsp/x86/quantize_sse2.h" #include "vpx_dsp/x86/quantize_ssse3.h" +#include "vp9/common/vp9_scan.h" #include "vp9/encoder/vp9_block.h" void vpx_quantize_b_ssse3(const tran_low_t *coeff_ptr, intptr_t n_coeffs, @@ -112,9 +113,10 @@ void vpx_quantize_b_32x32_ssse3(const tran_low_t *coeff_ptr, const struct macroblock_plane *const mb_plane, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, - const int16_t *scan, const int16_t *iscan) { + const struct scan_order *const scan_order) { const __m128i zero = _mm_setzero_si128(); int index; + const int16_t *iscan = scan_order->iscan; __m128i zbin, round, quant, dequant, shift; __m128i coeff0, coeff1; @@ -123,8 +125,6 @@ void vpx_quantize_b_32x32_ssse3(const tran_low_t *coeff_ptr, __m128i all_zero; __m128i eob = zero, eob0; - (void)scan; - load_b_values32x32(mb_plane, &zbin, &round, &quant, dequant_ptr, &dequant, &shift); -- 2.7.4