dsputil_init_neon.c 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417
  1. /*
  2. * ARM NEON optimised DSP functions
  3. * Copyright (c) 2008 Mans Rullgard <mans@mansr.com>
  4. *
  5. * This file is part of FFmpeg.
  6. *
  7. * FFmpeg is free software; you can redistribute it and/or
  8. * modify it under the terms of the GNU Lesser General Public
  9. * License as published by the Free Software Foundation; either
  10. * version 2.1 of the License, or (at your option) any later version.
  11. *
  12. * FFmpeg is distributed in the hope that it will be useful,
  13. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  15. * Lesser General Public License for more details.
  16. *
  17. * You should have received a copy of the GNU Lesser General Public
  18. * License along with FFmpeg; if not, write to the Free Software
  19. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  20. */
  21. #include <stdint.h>
  22. #include "libavcodec/avcodec.h"
  23. #include "libavcodec/dsputil.h"
  24. #include "dsputil_arm.h"
  25. void ff_simple_idct_neon(DCTELEM *data);
  26. void ff_simple_idct_put_neon(uint8_t *dest, int line_size, DCTELEM *data);
  27. void ff_simple_idct_add_neon(uint8_t *dest, int line_size, DCTELEM *data);
  28. void ff_vp3_idct_neon(DCTELEM *data);
  29. void ff_vp3_idct_put_neon(uint8_t *dest, int line_size, DCTELEM *data);
  30. void ff_vp3_idct_add_neon(uint8_t *dest, int line_size, DCTELEM *data);
  31. void ff_put_pixels16_neon(uint8_t *, const uint8_t *, int, int);
  32. void ff_put_pixels16_x2_neon(uint8_t *, const uint8_t *, int, int);
  33. void ff_put_pixels16_y2_neon(uint8_t *, const uint8_t *, int, int);
  34. void ff_put_pixels16_xy2_neon(uint8_t *, const uint8_t *, int, int);
  35. void ff_put_pixels8_neon(uint8_t *, const uint8_t *, int, int);
  36. void ff_put_pixels8_x2_neon(uint8_t *, const uint8_t *, int, int);
  37. void ff_put_pixels8_y2_neon(uint8_t *, const uint8_t *, int, int);
  38. void ff_put_pixels8_xy2_neon(uint8_t *, const uint8_t *, int, int);
  39. void ff_put_pixels16_x2_no_rnd_neon(uint8_t *, const uint8_t *, int, int);
  40. void ff_put_pixels16_y2_no_rnd_neon(uint8_t *, const uint8_t *, int, int);
  41. void ff_put_pixels16_xy2_no_rnd_neon(uint8_t *, const uint8_t *, int, int);
  42. void ff_put_pixels8_x2_no_rnd_neon(uint8_t *, const uint8_t *, int, int);
  43. void ff_put_pixels8_y2_no_rnd_neon(uint8_t *, const uint8_t *, int, int);
  44. void ff_put_pixels8_xy2_no_rnd_neon(uint8_t *, const uint8_t *, int, int);
  45. void ff_avg_pixels16_neon(uint8_t *, const uint8_t *, int, int);
  46. void ff_avg_pixels8_neon(uint8_t *, const uint8_t *, int, int);
  47. void ff_add_pixels_clamped_neon(const DCTELEM *, uint8_t *, int);
  48. void ff_put_pixels_clamped_neon(const DCTELEM *, uint8_t *, int);
  49. void ff_put_signed_pixels_clamped_neon(const DCTELEM *, uint8_t *, int);
  50. void ff_put_h264_qpel16_mc00_neon(uint8_t *, uint8_t *, int);
  51. void ff_put_h264_qpel16_mc10_neon(uint8_t *, uint8_t *, int);
  52. void ff_put_h264_qpel16_mc20_neon(uint8_t *, uint8_t *, int);
  53. void ff_put_h264_qpel16_mc30_neon(uint8_t *, uint8_t *, int);
  54. void ff_put_h264_qpel16_mc01_neon(uint8_t *, uint8_t *, int);
  55. void ff_put_h264_qpel16_mc11_neon(uint8_t *, uint8_t *, int);
  56. void ff_put_h264_qpel16_mc21_neon(uint8_t *, uint8_t *, int);
  57. void ff_put_h264_qpel16_mc31_neon(uint8_t *, uint8_t *, int);
  58. void ff_put_h264_qpel16_mc02_neon(uint8_t *, uint8_t *, int);
  59. void ff_put_h264_qpel16_mc12_neon(uint8_t *, uint8_t *, int);
  60. void ff_put_h264_qpel16_mc22_neon(uint8_t *, uint8_t *, int);
  61. void ff_put_h264_qpel16_mc32_neon(uint8_t *, uint8_t *, int);
  62. void ff_put_h264_qpel16_mc03_neon(uint8_t *, uint8_t *, int);
  63. void ff_put_h264_qpel16_mc13_neon(uint8_t *, uint8_t *, int);
  64. void ff_put_h264_qpel16_mc23_neon(uint8_t *, uint8_t *, int);
  65. void ff_put_h264_qpel16_mc33_neon(uint8_t *, uint8_t *, int);
  66. void ff_put_h264_qpel8_mc00_neon(uint8_t *, uint8_t *, int);
  67. void ff_put_h264_qpel8_mc10_neon(uint8_t *, uint8_t *, int);
  68. void ff_put_h264_qpel8_mc20_neon(uint8_t *, uint8_t *, int);
  69. void ff_put_h264_qpel8_mc30_neon(uint8_t *, uint8_t *, int);
  70. void ff_put_h264_qpel8_mc01_neon(uint8_t *, uint8_t *, int);
  71. void ff_put_h264_qpel8_mc11_neon(uint8_t *, uint8_t *, int);
  72. void ff_put_h264_qpel8_mc21_neon(uint8_t *, uint8_t *, int);
  73. void ff_put_h264_qpel8_mc31_neon(uint8_t *, uint8_t *, int);
  74. void ff_put_h264_qpel8_mc02_neon(uint8_t *, uint8_t *, int);
  75. void ff_put_h264_qpel8_mc12_neon(uint8_t *, uint8_t *, int);
  76. void ff_put_h264_qpel8_mc22_neon(uint8_t *, uint8_t *, int);
  77. void ff_put_h264_qpel8_mc32_neon(uint8_t *, uint8_t *, int);
  78. void ff_put_h264_qpel8_mc03_neon(uint8_t *, uint8_t *, int);
  79. void ff_put_h264_qpel8_mc13_neon(uint8_t *, uint8_t *, int);
  80. void ff_put_h264_qpel8_mc23_neon(uint8_t *, uint8_t *, int);
  81. void ff_put_h264_qpel8_mc33_neon(uint8_t *, uint8_t *, int);
  82. void ff_avg_h264_qpel16_mc00_neon(uint8_t *, uint8_t *, int);
  83. void ff_avg_h264_qpel16_mc10_neon(uint8_t *, uint8_t *, int);
  84. void ff_avg_h264_qpel16_mc20_neon(uint8_t *, uint8_t *, int);
  85. void ff_avg_h264_qpel16_mc30_neon(uint8_t *, uint8_t *, int);
  86. void ff_avg_h264_qpel16_mc01_neon(uint8_t *, uint8_t *, int);
  87. void ff_avg_h264_qpel16_mc11_neon(uint8_t *, uint8_t *, int);
  88. void ff_avg_h264_qpel16_mc21_neon(uint8_t *, uint8_t *, int);
  89. void ff_avg_h264_qpel16_mc31_neon(uint8_t *, uint8_t *, int);
  90. void ff_avg_h264_qpel16_mc02_neon(uint8_t *, uint8_t *, int);
  91. void ff_avg_h264_qpel16_mc12_neon(uint8_t *, uint8_t *, int);
  92. void ff_avg_h264_qpel16_mc22_neon(uint8_t *, uint8_t *, int);
  93. void ff_avg_h264_qpel16_mc32_neon(uint8_t *, uint8_t *, int);
  94. void ff_avg_h264_qpel16_mc03_neon(uint8_t *, uint8_t *, int);
  95. void ff_avg_h264_qpel16_mc13_neon(uint8_t *, uint8_t *, int);
  96. void ff_avg_h264_qpel16_mc23_neon(uint8_t *, uint8_t *, int);
  97. void ff_avg_h264_qpel16_mc33_neon(uint8_t *, uint8_t *, int);
  98. void ff_avg_h264_qpel8_mc00_neon(uint8_t *, uint8_t *, int);
  99. void ff_avg_h264_qpel8_mc10_neon(uint8_t *, uint8_t *, int);
  100. void ff_avg_h264_qpel8_mc20_neon(uint8_t *, uint8_t *, int);
  101. void ff_avg_h264_qpel8_mc30_neon(uint8_t *, uint8_t *, int);
  102. void ff_avg_h264_qpel8_mc01_neon(uint8_t *, uint8_t *, int);
  103. void ff_avg_h264_qpel8_mc11_neon(uint8_t *, uint8_t *, int);
  104. void ff_avg_h264_qpel8_mc21_neon(uint8_t *, uint8_t *, int);
  105. void ff_avg_h264_qpel8_mc31_neon(uint8_t *, uint8_t *, int);
  106. void ff_avg_h264_qpel8_mc02_neon(uint8_t *, uint8_t *, int);
  107. void ff_avg_h264_qpel8_mc12_neon(uint8_t *, uint8_t *, int);
  108. void ff_avg_h264_qpel8_mc22_neon(uint8_t *, uint8_t *, int);
  109. void ff_avg_h264_qpel8_mc32_neon(uint8_t *, uint8_t *, int);
  110. void ff_avg_h264_qpel8_mc03_neon(uint8_t *, uint8_t *, int);
  111. void ff_avg_h264_qpel8_mc13_neon(uint8_t *, uint8_t *, int);
  112. void ff_avg_h264_qpel8_mc23_neon(uint8_t *, uint8_t *, int);
  113. void ff_avg_h264_qpel8_mc33_neon(uint8_t *, uint8_t *, int);
  114. void ff_put_h264_chroma_mc8_neon(uint8_t *, uint8_t *, int, int, int, int);
  115. void ff_put_h264_chroma_mc4_neon(uint8_t *, uint8_t *, int, int, int, int);
  116. void ff_put_h264_chroma_mc2_neon(uint8_t *, uint8_t *, int, int, int, int);
  117. void ff_avg_h264_chroma_mc8_neon(uint8_t *, uint8_t *, int, int, int, int);
  118. void ff_avg_h264_chroma_mc4_neon(uint8_t *, uint8_t *, int, int, int, int);
  119. void ff_avg_h264_chroma_mc2_neon(uint8_t *, uint8_t *, int, int, int, int);
  120. void ff_h264_v_loop_filter_luma_neon(uint8_t *pix, int stride, int alpha,
  121. int beta, int8_t *tc0);
  122. void ff_h264_h_loop_filter_luma_neon(uint8_t *pix, int stride, int alpha,
  123. int beta, int8_t *tc0);
  124. void ff_h264_v_loop_filter_chroma_neon(uint8_t *pix, int stride, int alpha,
  125. int beta, int8_t *tc0);
  126. void ff_h264_h_loop_filter_chroma_neon(uint8_t *pix, int stride, int alpha,
  127. int beta, int8_t *tc0);
  128. void ff_weight_h264_pixels_16x16_neon(uint8_t *ds, int stride, int log2_den,
  129. int weight, int offset);
  130. void ff_weight_h264_pixels_16x8_neon(uint8_t *ds, int stride, int log2_den,
  131. int weight, int offset);
  132. void ff_weight_h264_pixels_8x16_neon(uint8_t *ds, int stride, int log2_den,
  133. int weight, int offset);
  134. void ff_weight_h264_pixels_8x8_neon(uint8_t *ds, int stride, int log2_den,
  135. int weight, int offset);
  136. void ff_weight_h264_pixels_8x4_neon(uint8_t *ds, int stride, int log2_den,
  137. int weight, int offset);
  138. void ff_weight_h264_pixels_4x8_neon(uint8_t *ds, int stride, int log2_den,
  139. int weight, int offset);
  140. void ff_weight_h264_pixels_4x4_neon(uint8_t *ds, int stride, int log2_den,
  141. int weight, int offset);
  142. void ff_weight_h264_pixels_4x2_neon(uint8_t *ds, int stride, int log2_den,
  143. int weight, int offset);
  144. void ff_biweight_h264_pixels_16x16_neon(uint8_t *dst, uint8_t *src, int stride,
  145. int log2_den, int weightd, int weights,
  146. int offset);
  147. void ff_biweight_h264_pixels_16x8_neon(uint8_t *dst, uint8_t *src, int stride,
  148. int log2_den, int weightd, int weights,
  149. int offset);
  150. void ff_biweight_h264_pixels_8x16_neon(uint8_t *dst, uint8_t *src, int stride,
  151. int log2_den, int weightd, int weights,
  152. int offset);
  153. void ff_biweight_h264_pixels_8x8_neon(uint8_t *dst, uint8_t *src, int stride,
  154. int log2_den, int weightd, int weights,
  155. int offset);
  156. void ff_biweight_h264_pixels_8x4_neon(uint8_t *dst, uint8_t *src, int stride,
  157. int log2_den, int weightd, int weights,
  158. int offset);
  159. void ff_biweight_h264_pixels_4x8_neon(uint8_t *dst, uint8_t *src, int stride,
  160. int log2_den, int weightd, int weights,
  161. int offset);
  162. void ff_biweight_h264_pixels_4x4_neon(uint8_t *dst, uint8_t *src, int stride,
  163. int log2_den, int weightd, int weights,
  164. int offset);
  165. void ff_biweight_h264_pixels_4x2_neon(uint8_t *dst, uint8_t *src, int stride,
  166. int log2_den, int weightd, int weights,
  167. int offset);
  168. void ff_h264_idct_add_neon(uint8_t *dst, DCTELEM *block, int stride);
  169. void ff_h264_idct_dc_add_neon(uint8_t *dst, DCTELEM *block, int stride);
  170. void ff_h264_idct_add16_neon(uint8_t *dst, const int *block_offset,
  171. DCTELEM *block, int stride,
  172. const uint8_t nnzc[6*8]);
  173. void ff_h264_idct_add16intra_neon(uint8_t *dst, const int *block_offset,
  174. DCTELEM *block, int stride,
  175. const uint8_t nnzc[6*8]);
  176. void ff_h264_idct_add8_neon(uint8_t **dest, const int *block_offset,
  177. DCTELEM *block, int stride,
  178. const uint8_t nnzc[6*8]);
  179. void ff_vp3_v_loop_filter_neon(uint8_t *, int, int *);
  180. void ff_vp3_h_loop_filter_neon(uint8_t *, int, int *);
  181. void ff_vector_fmul_neon(float *dst, const float *src, int len);
  182. void ff_vector_fmul_window_neon(float *dst, const float *src0,
  183. const float *src1, const float *win,
  184. float add_bias, int len);
  185. void ff_vector_fmul_scalar_neon(float *dst, const float *src, float mul,
  186. int len);
  187. void ff_vector_fmul_sv_scalar_2_neon(float *dst, const float *src,
  188. const float **vp, float mul, int len);
  189. void ff_vector_fmul_sv_scalar_4_neon(float *dst, const float *src,
  190. const float **vp, float mul, int len);
  191. void ff_sv_fmul_scalar_2_neon(float *dst, const float **vp, float mul,
  192. int len);
  193. void ff_sv_fmul_scalar_4_neon(float *dst, const float **vp, float mul,
  194. int len);
  195. void ff_butterflies_float_neon(float *v1, float *v2, int len);
  196. float ff_scalarproduct_float_neon(const float *v1, const float *v2, int len);
  197. void ff_int32_to_float_fmul_scalar_neon(float *dst, const int *src,
  198. float mul, int len);
  199. void ff_vector_fmul_reverse_neon(float *dst, const float *src0,
  200. const float *src1, int len);
  201. void ff_vector_fmul_add_neon(float *dst, const float *src0, const float *src1,
  202. const float *src2, int len);
  203. void ff_vector_clipf_neon(float *dst, const float *src, float min, float max,
  204. int len);
  205. void ff_float_to_int16_neon(int16_t *, const float *, long);
  206. void ff_float_to_int16_interleave_neon(int16_t *, const float **, long, int);
  207. void ff_vorbis_inverse_coupling_neon(float *mag, float *ang, int blocksize);
  208. int32_t ff_scalarproduct_int16_neon(int16_t *v1, int16_t *v2, int len,
  209. int shift);
  210. int32_t ff_scalarproduct_and_madd_int16_neon(int16_t *v1, int16_t *v2,
  211. int16_t *v3, int len, int mul);
  212. void ff_dsputil_init_neon(DSPContext *c, AVCodecContext *avctx)
  213. {
  214. if (!avctx->lowres) {
  215. if (avctx->idct_algo == FF_IDCT_AUTO ||
  216. avctx->idct_algo == FF_IDCT_SIMPLENEON) {
  217. c->idct_put = ff_simple_idct_put_neon;
  218. c->idct_add = ff_simple_idct_add_neon;
  219. c->idct = ff_simple_idct_neon;
  220. c->idct_permutation_type = FF_PARTTRANS_IDCT_PERM;
  221. } else if ((CONFIG_VP3_DECODER || CONFIG_VP5_DECODER ||
  222. CONFIG_VP6_DECODER) &&
  223. avctx->idct_algo == FF_IDCT_VP3) {
  224. c->idct_put = ff_vp3_idct_put_neon;
  225. c->idct_add = ff_vp3_idct_add_neon;
  226. c->idct = ff_vp3_idct_neon;
  227. c->idct_permutation_type = FF_TRANSPOSE_IDCT_PERM;
  228. }
  229. }
  230. c->put_pixels_tab[0][0] = ff_put_pixels16_neon;
  231. c->put_pixels_tab[0][1] = ff_put_pixels16_x2_neon;
  232. c->put_pixels_tab[0][2] = ff_put_pixels16_y2_neon;
  233. c->put_pixels_tab[0][3] = ff_put_pixels16_xy2_neon;
  234. c->put_pixels_tab[1][0] = ff_put_pixels8_neon;
  235. c->put_pixels_tab[1][1] = ff_put_pixels8_x2_neon;
  236. c->put_pixels_tab[1][2] = ff_put_pixels8_y2_neon;
  237. c->put_pixels_tab[1][3] = ff_put_pixels8_xy2_neon;
  238. c->put_no_rnd_pixels_tab[0][0] = ff_put_pixels16_neon;
  239. c->put_no_rnd_pixels_tab[0][1] = ff_put_pixels16_x2_no_rnd_neon;
  240. c->put_no_rnd_pixels_tab[0][2] = ff_put_pixels16_y2_no_rnd_neon;
  241. c->put_no_rnd_pixels_tab[0][3] = ff_put_pixels16_xy2_no_rnd_neon;
  242. c->put_no_rnd_pixels_tab[1][0] = ff_put_pixels8_neon;
  243. c->put_no_rnd_pixels_tab[1][1] = ff_put_pixels8_x2_no_rnd_neon;
  244. c->put_no_rnd_pixels_tab[1][2] = ff_put_pixels8_y2_no_rnd_neon;
  245. c->put_no_rnd_pixels_tab[1][3] = ff_put_pixels8_xy2_no_rnd_neon;
  246. c->avg_pixels_tab[0][0] = ff_avg_pixels16_neon;
  247. c->avg_pixels_tab[1][0] = ff_avg_pixels8_neon;
  248. c->add_pixels_clamped = ff_add_pixels_clamped_neon;
  249. c->put_pixels_clamped = ff_put_pixels_clamped_neon;
  250. c->put_signed_pixels_clamped = ff_put_signed_pixels_clamped_neon;
  251. if (CONFIG_H264_DECODER) {
  252. c->put_h264_chroma_pixels_tab[0] = ff_put_h264_chroma_mc8_neon;
  253. c->put_h264_chroma_pixels_tab[1] = ff_put_h264_chroma_mc4_neon;
  254. c->put_h264_chroma_pixels_tab[2] = ff_put_h264_chroma_mc2_neon;
  255. c->avg_h264_chroma_pixels_tab[0] = ff_avg_h264_chroma_mc8_neon;
  256. c->avg_h264_chroma_pixels_tab[1] = ff_avg_h264_chroma_mc4_neon;
  257. c->avg_h264_chroma_pixels_tab[2] = ff_avg_h264_chroma_mc2_neon;
  258. c->put_h264_qpel_pixels_tab[0][ 0] = ff_put_h264_qpel16_mc00_neon;
  259. c->put_h264_qpel_pixels_tab[0][ 1] = ff_put_h264_qpel16_mc10_neon;
  260. c->put_h264_qpel_pixels_tab[0][ 2] = ff_put_h264_qpel16_mc20_neon;
  261. c->put_h264_qpel_pixels_tab[0][ 3] = ff_put_h264_qpel16_mc30_neon;
  262. c->put_h264_qpel_pixels_tab[0][ 4] = ff_put_h264_qpel16_mc01_neon;
  263. c->put_h264_qpel_pixels_tab[0][ 5] = ff_put_h264_qpel16_mc11_neon;
  264. c->put_h264_qpel_pixels_tab[0][ 6] = ff_put_h264_qpel16_mc21_neon;
  265. c->put_h264_qpel_pixels_tab[0][ 7] = ff_put_h264_qpel16_mc31_neon;
  266. c->put_h264_qpel_pixels_tab[0][ 8] = ff_put_h264_qpel16_mc02_neon;
  267. c->put_h264_qpel_pixels_tab[0][ 9] = ff_put_h264_qpel16_mc12_neon;
  268. c->put_h264_qpel_pixels_tab[0][10] = ff_put_h264_qpel16_mc22_neon;
  269. c->put_h264_qpel_pixels_tab[0][11] = ff_put_h264_qpel16_mc32_neon;
  270. c->put_h264_qpel_pixels_tab[0][12] = ff_put_h264_qpel16_mc03_neon;
  271. c->put_h264_qpel_pixels_tab[0][13] = ff_put_h264_qpel16_mc13_neon;
  272. c->put_h264_qpel_pixels_tab[0][14] = ff_put_h264_qpel16_mc23_neon;
  273. c->put_h264_qpel_pixels_tab[0][15] = ff_put_h264_qpel16_mc33_neon;
  274. c->put_h264_qpel_pixels_tab[1][ 0] = ff_put_h264_qpel8_mc00_neon;
  275. c->put_h264_qpel_pixels_tab[1][ 1] = ff_put_h264_qpel8_mc10_neon;
  276. c->put_h264_qpel_pixels_tab[1][ 2] = ff_put_h264_qpel8_mc20_neon;
  277. c->put_h264_qpel_pixels_tab[1][ 3] = ff_put_h264_qpel8_mc30_neon;
  278. c->put_h264_qpel_pixels_tab[1][ 4] = ff_put_h264_qpel8_mc01_neon;
  279. c->put_h264_qpel_pixels_tab[1][ 5] = ff_put_h264_qpel8_mc11_neon;
  280. c->put_h264_qpel_pixels_tab[1][ 6] = ff_put_h264_qpel8_mc21_neon;
  281. c->put_h264_qpel_pixels_tab[1][ 7] = ff_put_h264_qpel8_mc31_neon;
  282. c->put_h264_qpel_pixels_tab[1][ 8] = ff_put_h264_qpel8_mc02_neon;
  283. c->put_h264_qpel_pixels_tab[1][ 9] = ff_put_h264_qpel8_mc12_neon;
  284. c->put_h264_qpel_pixels_tab[1][10] = ff_put_h264_qpel8_mc22_neon;
  285. c->put_h264_qpel_pixels_tab[1][11] = ff_put_h264_qpel8_mc32_neon;
  286. c->put_h264_qpel_pixels_tab[1][12] = ff_put_h264_qpel8_mc03_neon;
  287. c->put_h264_qpel_pixels_tab[1][13] = ff_put_h264_qpel8_mc13_neon;
  288. c->put_h264_qpel_pixels_tab[1][14] = ff_put_h264_qpel8_mc23_neon;
  289. c->put_h264_qpel_pixels_tab[1][15] = ff_put_h264_qpel8_mc33_neon;
  290. c->avg_h264_qpel_pixels_tab[0][ 0] = ff_avg_h264_qpel16_mc00_neon;
  291. c->avg_h264_qpel_pixels_tab[0][ 1] = ff_avg_h264_qpel16_mc10_neon;
  292. c->avg_h264_qpel_pixels_tab[0][ 2] = ff_avg_h264_qpel16_mc20_neon;
  293. c->avg_h264_qpel_pixels_tab[0][ 3] = ff_avg_h264_qpel16_mc30_neon;
  294. c->avg_h264_qpel_pixels_tab[0][ 4] = ff_avg_h264_qpel16_mc01_neon;
  295. c->avg_h264_qpel_pixels_tab[0][ 5] = ff_avg_h264_qpel16_mc11_neon;
  296. c->avg_h264_qpel_pixels_tab[0][ 6] = ff_avg_h264_qpel16_mc21_neon;
  297. c->avg_h264_qpel_pixels_tab[0][ 7] = ff_avg_h264_qpel16_mc31_neon;
  298. c->avg_h264_qpel_pixels_tab[0][ 8] = ff_avg_h264_qpel16_mc02_neon;
  299. c->avg_h264_qpel_pixels_tab[0][ 9] = ff_avg_h264_qpel16_mc12_neon;
  300. c->avg_h264_qpel_pixels_tab[0][10] = ff_avg_h264_qpel16_mc22_neon;
  301. c->avg_h264_qpel_pixels_tab[0][11] = ff_avg_h264_qpel16_mc32_neon;
  302. c->avg_h264_qpel_pixels_tab[0][12] = ff_avg_h264_qpel16_mc03_neon;
  303. c->avg_h264_qpel_pixels_tab[0][13] = ff_avg_h264_qpel16_mc13_neon;
  304. c->avg_h264_qpel_pixels_tab[0][14] = ff_avg_h264_qpel16_mc23_neon;
  305. c->avg_h264_qpel_pixels_tab[0][15] = ff_avg_h264_qpel16_mc33_neon;
  306. c->avg_h264_qpel_pixels_tab[1][ 0] = ff_avg_h264_qpel8_mc00_neon;
  307. c->avg_h264_qpel_pixels_tab[1][ 1] = ff_avg_h264_qpel8_mc10_neon;
  308. c->avg_h264_qpel_pixels_tab[1][ 2] = ff_avg_h264_qpel8_mc20_neon;
  309. c->avg_h264_qpel_pixels_tab[1][ 3] = ff_avg_h264_qpel8_mc30_neon;
  310. c->avg_h264_qpel_pixels_tab[1][ 4] = ff_avg_h264_qpel8_mc01_neon;
  311. c->avg_h264_qpel_pixels_tab[1][ 5] = ff_avg_h264_qpel8_mc11_neon;
  312. c->avg_h264_qpel_pixels_tab[1][ 6] = ff_avg_h264_qpel8_mc21_neon;
  313. c->avg_h264_qpel_pixels_tab[1][ 7] = ff_avg_h264_qpel8_mc31_neon;
  314. c->avg_h264_qpel_pixels_tab[1][ 8] = ff_avg_h264_qpel8_mc02_neon;
  315. c->avg_h264_qpel_pixels_tab[1][ 9] = ff_avg_h264_qpel8_mc12_neon;
  316. c->avg_h264_qpel_pixels_tab[1][10] = ff_avg_h264_qpel8_mc22_neon;
  317. c->avg_h264_qpel_pixels_tab[1][11] = ff_avg_h264_qpel8_mc32_neon;
  318. c->avg_h264_qpel_pixels_tab[1][12] = ff_avg_h264_qpel8_mc03_neon;
  319. c->avg_h264_qpel_pixels_tab[1][13] = ff_avg_h264_qpel8_mc13_neon;
  320. c->avg_h264_qpel_pixels_tab[1][14] = ff_avg_h264_qpel8_mc23_neon;
  321. c->avg_h264_qpel_pixels_tab[1][15] = ff_avg_h264_qpel8_mc33_neon;
  322. c->h264_v_loop_filter_luma = ff_h264_v_loop_filter_luma_neon;
  323. c->h264_h_loop_filter_luma = ff_h264_h_loop_filter_luma_neon;
  324. c->h264_v_loop_filter_chroma = ff_h264_v_loop_filter_chroma_neon;
  325. c->h264_h_loop_filter_chroma = ff_h264_h_loop_filter_chroma_neon;
  326. c->weight_h264_pixels_tab[0] = ff_weight_h264_pixels_16x16_neon;
  327. c->weight_h264_pixels_tab[1] = ff_weight_h264_pixels_16x8_neon;
  328. c->weight_h264_pixels_tab[2] = ff_weight_h264_pixels_8x16_neon;
  329. c->weight_h264_pixels_tab[3] = ff_weight_h264_pixels_8x8_neon;
  330. c->weight_h264_pixels_tab[4] = ff_weight_h264_pixels_8x4_neon;
  331. c->weight_h264_pixels_tab[5] = ff_weight_h264_pixels_4x8_neon;
  332. c->weight_h264_pixels_tab[6] = ff_weight_h264_pixels_4x4_neon;
  333. c->weight_h264_pixels_tab[7] = ff_weight_h264_pixels_4x2_neon;
  334. c->biweight_h264_pixels_tab[0] = ff_biweight_h264_pixels_16x16_neon;
  335. c->biweight_h264_pixels_tab[1] = ff_biweight_h264_pixels_16x8_neon;
  336. c->biweight_h264_pixels_tab[2] = ff_biweight_h264_pixels_8x16_neon;
  337. c->biweight_h264_pixels_tab[3] = ff_biweight_h264_pixels_8x8_neon;
  338. c->biweight_h264_pixels_tab[4] = ff_biweight_h264_pixels_8x4_neon;
  339. c->biweight_h264_pixels_tab[5] = ff_biweight_h264_pixels_4x8_neon;
  340. c->biweight_h264_pixels_tab[6] = ff_biweight_h264_pixels_4x4_neon;
  341. c->biweight_h264_pixels_tab[7] = ff_biweight_h264_pixels_4x2_neon;
  342. c->h264_idct_add = ff_h264_idct_add_neon;
  343. c->h264_idct_dc_add = ff_h264_idct_dc_add_neon;
  344. c->h264_idct_add16 = ff_h264_idct_add16_neon;
  345. c->h264_idct_add16intra = ff_h264_idct_add16intra_neon;
  346. c->h264_idct_add8 = ff_h264_idct_add8_neon;
  347. }
  348. if (CONFIG_VP3_DECODER) {
  349. c->vp3_v_loop_filter = ff_vp3_v_loop_filter_neon;
  350. c->vp3_h_loop_filter = ff_vp3_h_loop_filter_neon;
  351. }
  352. c->vector_fmul = ff_vector_fmul_neon;
  353. c->vector_fmul_window = ff_vector_fmul_window_neon;
  354. c->vector_fmul_scalar = ff_vector_fmul_scalar_neon;
  355. c->butterflies_float = ff_butterflies_float_neon;
  356. c->scalarproduct_float = ff_scalarproduct_float_neon;
  357. c->int32_to_float_fmul_scalar = ff_int32_to_float_fmul_scalar_neon;
  358. c->vector_fmul_reverse = ff_vector_fmul_reverse_neon;
  359. c->vector_fmul_add = ff_vector_fmul_add_neon;
  360. c->vector_clipf = ff_vector_clipf_neon;
  361. c->vector_fmul_sv_scalar[0] = ff_vector_fmul_sv_scalar_2_neon;
  362. c->vector_fmul_sv_scalar[1] = ff_vector_fmul_sv_scalar_4_neon;
  363. c->sv_fmul_scalar[0] = ff_sv_fmul_scalar_2_neon;
  364. c->sv_fmul_scalar[1] = ff_sv_fmul_scalar_4_neon;
  365. if (!(avctx->flags & CODEC_FLAG_BITEXACT)) {
  366. c->float_to_int16 = ff_float_to_int16_neon;
  367. c->float_to_int16_interleave = ff_float_to_int16_interleave_neon;
  368. }
  369. if (CONFIG_VORBIS_DECODER)
  370. c->vorbis_inverse_coupling = ff_vorbis_inverse_coupling_neon;
  371. c->scalarproduct_int16 = ff_scalarproduct_int16_neon;
  372. c->scalarproduct_and_madd_int16 = ff_scalarproduct_and_madd_int16_neon;
  373. }