blob: f7b093256e69e5481e03d1edfb03d333a0ffcbd1 [file] [log] [blame]
Daniel Kang58156f12012-06-26 18:11:33 -07001/*
Yaowu Xu2ab7ff02016-09-02 12:04:54 -07002 * Copyright (c) 2016, Alliance for Open Media. All rights reserved
Daniel Kang58156f12012-06-26 18:11:33 -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.
10*/
Daniel Kang58156f12012-06-26 18:11:33 -070011
12#include <math.h>
13#include <stdlib.h>
14#include <string.h>
15
16#include "third_party/googletest/src/include/gtest/gtest.h"
Jingning Han097d59c2015-07-29 14:51:36 -070017
Yaowu Xuf883b422016-08-30 14:01:10 -070018#include "./av1_rtcd.h"
19#include "./aom_dsp_rtcd.h"
Jingning Han30d4c5e2013-11-12 12:47:32 -080020#include "test/acm_random.h"
21#include "test/clear_system_state.h"
22#include "test/register_state_check.h"
Yi Luo267f73a2016-02-29 09:53:42 -080023#include "test/transform_test_base.h"
Jingning Han30d4c5e2013-11-12 12:47:32 -080024#include "test/util.h"
Yaowu Xuc27fc142016-08-22 16:08:15 -070025#include "av1/common/entropy.h"
Yaowu Xuf883b422016-08-30 14:01:10 -070026#include "aom/aom_codec.h"
27#include "aom/aom_integer.h"
Yaowu Xuc27fc142016-08-22 16:08:15 -070028#include "aom_ports/mem.h"
James Zern002ad402014-01-18 13:03:31 -080029
Yaowu Xuc27fc142016-08-22 16:08:15 -070030using libaom_test::ACMRandom;
Daniel Kang26641c72012-06-28 16:26:31 -070031
Daniel Kang58156f12012-06-26 18:11:33 -070032namespace {
Deb Mukherjee10783d42014-09-02 16:34:09 -070033typedef void (*FdctFunc)(const int16_t *in, tran_low_t *out, int stride);
34typedef void (*IdctFunc)(const tran_low_t *in, uint8_t *out, int stride);
Deb Mukherjee10783d42014-09-02 16:34:09 -070035typedef void (*IhtFunc)(const tran_low_t *in, uint8_t *out, int stride,
James Zernb8b3dd92014-07-16 18:55:40 -070036 int tx_type);
Yaowu Xuc27fc142016-08-22 16:08:15 -070037using libaom_test::FhtFunc;
Jingning Han30d4c5e2013-11-12 12:47:32 -080038
Yaowu Xuf883b422016-08-30 14:01:10 -070039typedef std::tr1::tuple<FdctFunc, IdctFunc, int, aom_bit_depth_t, int>
clang-format3a826f12016-08-11 17:46:05 -070040 Dct4x4Param;
Yaowu Xuf883b422016-08-30 14:01:10 -070041typedef std::tr1::tuple<FhtFunc, IhtFunc, int, aom_bit_depth_t, int> Ht4x4Param;
Joshua Litt51490e52013-11-18 17:07:55 -080042
Deb Mukherjee10783d42014-09-02 16:34:09 -070043void fdct4x4_ref(const int16_t *in, tran_low_t *out, int stride,
James Zerncffef112016-02-11 18:27:00 -080044 int /*tx_type*/) {
Yaowu Xuf883b422016-08-30 14:01:10 -070045 aom_fdct4x4_c(in, out, stride);
Jingning Han362809d2013-06-18 10:46:33 -070046}
Jingning Han30d4c5e2013-11-12 12:47:32 -080047
Deb Mukherjee10783d42014-09-02 16:34:09 -070048void fht4x4_ref(const int16_t *in, tran_low_t *out, int stride, int tx_type) {
Yaowu Xuf883b422016-08-30 14:01:10 -070049 av1_fht4x4_c(in, out, stride, tx_type);
Jingning Han362809d2013-06-18 10:46:33 -070050}
Daniel Kang58156f12012-06-26 18:11:33 -070051
Deb Mukherjee10783d42014-09-02 16:34:09 -070052void fwht4x4_ref(const int16_t *in, tran_low_t *out, int stride,
James Zerncffef112016-02-11 18:27:00 -080053 int /*tx_type*/) {
Yaowu Xuf883b422016-08-30 14:01:10 -070054 av1_fwht4x4_c(in, out, stride);
Alex Converse9f9f87c2014-05-05 13:50:12 -070055}
56
Yaowu Xuf883b422016-08-30 14:01:10 -070057#if CONFIG_AOM_HIGHBITDEPTH
Deb Mukherjee10783d42014-09-02 16:34:09 -070058void idct4x4_10(const tran_low_t *in, uint8_t *out, int stride) {
Yaowu Xuf883b422016-08-30 14:01:10 -070059 aom_highbd_idct4x4_16_add_c(in, out, stride, 10);
Deb Mukherjee10783d42014-09-02 16:34:09 -070060}
61
62void idct4x4_12(const tran_low_t *in, uint8_t *out, int stride) {
Yaowu Xuf883b422016-08-30 14:01:10 -070063 aom_highbd_idct4x4_16_add_c(in, out, stride, 12);
Deb Mukherjee10783d42014-09-02 16:34:09 -070064}
65
66void iht4x4_10(const tran_low_t *in, uint8_t *out, int stride, int tx_type) {
Yaowu Xuf883b422016-08-30 14:01:10 -070067 av1_highbd_iht4x4_16_add_c(in, out, stride, tx_type, 10);
Deb Mukherjee10783d42014-09-02 16:34:09 -070068}
69
70void iht4x4_12(const tran_low_t *in, uint8_t *out, int stride, int tx_type) {
Yaowu Xuf883b422016-08-30 14:01:10 -070071 av1_highbd_iht4x4_16_add_c(in, out, stride, tx_type, 12);
Deb Mukherjee10783d42014-09-02 16:34:09 -070072}
73
74void iwht4x4_10(const tran_low_t *in, uint8_t *out, int stride) {
Yaowu Xuf883b422016-08-30 14:01:10 -070075 aom_highbd_iwht4x4_16_add_c(in, out, stride, 10);
Deb Mukherjee10783d42014-09-02 16:34:09 -070076}
77
78void iwht4x4_12(const tran_low_t *in, uint8_t *out, int stride) {
Yaowu Xuf883b422016-08-30 14:01:10 -070079 aom_highbd_iwht4x4_16_add_c(in, out, stride, 12);
Deb Mukherjee10783d42014-09-02 16:34:09 -070080}
Peter de Rivaz7e40a552014-10-24 08:48:02 +010081
82#if HAVE_SSE2
83void idct4x4_10_sse2(const tran_low_t *in, uint8_t *out, int stride) {
Yaowu Xuf883b422016-08-30 14:01:10 -070084 aom_highbd_idct4x4_16_add_sse2(in, out, stride, 10);
Peter de Rivaz7e40a552014-10-24 08:48:02 +010085}
86
87void idct4x4_12_sse2(const tran_low_t *in, uint8_t *out, int stride) {
Yaowu Xuf883b422016-08-30 14:01:10 -070088 aom_highbd_idct4x4_16_add_sse2(in, out, stride, 12);
Peter de Rivaz7e40a552014-10-24 08:48:02 +010089}
90#endif // HAVE_SSE2
Yaowu Xuf883b422016-08-30 14:01:10 -070091#endif // CONFIG_AOM_HIGHBITDEPTH
Deb Mukherjee10783d42014-09-02 16:34:09 -070092
Yaowu Xuc27fc142016-08-22 16:08:15 -070093class Trans4x4DCT : public libaom_test::TransformTestBase,
clang-format3a826f12016-08-11 17:46:05 -070094 public ::testing::TestWithParam<Dct4x4Param> {
Jingning Han30d4c5e2013-11-12 12:47:32 -080095 public:
96 virtual ~Trans4x4DCT() {}
Daniel Kang58156f12012-06-26 18:11:33 -070097
Jingning Han30d4c5e2013-11-12 12:47:32 -080098 virtual void SetUp() {
99 fwd_txfm_ = GET_PARAM(0);
100 inv_txfm_ = GET_PARAM(1);
clang-format3a826f12016-08-11 17:46:05 -0700101 tx_type_ = GET_PARAM(2);
102 pitch_ = 4;
David Barker78250222016-10-13 15:10:14 +0100103 height_ = 4;
Jingning Han30d4c5e2013-11-12 12:47:32 -0800104 fwd_txfm_ref = fdct4x4_ref;
Deb Mukherjee10783d42014-09-02 16:34:09 -0700105 bit_depth_ = GET_PARAM(3);
106 mask_ = (1 << bit_depth_) - 1;
Yi Luo267f73a2016-02-29 09:53:42 -0800107 num_coeffs_ = GET_PARAM(4);
Jingning Han30d4c5e2013-11-12 12:47:32 -0800108 }
Yaowu Xuc27fc142016-08-22 16:08:15 -0700109 virtual void TearDown() { libaom_test::ClearSystemState(); }
Daniel Kang58156f12012-06-26 18:11:33 -0700110
Jingning Han30d4c5e2013-11-12 12:47:32 -0800111 protected:
Deb Mukherjee10783d42014-09-02 16:34:09 -0700112 void RunFwdTxfm(const int16_t *in, tran_low_t *out, int stride) {
Jingning Han30d4c5e2013-11-12 12:47:32 -0800113 fwd_txfm_(in, out, stride);
114 }
Deb Mukherjee10783d42014-09-02 16:34:09 -0700115 void RunInvTxfm(const tran_low_t *out, uint8_t *dst, int stride) {
Jingning Han30d4c5e2013-11-12 12:47:32 -0800116 inv_txfm_(out, dst, stride);
Daniel Kang58156f12012-06-26 18:11:33 -0700117 }
118
James Zernb8b3dd92014-07-16 18:55:40 -0700119 FdctFunc fwd_txfm_;
120 IdctFunc inv_txfm_;
Jingning Han30d4c5e2013-11-12 12:47:32 -0800121};
Daniel Kang58156f12012-06-26 18:11:33 -0700122
clang-format3a826f12016-08-11 17:46:05 -0700123TEST_P(Trans4x4DCT, AccuracyCheck) { RunAccuracyCheck(1); }
Daniel Kang58156f12012-06-26 18:11:33 -0700124
clang-format3a826f12016-08-11 17:46:05 -0700125TEST_P(Trans4x4DCT, CoeffCheck) { RunCoeffCheck(); }
Daniel Kang58156f12012-06-26 18:11:33 -0700126
clang-format3a826f12016-08-11 17:46:05 -0700127TEST_P(Trans4x4DCT, MemCheck) { RunMemCheck(); }
Jingning Han30d4c5e2013-11-12 12:47:32 -0800128
clang-format3a826f12016-08-11 17:46:05 -0700129TEST_P(Trans4x4DCT, InvAccuracyCheck) { RunInvAccuracyCheck(1); }
Jingning Han30d4c5e2013-11-12 12:47:32 -0800130
Yaowu Xuc27fc142016-08-22 16:08:15 -0700131class Trans4x4HT : public libaom_test::TransformTestBase,
clang-format3a826f12016-08-11 17:46:05 -0700132 public ::testing::TestWithParam<Ht4x4Param> {
Jingning Han30d4c5e2013-11-12 12:47:32 -0800133 public:
134 virtual ~Trans4x4HT() {}
135
136 virtual void SetUp() {
137 fwd_txfm_ = GET_PARAM(0);
138 inv_txfm_ = GET_PARAM(1);
clang-format3a826f12016-08-11 17:46:05 -0700139 tx_type_ = GET_PARAM(2);
140 pitch_ = 4;
David Barker78250222016-10-13 15:10:14 +0100141 height_ = 4;
Jingning Han30d4c5e2013-11-12 12:47:32 -0800142 fwd_txfm_ref = fht4x4_ref;
Deb Mukherjee10783d42014-09-02 16:34:09 -0700143 bit_depth_ = GET_PARAM(3);
144 mask_ = (1 << bit_depth_) - 1;
Yi Luo267f73a2016-02-29 09:53:42 -0800145 num_coeffs_ = GET_PARAM(4);
Jingning Han30d4c5e2013-11-12 12:47:32 -0800146 }
Yaowu Xuc27fc142016-08-22 16:08:15 -0700147 virtual void TearDown() { libaom_test::ClearSystemState(); }
Jingning Han30d4c5e2013-11-12 12:47:32 -0800148
149 protected:
Deb Mukherjee10783d42014-09-02 16:34:09 -0700150 void RunFwdTxfm(const int16_t *in, tran_low_t *out, int stride) {
Jingning Han30d4c5e2013-11-12 12:47:32 -0800151 fwd_txfm_(in, out, stride, tx_type_);
152 }
153
Deb Mukherjee10783d42014-09-02 16:34:09 -0700154 void RunInvTxfm(const tran_low_t *out, uint8_t *dst, int stride) {
Jingning Han30d4c5e2013-11-12 12:47:32 -0800155 inv_txfm_(out, dst, stride, tx_type_);
156 }
157
James Zernb8b3dd92014-07-16 18:55:40 -0700158 FhtFunc fwd_txfm_;
159 IhtFunc inv_txfm_;
Jingning Han30d4c5e2013-11-12 12:47:32 -0800160};
161
clang-format3a826f12016-08-11 17:46:05 -0700162TEST_P(Trans4x4HT, AccuracyCheck) { RunAccuracyCheck(1); }
Jingning Han30d4c5e2013-11-12 12:47:32 -0800163
clang-format3a826f12016-08-11 17:46:05 -0700164TEST_P(Trans4x4HT, CoeffCheck) { RunCoeffCheck(); }
Jingning Han30d4c5e2013-11-12 12:47:32 -0800165
clang-format3a826f12016-08-11 17:46:05 -0700166TEST_P(Trans4x4HT, MemCheck) { RunMemCheck(); }
Jingning Han30d4c5e2013-11-12 12:47:32 -0800167
clang-format3a826f12016-08-11 17:46:05 -0700168TEST_P(Trans4x4HT, InvAccuracyCheck) { RunInvAccuracyCheck(1); }
Jingning Han30d4c5e2013-11-12 12:47:32 -0800169
Yaowu Xuc27fc142016-08-22 16:08:15 -0700170class Trans4x4WHT : public libaom_test::TransformTestBase,
clang-format3a826f12016-08-11 17:46:05 -0700171 public ::testing::TestWithParam<Dct4x4Param> {
Alex Converse9f9f87c2014-05-05 13:50:12 -0700172 public:
173 virtual ~Trans4x4WHT() {}
174
175 virtual void SetUp() {
176 fwd_txfm_ = GET_PARAM(0);
177 inv_txfm_ = GET_PARAM(1);
clang-format3a826f12016-08-11 17:46:05 -0700178 tx_type_ = GET_PARAM(2);
179 pitch_ = 4;
David Barker78250222016-10-13 15:10:14 +0100180 height_ = 4;
Alex Converse9f9f87c2014-05-05 13:50:12 -0700181 fwd_txfm_ref = fwht4x4_ref;
Deb Mukherjee10783d42014-09-02 16:34:09 -0700182 bit_depth_ = GET_PARAM(3);
183 mask_ = (1 << bit_depth_) - 1;
Yi Luo267f73a2016-02-29 09:53:42 -0800184 num_coeffs_ = GET_PARAM(4);
Alex Converse9f9f87c2014-05-05 13:50:12 -0700185 }
Yaowu Xuc27fc142016-08-22 16:08:15 -0700186 virtual void TearDown() { libaom_test::ClearSystemState(); }
Alex Converse9f9f87c2014-05-05 13:50:12 -0700187
188 protected:
Deb Mukherjee10783d42014-09-02 16:34:09 -0700189 void RunFwdTxfm(const int16_t *in, tran_low_t *out, int stride) {
Alex Converse9f9f87c2014-05-05 13:50:12 -0700190 fwd_txfm_(in, out, stride);
191 }
Deb Mukherjee10783d42014-09-02 16:34:09 -0700192 void RunInvTxfm(const tran_low_t *out, uint8_t *dst, int stride) {
Alex Converse9f9f87c2014-05-05 13:50:12 -0700193 inv_txfm_(out, dst, stride);
194 }
195
James Zernb8b3dd92014-07-16 18:55:40 -0700196 FdctFunc fwd_txfm_;
197 IdctFunc inv_txfm_;
Alex Converse9f9f87c2014-05-05 13:50:12 -0700198};
199
clang-format3a826f12016-08-11 17:46:05 -0700200TEST_P(Trans4x4WHT, AccuracyCheck) { RunAccuracyCheck(0); }
Alex Converse9f9f87c2014-05-05 13:50:12 -0700201
clang-format3a826f12016-08-11 17:46:05 -0700202TEST_P(Trans4x4WHT, CoeffCheck) { RunCoeffCheck(); }
Alex Converse9f9f87c2014-05-05 13:50:12 -0700203
clang-format3a826f12016-08-11 17:46:05 -0700204TEST_P(Trans4x4WHT, MemCheck) { RunMemCheck(); }
Alex Converse9f9f87c2014-05-05 13:50:12 -0700205
clang-format3a826f12016-08-11 17:46:05 -0700206TEST_P(Trans4x4WHT, InvAccuracyCheck) { RunInvAccuracyCheck(0); }
Jingning Han30d4c5e2013-11-12 12:47:32 -0800207using std::tr1::make_tuple;
208
Yaowu Xuf883b422016-08-30 14:01:10 -0700209#if CONFIG_AOM_HIGHBITDEPTH
Jingning Han30d4c5e2013-11-12 12:47:32 -0800210INSTANTIATE_TEST_CASE_P(
211 C, Trans4x4DCT,
212 ::testing::Values(
Yaowu Xuf883b422016-08-30 14:01:10 -0700213 make_tuple(&aom_highbd_fdct4x4_c, &idct4x4_10, 0, AOM_BITS_10, 16),
214 make_tuple(&aom_highbd_fdct4x4_c, &idct4x4_12, 0, AOM_BITS_12, 16),
215 make_tuple(&aom_fdct4x4_c, &aom_idct4x4_16_add_c, 0, AOM_BITS_8, 16)));
Deb Mukherjee10783d42014-09-02 16:34:09 -0700216#else
clang-format3a826f12016-08-11 17:46:05 -0700217INSTANTIATE_TEST_CASE_P(C, Trans4x4DCT,
Yaowu Xuf883b422016-08-30 14:01:10 -0700218 ::testing::Values(make_tuple(&aom_fdct4x4_c,
219 &aom_idct4x4_16_add_c, 0,
220 AOM_BITS_8, 16)));
221#endif // CONFIG_AOM_HIGHBITDEPTH
Deb Mukherjee10783d42014-09-02 16:34:09 -0700222
Yaowu Xuf883b422016-08-30 14:01:10 -0700223#if CONFIG_AOM_HIGHBITDEPTH
Jingning Han30d4c5e2013-11-12 12:47:32 -0800224INSTANTIATE_TEST_CASE_P(
225 C, Trans4x4HT,
226 ::testing::Values(
Yaowu Xuf883b422016-08-30 14:01:10 -0700227 make_tuple(&av1_highbd_fht4x4_c, &iht4x4_10, 0, AOM_BITS_10, 16),
228 make_tuple(&av1_highbd_fht4x4_c, &iht4x4_10, 1, AOM_BITS_10, 16),
229 make_tuple(&av1_highbd_fht4x4_c, &iht4x4_10, 2, AOM_BITS_10, 16),
230 make_tuple(&av1_highbd_fht4x4_c, &iht4x4_10, 3, AOM_BITS_10, 16),
231 make_tuple(&av1_highbd_fht4x4_c, &iht4x4_12, 0, AOM_BITS_12, 16),
232 make_tuple(&av1_highbd_fht4x4_c, &iht4x4_12, 1, AOM_BITS_12, 16),
233 make_tuple(&av1_highbd_fht4x4_c, &iht4x4_12, 2, AOM_BITS_12, 16),
234 make_tuple(&av1_highbd_fht4x4_c, &iht4x4_12, 3, AOM_BITS_12, 16),
235 make_tuple(&av1_fht4x4_c, &av1_iht4x4_16_add_c, 0, AOM_BITS_8, 16),
236 make_tuple(&av1_fht4x4_c, &av1_iht4x4_16_add_c, 1, AOM_BITS_8, 16),
237 make_tuple(&av1_fht4x4_c, &av1_iht4x4_16_add_c, 2, AOM_BITS_8, 16),
238 make_tuple(&av1_fht4x4_c, &av1_iht4x4_16_add_c, 3, AOM_BITS_8, 16)));
Deb Mukherjee10783d42014-09-02 16:34:09 -0700239#else
240INSTANTIATE_TEST_CASE_P(
241 C, Trans4x4HT,
242 ::testing::Values(
Yaowu Xuf883b422016-08-30 14:01:10 -0700243 make_tuple(&av1_fht4x4_c, &av1_iht4x4_16_add_c, 0, AOM_BITS_8, 16),
244 make_tuple(&av1_fht4x4_c, &av1_iht4x4_16_add_c, 1, AOM_BITS_8, 16),
245 make_tuple(&av1_fht4x4_c, &av1_iht4x4_16_add_c, 2, AOM_BITS_8, 16),
246 make_tuple(&av1_fht4x4_c, &av1_iht4x4_16_add_c, 3, AOM_BITS_8, 16)));
247#endif // CONFIG_AOM_HIGHBITDEPTH
Deb Mukherjee10783d42014-09-02 16:34:09 -0700248
Yaowu Xuf883b422016-08-30 14:01:10 -0700249#if CONFIG_AOM_HIGHBITDEPTH
Alex Converse9f9f87c2014-05-05 13:50:12 -0700250INSTANTIATE_TEST_CASE_P(
251 C, Trans4x4WHT,
252 ::testing::Values(
Yaowu Xuf883b422016-08-30 14:01:10 -0700253 make_tuple(&av1_highbd_fwht4x4_c, &iwht4x4_10, 0, AOM_BITS_10, 16),
254 make_tuple(&av1_highbd_fwht4x4_c, &iwht4x4_12, 0, AOM_BITS_12, 16),
255 make_tuple(&av1_fwht4x4_c, &aom_iwht4x4_16_add_c, 0, AOM_BITS_8, 16)));
Deb Mukherjee10783d42014-09-02 16:34:09 -0700256#else
clang-format3a826f12016-08-11 17:46:05 -0700257INSTANTIATE_TEST_CASE_P(C, Trans4x4WHT,
Yaowu Xuf883b422016-08-30 14:01:10 -0700258 ::testing::Values(make_tuple(&av1_fwht4x4_c,
259 &aom_iwht4x4_16_add_c, 0,
260 AOM_BITS_8, 16)));
261#endif // CONFIG_AOM_HIGHBITDEPTH
Jingning Han30d4c5e2013-11-12 12:47:32 -0800262
Yaowu Xuf883b422016-08-30 14:01:10 -0700263#if HAVE_NEON_ASM && !CONFIG_AOM_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
clang-format3a826f12016-08-11 17:46:05 -0700264INSTANTIATE_TEST_CASE_P(NEON, Trans4x4DCT,
Yaowu Xuf883b422016-08-30 14:01:10 -0700265 ::testing::Values(make_tuple(&aom_fdct4x4_c,
266 &aom_idct4x4_16_add_neon,
267 0, AOM_BITS_8, 16)));
268#endif // HAVE_NEON_ASM && !CONFIG_AOM_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
James Yu6b710132014-01-27 18:38:35 +0800269
Yaowu Xuf883b422016-08-30 14:01:10 -0700270#if HAVE_NEON && !CONFIG_AOM_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
James Zern08c31802014-02-25 23:11:49 -0800271INSTANTIATE_TEST_CASE_P(
James Yu6b710132014-01-27 18:38:35 +0800272 NEON, Trans4x4HT,
James Zern08c31802014-02-25 23:11:49 -0800273 ::testing::Values(
Yaowu Xuf883b422016-08-30 14:01:10 -0700274 make_tuple(&av1_fht4x4_c, &av1_iht4x4_16_add_neon, 0, AOM_BITS_8, 16),
275 make_tuple(&av1_fht4x4_c, &av1_iht4x4_16_add_neon, 1, AOM_BITS_8, 16),
276 make_tuple(&av1_fht4x4_c, &av1_iht4x4_16_add_neon, 2, AOM_BITS_8, 16),
277 make_tuple(&av1_fht4x4_c, &av1_iht4x4_16_add_neon, 3, AOM_BITS_8, 16)));
278#endif // HAVE_NEON && !CONFIG_AOM_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
James Zern08c31802014-02-25 23:11:49 -0800279
Johann2967bf32016-06-22 16:08:10 -0700280#if HAVE_SSE2 && !CONFIG_EMULATE_HARDWARE
Alex Conversed8426d62015-07-13 11:12:45 -0700281INSTANTIATE_TEST_CASE_P(
282 SSE2, Trans4x4WHT,
Yaowu Xuf883b422016-08-30 14:01:10 -0700283 ::testing::Values(make_tuple(&av1_fwht4x4_c, &aom_iwht4x4_16_add_c, 0,
284 AOM_BITS_8, 16),
285 make_tuple(&av1_fwht4x4_c, &aom_iwht4x4_16_add_sse2, 0,
286 AOM_BITS_8, 16)));
Alex Conversed8426d62015-07-13 11:12:45 -0700287#endif
288
Yaowu Xuf883b422016-08-30 14:01:10 -0700289#if HAVE_SSE2 && !CONFIG_AOM_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
clang-format3a826f12016-08-11 17:46:05 -0700290INSTANTIATE_TEST_CASE_P(SSE2, Trans4x4DCT,
Yaowu Xuf883b422016-08-30 14:01:10 -0700291 ::testing::Values(make_tuple(&aom_fdct4x4_sse2,
292 &aom_idct4x4_16_add_sse2,
293 0, AOM_BITS_8, 16)));
Jingning Han30d4c5e2013-11-12 12:47:32 -0800294INSTANTIATE_TEST_CASE_P(
295 SSE2, Trans4x4HT,
Yaowu Xuf883b422016-08-30 14:01:10 -0700296 ::testing::Values(make_tuple(&av1_fht4x4_sse2, &av1_iht4x4_16_add_sse2, 0,
297 AOM_BITS_8, 16),
298 make_tuple(&av1_fht4x4_sse2, &av1_iht4x4_16_add_sse2, 1,
299 AOM_BITS_8, 16),
300 make_tuple(&av1_fht4x4_sse2, &av1_iht4x4_16_add_sse2, 2,
301 AOM_BITS_8, 16),
302 make_tuple(&av1_fht4x4_sse2, &av1_iht4x4_16_add_sse2, 3,
303 AOM_BITS_8, 16)));
304#endif // HAVE_SSE2 && !CONFIG_AOM_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
Jingning Han30d4c5e2013-11-12 12:47:32 -0800305
Yaowu Xuf883b422016-08-30 14:01:10 -0700306#if HAVE_SSE2 && CONFIG_AOM_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
Peter de Rivaz7e40a552014-10-24 08:48:02 +0100307INSTANTIATE_TEST_CASE_P(
308 SSE2, Trans4x4DCT,
309 ::testing::Values(
Yaowu Xuf883b422016-08-30 14:01:10 -0700310 make_tuple(&aom_highbd_fdct4x4_c, &idct4x4_10_sse2, 0, AOM_BITS_10, 16),
311 make_tuple(&aom_highbd_fdct4x4_sse2, &idct4x4_10_sse2, 0, AOM_BITS_10,
clang-format3a826f12016-08-11 17:46:05 -0700312 16),
Yaowu Xuf883b422016-08-30 14:01:10 -0700313 make_tuple(&aom_highbd_fdct4x4_c, &idct4x4_12_sse2, 0, AOM_BITS_12, 16),
314 make_tuple(&aom_highbd_fdct4x4_sse2, &idct4x4_12_sse2, 0, AOM_BITS_12,
clang-format3a826f12016-08-11 17:46:05 -0700315 16),
Yaowu Xuf883b422016-08-30 14:01:10 -0700316 make_tuple(&aom_fdct4x4_sse2, &aom_idct4x4_16_add_c, 0, AOM_BITS_8,
clang-format3a826f12016-08-11 17:46:05 -0700317 16)));
Peter de Rivaz7e40a552014-10-24 08:48:02 +0100318
319INSTANTIATE_TEST_CASE_P(
320 SSE2, Trans4x4HT,
321 ::testing::Values(
Yaowu Xuf883b422016-08-30 14:01:10 -0700322 make_tuple(&av1_fht4x4_sse2, &av1_iht4x4_16_add_c, 0, AOM_BITS_8, 16),
323 make_tuple(&av1_fht4x4_sse2, &av1_iht4x4_16_add_c, 1, AOM_BITS_8, 16),
324 make_tuple(&av1_fht4x4_sse2, &av1_iht4x4_16_add_c, 2, AOM_BITS_8, 16),
325 make_tuple(&av1_fht4x4_sse2, &av1_iht4x4_16_add_c, 3, AOM_BITS_8, 16)));
326#endif // HAVE_SSE2 && CONFIG_AOM_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
Parag Salasakar54a6f732015-06-02 12:16:28 +0530327
Yaowu Xuf883b422016-08-30 14:01:10 -0700328#if HAVE_MSA && !CONFIG_AOM_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
clang-format3a826f12016-08-11 17:46:05 -0700329INSTANTIATE_TEST_CASE_P(MSA, Trans4x4DCT,
Yaowu Xuf883b422016-08-30 14:01:10 -0700330 ::testing::Values(make_tuple(&aom_fdct4x4_msa,
331 &aom_idct4x4_16_add_msa, 0,
332 AOM_BITS_8, 16)));
James Zern1c25b7f2016-08-13 10:58:54 -0700333#if !CONFIG_EXT_TX
Parag Salasakar54a6f732015-06-02 12:16:28 +0530334INSTANTIATE_TEST_CASE_P(
335 MSA, Trans4x4HT,
Yaowu Xuf883b422016-08-30 14:01:10 -0700336 ::testing::Values(
337 make_tuple(&av1_fht4x4_msa, &av1_iht4x4_16_add_msa, 0, AOM_BITS_8, 16),
338 make_tuple(&av1_fht4x4_msa, &av1_iht4x4_16_add_msa, 1, AOM_BITS_8, 16),
339 make_tuple(&av1_fht4x4_msa, &av1_iht4x4_16_add_msa, 2, AOM_BITS_8, 16),
340 make_tuple(&av1_fht4x4_msa, &av1_iht4x4_16_add_msa, 3, AOM_BITS_8,
341 16)));
James Zern1c25b7f2016-08-13 10:58:54 -0700342#endif // !CONFIG_EXT_TX
Yaowu Xuf883b422016-08-30 14:01:10 -0700343#endif // HAVE_MSA && !CONFIG_AOM_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
Daniel Kang58156f12012-06-26 18:11:33 -0700344} // namespace