Add ssse3 aom_smooth_h_predictor_4xh
[aom.git] / test / hiprec_convolve_test_util.h
blobaac93b4a4861de938ee7eedd81206c487cd10817
1 /*
2 * Copyright (c) 2016, Alliance for Open Media. All rights reserved
4 * 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.
12 #ifndef TEST_HIPREC_CONVOLVE_TEST_UTIL_H_
13 #define TEST_HIPREC_CONVOLVE_TEST_UTIL_H_
15 #include "test/acm_random.h"
16 #include "test/util.h"
17 #include "test/clear_system_state.h"
18 #include "test/register_state_check.h"
19 #include "third_party/googletest/src/googletest/include/gtest/gtest.h"
21 #include "./av1_rtcd.h"
22 #include "aom_ports/aom_timer.h"
23 #include "av1/common/convolve.h"
24 #include "av1/common/mv.h"
26 namespace libaom_test {
28 namespace AV1HiprecConvolve {
30 typedef void (*hiprec_convolve_func)(const uint8_t *src, ptrdiff_t src_stride,
31 uint8_t *dst, ptrdiff_t dst_stride,
32 const int16_t *filter_x, int x_step_q4,
33 const int16_t *filter_y, int y_step_q4,
34 int w, int h,
35 const ConvolveParams *conv_params);
37 typedef std::tr1::tuple<int, int, int, hiprec_convolve_func>
38 HiprecConvolveParam;
40 ::testing::internal::ParamGenerator<HiprecConvolveParam> BuildParams(
41 hiprec_convolve_func filter);
43 class AV1HiprecConvolveTest
44 : public ::testing::TestWithParam<HiprecConvolveParam> {
45 public:
46 virtual ~AV1HiprecConvolveTest();
47 virtual void SetUp();
49 virtual void TearDown();
51 protected:
52 void RunCheckOutput(hiprec_convolve_func test_impl);
53 void RunSpeedTest(hiprec_convolve_func test_impl);
55 libaom_test::ACMRandom rnd_;
58 } // namespace AV1HiprecConvolve
60 namespace AV1HighbdHiprecConvolve {
61 typedef void (*highbd_hiprec_convolve_func)(
62 const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst,
63 ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4,
64 const int16_t *filter_y, int y_step_q4, int w, int h,
65 const ConvolveParams *conv_params, int bps);
67 typedef std::tr1::tuple<int, int, int, int, highbd_hiprec_convolve_func>
68 HighbdHiprecConvolveParam;
70 ::testing::internal::ParamGenerator<HighbdHiprecConvolveParam> BuildParams(
71 highbd_hiprec_convolve_func filter);
73 class AV1HighbdHiprecConvolveTest
74 : public ::testing::TestWithParam<HighbdHiprecConvolveParam> {
75 public:
76 virtual ~AV1HighbdHiprecConvolveTest();
77 virtual void SetUp();
79 virtual void TearDown();
81 protected:
82 void RunCheckOutput(highbd_hiprec_convolve_func test_impl);
83 void RunSpeedTest(highbd_hiprec_convolve_func test_impl);
85 libaom_test::ACMRandom rnd_;
88 } // namespace AV1HighbdHiprecConvolve
90 } // namespace libaom_test
92 #endif // TEST_HIPREC_CONVOLVE_TEST_UTIL_H_