mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-23 08:57:34 +09:00
Update aom to commit id e87fb2378f01103d5d6e477a4ef6892dc714e614
This commit is contained in:
parent
debbee1e2a
commit
992c6637e3
429 changed files with 76047 additions and 40937 deletions
58
third_party/aom/test/subtract_test.cc
vendored
58
third_party/aom/test/subtract_test.cc
vendored
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue