]> granicus.if.org Git - libvpx/commitdiff
Revert "quantize: use scan_order instead of passing scan/iscan"
authorJames Zern <jzern@google.com>
Wed, 1 Mar 2023 23:52:20 +0000 (15:52 -0800)
committerJames Zern <jzern@google.com>
Wed, 1 Mar 2023 23:54:46 +0000 (15:54 -0800)
This reverts commit 14fc40040ff30486c45111056db44ee18590a24a.

This has alignment issues, causing crashes in the tests:
SSSE3/VP9QuantizeTest.EOBCheck/*

Change-Id: I934f9a4c3ce3db33058a65180fa645c8649c3670

12 files changed:
test/vp9_quantize_test.cc
vp9/common/vp9_scan.h
vp9/encoder/vp9_encodemb.c
vpx_dsp/arm/highbd_quantize_neon.c
vpx_dsp/arm/quantize_neon.c
vpx_dsp/quantize.c
vpx_dsp/vpx_dsp_rtcd_defs.pl
vpx_dsp/x86/highbd_quantize_intrin_avx2.c
vpx_dsp/x86/highbd_quantize_intrin_sse2.c
vpx_dsp/x86/quantize_avx.c
vpx_dsp/x86/quantize_avx2.c
vpx_dsp/x86/quantize_ssse3.c

index 630a0053abd99fe3d0153667ccafbbfcdd78e670..e533b2509c161c88bf61a72c958596f7472a1896 100644 (file)
@@ -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 struct scan_order *const scan_order);
+                             const int16_t *scan, const int16_t *iscan);
 typedef std::tuple<QuantizeFunc, QuantizeFunc, vpx_bit_depth_t,
                    int /*max_size*/, bool /*is_fp*/>
     QuantizeParam;
@@ -60,10 +60,9 @@ template <QuantizeBaseFunc fn>
 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 struct scan_order *const scan_order) {
+                  const int16_t *scan, const int16_t *iscan) {
   fn(coeff, count, mb_plane->zbin, mb_plane->round, mb_plane->quant,
-     mb_plane->quant_shift, qcoeff, dqcoeff, dequant, eob, scan_order->scan,
-     scan_order->iscan);
+     mb_plane->quant_shift, qcoeff, dqcoeff, dequant, eob, scan, iscan);
 }
 
 // Wrapper for 32x32 version which does not use count
@@ -71,16 +70,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 struct scan_order *const scan_order);
+                                  const int16_t *scan, const int16_t *iscan);
 
 template <Quantize32x32Func fn>
 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 struct scan_order *const scan_order) {
+                       const int16_t *scan, const int16_t *iscan) {
   (void)count;
-  fn(coeff, mb_plane, qcoeff, dqcoeff, dequant, eob, scan_order);
+  fn(coeff, mb_plane, qcoeff, dqcoeff, dequant, eob, scan, iscan);
 }
 
 // Wrapper for FP version which does not use zbin or quant_shift.
@@ -94,9 +93,9 @@ template <QuantizeFPFunc fn>
 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 struct scan_order *const scan_order) {
+                    const int16_t *scan, const int16_t *iscan) {
   fn(coeff, count, mb_plane->round_fp, mb_plane->quant_fp, qcoeff, dqcoeff,
-     dequant, eob, scan_order->scan, scan_order->iscan);
+     dequant, eob, scaniscan);
 }
 
 void GenerateHelperArrays(ACMRandom *rnd, int16_t *zbin, int16_t *round,
@@ -226,7 +225,7 @@ class VP9QuantizeTest : public VP9QuantizeBase,
 void VP9QuantizeTest::Run() {
   quantize_op_(coeff_.TopLeftPixel(), count_, &mb_plane_,
                qcoeff_.TopLeftPixel(), dqcoeff_.TopLeftPixel(), dequant_ptr_,
-               &eob_, scan_);
+               &eob_, scan_->scan, scan_->iscan);
 }
 
 void VP9QuantizeTest::Speed(bool is_median) {
@@ -299,7 +298,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, scan_->iscan);
         }
         vpx_usec_timer_mark(&timer);
 
@@ -307,7 +306,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_);
+                       dequant_ptr_, &eob_, scan_->scan, scan_->iscan);
         }
         vpx_usec_timer_mark(&simd_timer);
 
