OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2014 The WebM project authors. All Rights Reserved. | 2 * Copyright (c) 2014 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 |
(...skipping 16 matching lines...) Expand all Loading... |
27 | 27 |
28 namespace { | 28 namespace { |
29 #if CONFIG_VP9_HIGHBITDEPTH | 29 #if CONFIG_VP9_HIGHBITDEPTH |
30 const int number_of_iterations = 100; | 30 const int number_of_iterations = 100; |
31 | 31 |
32 typedef void (*QuantizeFunc)(const tran_low_t *coeff, intptr_t count, | 32 typedef void (*QuantizeFunc)(const tran_low_t *coeff, intptr_t count, |
33 int skip_block, const int16_t *zbin, | 33 int skip_block, const int16_t *zbin, |
34 const int16_t *round, const int16_t *quant, | 34 const int16_t *round, const int16_t *quant, |
35 const int16_t *quant_shift, | 35 const int16_t *quant_shift, |
36 tran_low_t *qcoeff, tran_low_t *dqcoeff, | 36 tran_low_t *qcoeff, tran_low_t *dqcoeff, |
37 const int16_t *dequant, int zbin_oq_value, | 37 const int16_t *dequant, |
38 uint16_t *eob, const int16_t *scan, | 38 uint16_t *eob, const int16_t *scan, |
39 const int16_t *iscan); | 39 const int16_t *iscan); |
40 typedef std::tr1::tuple<QuantizeFunc, QuantizeFunc, vpx_bit_depth_t> | 40 typedef std::tr1::tuple<QuantizeFunc, QuantizeFunc, vpx_bit_depth_t> |
41 QuantizeParam; | 41 QuantizeParam; |
42 | 42 |
43 class VP9QuantizeTest : public ::testing::TestWithParam<QuantizeParam> { | 43 class VP9QuantizeTest : public ::testing::TestWithParam<QuantizeParam> { |
44 public: | 44 public: |
45 virtual ~VP9QuantizeTest() {} | 45 virtual ~VP9QuantizeTest() {} |
46 virtual void SetUp() { | 46 virtual void SetUp() { |
47 quantize_op_ = GET_PARAM(0); | 47 quantize_op_ = GET_PARAM(0); |
(...skipping 25 matching lines...) Expand all Loading... |
73 | 73 |
74 protected: | 74 protected: |
75 vpx_bit_depth_t bit_depth_; | 75 vpx_bit_depth_t bit_depth_; |
76 int mask_; | 76 int mask_; |
77 QuantizeFunc quantize_op_; | 77 QuantizeFunc quantize_op_; |
78 QuantizeFunc ref_quantize_op_; | 78 QuantizeFunc ref_quantize_op_; |
79 }; | 79 }; |
80 | 80 |
81 TEST_P(VP9QuantizeTest, OperationCheck) { | 81 TEST_P(VP9QuantizeTest, OperationCheck) { |
82 ACMRandom rnd(ACMRandom::DeterministicSeed()); | 82 ACMRandom rnd(ACMRandom::DeterministicSeed()); |
83 int zbin_oq_value = 0; | |
84 DECLARE_ALIGNED_ARRAY(16, tran_low_t, coeff_ptr, 256); | 83 DECLARE_ALIGNED_ARRAY(16, tran_low_t, coeff_ptr, 256); |
85 DECLARE_ALIGNED_ARRAY(16, int16_t, zbin_ptr, 2); | 84 DECLARE_ALIGNED_ARRAY(16, int16_t, zbin_ptr, 2); |
86 DECLARE_ALIGNED_ARRAY(16, int16_t, round_ptr, 2); | 85 DECLARE_ALIGNED_ARRAY(16, int16_t, round_ptr, 2); |
87 DECLARE_ALIGNED_ARRAY(16, int16_t, quant_ptr, 2); | 86 DECLARE_ALIGNED_ARRAY(16, int16_t, quant_ptr, 2); |
88 DECLARE_ALIGNED_ARRAY(16, int16_t, quant_shift_ptr, 2); | 87 DECLARE_ALIGNED_ARRAY(16, int16_t, quant_shift_ptr, 2); |
89 DECLARE_ALIGNED_ARRAY(16, tran_low_t, qcoeff_ptr, 256); | 88 DECLARE_ALIGNED_ARRAY(16, tran_low_t, qcoeff_ptr, 256); |
90 DECLARE_ALIGNED_ARRAY(16, tran_low_t, dqcoeff_ptr, 256); | 89 DECLARE_ALIGNED_ARRAY(16, tran_low_t, dqcoeff_ptr, 256); |
91 DECLARE_ALIGNED_ARRAY(16, tran_low_t, ref_qcoeff_ptr, 256); | 90 DECLARE_ALIGNED_ARRAY(16, tran_low_t, ref_qcoeff_ptr, 256); |
92 DECLARE_ALIGNED_ARRAY(16, tran_low_t, ref_dqcoeff_ptr, 256); | 91 DECLARE_ALIGNED_ARRAY(16, tran_low_t, ref_dqcoeff_ptr, 256); |
93 DECLARE_ALIGNED_ARRAY(16, int16_t, dequant_ptr, 2); | 92 DECLARE_ALIGNED_ARRAY(16, int16_t, dequant_ptr, 2); |
(...skipping 15 matching lines...) Expand all Loading... |
109 } | 108 } |
110 for (int j = 0; j < 2; j++) { | 109 for (int j = 0; j < 2; j++) { |
111 zbin_ptr[j] = rnd.Rand16()&mask_; | 110 zbin_ptr[j] = rnd.Rand16()&mask_; |
112 round_ptr[j] = rnd.Rand16(); | 111 round_ptr[j] = rnd.Rand16(); |
113 quant_ptr[j] = rnd.Rand16(); | 112 quant_ptr[j] = rnd.Rand16(); |
114 quant_shift_ptr[j] = rnd.Rand16(); | 113 quant_shift_ptr[j] = rnd.Rand16(); |
115 dequant_ptr[j] = rnd.Rand16(); | 114 dequant_ptr[j] = rnd.Rand16(); |
116 } | 115 } |
117 ref_quantize_op_(coeff_ptr, count, skip_block, zbin_ptr, round_ptr, | 116 ref_quantize_op_(coeff_ptr, count, skip_block, zbin_ptr, round_ptr, |
118 quant_ptr, quant_shift_ptr, ref_qcoeff_ptr, | 117 quant_ptr, quant_shift_ptr, ref_qcoeff_ptr, |
119 ref_dqcoeff_ptr, dequant_ptr, zbin_oq_value, | 118 ref_dqcoeff_ptr, dequant_ptr, |
120 ref_eob_ptr, scan_order->scan, scan_order->iscan); | 119 ref_eob_ptr, scan_order->scan, scan_order->iscan); |
121 ASM_REGISTER_STATE_CHECK(quantize_op_(coeff_ptr, count, skip_block, | 120 ASM_REGISTER_STATE_CHECK(quantize_op_(coeff_ptr, count, skip_block, |
122 zbin_ptr, round_ptr, quant_ptr, | 121 zbin_ptr, round_ptr, quant_ptr, |
123 quant_shift_ptr, qcoeff_ptr, | 122 quant_shift_ptr, qcoeff_ptr, |
124 dqcoeff_ptr, dequant_ptr, | 123 dqcoeff_ptr, dequant_ptr, eob_ptr, |
125 zbin_oq_value, eob_ptr, | |
126 scan_order->scan, scan_order->iscan)); | 124 scan_order->scan, scan_order->iscan)); |
127 for (int j = 0; j < sz; ++j) { | 125 for (int j = 0; j < sz; ++j) { |
128 err_count += (ref_qcoeff_ptr[j] != qcoeff_ptr[j]) | | 126 err_count += (ref_qcoeff_ptr[j] != qcoeff_ptr[j]) | |
129 (ref_dqcoeff_ptr[j] != dqcoeff_ptr[j]); | 127 (ref_dqcoeff_ptr[j] != dqcoeff_ptr[j]); |
130 } | 128 } |
131 err_count += (*ref_eob_ptr != *eob_ptr); | 129 err_count += (*ref_eob_ptr != *eob_ptr); |
132 if (err_count && !err_count_total) { | 130 if (err_count && !err_count_total) { |
133 first_failure = i; | 131 first_failure = i; |
134 } | 132 } |
135 err_count_total += err_count; | 133 err_count_total += err_count; |
136 } | 134 } |
137 EXPECT_EQ(0, err_count_total) | 135 EXPECT_EQ(0, err_count_total) |
138 << "Error: Quantization Test, C output doesn't match SSE2 output. " | 136 << "Error: Quantization Test, C output doesn't match SSE2 output. " |
139 << "First failed at test case " << first_failure; | 137 << "First failed at test case " << first_failure; |
140 } | 138 } |
141 | 139 |
142 TEST_P(VP9Quantize32Test, OperationCheck) { | 140 TEST_P(VP9Quantize32Test, OperationCheck) { |
143 ACMRandom rnd(ACMRandom::DeterministicSeed()); | 141 ACMRandom rnd(ACMRandom::DeterministicSeed()); |
144 int zbin_oq_value = 0; | |
145 DECLARE_ALIGNED_ARRAY(16, tran_low_t, coeff_ptr, 1024); | 142 DECLARE_ALIGNED_ARRAY(16, tran_low_t, coeff_ptr, 1024); |
146 DECLARE_ALIGNED_ARRAY(16, int16_t, zbin_ptr, 2); | 143 DECLARE_ALIGNED_ARRAY(16, int16_t, zbin_ptr, 2); |
147 DECLARE_ALIGNED_ARRAY(16, int16_t, round_ptr, 2); | 144 DECLARE_ALIGNED_ARRAY(16, int16_t, round_ptr, 2); |
148 DECLARE_ALIGNED_ARRAY(16, int16_t, quant_ptr, 2); | 145 DECLARE_ALIGNED_ARRAY(16, int16_t, quant_ptr, 2); |
149 DECLARE_ALIGNED_ARRAY(16, int16_t, quant_shift_ptr, 2); | 146 DECLARE_ALIGNED_ARRAY(16, int16_t, quant_shift_ptr, 2); |
150 DECLARE_ALIGNED_ARRAY(16, tran_low_t, qcoeff_ptr, 1024); | 147 DECLARE_ALIGNED_ARRAY(16, tran_low_t, qcoeff_ptr, 1024); |
151 DECLARE_ALIGNED_ARRAY(16, tran_low_t, dqcoeff_ptr, 1024); | 148 DECLARE_ALIGNED_ARRAY(16, tran_low_t, dqcoeff_ptr, 1024); |
152 DECLARE_ALIGNED_ARRAY(16, tran_low_t, ref_qcoeff_ptr, 1024); | 149 DECLARE_ALIGNED_ARRAY(16, tran_low_t, ref_qcoeff_ptr, 1024); |
153 DECLARE_ALIGNED_ARRAY(16, tran_low_t, ref_dqcoeff_ptr, 1024); | 150 DECLARE_ALIGNED_ARRAY(16, tran_low_t, ref_dqcoeff_ptr, 1024); |
154 DECLARE_ALIGNED_ARRAY(16, int16_t, dequant_ptr, 2); | 151 DECLARE_ALIGNED_ARRAY(16, int16_t, dequant_ptr, 2); |
(...skipping 15 matching lines...) Expand all Loading... |
170 } | 167 } |
171 for (int j = 0; j < 2; j++) { | 168 for (int j = 0; j < 2; j++) { |
172 zbin_ptr[j] = rnd.Rand16()&mask_; | 169 zbin_ptr[j] = rnd.Rand16()&mask_; |
173 round_ptr[j] = rnd.Rand16(); | 170 round_ptr[j] = rnd.Rand16(); |
174 quant_ptr[j] = rnd.Rand16(); | 171 quant_ptr[j] = rnd.Rand16(); |
175 quant_shift_ptr[j] = rnd.Rand16(); | 172 quant_shift_ptr[j] = rnd.Rand16(); |
176 dequant_ptr[j] = rnd.Rand16(); | 173 dequant_ptr[j] = rnd.Rand16(); |
177 } | 174 } |
178 ref_quantize_op_(coeff_ptr, count, skip_block, zbin_ptr, round_ptr, | 175 ref_quantize_op_(coeff_ptr, count, skip_block, zbin_ptr, round_ptr, |
179 quant_ptr, quant_shift_ptr, ref_qcoeff_ptr, | 176 quant_ptr, quant_shift_ptr, ref_qcoeff_ptr, |
180 ref_dqcoeff_ptr, dequant_ptr, zbin_oq_value, | 177 ref_dqcoeff_ptr, dequant_ptr, |
181 ref_eob_ptr, scan_order->scan, scan_order->iscan); | 178 ref_eob_ptr, scan_order->scan, scan_order->iscan); |
182 ASM_REGISTER_STATE_CHECK(quantize_op_(coeff_ptr, count, skip_block, | 179 ASM_REGISTER_STATE_CHECK(quantize_op_(coeff_ptr, count, skip_block, |
183 zbin_ptr, round_ptr, quant_ptr, | 180 zbin_ptr, round_ptr, quant_ptr, |
184 quant_shift_ptr, qcoeff_ptr, | 181 quant_shift_ptr, qcoeff_ptr, |
185 dqcoeff_ptr, dequant_ptr, | 182 dqcoeff_ptr, dequant_ptr, eob_ptr, |
186 zbin_oq_value, eob_ptr, | |
187 scan_order->scan, scan_order->iscan)); | 183 scan_order->scan, scan_order->iscan)); |
188 for (int j = 0; j < sz; ++j) { | 184 for (int j = 0; j < sz; ++j) { |
189 err_count += (ref_qcoeff_ptr[j] != qcoeff_ptr[j]) | | 185 err_count += (ref_qcoeff_ptr[j] != qcoeff_ptr[j]) | |
190 (ref_dqcoeff_ptr[j] != dqcoeff_ptr[j]); | 186 (ref_dqcoeff_ptr[j] != dqcoeff_ptr[j]); |
191 } | 187 } |
192 err_count += (*ref_eob_ptr != *eob_ptr); | 188 err_count += (*ref_eob_ptr != *eob_ptr); |
193 if (err_count && !err_count_total) { | 189 if (err_count && !err_count_total) { |
194 first_failure = i; | 190 first_failure = i; |
195 } | 191 } |
196 err_count_total += err_count; | 192 err_count_total += err_count; |
197 } | 193 } |
198 EXPECT_EQ(0, err_count_total) | 194 EXPECT_EQ(0, err_count_total) |
199 << "Error: Quantization Test, C output doesn't match SSE2 output. " | 195 << "Error: Quantization Test, C output doesn't match SSE2 output. " |
200 << "First failed at test case " << first_failure; | 196 << "First failed at test case " << first_failure; |
201 } | 197 } |
202 | 198 |
203 TEST_P(VP9QuantizeTest, EOBCheck) { | 199 TEST_P(VP9QuantizeTest, EOBCheck) { |
204 ACMRandom rnd(ACMRandom::DeterministicSeed()); | 200 ACMRandom rnd(ACMRandom::DeterministicSeed()); |
205 int zbin_oq_value = 0; | |
206 DECLARE_ALIGNED_ARRAY(16, tran_low_t, coeff_ptr, 256); | 201 DECLARE_ALIGNED_ARRAY(16, tran_low_t, coeff_ptr, 256); |
207 DECLARE_ALIGNED_ARRAY(16, int16_t, zbin_ptr, 2); | 202 DECLARE_ALIGNED_ARRAY(16, int16_t, zbin_ptr, 2); |
208 DECLARE_ALIGNED_ARRAY(16, int16_t, round_ptr, 2); | 203 DECLARE_ALIGNED_ARRAY(16, int16_t, round_ptr, 2); |
209 DECLARE_ALIGNED_ARRAY(16, int16_t, quant_ptr, 2); | 204 DECLARE_ALIGNED_ARRAY(16, int16_t, quant_ptr, 2); |
210 DECLARE_ALIGNED_ARRAY(16, int16_t, quant_shift_ptr, 2); | 205 DECLARE_ALIGNED_ARRAY(16, int16_t, quant_shift_ptr, 2); |
211 DECLARE_ALIGNED_ARRAY(16, tran_low_t, qcoeff_ptr, 256); | 206 DECLARE_ALIGNED_ARRAY(16, tran_low_t, qcoeff_ptr, 256); |
212 DECLARE_ALIGNED_ARRAY(16, tran_low_t, dqcoeff_ptr, 256); | 207 DECLARE_ALIGNED_ARRAY(16, tran_low_t, dqcoeff_ptr, 256); |
213 DECLARE_ALIGNED_ARRAY(16, tran_low_t, ref_qcoeff_ptr, 256); | 208 DECLARE_ALIGNED_ARRAY(16, tran_low_t, ref_qcoeff_ptr, 256); |
214 DECLARE_ALIGNED_ARRAY(16, tran_low_t, ref_dqcoeff_ptr, 256); | 209 DECLARE_ALIGNED_ARRAY(16, tran_low_t, ref_dqcoeff_ptr, 256); |
215 DECLARE_ALIGNED_ARRAY(16, int16_t, dequant_ptr, 2); | 210 DECLARE_ALIGNED_ARRAY(16, int16_t, dequant_ptr, 2); |
(...skipping 19 matching lines...) Expand all Loading... |
235 for (int j = 0; j < 2; j++) { | 230 for (int j = 0; j < 2; j++) { |
236 zbin_ptr[j] = rnd.Rand16()&mask_; | 231 zbin_ptr[j] = rnd.Rand16()&mask_; |
237 round_ptr[j] = rnd.Rand16(); | 232 round_ptr[j] = rnd.Rand16(); |
238 quant_ptr[j] = rnd.Rand16(); | 233 quant_ptr[j] = rnd.Rand16(); |
239 quant_shift_ptr[j] = rnd.Rand16(); | 234 quant_shift_ptr[j] = rnd.Rand16(); |
240 dequant_ptr[j] = rnd.Rand16(); | 235 dequant_ptr[j] = rnd.Rand16(); |
241 } | 236 } |
242 | 237 |
243 ref_quantize_op_(coeff_ptr, count, skip_block, zbin_ptr, round_ptr, | 238 ref_quantize_op_(coeff_ptr, count, skip_block, zbin_ptr, round_ptr, |
244 quant_ptr, quant_shift_ptr, ref_qcoeff_ptr, | 239 quant_ptr, quant_shift_ptr, ref_qcoeff_ptr, |
245 ref_dqcoeff_ptr, dequant_ptr, zbin_oq_value, | 240 ref_dqcoeff_ptr, dequant_ptr, |
246 ref_eob_ptr, scan_order->scan, scan_order->iscan); | 241 ref_eob_ptr, scan_order->scan, scan_order->iscan); |
247 ASM_REGISTER_STATE_CHECK(quantize_op_(coeff_ptr, count, skip_block, | 242 ASM_REGISTER_STATE_CHECK(quantize_op_(coeff_ptr, count, skip_block, |
248 zbin_ptr, round_ptr, quant_ptr, | 243 zbin_ptr, round_ptr, quant_ptr, |
249 quant_shift_ptr, qcoeff_ptr, | 244 quant_shift_ptr, qcoeff_ptr, |
250 dqcoeff_ptr, dequant_ptr, | 245 dqcoeff_ptr, dequant_ptr, eob_ptr, |
251 zbin_oq_value, eob_ptr, | |
252 scan_order->scan, scan_order->iscan)); | 246 scan_order->scan, scan_order->iscan)); |
253 | 247 |
254 for (int j = 0; j < sz; ++j) { | 248 for (int j = 0; j < sz; ++j) { |
255 err_count += (ref_qcoeff_ptr[j] != qcoeff_ptr[j]) | | 249 err_count += (ref_qcoeff_ptr[j] != qcoeff_ptr[j]) | |
256 (ref_dqcoeff_ptr[j] != dqcoeff_ptr[j]); | 250 (ref_dqcoeff_ptr[j] != dqcoeff_ptr[j]); |
257 } | 251 } |
258 err_count += (*ref_eob_ptr != *eob_ptr); | 252 err_count += (*ref_eob_ptr != *eob_ptr); |
259 if (err_count && !err_count_total) { | 253 if (err_count && !err_count_total) { |
260 first_failure = i; | 254 first_failure = i; |
261 } | 255 } |
262 err_count_total += err_count; | 256 err_count_total += err_count; |
263 } | 257 } |
264 EXPECT_EQ(0, err_count_total) | 258 EXPECT_EQ(0, err_count_total) |
265 << "Error: Quantization Test, C output doesn't match SSE2 output. " | 259 << "Error: Quantization Test, C output doesn't match SSE2 output. " |
266 << "First failed at test case " << first_failure; | 260 << "First failed at test case " << first_failure; |
267 } | 261 } |
268 | 262 |
269 TEST_P(VP9Quantize32Test, EOBCheck) { | 263 TEST_P(VP9Quantize32Test, EOBCheck) { |
270 ACMRandom rnd(ACMRandom::DeterministicSeed()); | 264 ACMRandom rnd(ACMRandom::DeterministicSeed()); |
271 int zbin_oq_value = 0; | |
272 DECLARE_ALIGNED_ARRAY(16, tran_low_t, coeff_ptr, 1024); | 265 DECLARE_ALIGNED_ARRAY(16, tran_low_t, coeff_ptr, 1024); |
273 DECLARE_ALIGNED_ARRAY(16, int16_t, zbin_ptr, 2); | 266 DECLARE_ALIGNED_ARRAY(16, int16_t, zbin_ptr, 2); |
274 DECLARE_ALIGNED_ARRAY(16, int16_t, round_ptr, 2); | 267 DECLARE_ALIGNED_ARRAY(16, int16_t, round_ptr, 2); |
275 DECLARE_ALIGNED_ARRAY(16, int16_t, quant_ptr, 2); | 268 DECLARE_ALIGNED_ARRAY(16, int16_t, quant_ptr, 2); |
276 DECLARE_ALIGNED_ARRAY(16, int16_t, quant_shift_ptr, 2); | 269 DECLARE_ALIGNED_ARRAY(16, int16_t, quant_shift_ptr, 2); |
277 DECLARE_ALIGNED_ARRAY(16, tran_low_t, qcoeff_ptr, 1024); | 270 DECLARE_ALIGNED_ARRAY(16, tran_low_t, qcoeff_ptr, 1024); |
278 DECLARE_ALIGNED_ARRAY(16, tran_low_t, dqcoeff_ptr, 1024); | 271 DECLARE_ALIGNED_ARRAY(16, tran_low_t, dqcoeff_ptr, 1024); |
279 DECLARE_ALIGNED_ARRAY(16, tran_low_t, ref_qcoeff_ptr, 1024); | 272 DECLARE_ALIGNED_ARRAY(16, tran_low_t, ref_qcoeff_ptr, 1024); |
280 DECLARE_ALIGNED_ARRAY(16, tran_low_t, ref_dqcoeff_ptr, 1024); | 273 DECLARE_ALIGNED_ARRAY(16, tran_low_t, ref_dqcoeff_ptr, 1024); |
281 DECLARE_ALIGNED_ARRAY(16, int16_t, dequant_ptr, 2); | 274 DECLARE_ALIGNED_ARRAY(16, int16_t, dequant_ptr, 2); |
(...skipping 19 matching lines...) Expand all Loading... |
301 for (int j = 0; j < 2; j++) { | 294 for (int j = 0; j < 2; j++) { |
302 zbin_ptr[j] = rnd.Rand16()&mask_; | 295 zbin_ptr[j] = rnd.Rand16()&mask_; |
303 round_ptr[j] = rnd.Rand16(); | 296 round_ptr[j] = rnd.Rand16(); |
304 quant_ptr[j] = rnd.Rand16(); | 297 quant_ptr[j] = rnd.Rand16(); |
305 quant_shift_ptr[j] = rnd.Rand16(); | 298 quant_shift_ptr[j] = rnd.Rand16(); |
306 dequant_ptr[j] = rnd.Rand16(); | 299 dequant_ptr[j] = rnd.Rand16(); |
307 } | 300 } |
308 | 301 |
309 ref_quantize_op_(coeff_ptr, count, skip_block, zbin_ptr, round_ptr, | 302 ref_quantize_op_(coeff_ptr, count, skip_block, zbin_ptr, round_ptr, |
310 quant_ptr, quant_shift_ptr, ref_qcoeff_ptr, | 303 quant_ptr, quant_shift_ptr, ref_qcoeff_ptr, |
311 ref_dqcoeff_ptr, dequant_ptr, zbin_oq_value, | 304 ref_dqcoeff_ptr, dequant_ptr, |
312 ref_eob_ptr, scan_order->scan, scan_order->iscan); | 305 ref_eob_ptr, scan_order->scan, scan_order->iscan); |
313 ASM_REGISTER_STATE_CHECK(quantize_op_(coeff_ptr, count, skip_block, | 306 ASM_REGISTER_STATE_CHECK(quantize_op_(coeff_ptr, count, skip_block, |
314 zbin_ptr, round_ptr, quant_ptr, | 307 zbin_ptr, round_ptr, quant_ptr, |
315 quant_shift_ptr, qcoeff_ptr, | 308 quant_shift_ptr, qcoeff_ptr, |
316 dqcoeff_ptr, dequant_ptr, | 309 dqcoeff_ptr, dequant_ptr, eob_ptr, |
317 zbin_oq_value, eob_ptr, | |
318 scan_order->scan, scan_order->iscan)); | 310 scan_order->scan, scan_order->iscan)); |
319 | 311 |
320 for (int j = 0; j < sz; ++j) { | 312 for (int j = 0; j < sz; ++j) { |
321 err_count += (ref_qcoeff_ptr[j] != qcoeff_ptr[j]) | | 313 err_count += (ref_qcoeff_ptr[j] != qcoeff_ptr[j]) | |
322 (ref_dqcoeff_ptr[j] != dqcoeff_ptr[j]); | 314 (ref_dqcoeff_ptr[j] != dqcoeff_ptr[j]); |
323 } | 315 } |
324 err_count += (*ref_eob_ptr != *eob_ptr); | 316 err_count += (*ref_eob_ptr != *eob_ptr); |
325 if (err_count && !err_count_total) { | 317 if (err_count && !err_count_total) { |
326 first_failure = i; | 318 first_failure = i; |
327 } | 319 } |
(...skipping 20 matching lines...) Expand all Loading... |
348 ::testing::Values( | 340 ::testing::Values( |
349 make_tuple(&vp9_highbd_quantize_b_32x32_sse2, | 341 make_tuple(&vp9_highbd_quantize_b_32x32_sse2, |
350 &vp9_highbd_quantize_b_32x32_c, VPX_BITS_8), | 342 &vp9_highbd_quantize_b_32x32_c, VPX_BITS_8), |
351 make_tuple(&vp9_highbd_quantize_b_32x32_sse2, | 343 make_tuple(&vp9_highbd_quantize_b_32x32_sse2, |
352 &vp9_highbd_quantize_b_32x32_c, VPX_BITS_10), | 344 &vp9_highbd_quantize_b_32x32_c, VPX_BITS_10), |
353 make_tuple(&vp9_highbd_quantize_b_32x32_sse2, | 345 make_tuple(&vp9_highbd_quantize_b_32x32_sse2, |
354 &vp9_highbd_quantize_b_32x32_c, VPX_BITS_12))); | 346 &vp9_highbd_quantize_b_32x32_c, VPX_BITS_12))); |
355 #endif // HAVE_SSE2 | 347 #endif // HAVE_SSE2 |
356 #endif // CONFIG_VP9_HIGHBITDEPTH | 348 #endif // CONFIG_VP9_HIGHBITDEPTH |
357 } // namespace | 349 } // namespace |
OLD | NEW |