Unified · Split
| @@ -14,9 +14,9 @@ · 13 unmodified lines | ||
| 14 | 14 | |
| 15 | 15 | #include "third_party/googletest/src/include/gtest/gtest.h" |
| 16 | 16 | |
| 17 | +#include "./vp9_rtcd.h" | |
| 17 | 18 | #include "./vpx_config.h" |
| 18 | 19 | #include "./vpx_dsp_rtcd.h" |
| 19 | −#include "./vp9_rtcd.h" | |
| 20 | 20 | #include "test/acm_random.h" |
| 21 | 21 | #include "test/buffer.h" |
| 22 | 22 | #include "test/clear_system_state.h" |
| @@ -42,7 +42,7 @@ typedef void (*QuantizeFunc)(const tran_low_t *coeff, intptr_t count, · 19 unmodified lines | ||
| 42 | 42 | uint16_t *eob, const int16_t *scan, |
| 43 | 43 | const int16_t *iscan); |
| 44 | 44 | typedef std::tr1::tuple<QuantizeFunc, QuantizeFunc, vpx_bit_depth_t, |
| 45 | − int /*max_size*/> | |
| 45 | + int /*max_size*/, bool /*is_fp*/> | |
| 46 | 46 | QuantizeParam; |
| 47 | 47 | |
| 48 | 48 | // Wrapper for FP version which does not use zbin or quant_shift. |
| @@ -69,11 +69,15 @@ void QuantFPWrapper(const tran_low_t *coeff, intptr_t count, int skip_block, · 20 unmodified lines | ||
| 69 | 69 | |
| 70 | 70 | class VP9QuantizeBase { |
| 71 | 71 | public: |
| 72 | − VP9QuantizeBase(vpx_bit_depth_t bit_depth, int max_size) | |
| 73 | − : bit_depth_(bit_depth), max_size_(max_size) { | |
| 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 | 74 | max_value_ = (1 << bit_depth_) - 1; |
| 75 | 75 | zbin_ptr_ = |
| 76 | 76 | reinterpret_cast<int16_t *>(vpx_memalign(16, 8 * sizeof(*zbin_ptr_))); |
| 77 | + round_fp_ptr_ = reinterpret_cast<int16_t *>( | |
| 78 | + vpx_memalign(16, 8 * sizeof(*round_fp_ptr_))); | |
| 79 | + quant_fp_ptr_ = reinterpret_cast<int16_t *>( | |
| 80 | + vpx_memalign(16, 8 * sizeof(*quant_fp_ptr_))); | |
| 77 | 81 | round_ptr_ = |
| 78 | 82 | reinterpret_cast<int16_t *>(vpx_memalign(16, 8 * sizeof(*round_ptr_))); |
| 79 | 83 | quant_ptr_ = |
| @@ -86,11 +90,15 @@ class VP9QuantizeBase { · 6 unmodified lines | ||
| 86 | 90 | |
| 87 | 91 | ~VP9QuantizeBase() { |
| 88 | 92 | vpx_free(zbin_ptr_); |
| 93 | + vpx_free(round_fp_ptr_); | |
| 94 | + vpx_free(quant_fp_ptr_); | |
| 89 | 95 | vpx_free(round_ptr_); |
| 90 | 96 | vpx_free(quant_ptr_); |
| 91 | 97 | vpx_free(quant_shift_ptr_); |
| 92 | 98 | vpx_free(dequant_ptr_); |
| 93 | 99 | zbin_ptr_ = NULL; |
| 100 | + round_fp_ptr_ = NULL; | |
| 101 | + quant_fp_ptr_ = NULL; | |
| 94 | 102 | round_ptr_ = NULL; |
| 95 | 103 | quant_ptr_ = NULL; |
| 96 | 104 | quant_shift_ptr_ = NULL; |
| @@ -100,6 +108,8 @@ class VP9QuantizeBase { · 3 unmodified lines | ||
| 100 | 108 | |
| 101 | 109 | protected: |
| 102 | 110 | int16_t *zbin_ptr_; |
| 111 | + int16_t *round_fp_ptr_; | |
| 112 | + int16_t *quant_fp_ptr_; | |
| 103 | 113 | int16_t *round_ptr_; |
| 104 | 114 | int16_t *quant_ptr_; |
| 105 | 115 | int16_t *quant_shift_ptr_; |
| @@ -107,29 +117,98 @@ class VP9QuantizeBase { · 1 unmodified line | ||
| 107 | 117 | const vpx_bit_depth_t bit_depth_; |
| 108 | 118 | int max_value_; |
| 109 | 119 | const int max_size_; |
| 120 | + const bool is_fp_; | |
| 110 | 121 | }; |
| 111 | 122 | |
| 112 | 123 | class VP9QuantizeTest : public VP9QuantizeBase, |
| 113 | 124 | public ::testing::TestWithParam<QuantizeParam> { |
| 114 | 125 | public: |
| 115 | 126 | VP9QuantizeTest() |
| 116 | − : VP9QuantizeBase(GET_PARAM(2), GET_PARAM(3)), quantize_op_(GET_PARAM(0)), | |
| 117 | − ref_quantize_op_(GET_PARAM(1)) {} | |
| 127 | + : VP9QuantizeBase(GET_PARAM(2), GET_PARAM(3), GET_PARAM(4)), | |
| 128 | + quantize_op_(GET_PARAM(0)), ref_quantize_op_(GET_PARAM(1)) {} | |
| 118 | 129 | |
| 119 | 130 | protected: |
| 120 | 131 | const QuantizeFunc quantize_op_; |
| 121 | 132 | const QuantizeFunc ref_quantize_op_; |
| 122 | 133 | }; |
| 123 | 134 | |
| 135 | +// This quantizer compares the AC coefficients to the quantization step size to | |
| 136 | +// determine if further multiplication operations are needed. | |
| 137 | +// Based on vp9_quantize_fp_sse2(). | |
| 138 | +void quantize_fp_nz_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs, | |
| 139 | + int skip_block, const int16_t *round_ptr, | |
| 140 | + const int16_t *quant_ptr, tran_low_t *qcoeff_ptr, | |
| 141 | + tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, | |
| 142 | + uint16_t *eob_ptr, const int16_t *scan, | |
| 143 | + const int16_t *iscan) { | |
| 144 | + int i, eob = -1; | |
| 145 | + const int thr = dequant_ptr[1] >> 1; | |
| 146 | + (void)iscan; | |
| 147 | + (void)skip_block; | |
| 148 | + assert(!skip_block); | |
| 149 | + | |
| 150 | + memset(qcoeff_ptr, 0, n_coeffs * sizeof(*qcoeff_ptr)); | |
| 151 | + memset(dqcoeff_ptr, 0, n_coeffs * sizeof(*dqcoeff_ptr)); | |
| 152 | + | |
| 153 | + // Quantization pass: All coefficients with index >= zero_flag are | |
| 154 | + // skippable. Note: zero_flag can be zero. | |
| 155 | + for (i = 0; i < n_coeffs; i++) { | |
| 156 | + // Work on row order in this loop. | |
| 157 | + const int rc = i; | |
| 158 | + const int coeff = coeff_ptr[rc]; | |
| 159 | + const int coeff_sign = (coeff >> 31); | |
| 160 | + const int abs_coeff = (coeff ^ coeff_sign) - coeff_sign; | |
| 161 | + int nzflag = 1; | |
| 162 | + | |
| 163 | + // If all of the AC coeffs in a row has magnitude less than the | |
| 164 | + // quantization step_size/2, quantize to zero. | |
| 165 | + // | |
| 166 | + // The first 16 are skipped in the sse2 code. Do the same here to match. | |
| 167 | + if (i >= 16 && (abs_coeff <= thr)) { | |
| 168 | + nzflag = 0; | |
| 169 | + } | |
| 170 | + | |
| 171 | + if (nzflag) { | |
| 172 | + int tmp = clamp(abs_coeff + round_ptr[rc != 0], INT16_MIN, INT16_MAX); | |
| 173 | + tmp = (tmp * quant_ptr[rc != 0]) >> 16; | |
| 174 | + qcoeff_ptr[rc] = (tmp ^ coeff_sign) - coeff_sign; | |
| 175 | + dqcoeff_ptr[rc] = qcoeff_ptr[rc] * dequant_ptr[rc != 0]; | |
| 176 | + } else { | |
| 177 | + qcoeff_ptr[rc] = 0; | |
| 178 | + dqcoeff_ptr[rc] = 0; | |
| 179 | + } | |
| 180 | + } | |
| 181 | + | |
| 182 | + // Scan for eob. | |
| 183 | + for (i = 0; i < n_coeffs; i++) { | |
| 184 | + // Use the scan order to find the correct eob. | |
| 185 | + const int rc = scan[i]; | |
| 186 | + if (qcoeff_ptr[rc]) { | |
| 187 | + eob = i; | |
| 188 | + } | |
| 189 | + } | |
| 190 | + *eob_ptr = eob + 1; | |
| 191 | +} | |
| 192 | + | |
| 124 | 193 | void GenerateHelperArrays(ACMRandom *rnd, int16_t *zbin, int16_t *round, |
| 125 | 194 | int16_t *quant, int16_t *quant_shift, |
| 126 | − int16_t *dequant) { | |
| 195 | + int16_t *dequant, int16_t *round_fp, | |
| 196 | + int16_t *quant_fp) { | |
| 197 | + // Max when q == 0. Otherwise, it is 48 for Y and 42 for U/V. | |
| 198 | + const int max_qrounding_factor_fp = 64; | |
| 199 | + | |
| 127 | 200 | for (int j = 0; j < 2; j++) { |
| 201 | + // The max is 1828 in the VP9 tables. | |
| 202 | + const int qlookup = rnd->RandRange(1829); | |
| 203 | + round_fp[j] = (max_qrounding_factor_fp * qlookup) >> 7; | |
| 204 | + quant_fp[j] = (1 << 16) / qlookup; | |
| 205 | + | |
| 128 | 206 | // Values determined by deconstructing vp9_init_quantizer(). |
| 129 | 207 | // zbin may be up to 1143 for 8 and 10 bit Y values, or 1200 for 12 bit Y |
| 130 | 208 | // values or U/V values of any bit depth. This is because y_delta is not |
| 131 | 209 | // factored into the vp9_ac_quant() call. |
| 132 | 210 | zbin[j] = rnd->RandRange(1200); |
| 211 | + | |
| 133 | 212 | // round may be up to 685 for Y values or 914 for U/V. |
| 134 | 213 | round[j] = rnd->RandRange(914); |
| 135 | 214 | // quant ranges from 1 to -32703 |
| @@ -141,6 +220,8 @@ void GenerateHelperArrays(ACMRandom *rnd, int16_t *zbin, int16_t *round, · 5 unmodified lines | ||
| 141 | 220 | } |
| 142 | 221 | for (int j = 2; j < 8; j++) { |
| 143 | 222 | zbin[j] = zbin[1]; |
| 223 | + round_fp[j] = round_fp[1]; | |
| 224 | + quant_fp[j] = quant_fp[1]; | |
| 144 | 225 | round[j] = round[1]; |
| 145 | 226 | quant[j] = quant[1]; |
| 146 | 227 | quant_shift[j] = quant_shift[1]; |
| @@ -179,19 +260,19 @@ TEST_P(VP9QuantizeTest, OperationCheck) { · 32 unmodified lines | ||
| 179 | 260 | const int count = (4 << sz) * (4 << sz); |
| 180 | 261 | coeff.Set(&rnd, -max_value_, max_value_); |
| 181 | 262 | GenerateHelperArrays(&rnd, zbin_ptr_, round_ptr_, quant_ptr_, |
| 182 | − quant_shift_ptr_, dequant_ptr_); | |
| 183 | − | |
| 184 | − ref_quantize_op_(coeff.TopLeftPixel(), count, skip_block, zbin_ptr_, | |
| 185 | − round_ptr_, quant_ptr_, quant_shift_ptr_, | |
| 186 | − ref_qcoeff.TopLeftPixel(), ref_dqcoeff.TopLeftPixel(), | |
| 187 | − dequant_ptr_, &ref_eob, scan_order->scan, | |
| 188 | − scan_order->iscan); | |
| 189 | − | |
| 190 | − ASM_REGISTER_STATE_CHECK( | |
| 191 | − quantize_op_(coeff.TopLeftPixel(), count, skip_block, zbin_ptr_, | |
| 192 | − round_ptr_, quant_ptr_, quant_shift_ptr_, | |
| 193 | − qcoeff.TopLeftPixel(), dqcoeff.TopLeftPixel(), | |
| 194 | − dequant_ptr_, &eob, scan_order->scan, scan_order->iscan)); | |
| 263 | + quant_shift_ptr_, dequant_ptr_, round_fp_ptr_, | |
| 264 | + quant_fp_ptr_); | |
| 265 | + int16_t *r_ptr = (is_fp_) ? round_fp_ptr_ : round_ptr_; | |
| 266 | + int16_t *q_ptr = (is_fp_) ? quant_fp_ptr_ : quant_ptr_; | |
| 267 | + ref_quantize_op_(coeff.TopLeftPixel(), count, skip_block, zbin_ptr_, r_ptr, | |
| 268 | + q_ptr, quant_shift_ptr_, ref_qcoeff.TopLeftPixel(), | |
| 269 | + ref_dqcoeff.TopLeftPixel(), dequant_ptr_, &ref_eob, | |
| 270 | + scan_order->scan, scan_order->iscan); | |
| 271 | + | |
| 272 | + ASM_REGISTER_STATE_CHECK(quantize_op_( | |
| 273 | + coeff.TopLeftPixel(), count, skip_block, zbin_ptr_, r_ptr, q_ptr, | |
| 274 | + quant_shift_ptr_, qcoeff.TopLeftPixel(), dqcoeff.TopLeftPixel(), | |
| 275 | + dequant_ptr_, &eob, scan_order->scan, scan_order->iscan)); | |
| 195 | 276 | |
| 196 | 277 | EXPECT_TRUE(qcoeff.CheckValues(ref_qcoeff)); |
| 197 | 278 | EXPECT_TRUE(dqcoeff.CheckValues(ref_dqcoeff)); |
| @@ -241,19 +322,19 @@ TEST_P(VP9QuantizeTest, EOBCheck) { · 43 unmodified lines | ||
| 241 | 322 | coeff.TopLeftPixel()[rnd(count)] = |
| 242 | 323 | static_cast<int>(rnd.RandRange(max_value_ * 2)) - max_value_; |
| 243 | 324 | GenerateHelperArrays(&rnd, zbin_ptr_, round_ptr_, quant_ptr_, |
| 244 | − quant_shift_ptr_, dequant_ptr_); | |
| 245 | − | |
| 246 | − ref_quantize_op_(coeff.TopLeftPixel(), count, skip_block, zbin_ptr_, | |
| 247 | − round_ptr_, quant_ptr_, quant_shift_ptr_, | |
| 248 | − ref_qcoeff.TopLeftPixel(), ref_dqcoeff.TopLeftPixel(), | |
| 249 | − dequant_ptr_, &ref_eob, scan_order->scan, | |
| 250 | − scan_order->iscan); | |
| 251 | − | |
| 252 | − ASM_REGISTER_STATE_CHECK( | |
| 253 | − quantize_op_(coeff.TopLeftPixel(), count, skip_block, zbin_ptr_, | |
| 254 | − round_ptr_, quant_ptr_, quant_shift_ptr_, | |
| 255 | − qcoeff.TopLeftPixel(), dqcoeff.TopLeftPixel(), | |
| 256 | − dequant_ptr_, &eob, scan_order->scan, scan_order->iscan)); | |
| 325 | + quant_shift_ptr_, dequant_ptr_, round_fp_ptr_, | |
| 326 | + quant_fp_ptr_); | |
| 327 | + int16_t *r_ptr = (is_fp_) ? round_fp_ptr_ : round_ptr_; | |
| 328 | + int16_t *q_ptr = (is_fp_) ? quant_fp_ptr_ : quant_ptr_; | |
| 329 | + ref_quantize_op_(coeff.TopLeftPixel(), count, skip_block, zbin_ptr_, r_ptr, | |
| 330 | + q_ptr, quant_shift_ptr_, ref_qcoeff.TopLeftPixel(), | |
| 331 | + ref_dqcoeff.TopLeftPixel(), dequant_ptr_, &ref_eob, | |
| 332 | + scan_order->scan, scan_order->iscan); | |
| 333 | + | |
| 334 | + ASM_REGISTER_STATE_CHECK(quantize_op_( | |
| 335 | + coeff.TopLeftPixel(), count, skip_block, zbin_ptr_, r_ptr, q_ptr, | |
| 336 | + quant_shift_ptr_, qcoeff.TopLeftPixel(), dqcoeff.TopLeftPixel(), | |
| 337 | + dequant_ptr_, &eob, scan_order->scan, scan_order->iscan)); | |
| 257 | 338 | |
| 258 | 339 | EXPECT_TRUE(qcoeff.CheckValues(ref_qcoeff)); |
| 259 | 340 | EXPECT_TRUE(dqcoeff.CheckValues(ref_dqcoeff)); |
| @@ -299,7 +380,10 @@ TEST_P(VP9QuantizeTest, DISABLED_Speed) { · 39 unmodified lines | ||
| 299 | 380 | const int count = (4 << sz) * (4 << sz); |
| 300 | 381 | |
| 301 | 382 | GenerateHelperArrays(&rnd, zbin_ptr_, round_ptr_, quant_ptr_, |
| 302 | − quant_shift_ptr_, dequant_ptr_); | |
| 383 | + quant_shift_ptr_, dequant_ptr_, round_fp_ptr_, | |
| 384 | + quant_fp_ptr_); | |
| 385 | + int16_t *r_ptr = (is_fp_) ? round_fp_ptr_ : round_ptr_; | |
| 386 | + int16_t *q_ptr = (is_fp_) ? quant_fp_ptr_ : quant_ptr_; | |
| 303 | 387 | |
| 304 | 388 | if (i == 0) { |
| 305 | 389 | // When |coeff values| are less than zbin the results are 0. |
| @@ -319,10 +403,10 @@ TEST_P(VP9QuantizeTest, DISABLED_Speed) { · 13 unmodified lines | ||
| 319 | 403 | vpx_usec_timer timer; |
| 320 | 404 | vpx_usec_timer_start(&timer); |
| 321 | 405 | for (int j = 0; j < 100000000 / count; ++j) { |
| 322 | − quantize_op_(coeff.TopLeftPixel(), count, skip_block, zbin_ptr_, | |
| 323 | − round_ptr_, quant_ptr_, quant_shift_ptr_, | |
| 324 | − qcoeff.TopLeftPixel(), dqcoeff.TopLeftPixel(), | |
| 325 | − dequant_ptr_, &eob, scan_order->scan, scan_order->iscan); | |
| 406 | + quantize_op_(coeff.TopLeftPixel(), count, skip_block, zbin_ptr_, r_ptr, | |
| 407 | + q_ptr, quant_shift_ptr_, qcoeff.TopLeftPixel(), | |
| 408 | + dqcoeff.TopLeftPixel(), dequant_ptr_, &eob, | |
| 409 | + scan_order->scan, scan_order->iscan); | |
| 326 | 410 | } |
| 327 | 411 | vpx_usec_timer_mark(&timer); |
| 328 | 412 | const int elapsed_time = static_cast<int>(vpx_usec_timer_elapsed(&timer)); |
| @@ -345,50 +429,53 @@ INSTANTIATE_TEST_CASE_P( · 16 unmodified lines | ||
| 345 | 429 | SSE2, VP9QuantizeTest, |
| 346 | 430 | ::testing::Values( |
| 347 | 431 | make_tuple(&vpx_highbd_quantize_b_sse2, &vpx_highbd_quantize_b_c, |
| 348 | − VPX_BITS_8, 16), | |
| 432 | + VPX_BITS_8, 16, false), | |
| 349 | 433 | make_tuple(&vpx_highbd_quantize_b_sse2, &vpx_highbd_quantize_b_c, |
| 350 | − VPX_BITS_10, 16), | |
| 434 | + VPX_BITS_10, 16, false), | |
| 351 | 435 | make_tuple(&vpx_highbd_quantize_b_sse2, &vpx_highbd_quantize_b_c, |
| 352 | − VPX_BITS_12, 16), | |
| 436 | + VPX_BITS_12, 16, false), | |
| 353 | 437 | make_tuple(&vpx_highbd_quantize_b_32x32_sse2, |
| 354 | − &vpx_highbd_quantize_b_32x32_c, VPX_BITS_8, 32), | |
| 438 | + &vpx_highbd_quantize_b_32x32_c, VPX_BITS_8, 32, false), | |
| 355 | 439 | make_tuple(&vpx_highbd_quantize_b_32x32_sse2, |
| 356 | − &vpx_highbd_quantize_b_32x32_c, VPX_BITS_10, 32), | |
| 440 | + &vpx_highbd_quantize_b_32x32_c, VPX_BITS_10, 32, false), | |
| 357 | 441 | make_tuple(&vpx_highbd_quantize_b_32x32_sse2, |
| 358 | − &vpx_highbd_quantize_b_32x32_c, VPX_BITS_12, 32))); | |
| 442 | + &vpx_highbd_quantize_b_32x32_c, VPX_BITS_12, 32, false))); | |
| 359 | 443 | |
| 360 | 444 | #else |
| 361 | −INSTANTIATE_TEST_CASE_P(SSE2, VP9QuantizeTest, | |
| 362 | − ::testing::Values(make_tuple(&vpx_quantize_b_sse2, | |
| 363 | − &vpx_quantize_b_c, | |
| 364 | − VPX_BITS_8, 16))); | |
| 365 | −#endif // CONFIG_VP9_HIGHBITDEPTH | |
| 366 | − | |
| 367 | 445 | INSTANTIATE_TEST_CASE_P( |
| 368 | − DISABLED_SSE2, VP9QuantizeTest, | |
| 369 | − ::testing::Values(make_tuple(&QuantFPWrapper<vp9_quantize_fp_sse2>, | |
| 370 | − &QuantFPWrapper<vp9_quantize_fp_c>, VPX_BITS_8, | |
| 371 | − 16))); | |
| 446 | + SSE2, VP9QuantizeTest, | |
| 447 | + ::testing::Values(make_tuple(&vpx_quantize_b_sse2, &vpx_quantize_b_c, | |
| 448 | + VPX_BITS_8, 16, false), | |
| 449 | + make_tuple(&QuantFPWrapper<vp9_quantize_fp_sse2>, | |
| 450 | + &QuantFPWrapper<quantize_fp_nz_c>, VPX_BITS_8, | |
| 451 | + 16, true))); | |
| 452 | +#endif // CONFIG_VP9_HIGHBITDEPTH | |
| 372 | 453 | #endif // HAVE_SSE2 |
| 373 | 454 | |
| 374 | 455 | #if HAVE_SSSE3 && !CONFIG_VP9_HIGHBITDEPTH |
| 375 | 456 | INSTANTIATE_TEST_CASE_P(SSSE3, VP9QuantizeTest, |
| 376 | − ::testing::Values(make_tuple(&vpx_quantize_b_ssse3, | |
| 377 | − &vpx_quantize_b_c, | |
| 378 | − VPX_BITS_8, 16))); | |
| 457 | + ::testing::Values( | |
| 458 | +#if ARCH_X86_64 | |
| 459 | + make_tuple(&vpx_quantize_b_ssse3, &vpx_quantize_b_c, | |
| 460 | + VPX_BITS_8, 16, false), | |
| 461 | + make_tuple(&QuantFPWrapper<vp9_quantize_fp_ssse3>, | |
| 462 | + &QuantFPWrapper<quantize_fp_nz_c>, | |
| 463 | + VPX_BITS_8, 16, true))); | |
| 464 | +#else | |
| 465 | + make_tuple(&vpx_quantize_b_ssse3, &vpx_quantize_b_c, | |
| 466 | + VPX_BITS_8, 16, false))); | |
| 467 | +#endif | |
| 379 | 468 | |
| 380 | 469 | #if ARCH_X86_64 |
| 381 | 470 | // TODO(johannkoenig): SSSE3 optimizations do not yet pass this test. |
| 382 | 471 | INSTANTIATE_TEST_CASE_P( |
| 383 | 472 | DISABLED_SSSE3, VP9QuantizeTest, |
| 384 | 473 | ::testing::Values(make_tuple(&vpx_quantize_b_32x32_ssse3, |
| 385 | − &vpx_quantize_b_32x32_c, VPX_BITS_8, 32), | |
| 386 | − make_tuple(&QuantFPWrapper<vp9_quantize_fp_ssse3>, | |
| 387 | − &QuantFPWrapper<vp9_quantize_fp_c>, VPX_BITS_8, | |
| 388 | − 16), | |
| 474 | + &vpx_quantize_b_32x32_c, VPX_BITS_8, 32, | |
| 475 | + false), | |
| 389 | 476 | make_tuple(&QuantFPWrapper<vp9_quantize_fp_32x32_ssse3>, |
| 390 | 477 | &QuantFPWrapper<vp9_quantize_fp_32x32_c>, |
| 391 | − VPX_BITS_8, 32))); | |
| 478 | + VPX_BITS_8, 32, true))); | |
| 392 | 479 | #endif // ARCH_X86_64 |
| 393 | 480 | #endif // HAVE_SSSE3 && !CONFIG_VP9_HIGHBITDEPTH |
| 394 | 481 | |
| @@ -398,36 +485,43 @@ INSTANTIATE_TEST_CASE_P( · 3 unmodified lines | ||
| 398 | 485 | INSTANTIATE_TEST_CASE_P( |
| 399 | 486 | AVX, VP9QuantizeTest, |
| 400 | 487 | ::testing::Values(make_tuple(&vpx_quantize_b_avx, &vpx_quantize_b_c, |
| 401 | − VPX_BITS_8, 16), | |
| 488 | + VPX_BITS_8, 16, false), | |
| 402 | 489 | // Even though SSSE3 and AVX do not match the reference |
| 403 | 490 | // code, we can keep them in sync with each other. |
| 404 | 491 | make_tuple(&vpx_quantize_b_32x32_avx, |
| 405 | − &vpx_quantize_b_32x32_ssse3, VPX_BITS_8, 32))); | |
| 492 | + &vpx_quantize_b_32x32_ssse3, VPX_BITS_8, 32, | |
| 493 | + false))); | |
| 406 | 494 | #endif // HAVE_AVX && !CONFIG_VP9_HIGHBITDEPTH |
| 407 | 495 | |
| 408 | 496 | // TODO(webm:1448): dqcoeff is not handled correctly in HBD builds. |
| 409 | 497 | #if HAVE_NEON && !CONFIG_VP9_HIGHBITDEPTH |
| 410 | 498 | INSTANTIATE_TEST_CASE_P( |
| 411 | 499 | NEON, VP9QuantizeTest, |
| 412 | − ::testing::Values( | |
| 413 | − make_tuple(&vpx_quantize_b_neon, &vpx_quantize_b_c, VPX_BITS_8, 16), | |
| 414 | − make_tuple(&vpx_quantize_b_32x32_neon, &vpx_quantize_b_32x32_c, | |
| 415 | − VPX_BITS_8, 32), | |
| 416 | − make_tuple(&QuantFPWrapper<vp9_quantize_fp_neon>, | |
| 417 | − &QuantFPWrapper<vp9_quantize_fp_c>, VPX_BITS_8, 16), | |
| 418 | − make_tuple(&QuantFPWrapper<vp9_quantize_fp_32x32_neon>, | |
| 419 | − &QuantFPWrapper<vp9_quantize_fp_32x32_c>, VPX_BITS_8, 32))); | |
| 500 | + ::testing::Values(make_tuple(&vpx_quantize_b_neon, &vpx_quantize_b_c, | |
| 501 | + VPX_BITS_8, 16, false), | |
| 502 | + make_tuple(&vpx_quantize_b_32x32_neon, | |
| 503 | + &vpx_quantize_b_32x32_c, VPX_BITS_8, 32, | |
| 504 | + false), | |
| 505 | + make_tuple(&QuantFPWrapper<vp9_quantize_fp_neon>, | |
| 506 | + &QuantFPWrapper<vp9_quantize_fp_c>, VPX_BITS_8, | |
| 507 | + 16, true), | |
| 508 | + make_tuple(&QuantFPWrapper<vp9_quantize_fp_32x32_neon>, | |
| 509 | + &QuantFPWrapper<vp9_quantize_fp_32x32_c>, | |
| 510 | + VPX_BITS_8, 32, true))); | |
| 420 | 511 | #endif // HAVE_NEON && !CONFIG_VP9_HIGHBITDEPTH |
| 421 | 512 | |
| 422 | 513 | // Only useful to compare "Speed" test results. |
| 423 | 514 | INSTANTIATE_TEST_CASE_P( |
| 424 | 515 | DISABLED_C, VP9QuantizeTest, |
| 425 | 516 | ::testing::Values( |
| 426 | − make_tuple(&vpx_quantize_b_c, &vpx_quantize_b_c, VPX_BITS_8, 16), | |
| 517 | + make_tuple(&vpx_quantize_b_c, &vpx_quantize_b_c, VPX_BITS_8, 16, false), | |
| 427 | 518 | make_tuple(&vpx_quantize_b_32x32_c, &vpx_quantize_b_32x32_c, VPX_BITS_8, |
| 428 | − 32), | |
| 519 | + 32, false), | |
| 429 | 520 | make_tuple(&QuantFPWrapper<vp9_quantize_fp_c>, |
| 430 | − &QuantFPWrapper<vp9_quantize_fp_c>, VPX_BITS_8, 16), | |
| 521 | + &QuantFPWrapper<vp9_quantize_fp_c>, VPX_BITS_8, 16, true), | |
| 522 | + make_tuple(&QuantFPWrapper<quantize_fp_nz_c>, | |
| 523 | + &QuantFPWrapper<quantize_fp_nz_c>, VPX_BITS_8, 16, true), | |
| 431 | 524 | make_tuple(&QuantFPWrapper<vp9_quantize_fp_32x32_c>, |
| 432 | − &QuantFPWrapper<vp9_quantize_fp_32x32_c>, VPX_BITS_8, 32))); | |
| 525 | + &QuantFPWrapper<vp9_quantize_fp_32x32_c>, VPX_BITS_8, 32, | |
| 526 | + true))); | |
| 433 | 527 | } // namespace |