@@ -448,11 +447,12 @@ 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_);
+                     dequant_ptr_, &ref_eob, scan_->scan, scan_->iscan);
 
-    ASM_REGISTER_STATE_CHECK(quantize_op_(
-        coeff_.TopLeftPixel(), count_, &mb_plane_, qcoeff_.TopLeftPixel(),
-        dqcoeff_.TopLeftPixel(), dequant_ptr_, &eob_, scan_));
+    ASM_REGISTER_STATE_CHECK(quantize_op_(coeff_.TopLeftPixel(), count_,
+                                          &mb_plane_, qcoeff_.TopLeftPixel(),
+                                          dqcoeff_.TopLeftPixel(), dequant_ptr_,
+                                          &eob_, scan_->scan, scan_->iscan));
 
     EXPECT_TRUE(qcoeff_.CheckValues(ref_qcoeff));
     EXPECT_TRUE(dqcoeff_.CheckValues(ref_dqcoeff));
@@ -504,11 +504,12 @@ 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_);
+                     dequant_ptr_, &ref_eob, scan_->scan, scan_->iscan);
 
-    ASM_REGISTER_STATE_CHECK(quantize_op_(
-        coeff_.TopLeftPixel(), count_, &mb_plane_, qcoeff_.TopLeftPixel(),
-        dqcoeff_.TopLeftPixel(), dequant_ptr_, &eob_, scan_));
+    ASM_REGISTER_STATE_CHECK(quantize_op_(coeff_.TopLeftPixel(), count_,
+                                          &mb_plane_, qcoeff_.TopLeftPixel(),
+                                          dqcoeff_.TopLeftPixel(), dequant_ptr_,
+                                          &eob_, scan_->scan, scan_->iscan));
 
     EXPECT_TRUE(qcoeff_.CheckValues(ref_qcoeff));
     EXPECT_TRUE(dqcoeff_.CheckValues(ref_dqcoeff));
index efa0e23365552c16a125ff33e19bf21f72290092..72a9a5ec472c65fb87c881dc10f0d2963fc472d8 100644 (file)
@@ -23,7 +23,7 @@ extern "C" {
 
 #define MAX_NEIGHBORS 2
 
-typedef struct scan_order {
+typedef struct {
   const int16_t *scan;
   const int16_t *iscan;
   const int16_t *neighbors;
index 515c7a90315c58c6c76542314ea5ff46e1bb1dad..6a5f628808fc17c4406e6fb7bb7b81623e42200f 100644 (file)
@@ -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_order->scan, scan_order->iscan);
         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_order->scan, scan_order->iscan);
       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);
+                                      eob, scan_order->scan, scan_order->iscan);
         }
         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_order->scan, scan_order->iscan);
       }
       if (args->enable_coeff_opt && !x->skip_recode) {
         *a = *l = vp9_optimize_b(x, plane, block, tx_size, entropy_ctx) > 0;
index 5a40f1284e2128423108d2cbadbfe2dd52e9dd24..3b1fec3321afdac2e019e010e2405e0a7414f3bd 100644 (file)
@@ -13,7 +13,6 @@
 #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(
@@ -228,11 +227,10 @@ 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 struct scan_order *const scan_order) {
+    uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan) {
   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
@@ -302,4 +300,7 @@ 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;
 }
index 84b6d8c79fc01445b921dff2b66925319d85115e..e81738a7bb3d0e502fbdb9c02078d16f89ceefd7 100644 (file)
@@ -14,7 +14,6 @@
 #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,
@@ -219,11 +218,10 @@ 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 struct scan_order *const scan_order) {
+                               const int16_t *scan, const int16_t *iscan) {
   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);
@@ -287,4 +285,7 @@ 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;
 }
index f51bf253e727a66ccfaf1964bbb5885b773434a0..c4642812ad1828b159dd69f06cbf9b05c38bd0bb 100644 (file)
@@ -14,7 +14,6 @@
 #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,
@@ -214,7 +213,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 struct scan_order *const scan_order) {
+                            const int16_t *scan, const int16_t *iscan) {
   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) };
@@ -222,11 +221,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));
@@ -275,7 +274,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 struct scan_order *const scan_order) {
+    uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan) {
   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) };
