blob: 586846f975b7b8267929d6a8def7118df6e90af0 [file] [log] [blame]
Yi Luo229690a2016-06-13 17:01:17 -07001/*
Yaowu Xu2ab7ff02016-09-02 12:04:54 -07002 * Copyright (c) 2016, Alliance for Open Media. All rights reserved
Yi Luo229690a2016-06-13 17:01:17 -07003 *
Yaowu Xu2ab7ff02016-09-02 12:04:54 -07004 * This source code is subject to the terms of the BSD 2 Clause License and
5 * the Alliance for Open Media Patent License 1.0. If the BSD 2 Clause License
6 * was not distributed with this source code in the LICENSE file, you can
7 * obtain it at www.aomedia.org/license/software. If the Alliance for Open
8 * Media Patent License 1.0 was not distributed with this source code in the
9 * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
Yi Luo229690a2016-06-13 17:01:17 -070010 */
11
12#include "third_party/googletest/src/include/gtest/gtest.h"
13
Yaowu Xuf883b422016-08-30 14:01:10 -070014#include "./av1_rtcd.h"
Yi Luo229690a2016-06-13 17:01:17 -070015#include "test/acm_random.h"
16#include "test/clear_system_state.h"
17#include "test/register_state_check.h"
18#include "test/util.h"
19
20namespace {
21
22using std::tr1::tuple;
Yaowu Xuc27fc142016-08-22 16:08:15 -070023using libaom_test::ACMRandom;
Yi Luo229690a2016-06-13 17:01:17 -070024
Angie Chiangb2ff17f2017-01-11 17:30:20 -080025typedef void (*ConvInit)();
clang-format3a826f12016-08-11 17:46:05 -070026typedef void (*conv_filter_t)(const uint8_t *, int, uint8_t *, int, int, int,
Angie Chiang674bffd2017-01-11 16:15:55 -080027 const InterpFilterParams, const int, int,
28 ConvolveParams *);
Yaowu Xuf883b422016-08-30 14:01:10 -070029#if CONFIG_AOM_HIGHBITDEPTH
clang-format3a826f12016-08-11 17:46:05 -070030typedef void (*hbd_conv_filter_t)(const uint16_t *, int, uint16_t *, int, int,
31 int, const InterpFilterParams, const int, int,
32 int, int);
Yi Luo8cacca72016-07-08 15:41:59 -070033#endif
34
Yi Luo229690a2016-06-13 17:01:17 -070035// Test parameter list:
Yi Luo81ad9532016-06-21 12:17:39 -070036// <convolve_horiz_func, convolve_vert_func,
37// <width, height>, filter_params, subpel_x_q4, avg>
Yi Luo229690a2016-06-13 17:01:17 -070038typedef tuple<int, int> BlockDimension;
Angie Chiangb2ff17f2017-01-11 17:30:20 -080039typedef tuple<ConvInit, conv_filter_t, conv_filter_t, BlockDimension,
40 InterpFilter, int, int>
clang-format67948d32016-09-07 22:40:40 -070041 ConvParams;
Yaowu Xuf883b422016-08-30 14:01:10 -070042#if CONFIG_AOM_HIGHBITDEPTH
Yi Luo8cacca72016-07-08 15:41:59 -070043// Test parameter list:
44// <convolve_horiz_func, convolve_vert_func,
45// <width, height>, filter_params, subpel_x_q4, avg, bit_dpeth>
46typedef tuple<hbd_conv_filter_t, hbd_conv_filter_t, BlockDimension,
clang-format67948d32016-09-07 22:40:40 -070047 InterpFilter, int, int, int>
48 HbdConvParams;
Yi Luo8cacca72016-07-08 15:41:59 -070049#endif
Yi Luo229690a2016-06-13 17:01:17 -070050
51// Note:
52// src_ and src_ref_ have special boundary requirement
53// dst_ and dst_ref_ don't
54const size_t maxWidth = 256;
55const size_t maxHeight = 256;
56const size_t maxBlockSize = maxWidth * maxHeight;
57const int horizOffset = 32;
58const int vertiOffset = 32;
59const int stride = 128;
60const int x_step_q4 = 16;
61
Yaowu Xuf883b422016-08-30 14:01:10 -070062class AV1ConvolveOptimzTest : public ::testing::TestWithParam<ConvParams> {
Yi Luo229690a2016-06-13 17:01:17 -070063 public:
Yaowu Xuf883b422016-08-30 14:01:10 -070064 virtual ~AV1ConvolveOptimzTest() {}
Yi Luo229690a2016-06-13 17:01:17 -070065 virtual void SetUp() {
Angie Chiangb2ff17f2017-01-11 17:30:20 -080066 ConvInit conv_init = GET_PARAM(0);
67 conv_init();
68 conv_horiz_ = GET_PARAM(1);
69 conv_vert_ = GET_PARAM(2);
70 BlockDimension block = GET_PARAM(3);
Yi Luo229690a2016-06-13 17:01:17 -070071 width_ = std::tr1::get<0>(block);
72 height_ = std::tr1::get<1>(block);
Angie Chiangb2ff17f2017-01-11 17:30:20 -080073 filter_ = GET_PARAM(4);
74 subpel_ = GET_PARAM(5);
Angie Chiang9f45bc42017-01-13 16:27:54 -080075 int ref = GET_PARAM(6);
76 conv_params_ = get_conv_params(ref);
Yi Luo229690a2016-06-13 17:01:17 -070077
78 alloc_ = new uint8_t[maxBlockSize * 4];
79 src_ = alloc_ + (vertiOffset * maxWidth);
80 src_ += horizOffset;
81 src_ref_ = src_ + maxBlockSize;
82
83 dst_ = alloc_ + 2 * maxBlockSize;
84 dst_ref_ = alloc_ + 3 * maxBlockSize;
85 }
86
87 virtual void TearDown() {
88 delete[] alloc_;
Yaowu Xuc27fc142016-08-22 16:08:15 -070089 libaom_test::ClearSystemState();
Yi Luo229690a2016-06-13 17:01:17 -070090 }
91
92 protected:
93 void RunHorizFilterBitExactCheck();
Yi Luo81ad9532016-06-21 12:17:39 -070094 void RunVertFilterBitExactCheck();
Yi Luo229690a2016-06-13 17:01:17 -070095
96 private:
Urvang Joshid71a2312016-07-14 12:33:48 -070097 void PrepFilterBuffer();
Yi Luo8cacca72016-07-08 15:41:59 -070098 void DiffFilterBuffer();
Yi Luo81ad9532016-06-21 12:17:39 -070099 conv_filter_t conv_horiz_;
100 conv_filter_t conv_vert_;
Yi Luo229690a2016-06-13 17:01:17 -0700101 uint8_t *alloc_;
102 uint8_t *src_;
103 uint8_t *dst_;
104 uint8_t *src_ref_;
105 uint8_t *dst_ref_;
106 int width_;
107 int height_;
108 int filter_;
109 int subpel_;
Angie Chiang674bffd2017-01-11 16:15:55 -0800110 ConvolveParams conv_params_;
Yi Luo229690a2016-06-13 17:01:17 -0700111};
112
Urvang Joshid71a2312016-07-14 12:33:48 -0700113void AV1ConvolveOptimzTest::PrepFilterBuffer() {
Yi Luo229690a2016-06-13 17:01:17 -0700114 int r, c;
115 ACMRandom rnd(ACMRandom::DeterministicSeed());
116
Yi Luo81ad9532016-06-21 12:17:39 -0700117 memset(alloc_, 0, 4 * maxBlockSize * sizeof(alloc_[0]));
Yi Luo229690a2016-06-13 17:01:17 -0700118
Yi Luo8cacca72016-07-08 15:41:59 -0700119 uint8_t *src_ptr = src_;
120 uint8_t *dst_ptr = dst_;
121 uint8_t *src_ref_ptr = src_ref_;
122 uint8_t *dst_ref_ptr = dst_ref_;
Yi Luo229690a2016-06-13 17:01:17 -0700123
124 for (r = 0; r < height_; ++r) {
125 for (c = 0; c < width_; ++c) {
126 src_ptr[c] = rnd.Rand8();
127 src_ref_ptr[c] = src_ptr[c];
128 dst_ptr[c] = rnd.Rand8();
129 dst_ref_ptr[c] = dst_ptr[c];
130 }
131 src_ptr += stride;
132 src_ref_ptr += stride;
133 dst_ptr += stride;
134 dst_ref_ptr += stride;
135 }
136}
137
Yaowu Xuf883b422016-08-30 14:01:10 -0700138void AV1ConvolveOptimzTest::DiffFilterBuffer() {
Yi Luo229690a2016-06-13 17:01:17 -0700139 int r, c;
Yi Luo8cacca72016-07-08 15:41:59 -0700140 const uint8_t *dst_ptr = dst_;
141 const uint8_t *dst_ref_ptr = dst_ref_;
142 for (r = 0; r < height_; ++r) {
143 for (c = 0; c < width_; ++c) {
Yi Luo229690a2016-06-13 17:01:17 -0700144 EXPECT_EQ((uint8_t)dst_ref_ptr[c], (uint8_t)dst_ptr[c])
clang-format3a826f12016-08-11 17:46:05 -0700145 << "Error at row: " << r << " col: " << c << " "
146 << "w = " << width_ << " "
147 << "h = " << height_ << " "
148 << "filter group index = " << filter_ << " "
149 << "filter index = " << subpel_;
Yi Luo229690a2016-06-13 17:01:17 -0700150 }
151 dst_ptr += stride;
152 dst_ref_ptr += stride;
153 }
154}
155
Yaowu Xuf883b422016-08-30 14:01:10 -0700156void AV1ConvolveOptimzTest::RunHorizFilterBitExactCheck() {
Urvang Joshid71a2312016-07-14 12:33:48 -0700157 PrepFilterBuffer();
Yi Luo229690a2016-06-13 17:01:17 -0700158
Yaowu Xuf883b422016-08-30 14:01:10 -0700159 InterpFilterParams filter_params = av1_get_interp_filter_params(filter_);
Yi Luo229690a2016-06-13 17:01:17 -0700160
Yaowu Xuf883b422016-08-30 14:01:10 -0700161 av1_convolve_horiz_c(src_ref_, stride, dst_ref_, stride, width_, height_,
Angie Chiang674bffd2017-01-11 16:15:55 -0800162 filter_params, subpel_, x_step_q4, &conv_params_);
Yi Luo229690a2016-06-13 17:01:17 -0700163
clang-format3a826f12016-08-11 17:46:05 -0700164 conv_horiz_(src_, stride, dst_, stride, width_, height_, filter_params,
Angie Chiang674bffd2017-01-11 16:15:55 -0800165 subpel_, x_step_q4, &conv_params_);
Yi Luo229690a2016-06-13 17:01:17 -0700166
Yi Luo8cacca72016-07-08 15:41:59 -0700167 DiffFilterBuffer();
Yi Luo229690a2016-06-13 17:01:17 -0700168
169 // Note:
170 // Here we need calculate a height which is different from the specified one
171 // and test again.
172 int intermediate_height =
173 (((height_ - 1) * 16 + subpel_) >> SUBPEL_BITS) + filter_params.taps;
Urvang Joshid71a2312016-07-14 12:33:48 -0700174 PrepFilterBuffer();
Yi Luo229690a2016-06-13 17:01:17 -0700175
Yaowu Xuf883b422016-08-30 14:01:10 -0700176 av1_convolve_horiz_c(src_ref_, stride, dst_ref_, stride, width_,
177 intermediate_height, filter_params, subpel_, x_step_q4,
Angie Chiang674bffd2017-01-11 16:15:55 -0800178 &conv_params_);
Yi Luo229690a2016-06-13 17:01:17 -0700179
clang-format3a826f12016-08-11 17:46:05 -0700180 conv_horiz_(src_, stride, dst_, stride, width_, intermediate_height,
Angie Chiang674bffd2017-01-11 16:15:55 -0800181 filter_params, subpel_, x_step_q4, &conv_params_);
Yi Luo229690a2016-06-13 17:01:17 -0700182
Yi Luo8cacca72016-07-08 15:41:59 -0700183 DiffFilterBuffer();
Yi Luo229690a2016-06-13 17:01:17 -0700184}
185
Yaowu Xuf883b422016-08-30 14:01:10 -0700186void AV1ConvolveOptimzTest::RunVertFilterBitExactCheck() {
Urvang Joshid71a2312016-07-14 12:33:48 -0700187 PrepFilterBuffer();
Yi Luo81ad9532016-06-21 12:17:39 -0700188
Yaowu Xuf883b422016-08-30 14:01:10 -0700189 InterpFilterParams filter_params = av1_get_interp_filter_params(filter_);
Yi Luo81ad9532016-06-21 12:17:39 -0700190
Yaowu Xuf883b422016-08-30 14:01:10 -0700191 av1_convolve_vert_c(src_ref_, stride, dst_ref_, stride, width_, height_,
Angie Chiang674bffd2017-01-11 16:15:55 -0800192 filter_params, subpel_, x_step_q4, &conv_params_);
Yi Luo81ad9532016-06-21 12:17:39 -0700193
clang-format3a826f12016-08-11 17:46:05 -0700194 conv_vert_(src_, stride, dst_, stride, width_, height_, filter_params,
Angie Chiang674bffd2017-01-11 16:15:55 -0800195 subpel_, x_step_q4, &conv_params_);
Yi Luo81ad9532016-06-21 12:17:39 -0700196
Yi Luo8cacca72016-07-08 15:41:59 -0700197 DiffFilterBuffer();
Yi Luo81ad9532016-06-21 12:17:39 -0700198}
199
Yaowu Xuf883b422016-08-30 14:01:10 -0700200TEST_P(AV1ConvolveOptimzTest, HorizBitExactCheck) {
Yi Luo229690a2016-06-13 17:01:17 -0700201 RunHorizFilterBitExactCheck();
202}
Yaowu Xuf883b422016-08-30 14:01:10 -0700203TEST_P(AV1ConvolveOptimzTest, VerticalBitExactCheck) {
Yi Luo81ad9532016-06-21 12:17:39 -0700204 RunVertFilterBitExactCheck();
205}
Yi Luo229690a2016-06-13 17:01:17 -0700206
207using std::tr1::make_tuple;
208
Angie Chiang1733f6b2017-01-05 09:52:20 -0800209#if (HAVE_SSSE3 || HAVE_SSE4_1) && CONFIG_DUAL_FILTER
Yi Luo229690a2016-06-13 17:01:17 -0700210const BlockDimension kBlockDim[] = {
clang-format3a826f12016-08-11 17:46:05 -0700211 make_tuple(2, 2), make_tuple(2, 4), make_tuple(4, 4),
212 make_tuple(4, 8), make_tuple(8, 4), make_tuple(8, 8),
213 make_tuple(8, 16), make_tuple(16, 8), make_tuple(16, 16),
214 make_tuple(16, 32), make_tuple(32, 16), make_tuple(32, 32),
215 make_tuple(32, 64), make_tuple(64, 32), make_tuple(64, 64),
216 make_tuple(64, 128), make_tuple(128, 64), make_tuple(128, 128),
Yi Luo229690a2016-06-13 17:01:17 -0700217};
Sarah Parker95763742016-06-28 17:13:03 -0700218
Yi Luo229690a2016-06-13 17:01:17 -0700219// 10/12-tap filters
James Zern7b9407a2016-05-18 23:48:05 -0700220const InterpFilter kFilter[] = { 6, 4, 2 };
Yi Luo229690a2016-06-13 17:01:17 -0700221
clang-format3a826f12016-08-11 17:46:05 -0700222const int kSubpelQ4[] = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 };
Yi Luo229690a2016-06-13 17:01:17 -0700223
clang-format3a826f12016-08-11 17:46:05 -0700224const int kAvg[] = { 0, 1 };
Yi Luo8cacca72016-07-08 15:41:59 -0700225#endif
Yi Luo229690a2016-06-13 17:01:17 -0700226
Angie Chiang1733f6b2017-01-05 09:52:20 -0800227#if HAVE_SSSE3 && CONFIG_DUAL_FILTER
Yi Luo229690a2016-06-13 17:01:17 -0700228INSTANTIATE_TEST_CASE_P(
Yaowu Xuf883b422016-08-30 14:01:10 -0700229 SSSE3, AV1ConvolveOptimzTest,
Angie Chiangb2ff17f2017-01-11 17:30:20 -0800230 ::testing::Combine(::testing::Values(av1_convolve_init_ssse3),
231 ::testing::Values(av1_convolve_horiz_ssse3),
Yaowu Xuf883b422016-08-30 14:01:10 -0700232 ::testing::Values(av1_convolve_vert_ssse3),
clang-format3a826f12016-08-11 17:46:05 -0700233 ::testing::ValuesIn(kBlockDim),
234 ::testing::ValuesIn(kFilter),
235 ::testing::ValuesIn(kSubpelQ4),
236 ::testing::ValuesIn(kAvg)));
Angie Chiang1733f6b2017-01-05 09:52:20 -0800237#endif // HAVE_SSSE3 && CONFIG_DUAL_FILTER
Yi Luo8cacca72016-07-08 15:41:59 -0700238
Yaowu Xuf883b422016-08-30 14:01:10 -0700239#if CONFIG_AOM_HIGHBITDEPTH
Yi Luo8cacca72016-07-08 15:41:59 -0700240typedef ::testing::TestWithParam<HbdConvParams> TestWithHbdConvParams;
Yaowu Xuf883b422016-08-30 14:01:10 -0700241class AV1HbdConvolveOptimzTest : public TestWithHbdConvParams {
Yi Luo8cacca72016-07-08 15:41:59 -0700242 public:
Yaowu Xuf883b422016-08-30 14:01:10 -0700243 virtual ~AV1HbdConvolveOptimzTest() {}
Yi Luo8cacca72016-07-08 15:41:59 -0700244 virtual void SetUp() {
245 conv_horiz_ = GET_PARAM(0);
246 conv_vert_ = GET_PARAM(1);
247 BlockDimension block = GET_PARAM(2);
248 width_ = std::tr1::get<0>(block);
249 height_ = std::tr1::get<1>(block);
250 filter_ = GET_PARAM(3);
251 subpel_ = GET_PARAM(4);
252 avg_ = GET_PARAM(5);
253 bit_depth_ = GET_PARAM(6);
254
255 alloc_ = new uint16_t[maxBlockSize * 4];
256 src_ = alloc_ + (vertiOffset * maxWidth);
257 src_ += horizOffset;
258 src_ref_ = src_ + maxBlockSize;
259
260 dst_ = alloc_ + 2 * maxBlockSize;
261 dst_ref_ = alloc_ + 3 * maxBlockSize;
262 }
263
264 virtual void TearDown() {
265 delete[] alloc_;
Yaowu Xuc27fc142016-08-22 16:08:15 -0700266 libaom_test::ClearSystemState();
Yi Luo8cacca72016-07-08 15:41:59 -0700267 }
268
269 protected:
270 void RunHorizFilterBitExactCheck();
271 void RunVertFilterBitExactCheck();
272
273 private:
Urvang Joshid71a2312016-07-14 12:33:48 -0700274 void PrepFilterBuffer();
Yi Luo8cacca72016-07-08 15:41:59 -0700275 void DiffFilterBuffer();
276 hbd_conv_filter_t conv_horiz_;
277 hbd_conv_filter_t conv_vert_;
278 uint16_t *alloc_;
279 uint16_t *src_;
280 uint16_t *dst_;
281 uint16_t *src_ref_;
282 uint16_t *dst_ref_;
283 int width_;
284 int height_;
285 int filter_;
286 int subpel_;
287 int avg_;
288 int bit_depth_;
289};
290
Urvang Joshid71a2312016-07-14 12:33:48 -0700291void AV1HbdConvolveOptimzTest::PrepFilterBuffer() {
Yi Luo8cacca72016-07-08 15:41:59 -0700292 int r, c;
293 ACMRandom rnd(ACMRandom::DeterministicSeed());
294
295 memset(alloc_, 0, 4 * maxBlockSize * sizeof(alloc_[0]));
296
297 uint16_t *src_ptr = src_;
298 uint16_t *dst_ptr = dst_;
299 uint16_t *dst_ref_ptr = dst_ref_;
300 uint16_t hbd_mask = (1 << bit_depth_) - 1;
301
302 for (r = 0; r < height_; ++r) {
303 for (c = 0; c < width_; ++c) {
304 src_ptr[c] = rnd.Rand16() & hbd_mask;
305 dst_ptr[c] = rnd.Rand16() & hbd_mask;
306 dst_ref_ptr[c] = dst_ptr[c];
307 }
308 src_ptr += stride;
309 dst_ptr += stride;
310 dst_ref_ptr += stride;
311 }
312}
313
Yaowu Xuf883b422016-08-30 14:01:10 -0700314void AV1HbdConvolveOptimzTest::DiffFilterBuffer() {
Yi Luo8cacca72016-07-08 15:41:59 -0700315 int r, c;
316 const uint16_t *dst_ptr = dst_;
317 const uint16_t *dst_ref_ptr = dst_ref_;
318 for (r = 0; r < height_; ++r) {
319 for (c = 0; c < width_; ++c) {
320 EXPECT_EQ((uint16_t)dst_ref_ptr[c], (uint16_t)dst_ptr[c])
clang-format3a826f12016-08-11 17:46:05 -0700321 << "Error at row: " << r << " col: " << c << " "
322 << "w = " << width_ << " "
323 << "h = " << height_ << " "
324 << "filter group index = " << filter_ << " "
325 << "filter index = " << subpel_ << " "
326 << "bit depth = " << bit_depth_;
Yi Luo8cacca72016-07-08 15:41:59 -0700327 }
328 dst_ptr += stride;
329 dst_ref_ptr += stride;
330 }
331}
332
Yaowu Xuf883b422016-08-30 14:01:10 -0700333void AV1HbdConvolveOptimzTest::RunHorizFilterBitExactCheck() {
Urvang Joshid71a2312016-07-14 12:33:48 -0700334 PrepFilterBuffer();
Yi Luo8cacca72016-07-08 15:41:59 -0700335
Yaowu Xuf883b422016-08-30 14:01:10 -0700336 InterpFilterParams filter_params = av1_get_interp_filter_params(filter_);
Yi Luo8cacca72016-07-08 15:41:59 -0700337
Yaowu Xuf883b422016-08-30 14:01:10 -0700338 av1_highbd_convolve_horiz_c(src_, stride, dst_ref_, stride, width_, height_,
339 filter_params, subpel_, x_step_q4, avg_,
340 bit_depth_);
Yi Luo8cacca72016-07-08 15:41:59 -0700341
clang-format3a826f12016-08-11 17:46:05 -0700342 conv_horiz_(src_, stride, dst_, stride, width_, height_, filter_params,
343 subpel_, x_step_q4, avg_, bit_depth_);
Yi Luo8cacca72016-07-08 15:41:59 -0700344
345 DiffFilterBuffer();
346
347 // Note:
348 // Here we need calculate a height which is different from the specified one
349 // and test again.
350 int intermediate_height =
351 (((height_ - 1) * 16 + subpel_) >> SUBPEL_BITS) + filter_params.taps;
Urvang Joshid71a2312016-07-14 12:33:48 -0700352 PrepFilterBuffer();
Yi Luo8cacca72016-07-08 15:41:59 -0700353
Yaowu Xuf883b422016-08-30 14:01:10 -0700354 av1_highbd_convolve_horiz_c(src_, stride, dst_ref_, stride, width_,
355 intermediate_height, filter_params, subpel_,
356 x_step_q4, avg_, bit_depth_);
Yi Luo8cacca72016-07-08 15:41:59 -0700357
358 conv_horiz_(src_, stride, dst_, stride, width_, intermediate_height,
359 filter_params, subpel_, x_step_q4, avg_, bit_depth_);
360
361 DiffFilterBuffer();
362}
363
Yaowu Xuf883b422016-08-30 14:01:10 -0700364void AV1HbdConvolveOptimzTest::RunVertFilterBitExactCheck() {
Urvang Joshid71a2312016-07-14 12:33:48 -0700365 PrepFilterBuffer();
Yi Luo8cacca72016-07-08 15:41:59 -0700366
Yaowu Xuf883b422016-08-30 14:01:10 -0700367 InterpFilterParams filter_params = av1_get_interp_filter_params(filter_);
Yi Luo8cacca72016-07-08 15:41:59 -0700368
Yaowu Xuf883b422016-08-30 14:01:10 -0700369 av1_highbd_convolve_vert_c(src_, stride, dst_ref_, stride, width_, height_,
370 filter_params, subpel_, x_step_q4, avg_,
371 bit_depth_);
Yi Luo8cacca72016-07-08 15:41:59 -0700372
clang-format3a826f12016-08-11 17:46:05 -0700373 conv_vert_(src_, stride, dst_, stride, width_, height_, filter_params,
374 subpel_, x_step_q4, avg_, bit_depth_);
Yi Luo8cacca72016-07-08 15:41:59 -0700375
376 DiffFilterBuffer();
377}
378
Yaowu Xuf883b422016-08-30 14:01:10 -0700379TEST_P(AV1HbdConvolveOptimzTest, HorizBitExactCheck) {
Yi Luo8cacca72016-07-08 15:41:59 -0700380 RunHorizFilterBitExactCheck();
381}
Yaowu Xuf883b422016-08-30 14:01:10 -0700382TEST_P(AV1HbdConvolveOptimzTest, VertBitExactCheck) {
Yi Luo8cacca72016-07-08 15:41:59 -0700383 RunVertFilterBitExactCheck();
384}
385
Angie Chiang1733f6b2017-01-05 09:52:20 -0800386#if HAVE_SSE4_1 && CONFIG_DUAL_FILTER
Yi Luo8cacca72016-07-08 15:41:59 -0700387
clang-format3a826f12016-08-11 17:46:05 -0700388const int kBitdepth[] = { 10, 12 };
Yi Luo8cacca72016-07-08 15:41:59 -0700389
390INSTANTIATE_TEST_CASE_P(
Yaowu Xuf883b422016-08-30 14:01:10 -0700391 SSE4_1, AV1HbdConvolveOptimzTest,
392 ::testing::Combine(::testing::Values(av1_highbd_convolve_horiz_sse4_1),
393 ::testing::Values(av1_highbd_convolve_vert_sse4_1),
clang-format3a826f12016-08-11 17:46:05 -0700394 ::testing::ValuesIn(kBlockDim),
395 ::testing::ValuesIn(kFilter),
396 ::testing::ValuesIn(kSubpelQ4),
397 ::testing::ValuesIn(kAvg),
398 ::testing::ValuesIn(kBitdepth)));
Angie Chiang1733f6b2017-01-05 09:52:20 -0800399#endif // HAVE_SSE4_1 && CONFIG_DUAL_FILTER
Yaowu Xuf883b422016-08-30 14:01:10 -0700400#endif // CONFIG_AOM_HIGHBITDEPTH
Yi Luo229690a2016-06-13 17:01:17 -0700401} // namespace