xref: /aosp_15_r20/external/libgav1/src/dsp/super_res_test.cc (revision 095378508e87ed692bf8dfeb34008b65b3735891)
1*09537850SAkhilesh Sanikop // Copyright 2021 The libgav1 Authors
2*09537850SAkhilesh Sanikop //
3*09537850SAkhilesh Sanikop // Licensed under the Apache License, Version 2.0 (the "License");
4*09537850SAkhilesh Sanikop // you may not use this file except in compliance with the License.
5*09537850SAkhilesh Sanikop // You may obtain a copy of the License at
6*09537850SAkhilesh Sanikop //
7*09537850SAkhilesh Sanikop //      http://www.apache.org/licenses/LICENSE-2.0
8*09537850SAkhilesh Sanikop //
9*09537850SAkhilesh Sanikop // Unless required by applicable law or agreed to in writing, software
10*09537850SAkhilesh Sanikop // distributed under the License is distributed on an "AS IS" BASIS,
11*09537850SAkhilesh Sanikop // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12*09537850SAkhilesh Sanikop // See the License for the specific language governing permissions and
13*09537850SAkhilesh Sanikop // limitations under the License.
14*09537850SAkhilesh Sanikop 
15*09537850SAkhilesh Sanikop #include "src/dsp/super_res.h"
16*09537850SAkhilesh Sanikop 
17*09537850SAkhilesh Sanikop #include <cstdint>
18*09537850SAkhilesh Sanikop #include <cstdio>
19*09537850SAkhilesh Sanikop #include <cstring>
20*09537850SAkhilesh Sanikop #include <string>
21*09537850SAkhilesh Sanikop #include <vector>
22*09537850SAkhilesh Sanikop 
23*09537850SAkhilesh Sanikop #include "absl/strings/match.h"
24*09537850SAkhilesh Sanikop #include "absl/strings/numbers.h"
25*09537850SAkhilesh Sanikop #include "absl/strings/str_format.h"
26*09537850SAkhilesh Sanikop #include "absl/strings/str_split.h"
27*09537850SAkhilesh Sanikop #include "absl/strings/string_view.h"
28*09537850SAkhilesh Sanikop #include "absl/time/clock.h"
29*09537850SAkhilesh Sanikop #include "absl/time/time.h"
30*09537850SAkhilesh Sanikop #include "gtest/gtest.h"
31*09537850SAkhilesh Sanikop #include "src/dsp/dsp.h"
32*09537850SAkhilesh Sanikop #include "src/utils/common.h"
33*09537850SAkhilesh Sanikop #include "src/utils/constants.h"
34*09537850SAkhilesh Sanikop #include "src/utils/cpu.h"
35*09537850SAkhilesh Sanikop #include "src/utils/memory.h"
36*09537850SAkhilesh Sanikop #include "tests/third_party/libvpx/acm_random.h"
37*09537850SAkhilesh Sanikop #include "tests/utils.h"
38*09537850SAkhilesh Sanikop 
39*09537850SAkhilesh Sanikop namespace libgav1 {
40*09537850SAkhilesh Sanikop namespace dsp {
41*09537850SAkhilesh Sanikop namespace {
42*09537850SAkhilesh Sanikop 
43*09537850SAkhilesh Sanikop constexpr int kNumSpeedTests = 5e5;
44*09537850SAkhilesh Sanikop 
GetDigest8bpp(int id)45*09537850SAkhilesh Sanikop const char* GetDigest8bpp(int id) {
46*09537850SAkhilesh Sanikop   static const char* const kDigestSuperRes[] = {
47*09537850SAkhilesh Sanikop       "52eb4eac1df0c51599d57696405b69d0", "ccb07cc8295fd1440ff2e3b9199ec4f9",
48*09537850SAkhilesh Sanikop       "baef34cca795b95f3d1fd81d609da679", "03f1579c2773c8ba9c867316a22b94a3"};
49*09537850SAkhilesh Sanikop   return kDigestSuperRes[id];
50*09537850SAkhilesh Sanikop }
51*09537850SAkhilesh Sanikop 
52*09537850SAkhilesh Sanikop #if LIBGAV1_MAX_BITDEPTH >= 10
GetDigest10bpp(int id)53*09537850SAkhilesh Sanikop const char* GetDigest10bpp(int id) {
54*09537850SAkhilesh Sanikop   static const char* const kDigestSuperRes[] = {
55*09537850SAkhilesh Sanikop       "8fd78e05d944aeb11fac278b47ee60ba", "948eaecb70fa5614ce1c1c95e9942dc3",
56*09537850SAkhilesh Sanikop       "126cd7727e787e0625ec3f5ce97f8fa0", "85c806c41d40b841764bcb54f6d3a712"};
57*09537850SAkhilesh Sanikop   return kDigestSuperRes[id];
58*09537850SAkhilesh Sanikop }
59*09537850SAkhilesh Sanikop #endif  // LIBGAV1_MAX_BITDEPTH >= 10
60*09537850SAkhilesh Sanikop 
61*09537850SAkhilesh Sanikop #if LIBGAV1_MAX_BITDEPTH == 12
GetDigest12bpp(int id)62*09537850SAkhilesh Sanikop const char* GetDigest12bpp(int id) {
63*09537850SAkhilesh Sanikop   static const char* const kDigestSuperRes[] = {
64*09537850SAkhilesh Sanikop       "9a08983d82df4983700976f18919201b", "6e5edbafcb6c38db37258bf79c00ea32",
65*09537850SAkhilesh Sanikop       "f5c57e6d3b518f9585f768ed19b91568", "b5de9b93c8a1a50580e7c7c9456fb615"};
66*09537850SAkhilesh Sanikop   return kDigestSuperRes[id];
67*09537850SAkhilesh Sanikop }
68*09537850SAkhilesh Sanikop #endif  // LIBGAV1_MAX_BITDEPTH == 12
69*09537850SAkhilesh Sanikop 
70*09537850SAkhilesh Sanikop struct SuperResTestParam {
SuperResTestParamlibgav1::dsp::__anonf7ce25b40111::SuperResTestParam71*09537850SAkhilesh Sanikop   SuperResTestParam(int downscaled_width, int upscaled_width)
72*09537850SAkhilesh Sanikop       : downscaled_width(downscaled_width), upscaled_width(upscaled_width) {}
73*09537850SAkhilesh Sanikop   int downscaled_width;
74*09537850SAkhilesh Sanikop   int upscaled_width;
75*09537850SAkhilesh Sanikop };
76*09537850SAkhilesh Sanikop 
77*09537850SAkhilesh Sanikop template <int bitdepth, typename Pixel, typename Coefficient>
78*09537850SAkhilesh Sanikop class SuperResTest : public testing::TestWithParam<SuperResTestParam>,
79*09537850SAkhilesh Sanikop                      public test_utils::MaxAlignedAllocable {
80*09537850SAkhilesh Sanikop  public:
81*09537850SAkhilesh Sanikop   static_assert(bitdepth >= kBitdepth8 && bitdepth <= LIBGAV1_MAX_BITDEPTH, "");
82*09537850SAkhilesh Sanikop   SuperResTest() = default;
SetUp()83*09537850SAkhilesh Sanikop   void SetUp() override {
84*09537850SAkhilesh Sanikop     test_utils::ResetDspTable(bitdepth);
85*09537850SAkhilesh Sanikop     SuperResInit_C();
86*09537850SAkhilesh Sanikop     const dsp::Dsp* const dsp = dsp::GetDspTable(bitdepth);
87*09537850SAkhilesh Sanikop     ASSERT_NE(dsp, nullptr);
88*09537850SAkhilesh Sanikop 
89*09537850SAkhilesh Sanikop     const testing::TestInfo* const test_info =
90*09537850SAkhilesh Sanikop         testing::UnitTest::GetInstance()->current_test_info();
91*09537850SAkhilesh Sanikop     const std::vector<std::string> split_test_name =
92*09537850SAkhilesh Sanikop         absl::StrSplit(test_info->name(), '/');
93*09537850SAkhilesh Sanikop     ASSERT_TRUE(absl::SimpleAtoi(split_test_name[1], &test_id_));
94*09537850SAkhilesh Sanikop     const absl::string_view test_case = test_info->test_suite_name();
95*09537850SAkhilesh Sanikop     if (absl::StartsWith(test_case, "C/")) {
96*09537850SAkhilesh Sanikop     } else if (absl::StartsWith(test_case, "NEON/")) {
97*09537850SAkhilesh Sanikop       SuperResInit_NEON();
98*09537850SAkhilesh Sanikop     } else if (absl::StartsWith(test_case, "SSE41/")) {
99*09537850SAkhilesh Sanikop       if ((GetCpuInfo() & kSSE4_1) == 0) GTEST_SKIP() << "No SSE4.1 support!";
100*09537850SAkhilesh Sanikop       SuperResInit_SSE4_1();
101*09537850SAkhilesh Sanikop     } else {
102*09537850SAkhilesh Sanikop       FAIL() << "Unrecognized architecture prefix in test case name: "
103*09537850SAkhilesh Sanikop              << test_case;
104*09537850SAkhilesh Sanikop     }
105*09537850SAkhilesh Sanikop     super_res_coefficients_ = dsp->super_res_coefficients;
106*09537850SAkhilesh Sanikop     func_ = dsp->super_res;
107*09537850SAkhilesh Sanikop   }
108*09537850SAkhilesh Sanikop 
109*09537850SAkhilesh Sanikop   void TestComputeSuperRes(int fixed_value, int num_runs);
110*09537850SAkhilesh Sanikop 
111*09537850SAkhilesh Sanikop  private:
112*09537850SAkhilesh Sanikop   static constexpr int kHeight = 127;
113*09537850SAkhilesh Sanikop   // The maximum width that must be allocated.
114*09537850SAkhilesh Sanikop   static constexpr int kUpscaledBufferWidth = 192;
115*09537850SAkhilesh Sanikop   // Allow room for the filter taps.
116*09537850SAkhilesh Sanikop   static constexpr int kStride =
117*09537850SAkhilesh Sanikop       ((kUpscaledBufferWidth + 2 * kSuperResHorizontalBorder + 15) & ~15);
118*09537850SAkhilesh Sanikop   const int kDownscaledWidth = GetParam().downscaled_width;
119*09537850SAkhilesh Sanikop   const int kUpscaledWidth = GetParam().upscaled_width;
120*09537850SAkhilesh Sanikop   int test_id_;
121*09537850SAkhilesh Sanikop   SuperResCoefficientsFunc super_res_coefficients_;
122*09537850SAkhilesh Sanikop   SuperResFunc func_;
123*09537850SAkhilesh Sanikop   Pixel source_buffer_[kHeight][kStride];
124*09537850SAkhilesh Sanikop   alignas(kMaxAlignment) Pixel dest_buffer_[kHeight][kStride];
125*09537850SAkhilesh Sanikop   alignas(kMaxAlignment) Coefficient
126*09537850SAkhilesh Sanikop       superres_coefficients_[kSuperResFilterTaps * kUpscaledBufferWidth];
127*09537850SAkhilesh Sanikop };
128*09537850SAkhilesh Sanikop 
129*09537850SAkhilesh Sanikop template <int bitdepth, typename Pixel, typename Coefficient>
TestComputeSuperRes(int fixed_value,int num_runs)130*09537850SAkhilesh Sanikop void SuperResTest<bitdepth, Pixel, Coefficient>::TestComputeSuperRes(
131*09537850SAkhilesh Sanikop     int fixed_value, int num_runs) {
132*09537850SAkhilesh Sanikop   if (func_ == nullptr) return;
133*09537850SAkhilesh Sanikop   const int superres_width = kDownscaledWidth << kSuperResScaleBits;
134*09537850SAkhilesh Sanikop   const int step = (superres_width + kUpscaledWidth / 2) / kUpscaledWidth;
135*09537850SAkhilesh Sanikop   const int error = step * kUpscaledWidth - superres_width;
136*09537850SAkhilesh Sanikop   const int initial_subpixel_x =
137*09537850SAkhilesh Sanikop       ((-((kUpscaledWidth - kDownscaledWidth) << (kSuperResScaleBits - 1)) +
138*09537850SAkhilesh Sanikop         DivideBy2(kUpscaledWidth)) /
139*09537850SAkhilesh Sanikop            kUpscaledWidth +
140*09537850SAkhilesh Sanikop        (1 << (kSuperResExtraBits - 1)) - error / 2) &
141*09537850SAkhilesh Sanikop       kSuperResScaleMask;
142*09537850SAkhilesh Sanikop   if (super_res_coefficients_ != nullptr) {
143*09537850SAkhilesh Sanikop     super_res_coefficients_(kUpscaledWidth, initial_subpixel_x, step,
144*09537850SAkhilesh Sanikop                             superres_coefficients_);
145*09537850SAkhilesh Sanikop   }
146*09537850SAkhilesh Sanikop   memset(dest_buffer_, 0, sizeof(dest_buffer_));
147*09537850SAkhilesh Sanikop   if (fixed_value != 0) {
148*09537850SAkhilesh Sanikop     SetBlock<Pixel>(kHeight, kStride, fixed_value, source_buffer_[0], kStride);
149*09537850SAkhilesh Sanikop   } else {
150*09537850SAkhilesh Sanikop     // Random values.
151*09537850SAkhilesh Sanikop     libvpx_test::ACMRandom rnd(libvpx_test::ACMRandom::DeterministicSeed());
152*09537850SAkhilesh Sanikop     const int bitdepth_mask = (1 << bitdepth) - 1;
153*09537850SAkhilesh Sanikop     for (int y = 0; y < kHeight; ++y) {
154*09537850SAkhilesh Sanikop       for (int x = 0; x < kStride; ++x) {
155*09537850SAkhilesh Sanikop         source_buffer_[y][x] = rnd.Rand16() & bitdepth_mask;
156*09537850SAkhilesh Sanikop       }
157*09537850SAkhilesh Sanikop     }
158*09537850SAkhilesh Sanikop   }
159*09537850SAkhilesh Sanikop   // Offset starting point in the buffer to accommodate line extension.
160*09537850SAkhilesh Sanikop   Pixel* src_ptr = source_buffer_[0] + kSuperResHorizontalBorder;
161*09537850SAkhilesh Sanikop 
162*09537850SAkhilesh Sanikop   const absl::Time start = absl::Now();
163*09537850SAkhilesh Sanikop   for (int i = 0; i < num_runs; ++i) {
164*09537850SAkhilesh Sanikop     func_(superres_coefficients_, src_ptr, kStride, kHeight, kDownscaledWidth,
165*09537850SAkhilesh Sanikop           kUpscaledWidth, initial_subpixel_x, step, dest_buffer_, kStride);
166*09537850SAkhilesh Sanikop   }
167*09537850SAkhilesh Sanikop   const absl::Duration elapsed_time = absl::Now() - start;
168*09537850SAkhilesh Sanikop 
169*09537850SAkhilesh Sanikop   if (fixed_value != 0) {
170*09537850SAkhilesh Sanikop     for (int y = 0; y < kHeight; ++y) {
171*09537850SAkhilesh Sanikop       for (int x = 0; x < kUpscaledWidth; ++x) {
172*09537850SAkhilesh Sanikop         EXPECT_TRUE(dest_buffer_[y][x] == fixed_value)
173*09537850SAkhilesh Sanikop             << "At location [" << y << ", " << x
174*09537850SAkhilesh Sanikop             << "]\nexpected: " << fixed_value
175*09537850SAkhilesh Sanikop             << "\nactual: " << dest_buffer_[y][x];
176*09537850SAkhilesh Sanikop       }
177*09537850SAkhilesh Sanikop     }
178*09537850SAkhilesh Sanikop   } else if (num_runs == 1) {
179*09537850SAkhilesh Sanikop     // Random values.
180*09537850SAkhilesh Sanikop     if ((kUpscaledWidth & 15) != 0) {
181*09537850SAkhilesh Sanikop       // The SIMD functions overwrite up to 15 pixels in each row. Reset them.
182*09537850SAkhilesh Sanikop       for (int y = 0; y < kHeight; ++y) {
183*09537850SAkhilesh Sanikop         for (int x = kUpscaledWidth; x < Align(kUpscaledWidth, 16); ++x) {
184*09537850SAkhilesh Sanikop           dest_buffer_[y][x] = 0;
185*09537850SAkhilesh Sanikop         }
186*09537850SAkhilesh Sanikop       }
187*09537850SAkhilesh Sanikop     }
188*09537850SAkhilesh Sanikop     const char* expected_digest = nullptr;
189*09537850SAkhilesh Sanikop     switch (bitdepth) {
190*09537850SAkhilesh Sanikop       case 8:
191*09537850SAkhilesh Sanikop         expected_digest = GetDigest8bpp(test_id_);
192*09537850SAkhilesh Sanikop         break;
193*09537850SAkhilesh Sanikop #if LIBGAV1_MAX_BITDEPTH >= 10
194*09537850SAkhilesh Sanikop       case 10:
195*09537850SAkhilesh Sanikop         expected_digest = GetDigest10bpp(test_id_);
196*09537850SAkhilesh Sanikop         break;
197*09537850SAkhilesh Sanikop #endif
198*09537850SAkhilesh Sanikop #if LIBGAV1_MAX_BITDEPTH == 12
199*09537850SAkhilesh Sanikop       case 12:
200*09537850SAkhilesh Sanikop         expected_digest = GetDigest12bpp(test_id_);
201*09537850SAkhilesh Sanikop         break;
202*09537850SAkhilesh Sanikop #endif
203*09537850SAkhilesh Sanikop     }
204*09537850SAkhilesh Sanikop     ASSERT_NE(expected_digest, nullptr);
205*09537850SAkhilesh Sanikop     test_utils::CheckMd5Digest(
206*09537850SAkhilesh Sanikop         "SuperRes",
207*09537850SAkhilesh Sanikop         absl::StrFormat("width %d, step %d, start %d", kUpscaledWidth, step,
208*09537850SAkhilesh Sanikop                         initial_subpixel_x)
209*09537850SAkhilesh Sanikop             .c_str(),
210*09537850SAkhilesh Sanikop         expected_digest, dest_buffer_, sizeof(dest_buffer_), elapsed_time);
211*09537850SAkhilesh Sanikop   } else {
212*09537850SAkhilesh Sanikop     // Speed test.
213*09537850SAkhilesh Sanikop     printf("Mode SuperRes [width %d, step %d, start %d]: %d us\n",
214*09537850SAkhilesh Sanikop            kUpscaledWidth, step, initial_subpixel_x,
215*09537850SAkhilesh Sanikop            static_cast<int>(absl::ToInt64Microseconds(elapsed_time)));
216*09537850SAkhilesh Sanikop   }
217*09537850SAkhilesh Sanikop }
218*09537850SAkhilesh Sanikop 
219*09537850SAkhilesh Sanikop using SuperResTest8bpp = SuperResTest<8, uint8_t, int8_t>;
220*09537850SAkhilesh Sanikop 
TEST_P(SuperResTest8bpp,FixedValues)221*09537850SAkhilesh Sanikop TEST_P(SuperResTest8bpp, FixedValues) {
222*09537850SAkhilesh Sanikop   TestComputeSuperRes(100, 1);
223*09537850SAkhilesh Sanikop   TestComputeSuperRes(255, 1);
224*09537850SAkhilesh Sanikop   TestComputeSuperRes(1, 1);
225*09537850SAkhilesh Sanikop }
226*09537850SAkhilesh Sanikop 
TEST_P(SuperResTest8bpp,RandomValues)227*09537850SAkhilesh Sanikop TEST_P(SuperResTest8bpp, RandomValues) { TestComputeSuperRes(0, 1); }
228*09537850SAkhilesh Sanikop 
TEST_P(SuperResTest8bpp,DISABLED_Speed)229*09537850SAkhilesh Sanikop TEST_P(SuperResTest8bpp, DISABLED_Speed) {
230*09537850SAkhilesh Sanikop   TestComputeSuperRes(0, kNumSpeedTests);
231*09537850SAkhilesh Sanikop }
232*09537850SAkhilesh Sanikop 
233*09537850SAkhilesh Sanikop const SuperResTestParam kSuperResTestParams[] = {
234*09537850SAkhilesh Sanikop     SuperResTestParam(96, 192),
235*09537850SAkhilesh Sanikop     SuperResTestParam(171, 192),
236*09537850SAkhilesh Sanikop     SuperResTestParam(102, 128),
237*09537850SAkhilesh Sanikop     SuperResTestParam(61, 121),
238*09537850SAkhilesh Sanikop };
239*09537850SAkhilesh Sanikop 
240*09537850SAkhilesh Sanikop INSTANTIATE_TEST_SUITE_P(C, SuperResTest8bpp,
241*09537850SAkhilesh Sanikop                          testing::ValuesIn(kSuperResTestParams));
242*09537850SAkhilesh Sanikop 
243*09537850SAkhilesh Sanikop #if LIBGAV1_ENABLE_NEON
244*09537850SAkhilesh Sanikop INSTANTIATE_TEST_SUITE_P(NEON, SuperResTest8bpp,
245*09537850SAkhilesh Sanikop                          testing::ValuesIn(kSuperResTestParams));
246*09537850SAkhilesh Sanikop #endif
247*09537850SAkhilesh Sanikop 
248*09537850SAkhilesh Sanikop #if LIBGAV1_ENABLE_SSE4_1
249*09537850SAkhilesh Sanikop INSTANTIATE_TEST_SUITE_P(SSE41, SuperResTest8bpp,
250*09537850SAkhilesh Sanikop                          testing::ValuesIn(kSuperResTestParams));
251*09537850SAkhilesh Sanikop #endif
252*09537850SAkhilesh Sanikop 
253*09537850SAkhilesh Sanikop #if LIBGAV1_MAX_BITDEPTH >= 10
254*09537850SAkhilesh Sanikop using SuperResTest10bpp = SuperResTest<10, uint16_t, int16_t>;
255*09537850SAkhilesh Sanikop 
TEST_P(SuperResTest10bpp,FixedValues)256*09537850SAkhilesh Sanikop TEST_P(SuperResTest10bpp, FixedValues) {
257*09537850SAkhilesh Sanikop   TestComputeSuperRes(100, 1);
258*09537850SAkhilesh Sanikop   TestComputeSuperRes(511, 1);
259*09537850SAkhilesh Sanikop   TestComputeSuperRes(1, 1);
260*09537850SAkhilesh Sanikop }
261*09537850SAkhilesh Sanikop 
TEST_P(SuperResTest10bpp,RandomValues)262*09537850SAkhilesh Sanikop TEST_P(SuperResTest10bpp, RandomValues) { TestComputeSuperRes(0, 1); }
263*09537850SAkhilesh Sanikop 
TEST_P(SuperResTest10bpp,DISABLED_Speed)264*09537850SAkhilesh Sanikop TEST_P(SuperResTest10bpp, DISABLED_Speed) {
265*09537850SAkhilesh Sanikop   TestComputeSuperRes(0, kNumSpeedTests);
266*09537850SAkhilesh Sanikop }
267*09537850SAkhilesh Sanikop 
268*09537850SAkhilesh Sanikop INSTANTIATE_TEST_SUITE_P(C, SuperResTest10bpp,
269*09537850SAkhilesh Sanikop                          testing::ValuesIn(kSuperResTestParams));
270*09537850SAkhilesh Sanikop 
271*09537850SAkhilesh Sanikop #if LIBGAV1_ENABLE_SSE4_1
272*09537850SAkhilesh Sanikop INSTANTIATE_TEST_SUITE_P(SSE41, SuperResTest10bpp,
273*09537850SAkhilesh Sanikop                          testing::ValuesIn(kSuperResTestParams));
274*09537850SAkhilesh Sanikop #endif
275*09537850SAkhilesh Sanikop 
276*09537850SAkhilesh Sanikop #if LIBGAV1_ENABLE_NEON
277*09537850SAkhilesh Sanikop INSTANTIATE_TEST_SUITE_P(NEON, SuperResTest10bpp,
278*09537850SAkhilesh Sanikop                          testing::ValuesIn(kSuperResTestParams));
279*09537850SAkhilesh Sanikop #endif
280*09537850SAkhilesh Sanikop #endif  // LIBGAV1_MAX_BITDEPTH >= 10
281*09537850SAkhilesh Sanikop 
282*09537850SAkhilesh Sanikop #if LIBGAV1_MAX_BITDEPTH == 12
283*09537850SAkhilesh Sanikop using SuperResTest12bpp = SuperResTest<12, uint16_t, int16_t>;
284*09537850SAkhilesh Sanikop 
TEST_P(SuperResTest12bpp,FixedValues)285*09537850SAkhilesh Sanikop TEST_P(SuperResTest12bpp, FixedValues) {
286*09537850SAkhilesh Sanikop   TestComputeSuperRes(100, 1);
287*09537850SAkhilesh Sanikop   TestComputeSuperRes(2047, 1);
288*09537850SAkhilesh Sanikop   TestComputeSuperRes(1, 1);
289*09537850SAkhilesh Sanikop }
290*09537850SAkhilesh Sanikop 
TEST_P(SuperResTest12bpp,RandomValues)291*09537850SAkhilesh Sanikop TEST_P(SuperResTest12bpp, RandomValues) { TestComputeSuperRes(0, 1); }
292*09537850SAkhilesh Sanikop 
TEST_P(SuperResTest12bpp,DISABLED_Speed)293*09537850SAkhilesh Sanikop TEST_P(SuperResTest12bpp, DISABLED_Speed) {
294*09537850SAkhilesh Sanikop   TestComputeSuperRes(0, kNumSpeedTests);
295*09537850SAkhilesh Sanikop }
296*09537850SAkhilesh Sanikop 
297*09537850SAkhilesh Sanikop INSTANTIATE_TEST_SUITE_P(C, SuperResTest12bpp,
298*09537850SAkhilesh Sanikop                          testing::ValuesIn(kSuperResTestParams));
299*09537850SAkhilesh Sanikop #endif  // LIBGAV1_MAX_BITDEPTH == 12
300*09537850SAkhilesh Sanikop 
301*09537850SAkhilesh Sanikop }  // namespace
302*09537850SAkhilesh Sanikop }  // namespace dsp
303*09537850SAkhilesh Sanikop }  // namespace libgav1
304