summaryrefslogtreecommitdiff
path: root/test/vp9_quantize_test.cc
diff options
context:
space:
mode:
authorJohann <johannkoenig@google.com>2017-09-12 14:09:42 -0700
committerJohann <johannkoenig@google.com>2017-09-12 14:25:38 -0700
commiteb4238ac7072e188752b050054e37ea3b602e45e (patch)
treea36cc7011df900a877b486c843fd615748c85f47 /test/vp9_quantize_test.cc
parentc39cd9235ece2e55f0cc84fb0f9f5e698146ee9c (diff)
downloadlibvpx-eb4238ac7072e188752b050054e37ea3b602e45e.tar
libvpx-eb4238ac7072e188752b050054e37ea3b602e45e.tar.gz
libvpx-eb4238ac7072e188752b050054e37ea3b602e45e.tar.bz2
libvpx-eb4238ac7072e188752b050054e37ea3b602e45e.zip
Revert "Revert "quantize avx: copy 32x32 implementation""
This reverts commit 8c42237bb200253931c49e2c530838f3a877dd65. Because ssse3 code is used for the reference, the qcoeff and dqcoeff reference buffers must be aligned. Original change's description: > quantize avx: copy 32x32 implementation > > Ensure avx and ssse3 stay in sync by testing them against each other. > > Change-Id: I699f3b48785c83260825402d7826231f475f697c Change-Id: Ieeef11b9406964194028b0d81d84bcb63296ae06
Diffstat (limited to 'test/vp9_quantize_test.cc')
-rw-r--r--test/vp9_quantize_test.cc30
1 files changed, 16 insertions, 14 deletions
diff --git a/test/vp9_quantize_test.cc b/test/vp9_quantize_test.cc
index 7745cba3b..87de0bceb 100644
--- a/test/vp9_quantize_test.cc
+++ b/test/vp9_quantize_test.cc
@@ -156,9 +156,11 @@ TEST_P(VP9QuantizeTest, OperationCheck) {
ASSERT_TRUE(qcoeff.Init());
Buffer<tran_low_t> dqcoeff = Buffer<tran_low_t>(max_size_, max_size_, 0, 32);
ASSERT_TRUE(dqcoeff.Init());
- Buffer<tran_low_t> ref_qcoeff = Buffer<tran_low_t>(max_size_, max_size_, 0);
+ Buffer<tran_low_t> ref_qcoeff =
+ Buffer<tran_low_t>(max_size_, max_size_, 0, 32);
ASSERT_TRUE(ref_qcoeff.Init());
- Buffer<tran_low_t> ref_dqcoeff = Buffer<tran_low_t>(max_size_, max_size_, 0);
+ Buffer<tran_low_t> ref_dqcoeff =
+ Buffer<tran_low_t>(max_size_, max_size_, 0, 32);
ASSERT_TRUE(ref_dqcoeff.Init());
uint16_t eob, ref_eob;
@@ -213,9 +215,11 @@ TEST_P(VP9QuantizeTest, EOBCheck) {
ASSERT_TRUE(qcoeff.Init());
Buffer<tran_low_t> dqcoeff = Buffer<tran_low_t>(max_size_, max_size_, 0, 32);
ASSERT_TRUE(dqcoeff.Init());
- Buffer<tran_low_t> ref_qcoeff = Buffer<tran_low_t>(max_size_, max_size_, 0);
+ Buffer<tran_low_t> ref_qcoeff =
+ Buffer<tran_low_t>(max_size_, max_size_, 0, 32);
ASSERT_TRUE(ref_qcoeff.Init());
- Buffer<tran_low_t> ref_dqcoeff = Buffer<tran_low_t>(max_size_, max_size_, 0);
+ Buffer<tran_low_t> ref_dqcoeff =
+ Buffer<tran_low_t>(max_size_, max_size_, 0, 32);
ASSERT_TRUE(ref_dqcoeff.Init());
uint16_t eob, ref_eob;
@@ -391,16 +395,14 @@ INSTANTIATE_TEST_CASE_P(
// TODO(johannkoenig): AVX optimizations do not yet pass the 32x32 test or
// highbitdepth configurations.
#if HAVE_AVX && !CONFIG_VP9_HIGHBITDEPTH
-INSTANTIATE_TEST_CASE_P(AVX, VP9QuantizeTest,
- ::testing::Values(make_tuple(&vpx_quantize_b_avx,
- &vpx_quantize_b_c,
- VPX_BITS_8, 16)));
-#if ARCH_X86_64
-INSTANTIATE_TEST_CASE_P(DISABLED_AVX, VP9QuantizeTest,
- ::testing::Values(make_tuple(&vpx_quantize_b_32x32_avx,
- &vpx_quantize_b_32x32_c,
- VPX_BITS_8, 32)));
-#endif // ARCH_X86_64
+INSTANTIATE_TEST_CASE_P(
+ AVX, VP9QuantizeTest,
+ ::testing::Values(make_tuple(&vpx_quantize_b_avx, &vpx_quantize_b_c,
+ VPX_BITS_8, 16),
+ // Even though SSSE3 and AVX do not match the reference
+ // code, we can keep them in sync with each other.
+ make_tuple(&vpx_quantize_b_32x32_avx,
+ &vpx_quantize_b_32x32_ssse3, VPX_BITS_8, 32)));
#endif // HAVE_AVX && !CONFIG_VP9_HIGHBITDEPTH
// TODO(webm:1448): dqcoeff is not handled correctly in HBD builds.