Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(431)

Side by Side Diff: source/libvpx/test/dct32x32_test.cc

Issue 592203002: libvpx: Pull from upstream (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/libvpx/
Patch Set: Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « source/libvpx/test/dct16x16_test.cc ('k') | source/libvpx/test/external_frame_buffer_test.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2012 The WebM project authors. All Rights Reserved. 2 * Copyright (c) 2012 The WebM project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
11 #include <math.h> 11 #include <math.h>
12 #include <stdlib.h> 12 #include <stdlib.h>
13 #include <string.h> 13 #include <string.h>
14 14
15 #include "third_party/googletest/src/include/gtest/gtest.h" 15 #include "third_party/googletest/src/include/gtest/gtest.h"
16 #include "test/acm_random.h" 16 #include "test/acm_random.h"
17 #include "test/clear_system_state.h" 17 #include "test/clear_system_state.h"
18 #include "test/register_state_check.h" 18 #include "test/register_state_check.h"
19 #include "test/util.h" 19 #include "test/util.h"
20 20
21 #include "./vpx_config.h" 21 #include "./vpx_config.h"
22 #include "./vp9_rtcd.h" 22 #include "./vp9_rtcd.h"
23 #include "vp9/common/vp9_entropy.h" 23 #include "vp9/common/vp9_entropy.h"
24 #include "vpx/vpx_codec.h"
24 #include "vpx/vpx_integer.h" 25 #include "vpx/vpx_integer.h"
25 26
26 using libvpx_test::ACMRandom; 27 using libvpx_test::ACMRandom;
27 28
28 namespace { 29 namespace {
29 #ifdef _MSC_VER 30 #ifdef _MSC_VER
30 static int round(double x) { 31 static int round(double x) {
31 if (x < 0) 32 if (x < 0)
32 return static_cast<int>(ceil(x - 0.5)); 33 return static_cast<int>(ceil(x - 0.5));
33 else 34 else
(...skipping 30 matching lines...) Expand all
64 double temp_in[32], temp_out[32]; 65 double temp_in[32], temp_out[32];
65 for (int j = 0; j < 32; ++j) 66 for (int j = 0; j < 32; ++j)
66 temp_in[j] = output[j + i*32]; 67 temp_in[j] = output[j + i*32];
67 reference_32x32_dct_1d(temp_in, temp_out); 68 reference_32x32_dct_1d(temp_in, temp_out);
68 // Scale by some magic number 69 // Scale by some magic number
69 for (int j = 0; j < 32; ++j) 70 for (int j = 0; j < 32; ++j)
70 output[j + i * 32] = temp_out[j] / 4; 71 output[j + i * 32] = temp_out[j] / 4;
71 } 72 }
72 } 73 }
73 74
74 typedef void (*FwdTxfmFunc)(const int16_t *in, int16_t *out, int stride); 75 typedef void (*FwdTxfmFunc)(const int16_t *in, tran_low_t *out, int stride);
75 typedef void (*InvTxfmFunc)(const int16_t *in, uint8_t *out, int stride); 76 typedef void (*InvTxfmFunc)(const tran_low_t *in, uint8_t *out, int stride);
76 77
77 typedef std::tr1::tuple<FwdTxfmFunc, InvTxfmFunc, int> Trans32x32Param; 78 typedef std::tr1::tuple<FwdTxfmFunc, InvTxfmFunc, int, vpx_bit_depth_t>
79 Trans32x32Param;
80
81 #if CONFIG_VP9_HIGHBITDEPTH
82 void idct32x32_10(const tran_low_t *in, uint8_t *out, int stride) {
83 vp9_high_idct32x32_1024_add_c(in, out, stride, 10);
84 }
85
86 void idct32x32_12(const tran_low_t *in, uint8_t *out, int stride) {
87 vp9_high_idct32x32_1024_add_c(in, out, stride, 12);
88 }
89 #endif
78 90
79 class Trans32x32Test : public ::testing::TestWithParam<Trans32x32Param> { 91 class Trans32x32Test : public ::testing::TestWithParam<Trans32x32Param> {
80 public: 92 public:
81 virtual ~Trans32x32Test() {} 93 virtual ~Trans32x32Test() {}
82 virtual void SetUp() { 94 virtual void SetUp() {
83 fwd_txfm_ = GET_PARAM(0); 95 fwd_txfm_ = GET_PARAM(0);
84 inv_txfm_ = GET_PARAM(1); 96 inv_txfm_ = GET_PARAM(1);
85 version_ = GET_PARAM(2); // 0: high precision forward transform 97 version_ = GET_PARAM(2); // 0: high precision forward transform
86 // 1: low precision version for rd loop 98 // 1: low precision version for rd loop
99 bit_depth_ = GET_PARAM(3);
100 mask_ = (1 << bit_depth_) - 1;
87 } 101 }
88 102
89 virtual void TearDown() { libvpx_test::ClearSystemState(); } 103 virtual void TearDown() { libvpx_test::ClearSystemState(); }
90 104
91 protected: 105 protected:
92 int version_; 106 int version_;
107 vpx_bit_depth_t bit_depth_;
108 int mask_;
93 FwdTxfmFunc fwd_txfm_; 109 FwdTxfmFunc fwd_txfm_;
94 InvTxfmFunc inv_txfm_; 110 InvTxfmFunc inv_txfm_;
95 }; 111 };
96 112
97 TEST_P(Trans32x32Test, AccuracyCheck) { 113 TEST_P(Trans32x32Test, AccuracyCheck) {
98 ACMRandom rnd(ACMRandom::DeterministicSeed()); 114 ACMRandom rnd(ACMRandom::DeterministicSeed());
99 uint32_t max_error = 0; 115 uint32_t max_error = 0;
100 int64_t total_error = 0; 116 int64_t total_error = 0;
101 const int count_test_block = 1000; 117 const int count_test_block = 1000;
102 DECLARE_ALIGNED_ARRAY(16, int16_t, test_input_block, kNumCoeffs); 118 DECLARE_ALIGNED_ARRAY(16, int16_t, test_input_block, kNumCoeffs);
103 DECLARE_ALIGNED_ARRAY(16, int16_t, test_temp_block, kNumCoeffs); 119 DECLARE_ALIGNED_ARRAY(16, tran_low_t, test_temp_block, kNumCoeffs);
104 DECLARE_ALIGNED_ARRAY(16, uint8_t, dst, kNumCoeffs); 120 DECLARE_ALIGNED_ARRAY(16, uint8_t, dst, kNumCoeffs);
105 DECLARE_ALIGNED_ARRAY(16, uint8_t, src, kNumCoeffs); 121 DECLARE_ALIGNED_ARRAY(16, uint8_t, src, kNumCoeffs);
122 #if CONFIG_VP9_HIGHBITDEPTH
123 DECLARE_ALIGNED_ARRAY(16, uint16_t, dst16, kNumCoeffs);
124 DECLARE_ALIGNED_ARRAY(16, uint16_t, src16, kNumCoeffs);
125 #endif
106 126
107 for (int i = 0; i < count_test_block; ++i) { 127 for (int i = 0; i < count_test_block; ++i) {
108 // Initialize a test block with input range [-255, 255]. 128 // Initialize a test block with input range [-mask_, mask_].
109 for (int j = 0; j < kNumCoeffs; ++j) { 129 for (int j = 0; j < kNumCoeffs; ++j) {
110 src[j] = rnd.Rand8(); 130 if (bit_depth_ == 8) {
111 dst[j] = rnd.Rand8(); 131 src[j] = rnd.Rand8();
112 test_input_block[j] = src[j] - dst[j]; 132 dst[j] = rnd.Rand8();
133 test_input_block[j] = src[j] - dst[j];
134 #if CONFIG_VP9_HIGHBITDEPTH
135 } else {
136 src16[j] = rnd.Rand16() & mask_;
137 dst16[j] = rnd.Rand16() & mask_;
138 test_input_block[j] = src16[j] - dst16[j];
139 #endif
140 }
113 } 141 }
114 142
115 ASM_REGISTER_STATE_CHECK(fwd_txfm_(test_input_block, test_temp_block, 32)); 143 ASM_REGISTER_STATE_CHECK(fwd_txfm_(test_input_block, test_temp_block, 32));
116 ASM_REGISTER_STATE_CHECK(inv_txfm_(test_temp_block, dst, 32)); 144 if (bit_depth_ == VPX_BITS_8) {
145 ASM_REGISTER_STATE_CHECK(inv_txfm_(test_temp_block, dst, 32));
146 #if CONFIG_VP9_HIGHBITDEPTH
147 } else {
148 ASM_REGISTER_STATE_CHECK(inv_txfm_(test_temp_block,
149 CONVERT_TO_BYTEPTR(dst16), 32));
150 #endif
151 }
117 152
118 for (int j = 0; j < kNumCoeffs; ++j) { 153 for (int j = 0; j < kNumCoeffs; ++j) {
154 #if CONFIG_VP9_HIGHBITDEPTH
155 const uint32_t diff =
156 bit_depth_ == VPX_BITS_8 ? dst[j] - src[j] : dst16[j] - src16[j];
157 #else
119 const uint32_t diff = dst[j] - src[j]; 158 const uint32_t diff = dst[j] - src[j];
159 #endif
120 const uint32_t error = diff * diff; 160 const uint32_t error = diff * diff;
121 if (max_error < error) 161 if (max_error < error)
122 max_error = error; 162 max_error = error;
123 total_error += error; 163 total_error += error;
124 } 164 }
125 } 165 }
126 166
127 if (version_ == 1) { 167 if (version_ == 1) {
128 max_error /= 2; 168 max_error /= 2;
129 total_error /= 45; 169 total_error /= 45;
130 } 170 }
131 171
132 EXPECT_GE(1u, max_error) 172 EXPECT_GE(1u << 2 * (bit_depth_ - 8), max_error)
133 << "Error: 32x32 FDCT/IDCT has an individual round-trip error > 1"; 173 << "Error: 32x32 FDCT/IDCT has an individual round-trip error > 1";
134 174
135 EXPECT_GE(count_test_block, total_error) 175 EXPECT_GE(count_test_block << 2 * (bit_depth_ - 8), total_error)
136 << "Error: 32x32 FDCT/IDCT has average round-trip error > 1 per block"; 176 << "Error: 32x32 FDCT/IDCT has average round-trip error > 1 per block";
137 } 177 }
138 178
139 TEST_P(Trans32x32Test, CoeffCheck) { 179 TEST_P(Trans32x32Test, CoeffCheck) {
140 ACMRandom rnd(ACMRandom::DeterministicSeed()); 180 ACMRandom rnd(ACMRandom::DeterministicSeed());
141 const int count_test_block = 1000; 181 const int count_test_block = 1000;
142 182
143 DECLARE_ALIGNED_ARRAY(16, int16_t, input_block, kNumCoeffs); 183 DECLARE_ALIGNED_ARRAY(16, int16_t, input_block, kNumCoeffs);
144 DECLARE_ALIGNED_ARRAY(16, int16_t, output_ref_block, kNumCoeffs); 184 DECLARE_ALIGNED_ARRAY(16, tran_low_t, output_ref_block, kNumCoeffs);
145 DECLARE_ALIGNED_ARRAY(16, int16_t, output_block, kNumCoeffs); 185 DECLARE_ALIGNED_ARRAY(16, tran_low_t, output_block, kNumCoeffs);
146 186
147 for (int i = 0; i < count_test_block; ++i) { 187 for (int i = 0; i < count_test_block; ++i) {
148 for (int j = 0; j < kNumCoeffs; ++j) 188 for (int j = 0; j < kNumCoeffs; ++j)
149 input_block[j] = rnd.Rand8() - rnd.Rand8(); 189 input_block[j] = (rnd.Rand16() & mask_) - (rnd.Rand16() & mask_);
150 190
151 const int stride = 32; 191 const int stride = 32;
152 vp9_fdct32x32_c(input_block, output_ref_block, stride); 192 vp9_fdct32x32_c(input_block, output_ref_block, stride);
153 ASM_REGISTER_STATE_CHECK(fwd_txfm_(input_block, output_block, stride)); 193 ASM_REGISTER_STATE_CHECK(fwd_txfm_(input_block, output_block, stride));
154 194
155 if (version_ == 0) { 195 if (version_ == 0) {
156 for (int j = 0; j < kNumCoeffs; ++j) 196 for (int j = 0; j < kNumCoeffs; ++j)
157 EXPECT_EQ(output_block[j], output_ref_block[j]) 197 EXPECT_EQ(output_block[j], output_ref_block[j])
158 << "Error: 32x32 FDCT versions have mismatched coefficients"; 198 << "Error: 32x32 FDCT versions have mismatched coefficients";
159 } else { 199 } else {
160 for (int j = 0; j < kNumCoeffs; ++j) 200 for (int j = 0; j < kNumCoeffs; ++j)
161 EXPECT_GE(6, abs(output_block[j] - output_ref_block[j])) 201 EXPECT_GE(6, abs(output_block[j] - output_ref_block[j]))
162 << "Error: 32x32 FDCT rd has mismatched coefficients"; 202 << "Error: 32x32 FDCT rd has mismatched coefficients";
163 } 203 }
164 } 204 }
165 } 205 }
166 206
167 TEST_P(Trans32x32Test, MemCheck) { 207 TEST_P(Trans32x32Test, MemCheck) {
168 ACMRandom rnd(ACMRandom::DeterministicSeed()); 208 ACMRandom rnd(ACMRandom::DeterministicSeed());
169 const int count_test_block = 2000; 209 const int count_test_block = 2000;
170 210
171 DECLARE_ALIGNED_ARRAY(16, int16_t, input_block, kNumCoeffs); 211 DECLARE_ALIGNED_ARRAY(16, int16_t, input_block, kNumCoeffs);
172 DECLARE_ALIGNED_ARRAY(16, int16_t, input_extreme_block, kNumCoeffs); 212 DECLARE_ALIGNED_ARRAY(16, int16_t, input_extreme_block, kNumCoeffs);
173 DECLARE_ALIGNED_ARRAY(16, int16_t, output_ref_block, kNumCoeffs); 213 DECLARE_ALIGNED_ARRAY(16, tran_low_t, output_ref_block, kNumCoeffs);
174 DECLARE_ALIGNED_ARRAY(16, int16_t, output_block, kNumCoeffs); 214 DECLARE_ALIGNED_ARRAY(16, tran_low_t, output_block, kNumCoeffs);
175 215
176 for (int i = 0; i < count_test_block; ++i) { 216 for (int i = 0; i < count_test_block; ++i) {
177 // Initialize a test block with input range [-255, 255]. 217 // Initialize a test block with input range [-mask_, mask_].
178 for (int j = 0; j < kNumCoeffs; ++j) { 218 for (int j = 0; j < kNumCoeffs; ++j) {
179 input_block[j] = rnd.Rand8() - rnd.Rand8(); 219 input_block[j] = (rnd.Rand16() & mask_) - (rnd.Rand16() & mask_);
180 input_extreme_block[j] = rnd.Rand8() & 1 ? 255 : -255; 220 input_extreme_block[j] = rnd.Rand8() & 1 ? mask_ : -mask_;
181 } 221 }
182 if (i == 0) { 222 if (i == 0) {
183 for (int j = 0; j < kNumCoeffs; ++j) 223 for (int j = 0; j < kNumCoeffs; ++j)
184 input_extreme_block[j] = 255; 224 input_extreme_block[j] = mask_;
185 } else if (i == 1) { 225 } else if (i == 1) {
186 for (int j = 0; j < kNumCoeffs; ++j) 226 for (int j = 0; j < kNumCoeffs; ++j)
187 input_extreme_block[j] = -255; 227 input_extreme_block[j] = -mask_;
188 } 228 }
189 229
190 const int stride = 32; 230 const int stride = 32;
191 vp9_fdct32x32_c(input_extreme_block, output_ref_block, stride); 231 vp9_fdct32x32_c(input_extreme_block, output_ref_block, stride);
192 ASM_REGISTER_STATE_CHECK( 232 ASM_REGISTER_STATE_CHECK(
193 fwd_txfm_(input_extreme_block, output_block, stride)); 233 fwd_txfm_(input_extreme_block, output_block, stride));
194 234
195 // The minimum quant value is 4. 235 // The minimum quant value is 4.
196 for (int j = 0; j < kNumCoeffs; ++j) { 236 for (int j = 0; j < kNumCoeffs; ++j) {
197 if (version_ == 0) { 237 if (version_ == 0) {
198 EXPECT_EQ(output_block[j], output_ref_block[j]) 238 EXPECT_EQ(output_block[j], output_ref_block[j])
199 << "Error: 32x32 FDCT versions have mismatched coefficients"; 239 << "Error: 32x32 FDCT versions have mismatched coefficients";
200 } else { 240 } else {
201 EXPECT_GE(6, abs(output_block[j] - output_ref_block[j])) 241 EXPECT_GE(6, abs(output_block[j] - output_ref_block[j]))
202 << "Error: 32x32 FDCT rd has mismatched coefficients"; 242 << "Error: 32x32 FDCT rd has mismatched coefficients";
203 } 243 }
204 EXPECT_GE(4 * DCT_MAX_VALUE, abs(output_ref_block[j])) 244 EXPECT_GE(4 * DCT_MAX_VALUE << (bit_depth_ - 8), abs(output_ref_block[j]))
205 << "Error: 32x32 FDCT C has coefficient larger than 4*DCT_MAX_VALUE"; 245 << "Error: 32x32 FDCT C has coefficient larger than 4*DCT_MAX_VALUE";
206 EXPECT_GE(4 * DCT_MAX_VALUE, abs(output_block[j])) 246 EXPECT_GE(4 * DCT_MAX_VALUE << (bit_depth_ - 8), abs(output_block[j]))
207 << "Error: 32x32 FDCT has coefficient larger than " 247 << "Error: 32x32 FDCT has coefficient larger than "
208 << "4*DCT_MAX_VALUE"; 248 << "4*DCT_MAX_VALUE";
209 } 249 }
210 } 250 }
211 } 251 }
212 252
213 TEST_P(Trans32x32Test, InverseAccuracy) { 253 TEST_P(Trans32x32Test, InverseAccuracy) {
214 ACMRandom rnd(ACMRandom::DeterministicSeed()); 254 ACMRandom rnd(ACMRandom::DeterministicSeed());
215 const int count_test_block = 1000; 255 const int count_test_block = 1000;
216 DECLARE_ALIGNED_ARRAY(16, int16_t, in, kNumCoeffs); 256 DECLARE_ALIGNED_ARRAY(16, int16_t, in, kNumCoeffs);
217 DECLARE_ALIGNED_ARRAY(16, int16_t, coeff, kNumCoeffs); 257 DECLARE_ALIGNED_ARRAY(16, tran_low_t, coeff, kNumCoeffs);
218 DECLARE_ALIGNED_ARRAY(16, uint8_t, dst, kNumCoeffs); 258 DECLARE_ALIGNED_ARRAY(16, uint8_t, dst, kNumCoeffs);
219 DECLARE_ALIGNED_ARRAY(16, uint8_t, src, kNumCoeffs); 259 DECLARE_ALIGNED_ARRAY(16, uint8_t, src, kNumCoeffs);
260 #if CONFIG_VP9_HIGHBITDEPTH
261 DECLARE_ALIGNED_ARRAY(16, uint16_t, dst16, kNumCoeffs);
262 DECLARE_ALIGNED_ARRAY(16, uint16_t, src16, kNumCoeffs);
263 #endif
220 264
221 for (int i = 0; i < count_test_block; ++i) { 265 for (int i = 0; i < count_test_block; ++i) {
222 double out_r[kNumCoeffs]; 266 double out_r[kNumCoeffs];
223 267
224 // Initialize a test block with input range [-255, 255] 268 // Initialize a test block with input range [-255, 255]
225 for (int j = 0; j < kNumCoeffs; ++j) { 269 for (int j = 0; j < kNumCoeffs; ++j) {
226 src[j] = rnd.Rand8(); 270 if (bit_depth_ == VPX_BITS_8) {
227 dst[j] = rnd.Rand8(); 271 src[j] = rnd.Rand8();
228 in[j] = src[j] - dst[j]; 272 dst[j] = rnd.Rand8();
273 in[j] = src[j] - dst[j];
274 #if CONFIG_VP9_HIGHBITDEPTH
275 } else {
276 src16[j] = rnd.Rand16() & mask_;
277 dst16[j] = rnd.Rand16() & mask_;
278 in[j] = src16[j] - dst16[j];
279 #endif
280 }
229 } 281 }
230 282
231 reference_32x32_dct_2d(in, out_r); 283 reference_32x32_dct_2d(in, out_r);
232 for (int j = 0; j < kNumCoeffs; ++j) 284 for (int j = 0; j < kNumCoeffs; ++j)
233 coeff[j] = round(out_r[j]); 285 coeff[j] = round(out_r[j]);
234 ASM_REGISTER_STATE_CHECK(inv_txfm_(coeff, dst, 32)); 286 if (bit_depth_ == VPX_BITS_8) {
287 ASM_REGISTER_STATE_CHECK(inv_txfm_(coeff, dst, 32));
288 #if CONFIG_VP9_HIGHBITDEPTH
289 } else {
290 ASM_REGISTER_STATE_CHECK(inv_txfm_(coeff, CONVERT_TO_BYTEPTR(dst16), 32));
291 #endif
292 }
235 for (int j = 0; j < kNumCoeffs; ++j) { 293 for (int j = 0; j < kNumCoeffs; ++j) {
294 #if CONFIG_VP9_HIGHBITDEPTH
295 const int diff =
296 bit_depth_ == VPX_BITS_8 ? dst[j] - src[j] : dst16[j] - src16[j];
297 #else
236 const int diff = dst[j] - src[j]; 298 const int diff = dst[j] - src[j];
299 #endif
237 const int error = diff * diff; 300 const int error = diff * diff;
238 EXPECT_GE(1, error) 301 EXPECT_GE(1, error)
239 << "Error: 32x32 IDCT has error " << error 302 << "Error: 32x32 IDCT has error " << error
240 << " at index " << j; 303 << " at index " << j;
241 } 304 }
242 } 305 }
243 } 306 }
244 307
245 using std::tr1::make_tuple; 308 using std::tr1::make_tuple;
246 309
310 #if CONFIG_VP9_HIGHBITDEPTH
247 INSTANTIATE_TEST_CASE_P( 311 INSTANTIATE_TEST_CASE_P(
248 C, Trans32x32Test, 312 C, Trans32x32Test,
249 ::testing::Values( 313 ::testing::Values(
250 make_tuple(&vp9_fdct32x32_c, &vp9_idct32x32_1024_add_c, 0), 314 make_tuple(&vp9_high_fdct32x32_c,
251 make_tuple(&vp9_fdct32x32_rd_c, &vp9_idct32x32_1024_add_c, 1))); 315 &idct32x32_10, 0, VPX_BITS_10),
316 make_tuple(&vp9_high_fdct32x32_rd_c,
317 &idct32x32_10, 1, VPX_BITS_10),
318 make_tuple(&vp9_high_fdct32x32_c,
319 &idct32x32_12, 0, VPX_BITS_12),
320 make_tuple(&vp9_high_fdct32x32_rd_c,
321 &idct32x32_12, 1, VPX_BITS_12),
322 make_tuple(&vp9_fdct32x32_c,
323 &vp9_idct32x32_1024_add_c, 0, VPX_BITS_8),
324 make_tuple(&vp9_fdct32x32_rd_c,
325 &vp9_idct32x32_1024_add_c, 1, VPX_BITS_8)));
326 #else
327 INSTANTIATE_TEST_CASE_P(
328 C, Trans32x32Test,
329 ::testing::Values(
330 make_tuple(&vp9_fdct32x32_c,
331 &vp9_idct32x32_1024_add_c, 0, VPX_BITS_8),
332 make_tuple(&vp9_fdct32x32_rd_c,
333 &vp9_idct32x32_1024_add_c, 1, VPX_BITS_8)));
334 #endif
252 335
253 #if HAVE_NEON_ASM 336 #if HAVE_NEON_ASM && !CONFIG_VP9_HIGHBITDEPTH
254 INSTANTIATE_TEST_CASE_P( 337 INSTANTIATE_TEST_CASE_P(
255 NEON, Trans32x32Test, 338 NEON, Trans32x32Test,
256 ::testing::Values( 339 ::testing::Values(
257 make_tuple(&vp9_fdct32x32_c, 340 make_tuple(&vp9_fdct32x32_c,
258 &vp9_idct32x32_1024_add_neon, 0), 341 &vp9_idct32x32_1024_add_neon, 0, VPX_BITS_8),
259 make_tuple(&vp9_fdct32x32_rd_c, 342 make_tuple(&vp9_fdct32x32_rd_c,
260 &vp9_idct32x32_1024_add_neon, 1))); 343 &vp9_idct32x32_1024_add_neon, 1, VPX_BITS_8)));
261 #endif 344 #endif
262 345
263 #if HAVE_SSE2 346 #if HAVE_SSE2 && !CONFIG_VP9_HIGHBITDEPTH
264 INSTANTIATE_TEST_CASE_P( 347 INSTANTIATE_TEST_CASE_P(
265 SSE2, Trans32x32Test, 348 SSE2, Trans32x32Test,
266 ::testing::Values( 349 ::testing::Values(
267 make_tuple(&vp9_fdct32x32_sse2, 350 make_tuple(&vp9_fdct32x32_sse2,
268 &vp9_idct32x32_1024_add_sse2, 0), 351 &vp9_idct32x32_1024_add_sse2, 0, VPX_BITS_8),
269 make_tuple(&vp9_fdct32x32_rd_sse2, 352 make_tuple(&vp9_fdct32x32_rd_sse2,
270 &vp9_idct32x32_1024_add_sse2, 1))); 353 &vp9_idct32x32_1024_add_sse2, 1, VPX_BITS_8)));
271 #endif 354 #endif
272 355
273 #if HAVE_AVX2 356 #if HAVE_AVX2 && !CONFIG_VP9_HIGHBITDEPTH
274 INSTANTIATE_TEST_CASE_P( 357 INSTANTIATE_TEST_CASE_P(
275 AVX2, Trans32x32Test, 358 AVX2, Trans32x32Test,
276 ::testing::Values( 359 ::testing::Values(
277 make_tuple(&vp9_fdct32x32_avx2, 360 make_tuple(&vp9_fdct32x32_avx2,
278 &vp9_idct32x32_1024_add_sse2, 0), 361 &vp9_idct32x32_1024_add_sse2, 0, VPX_BITS_8),
279 make_tuple(&vp9_fdct32x32_rd_avx2, 362 make_tuple(&vp9_fdct32x32_rd_avx2,
280 &vp9_idct32x32_1024_add_sse2, 1))); 363 &vp9_idct32x32_1024_add_sse2, 1, VPX_BITS_8)));
281 #endif 364 #endif
282 } // namespace 365 } // namespace
OLDNEW
« no previous file with comments | « source/libvpx/test/dct16x16_test.cc ('k') | source/libvpx/test/external_frame_buffer_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698