1 /*
2 * Copyright (c) 2017, Alliance for Open Media. All rights reserved
3 *
4 * This source code is subject to the terms of the BSD 2 Clause License and
5 * the Alliance for Open Media Patent License 1.0. If the BSD 2 Clause License
6 * was not distributed with this source code in the LICENSE file, you can
7 * obtain it at www.aomedia.org/license/software. If the Alliance for Open
8 * Media Patent License 1.0 was not distributed with this source code in the
9 * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
10 */
11
12 #include <algorithm>
13 #include <tuple>
14
15 #include "third_party/googletest/src/googletest/include/gtest/gtest.h"
16
17 #include "config/aom_config.h"
18 #include "config/aom_dsp_rtcd.h"
19 #include "config/av1_rtcd.h"
20
21 #include "aom/aom_codec.h"
22 #include "aom_ports/aom_timer.h"
23 #include "av1/encoder/encoder.h"
24 #include "av1/common/scan.h"
25 #include "test/acm_random.h"
26 #include "test/register_state_check.h"
27 #include "test/util.h"
28
29 namespace {
30 using libaom_test::ACMRandom;
31
32 #define QUAN_PARAM_LIST \
33 const tran_low_t *coeff_ptr, intptr_t n_coeffs, const int16_t *zbin_ptr, \
34 const int16_t *round_ptr, const int16_t *quant_ptr, \
35 const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, \
36 tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, \
37 const int16_t *scan, const int16_t *iscan
38
39 #define LP_QUANTIZE_PARAM_LIST \
40 const int16_t *coeff_ptr, intptr_t n_coeffs, const int16_t *round_ptr, \
41 const int16_t *quant_ptr, int16_t *qcoeff_ptr, int16_t *dqcoeff_ptr, \
42 const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, \
43 const int16_t *iscan
44
45 typedef void (*LPQuantizeFunc)(LP_QUANTIZE_PARAM_LIST);
46 typedef void (*QuantizeFunc)(QUAN_PARAM_LIST);
47 typedef void (*QuantizeFuncHbd)(QUAN_PARAM_LIST, int log_scale);
48
49 #undef LP_QUANTIZE_PARAM_LIST
50
51 #define HBD_QUAN_FUNC \
52 fn(coeff_ptr, n_coeffs, zbin_ptr, round_ptr, quant_ptr, quant_shift_ptr, \
53 qcoeff_ptr, dqcoeff_ptr, dequant_ptr, eob_ptr, scan, iscan, log_scale)
54
55 #define LBD_QUAN_FUNC \
56 fn(coeff_ptr, n_coeffs, zbin_ptr, round_ptr, quant_ptr, quant_shift_ptr, \
57 qcoeff_ptr, dqcoeff_ptr, dequant_ptr, eob_ptr, scan, iscan)
58
59 template <QuantizeFuncHbd fn>
highbd_quan16x16_wrapper(QUAN_PARAM_LIST)60 void highbd_quan16x16_wrapper(QUAN_PARAM_LIST) {
61 const int log_scale = 0;
62 HBD_QUAN_FUNC;
63 }
64
65 template <QuantizeFuncHbd fn>
highbd_quan32x32_wrapper(QUAN_PARAM_LIST)66 void highbd_quan32x32_wrapper(QUAN_PARAM_LIST) {
67 const int log_scale = 1;
68 HBD_QUAN_FUNC;
69 }
70
71 template <QuantizeFuncHbd fn>
highbd_quan64x64_wrapper(QUAN_PARAM_LIST)72 void highbd_quan64x64_wrapper(QUAN_PARAM_LIST) {
73 const int log_scale = 2;
74 HBD_QUAN_FUNC;
75 }
76
77 enum QuantType { TYPE_B, TYPE_DC, TYPE_FP };
78
79 using std::tuple;
80
81 template <typename FuncType>
82 using QuantizeParam =
83 tuple<FuncType, FuncType, TX_SIZE, QuantType, aom_bit_depth_t>;
84
85 typedef struct {
86 QUANTS quant;
87 Dequants dequant;
88 } QuanTable;
89
90 const int kTestNum = 1000;
91
92 #define GET_TEMPLATE_PARAM(k) std::get<k>(this->GetParam())
93
94 template <typename CoeffType, typename FuncType>
95 class QuantizeTestBase
96 : public ::testing::TestWithParam<QuantizeParam<FuncType>> {
97 protected:
QuantizeTestBase()98 QuantizeTestBase()
99 : quant_ref_(GET_TEMPLATE_PARAM(0)), quant_(GET_TEMPLATE_PARAM(1)),
100 tx_size_(GET_TEMPLATE_PARAM(2)), type_(GET_TEMPLATE_PARAM(3)),
101 bd_(GET_TEMPLATE_PARAM(4)) {}
102
~QuantizeTestBase()103 virtual ~QuantizeTestBase() {}
104
SetUp()105 virtual void SetUp() {
106 qtab_ = reinterpret_cast<QuanTable *>(aom_memalign(32, sizeof(*qtab_)));
107 ASSERT_NE(qtab_, nullptr);
108 const int n_coeffs = coeff_num();
109 coeff_ = reinterpret_cast<CoeffType *>(
110 aom_memalign(32, 6 * n_coeffs * sizeof(CoeffType)));
111 ASSERT_NE(coeff_, nullptr);
112 InitQuantizer();
113 }
114
TearDown()115 virtual void TearDown() {
116 aom_free(qtab_);
117 qtab_ = nullptr;
118 aom_free(coeff_);
119 coeff_ = nullptr;
120 }
121
InitQuantizer()122 void InitQuantizer() {
123 av1_build_quantizer(bd_, 0, 0, 0, 0, 0, &qtab_->quant, &qtab_->dequant);
124 }
125
126 virtual void RunQuantizeFunc(
127 const CoeffType *coeff_ptr, intptr_t n_coeffs, const int16_t *zbin_ptr,
128 const int16_t *round_ptr, const int16_t *quant_ptr,
129 const int16_t *quant_shift_ptr, CoeffType *qcoeff_ptr,
130 CoeffType *qcoeff_ref_ptr, CoeffType *dqcoeff_ptr,
131 CoeffType *dqcoeff_ref_ptr, const int16_t *dequant_ptr,
132 uint16_t *eob_ref_ptr, uint16_t *eob_ptr, const int16_t *scan,
133 const int16_t *iscan) = 0;
134
QuantizeRun(bool is_loop,int q=0,int test_num=1)135 void QuantizeRun(bool is_loop, int q = 0, int test_num = 1) {
136 CoeffType *coeff_ptr = coeff_;
137 const intptr_t n_coeffs = coeff_num();
138
139 CoeffType *qcoeff_ref = coeff_ptr + n_coeffs;
140 CoeffType *dqcoeff_ref = qcoeff_ref + n_coeffs;
141
142 CoeffType *qcoeff = dqcoeff_ref + n_coeffs;
143 CoeffType *dqcoeff = qcoeff + n_coeffs;
144 uint16_t *eob = (uint16_t *)(dqcoeff + n_coeffs);
145
146 // Testing uses 2-D DCT scan order table
147 const SCAN_ORDER *const sc = get_default_scan(tx_size_, DCT_DCT);
148
149 // Testing uses luminance quantization table
150 const int16_t *zbin = qtab_->quant.y_zbin[q];
151
152 const int16_t *round = 0;
153 const int16_t *quant = 0;
154 if (type_ == TYPE_B) {
155 round = qtab_->quant.y_round[q];
156 quant = qtab_->quant.y_quant[q];
157 } else if (type_ == TYPE_FP) {
158 round = qtab_->quant.y_round_fp[q];
159 quant = qtab_->quant.y_quant_fp[q];
160 }
161
162 const int16_t *quant_shift = qtab_->quant.y_quant_shift[q];
163 const int16_t *dequant = qtab_->dequant.y_dequant_QTX[q];
164
165 for (int i = 0; i < test_num; ++i) {
166 if (is_loop) FillCoeffRandom();
167
168 memset(qcoeff_ref, 0, 5 * n_coeffs * sizeof(*qcoeff_ref));
169
170 RunQuantizeFunc(coeff_ptr, n_coeffs, zbin, round, quant, quant_shift,
171 qcoeff, qcoeff_ref, dqcoeff, dqcoeff_ref, dequant,
172 &eob[0], &eob[1], sc->scan, sc->iscan);
173
174 for (int j = 0; j < n_coeffs; ++j) {
175 ASSERT_EQ(qcoeff_ref[j], qcoeff[j])
176 << "Q mismatch on test: " << i << " at position: " << j
177 << " Q: " << q << " coeff: " << coeff_ptr[j];
178 }
179
180 for (int j = 0; j < n_coeffs; ++j) {
181 ASSERT_EQ(dqcoeff_ref[j], dqcoeff[j])
182 << "Dq mismatch on test: " << i << " at position: " << j
183 << " Q: " << q << " coeff: " << coeff_ptr[j];
184 }
185
186 ASSERT_EQ(eob[0], eob[1])
187 << "eobs mismatch on test: " << i << " Q: " << q;
188 }
189 }
190
CompareResults(const CoeffType * buf_ref,const CoeffType * buf,int size,const char * text,int q,int number)191 void CompareResults(const CoeffType *buf_ref, const CoeffType *buf, int size,
192 const char *text, int q, int number) {
193 int i;
194 for (i = 0; i < size; ++i) {
195 ASSERT_EQ(buf_ref[i], buf[i]) << text << " mismatch on test: " << number
196 << " at position: " << i << " Q: " << q;
197 }
198 }
199
coeff_num() const200 int coeff_num() const { return av1_get_max_eob(tx_size_); }
201
FillCoeff(CoeffType c)202 void FillCoeff(CoeffType c) {
203 const int n_coeffs = coeff_num();
204 for (int i = 0; i < n_coeffs; ++i) {
205 coeff_[i] = c;
206 }
207 }
208
FillCoeffRandom()209 void FillCoeffRandom() {
210 const int n_coeffs = coeff_num();
211 FillCoeffZero();
212 const int num = rnd_.Rand16() % n_coeffs;
213 // Randomize the first non zero coeff position.
214 const int start = rnd_.Rand16() % n_coeffs;
215 const int end = std::min(start + num, n_coeffs);
216 for (int i = start; i < end; ++i) {
217 coeff_[i] = GetRandomCoeff();
218 }
219 }
220
FillCoeffRandomRows(int num)221 void FillCoeffRandomRows(int num) {
222 FillCoeffZero();
223 for (int i = 0; i < num; ++i) {
224 coeff_[i] = GetRandomCoeff();
225 }
226 }
227
FillCoeffZero()228 void FillCoeffZero() { FillCoeff(0); }
229
FillCoeffConstant()230 void FillCoeffConstant() {
231 CoeffType c = GetRandomCoeff();
232 FillCoeff(c);
233 }
234
FillDcOnly()235 void FillDcOnly() {
236 FillCoeffZero();
237 coeff_[0] = GetRandomCoeff();
238 }
239
FillDcLargeNegative()240 void FillDcLargeNegative() {
241 FillCoeffZero();
242 // Generate a qcoeff which contains 512/-512 (0x0100/0xFE00) to catch issues
243 // like BUG=883 where the constant being compared was incorrectly
244 // initialized.
245 coeff_[0] = -8191;
246 }
247
GetRandomCoeff()248 CoeffType GetRandomCoeff() {
249 CoeffType coeff;
250 if (bd_ == AOM_BITS_8) {
251 coeff =
252 clamp(static_cast<int16_t>(rnd_.Rand16()), INT16_MIN + 1, INT16_MAX);
253 } else {
254 CoeffType min = -(1 << (7 + bd_));
255 CoeffType max = -min - 1;
256 coeff = clamp(static_cast<CoeffType>(rnd_.Rand31()), min, max);
257 }
258 return coeff;
259 }
260
261 ACMRandom rnd_;
262 QuanTable *qtab_;
263 CoeffType *coeff_;
264 FuncType quant_ref_;
265 FuncType quant_;
266 TX_SIZE tx_size_;
267 QuantType type_;
268 aom_bit_depth_t bd_;
269 };
270
271 class FullPrecisionQuantizeTest
272 : public QuantizeTestBase<tran_low_t, QuantizeFunc> {
RunQuantizeFunc(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 * qcoeff_ref_ptr,tran_low_t * dqcoeff_ptr,tran_low_t * dqcoeff_ref_ptr,const int16_t * dequant_ptr,uint16_t * eob_ref_ptr,uint16_t * eob_ptr,const int16_t * scan,const int16_t * iscan)273 void RunQuantizeFunc(const tran_low_t *coeff_ptr, intptr_t n_coeffs,
274 const int16_t *zbin_ptr, const int16_t *round_ptr,
275 const int16_t *quant_ptr, const int16_t *quant_shift_ptr,
276 tran_low_t *qcoeff_ptr, tran_low_t *qcoeff_ref_ptr,
277 tran_low_t *dqcoeff_ptr, tran_low_t *dqcoeff_ref_ptr,
278 const int16_t *dequant_ptr, uint16_t *eob_ref_ptr,
279 uint16_t *eob_ptr, const int16_t *scan,
280 const int16_t *iscan) override {
281 quant_ref_(coeff_ptr, n_coeffs, zbin_ptr, round_ptr, quant_ptr,
282 quant_shift_ptr, qcoeff_ref_ptr, dqcoeff_ref_ptr, dequant_ptr,
283 eob_ref_ptr, scan, iscan);
284
285 API_REGISTER_STATE_CHECK(quant_(
286 coeff_ptr, n_coeffs, zbin_ptr, round_ptr, quant_ptr, quant_shift_ptr,
287 qcoeff_ptr, dqcoeff_ptr, dequant_ptr, eob_ptr, scan, iscan));
288 }
289 };
290
291 class LowPrecisionQuantizeTest
292 : public QuantizeTestBase<int16_t, LPQuantizeFunc> {
RunQuantizeFunc(const int16_t * coeff_ptr,intptr_t n_coeffs,const int16_t *,const int16_t * round_ptr,const int16_t * quant_ptr,const int16_t *,int16_t * qcoeff_ptr,int16_t * qcoeff_ref_ptr,int16_t * dqcoeff_ptr,int16_t * dqcoeff_ref_ptr,const int16_t * dequant_ptr,uint16_t * eob_ref_ptr,uint16_t * eob_ptr,const int16_t * scan,const int16_t * iscan)293 void RunQuantizeFunc(const int16_t *coeff_ptr, intptr_t n_coeffs,
294 const int16_t * /*zbin_ptr*/, const int16_t *round_ptr,
295 const int16_t *quant_ptr,
296 const int16_t * /*quant_shift_ptr*/, int16_t *qcoeff_ptr,
297 int16_t *qcoeff_ref_ptr, int16_t *dqcoeff_ptr,
298 int16_t *dqcoeff_ref_ptr, const int16_t *dequant_ptr,
299 uint16_t *eob_ref_ptr, uint16_t *eob_ptr,
300 const int16_t *scan, const int16_t *iscan) override {
301 quant_ref_(coeff_ptr, n_coeffs, round_ptr, quant_ptr, qcoeff_ref_ptr,
302 dqcoeff_ref_ptr, dequant_ptr, eob_ref_ptr, scan, iscan);
303
304 API_REGISTER_STATE_CHECK(quant_(coeff_ptr, n_coeffs, round_ptr, quant_ptr,
305 qcoeff_ptr, dqcoeff_ptr, dequant_ptr,
306 eob_ptr, scan, iscan));
307 }
308 };
309
TEST_P(FullPrecisionQuantizeTest,ZeroInput)310 TEST_P(FullPrecisionQuantizeTest, ZeroInput) {
311 FillCoeffZero();
312 QuantizeRun(false);
313 }
314
TEST_P(FullPrecisionQuantizeTest,LargeNegativeInput)315 TEST_P(FullPrecisionQuantizeTest, LargeNegativeInput) {
316 FillDcLargeNegative();
317 QuantizeRun(false, 0, 1);
318 }
319
TEST_P(FullPrecisionQuantizeTest,DcOnlyInput)320 TEST_P(FullPrecisionQuantizeTest, DcOnlyInput) {
321 FillDcOnly();
322 QuantizeRun(false, 0, 1);
323 }
324
TEST_P(FullPrecisionQuantizeTest,RandomInput)325 TEST_P(FullPrecisionQuantizeTest, RandomInput) {
326 QuantizeRun(true, 0, kTestNum);
327 }
328
TEST_P(FullPrecisionQuantizeTest,MultipleQ)329 TEST_P(FullPrecisionQuantizeTest, MultipleQ) {
330 for (int q = 0; q < QINDEX_RANGE; ++q) {
331 QuantizeRun(true, q, kTestNum);
332 }
333 }
334
335 // Force the coeff to be half the value of the dequant. This exposes a
336 // mismatch found in av1_quantize_fp_sse2().
TEST_P(FullPrecisionQuantizeTest,CoeffHalfDequant)337 TEST_P(FullPrecisionQuantizeTest, CoeffHalfDequant) {
338 FillCoeff(16);
339 QuantizeRun(false, 25, 1);
340 }
341
TEST_P(FullPrecisionQuantizeTest,DISABLED_Speed)342 TEST_P(FullPrecisionQuantizeTest, DISABLED_Speed) {
343 tran_low_t *coeff_ptr = coeff_;
344 const intptr_t n_coeffs = coeff_num();
345
346 tran_low_t *qcoeff_ref = coeff_ptr + n_coeffs;
347 tran_low_t *dqcoeff_ref = qcoeff_ref + n_coeffs;
348
349 tran_low_t *qcoeff = dqcoeff_ref + n_coeffs;
350 tran_low_t *dqcoeff = qcoeff + n_coeffs;
351 uint16_t *eob = (uint16_t *)(dqcoeff + n_coeffs);
352
353 // Testing uses 2-D DCT scan order table
354 const SCAN_ORDER *const sc = get_default_scan(tx_size_, DCT_DCT);
355
356 // Testing uses luminance quantization table
357 const int q = 22;
358 const int16_t *zbin = qtab_->quant.y_zbin[q];
359 const int16_t *round_fp = qtab_->quant.y_round_fp[q];
360 const int16_t *quant_fp = qtab_->quant.y_quant_fp[q];
361 const int16_t *quant_shift = qtab_->quant.y_quant_shift[q];
362 const int16_t *dequant = qtab_->dequant.y_dequant_QTX[q];
363 const int kNumTests = 5000000;
364 aom_usec_timer timer, simd_timer;
365 int rows = tx_size_high[tx_size_];
366 int cols = tx_size_wide[tx_size_];
367 rows = AOMMIN(32, rows);
368 cols = AOMMIN(32, cols);
369 for (int cnt = 0; cnt <= rows; cnt++) {
370 FillCoeffRandomRows(cnt * cols);
371
372 aom_usec_timer_start(&timer);
373 for (int n = 0; n < kNumTests; ++n) {
374 quant_ref_(coeff_ptr, n_coeffs, zbin, round_fp, quant_fp, quant_shift,
375 qcoeff, dqcoeff, dequant, eob, sc->scan, sc->iscan);
376 }
377 aom_usec_timer_mark(&timer);
378
379 aom_usec_timer_start(&simd_timer);
380 for (int n = 0; n < kNumTests; ++n) {
381 quant_(coeff_ptr, n_coeffs, zbin, round_fp, quant_fp, quant_shift, qcoeff,
382 dqcoeff, dequant, eob, sc->scan, sc->iscan);
383 }
384 aom_usec_timer_mark(&simd_timer);
385
386 const int elapsed_time = static_cast<int>(aom_usec_timer_elapsed(&timer));
387 const int simd_elapsed_time =
388 static_cast<int>(aom_usec_timer_elapsed(&simd_timer));
389 printf("c_time = %d \t simd_time = %d \t Gain = %f \n", elapsed_time,
390 simd_elapsed_time, ((float)elapsed_time / simd_elapsed_time));
391 }
392 }
393
394 // TODO(crbug.com/aomedia/2796)
TEST_P(LowPrecisionQuantizeTest,ZeroInput)395 TEST_P(LowPrecisionQuantizeTest, ZeroInput) {
396 FillCoeffZero();
397 QuantizeRun(false);
398 }
399
TEST_P(LowPrecisionQuantizeTest,LargeNegativeInput)400 TEST_P(LowPrecisionQuantizeTest, LargeNegativeInput) {
401 FillDcLargeNegative();
402 QuantizeRun(false, 0, 1);
403 }
404
TEST_P(LowPrecisionQuantizeTest,DcOnlyInput)405 TEST_P(LowPrecisionQuantizeTest, DcOnlyInput) {
406 FillDcOnly();
407 QuantizeRun(false, 0, 1);
408 }
409
TEST_P(LowPrecisionQuantizeTest,RandomInput)410 TEST_P(LowPrecisionQuantizeTest, RandomInput) {
411 QuantizeRun(true, 0, kTestNum);
412 }
413
TEST_P(LowPrecisionQuantizeTest,MultipleQ)414 TEST_P(LowPrecisionQuantizeTest, MultipleQ) {
415 for (int q = 0; q < QINDEX_RANGE; ++q) {
416 QuantizeRun(true, q, kTestNum);
417 }
418 }
419
420 // Force the coeff to be half the value of the dequant. This exposes a
421 // mismatch found in av1_quantize_fp_sse2().
TEST_P(LowPrecisionQuantizeTest,CoeffHalfDequant)422 TEST_P(LowPrecisionQuantizeTest, CoeffHalfDequant) {
423 FillCoeff(16);
424 QuantizeRun(false, 25, 1);
425 }
426
TEST_P(LowPrecisionQuantizeTest,DISABLED_Speed)427 TEST_P(LowPrecisionQuantizeTest, DISABLED_Speed) {
428 int16_t *coeff_ptr = coeff_;
429 const intptr_t n_coeffs = coeff_num();
430
431 int16_t *qcoeff_ref = coeff_ptr + n_coeffs;
432 int16_t *dqcoeff_ref = qcoeff_ref + n_coeffs;
433
434 int16_t *qcoeff = dqcoeff_ref + n_coeffs;
435 int16_t *dqcoeff = qcoeff + n_coeffs;
436 uint16_t *eob = (uint16_t *)(dqcoeff + n_coeffs);
437
438 // Testing uses 2-D DCT scan order table
439 const SCAN_ORDER *const sc = get_default_scan(tx_size_, DCT_DCT);
440
441 // Testing uses luminance quantization table
442 const int q = 22;
443 const int16_t *round_fp = qtab_->quant.y_round_fp[q];
444 const int16_t *quant_fp = qtab_->quant.y_quant_fp[q];
445 const int16_t *dequant = qtab_->dequant.y_dequant_QTX[q];
446 const int kNumTests = 5000000;
447 aom_usec_timer timer, simd_timer;
448 int rows = tx_size_high[tx_size_];
449 int cols = tx_size_wide[tx_size_];
450 rows = AOMMIN(32, rows);
451 cols = AOMMIN(32, cols);
452 for (int cnt = 0; cnt <= rows; cnt++) {
453 FillCoeffRandomRows(cnt * cols);
454
455 aom_usec_timer_start(&timer);
456 for (int n = 0; n < kNumTests; ++n) {
457 quant_ref_(coeff_ptr, n_coeffs, round_fp, quant_fp, qcoeff, dqcoeff,
458 dequant, eob, sc->scan, sc->iscan);
459 }
460 aom_usec_timer_mark(&timer);
461
462 aom_usec_timer_start(&simd_timer);
463 for (int n = 0; n < kNumTests; ++n) {
464 quant_(coeff_ptr, n_coeffs, round_fp, quant_fp, qcoeff, dqcoeff, dequant,
465 eob, sc->scan, sc->iscan);
466 }
467 aom_usec_timer_mark(&simd_timer);
468
469 const int elapsed_time = static_cast<int>(aom_usec_timer_elapsed(&timer));
470 const int simd_elapsed_time =
471 static_cast<int>(aom_usec_timer_elapsed(&simd_timer));
472 printf("c_time = %d \t simd_time = %d \t Gain = %f \n", elapsed_time,
473 simd_elapsed_time, ((float)elapsed_time / simd_elapsed_time));
474 }
475 }
476
477 using std::make_tuple;
478
479 #if HAVE_AVX2
480
481 const QuantizeParam<LPQuantizeFunc> kLPQParamArrayAvx2[] = {
482 make_tuple(&av1_quantize_lp_c, &av1_quantize_lp_avx2,
483 static_cast<TX_SIZE>(TX_16X16), TYPE_FP, AOM_BITS_8),
484 make_tuple(&av1_quantize_lp_c, &av1_quantize_lp_avx2,
485 static_cast<TX_SIZE>(TX_32X32), TYPE_FP, AOM_BITS_8),
486 make_tuple(&av1_quantize_lp_c, &av1_quantize_lp_avx2,
487 static_cast<TX_SIZE>(TX_64X64), TYPE_FP, AOM_BITS_8)
488 };
489
490 INSTANTIATE_TEST_SUITE_P(AVX2, LowPrecisionQuantizeTest,
491 ::testing::ValuesIn(kLPQParamArrayAvx2));
492
493 const QuantizeParam<QuantizeFunc> kQParamArrayAvx2[] = {
494 make_tuple(&av1_quantize_fp_c, &av1_quantize_fp_avx2,
495 static_cast<TX_SIZE>(TX_16X16), TYPE_FP, AOM_BITS_8),
496 make_tuple(&av1_quantize_fp_c, &av1_quantize_fp_avx2,
497 static_cast<TX_SIZE>(TX_4X16), TYPE_FP, AOM_BITS_8),
498 make_tuple(&av1_quantize_fp_c, &av1_quantize_fp_avx2,
499 static_cast<TX_SIZE>(TX_16X4), TYPE_FP, AOM_BITS_8),
500 make_tuple(&av1_quantize_fp_c, &av1_quantize_fp_avx2,
501 static_cast<TX_SIZE>(TX_32X8), TYPE_FP, AOM_BITS_8),
502 make_tuple(&av1_quantize_fp_c, &av1_quantize_fp_avx2,
503 static_cast<TX_SIZE>(TX_8X32), TYPE_FP, AOM_BITS_8),
504 make_tuple(&av1_quantize_fp_32x32_c, &av1_quantize_fp_32x32_avx2,
505 static_cast<TX_SIZE>(TX_32X32), TYPE_FP, AOM_BITS_8),
506 make_tuple(&av1_quantize_fp_32x32_c, &av1_quantize_fp_32x32_avx2,
507 static_cast<TX_SIZE>(TX_16X64), TYPE_FP, AOM_BITS_8),
508 make_tuple(&av1_quantize_fp_32x32_c, &av1_quantize_fp_32x32_avx2,
509 static_cast<TX_SIZE>(TX_64X16), TYPE_FP, AOM_BITS_8),
510 make_tuple(&av1_quantize_fp_64x64_c, &av1_quantize_fp_64x64_avx2,
511 static_cast<TX_SIZE>(TX_64X64), TYPE_FP, AOM_BITS_8),
512 #if CONFIG_AV1_HIGHBITDEPTH
513 make_tuple(&highbd_quan16x16_wrapper<av1_highbd_quantize_fp_c>,
514 &highbd_quan16x16_wrapper<av1_highbd_quantize_fp_avx2>,
515 static_cast<TX_SIZE>(TX_16X16), TYPE_FP, AOM_BITS_8),
516 make_tuple(&highbd_quan16x16_wrapper<av1_highbd_quantize_fp_c>,
517 &highbd_quan16x16_wrapper<av1_highbd_quantize_fp_avx2>,
518 static_cast<TX_SIZE>(TX_16X16), TYPE_FP, AOM_BITS_10),
519 make_tuple(&highbd_quan16x16_wrapper<av1_highbd_quantize_fp_c>,
520 &highbd_quan16x16_wrapper<av1_highbd_quantize_fp_avx2>,
521 static_cast<TX_SIZE>(TX_16X16), TYPE_FP, AOM_BITS_12),
522 make_tuple(&highbd_quan32x32_wrapper<av1_highbd_quantize_fp_c>,
523 &highbd_quan32x32_wrapper<av1_highbd_quantize_fp_avx2>,
524 static_cast<TX_SIZE>(TX_32X32), TYPE_FP, AOM_BITS_8),
525 make_tuple(&highbd_quan32x32_wrapper<av1_highbd_quantize_fp_c>,
526 &highbd_quan32x32_wrapper<av1_highbd_quantize_fp_avx2>,
527 static_cast<TX_SIZE>(TX_32X32), TYPE_FP, AOM_BITS_10),
528 make_tuple(&highbd_quan32x32_wrapper<av1_highbd_quantize_fp_c>,
529 &highbd_quan32x32_wrapper<av1_highbd_quantize_fp_avx2>,
530 static_cast<TX_SIZE>(TX_32X32), TYPE_FP, AOM_BITS_12),
531 make_tuple(&highbd_quan64x64_wrapper<av1_highbd_quantize_fp_c>,
532 &highbd_quan64x64_wrapper<av1_highbd_quantize_fp_avx2>,
533 static_cast<TX_SIZE>(TX_64X64), TYPE_FP, AOM_BITS_8),
534 make_tuple(&highbd_quan64x64_wrapper<av1_highbd_quantize_fp_c>,
535 &highbd_quan64x64_wrapper<av1_highbd_quantize_fp_avx2>,
536 static_cast<TX_SIZE>(TX_64X64), TYPE_FP, AOM_BITS_10),
537 make_tuple(&highbd_quan64x64_wrapper<av1_highbd_quantize_fp_c>,
538 &highbd_quan64x64_wrapper<av1_highbd_quantize_fp_avx2>,
539 static_cast<TX_SIZE>(TX_64X64), TYPE_FP, AOM_BITS_12),
540 make_tuple(&aom_highbd_quantize_b_c, &aom_highbd_quantize_b_avx2,
541 static_cast<TX_SIZE>(TX_16X16), TYPE_B, AOM_BITS_8),
542 make_tuple(&aom_highbd_quantize_b_c, &aom_highbd_quantize_b_avx2,
543 static_cast<TX_SIZE>(TX_16X16), TYPE_B, AOM_BITS_10),
544 make_tuple(&aom_highbd_quantize_b_c, &aom_highbd_quantize_b_avx2,
545 static_cast<TX_SIZE>(TX_16X16), TYPE_B, AOM_BITS_12),
546 make_tuple(&aom_highbd_quantize_b_32x32_c, &aom_highbd_quantize_b_32x32_avx2,
547 static_cast<TX_SIZE>(TX_32X32), TYPE_B, AOM_BITS_12),
548 make_tuple(&aom_highbd_quantize_b_64x64_c, &aom_highbd_quantize_b_64x64_avx2,
549 static_cast<TX_SIZE>(TX_64X64), TYPE_B, AOM_BITS_12),
550 #if !CONFIG_REALTIME_ONLY
551 make_tuple(&aom_highbd_quantize_b_adaptive_c,
552 &aom_highbd_quantize_b_adaptive_avx2,
553 static_cast<TX_SIZE>(TX_16X16), TYPE_B, AOM_BITS_8),
554 make_tuple(&aom_highbd_quantize_b_adaptive_c,
555 &aom_highbd_quantize_b_adaptive_avx2,
556 static_cast<TX_SIZE>(TX_16X16), TYPE_B, AOM_BITS_10),
557 make_tuple(&aom_highbd_quantize_b_adaptive_c,
558 &aom_highbd_quantize_b_adaptive_avx2,
559 static_cast<TX_SIZE>(TX_16X16), TYPE_B, AOM_BITS_12),
560 make_tuple(&aom_highbd_quantize_b_32x32_adaptive_c,
561 &aom_highbd_quantize_b_32x32_adaptive_avx2,
562 static_cast<TX_SIZE>(TX_32X32), TYPE_B, AOM_BITS_8),
563 make_tuple(&aom_highbd_quantize_b_32x32_adaptive_c,
564 &aom_highbd_quantize_b_32x32_adaptive_avx2,
565 static_cast<TX_SIZE>(TX_32X32), TYPE_B, AOM_BITS_10),
566 make_tuple(&aom_highbd_quantize_b_32x32_adaptive_c,
567 &aom_highbd_quantize_b_32x32_adaptive_avx2,
568 static_cast<TX_SIZE>(TX_32X32), TYPE_B, AOM_BITS_12),
569 #endif // !CONFIG_REALTIME_ONLY
570 #endif // CONFIG_AV1_HIGHBITDEPTH
571 #if !CONFIG_REALTIME_ONLY
572 make_tuple(&aom_quantize_b_adaptive_c, &aom_quantize_b_adaptive_avx2,
573 static_cast<TX_SIZE>(TX_16X16), TYPE_B, AOM_BITS_8),
574 make_tuple(&aom_quantize_b_adaptive_c, &aom_quantize_b_adaptive_avx2,
575 static_cast<TX_SIZE>(TX_8X8), TYPE_B, AOM_BITS_8),
576 make_tuple(&aom_quantize_b_adaptive_c, &aom_quantize_b_adaptive_avx2,
577 static_cast<TX_SIZE>(TX_4X4), TYPE_B, AOM_BITS_8),
578 #endif // !CONFIG_REALTIME_ONLY
579 make_tuple(&aom_quantize_b_c, &aom_quantize_b_avx2,
580 static_cast<TX_SIZE>(TX_16X16), TYPE_B, AOM_BITS_8),
581 make_tuple(&aom_quantize_b_32x32_c, &aom_quantize_b_32x32_avx2,
582 static_cast<TX_SIZE>(TX_32X32), TYPE_B, AOM_BITS_8),
583 make_tuple(&aom_quantize_b_64x64_c, &aom_quantize_b_64x64_avx2,
584 static_cast<TX_SIZE>(TX_64X64), TYPE_B, AOM_BITS_8),
585 };
586
587 INSTANTIATE_TEST_SUITE_P(AVX2, FullPrecisionQuantizeTest,
588 ::testing::ValuesIn(kQParamArrayAvx2));
589 #endif // HAVE_AVX2
590
591 #if HAVE_SSE2
592
593 const QuantizeParam<LPQuantizeFunc> kLPQParamArraySSE2[] = {
594 make_tuple(&av1_quantize_lp_c, &av1_quantize_lp_sse2,
595 static_cast<TX_SIZE>(TX_16X16), TYPE_FP, AOM_BITS_8),
596 make_tuple(&av1_quantize_lp_c, &av1_quantize_lp_sse2,
597 static_cast<TX_SIZE>(TX_8X8), TYPE_FP, AOM_BITS_8),
598 make_tuple(&av1_quantize_lp_c, &av1_quantize_lp_sse2,
599 static_cast<TX_SIZE>(TX_4X4), TYPE_FP, AOM_BITS_8)
600 };
601
602 INSTANTIATE_TEST_SUITE_P(SSE2, LowPrecisionQuantizeTest,
603 ::testing::ValuesIn(kLPQParamArraySSE2));
604
605 const QuantizeParam<QuantizeFunc> kQParamArraySSE2[] = {
606 make_tuple(&av1_quantize_fp_c, &av1_quantize_fp_sse2,
607 static_cast<TX_SIZE>(TX_16X16), TYPE_FP, AOM_BITS_8),
608 make_tuple(&av1_quantize_fp_c, &av1_quantize_fp_sse2,
609 static_cast<TX_SIZE>(TX_4X16), TYPE_FP, AOM_BITS_8),
610 make_tuple(&av1_quantize_fp_c, &av1_quantize_fp_sse2,
611 static_cast<TX_SIZE>(TX_16X4), TYPE_FP, AOM_BITS_8),
612 make_tuple(&av1_quantize_fp_c, &av1_quantize_fp_sse2,
613 static_cast<TX_SIZE>(TX_8X32), TYPE_FP, AOM_BITS_8),
614 make_tuple(&av1_quantize_fp_c, &av1_quantize_fp_sse2,
615 static_cast<TX_SIZE>(TX_32X8), TYPE_FP, AOM_BITS_8),
616 make_tuple(&aom_quantize_b_c, &aom_quantize_b_sse2,
617 static_cast<TX_SIZE>(TX_16X16), TYPE_B, AOM_BITS_8),
618 #if CONFIG_AV1_HIGHBITDEPTH
619 make_tuple(&aom_highbd_quantize_b_c, &aom_highbd_quantize_b_sse2,
620 static_cast<TX_SIZE>(TX_16X16), TYPE_B, AOM_BITS_8),
621 make_tuple(&aom_highbd_quantize_b_c, &aom_highbd_quantize_b_sse2,
622 static_cast<TX_SIZE>(TX_16X16), TYPE_B, AOM_BITS_10),
623 make_tuple(&aom_highbd_quantize_b_c, &aom_highbd_quantize_b_sse2,
624 static_cast<TX_SIZE>(TX_16X16), TYPE_B, AOM_BITS_12),
625 #if !CONFIG_REALTIME_ONLY
626 make_tuple(&aom_highbd_quantize_b_adaptive_c,
627 &aom_highbd_quantize_b_adaptive_sse2,
628 static_cast<TX_SIZE>(TX_16X16), TYPE_B, AOM_BITS_8),
629 make_tuple(&aom_highbd_quantize_b_adaptive_c,
630 &aom_highbd_quantize_b_adaptive_sse2,
631 static_cast<TX_SIZE>(TX_16X16), TYPE_B, AOM_BITS_10),
632 make_tuple(&aom_highbd_quantize_b_adaptive_c,
633 &aom_highbd_quantize_b_adaptive_sse2,
634 static_cast<TX_SIZE>(TX_16X16), TYPE_B, AOM_BITS_12),
635 make_tuple(&aom_highbd_quantize_b_32x32_c, &aom_highbd_quantize_b_32x32_sse2,
636 static_cast<TX_SIZE>(TX_32X32), TYPE_B, AOM_BITS_8),
637 make_tuple(&aom_highbd_quantize_b_32x32_c, &aom_highbd_quantize_b_32x32_sse2,
638 static_cast<TX_SIZE>(TX_32X32), TYPE_B, AOM_BITS_10),
639 make_tuple(&aom_highbd_quantize_b_32x32_c, &aom_highbd_quantize_b_32x32_sse2,
640 static_cast<TX_SIZE>(TX_32X32), TYPE_B, AOM_BITS_12),
641 make_tuple(&aom_highbd_quantize_b_32x32_adaptive_c,
642 &aom_highbd_quantize_b_32x32_adaptive_sse2,
643 static_cast<TX_SIZE>(TX_32X32), TYPE_B, AOM_BITS_8),
644 make_tuple(&aom_highbd_quantize_b_32x32_adaptive_c,
645 &aom_highbd_quantize_b_32x32_adaptive_sse2,
646 static_cast<TX_SIZE>(TX_32X32), TYPE_B, AOM_BITS_10),
647 make_tuple(&aom_highbd_quantize_b_32x32_adaptive_c,
648 &aom_highbd_quantize_b_32x32_adaptive_sse2,
649 static_cast<TX_SIZE>(TX_32X32), TYPE_B, AOM_BITS_12),
650 #endif // !CONFIG_REALTIME_ONLY
651 make_tuple(&aom_highbd_quantize_b_64x64_c, &aom_highbd_quantize_b_64x64_sse2,
652 static_cast<TX_SIZE>(TX_64X64), TYPE_B, AOM_BITS_8),
653 make_tuple(&aom_highbd_quantize_b_64x64_c, &aom_highbd_quantize_b_64x64_sse2,
654 static_cast<TX_SIZE>(TX_64X64), TYPE_B, AOM_BITS_10),
655 make_tuple(&aom_highbd_quantize_b_64x64_c, &aom_highbd_quantize_b_64x64_sse2,
656 static_cast<TX_SIZE>(TX_64X64), TYPE_B, AOM_BITS_12),
657 #if !CONFIG_REALTIME_ONLY
658 make_tuple(&aom_highbd_quantize_b_64x64_adaptive_c,
659 &aom_highbd_quantize_b_64x64_adaptive_sse2,
660 static_cast<TX_SIZE>(TX_64X64), TYPE_B, AOM_BITS_8),
661 make_tuple(&aom_highbd_quantize_b_64x64_adaptive_c,
662 &aom_highbd_quantize_b_64x64_adaptive_sse2,
663 static_cast<TX_SIZE>(TX_64X64), TYPE_B, AOM_BITS_10),
664 make_tuple(&aom_highbd_quantize_b_64x64_adaptive_c,
665 &aom_highbd_quantize_b_64x64_adaptive_sse2,
666 static_cast<TX_SIZE>(TX_64X64), TYPE_B, AOM_BITS_12),
667 #endif // !CONFIG_REALTIME_ONLY
668 #endif // CONFIG_AV1_HIGHBITDEPTH
669 #if !CONFIG_REALTIME_ONLY
670 make_tuple(&aom_quantize_b_adaptive_c, &aom_quantize_b_adaptive_sse2,
671 static_cast<TX_SIZE>(TX_16X16), TYPE_B, AOM_BITS_8),
672 make_tuple(&aom_quantize_b_adaptive_c, &aom_quantize_b_adaptive_sse2,
673 static_cast<TX_SIZE>(TX_8X8), TYPE_B, AOM_BITS_8),
674 make_tuple(&aom_quantize_b_adaptive_c, &aom_quantize_b_adaptive_sse2,
675 static_cast<TX_SIZE>(TX_4X4), TYPE_B, AOM_BITS_8),
676 make_tuple(&aom_quantize_b_32x32_adaptive_c,
677 &aom_quantize_b_32x32_adaptive_sse2,
678 static_cast<TX_SIZE>(TX_32X16), TYPE_B, AOM_BITS_8),
679 make_tuple(&aom_quantize_b_32x32_adaptive_c,
680 &aom_quantize_b_32x32_adaptive_sse2,
681 static_cast<TX_SIZE>(TX_16X32), TYPE_B, AOM_BITS_8),
682 make_tuple(&aom_quantize_b_32x32_adaptive_c,
683 &aom_quantize_b_32x32_adaptive_sse2,
684 static_cast<TX_SIZE>(TX_32X32), TYPE_B, AOM_BITS_8),
685 make_tuple(&aom_quantize_b_64x64_adaptive_c,
686 &aom_quantize_b_64x64_adaptive_sse2,
687 static_cast<TX_SIZE>(TX_32X64), TYPE_B, AOM_BITS_8),
688 make_tuple(&aom_quantize_b_64x64_adaptive_c,
689 &aom_quantize_b_64x64_adaptive_sse2,
690 static_cast<TX_SIZE>(TX_64X32), TYPE_B, AOM_BITS_8),
691 make_tuple(&aom_quantize_b_64x64_adaptive_c,
692 &aom_quantize_b_64x64_adaptive_sse2,
693 static_cast<TX_SIZE>(TX_64X64), TYPE_B, AOM_BITS_8)
694 #endif // !CONFIG_REALTIME_ONLY
695 };
696
697 INSTANTIATE_TEST_SUITE_P(SSE2, FullPrecisionQuantizeTest,
698 ::testing::ValuesIn(kQParamArraySSE2));
699 #endif
700
701 #if HAVE_NEON
702
703 const QuantizeParam<LPQuantizeFunc> kLPQParamArrayNEON[] = {
704 make_tuple(av1_quantize_lp_c, av1_quantize_lp_neon,
705 static_cast<TX_SIZE>(TX_16X16), TYPE_FP, AOM_BITS_8),
706 make_tuple(av1_quantize_lp_c, av1_quantize_lp_neon,
707 static_cast<TX_SIZE>(TX_32X32), TYPE_FP, AOM_BITS_8),
708 make_tuple(av1_quantize_lp_c, av1_quantize_lp_neon,
709 static_cast<TX_SIZE>(TX_64X64), TYPE_FP, AOM_BITS_8)
710 };
711
712 INSTANTIATE_TEST_SUITE_P(NEON, LowPrecisionQuantizeTest,
713 ::testing::ValuesIn(kLPQParamArrayNEON));
714
715 const QuantizeParam<QuantizeFunc> kQParamArrayNEON[] = {
716 make_tuple(&av1_quantize_fp_c, &av1_quantize_fp_neon,
717 static_cast<TX_SIZE>(TX_16X16), TYPE_FP, AOM_BITS_8),
718 make_tuple(&av1_quantize_fp_c, &av1_quantize_fp_neon,
719 static_cast<TX_SIZE>(TX_4X16), TYPE_FP, AOM_BITS_8),
720 make_tuple(&av1_quantize_fp_c, &av1_quantize_fp_neon,
721 static_cast<TX_SIZE>(TX_16X4), TYPE_FP, AOM_BITS_8),
722 make_tuple(&av1_quantize_fp_c, &av1_quantize_fp_neon,
723 static_cast<TX_SIZE>(TX_8X32), TYPE_FP, AOM_BITS_8),
724 make_tuple(&av1_quantize_fp_c, &av1_quantize_fp_neon,
725 static_cast<TX_SIZE>(TX_32X8), TYPE_FP, AOM_BITS_8),
726 make_tuple(&av1_quantize_fp_32x32_c, &av1_quantize_fp_32x32_neon,
727 static_cast<TX_SIZE>(TX_32X32), TYPE_FP, AOM_BITS_8),
728 make_tuple(&av1_quantize_fp_64x64_c, &av1_quantize_fp_64x64_neon,
729 static_cast<TX_SIZE>(TX_64X64), TYPE_FP, AOM_BITS_8),
730 make_tuple(&aom_quantize_b_c, &aom_quantize_b_neon,
731 static_cast<TX_SIZE>(TX_16X16), TYPE_B, AOM_BITS_8),
732 make_tuple(&aom_quantize_b_32x32_c, &aom_quantize_b_32x32_neon,
733 static_cast<TX_SIZE>(TX_32X32), TYPE_B, AOM_BITS_8),
734 make_tuple(&aom_quantize_b_64x64_c, &aom_quantize_b_64x64_neon,
735 static_cast<TX_SIZE>(TX_64X64), TYPE_B, AOM_BITS_8),
736
737 #if CONFIG_AV1_HIGHBITDEPTH
738 make_tuple(&highbd_quan16x16_wrapper<av1_highbd_quantize_fp_c>,
739 &highbd_quan16x16_wrapper<av1_highbd_quantize_fp_neon>,
740 static_cast<TX_SIZE>(TX_16X16), TYPE_FP, AOM_BITS_12),
741 make_tuple(&highbd_quan32x32_wrapper<av1_highbd_quantize_fp_c>,
742 &highbd_quan32x32_wrapper<av1_highbd_quantize_fp_neon>,
743 static_cast<TX_SIZE>(TX_32X32), TYPE_FP, AOM_BITS_12),
744 make_tuple(&highbd_quan64x64_wrapper<av1_highbd_quantize_fp_c>,
745 &highbd_quan64x64_wrapper<av1_highbd_quantize_fp_neon>,
746 static_cast<TX_SIZE>(TX_64X64), TYPE_FP, AOM_BITS_12),
747 make_tuple(&aom_highbd_quantize_b_c, &aom_highbd_quantize_b_neon,
748 static_cast<TX_SIZE>(TX_16X16), TYPE_B, AOM_BITS_12),
749 make_tuple(&aom_highbd_quantize_b_32x32_c, &aom_highbd_quantize_b_32x32_neon,
750 static_cast<TX_SIZE>(TX_32X32), TYPE_B, AOM_BITS_12),
751 make_tuple(&aom_highbd_quantize_b_64x64_c, &aom_highbd_quantize_b_64x64_neon,
752 static_cast<TX_SIZE>(TX_64X64), TYPE_B, AOM_BITS_12),
753 #if !CONFIG_REALTIME_ONLY
754 make_tuple(&aom_highbd_quantize_b_adaptive_c,
755 &aom_highbd_quantize_b_adaptive_neon,
756 static_cast<TX_SIZE>(TX_16X16), TYPE_B, AOM_BITS_12),
757 make_tuple(&aom_highbd_quantize_b_32x32_adaptive_c,
758 &aom_highbd_quantize_b_32x32_adaptive_neon,
759 static_cast<TX_SIZE>(TX_32X32), TYPE_B, AOM_BITS_12),
760 make_tuple(&aom_highbd_quantize_b_64x64_adaptive_c,
761 &aom_highbd_quantize_b_64x64_adaptive_neon,
762 static_cast<TX_SIZE>(TX_64X64), TYPE_B, AOM_BITS_12),
763 #endif // !CONFIG_REALTIME_ONLY
764 #endif // CONFIG_AV1_HIGHBITDEPTH
765 };
766
767 INSTANTIATE_TEST_SUITE_P(NEON, FullPrecisionQuantizeTest,
768 ::testing::ValuesIn(kQParamArrayNEON));
769 #endif
770
771 #if HAVE_SSSE3 && ARCH_X86_64
772 INSTANTIATE_TEST_SUITE_P(
773 SSSE3, FullPrecisionQuantizeTest,
774 ::testing::Values(
775 make_tuple(&aom_quantize_b_c, &aom_quantize_b_ssse3,
776 static_cast<TX_SIZE>(TX_16X16), TYPE_B, AOM_BITS_8),
777 make_tuple(&aom_quantize_b_32x32_c, &aom_quantize_b_32x32_ssse3,
778 static_cast<TX_SIZE>(TX_32X32), TYPE_B, AOM_BITS_8),
779 make_tuple(&aom_quantize_b_64x64_c, &aom_quantize_b_64x64_ssse3,
780 static_cast<TX_SIZE>(TX_64X64), TYPE_B, AOM_BITS_8)));
781
782 #endif // HAVE_SSSE3 && ARCH_X86_64
783
784 #if HAVE_AVX
785 INSTANTIATE_TEST_SUITE_P(
786 AVX, FullPrecisionQuantizeTest,
787 ::testing::Values(
788 make_tuple(&aom_quantize_b_c, &aom_quantize_b_avx,
789 static_cast<TX_SIZE>(TX_16X16), TYPE_B, AOM_BITS_8),
790 make_tuple(&aom_quantize_b_32x32_c, &aom_quantize_b_32x32_avx,
791 static_cast<TX_SIZE>(TX_32X32), TYPE_B, AOM_BITS_8)));
792
793 #endif // HAVE_AVX
794
795 } // namespace
796