summaryrefslogtreecommitdiffstats
path: root/third_party/aom/test/subtract_test.cc
diff options
context:
space:
mode:
authortrav90 <travawine@palemoon.org>2018-10-18 21:53:44 -0500
committertrav90 <travawine@palemoon.org>2018-10-18 21:53:44 -0500
commitec910d81405c736a4490383a250299a7837c2e64 (patch)
tree4f27cc226f93a863121aef6c56313e4153a69b3e /third_party/aom/test/subtract_test.cc
parent01eb57073ba97b2d6cbf20f745dfcc508197adc3 (diff)
downloadUXP-ec910d81405c736a4490383a250299a7837c2e64.tar
UXP-ec910d81405c736a4490383a250299a7837c2e64.tar.gz
UXP-ec910d81405c736a4490383a250299a7837c2e64.tar.lz
UXP-ec910d81405c736a4490383a250299a7837c2e64.tar.xz
UXP-ec910d81405c736a4490383a250299a7837c2e64.zip
Update aom to commit id e87fb2378f01103d5d6e477a4ef6892dc714e614
Diffstat (limited to 'third_party/aom/test/subtract_test.cc')
-rw-r--r--third_party/aom/test/subtract_test.cc58
1 files changed, 35 insertions, 23 deletions
diff --git a/third_party/aom/test/subtract_test.cc b/third_party/aom/test/subtract_test.cc
index ad39f56b3..725a6a2c6 100644
--- a/third_party/aom/test/subtract_test.cc
+++ b/third_party/aom/test/subtract_test.cc
@@ -130,7 +130,11 @@ class AV1HBDSubtractBlockTest : public ::testing::TestWithParam<Params> {
rnd_.Reset(ACMRandom::DeterministicSeed());
+#if CONFIG_EXT_PARTITION
const size_t max_width = 128;
+#else
+ const size_t max_width = 64;
+#endif
const size_t max_block_size = max_width * max_width;
src_ = CONVERT_TO_BYTEPTR(reinterpret_cast<uint16_t *>(
aom_memalign(16, max_block_size * sizeof(uint16_t))));
@@ -147,8 +151,8 @@ class AV1HBDSubtractBlockTest : public ::testing::TestWithParam<Params> {
}
protected:
- void RunForSpeed();
void CheckResult();
+ void RunForSpeed();
private:
ACMRandom rnd_;
@@ -161,27 +165,13 @@ class AV1HBDSubtractBlockTest : public ::testing::TestWithParam<Params> {
int16_t *diff_;
};
-void AV1HBDSubtractBlockTest::RunForSpeed() {
- const int test_num = 200000;
- const int max_width = 128;
- const int max_block_size = max_width * max_width;
- const int mask = (1 << bit_depth_) - 1;
- int i, j;
-
- for (j = 0; j < max_block_size; ++j) {
- CONVERT_TO_SHORTPTR(src_)[j] = rnd_.Rand16() & mask;
- CONVERT_TO_SHORTPTR(pred_)[j] = rnd_.Rand16() & mask;
- }
-
- for (i = 0; i < test_num; ++i) {
- func_(block_height_, block_width_, diff_, block_width_, src_, block_width_,
- pred_, block_width_, bit_depth_);
- }
-}
-
void AV1HBDSubtractBlockTest::CheckResult() {
const int test_num = 100;
- const int max_width = 128;
+#if CONFIG_EXT_PARTITION
+ const size_t max_width = 128;
+#else
+ const size_t max_width = 64;
+#endif
const int max_block_size = max_width * max_width;
const int mask = (1 << bit_depth_) - 1;
int i, j;
@@ -208,9 +198,29 @@ void AV1HBDSubtractBlockTest::CheckResult() {
TEST_P(AV1HBDSubtractBlockTest, CheckResult) { CheckResult(); }
-#if USE_SPEED_TEST
-TEST_P(AV1HBDSubtractBlockTest, CheckSpeed) { RunForSpeed(); }
-#endif // USE_SPEED_TEST
+void AV1HBDSubtractBlockTest::RunForSpeed() {
+ const int test_num = 200000;
+#if CONFIG_EXT_PARTITION
+ const size_t max_width = 128;
+#else
+ const size_t max_width = 64;
+#endif
+ const int max_block_size = max_width * max_width;
+ const int mask = (1 << bit_depth_) - 1;
+ int i, j;
+
+ for (j = 0; j < max_block_size; ++j) {
+ CONVERT_TO_SHORTPTR(src_)[j] = rnd_.Rand16() & mask;
+ CONVERT_TO_SHORTPTR(pred_)[j] = rnd_.Rand16() & mask;
+ }
+
+ for (i = 0; i < test_num; ++i) {
+ func_(block_height_, block_width_, diff_, block_width_, src_, block_width_,
+ pred_, block_width_, bit_depth_);
+ }
+}
+
+TEST_P(AV1HBDSubtractBlockTest, DISABLED_Speed) { RunForSpeed(); }
#if HAVE_SSE2
@@ -241,12 +251,14 @@ const Params kAV1HBDSubtractBlock_sse2[] = {
make_tuple(64, 32, 12, &aom_highbd_subtract_block_c),
make_tuple(64, 64, 12, &aom_highbd_subtract_block_sse2),
make_tuple(64, 64, 12, &aom_highbd_subtract_block_c),
+#if CONFIG_EXT_PARTITION
make_tuple(64, 128, 12, &aom_highbd_subtract_block_sse2),
make_tuple(64, 128, 12, &aom_highbd_subtract_block_c),
make_tuple(128, 64, 12, &aom_highbd_subtract_block_sse2),
make_tuple(128, 64, 12, &aom_highbd_subtract_block_c),
make_tuple(128, 128, 12, &aom_highbd_subtract_block_sse2),
make_tuple(128, 128, 12, &aom_highbd_subtract_block_c)
+#endif // CONFIG_EXT_PARTITION
};
INSTANTIATE_TEST_CASE_P(SSE2, AV1HBDSubtractBlockTest,