2 * Copyright (c) 2014 The WebM project authors. All Rights Reserved.
4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree.
16 #include "third_party/googletest/src/include/gtest/gtest.h"
18 #include "./vp9_rtcd.h"
19 #include "./vpx_config.h"
20 #include "./vpx_dsp_rtcd.h"
21 #include "test/acm_random.h"
22 #include "test/bench.h"
23 #include "test/buffer.h"
24 #include "test/clear_system_state.h"
25 #include "test/register_state_check.h"
26 #include "test/util.h"
27 #include "vp9/common/vp9_entropy.h"
28 #include "vp9/common/vp9_scan.h"
29 #include "vpx/vpx_codec.h"
30 #include "vpx/vpx_integer.h"
31 #include "vpx_ports/msvc.h"
32 #include "vpx_ports/vpx_timer.h"
34 using libvpx_test::ACMRandom;
35 using libvpx_test::Buffer;
38 const int number_of_iterations = 100;
40 typedef void (*QuantizeFunc)(const tran_low_t *coeff, intptr_t count,
41 const int16_t *zbin, const int16_t *round,
42 const int16_t *quant, const int16_t *quant_shift,
43 tran_low_t *qcoeff, tran_low_t *dqcoeff,
44 const int16_t *dequant, uint16_t *eob,
45 const int16_t *scan, const int16_t *iscan);
46 typedef std::tuple<QuantizeFunc, QuantizeFunc, vpx_bit_depth_t,
47 int /*max_size*/, bool /*is_fp*/>
50 // Wrapper for FP version which does not use zbin or quant_shift.
51 typedef void (*QuantizeFPFunc)(const tran_low_t *coeff, intptr_t count,
52 const int16_t *round, const int16_t *quant,
53 tran_low_t *qcoeff, tran_low_t *dqcoeff,
54 const int16_t *dequant, uint16_t *eob,
55 const int16_t *scan, const int16_t *iscan);
57 template <QuantizeFPFunc fn>
58 void QuantFPWrapper(const tran_low_t *coeff, intptr_t count,
59 const int16_t *zbin, const int16_t *round,
60 const int16_t *quant, const int16_t *quant_shift,
61 tran_low_t *qcoeff, tran_low_t *dqcoeff,
62 const int16_t *dequant, uint16_t *eob, const int16_t *scan,
63 const int16_t *iscan) {
67 fn(coeff, count, round, quant, qcoeff, dqcoeff, dequant, eob, scan, iscan);
70 class VP9QuantizeBase : public AbstractBench {
72 VP9QuantizeBase(vpx_bit_depth_t bit_depth, int max_size, bool is_fp)
73 : bit_depth_(bit_depth), max_size_(max_size), is_fp_(is_fp),
74 coeff_(Buffer<tran_low_t>(max_size_, max_size_, 0, 16)),
75 qcoeff_(Buffer<tran_low_t>(max_size_, max_size_, 0, 32)),
76 dqcoeff_(Buffer<tran_low_t>(max_size_, max_size_, 0, 32)) {
77 // TODO(jianj): SSSE3 and AVX2 tests fail on extreme values.
79 max_value_ = (1 << (7 + bit_depth_)) - 1;
81 max_value_ = (1 << bit_depth_) - 1;
84 reinterpret_cast<int16_t *>(vpx_memalign(16, 8 * sizeof(*zbin_ptr_)));
85 round_fp_ptr_ = reinterpret_cast<int16_t *>(
86 vpx_memalign(16, 8 * sizeof(*round_fp_ptr_)));
87 quant_fp_ptr_ = reinterpret_cast<int16_t *>(
88 vpx_memalign(16, 8 * sizeof(*quant_fp_ptr_)));
90 reinterpret_cast<int16_t *>(vpx_memalign(16, 8 * sizeof(*round_ptr_)));
92 reinterpret_cast<int16_t *>(vpx_memalign(16, 8 * sizeof(*quant_ptr_)));
93 quant_shift_ptr_ = reinterpret_cast<int16_t *>(
94 vpx_memalign(16, 8 * sizeof(*quant_shift_ptr_)));
95 dequant_ptr_ = reinterpret_cast<int16_t *>(
96 vpx_memalign(16, 8 * sizeof(*dequant_ptr_)));
98 r_ptr_ = (is_fp_) ? round_fp_ptr_ : round_ptr_;
99 q_ptr_ = (is_fp_) ? quant_fp_ptr_ : quant_ptr_;
104 vpx_free(round_fp_ptr_);
105 vpx_free(quant_fp_ptr_);
106 vpx_free(round_ptr_);
107 vpx_free(quant_ptr_);
108 vpx_free(quant_shift_ptr_);
109 vpx_free(dequant_ptr_);
111 round_fp_ptr_ = nullptr;
112 quant_fp_ptr_ = nullptr;
113 round_ptr_ = nullptr;
114 quant_ptr_ = nullptr;
115 quant_shift_ptr_ = nullptr;
116 dequant_ptr_ = nullptr;
117 libvpx_test::ClearSystemState();
122 int16_t *round_fp_ptr_;
123 int16_t *quant_fp_ptr_;
126 int16_t *quant_shift_ptr_;
127 int16_t *dequant_ptr_;
128 const vpx_bit_depth_t bit_depth_;
132 Buffer<tran_low_t> coeff_;
133 Buffer<tran_low_t> qcoeff_;
134 Buffer<tran_low_t> dqcoeff_;
138 const scan_order *scan_;
142 class VP9QuantizeTest : public VP9QuantizeBase,
143 public ::testing::TestWithParam<QuantizeParam> {
146 : VP9QuantizeBase(GET_PARAM(2), GET_PARAM(3), GET_PARAM(4)),
147 quantize_op_(GET_PARAM(0)), ref_quantize_op_(GET_PARAM(1)) {}
151 const QuantizeFunc quantize_op_;
152 const QuantizeFunc ref_quantize_op_;
155 void VP9QuantizeTest::Run() {
156 quantize_op_(coeff_.TopLeftPixel(), count_, zbin_ptr_, r_ptr_, q_ptr_,
157 quant_shift_ptr_, qcoeff_.TopLeftPixel(),
158 dqcoeff_.TopLeftPixel(), dequant_ptr_, &eob_, scan_->scan,
162 // This quantizer compares the AC coefficients to the quantization step size to
163 // determine if further multiplication operations are needed.
164 // Based on vp9_quantize_fp_sse2().
165 inline void quant_fp_nz(const tran_low_t *coeff_ptr, intptr_t n_coeffs,
166 const int16_t *round_ptr, const int16_t *quant_ptr,
167 tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr,
168 const int16_t *dequant_ptr, uint16_t *eob_ptr,
169 const int16_t *scan, const int16_t *iscan,
172 const int thr = dequant_ptr[1] >> (1 + is_32x32);
175 // Quantization pass: All coefficients with index >= zero_flag are
176 // skippable. Note: zero_flag can be zero.
177 for (i = 0; i < n_coeffs; i += 16) {
183 // count nzflag for each row (16 tran_low_t)
184 for (y = 0; y < 16; ++y) {
185 const int rc = i + y;
186 const int coeff = coeff_ptr[rc];
187 coeff_sign[y] = (coeff >> 31);
188 abs_coeff[y] = (coeff ^ coeff_sign[y]) - coeff_sign[y];
189 // The first 16 are skipped in the sse2 code. Do the same here to match.
190 if (i >= 16 && (abs_coeff[y] <= thr)) {
195 for (y = 0; y < 16; ++y) {
196 const int rc = i + y;
197 // If all of the AC coeffs in a row has magnitude less than the
198 // quantization step_size/2, quantize to zero.
199 if (nzflag_cnt < 16) {
204 _round = ROUND_POWER_OF_TWO(round_ptr[rc != 0], 1);
206 _round = round_ptr[rc != 0];
208 tmp = clamp(abs_coeff[y] + _round, INT16_MIN, INT16_MAX);
209 tmp = (tmp * quant_ptr[rc != 0]) >> (16 - is_32x32);
210 qcoeff_ptr[rc] = (tmp ^ coeff_sign[y]) - coeff_sign[y];
212 static_cast<tran_low_t>(qcoeff_ptr[rc] * dequant_ptr[rc != 0]);
215 dqcoeff_ptr[rc] = static_cast<tran_low_t>(qcoeff_ptr[rc] *
216 dequant_ptr[rc != 0] / 2);
219 static_cast<tran_low_t>(qcoeff_ptr[rc] * dequant_ptr[rc != 0]);
229 for (i = 0; i < n_coeffs; i++) {
230 // Use the scan order to find the correct eob.
231 const int rc = scan[i];
232 if (qcoeff_ptr[rc]) {
239 void quantize_fp_nz_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs,
240 const int16_t *round_ptr, const int16_t *quant_ptr,
241 tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr,
242 const int16_t *dequant_ptr, uint16_t *eob_ptr,
243 const int16_t *scan, const int16_t *iscan) {
244 quant_fp_nz(coeff_ptr, n_coeffs, round_ptr, quant_ptr, qcoeff_ptr,
245 dqcoeff_ptr, dequant_ptr, eob_ptr, scan, iscan, 0);
248 void quantize_fp_32x32_nz_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs,
249 const int16_t *round_ptr, const int16_t *quant_ptr,
250 tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr,
251 const int16_t *dequant_ptr, uint16_t *eob_ptr,
252 const int16_t *scan, const int16_t *iscan) {
253 quant_fp_nz(coeff_ptr, n_coeffs, round_ptr, quant_ptr, qcoeff_ptr,
254 dqcoeff_ptr, dequant_ptr, eob_ptr, scan, iscan, 1);
257 void GenerateHelperArrays(ACMRandom *rnd, int16_t *zbin, int16_t *round,
258 int16_t *quant, int16_t *quant_shift,
259 int16_t *dequant, int16_t *round_fp,
261 // Max when q == 0. Otherwise, it is 48 for Y and 42 for U/V.
262 const int max_qrounding_factor_fp = 64;
264 for (int j = 0; j < 2; j++) {
265 // The range is 4 to 1828 in the VP9 tables.
266 const int qlookup = rnd->RandRange(1825) + 4;
267 round_fp[j] = (max_qrounding_factor_fp * qlookup) >> 7;
268 quant_fp[j] = (1 << 16) / qlookup;
270 // Values determined by deconstructing vp9_init_quantizer().
271 // zbin may be up to 1143 for 8 and 10 bit Y values, or 1200 for 12 bit Y
272 // values or U/V values of any bit depth. This is because y_delta is not
273 // factored into the vp9_ac_quant() call.
274 zbin[j] = rnd->RandRange(1200);
276 // round may be up to 685 for Y values or 914 for U/V.
277 round[j] = rnd->RandRange(914);
278 // quant ranges from 1 to -32703
279 quant[j] = static_cast<int>(rnd->RandRange(32704)) - 32703;
280 // quant_shift goes up to 1 << 16.
281 quant_shift[j] = rnd->RandRange(16384);
282 // dequant maxes out at 1828 for all cases.
283 dequant[j] = rnd->RandRange(1828);
285 for (int j = 2; j < 8; j++) {
287 round_fp[j] = round_fp[1];
288 quant_fp[j] = quant_fp[1];
291 quant_shift[j] = quant_shift[1];
292 dequant[j] = dequant[1];
296 TEST_P(VP9QuantizeTest, OperationCheck) {
297 ACMRandom rnd(ACMRandom::DeterministicSeed());
298 ASSERT_TRUE(coeff_.Init());
299 ASSERT_TRUE(qcoeff_.Init());
300 ASSERT_TRUE(dqcoeff_.Init());
301 Buffer<tran_low_t> ref_qcoeff =
302 Buffer<tran_low_t>(max_size_, max_size_, 0, 32);
303 ASSERT_TRUE(ref_qcoeff.Init());
304 Buffer<tran_low_t> ref_dqcoeff =
305 Buffer<tran_low_t>(max_size_, max_size_, 0, 32);
306 ASSERT_TRUE(ref_dqcoeff.Init());
307 uint16_t ref_eob = 0;
310 for (int i = 0; i < number_of_iterations; ++i) {
312 if (max_size_ == 16) {
313 sz = static_cast<TX_SIZE>(i % 3); // TX_4X4, TX_8X8 TX_16X16
317 const TX_TYPE tx_type = static_cast<TX_TYPE>((i >> 2) % 3);
318 scan_ = &vp9_scan_orders[sz][tx_type];
319 count_ = (4 << sz) * (4 << sz);
320 coeff_.Set(&rnd, -max_value_, max_value_);
321 GenerateHelperArrays(&rnd, zbin_ptr_, round_ptr_, quant_ptr_,
322 quant_shift_ptr_, dequant_ptr_, round_fp_ptr_,
324 ref_quantize_op_(coeff_.TopLeftPixel(), count_, zbin_ptr_, r_ptr_, q_ptr_,
325 quant_shift_ptr_, ref_qcoeff.TopLeftPixel(),
326 ref_dqcoeff.TopLeftPixel(), dequant_ptr_, &ref_eob,
327 scan_->scan, scan_->iscan);
329 ASM_REGISTER_STATE_CHECK(quantize_op_(
330 coeff_.TopLeftPixel(), count_, zbin_ptr_, r_ptr_, q_ptr_,
331 quant_shift_ptr_, qcoeff_.TopLeftPixel(), dqcoeff_.TopLeftPixel(),
332 dequant_ptr_, &eob_, scan_->scan, scan_->iscan));
334 EXPECT_TRUE(qcoeff_.CheckValues(ref_qcoeff));
335 EXPECT_TRUE(dqcoeff_.CheckValues(ref_dqcoeff));
337 EXPECT_EQ(eob_, ref_eob);
340 printf("Failure on iteration %d.\n", i);
341 qcoeff_.PrintDifference(ref_qcoeff);
342 dqcoeff_.PrintDifference(ref_dqcoeff);
348 TEST_P(VP9QuantizeTest, EOBCheck) {
349 ACMRandom rnd(ACMRandom::DeterministicSeed());
350 ASSERT_TRUE(coeff_.Init());
351 ASSERT_TRUE(qcoeff_.Init());
352 ASSERT_TRUE(dqcoeff_.Init());
353 Buffer<tran_low_t> ref_qcoeff =
354 Buffer<tran_low_t>(max_size_, max_size_, 0, 32);
355 ASSERT_TRUE(ref_qcoeff.Init());
356 Buffer<tran_low_t> ref_dqcoeff =
357 Buffer<tran_low_t>(max_size_, max_size_, 0, 32);
358 ASSERT_TRUE(ref_dqcoeff.Init());
359 uint16_t ref_eob = 0;
361 const uint32_t max_index = max_size_ * max_size_ - 1;
363 for (int i = 0; i < number_of_iterations; ++i) {
365 if (max_size_ == 16) {
366 sz = static_cast<TX_SIZE>(i % 3); // TX_4X4, TX_8X8 TX_16X16
370 const TX_TYPE tx_type = static_cast<TX_TYPE>((i >> 2) % 3);
371 scan_ = &vp9_scan_orders[sz][tx_type];
372 count_ = (4 << sz) * (4 << sz);
373 // Two random entries
375 coeff_.TopLeftPixel()[rnd.RandRange(count_) & max_index] =
376 static_cast<int>(rnd.RandRange(max_value_ * 2)) - max_value_;
377 coeff_.TopLeftPixel()[rnd.RandRange(count_) & max_index] =
378 static_cast<int>(rnd.RandRange(max_value_ * 2)) - max_value_;
379 GenerateHelperArrays(&rnd, zbin_ptr_, round_ptr_, quant_ptr_,
380 quant_shift_ptr_, dequant_ptr_, round_fp_ptr_,
382 ref_quantize_op_(coeff_.TopLeftPixel(), count_, zbin_ptr_, r_ptr_, q_ptr_,
383 quant_shift_ptr_, ref_qcoeff.TopLeftPixel(),
384 ref_dqcoeff.TopLeftPixel(), dequant_ptr_, &ref_eob,
385 scan_->scan, scan_->iscan);
387 ASM_REGISTER_STATE_CHECK(quantize_op_(
388 coeff_.TopLeftPixel(), count_, zbin_ptr_, r_ptr_, q_ptr_,
389 quant_shift_ptr_, qcoeff_.TopLeftPixel(), dqcoeff_.TopLeftPixel(),
390 dequant_ptr_, &eob_, scan_->scan, scan_->iscan));
392 EXPECT_TRUE(qcoeff_.CheckValues(ref_qcoeff));
393 EXPECT_TRUE(dqcoeff_.CheckValues(ref_dqcoeff));
395 EXPECT_EQ(eob_, ref_eob);
398 printf("Failure on iteration %d.\n", i);
399 qcoeff_.PrintDifference(ref_qcoeff);
400 dqcoeff_.PrintDifference(ref_dqcoeff);
406 TEST_P(VP9QuantizeTest, DISABLED_Speed) {
407 ACMRandom rnd(ACMRandom::DeterministicSeed());
408 ASSERT_TRUE(coeff_.Init());
409 ASSERT_TRUE(qcoeff_.Init());
410 ASSERT_TRUE(dqcoeff_.Init());
411 TX_SIZE starting_sz, ending_sz;
413 if (max_size_ == 16) {
414 starting_sz = TX_4X4;
415 ending_sz = TX_16X16;
417 starting_sz = TX_32X32;
418 ending_sz = TX_32X32;
421 for (TX_SIZE sz = starting_sz; sz <= ending_sz; ++sz) {
422 // zbin > coeff, zbin < coeff.
423 for (int i = 0; i < 2; ++i) {
424 // TX_TYPE defines the scan order. That is not relevant to the speed test.
425 // Pick the first one.
426 const TX_TYPE tx_type = DCT_DCT;
427 count_ = (4 << sz) * (4 << sz);
428 scan_ = &vp9_scan_orders[sz][tx_type];
430 GenerateHelperArrays(&rnd, zbin_ptr_, round_ptr_, quant_ptr_,
431 quant_shift_ptr_, dequant_ptr_, round_fp_ptr_,
435 // When |coeff values| are less than zbin the results are 0.
437 if (max_size_ == 32) {
438 // For 32x32, the threshold is halved. Double it to keep the values
442 for (int j = 0; j < 8; ++j) zbin_ptr_[j] = threshold;
443 coeff_.Set(&rnd, -99, 99);
445 for (int j = 0; j < 8; ++j) zbin_ptr_[j] = 50;
446 coeff_.Set(&rnd, -500, 500);
449 RunNTimes(10000000 / count_);
451 (i == 0) ? "Bypass calculations " : "Full calculations ";
453 snprintf(block_size, sizeof(block_size), "%dx%d", 4 << sz, 4 << sz);
455 snprintf(title, sizeof(title), "%25s %8s ", type, block_size);
461 using std::make_tuple;
464 #if CONFIG_VP9_HIGHBITDEPTH
465 INSTANTIATE_TEST_SUITE_P(
466 SSE2, VP9QuantizeTest,
468 make_tuple(&vpx_quantize_b_sse2, &vpx_quantize_b_c, VPX_BITS_8, 16,
470 make_tuple(&vpx_highbd_quantize_b_sse2, &vpx_highbd_quantize_b_c,
471 VPX_BITS_8, 16, false),
472 make_tuple(&vpx_highbd_quantize_b_sse2, &vpx_highbd_quantize_b_c,
473 VPX_BITS_10, 16, false),
474 make_tuple(&vpx_highbd_quantize_b_sse2, &vpx_highbd_quantize_b_c,
475 VPX_BITS_12, 16, false),
476 make_tuple(&vpx_highbd_quantize_b_32x32_sse2,
477 &vpx_highbd_quantize_b_32x32_c, VPX_BITS_8, 32, false),
478 make_tuple(&vpx_highbd_quantize_b_32x32_sse2,
479 &vpx_highbd_quantize_b_32x32_c, VPX_BITS_10, 32, false),
480 make_tuple(&vpx_highbd_quantize_b_32x32_sse2,
481 &vpx_highbd_quantize_b_32x32_c, VPX_BITS_12, 32, false)));
484 INSTANTIATE_TEST_SUITE_P(
485 SSE2, VP9QuantizeTest,
486 ::testing::Values(make_tuple(&vpx_quantize_b_sse2, &vpx_quantize_b_c,
487 VPX_BITS_8, 16, false),
488 make_tuple(&QuantFPWrapper<vp9_quantize_fp_sse2>,
489 &QuantFPWrapper<quantize_fp_nz_c>, VPX_BITS_8,
491 #endif // CONFIG_VP9_HIGHBITDEPTH
496 INSTANTIATE_TEST_SUITE_P(
497 SSSE3, VP9QuantizeTest,
498 ::testing::Values(make_tuple(&vpx_quantize_b_ssse3, &vpx_quantize_b_c,
499 VPX_BITS_8, 16, false),
500 make_tuple(&vpx_quantize_b_32x32_ssse3,
501 &vpx_quantize_b_32x32_c, VPX_BITS_8, 32,
503 make_tuple(&QuantFPWrapper<vp9_quantize_fp_ssse3>,
504 &QuantFPWrapper<quantize_fp_nz_c>, VPX_BITS_8,
506 make_tuple(&QuantFPWrapper<vp9_quantize_fp_32x32_ssse3>,
507 &QuantFPWrapper<quantize_fp_32x32_nz_c>,
508 VPX_BITS_8, 32, true)));
510 INSTANTIATE_TEST_SUITE_P(
511 SSSE3, VP9QuantizeTest,
512 ::testing::Values(make_tuple(&vpx_quantize_b_ssse3, &vpx_quantize_b_c,
513 VPX_BITS_8, 16, false),
514 make_tuple(&vpx_quantize_b_32x32_ssse3,
515 &vpx_quantize_b_32x32_c, VPX_BITS_8, 32,
518 #endif // VPX_ARCH_X86_64
522 INSTANTIATE_TEST_SUITE_P(AVX, VP9QuantizeTest,
523 ::testing::Values(make_tuple(&vpx_quantize_b_avx,
525 VPX_BITS_8, 16, false),
526 make_tuple(&vpx_quantize_b_32x32_avx,
527 &vpx_quantize_b_32x32_c,
528 VPX_BITS_8, 32, false)));
531 #if VPX_ARCH_X86_64 && HAVE_AVX2
532 INSTANTIATE_TEST_SUITE_P(
533 AVX2, VP9QuantizeTest,
534 ::testing::Values(make_tuple(&QuantFPWrapper<vp9_quantize_fp_avx2>,
535 &QuantFPWrapper<quantize_fp_nz_c>, VPX_BITS_8,
540 INSTANTIATE_TEST_SUITE_P(
541 NEON, VP9QuantizeTest,
542 ::testing::Values(make_tuple(&vpx_quantize_b_neon, &vpx_quantize_b_c,
543 VPX_BITS_8, 16, false),
544 make_tuple(&vpx_quantize_b_32x32_neon,
545 &vpx_quantize_b_32x32_c, VPX_BITS_8, 32,
547 make_tuple(&QuantFPWrapper<vp9_quantize_fp_neon>,
548 &QuantFPWrapper<vp9_quantize_fp_c>, VPX_BITS_8,
550 make_tuple(&QuantFPWrapper<vp9_quantize_fp_32x32_neon>,
551 &QuantFPWrapper<vp9_quantize_fp_32x32_c>,
552 VPX_BITS_8, 32, true)));
555 #if HAVE_VSX && !CONFIG_VP9_HIGHBITDEPTH
556 INSTANTIATE_TEST_SUITE_P(
557 VSX, VP9QuantizeTest,
558 ::testing::Values(make_tuple(&vpx_quantize_b_vsx, &vpx_quantize_b_c,
559 VPX_BITS_8, 16, false),
560 make_tuple(&vpx_quantize_b_32x32_vsx,
561 &vpx_quantize_b_32x32_c, VPX_BITS_8, 32,
563 make_tuple(&QuantFPWrapper<vp9_quantize_fp_vsx>,
564 &QuantFPWrapper<vp9_quantize_fp_c>, VPX_BITS_8,
566 make_tuple(&QuantFPWrapper<vp9_quantize_fp_32x32_vsx>,
567 &QuantFPWrapper<vp9_quantize_fp_32x32_c>,
568 VPX_BITS_8, 32, true)));
569 #endif // HAVE_VSX && !CONFIG_VP9_HIGHBITDEPTH
571 #if HAVE_LSX && !CONFIG_VP9_HIGHBITDEPTH
572 INSTANTIATE_TEST_SUITE_P(LSX, VP9QuantizeTest,
573 ::testing::Values(make_tuple(&vpx_quantize_b_lsx,
575 VPX_BITS_8, 16, false),
576 make_tuple(&vpx_quantize_b_32x32_lsx,
577 &vpx_quantize_b_32x32_c,
578 VPX_BITS_8, 32, false)));
579 #endif // HAVE_LSX && !CONFIG_VP9_HIGHBITDEPTH
581 // Only useful to compare "Speed" test results.
582 INSTANTIATE_TEST_SUITE_P(
583 DISABLED_C, VP9QuantizeTest,
585 make_tuple(&vpx_quantize_b_c, &vpx_quantize_b_c, VPX_BITS_8, 16, false),
586 make_tuple(&vpx_quantize_b_32x32_c, &vpx_quantize_b_32x32_c, VPX_BITS_8,
588 make_tuple(&QuantFPWrapper<vp9_quantize_fp_c>,
589 &QuantFPWrapper<vp9_quantize_fp_c>, VPX_BITS_8, 16, true),
590 make_tuple(&QuantFPWrapper<quantize_fp_nz_c>,
591 &QuantFPWrapper<quantize_fp_nz_c>, VPX_BITS_8, 16, true),
592 make_tuple(&QuantFPWrapper<quantize_fp_32x32_nz_c>,
593 &QuantFPWrapper<quantize_fp_32x32_nz_c>, VPX_BITS_8, 32,
595 make_tuple(&QuantFPWrapper<vp9_quantize_fp_32x32_c>,
596 &QuantFPWrapper<vp9_quantize_fp_32x32_c>, VPX_BITS_8, 32,