@@ -283,11 +282,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));
index 072b10d3d1c65123629eb866328d853bbd523221..c899c467bbe1c095ed482c5d5bba5a8bca6670e0 100644 (file)
@@ -19,7 +19,6 @@ print <<EOF
 #include "vpx_dsp/vpx_filter.h"
 #if CONFIG_VP9_ENCODER
  struct macroblock_plane;
- struct scan_order;
 #endif
 
 EOF
@@ -725,14 +724,14 @@ if (vpx_config("CONFIG_VP9_ENCODER") eq "yes") {
   add_proto qw/void vpx_quantize_b/, "const tran_low_t *coeff_ptr, intptr_t n_coeffs, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, 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";
   specialize qw/vpx_quantize_b neon sse2 ssse3 avx avx2 vsx lsx/;
 
-  add_proto qw/void vpx_quantize_b_32x32/, "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 struct scan_order *const scan_order";
+  add_proto qw/void vpx_quantize_b_32x32/, "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";
   specialize qw/vpx_quantize_b_32x32 neon ssse3 avx avx2 vsx lsx/;
 
   if (vpx_config("CONFIG_VP9_HIGHBITDEPTH") eq "yes") {
     add_proto qw/void vpx_highbd_quantize_b/, "const tran_low_t *coeff_ptr, intptr_t n_coeffs, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, 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";
     specialize qw/vpx_highbd_quantize_b neon sse2 avx2/;
 
-    add_proto qw/void vpx_highbd_quantize_b_32x32/, "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 struct scan_order *const scan_order";
+    add_proto qw/void vpx_highbd_quantize_b_32x32/, "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";
     specialize qw/vpx_highbd_quantize_b_32x32 neon sse2 avx2/;
   }  # CONFIG_VP9_HIGHBITDEPTH
 }  # CONFIG_VP9_ENCODER
index bfd7b2e23ee57c35fd10e2833d2646aecc547b1e..6041d7289ae70c99d125de6cd659d27ac5606a5c 100644 (file)
@@ -11,7 +11,6 @@
 #include <immintrin.h>
 
 #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) {
@@ -226,12 +225,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 struct scan_order *const scan_order) {
+    uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan) {
   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);
index 58d5a3a5ff086ffc390bb7938ace125f9a69f02e..6a8f42b8a40ccd01d2879037bc5341cb51a02896 100644 (file)
@@ -15,7 +15,6 @@
 #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
@@ -97,16 +96,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 struct scan_order *const scan_order) {
+    uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan) {
   __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);
index d05a937be1de2b70c3efb6f715b92dc169abc2ff..d52f6c66440f8ee40216fe15ef352ffe5eada0d8 100644 (file)
@@ -19,8 +19,6 @@
 #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,
@@ -146,11 +144,10 @@ 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 struct scan_order *const scan_order) {
+                              const int16_t *scan, const int16_t *iscan) {
   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;
@@ -159,6 +156,8 @@ 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);
 
index 1c82542ae630cdac1ae40a9588b05364080d409d..a8412c5b8e3748c3b1fd1e5f1d58c8ac5b35a4fc 100644 (file)
@@ -13,7 +13,6 @@
 
 #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(
@@ -256,11 +255,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 struct scan_order *const scan_order) {
+                               const int16_t *scan, const int16_t *iscan) {
   __m256i v_zbin, v_round, v_quant, v_dequant, v_quant_shift;
   __m256i v_eobmax = _mm256_setzero_si256();
   intptr_t count;
-  const int16_t *iscan = scan_order->iscan;
+  (void)scan;
 
   load_b_values_avx2(mb_plane->zbin, &v_zbin, mb_plane->round, &v_round,
                      mb_plane->quant, &v_quant, dequant_ptr, &v_dequant,
index 6401b2865d6419752f2039d010fed4ed18c58f9b..6fe54d7d98c678a74c93a667a78ebc18ee0981ff 100644 (file)
@@ -16,7 +16,6 @@
 #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,
@@ -113,10 +112,9 @@ 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 struct scan_order *const scan_order) {
+                                const int16_t *scan, const int16_t *iscan) {
   const __m128i zero = _mm_setzero_si128();
   int index;
-  const int16_t *iscan = scan_order->iscan;
 
   __m128i zbin, round, quant, dequant, shift;
   __m128i coeff0, coeff1;
@@ -125,6 +123,8 @@ 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);