blob: f98a730bce3e4d7fa4970845cee1f03b6a86fbf9 [file] [log] [blame]
James Zern0d2f3482015-05-11 19:36:59 -07001/*
Yaowu Xu9c01aa12016-09-01 14:32:49 -07002 * Copyright (c) 2016, Alliance for Open Media. All rights reserved
James Zern0d2f3482015-05-11 19:36:59 -07003 *
Yaowu Xu9c01aa12016-09-01 14:32:49 -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*/
11
Yaowu Xuf883b422016-08-30 14:01:10 -070012// Test and time AOM intra-predictor functions
James Zern0d2f3482015-05-11 19:36:59 -070013
14#include <stdio.h>
15#include <string.h>
16
17#include "third_party/googletest/src/include/gtest/gtest.h"
18
Yaowu Xuf883b422016-08-30 14:01:10 -070019#include "./aom_dsp_rtcd.h"
James Zern0d2f3482015-05-11 19:36:59 -070020#include "test/acm_random.h"
James Zern1898d132015-06-10 12:44:07 -070021#include "test/clear_system_state.h"
James Zern0d2f3482015-05-11 19:36:59 -070022#include "test/md5_helper.h"
Yaowu Xuf883b422016-08-30 14:01:10 -070023#include "aom/aom_integer.h"
Yaowu Xuc27fc142016-08-22 16:08:15 -070024#include "aom_ports/mem.h"
Yaowu Xuf883b422016-08-30 14:01:10 -070025#include "aom_ports/aom_timer.h"
James Zern0d2f3482015-05-11 19:36:59 -070026
27// -----------------------------------------------------------------------------
28
29namespace {
30
Yaowu Xuf883b422016-08-30 14:01:10 -070031typedef void (*AvxPredFunc)(uint8_t *dst, ptrdiff_t y_stride,
James Zern0d2f3482015-05-11 19:36:59 -070032 const uint8_t *above, const uint8_t *left);
33
Yaowu Xuf883b422016-08-30 14:01:10 -070034const int kNumAv1IntraPredFuncs = 13;
35const char *kAv1IntraPredNames[kNumAv1IntraPredFuncs] = {
clang-format3a826f12016-08-11 17:46:05 -070036 "DC_PRED", "DC_LEFT_PRED", "DC_TOP_PRED", "DC_128_PRED", "V_PRED",
37 "H_PRED", "D45_PRED", "D135_PRED", "D117_PRED", "D153_PRED",
38 "D207_PRED", "D63_PRED", "TM_PRED"
James Zern0d2f3482015-05-11 19:36:59 -070039};
40
Yaowu Xuf883b422016-08-30 14:01:10 -070041void TestIntraPred(const char name[], AvxPredFunc const *pred_funcs,
James Zern0d2f3482015-05-11 19:36:59 -070042 const char *const pred_func_names[], int num_funcs,
43 const char *const signatures[], int block_size,
44 int num_pixels_per_test) {
Yaowu Xuc27fc142016-08-22 16:08:15 -070045 libaom_test::ACMRandom rnd(libaom_test::ACMRandom::DeterministicSeed());
James Zern0d2f3482015-05-11 19:36:59 -070046 const int kBPS = 32;
47 const int kTotalPixels = 32 * kBPS;
48 DECLARE_ALIGNED(16, uint8_t, src[kTotalPixels]);
49 DECLARE_ALIGNED(16, uint8_t, ref_src[kTotalPixels]);
50 DECLARE_ALIGNED(16, uint8_t, left[kBPS]);
51 DECLARE_ALIGNED(16, uint8_t, above_mem[2 * kBPS + 16]);
52 uint8_t *const above = above_mem + 16;
53 for (int i = 0; i < kTotalPixels; ++i) ref_src[i] = rnd.Rand8();
54 for (int i = 0; i < kBPS; ++i) left[i] = rnd.Rand8();
55 for (int i = -1; i < kBPS; ++i) above[i] = rnd.Rand8();
56 const int kNumTests = static_cast<int>(2.e10 / num_pixels_per_test);
57
58 // some code assumes the top row has been extended:
59 // d45/d63 C-code, for instance, but not the assembly.
60 // TODO(jzern): this style of extension isn't strictly necessary.
61 ASSERT_LE(block_size, kBPS);
62 memset(above + block_size, above[block_size - 1], 2 * kBPS - block_size);
63
64 for (int k = 0; k < num_funcs; ++k) {
65 if (pred_funcs[k] == NULL) continue;
66 memcpy(src, ref_src, sizeof(src));
Yaowu Xuf883b422016-08-30 14:01:10 -070067 aom_usec_timer timer;
68 aom_usec_timer_start(&timer);
James Zern0d2f3482015-05-11 19:36:59 -070069 for (int num_tests = 0; num_tests < kNumTests; ++num_tests) {
70 pred_funcs[k](src, kBPS, above, left);
71 }
Yaowu Xuc27fc142016-08-22 16:08:15 -070072 libaom_test::ClearSystemState();
Yaowu Xuf883b422016-08-30 14:01:10 -070073 aom_usec_timer_mark(&timer);
James Zern0d2f3482015-05-11 19:36:59 -070074 const int elapsed_time =
Yaowu Xuf883b422016-08-30 14:01:10 -070075 static_cast<int>(aom_usec_timer_elapsed(&timer) / 1000);
Yaowu Xuc27fc142016-08-22 16:08:15 -070076 libaom_test::MD5 md5;
James Zern0d2f3482015-05-11 19:36:59 -070077 md5.Add(src, sizeof(src));
78 printf("Mode %s[%12s]: %5d ms MD5: %s\n", name, pred_func_names[k],
79 elapsed_time, md5.Get());
80 EXPECT_STREQ(signatures[k], md5.Get());
81 }
82}
83
Yaowu Xuf883b422016-08-30 14:01:10 -070084void TestIntraPred4(AvxPredFunc const *pred_funcs) {
85 static const int kNumAv1IntraFuncs = 13;
86 static const char *const kSignatures[kNumAv1IntraFuncs] = {
clang-format3a826f12016-08-11 17:46:05 -070087 "4334156168b34ab599d9b5b30f522fe9", "bc4649d5ba47c7ff178d92e475960fb0",
88 "8d316e5933326dcac24e1064794b5d12", "a27270fed024eafd762c95de85f4da51",
89 "c33dff000d4256c2b8f3bf9e9bab14d2", "44d8cddc2ad8f79b8ed3306051722b4f",
90 "eb54839b2bad6699d8946f01ec041cd0", "ecb0d56ae5f677ea45127ce9d5c058e4",
91 "0b7936841f6813da818275944895b574", "9117972ef64f91a58ff73e1731c81db2",
92 "c56d5e8c729e46825f46dd5d3b5d508a", "c0889e2039bcf7bcb5d2f33cdca69adc",
James Zern0d2f3482015-05-11 19:36:59 -070093 "309a618577b27c648f9c5ee45252bc8f",
94 };
Yaowu Xuf883b422016-08-30 14:01:10 -070095 TestIntraPred("Intra4", pred_funcs, kAv1IntraPredNames, kNumAv1IntraFuncs,
96 kSignatures, 4, 4 * 4 * kNumAv1IntraFuncs);
James Zern0d2f3482015-05-11 19:36:59 -070097}
98
Yaowu Xuf883b422016-08-30 14:01:10 -070099void TestIntraPred8(AvxPredFunc const *pred_funcs) {
100 static const int kNumAv1IntraFuncs = 13;
101 static const char *const kSignatures[kNumAv1IntraFuncs] = {
clang-format3a826f12016-08-11 17:46:05 -0700102 "7694ddeeefed887faf9d339d18850928", "7d726b1213591b99f736be6dec65065b",
103 "19c5711281357a485591aaf9c96c0a67", "ba6b66877a089e71cd938e3b8c40caac",
104 "802440c93317e0f8ba93fab02ef74265", "9e09a47a15deb0b9d8372824f9805080",
105 "b7c2d8c662268c0c427da412d7b0311d", "78339c1c60bb1d67d248ab8c4da08b7f",
106 "5c97d70f7d47de1882a6cd86c165c8a9", "8182bf60688b42205acd95e59e967157",
107 "08323400005a297f16d7e57e7fe1eaac", "95f7bfc262329a5849eda66d8f7c68ce",
James Zern0d2f3482015-05-11 19:36:59 -0700108 "815b75c8e0d91cc1ae766dc5d3e445a3",
109 };
Yaowu Xuf883b422016-08-30 14:01:10 -0700110 TestIntraPred("Intra8", pred_funcs, kAv1IntraPredNames, kNumAv1IntraFuncs,
111 kSignatures, 8, 8 * 8 * kNumAv1IntraFuncs);
James Zern0d2f3482015-05-11 19:36:59 -0700112}
113
Yaowu Xuf883b422016-08-30 14:01:10 -0700114void TestIntraPred16(AvxPredFunc const *pred_funcs) {
115 static const int kNumAv1IntraFuncs = 13;
116 static const char *const kSignatures[kNumAv1IntraFuncs] = {
clang-format3a826f12016-08-11 17:46:05 -0700117 "b40dbb555d5d16a043dc361e6694fe53", "fb08118cee3b6405d64c1fd68be878c6",
118 "6c190f341475c837cc38c2e566b64875", "db5c34ccbe2c7f595d9b08b0dc2c698c",
119 "a62cbfd153a1f0b9fed13e62b8408a7a", "143df5b4c89335e281103f610f5052e4",
120 "d87feb124107cdf2cfb147655aa0bb3c", "7841fae7d4d47b519322e6a03eeed9dc",
121 "f6ebed3f71cbcf8d6d0516ce87e11093", "3cc480297dbfeed01a1c2d78dd03d0c5",
122 "b9f69fa6532b372c545397dcb78ef311", "a8fe1c70432f09d0c20c67bdb6432c4d",
James Zern0d2f3482015-05-11 19:36:59 -0700123 "b8a41aa968ec108af447af4217cba91b",
124 };
Yaowu Xuf883b422016-08-30 14:01:10 -0700125 TestIntraPred("Intra16", pred_funcs, kAv1IntraPredNames, kNumAv1IntraFuncs,
126 kSignatures, 16, 16 * 16 * kNumAv1IntraFuncs);
James Zern0d2f3482015-05-11 19:36:59 -0700127}
128
Yaowu Xuf883b422016-08-30 14:01:10 -0700129void TestIntraPred32(AvxPredFunc const *pred_funcs) {
130 static const int kNumAv1IntraFuncs = 13;
131 static const char *const kSignatures[kNumAv1IntraFuncs] = {
clang-format3a826f12016-08-11 17:46:05 -0700132 "558541656d84f9ae7896db655826febe", "b3587a1f9a01495fa38c8cd3c8e2a1bf",
133 "4c6501e64f25aacc55a2a16c7e8f0255", "b3b01379ba08916ef6b1b35f7d9ad51c",
134 "0f1eb38b6cbddb3d496199ef9f329071", "911c06efb9ed1c3b4c104b232b55812f",
135 "9225beb0ddfa7a1d24eaa1be430a6654", "0a6d584a44f8db9aa7ade2e2fdb9fc9e",
136 "b01c9076525216925f3456f034fb6eee", "d267e20ad9e5cd2915d1a47254d3d149",
137 "ed012a4a5da71f36c2393023184a0e59", "f162b51ed618d28b936974cff4391da5",
James Zern0d2f3482015-05-11 19:36:59 -0700138 "9e1370c6d42e08d357d9612c93a71cfc",
139 };
Yaowu Xuf883b422016-08-30 14:01:10 -0700140 TestIntraPred("Intra32", pred_funcs, kAv1IntraPredNames, kNumAv1IntraFuncs,
141 kSignatures, 32, 32 * 32 * kNumAv1IntraFuncs);
James Zern0d2f3482015-05-11 19:36:59 -0700142}
143
144} // namespace
145
146// Defines a test case for |arch| (e.g., C, SSE2, ...) passing the predictors
147// to |test_func|. The test name is 'arch.test_func', e.g., C.TestIntraPred4.
clang-format3a826f12016-08-11 17:46:05 -0700148#define INTRA_PRED_TEST(arch, test_func, dc, dc_left, dc_top, dc_128, v, h, \
149 d45, d135, d117, d153, d207, d63, tm) \
150 TEST(arch, test_func) { \
Yaowu Xuf883b422016-08-30 14:01:10 -0700151 static const AvxPredFunc aom_intra_pred[] = { \
clang-format3a826f12016-08-11 17:46:05 -0700152 dc, dc_left, dc_top, dc_128, v, h, d45, d135, d117, d153, d207, d63, tm \
153 }; \
Yaowu Xuf883b422016-08-30 14:01:10 -0700154 test_func(aom_intra_pred); \
James Zern0d2f3482015-05-11 19:36:59 -0700155 }
156
157// -----------------------------------------------------------------------------
158// 4x4
159
Urvang Joshi31744ec2016-09-02 15:05:28 -0700160#if CONFIG_ALT_INTRA
161#define tm_pred_func aom_paeth_predictor_4x4_c
162#else
163#define tm_pred_func aom_tm_predictor_4x4_c
164#endif // CONFIG_ALT_INTRA
Yaowu Xuf883b422016-08-30 14:01:10 -0700165INTRA_PRED_TEST(C, TestIntraPred4, aom_dc_predictor_4x4_c,
166 aom_dc_left_predictor_4x4_c, aom_dc_top_predictor_4x4_c,
167 aom_dc_128_predictor_4x4_c, aom_v_predictor_4x4_c,
168 aom_h_predictor_4x4_c, aom_d45_predictor_4x4_c,
169 aom_d135_predictor_4x4_c, aom_d117_predictor_4x4_c,
170 aom_d153_predictor_4x4_c, aom_d207_predictor_4x4_c,
Urvang Joshi31744ec2016-09-02 15:05:28 -0700171 aom_d63_predictor_4x4_c, tm_pred_func)
172#undef tm_pred_func
James Zern0d2f3482015-05-11 19:36:59 -0700173
Johann2967bf32016-06-22 16:08:10 -0700174#if HAVE_SSE2
Urvang Joshi31744ec2016-09-02 15:05:28 -0700175#if CONFIG_ALT_INTRA
176#define tm_pred_func NULL
177#else
178#define tm_pred_func aom_tm_predictor_4x4_sse2
179#endif // CONFIG_ALT_INTRA
Yaowu Xuf883b422016-08-30 14:01:10 -0700180INTRA_PRED_TEST(SSE2, TestIntraPred4, aom_dc_predictor_4x4_sse2,
181 aom_dc_left_predictor_4x4_sse2, aom_dc_top_predictor_4x4_sse2,
182 aom_dc_128_predictor_4x4_sse2, aom_v_predictor_4x4_sse2,
183 aom_h_predictor_4x4_sse2, aom_d45_predictor_4x4_sse2, NULL,
Urvang Joshi31744ec2016-09-02 15:05:28 -0700184 NULL, NULL, aom_d207_predictor_4x4_sse2, NULL, tm_pred_func)
185#undef tm_pred_func
Johann2967bf32016-06-22 16:08:10 -0700186#endif // HAVE_SSE2
Jian Zhou79b68622015-11-13 18:42:48 -0800187
Johann2967bf32016-06-22 16:08:10 -0700188#if HAVE_SSSE3
clang-format3a826f12016-08-11 17:46:05 -0700189INTRA_PRED_TEST(SSSE3, TestIntraPred4, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
Yaowu Xuf883b422016-08-30 14:01:10 -0700190 NULL, NULL, aom_d153_predictor_4x4_ssse3, NULL,
191 aom_d63_predictor_4x4_ssse3, NULL)
Johann2967bf32016-06-22 16:08:10 -0700192#endif // HAVE_SSSE3
James Zern0d2f3482015-05-11 19:36:59 -0700193
194#if HAVE_DSPR2
Urvang Joshi31744ec2016-09-02 15:05:28 -0700195#if CONFIG_ALT_INTRA
196#define tm_pred_func NULL
197#else
198#define tm_pred_func aom_tm_predictor_4x4_dspr2
199#endif // CONFIG_ALT_INTRA
Yaowu Xuf883b422016-08-30 14:01:10 -0700200INTRA_PRED_TEST(DSPR2, TestIntraPred4, aom_dc_predictor_4x4_dspr2, NULL, NULL,
201 NULL, NULL, aom_h_predictor_4x4_dspr2, NULL, NULL, NULL, NULL,
Urvang Joshi31744ec2016-09-02 15:05:28 -0700202 NULL, NULL, tm_pred_func)
203#undef tm_pred_func
James Zern0d2f3482015-05-11 19:36:59 -0700204#endif // HAVE_DSPR2
205
206#if HAVE_NEON
Urvang Joshi31744ec2016-09-02 15:05:28 -0700207#if CONFIG_ALT_INTRA
208#define tm_pred_func NULL
209#else
210#define tm_pred_func aom_tm_predictor_4x4_neon
211#endif // CONFIG_ALT_INTRA
Yaowu Xuf883b422016-08-30 14:01:10 -0700212INTRA_PRED_TEST(NEON, TestIntraPred4, aom_dc_predictor_4x4_neon,
213 aom_dc_left_predictor_4x4_neon, aom_dc_top_predictor_4x4_neon,
214 aom_dc_128_predictor_4x4_neon, aom_v_predictor_4x4_neon,
215 aom_h_predictor_4x4_neon, aom_d45_predictor_4x4_neon,
216 aom_d135_predictor_4x4_neon, NULL, NULL, NULL, NULL,
Urvang Joshi31744ec2016-09-02 15:05:28 -0700217 tm_pred_func)
218#undef tm_pred_func
James Zern0d2f3482015-05-11 19:36:59 -0700219#endif // HAVE_NEON
220
Parag Salasakara2288d22015-06-05 17:32:34 +0530221#if HAVE_MSA
Urvang Joshi31744ec2016-09-02 15:05:28 -0700222#if CONFIG_ALT_INTRA
223#define tm_pred_func NULL
224#else
225#define tm_pred_func aom_tm_predictor_4x4_msa
226#endif // CONFIG_ALT_INTRA
Yaowu Xuf883b422016-08-30 14:01:10 -0700227INTRA_PRED_TEST(MSA, TestIntraPred4, aom_dc_predictor_4x4_msa,
228 aom_dc_left_predictor_4x4_msa, aom_dc_top_predictor_4x4_msa,
229 aom_dc_128_predictor_4x4_msa, aom_v_predictor_4x4_msa,
230 aom_h_predictor_4x4_msa, NULL, NULL, NULL, NULL, NULL, NULL,
Urvang Joshi31744ec2016-09-02 15:05:28 -0700231 tm_pred_func)
232#undef tm_pred_func
Parag Salasakara2288d22015-06-05 17:32:34 +0530233#endif // HAVE_MSA
234
James Zern0d2f3482015-05-11 19:36:59 -0700235// -----------------------------------------------------------------------------
236// 8x8
237
Urvang Joshi31744ec2016-09-02 15:05:28 -0700238#if CONFIG_ALT_INTRA
239#define tm_pred_func aom_paeth_predictor_8x8_c
240#else
241#define tm_pred_func aom_tm_predictor_8x8_c
242#endif // CONFIG_ALT_INTRA
Yaowu Xuf883b422016-08-30 14:01:10 -0700243INTRA_PRED_TEST(C, TestIntraPred8, aom_dc_predictor_8x8_c,
244 aom_dc_left_predictor_8x8_c, aom_dc_top_predictor_8x8_c,
245 aom_dc_128_predictor_8x8_c, aom_v_predictor_8x8_c,
246 aom_h_predictor_8x8_c, aom_d45_predictor_8x8_c,
247 aom_d135_predictor_8x8_c, aom_d117_predictor_8x8_c,
248 aom_d153_predictor_8x8_c, aom_d207_predictor_8x8_c,
Urvang Joshi31744ec2016-09-02 15:05:28 -0700249 aom_d63_predictor_8x8_c, tm_pred_func)
250#undef tm_pred_func
James Zern0d2f3482015-05-11 19:36:59 -0700251
Johann2967bf32016-06-22 16:08:10 -0700252#if HAVE_SSE2
Urvang Joshi31744ec2016-09-02 15:05:28 -0700253#if CONFIG_ALT_INTRA
254#define tm_pred_func NULL
255#else
256#define tm_pred_func aom_tm_predictor_8x8_sse2
257#endif // CONFIG_ALT_INTRA
Yaowu Xuf883b422016-08-30 14:01:10 -0700258INTRA_PRED_TEST(SSE2, TestIntraPred8, aom_dc_predictor_8x8_sse2,
259 aom_dc_left_predictor_8x8_sse2, aom_dc_top_predictor_8x8_sse2,
260 aom_dc_128_predictor_8x8_sse2, aom_v_predictor_8x8_sse2,
261 aom_h_predictor_8x8_sse2, aom_d45_predictor_8x8_sse2, NULL,
Urvang Joshi31744ec2016-09-02 15:05:28 -0700262 NULL, NULL, NULL, NULL, tm_pred_func)
263#undef tm_pred_func
Johann2967bf32016-06-22 16:08:10 -0700264#endif // HAVE_SSE2
James Zern0d2f3482015-05-11 19:36:59 -0700265
Johann2967bf32016-06-22 16:08:10 -0700266#if HAVE_SSSE3
clang-format3a826f12016-08-11 17:46:05 -0700267INTRA_PRED_TEST(SSSE3, TestIntraPred8, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
Yaowu Xuf883b422016-08-30 14:01:10 -0700268 NULL, NULL, aom_d153_predictor_8x8_ssse3,
269 aom_d207_predictor_8x8_ssse3, aom_d63_predictor_8x8_ssse3, NULL)
Johann2967bf32016-06-22 16:08:10 -0700270#endif // HAVE_SSSE3
James Zern0d2f3482015-05-11 19:36:59 -0700271
272#if HAVE_DSPR2
Urvang Joshi31744ec2016-09-02 15:05:28 -0700273#if CONFIG_ALT_INTRA
274#define tm_pred_func NULL
275#else
276#define tm_pred_func aom_tm_predictor_8x8_dspr2
277#endif // CONFIG_ALT_INTRA
Yaowu Xuf883b422016-08-30 14:01:10 -0700278INTRA_PRED_TEST(DSPR2, TestIntraPred8, aom_dc_predictor_8x8_dspr2, NULL, NULL,
279 NULL, NULL, aom_h_predictor_8x8_dspr2, NULL, NULL, NULL, NULL,
Urvang Joshi31744ec2016-09-02 15:05:28 -0700280 NULL, NULL, tm_pred_func)
281#undef tm_pred_func
James Zern0d2f3482015-05-11 19:36:59 -0700282#endif // HAVE_DSPR2
283
284#if HAVE_NEON
Urvang Joshi31744ec2016-09-02 15:05:28 -0700285#if CONFIG_ALT_INTRA
286#define tm_pred_func NULL
287#else
288#define tm_pred_func aom_tm_predictor_8x8_neon
289#endif // CONFIG_ALT_INTRA
Yaowu Xuf883b422016-08-30 14:01:10 -0700290INTRA_PRED_TEST(NEON, TestIntraPred8, aom_dc_predictor_8x8_neon,
291 aom_dc_left_predictor_8x8_neon, aom_dc_top_predictor_8x8_neon,
292 aom_dc_128_predictor_8x8_neon, aom_v_predictor_8x8_neon,
293 aom_h_predictor_8x8_neon, aom_d45_predictor_8x8_neon, NULL,
Urvang Joshi31744ec2016-09-02 15:05:28 -0700294 NULL, NULL, NULL, NULL, tm_pred_func)
295#undef tm_pred_func
James Zern0d2f3482015-05-11 19:36:59 -0700296#endif // HAVE_NEON
297
Parag Salasakara2288d22015-06-05 17:32:34 +0530298#if HAVE_MSA
Urvang Joshi31744ec2016-09-02 15:05:28 -0700299#if CONFIG_ALT_INTRA
300#define tm_pred_func NULL
301#else
302#define tm_pred_func aom_tm_predictor_8x8_msa
303#endif // CONFIG_ALT_INTRA
Yaowu Xuf883b422016-08-30 14:01:10 -0700304INTRA_PRED_TEST(MSA, TestIntraPred8, aom_dc_predictor_8x8_msa,
305 aom_dc_left_predictor_8x8_msa, aom_dc_top_predictor_8x8_msa,
306 aom_dc_128_predictor_8x8_msa, aom_v_predictor_8x8_msa,
307 aom_h_predictor_8x8_msa, NULL, NULL, NULL, NULL, NULL, NULL,
Urvang Joshi31744ec2016-09-02 15:05:28 -0700308 tm_pred_func)
309#undef tm_pred_func
Parag Salasakara2288d22015-06-05 17:32:34 +0530310#endif // HAVE_MSA
311
James Zern0d2f3482015-05-11 19:36:59 -0700312// -----------------------------------------------------------------------------
313// 16x16
314
Urvang Joshi31744ec2016-09-02 15:05:28 -0700315#if CONFIG_ALT_INTRA
316#define tm_pred_func aom_paeth_predictor_16x16_c
317#else
318#define tm_pred_func aom_tm_predictor_16x16_c
319#endif // CONFIG_ALT_INTRA
Yaowu Xuf883b422016-08-30 14:01:10 -0700320INTRA_PRED_TEST(C, TestIntraPred16, aom_dc_predictor_16x16_c,
321 aom_dc_left_predictor_16x16_c, aom_dc_top_predictor_16x16_c,
322 aom_dc_128_predictor_16x16_c, aom_v_predictor_16x16_c,
323 aom_h_predictor_16x16_c, aom_d45_predictor_16x16_c,
324 aom_d135_predictor_16x16_c, aom_d117_predictor_16x16_c,
325 aom_d153_predictor_16x16_c, aom_d207_predictor_16x16_c,
Urvang Joshi31744ec2016-09-02 15:05:28 -0700326 aom_d63_predictor_16x16_c, tm_pred_func)
327#undef tm_pred_func
James Zern0d2f3482015-05-11 19:36:59 -0700328
Johann2967bf32016-06-22 16:08:10 -0700329#if HAVE_SSE2
Urvang Joshi31744ec2016-09-02 15:05:28 -0700330#if CONFIG_ALT_INTRA
331#define tm_pred_func NULL
332#else
333#define tm_pred_func aom_tm_predictor_16x16_sse2
334#endif // CONFIG_ALT_INTRA
Yaowu Xuf883b422016-08-30 14:01:10 -0700335INTRA_PRED_TEST(SSE2, TestIntraPred16, aom_dc_predictor_16x16_sse2,
336 aom_dc_left_predictor_16x16_sse2,
337 aom_dc_top_predictor_16x16_sse2,
338 aom_dc_128_predictor_16x16_sse2, aom_v_predictor_16x16_sse2,
339 aom_h_predictor_16x16_sse2, NULL, NULL, NULL, NULL, NULL, NULL,
Urvang Joshi31744ec2016-09-02 15:05:28 -0700340 tm_pred_func)
341#undef tm_pred_func
Johann2967bf32016-06-22 16:08:10 -0700342#endif // HAVE_SSE2
James Zern0d2f3482015-05-11 19:36:59 -0700343
Johann2967bf32016-06-22 16:08:10 -0700344#if HAVE_SSSE3
clang-format3a826f12016-08-11 17:46:05 -0700345INTRA_PRED_TEST(SSSE3, TestIntraPred16, NULL, NULL, NULL, NULL, NULL, NULL,
Yaowu Xuf883b422016-08-30 14:01:10 -0700346 aom_d45_predictor_16x16_ssse3, NULL, NULL,
347 aom_d153_predictor_16x16_ssse3, aom_d207_predictor_16x16_ssse3,
348 aom_d63_predictor_16x16_ssse3, NULL)
Johann2967bf32016-06-22 16:08:10 -0700349#endif // HAVE_SSSE3
James Zern0d2f3482015-05-11 19:36:59 -0700350
351#if HAVE_DSPR2
Yaowu Xuf883b422016-08-30 14:01:10 -0700352INTRA_PRED_TEST(DSPR2, TestIntraPred16, aom_dc_predictor_16x16_dspr2, NULL,
353 NULL, NULL, NULL, aom_h_predictor_16x16_dspr2, NULL, NULL, NULL,
James Zern0d2f3482015-05-11 19:36:59 -0700354 NULL, NULL, NULL, NULL)
355#endif // HAVE_DSPR2
356
357#if HAVE_NEON
Urvang Joshi31744ec2016-09-02 15:05:28 -0700358#if CONFIG_ALT_INTRA
359#define tm_pred_func NULL
360#else
361#define tm_pred_func aom_tm_predictor_16x16_neon
362#endif // CONFIG_ALT_INTRA
Yaowu Xuf883b422016-08-30 14:01:10 -0700363INTRA_PRED_TEST(NEON, TestIntraPred16, aom_dc_predictor_16x16_neon,
364 aom_dc_left_predictor_16x16_neon,
365 aom_dc_top_predictor_16x16_neon,
366 aom_dc_128_predictor_16x16_neon, aom_v_predictor_16x16_neon,
367 aom_h_predictor_16x16_neon, aom_d45_predictor_16x16_neon, NULL,
Urvang Joshi31744ec2016-09-02 15:05:28 -0700368 NULL, NULL, NULL, NULL, tm_pred_func)
369#undef tm_pred_func
James Zern0d2f3482015-05-11 19:36:59 -0700370#endif // HAVE_NEON
371
Parag Salasakara2288d22015-06-05 17:32:34 +0530372#if HAVE_MSA
Urvang Joshi31744ec2016-09-02 15:05:28 -0700373#if CONFIG_ALT_INTRA
374#define tm_pred_func NULL
375#else
376#define tm_pred_func aom_tm_predictor_16x16_msa
377#endif // CONFIG_ALT_INTRA
Yaowu Xuf883b422016-08-30 14:01:10 -0700378INTRA_PRED_TEST(MSA, TestIntraPred16, aom_dc_predictor_16x16_msa,
379 aom_dc_left_predictor_16x16_msa, aom_dc_top_predictor_16x16_msa,
380 aom_dc_128_predictor_16x16_msa, aom_v_predictor_16x16_msa,
381 aom_h_predictor_16x16_msa, NULL, NULL, NULL, NULL, NULL, NULL,
Urvang Joshi31744ec2016-09-02 15:05:28 -0700382 tm_pred_func)
383#undef tm_pred_func
Parag Salasakara2288d22015-06-05 17:32:34 +0530384#endif // HAVE_MSA
385
James Zern0d2f3482015-05-11 19:36:59 -0700386// -----------------------------------------------------------------------------
387// 32x32
388
Urvang Joshi31744ec2016-09-02 15:05:28 -0700389#if CONFIG_ALT_INTRA
390#define tm_pred_func aom_paeth_predictor_32x32_c
391#else
392#define tm_pred_func aom_tm_predictor_32x32_c
393#endif // CONFIG_ALT_INTRA
Yaowu Xuf883b422016-08-30 14:01:10 -0700394INTRA_PRED_TEST(C, TestIntraPred32, aom_dc_predictor_32x32_c,
395 aom_dc_left_predictor_32x32_c, aom_dc_top_predictor_32x32_c,
396 aom_dc_128_predictor_32x32_c, aom_v_predictor_32x32_c,
397 aom_h_predictor_32x32_c, aom_d45_predictor_32x32_c,
398 aom_d135_predictor_32x32_c, aom_d117_predictor_32x32_c,
399 aom_d153_predictor_32x32_c, aom_d207_predictor_32x32_c,
Urvang Joshi31744ec2016-09-02 15:05:28 -0700400 aom_d63_predictor_32x32_c, tm_pred_func)
401#undef tm_pred_func
James Zern0d2f3482015-05-11 19:36:59 -0700402
Johann2967bf32016-06-22 16:08:10 -0700403#if HAVE_SSE2
Urvang Joshi31744ec2016-09-02 15:05:28 -0700404#if CONFIG_ALT_INTRA
405#define tm_pred_func NULL
406#else
407#define tm_pred_func aom_tm_predictor_32x32_sse2
408#endif // CONFIG_ALT_INTRA
Yaowu Xuf883b422016-08-30 14:01:10 -0700409INTRA_PRED_TEST(SSE2, TestIntraPred32, aom_dc_predictor_32x32_sse2,
410 aom_dc_left_predictor_32x32_sse2,
411 aom_dc_top_predictor_32x32_sse2,
412 aom_dc_128_predictor_32x32_sse2, aom_v_predictor_32x32_sse2,
413 aom_h_predictor_32x32_sse2, NULL, NULL, NULL, NULL, NULL, NULL,
Urvang Joshi31744ec2016-09-02 15:05:28 -0700414 tm_pred_func)
415#undef tm_pred_func
Johann2967bf32016-06-22 16:08:10 -0700416#endif // HAVE_SSE2
James Zern0d2f3482015-05-11 19:36:59 -0700417
Johann2967bf32016-06-22 16:08:10 -0700418#if HAVE_SSSE3
clang-format3a826f12016-08-11 17:46:05 -0700419INTRA_PRED_TEST(SSSE3, TestIntraPred32, NULL, NULL, NULL, NULL, NULL, NULL,
Yaowu Xuf883b422016-08-30 14:01:10 -0700420 aom_d45_predictor_32x32_ssse3, NULL, NULL,
421 aom_d153_predictor_32x32_ssse3, aom_d207_predictor_32x32_ssse3,
422 aom_d63_predictor_32x32_ssse3, NULL)
Johann2967bf32016-06-22 16:08:10 -0700423#endif // HAVE_SSSE3
James Zern0d2f3482015-05-11 19:36:59 -0700424
425#if HAVE_NEON
Urvang Joshi31744ec2016-09-02 15:05:28 -0700426#if CONFIG_ALT_INTRA
427#define tm_pred_func NULL
428#else
429#define tm_pred_func aom_tm_predictor_32x32_neon
430#endif // CONFIG_ALT_INTRA
Yaowu Xuf883b422016-08-30 14:01:10 -0700431INTRA_PRED_TEST(NEON, TestIntraPred32, aom_dc_predictor_32x32_neon,
432 aom_dc_left_predictor_32x32_neon,
433 aom_dc_top_predictor_32x32_neon,
434 aom_dc_128_predictor_32x32_neon, aom_v_predictor_32x32_neon,
435 aom_h_predictor_32x32_neon, NULL, NULL, NULL, NULL, NULL, NULL,
Urvang Joshi31744ec2016-09-02 15:05:28 -0700436 tm_pred_func)
437#undef tm_pred_func
James Zern0d2f3482015-05-11 19:36:59 -0700438#endif // HAVE_NEON
439
Parag Salasakara2288d22015-06-05 17:32:34 +0530440#if HAVE_MSA
Urvang Joshi31744ec2016-09-02 15:05:28 -0700441#if CONFIG_ALT_INTRA
442#define tm_pred_func NULL
443#else
444#define tm_pred_func aom_tm_predictor_32x32_msa
445#endif // CONFIG_ALT_INTRA
Yaowu Xuf883b422016-08-30 14:01:10 -0700446INTRA_PRED_TEST(MSA, TestIntraPred32, aom_dc_predictor_32x32_msa,
447 aom_dc_left_predictor_32x32_msa, aom_dc_top_predictor_32x32_msa,
448 aom_dc_128_predictor_32x32_msa, aom_v_predictor_32x32_msa,
449 aom_h_predictor_32x32_msa, NULL, NULL, NULL, NULL, NULL, NULL,
Urvang Joshi31744ec2016-09-02 15:05:28 -0700450 tm_pred_func)
451#undef tm_pred_func
Parag Salasakara2288d22015-06-05 17:32:34 +0530452#endif // HAVE_MSA
453
Yaowu Xuf883b422016-08-30 14:01:10 -0700454#include "test/test_libaom.cc"