vp9_intrapred_test.cc 53 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969
  1. /*
  2. * Copyright (c) 2014 The WebM project authors. All Rights Reserved.
  3. *
  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
  6. * tree. An additional intellectual property rights grant can be found
  7. * in the file PATENTS. All contributing project authors may
  8. * be found in the AUTHORS file in the root of the source tree.
  9. */
  10. #include <string>
  11. #include "third_party/googletest/src/include/gtest/gtest.h"
  12. #include "./vpx_config.h"
  13. #include "./vpx_dsp_rtcd.h"
  14. #include "test/acm_random.h"
  15. #include "test/clear_system_state.h"
  16. #include "test/register_state_check.h"
  17. #include "test/util.h"
  18. #include "vp9/common/vp9_blockd.h"
  19. #include "vp9/common/vp9_pred_common.h"
  20. #include "vpx_mem/vpx_mem.h"
  21. namespace {
  22. using libvpx_test::ACMRandom;
  23. const int count_test_block = 100000;
  24. typedef void (*IntraPredFunc)(uint8_t *dst, ptrdiff_t stride,
  25. const uint8_t *above, const uint8_t *left);
  26. struct IntraPredParam {
  27. IntraPredParam(IntraPredFunc pred = NULL, IntraPredFunc ref = NULL,
  28. int block_size_value = 0, int bit_depth_value = 0)
  29. : pred_fn(pred), ref_fn(ref), block_size(block_size_value),
  30. bit_depth(bit_depth_value) {}
  31. IntraPredFunc pred_fn;
  32. IntraPredFunc ref_fn;
  33. int block_size;
  34. int bit_depth;
  35. };
  36. template <typename Pixel, typename PredParam>
  37. class IntraPredTest : public ::testing::TestWithParam<PredParam> {
  38. public:
  39. void RunTest(Pixel *left_col, Pixel *above_data, Pixel *dst, Pixel *ref_dst) {
  40. ACMRandom rnd(ACMRandom::DeterministicSeed());
  41. const int block_size = params_.block_size;
  42. above_row_ = above_data + 16;
  43. left_col_ = left_col;
  44. dst_ = dst;
  45. ref_dst_ = ref_dst;
  46. int error_count = 0;
  47. for (int i = 0; i < count_test_block; ++i) {
  48. // Fill edges with random data, try first with saturated values.
  49. for (int x = -1; x < block_size; x++) {
  50. if (i == 0) {
  51. above_row_[x] = mask_;
  52. } else {
  53. above_row_[x] = rnd.Rand16() & mask_;
  54. }
  55. }
  56. for (int x = block_size; x < 2 * block_size; x++) {
  57. above_row_[x] = above_row_[block_size - 1];
  58. }
  59. for (int y = 0; y < block_size; y++) {
  60. if (i == 0) {
  61. left_col_[y] = mask_;
  62. } else {
  63. left_col_[y] = rnd.Rand16() & mask_;
  64. }
  65. }
  66. Predict();
  67. CheckPrediction(i, &error_count);
  68. }
  69. ASSERT_EQ(0, error_count);
  70. }
  71. protected:
  72. virtual void SetUp() {
  73. params_ = this->GetParam();
  74. stride_ = params_.block_size * 3;
  75. mask_ = (1 << params_.bit_depth) - 1;
  76. }
  77. void Predict();
  78. void CheckPrediction(int test_case_number, int *error_count) const {
  79. // For each pixel ensure that the calculated value is the same as reference.
  80. const int block_size = params_.block_size;
  81. for (int y = 0; y < block_size; y++) {
  82. for (int x = 0; x < block_size; x++) {
  83. *error_count += ref_dst_[x + y * stride_] != dst_[x + y * stride_];
  84. if (*error_count == 1) {
  85. ASSERT_EQ(ref_dst_[x + y * stride_], dst_[x + y * stride_])
  86. << " Failed on Test Case Number " << test_case_number;
  87. }
  88. }
  89. }
  90. }
  91. Pixel *above_row_;
  92. Pixel *left_col_;
  93. Pixel *dst_;
  94. Pixel *ref_dst_;
  95. ptrdiff_t stride_;
  96. int mask_;
  97. PredParam params_;
  98. };
  99. template <>
  100. void IntraPredTest<uint8_t, IntraPredParam>::Predict() {
  101. params_.ref_fn(ref_dst_, stride_, above_row_, left_col_);
  102. ASM_REGISTER_STATE_CHECK(
  103. params_.pred_fn(dst_, stride_, above_row_, left_col_));
  104. }
  105. typedef IntraPredTest<uint8_t, IntraPredParam> VP9IntraPredTest;
  106. TEST_P(VP9IntraPredTest, IntraPredTests) {
  107. // max block size is 32
  108. DECLARE_ALIGNED(16, uint8_t, left_col[2 * 32]);
  109. DECLARE_ALIGNED(16, uint8_t, above_data[2 * 32 + 32]);
  110. DECLARE_ALIGNED(16, uint8_t, dst[3 * 32 * 32]);
  111. DECLARE_ALIGNED(16, uint8_t, ref_dst[3 * 32 * 32]);
  112. RunTest(left_col, above_data, dst, ref_dst);
  113. }
  114. #if HAVE_SSE2
  115. INSTANTIATE_TEST_CASE_P(
  116. SSE2, VP9IntraPredTest,
  117. ::testing::Values(
  118. IntraPredParam(&vpx_d45_predictor_4x4_sse2, &vpx_d45_predictor_4x4_c, 4,
  119. 8),
  120. IntraPredParam(&vpx_d45_predictor_8x8_sse2, &vpx_d45_predictor_8x8_c, 8,
  121. 8),
  122. IntraPredParam(&vpx_d207_predictor_4x4_sse2, &vpx_d207_predictor_4x4_c,
  123. 4, 8),
  124. IntraPredParam(&vpx_dc_128_predictor_4x4_sse2,
  125. &vpx_dc_128_predictor_4x4_c, 4, 8),
  126. IntraPredParam(&vpx_dc_128_predictor_8x8_sse2,
  127. &vpx_dc_128_predictor_8x8_c, 8, 8),
  128. IntraPredParam(&vpx_dc_128_predictor_16x16_sse2,
  129. &vpx_dc_128_predictor_16x16_c, 16, 8),
  130. IntraPredParam(&vpx_dc_128_predictor_32x32_sse2,
  131. &vpx_dc_128_predictor_32x32_c, 32, 8),
  132. IntraPredParam(&vpx_dc_left_predictor_4x4_sse2,
  133. &vpx_dc_left_predictor_4x4_c, 4, 8),
  134. IntraPredParam(&vpx_dc_left_predictor_8x8_sse2,
  135. &vpx_dc_left_predictor_8x8_c, 8, 8),
  136. IntraPredParam(&vpx_dc_left_predictor_16x16_sse2,
  137. &vpx_dc_left_predictor_16x16_c, 16, 8),
  138. IntraPredParam(&vpx_dc_left_predictor_32x32_sse2,
  139. &vpx_dc_left_predictor_32x32_c, 32, 8),
  140. IntraPredParam(&vpx_dc_predictor_4x4_sse2, &vpx_dc_predictor_4x4_c, 4,
  141. 8),
  142. IntraPredParam(&vpx_dc_predictor_8x8_sse2, &vpx_dc_predictor_8x8_c, 8,
  143. 8),
  144. IntraPredParam(&vpx_dc_predictor_16x16_sse2, &vpx_dc_predictor_16x16_c,
  145. 16, 8),
  146. IntraPredParam(&vpx_dc_predictor_32x32_sse2, &vpx_dc_predictor_32x32_c,
  147. 32, 8),
  148. IntraPredParam(&vpx_dc_top_predictor_4x4_sse2,
  149. &vpx_dc_top_predictor_4x4_c, 4, 8),
  150. IntraPredParam(&vpx_dc_top_predictor_8x8_sse2,
  151. &vpx_dc_top_predictor_8x8_c, 8, 8),
  152. IntraPredParam(&vpx_dc_top_predictor_16x16_sse2,
  153. &vpx_dc_top_predictor_16x16_c, 16, 8),
  154. IntraPredParam(&vpx_dc_top_predictor_32x32_sse2,
  155. &vpx_dc_top_predictor_32x32_c, 32, 8),
  156. IntraPredParam(&vpx_h_predictor_4x4_sse2, &vpx_h_predictor_4x4_c, 4, 8),
  157. IntraPredParam(&vpx_h_predictor_8x8_sse2, &vpx_h_predictor_8x8_c, 8, 8),
  158. IntraPredParam(&vpx_h_predictor_16x16_sse2, &vpx_h_predictor_16x16_c,
  159. 16, 8),
  160. IntraPredParam(&vpx_h_predictor_32x32_sse2, &vpx_h_predictor_32x32_c,
  161. 32, 8),
  162. IntraPredParam(&vpx_tm_predictor_4x4_sse2, &vpx_tm_predictor_4x4_c, 4,
  163. 8),
  164. IntraPredParam(&vpx_tm_predictor_8x8_sse2, &vpx_tm_predictor_8x8_c, 8,
  165. 8),
  166. IntraPredParam(&vpx_tm_predictor_16x16_sse2, &vpx_tm_predictor_16x16_c,
  167. 16, 8),
  168. IntraPredParam(&vpx_tm_predictor_32x32_sse2, &vpx_tm_predictor_32x32_c,
  169. 32, 8),
  170. IntraPredParam(&vpx_v_predictor_4x4_sse2, &vpx_v_predictor_4x4_c, 4, 8),
  171. IntraPredParam(&vpx_v_predictor_8x8_sse2, &vpx_v_predictor_8x8_c, 8, 8),
  172. IntraPredParam(&vpx_v_predictor_16x16_sse2, &vpx_v_predictor_16x16_c,
  173. 16, 8),
  174. IntraPredParam(&vpx_v_predictor_32x32_sse2, &vpx_v_predictor_32x32_c,
  175. 32, 8)));
  176. #endif // HAVE_SSE2
  177. #if HAVE_SSSE3
  178. INSTANTIATE_TEST_CASE_P(
  179. SSSE3, VP9IntraPredTest,
  180. ::testing::Values(IntraPredParam(&vpx_d45_predictor_16x16_ssse3,
  181. &vpx_d45_predictor_16x16_c, 16, 8),
  182. IntraPredParam(&vpx_d45_predictor_32x32_ssse3,
  183. &vpx_d45_predictor_32x32_c, 32, 8),
  184. IntraPredParam(&vpx_d63_predictor_4x4_ssse3,
  185. &vpx_d63_predictor_4x4_c, 4, 8),
  186. IntraPredParam(&vpx_d63_predictor_8x8_ssse3,
  187. &vpx_d63_predictor_8x8_c, 8, 8),
  188. IntraPredParam(&vpx_d63_predictor_16x16_ssse3,
  189. &vpx_d63_predictor_16x16_c, 16, 8),
  190. IntraPredParam(&vpx_d63_predictor_32x32_ssse3,
  191. &vpx_d63_predictor_32x32_c, 32, 8),
  192. IntraPredParam(&vpx_d153_predictor_4x4_ssse3,
  193. &vpx_d153_predictor_4x4_c, 4, 8),
  194. IntraPredParam(&vpx_d153_predictor_8x8_ssse3,
  195. &vpx_d153_predictor_8x8_c, 8, 8),
  196. IntraPredParam(&vpx_d153_predictor_16x16_ssse3,
  197. &vpx_d153_predictor_16x16_c, 16, 8),
  198. IntraPredParam(&vpx_d153_predictor_32x32_ssse3,
  199. &vpx_d153_predictor_32x32_c, 32, 8),
  200. IntraPredParam(&vpx_d207_predictor_8x8_ssse3,
  201. &vpx_d207_predictor_8x8_c, 8, 8),
  202. IntraPredParam(&vpx_d207_predictor_16x16_ssse3,
  203. &vpx_d207_predictor_16x16_c, 16, 8),
  204. IntraPredParam(&vpx_d207_predictor_32x32_ssse3,
  205. &vpx_d207_predictor_32x32_c, 32, 8)));
  206. #endif // HAVE_SSSE3
  207. #if HAVE_NEON
  208. INSTANTIATE_TEST_CASE_P(
  209. NEON, VP9IntraPredTest,
  210. ::testing::Values(
  211. IntraPredParam(&vpx_d45_predictor_4x4_neon, &vpx_d45_predictor_4x4_c, 4,
  212. 8),
  213. IntraPredParam(&vpx_d45_predictor_8x8_neon, &vpx_d45_predictor_8x8_c, 8,
  214. 8),
  215. IntraPredParam(&vpx_d45_predictor_16x16_neon,
  216. &vpx_d45_predictor_16x16_c, 16, 8),
  217. IntraPredParam(&vpx_d45_predictor_32x32_neon,
  218. &vpx_d45_predictor_32x32_c, 32, 8),
  219. IntraPredParam(&vpx_d135_predictor_4x4_neon, &vpx_d135_predictor_4x4_c,
  220. 4, 8),
  221. IntraPredParam(&vpx_d135_predictor_8x8_neon, &vpx_d135_predictor_8x8_c,
  222. 8, 8),
  223. IntraPredParam(&vpx_d135_predictor_16x16_neon,
  224. &vpx_d135_predictor_16x16_c, 16, 8),
  225. IntraPredParam(&vpx_d135_predictor_32x32_neon,
  226. &vpx_d135_predictor_32x32_c, 32, 8),
  227. IntraPredParam(&vpx_dc_128_predictor_4x4_neon,
  228. &vpx_dc_128_predictor_4x4_c, 4, 8),
  229. IntraPredParam(&vpx_dc_128_predictor_8x8_neon,
  230. &vpx_dc_128_predictor_8x8_c, 8, 8),
  231. IntraPredParam(&vpx_dc_128_predictor_16x16_neon,
  232. &vpx_dc_128_predictor_16x16_c, 16, 8),
  233. IntraPredParam(&vpx_dc_128_predictor_32x32_neon,
  234. &vpx_dc_128_predictor_32x32_c, 32, 8),
  235. IntraPredParam(&vpx_dc_left_predictor_4x4_neon,
  236. &vpx_dc_left_predictor_4x4_c, 4, 8),
  237. IntraPredParam(&vpx_dc_left_predictor_8x8_neon,
  238. &vpx_dc_left_predictor_8x8_c, 8, 8),
  239. IntraPredParam(&vpx_dc_left_predictor_16x16_neon,
  240. &vpx_dc_left_predictor_16x16_c, 16, 8),
  241. IntraPredParam(&vpx_dc_left_predictor_32x32_neon,
  242. &vpx_dc_left_predictor_32x32_c, 32, 8),
  243. IntraPredParam(&vpx_dc_predictor_4x4_neon, &vpx_dc_predictor_4x4_c, 4,
  244. 8),
  245. IntraPredParam(&vpx_dc_predictor_8x8_neon, &vpx_dc_predictor_8x8_c, 8,
  246. 8),
  247. IntraPredParam(&vpx_dc_predictor_16x16_neon, &vpx_dc_predictor_16x16_c,
  248. 16, 8),
  249. IntraPredParam(&vpx_dc_predictor_32x32_neon, &vpx_dc_predictor_32x32_c,
  250. 32, 8),
  251. IntraPredParam(&vpx_dc_top_predictor_4x4_neon,
  252. &vpx_dc_top_predictor_4x4_c, 4, 8),
  253. IntraPredParam(&vpx_dc_top_predictor_8x8_neon,
  254. &vpx_dc_top_predictor_8x8_c, 8, 8),
  255. IntraPredParam(&vpx_dc_top_predictor_16x16_neon,
  256. &vpx_dc_top_predictor_16x16_c, 16, 8),
  257. IntraPredParam(&vpx_dc_top_predictor_32x32_neon,
  258. &vpx_dc_top_predictor_32x32_c, 32, 8),
  259. IntraPredParam(&vpx_h_predictor_4x4_neon, &vpx_h_predictor_4x4_c, 4, 8),
  260. IntraPredParam(&vpx_h_predictor_8x8_neon, &vpx_h_predictor_8x8_c, 8, 8),
  261. IntraPredParam(&vpx_h_predictor_16x16_neon, &vpx_h_predictor_16x16_c,
  262. 16, 8),
  263. IntraPredParam(&vpx_h_predictor_32x32_neon, &vpx_h_predictor_32x32_c,
  264. 32, 8),
  265. IntraPredParam(&vpx_tm_predictor_4x4_neon, &vpx_tm_predictor_4x4_c, 4,
  266. 8),
  267. IntraPredParam(&vpx_tm_predictor_8x8_neon, &vpx_tm_predictor_8x8_c, 8,
  268. 8),
  269. IntraPredParam(&vpx_tm_predictor_16x16_neon, &vpx_tm_predictor_16x16_c,
  270. 16, 8),
  271. IntraPredParam(&vpx_tm_predictor_32x32_neon, &vpx_tm_predictor_32x32_c,
  272. 32, 8),
  273. IntraPredParam(&vpx_v_predictor_4x4_neon, &vpx_v_predictor_4x4_c, 4, 8),
  274. IntraPredParam(&vpx_v_predictor_8x8_neon, &vpx_v_predictor_8x8_c, 8, 8),
  275. IntraPredParam(&vpx_v_predictor_16x16_neon, &vpx_v_predictor_16x16_c,
  276. 16, 8),
  277. IntraPredParam(&vpx_v_predictor_32x32_neon, &vpx_v_predictor_32x32_c,
  278. 32, 8)));
  279. #endif // HAVE_NEON
  280. #if HAVE_DSPR2
  281. INSTANTIATE_TEST_CASE_P(
  282. DSPR2, VP9IntraPredTest,
  283. ::testing::Values(IntraPredParam(&vpx_dc_predictor_4x4_dspr2,
  284. &vpx_dc_predictor_4x4_c, 4, 8),
  285. IntraPredParam(&vpx_dc_predictor_8x8_dspr2,
  286. &vpx_dc_predictor_8x8_c, 8, 8),
  287. IntraPredParam(&vpx_dc_predictor_16x16_dspr2,
  288. &vpx_dc_predictor_16x16_c, 16, 8),
  289. IntraPredParam(&vpx_h_predictor_4x4_dspr2,
  290. &vpx_h_predictor_4x4_c, 4, 8),
  291. IntraPredParam(&vpx_h_predictor_8x8_dspr2,
  292. &vpx_h_predictor_8x8_c, 8, 8),
  293. IntraPredParam(&vpx_h_predictor_16x16_dspr2,
  294. &vpx_h_predictor_16x16_c, 16, 8),
  295. IntraPredParam(&vpx_tm_predictor_4x4_dspr2,
  296. &vpx_tm_predictor_4x4_c, 4, 8),
  297. IntraPredParam(&vpx_tm_predictor_8x8_dspr2,
  298. &vpx_tm_predictor_8x8_c, 8, 8)));
  299. #endif // HAVE_DSPR2
  300. #if HAVE_MSA
  301. INSTANTIATE_TEST_CASE_P(
  302. MSA, VP9IntraPredTest,
  303. ::testing::Values(
  304. IntraPredParam(&vpx_dc_128_predictor_4x4_msa,
  305. &vpx_dc_128_predictor_4x4_c, 4, 8),
  306. IntraPredParam(&vpx_dc_128_predictor_8x8_msa,
  307. &vpx_dc_128_predictor_8x8_c, 8, 8),
  308. IntraPredParam(&vpx_dc_128_predictor_16x16_msa,
  309. &vpx_dc_128_predictor_16x16_c, 16, 8),
  310. IntraPredParam(&vpx_dc_128_predictor_32x32_msa,
  311. &vpx_dc_128_predictor_32x32_c, 32, 8),
  312. IntraPredParam(&vpx_dc_left_predictor_4x4_msa,
  313. &vpx_dc_left_predictor_4x4_c, 4, 8),
  314. IntraPredParam(&vpx_dc_left_predictor_8x8_msa,
  315. &vpx_dc_left_predictor_8x8_c, 8, 8),
  316. IntraPredParam(&vpx_dc_left_predictor_16x16_msa,
  317. &vpx_dc_left_predictor_16x16_c, 16, 8),
  318. IntraPredParam(&vpx_dc_left_predictor_32x32_msa,
  319. &vpx_dc_left_predictor_32x32_c, 32, 8),
  320. IntraPredParam(&vpx_dc_predictor_4x4_msa, &vpx_dc_predictor_4x4_c, 4,
  321. 8),
  322. IntraPredParam(&vpx_dc_predictor_8x8_msa, &vpx_dc_predictor_8x8_c, 8,
  323. 8),
  324. IntraPredParam(&vpx_dc_predictor_16x16_msa, &vpx_dc_predictor_16x16_c,
  325. 16, 8),
  326. IntraPredParam(&vpx_dc_predictor_32x32_msa, &vpx_dc_predictor_32x32_c,
  327. 32, 8),
  328. IntraPredParam(&vpx_dc_top_predictor_4x4_msa,
  329. &vpx_dc_top_predictor_4x4_c, 4, 8),
  330. IntraPredParam(&vpx_dc_top_predictor_8x8_msa,
  331. &vpx_dc_top_predictor_8x8_c, 8, 8),
  332. IntraPredParam(&vpx_dc_top_predictor_16x16_msa,
  333. &vpx_dc_top_predictor_16x16_c, 16, 8),
  334. IntraPredParam(&vpx_dc_top_predictor_32x32_msa,
  335. &vpx_dc_top_predictor_32x32_c, 32, 8),
  336. IntraPredParam(&vpx_h_predictor_4x4_msa, &vpx_h_predictor_4x4_c, 4, 8),
  337. IntraPredParam(&vpx_h_predictor_8x8_msa, &vpx_h_predictor_8x8_c, 8, 8),
  338. IntraPredParam(&vpx_h_predictor_16x16_msa, &vpx_h_predictor_16x16_c, 16,
  339. 8),
  340. IntraPredParam(&vpx_h_predictor_32x32_msa, &vpx_h_predictor_32x32_c, 32,
  341. 8),
  342. IntraPredParam(&vpx_tm_predictor_4x4_msa, &vpx_tm_predictor_4x4_c, 4,
  343. 8),
  344. IntraPredParam(&vpx_tm_predictor_8x8_msa, &vpx_tm_predictor_8x8_c, 8,
  345. 8),
  346. IntraPredParam(&vpx_tm_predictor_16x16_msa, &vpx_tm_predictor_16x16_c,
  347. 16, 8),
  348. IntraPredParam(&vpx_tm_predictor_32x32_msa, &vpx_tm_predictor_32x32_c,
  349. 32, 8),
  350. IntraPredParam(&vpx_v_predictor_4x4_msa, &vpx_v_predictor_4x4_c, 4, 8),
  351. IntraPredParam(&vpx_v_predictor_8x8_msa, &vpx_v_predictor_8x8_c, 8, 8),
  352. IntraPredParam(&vpx_v_predictor_16x16_msa, &vpx_v_predictor_16x16_c, 16,
  353. 8),
  354. IntraPredParam(&vpx_v_predictor_32x32_msa, &vpx_v_predictor_32x32_c, 32,
  355. 8)));
  356. #endif // HAVE_MSA
  357. #if HAVE_VSX
  358. INSTANTIATE_TEST_CASE_P(
  359. VSX, VP9IntraPredTest,
  360. ::testing::Values(
  361. IntraPredParam(&vpx_d45_predictor_8x8_vsx, &vpx_d45_predictor_8x8_c, 8,
  362. 8),
  363. IntraPredParam(&vpx_d45_predictor_16x16_vsx, &vpx_d45_predictor_16x16_c,
  364. 16, 8),
  365. IntraPredParam(&vpx_d45_predictor_32x32_vsx, &vpx_d45_predictor_32x32_c,
  366. 32, 8),
  367. IntraPredParam(&vpx_d63_predictor_8x8_vsx, &vpx_d63_predictor_8x8_c, 8,
  368. 8),
  369. IntraPredParam(&vpx_d63_predictor_16x16_vsx, &vpx_d63_predictor_16x16_c,
  370. 16, 8),
  371. IntraPredParam(&vpx_d63_predictor_32x32_vsx, &vpx_d63_predictor_32x32_c,
  372. 32, 8),
  373. IntraPredParam(&vpx_dc_128_predictor_16x16_vsx,
  374. &vpx_dc_128_predictor_16x16_c, 16, 8),
  375. IntraPredParam(&vpx_dc_128_predictor_32x32_vsx,
  376. &vpx_dc_128_predictor_32x32_c, 32, 8),
  377. IntraPredParam(&vpx_dc_left_predictor_16x16_vsx,
  378. &vpx_dc_left_predictor_16x16_c, 16, 8),
  379. IntraPredParam(&vpx_dc_left_predictor_32x32_vsx,
  380. &vpx_dc_left_predictor_32x32_c, 32, 8),
  381. IntraPredParam(&vpx_dc_predictor_8x8_vsx, &vpx_dc_predictor_8x8_c, 8,
  382. 8),
  383. IntraPredParam(&vpx_dc_predictor_16x16_vsx, &vpx_dc_predictor_16x16_c,
  384. 16, 8),
  385. IntraPredParam(&vpx_dc_predictor_32x32_vsx, &vpx_dc_predictor_32x32_c,
  386. 32, 8),
  387. IntraPredParam(&vpx_dc_top_predictor_16x16_vsx,
  388. &vpx_dc_top_predictor_16x16_c, 16, 8),
  389. IntraPredParam(&vpx_dc_top_predictor_32x32_vsx,
  390. &vpx_dc_top_predictor_32x32_c, 32, 8),
  391. IntraPredParam(&vpx_h_predictor_4x4_vsx, &vpx_h_predictor_4x4_c, 4, 8),
  392. IntraPredParam(&vpx_h_predictor_8x8_vsx, &vpx_h_predictor_8x8_c, 8, 8),
  393. IntraPredParam(&vpx_h_predictor_16x16_vsx, &vpx_h_predictor_16x16_c, 16,
  394. 8),
  395. IntraPredParam(&vpx_h_predictor_32x32_vsx, &vpx_h_predictor_32x32_c, 32,
  396. 8),
  397. IntraPredParam(&vpx_tm_predictor_4x4_vsx, &vpx_tm_predictor_4x4_c, 4,
  398. 8),
  399. IntraPredParam(&vpx_tm_predictor_8x8_vsx, &vpx_tm_predictor_8x8_c, 8,
  400. 8),
  401. IntraPredParam(&vpx_tm_predictor_16x16_vsx, &vpx_tm_predictor_16x16_c,
  402. 16, 8),
  403. IntraPredParam(&vpx_tm_predictor_32x32_vsx, &vpx_tm_predictor_32x32_c,
  404. 32, 8),
  405. IntraPredParam(&vpx_v_predictor_16x16_vsx, &vpx_v_predictor_16x16_c, 16,
  406. 8),
  407. IntraPredParam(&vpx_v_predictor_32x32_vsx, &vpx_v_predictor_32x32_c, 32,
  408. 8)));
  409. #endif // HAVE_VSX
  410. #if CONFIG_VP9_HIGHBITDEPTH
  411. typedef void (*HighbdIntraPred)(uint16_t *dst, ptrdiff_t stride,
  412. const uint16_t *above, const uint16_t *left,
  413. int bps);
  414. struct HighbdIntraPredParam {
  415. HighbdIntraPredParam(HighbdIntraPred pred = NULL, HighbdIntraPred ref = NULL,
  416. int block_size_value = 0, int bit_depth_value = 0)
  417. : pred_fn(pred), ref_fn(ref), block_size(block_size_value),
  418. bit_depth(bit_depth_value) {}
  419. HighbdIntraPred pred_fn;
  420. HighbdIntraPred ref_fn;
  421. int block_size;
  422. int bit_depth;
  423. };
  424. template <>
  425. void IntraPredTest<uint16_t, HighbdIntraPredParam>::Predict() {
  426. const int bit_depth = params_.bit_depth;
  427. params_.ref_fn(ref_dst_, stride_, above_row_, left_col_, bit_depth);
  428. ASM_REGISTER_STATE_CHECK(
  429. params_.pred_fn(dst_, stride_, above_row_, left_col_, bit_depth));
  430. }
  431. typedef IntraPredTest<uint16_t, HighbdIntraPredParam> VP9HighbdIntraPredTest;
  432. TEST_P(VP9HighbdIntraPredTest, HighbdIntraPredTests) {
  433. // max block size is 32
  434. DECLARE_ALIGNED(16, uint16_t, left_col[2 * 32]);
  435. DECLARE_ALIGNED(16, uint16_t, above_data[2 * 32 + 32]);
  436. DECLARE_ALIGNED(16, uint16_t, dst[3 * 32 * 32]);
  437. DECLARE_ALIGNED(16, uint16_t, ref_dst[3 * 32 * 32]);
  438. RunTest(left_col, above_data, dst, ref_dst);
  439. }
  440. #if HAVE_SSSE3
  441. INSTANTIATE_TEST_CASE_P(
  442. SSSE3_TO_C_8, VP9HighbdIntraPredTest,
  443. ::testing::Values(
  444. HighbdIntraPredParam(&vpx_highbd_d45_predictor_4x4_ssse3,
  445. &vpx_highbd_d45_predictor_4x4_c, 4, 8),
  446. HighbdIntraPredParam(&vpx_highbd_d45_predictor_8x8_ssse3,
  447. &vpx_highbd_d45_predictor_8x8_c, 8, 8),
  448. HighbdIntraPredParam(&vpx_highbd_d45_predictor_16x16_ssse3,
  449. &vpx_highbd_d45_predictor_16x16_c, 16, 8),
  450. HighbdIntraPredParam(&vpx_highbd_d45_predictor_32x32_ssse3,
  451. &vpx_highbd_d45_predictor_32x32_c, 32, 8),
  452. HighbdIntraPredParam(&vpx_highbd_d63_predictor_8x8_ssse3,
  453. &vpx_highbd_d63_predictor_8x8_c, 8, 8),
  454. HighbdIntraPredParam(&vpx_highbd_d63_predictor_16x16_ssse3,
  455. &vpx_highbd_d63_predictor_16x16_c, 16, 8),
  456. HighbdIntraPredParam(&vpx_highbd_d63_predictor_32x32_c,
  457. &vpx_highbd_d63_predictor_32x32_ssse3, 32, 8),
  458. HighbdIntraPredParam(&vpx_highbd_d207_predictor_8x8_ssse3,
  459. &vpx_highbd_d207_predictor_8x8_c, 8, 8),
  460. HighbdIntraPredParam(&vpx_highbd_d207_predictor_16x16_ssse3,
  461. &vpx_highbd_d207_predictor_16x16_c, 16, 8),
  462. HighbdIntraPredParam(&vpx_highbd_d207_predictor_32x32_ssse3,
  463. &vpx_highbd_d207_predictor_32x32_c, 32, 8)));
  464. INSTANTIATE_TEST_CASE_P(
  465. SSSE3_TO_C_10, VP9HighbdIntraPredTest,
  466. ::testing::Values(
  467. HighbdIntraPredParam(&vpx_highbd_d45_predictor_4x4_ssse3,
  468. &vpx_highbd_d45_predictor_4x4_c, 4, 10),
  469. HighbdIntraPredParam(&vpx_highbd_d45_predictor_8x8_ssse3,
  470. &vpx_highbd_d45_predictor_8x8_c, 8, 10),
  471. HighbdIntraPredParam(&vpx_highbd_d45_predictor_16x16_ssse3,
  472. &vpx_highbd_d45_predictor_16x16_c, 16, 10),
  473. HighbdIntraPredParam(&vpx_highbd_d45_predictor_32x32_ssse3,
  474. &vpx_highbd_d45_predictor_32x32_c, 32, 10),
  475. HighbdIntraPredParam(&vpx_highbd_d63_predictor_8x8_ssse3,
  476. &vpx_highbd_d63_predictor_8x8_c, 8, 10),
  477. HighbdIntraPredParam(&vpx_highbd_d63_predictor_16x16_ssse3,
  478. &vpx_highbd_d63_predictor_16x16_c, 16, 10),
  479. HighbdIntraPredParam(&vpx_highbd_d63_predictor_32x32_c,
  480. &vpx_highbd_d63_predictor_32x32_ssse3, 32, 10),
  481. HighbdIntraPredParam(&vpx_highbd_d207_predictor_8x8_ssse3,
  482. &vpx_highbd_d207_predictor_8x8_c, 8, 10),
  483. HighbdIntraPredParam(&vpx_highbd_d207_predictor_16x16_ssse3,
  484. &vpx_highbd_d207_predictor_16x16_c, 16, 10),
  485. HighbdIntraPredParam(&vpx_highbd_d207_predictor_32x32_ssse3,
  486. &vpx_highbd_d207_predictor_32x32_c, 32, 10)));
  487. INSTANTIATE_TEST_CASE_P(
  488. SSSE3_TO_C_12, VP9HighbdIntraPredTest,
  489. ::testing::Values(
  490. HighbdIntraPredParam(&vpx_highbd_d45_predictor_4x4_ssse3,
  491. &vpx_highbd_d45_predictor_4x4_c, 4, 12),
  492. HighbdIntraPredParam(&vpx_highbd_d45_predictor_8x8_ssse3,
  493. &vpx_highbd_d45_predictor_8x8_c, 8, 12),
  494. HighbdIntraPredParam(&vpx_highbd_d45_predictor_16x16_ssse3,
  495. &vpx_highbd_d45_predictor_16x16_c, 16, 12),
  496. HighbdIntraPredParam(&vpx_highbd_d45_predictor_32x32_ssse3,
  497. &vpx_highbd_d45_predictor_32x32_c, 32, 12),
  498. HighbdIntraPredParam(&vpx_highbd_d63_predictor_8x8_ssse3,
  499. &vpx_highbd_d63_predictor_8x8_c, 8, 12),
  500. HighbdIntraPredParam(&vpx_highbd_d63_predictor_16x16_ssse3,
  501. &vpx_highbd_d63_predictor_16x16_c, 16, 12),
  502. HighbdIntraPredParam(&vpx_highbd_d63_predictor_32x32_c,
  503. &vpx_highbd_d63_predictor_32x32_ssse3, 32, 12),
  504. HighbdIntraPredParam(&vpx_highbd_d207_predictor_8x8_ssse3,
  505. &vpx_highbd_d207_predictor_8x8_c, 8, 12),
  506. HighbdIntraPredParam(&vpx_highbd_d207_predictor_16x16_ssse3,
  507. &vpx_highbd_d207_predictor_16x16_c, 16, 12),
  508. HighbdIntraPredParam(&vpx_highbd_d207_predictor_32x32_ssse3,
  509. &vpx_highbd_d207_predictor_32x32_c, 32, 12)));
  510. #endif // HAVE_SSSE3
  511. #if HAVE_SSE2
  512. INSTANTIATE_TEST_CASE_P(
  513. SSE2_TO_C_8, VP9HighbdIntraPredTest,
  514. ::testing::Values(
  515. HighbdIntraPredParam(&vpx_highbd_dc_128_predictor_4x4_sse2,
  516. &vpx_highbd_dc_128_predictor_4x4_c, 4, 8),
  517. HighbdIntraPredParam(&vpx_highbd_dc_128_predictor_8x8_sse2,
  518. &vpx_highbd_dc_128_predictor_8x8_c, 8, 8),
  519. HighbdIntraPredParam(&vpx_highbd_dc_128_predictor_16x16_sse2,
  520. &vpx_highbd_dc_128_predictor_16x16_c, 16, 8),
  521. HighbdIntraPredParam(&vpx_highbd_dc_128_predictor_32x32_sse2,
  522. &vpx_highbd_dc_128_predictor_32x32_c, 32, 8),
  523. HighbdIntraPredParam(&vpx_highbd_d63_predictor_4x4_sse2,
  524. &vpx_highbd_d63_predictor_4x4_c, 4, 8),
  525. HighbdIntraPredParam(&vpx_highbd_d207_predictor_4x4_sse2,
  526. &vpx_highbd_d207_predictor_4x4_c, 4, 8),
  527. HighbdIntraPredParam(&vpx_highbd_dc_left_predictor_4x4_sse2,
  528. &vpx_highbd_dc_left_predictor_4x4_c, 4, 8),
  529. HighbdIntraPredParam(&vpx_highbd_dc_left_predictor_8x8_sse2,
  530. &vpx_highbd_dc_left_predictor_8x8_c, 8, 8),
  531. HighbdIntraPredParam(&vpx_highbd_dc_left_predictor_16x16_sse2,
  532. &vpx_highbd_dc_left_predictor_16x16_c, 16, 8),
  533. HighbdIntraPredParam(&vpx_highbd_dc_left_predictor_32x32_sse2,
  534. &vpx_highbd_dc_left_predictor_32x32_c, 32, 8),
  535. HighbdIntraPredParam(&vpx_highbd_dc_predictor_4x4_sse2,
  536. &vpx_highbd_dc_predictor_4x4_c, 4, 8),
  537. HighbdIntraPredParam(&vpx_highbd_dc_predictor_8x8_sse2,
  538. &vpx_highbd_dc_predictor_8x8_c, 8, 8),
  539. HighbdIntraPredParam(&vpx_highbd_dc_predictor_16x16_sse2,
  540. &vpx_highbd_dc_predictor_16x16_c, 16, 8),
  541. HighbdIntraPredParam(&vpx_highbd_dc_predictor_32x32_sse2,
  542. &vpx_highbd_dc_predictor_32x32_c, 32, 8),
  543. HighbdIntraPredParam(&vpx_highbd_dc_top_predictor_4x4_sse2,
  544. &vpx_highbd_dc_top_predictor_4x4_c, 4, 8),
  545. HighbdIntraPredParam(&vpx_highbd_dc_top_predictor_8x8_sse2,
  546. &vpx_highbd_dc_top_predictor_8x8_c, 8, 8),
  547. HighbdIntraPredParam(&vpx_highbd_dc_top_predictor_16x16_sse2,
  548. &vpx_highbd_dc_top_predictor_16x16_c, 16, 8),
  549. HighbdIntraPredParam(&vpx_highbd_dc_top_predictor_32x32_sse2,
  550. &vpx_highbd_dc_top_predictor_32x32_c, 32, 8),
  551. HighbdIntraPredParam(&vpx_highbd_tm_predictor_4x4_sse2,
  552. &vpx_highbd_tm_predictor_4x4_c, 4, 8),
  553. HighbdIntraPredParam(&vpx_highbd_tm_predictor_8x8_sse2,
  554. &vpx_highbd_tm_predictor_8x8_c, 8, 8),
  555. HighbdIntraPredParam(&vpx_highbd_tm_predictor_16x16_sse2,
  556. &vpx_highbd_tm_predictor_16x16_c, 16, 8),
  557. HighbdIntraPredParam(&vpx_highbd_tm_predictor_32x32_sse2,
  558. &vpx_highbd_tm_predictor_32x32_c, 32, 8),
  559. HighbdIntraPredParam(&vpx_highbd_h_predictor_4x4_sse2,
  560. &vpx_highbd_h_predictor_4x4_c, 4, 8),
  561. HighbdIntraPredParam(&vpx_highbd_h_predictor_8x8_sse2,
  562. &vpx_highbd_h_predictor_8x8_c, 8, 8),
  563. HighbdIntraPredParam(&vpx_highbd_h_predictor_16x16_sse2,
  564. &vpx_highbd_h_predictor_16x16_c, 16, 8),
  565. HighbdIntraPredParam(&vpx_highbd_h_predictor_32x32_sse2,
  566. &vpx_highbd_h_predictor_32x32_c, 32, 8),
  567. HighbdIntraPredParam(&vpx_highbd_v_predictor_4x4_sse2,
  568. &vpx_highbd_v_predictor_4x4_c, 4, 8),
  569. HighbdIntraPredParam(&vpx_highbd_v_predictor_8x8_sse2,
  570. &vpx_highbd_v_predictor_8x8_c, 8, 8),
  571. HighbdIntraPredParam(&vpx_highbd_v_predictor_16x16_sse2,
  572. &vpx_highbd_v_predictor_16x16_c, 16, 8),
  573. HighbdIntraPredParam(&vpx_highbd_v_predictor_32x32_sse2,
  574. &vpx_highbd_v_predictor_32x32_c, 32, 8)));
  575. INSTANTIATE_TEST_CASE_P(
  576. SSE2_TO_C_10, VP9HighbdIntraPredTest,
  577. ::testing::Values(
  578. HighbdIntraPredParam(&vpx_highbd_dc_128_predictor_4x4_sse2,
  579. &vpx_highbd_dc_128_predictor_4x4_c, 4, 10),
  580. HighbdIntraPredParam(&vpx_highbd_dc_128_predictor_8x8_sse2,
  581. &vpx_highbd_dc_128_predictor_8x8_c, 8, 10),
  582. HighbdIntraPredParam(&vpx_highbd_dc_128_predictor_16x16_sse2,
  583. &vpx_highbd_dc_128_predictor_16x16_c, 16, 10),
  584. HighbdIntraPredParam(&vpx_highbd_dc_128_predictor_32x32_sse2,
  585. &vpx_highbd_dc_128_predictor_32x32_c, 32, 10),
  586. HighbdIntraPredParam(&vpx_highbd_d63_predictor_4x4_sse2,
  587. &vpx_highbd_d63_predictor_4x4_c, 4, 10),
  588. HighbdIntraPredParam(&vpx_highbd_d207_predictor_4x4_sse2,
  589. &vpx_highbd_d207_predictor_4x4_c, 4, 10),
  590. HighbdIntraPredParam(&vpx_highbd_dc_left_predictor_4x4_sse2,
  591. &vpx_highbd_dc_left_predictor_4x4_c, 4, 10),
  592. HighbdIntraPredParam(&vpx_highbd_dc_left_predictor_8x8_sse2,
  593. &vpx_highbd_dc_left_predictor_8x8_c, 8, 10),
  594. HighbdIntraPredParam(&vpx_highbd_dc_left_predictor_16x16_sse2,
  595. &vpx_highbd_dc_left_predictor_16x16_c, 16, 10),
  596. HighbdIntraPredParam(&vpx_highbd_dc_left_predictor_32x32_sse2,
  597. &vpx_highbd_dc_left_predictor_32x32_c, 32, 10),
  598. HighbdIntraPredParam(&vpx_highbd_dc_predictor_4x4_sse2,
  599. &vpx_highbd_dc_predictor_4x4_c, 4, 10),
  600. HighbdIntraPredParam(&vpx_highbd_dc_predictor_8x8_sse2,
  601. &vpx_highbd_dc_predictor_8x8_c, 8, 10),
  602. HighbdIntraPredParam(&vpx_highbd_dc_predictor_16x16_sse2,
  603. &vpx_highbd_dc_predictor_16x16_c, 16, 10),
  604. HighbdIntraPredParam(&vpx_highbd_dc_predictor_32x32_sse2,
  605. &vpx_highbd_dc_predictor_32x32_c, 32, 10),
  606. HighbdIntraPredParam(&vpx_highbd_dc_top_predictor_4x4_sse2,
  607. &vpx_highbd_dc_top_predictor_4x4_c, 4, 10),
  608. HighbdIntraPredParam(&vpx_highbd_dc_top_predictor_8x8_sse2,
  609. &vpx_highbd_dc_top_predictor_8x8_c, 8, 10),
  610. HighbdIntraPredParam(&vpx_highbd_dc_top_predictor_16x16_sse2,
  611. &vpx_highbd_dc_top_predictor_16x16_c, 16, 10),
  612. HighbdIntraPredParam(&vpx_highbd_dc_top_predictor_32x32_sse2,
  613. &vpx_highbd_dc_top_predictor_32x32_c, 32, 10),
  614. HighbdIntraPredParam(&vpx_highbd_tm_predictor_4x4_sse2,
  615. &vpx_highbd_tm_predictor_4x4_c, 4, 10),
  616. HighbdIntraPredParam(&vpx_highbd_tm_predictor_8x8_sse2,
  617. &vpx_highbd_tm_predictor_8x8_c, 8, 10),
  618. HighbdIntraPredParam(&vpx_highbd_tm_predictor_16x16_sse2,
  619. &vpx_highbd_tm_predictor_16x16_c, 16, 10),
  620. HighbdIntraPredParam(&vpx_highbd_tm_predictor_32x32_sse2,
  621. &vpx_highbd_tm_predictor_32x32_c, 32, 10),
  622. HighbdIntraPredParam(&vpx_highbd_h_predictor_4x4_sse2,
  623. &vpx_highbd_h_predictor_4x4_c, 4, 10),
  624. HighbdIntraPredParam(&vpx_highbd_h_predictor_8x8_sse2,
  625. &vpx_highbd_h_predictor_8x8_c, 8, 10),
  626. HighbdIntraPredParam(&vpx_highbd_h_predictor_16x16_sse2,
  627. &vpx_highbd_h_predictor_16x16_c, 16, 10),
  628. HighbdIntraPredParam(&vpx_highbd_h_predictor_32x32_sse2,
  629. &vpx_highbd_h_predictor_32x32_c, 32, 10),
  630. HighbdIntraPredParam(&vpx_highbd_v_predictor_4x4_sse2,
  631. &vpx_highbd_v_predictor_4x4_c, 4, 10),
  632. HighbdIntraPredParam(&vpx_highbd_v_predictor_8x8_sse2,
  633. &vpx_highbd_v_predictor_8x8_c, 8, 10),
  634. HighbdIntraPredParam(&vpx_highbd_v_predictor_16x16_sse2,
  635. &vpx_highbd_v_predictor_16x16_c, 16, 10),
  636. HighbdIntraPredParam(&vpx_highbd_v_predictor_32x32_sse2,
  637. &vpx_highbd_v_predictor_32x32_c, 32, 10)));
  638. INSTANTIATE_TEST_CASE_P(
  639. SSE2_TO_C_12, VP9HighbdIntraPredTest,
  640. ::testing::Values(
  641. HighbdIntraPredParam(&vpx_highbd_dc_128_predictor_4x4_sse2,
  642. &vpx_highbd_dc_128_predictor_4x4_c, 4, 12),
  643. HighbdIntraPredParam(&vpx_highbd_dc_128_predictor_8x8_sse2,
  644. &vpx_highbd_dc_128_predictor_8x8_c, 8, 12),
  645. HighbdIntraPredParam(&vpx_highbd_dc_128_predictor_16x16_sse2,
  646. &vpx_highbd_dc_128_predictor_16x16_c, 16, 12),
  647. HighbdIntraPredParam(&vpx_highbd_dc_128_predictor_32x32_sse2,
  648. &vpx_highbd_dc_128_predictor_32x32_c, 32, 12),
  649. HighbdIntraPredParam(&vpx_highbd_d63_predictor_4x4_sse2,
  650. &vpx_highbd_d63_predictor_4x4_c, 4, 12),
  651. HighbdIntraPredParam(&vpx_highbd_d207_predictor_4x4_sse2,
  652. &vpx_highbd_d207_predictor_4x4_c, 4, 12),
  653. HighbdIntraPredParam(&vpx_highbd_dc_left_predictor_4x4_sse2,
  654. &vpx_highbd_dc_left_predictor_4x4_c, 4, 12),
  655. HighbdIntraPredParam(&vpx_highbd_dc_left_predictor_8x8_sse2,
  656. &vpx_highbd_dc_left_predictor_8x8_c, 8, 12),
  657. HighbdIntraPredParam(&vpx_highbd_dc_left_predictor_16x16_sse2,
  658. &vpx_highbd_dc_left_predictor_16x16_c, 16, 12),
  659. HighbdIntraPredParam(&vpx_highbd_dc_left_predictor_32x32_sse2,
  660. &vpx_highbd_dc_left_predictor_32x32_c, 32, 12),
  661. HighbdIntraPredParam(&vpx_highbd_dc_predictor_4x4_sse2,
  662. &vpx_highbd_dc_predictor_4x4_c, 4, 12),
  663. HighbdIntraPredParam(&vpx_highbd_dc_predictor_8x8_sse2,
  664. &vpx_highbd_dc_predictor_8x8_c, 8, 12),
  665. HighbdIntraPredParam(&vpx_highbd_dc_predictor_16x16_sse2,
  666. &vpx_highbd_dc_predictor_16x16_c, 16, 12),
  667. HighbdIntraPredParam(&vpx_highbd_dc_predictor_32x32_sse2,
  668. &vpx_highbd_dc_predictor_32x32_c, 32, 12),
  669. HighbdIntraPredParam(&vpx_highbd_dc_top_predictor_4x4_sse2,
  670. &vpx_highbd_dc_top_predictor_4x4_c, 4, 12),
  671. HighbdIntraPredParam(&vpx_highbd_dc_top_predictor_8x8_sse2,
  672. &vpx_highbd_dc_top_predictor_8x8_c, 8, 12),
  673. HighbdIntraPredParam(&vpx_highbd_dc_top_predictor_16x16_sse2,
  674. &vpx_highbd_dc_top_predictor_16x16_c, 16, 12),
  675. HighbdIntraPredParam(&vpx_highbd_dc_top_predictor_32x32_sse2,
  676. &vpx_highbd_dc_top_predictor_32x32_c, 32, 12),
  677. HighbdIntraPredParam(&vpx_highbd_tm_predictor_4x4_sse2,
  678. &vpx_highbd_tm_predictor_4x4_c, 4, 12),
  679. HighbdIntraPredParam(&vpx_highbd_tm_predictor_8x8_sse2,
  680. &vpx_highbd_tm_predictor_8x8_c, 8, 12),
  681. HighbdIntraPredParam(&vpx_highbd_tm_predictor_16x16_sse2,
  682. &vpx_highbd_tm_predictor_16x16_c, 16, 12),
  683. HighbdIntraPredParam(&vpx_highbd_tm_predictor_32x32_sse2,
  684. &vpx_highbd_tm_predictor_32x32_c, 32, 12),
  685. HighbdIntraPredParam(&vpx_highbd_h_predictor_4x4_sse2,
  686. &vpx_highbd_h_predictor_4x4_c, 4, 12),
  687. HighbdIntraPredParam(&vpx_highbd_h_predictor_8x8_sse2,
  688. &vpx_highbd_h_predictor_8x8_c, 8, 12),
  689. HighbdIntraPredParam(&vpx_highbd_h_predictor_16x16_sse2,
  690. &vpx_highbd_h_predictor_16x16_c, 16, 12),
  691. HighbdIntraPredParam(&vpx_highbd_h_predictor_32x32_sse2,
  692. &vpx_highbd_h_predictor_32x32_c, 32, 12),
  693. HighbdIntraPredParam(&vpx_highbd_v_predictor_4x4_sse2,
  694. &vpx_highbd_v_predictor_4x4_c, 4, 12),
  695. HighbdIntraPredParam(&vpx_highbd_v_predictor_8x8_sse2,
  696. &vpx_highbd_v_predictor_8x8_c, 8, 12),
  697. HighbdIntraPredParam(&vpx_highbd_v_predictor_16x16_sse2,
  698. &vpx_highbd_v_predictor_16x16_c, 16, 12),
  699. HighbdIntraPredParam(&vpx_highbd_v_predictor_32x32_sse2,
  700. &vpx_highbd_v_predictor_32x32_c, 32, 12)));
  701. #endif // HAVE_SSE2
  702. #if HAVE_NEON
  703. INSTANTIATE_TEST_CASE_P(
  704. NEON_TO_C_8, VP9HighbdIntraPredTest,
  705. ::testing::Values(
  706. HighbdIntraPredParam(&vpx_highbd_d45_predictor_4x4_neon,
  707. &vpx_highbd_d45_predictor_4x4_c, 4, 8),
  708. HighbdIntraPredParam(&vpx_highbd_d45_predictor_8x8_neon,
  709. &vpx_highbd_d45_predictor_8x8_c, 8, 8),
  710. HighbdIntraPredParam(&vpx_highbd_d45_predictor_16x16_neon,
  711. &vpx_highbd_d45_predictor_16x16_c, 16, 8),
  712. HighbdIntraPredParam(&vpx_highbd_d45_predictor_32x32_neon,
  713. &vpx_highbd_d45_predictor_32x32_c, 32, 8),
  714. HighbdIntraPredParam(&vpx_highbd_d135_predictor_4x4_neon,
  715. &vpx_highbd_d135_predictor_4x4_c, 4, 8),
  716. HighbdIntraPredParam(&vpx_highbd_d135_predictor_8x8_neon,
  717. &vpx_highbd_d135_predictor_8x8_c, 8, 8),
  718. HighbdIntraPredParam(&vpx_highbd_d135_predictor_16x16_neon,
  719. &vpx_highbd_d135_predictor_16x16_c, 16, 8),
  720. HighbdIntraPredParam(&vpx_highbd_d135_predictor_32x32_neon,
  721. &vpx_highbd_d135_predictor_32x32_c, 32, 8),
  722. HighbdIntraPredParam(&vpx_highbd_dc_128_predictor_4x4_neon,
  723. &vpx_highbd_dc_128_predictor_4x4_c, 4, 8),
  724. HighbdIntraPredParam(&vpx_highbd_dc_128_predictor_8x8_neon,
  725. &vpx_highbd_dc_128_predictor_8x8_c, 8, 8),
  726. HighbdIntraPredParam(&vpx_highbd_dc_128_predictor_16x16_neon,
  727. &vpx_highbd_dc_128_predictor_16x16_c, 16, 8),
  728. HighbdIntraPredParam(&vpx_highbd_dc_128_predictor_32x32_neon,
  729. &vpx_highbd_dc_128_predictor_32x32_c, 32, 8),
  730. HighbdIntraPredParam(&vpx_highbd_dc_left_predictor_4x4_neon,
  731. &vpx_highbd_dc_left_predictor_4x4_c, 4, 8),
  732. HighbdIntraPredParam(&vpx_highbd_dc_left_predictor_8x8_neon,
  733. &vpx_highbd_dc_left_predictor_8x8_c, 8, 8),
  734. HighbdIntraPredParam(&vpx_highbd_dc_left_predictor_16x16_neon,
  735. &vpx_highbd_dc_left_predictor_16x16_c, 16, 8),
  736. HighbdIntraPredParam(&vpx_highbd_dc_left_predictor_32x32_neon,
  737. &vpx_highbd_dc_left_predictor_32x32_c, 32, 8),
  738. HighbdIntraPredParam(&vpx_highbd_dc_predictor_4x4_neon,
  739. &vpx_highbd_dc_predictor_4x4_c, 4, 8),
  740. HighbdIntraPredParam(&vpx_highbd_dc_predictor_8x8_neon,
  741. &vpx_highbd_dc_predictor_8x8_c, 8, 8),
  742. HighbdIntraPredParam(&vpx_highbd_dc_predictor_16x16_neon,
  743. &vpx_highbd_dc_predictor_16x16_c, 16, 8),
  744. HighbdIntraPredParam(&vpx_highbd_dc_predictor_32x32_neon,
  745. &vpx_highbd_dc_predictor_32x32_c, 32, 8),
  746. HighbdIntraPredParam(&vpx_highbd_dc_top_predictor_4x4_neon,
  747. &vpx_highbd_dc_top_predictor_4x4_c, 4, 8),
  748. HighbdIntraPredParam(&vpx_highbd_dc_top_predictor_8x8_neon,
  749. &vpx_highbd_dc_top_predictor_8x8_c, 8, 8),
  750. HighbdIntraPredParam(&vpx_highbd_dc_top_predictor_16x16_neon,
  751. &vpx_highbd_dc_top_predictor_16x16_c, 16, 8),
  752. HighbdIntraPredParam(&vpx_highbd_dc_top_predictor_32x32_neon,
  753. &vpx_highbd_dc_top_predictor_32x32_c, 32, 8),
  754. HighbdIntraPredParam(&vpx_highbd_h_predictor_4x4_neon,
  755. &vpx_highbd_h_predictor_4x4_c, 4, 8),
  756. HighbdIntraPredParam(&vpx_highbd_h_predictor_8x8_neon,
  757. &vpx_highbd_h_predictor_8x8_c, 8, 8),
  758. HighbdIntraPredParam(&vpx_highbd_h_predictor_16x16_neon,
  759. &vpx_highbd_h_predictor_16x16_c, 16, 8),
  760. HighbdIntraPredParam(&vpx_highbd_h_predictor_32x32_neon,
  761. &vpx_highbd_h_predictor_32x32_c, 32, 8),
  762. HighbdIntraPredParam(&vpx_highbd_tm_predictor_4x4_neon,
  763. &vpx_highbd_tm_predictor_4x4_c, 4, 8),
  764. HighbdIntraPredParam(&vpx_highbd_tm_predictor_8x8_neon,
  765. &vpx_highbd_tm_predictor_8x8_c, 8, 8),
  766. HighbdIntraPredParam(&vpx_highbd_tm_predictor_16x16_neon,
  767. &vpx_highbd_tm_predictor_16x16_c, 16, 8),
  768. HighbdIntraPredParam(&vpx_highbd_tm_predictor_32x32_neon,
  769. &vpx_highbd_tm_predictor_32x32_c, 32, 8),
  770. HighbdIntraPredParam(&vpx_highbd_v_predictor_4x4_neon,
  771. &vpx_highbd_v_predictor_4x4_c, 4, 8),
  772. HighbdIntraPredParam(&vpx_highbd_v_predictor_8x8_neon,
  773. &vpx_highbd_v_predictor_8x8_c, 8, 8),
  774. HighbdIntraPredParam(&vpx_highbd_v_predictor_16x16_neon,
  775. &vpx_highbd_v_predictor_16x16_c, 16, 8),
  776. HighbdIntraPredParam(&vpx_highbd_v_predictor_32x32_neon,
  777. &vpx_highbd_v_predictor_32x32_c, 32, 8)));
  778. INSTANTIATE_TEST_CASE_P(
  779. NEON_TO_C_10, VP9HighbdIntraPredTest,
  780. ::testing::Values(
  781. HighbdIntraPredParam(&vpx_highbd_d45_predictor_4x4_neon,
  782. &vpx_highbd_d45_predictor_4x4_c, 4, 10),
  783. HighbdIntraPredParam(&vpx_highbd_d45_predictor_8x8_neon,
  784. &vpx_highbd_d45_predictor_8x8_c, 8, 10),
  785. HighbdIntraPredParam(&vpx_highbd_d45_predictor_16x16_neon,
  786. &vpx_highbd_d45_predictor_16x16_c, 16, 10),
  787. HighbdIntraPredParam(&vpx_highbd_d45_predictor_32x32_neon,
  788. &vpx_highbd_d45_predictor_32x32_c, 32, 10),
  789. HighbdIntraPredParam(&vpx_highbd_d135_predictor_4x4_neon,
  790. &vpx_highbd_d135_predictor_4x4_c, 4, 10),
  791. HighbdIntraPredParam(&vpx_highbd_d135_predictor_8x8_neon,
  792. &vpx_highbd_d135_predictor_8x8_c, 8, 10),
  793. HighbdIntraPredParam(&vpx_highbd_d135_predictor_16x16_neon,
  794. &vpx_highbd_d135_predictor_16x16_c, 16, 10),
  795. HighbdIntraPredParam(&vpx_highbd_d135_predictor_32x32_neon,
  796. &vpx_highbd_d135_predictor_32x32_c, 32, 10),
  797. HighbdIntraPredParam(&vpx_highbd_dc_128_predictor_4x4_neon,
  798. &vpx_highbd_dc_128_predictor_4x4_c, 4, 10),
  799. HighbdIntraPredParam(&vpx_highbd_dc_128_predictor_8x8_neon,
  800. &vpx_highbd_dc_128_predictor_8x8_c, 8, 10),
  801. HighbdIntraPredParam(&vpx_highbd_dc_128_predictor_16x16_neon,
  802. &vpx_highbd_dc_128_predictor_16x16_c, 16, 10),
  803. HighbdIntraPredParam(&vpx_highbd_dc_128_predictor_32x32_neon,
  804. &vpx_highbd_dc_128_predictor_32x32_c, 32, 10),
  805. HighbdIntraPredParam(&vpx_highbd_dc_left_predictor_4x4_neon,
  806. &vpx_highbd_dc_left_predictor_4x4_c, 4, 10),
  807. HighbdIntraPredParam(&vpx_highbd_dc_left_predictor_8x8_neon,
  808. &vpx_highbd_dc_left_predictor_8x8_c, 8, 10),
  809. HighbdIntraPredParam(&vpx_highbd_dc_left_predictor_16x16_neon,
  810. &vpx_highbd_dc_left_predictor_16x16_c, 16, 10),
  811. HighbdIntraPredParam(&vpx_highbd_dc_left_predictor_32x32_neon,
  812. &vpx_highbd_dc_left_predictor_32x32_c, 32, 10),
  813. HighbdIntraPredParam(&vpx_highbd_dc_predictor_4x4_neon,
  814. &vpx_highbd_dc_predictor_4x4_c, 4, 10),
  815. HighbdIntraPredParam(&vpx_highbd_dc_predictor_8x8_neon,
  816. &vpx_highbd_dc_predictor_8x8_c, 8, 10),
  817. HighbdIntraPredParam(&vpx_highbd_dc_predictor_16x16_neon,
  818. &vpx_highbd_dc_predictor_16x16_c, 16, 10),
  819. HighbdIntraPredParam(&vpx_highbd_dc_predictor_32x32_neon,
  820. &vpx_highbd_dc_predictor_32x32_c, 32, 10),
  821. HighbdIntraPredParam(&vpx_highbd_dc_top_predictor_4x4_neon,
  822. &vpx_highbd_dc_top_predictor_4x4_c, 4, 10),
  823. HighbdIntraPredParam(&vpx_highbd_dc_top_predictor_8x8_neon,
  824. &vpx_highbd_dc_top_predictor_8x8_c, 8, 10),
  825. HighbdIntraPredParam(&vpx_highbd_dc_top_predictor_16x16_neon,
  826. &vpx_highbd_dc_top_predictor_16x16_c, 16, 10),
  827. HighbdIntraPredParam(&vpx_highbd_dc_top_predictor_32x32_neon,
  828. &vpx_highbd_dc_top_predictor_32x32_c, 32, 10),
  829. HighbdIntraPredParam(&vpx_highbd_h_predictor_4x4_neon,
  830. &vpx_highbd_h_predictor_4x4_c, 4, 10),
  831. HighbdIntraPredParam(&vpx_highbd_h_predictor_8x8_neon,
  832. &vpx_highbd_h_predictor_8x8_c, 8, 10),
  833. HighbdIntraPredParam(&vpx_highbd_h_predictor_16x16_neon,
  834. &vpx_highbd_h_predictor_16x16_c, 16, 10),
  835. HighbdIntraPredParam(&vpx_highbd_h_predictor_32x32_neon,
  836. &vpx_highbd_h_predictor_32x32_c, 32, 10),
  837. HighbdIntraPredParam(&vpx_highbd_tm_predictor_4x4_neon,
  838. &vpx_highbd_tm_predictor_4x4_c, 4, 10),
  839. HighbdIntraPredParam(&vpx_highbd_tm_predictor_8x8_neon,
  840. &vpx_highbd_tm_predictor_8x8_c, 8, 10),
  841. HighbdIntraPredParam(&vpx_highbd_tm_predictor_16x16_neon,
  842. &vpx_highbd_tm_predictor_16x16_c, 16, 10),
  843. HighbdIntraPredParam(&vpx_highbd_tm_predictor_32x32_neon,
  844. &vpx_highbd_tm_predictor_32x32_c, 32, 10),
  845. HighbdIntraPredParam(&vpx_highbd_v_predictor_4x4_neon,
  846. &vpx_highbd_v_predictor_4x4_c, 4, 10),
  847. HighbdIntraPredParam(&vpx_highbd_v_predictor_8x8_neon,
  848. &vpx_highbd_v_predictor_8x8_c, 8, 10),
  849. HighbdIntraPredParam(&vpx_highbd_v_predictor_16x16_neon,
  850. &vpx_highbd_v_predictor_16x16_c, 16, 10),
  851. HighbdIntraPredParam(&vpx_highbd_v_predictor_32x32_neon,
  852. &vpx_highbd_v_predictor_32x32_c, 32, 10)));
  853. INSTANTIATE_TEST_CASE_P(
  854. NEON_TO_C_12, VP9HighbdIntraPredTest,
  855. ::testing::Values(
  856. HighbdIntraPredParam(&vpx_highbd_d45_predictor_4x4_neon,
  857. &vpx_highbd_d45_predictor_4x4_c, 4, 12),
  858. HighbdIntraPredParam(&vpx_highbd_d45_predictor_8x8_neon,
  859. &vpx_highbd_d45_predictor_8x8_c, 8, 12),
  860. HighbdIntraPredParam(&vpx_highbd_d45_predictor_16x16_neon,
  861. &vpx_highbd_d45_predictor_16x16_c, 16, 12),
  862. HighbdIntraPredParam(&vpx_highbd_d45_predictor_32x32_neon,
  863. &vpx_highbd_d45_predictor_32x32_c, 32, 12),
  864. HighbdIntraPredParam(&vpx_highbd_d135_predictor_4x4_neon,
  865. &vpx_highbd_d135_predictor_4x4_c, 4, 12),
  866. HighbdIntraPredParam(&vpx_highbd_d135_predictor_8x8_neon,
  867. &vpx_highbd_d135_predictor_8x8_c, 8, 12),
  868. HighbdIntraPredParam(&vpx_highbd_d135_predictor_16x16_neon,
  869. &vpx_highbd_d135_predictor_16x16_c, 16, 12),
  870. HighbdIntraPredParam(&vpx_highbd_d135_predictor_32x32_neon,
  871. &vpx_highbd_d135_predictor_32x32_c, 32, 12),
  872. HighbdIntraPredParam(&vpx_highbd_dc_128_predictor_4x4_neon,
  873. &vpx_highbd_dc_128_predictor_4x4_c, 4, 12),
  874. HighbdIntraPredParam(&vpx_highbd_dc_128_predictor_8x8_neon,
  875. &vpx_highbd_dc_128_predictor_8x8_c, 8, 12),
  876. HighbdIntraPredParam(&vpx_highbd_dc_128_predictor_16x16_neon,
  877. &vpx_highbd_dc_128_predictor_16x16_c, 16, 12),
  878. HighbdIntraPredParam(&vpx_highbd_dc_128_predictor_32x32_neon,
  879. &vpx_highbd_dc_128_predictor_32x32_c, 32, 12),
  880. HighbdIntraPredParam(&vpx_highbd_dc_left_predictor_4x4_neon,
  881. &vpx_highbd_dc_left_predictor_4x4_c, 4, 12),
  882. HighbdIntraPredParam(&vpx_highbd_dc_left_predictor_8x8_neon,
  883. &vpx_highbd_dc_left_predictor_8x8_c, 8, 12),
  884. HighbdIntraPredParam(&vpx_highbd_dc_left_predictor_16x16_neon,
  885. &vpx_highbd_dc_left_predictor_16x16_c, 16, 12),
  886. HighbdIntraPredParam(&vpx_highbd_dc_left_predictor_32x32_neon,
  887. &vpx_highbd_dc_left_predictor_32x32_c, 32, 12),
  888. HighbdIntraPredParam(&vpx_highbd_dc_predictor_4x4_neon,
  889. &vpx_highbd_dc_predictor_4x4_c, 4, 12),
  890. HighbdIntraPredParam(&vpx_highbd_dc_predictor_8x8_neon,
  891. &vpx_highbd_dc_predictor_8x8_c, 8, 12),
  892. HighbdIntraPredParam(&vpx_highbd_dc_predictor_16x16_neon,
  893. &vpx_highbd_dc_predictor_16x16_c, 16, 12),
  894. HighbdIntraPredParam(&vpx_highbd_dc_predictor_32x32_neon,
  895. &vpx_highbd_dc_predictor_32x32_c, 32, 12),
  896. HighbdIntraPredParam(&vpx_highbd_dc_top_predictor_4x4_neon,
  897. &vpx_highbd_dc_top_predictor_4x4_c, 4, 12),
  898. HighbdIntraPredParam(&vpx_highbd_dc_top_predictor_8x8_neon,
  899. &vpx_highbd_dc_top_predictor_8x8_c, 8, 12),
  900. HighbdIntraPredParam(&vpx_highbd_dc_top_predictor_16x16_neon,
  901. &vpx_highbd_dc_top_predictor_16x16_c, 16, 12),
  902. HighbdIntraPredParam(&vpx_highbd_dc_top_predictor_32x32_neon,
  903. &vpx_highbd_dc_top_predictor_32x32_c, 32, 12),
  904. HighbdIntraPredParam(&vpx_highbd_h_predictor_4x4_neon,
  905. &vpx_highbd_h_predictor_4x4_c, 4, 12),
  906. HighbdIntraPredParam(&vpx_highbd_h_predictor_8x8_neon,
  907. &vpx_highbd_h_predictor_8x8_c, 8, 12),
  908. HighbdIntraPredParam(&vpx_highbd_h_predictor_16x16_neon,
  909. &vpx_highbd_h_predictor_16x16_c, 16, 12),
  910. HighbdIntraPredParam(&vpx_highbd_h_predictor_32x32_neon,
  911. &vpx_highbd_h_predictor_32x32_c, 32, 12),
  912. HighbdIntraPredParam(&vpx_highbd_tm_predictor_4x4_neon,
  913. &vpx_highbd_tm_predictor_4x4_c, 4, 12),
  914. HighbdIntraPredParam(&vpx_highbd_tm_predictor_8x8_neon,
  915. &vpx_highbd_tm_predictor_8x8_c, 8, 12),
  916. HighbdIntraPredParam(&vpx_highbd_tm_predictor_16x16_neon,
  917. &vpx_highbd_tm_predictor_16x16_c, 16, 12),
  918. HighbdIntraPredParam(&vpx_highbd_tm_predictor_32x32_neon,
  919. &vpx_highbd_tm_predictor_32x32_c, 32, 12),
  920. HighbdIntraPredParam(&vpx_highbd_v_predictor_4x4_neon,
  921. &vpx_highbd_v_predictor_4x4_c, 4, 12),
  922. HighbdIntraPredParam(&vpx_highbd_v_predictor_8x8_neon,
  923. &vpx_highbd_v_predictor_8x8_c, 8, 12),
  924. HighbdIntraPredParam(&vpx_highbd_v_predictor_16x16_neon,
  925. &vpx_highbd_v_predictor_16x16_c, 16, 12),
  926. HighbdIntraPredParam(&vpx_highbd_v_predictor_32x32_neon,
  927. &vpx_highbd_v_predictor_32x32_c, 32, 12)));
  928. #endif // HAVE_NEON
  929. #endif // CONFIG_VP9_HIGHBITDEPTH
  930. } // namespace