Mercurial > libavcodec.hg
annotate arm/dsputil_init_neon.c @ 11051:5d4991dd23de libavcodec
Add support for vorbis 6.1 and 7.1 channel configurations as per the new spec
http://xiph.org/vorbis/doc/Vorbis_I_spec.html#x1-800004.3.9
author | superdump |
---|---|
date | Fri, 29 Jan 2010 13:51:25 +0000 |
parents | 5506cbb012b4 |
children | e71b0be9ac79 |
rev | line source |
---|---|
8334 | 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 | |
22 #include <stdint.h> | |
23 | |
24 #include "libavcodec/avcodec.h" | |
25 #include "libavcodec/dsputil.h" | |
10359 | 26 #include "dsputil_arm.h" |
27 | |
28 void ff_simple_idct_neon(DCTELEM *data); | |
29 void ff_simple_idct_put_neon(uint8_t *dest, int line_size, DCTELEM *data); | |
30 void ff_simple_idct_add_neon(uint8_t *dest, int line_size, DCTELEM *data); | |
31 | |
32 void ff_vp3_idct_neon(DCTELEM *data); | |
33 void ff_vp3_idct_put_neon(uint8_t *dest, int line_size, DCTELEM *data); | |
34 void ff_vp3_idct_add_neon(uint8_t *dest, int line_size, DCTELEM *data); | |
8334 | 35 |
36 void ff_put_pixels16_neon(uint8_t *, const uint8_t *, int, int); | |
37 void ff_put_pixels16_x2_neon(uint8_t *, const uint8_t *, int, int); | |
38 void ff_put_pixels16_y2_neon(uint8_t *, const uint8_t *, int, int); | |
39 void ff_put_pixels16_xy2_neon(uint8_t *, const uint8_t *, int, int); | |
40 void ff_put_pixels8_neon(uint8_t *, const uint8_t *, int, int); | |
41 void ff_put_pixels8_x2_neon(uint8_t *, const uint8_t *, int, int); | |
42 void ff_put_pixels8_y2_neon(uint8_t *, const uint8_t *, int, int); | |
43 void ff_put_pixels8_xy2_neon(uint8_t *, const uint8_t *, int, int); | |
44 void ff_put_pixels16_x2_no_rnd_neon(uint8_t *, const uint8_t *, int, int); | |
45 void ff_put_pixels16_y2_no_rnd_neon(uint8_t *, const uint8_t *, int, int); | |
46 void ff_put_pixels16_xy2_no_rnd_neon(uint8_t *, const uint8_t *, int, int); | |
47 void ff_put_pixels8_x2_no_rnd_neon(uint8_t *, const uint8_t *, int, int); | |
48 void ff_put_pixels8_y2_no_rnd_neon(uint8_t *, const uint8_t *, int, int); | |
49 void ff_put_pixels8_xy2_no_rnd_neon(uint8_t *, const uint8_t *, int, int); | |
50 | |
51 void ff_avg_pixels16_neon(uint8_t *, const uint8_t *, int, int); | |
10375 | 52 void ff_avg_pixels8_neon(uint8_t *, const uint8_t *, int, int); |
8334 | 53 |
9344 | 54 void ff_add_pixels_clamped_neon(const DCTELEM *, uint8_t *, int); |
9580 | 55 void ff_put_pixels_clamped_neon(const DCTELEM *, uint8_t *, int); |
9345 | 56 void ff_put_signed_pixels_clamped_neon(const DCTELEM *, uint8_t *, int); |
9344 | 57 |
8334 | 58 void ff_put_h264_qpel16_mc00_neon(uint8_t *, uint8_t *, int); |
8338 | 59 void ff_put_h264_qpel16_mc10_neon(uint8_t *, uint8_t *, int); |
60 void ff_put_h264_qpel16_mc20_neon(uint8_t *, uint8_t *, int); | |
61 void ff_put_h264_qpel16_mc30_neon(uint8_t *, uint8_t *, int); | |
62 void ff_put_h264_qpel16_mc01_neon(uint8_t *, uint8_t *, int); | |
63 void ff_put_h264_qpel16_mc11_neon(uint8_t *, uint8_t *, int); | |
64 void ff_put_h264_qpel16_mc21_neon(uint8_t *, uint8_t *, int); | |
65 void ff_put_h264_qpel16_mc31_neon(uint8_t *, uint8_t *, int); | |
66 void ff_put_h264_qpel16_mc02_neon(uint8_t *, uint8_t *, int); | |
67 void ff_put_h264_qpel16_mc12_neon(uint8_t *, uint8_t *, int); | |
68 void ff_put_h264_qpel16_mc22_neon(uint8_t *, uint8_t *, int); | |
69 void ff_put_h264_qpel16_mc32_neon(uint8_t *, uint8_t *, int); | |
70 void ff_put_h264_qpel16_mc03_neon(uint8_t *, uint8_t *, int); | |
71 void ff_put_h264_qpel16_mc13_neon(uint8_t *, uint8_t *, int); | |
72 void ff_put_h264_qpel16_mc23_neon(uint8_t *, uint8_t *, int); | |
73 void ff_put_h264_qpel16_mc33_neon(uint8_t *, uint8_t *, int); | |
74 | |
8334 | 75 void ff_put_h264_qpel8_mc00_neon(uint8_t *, uint8_t *, int); |
8338 | 76 void ff_put_h264_qpel8_mc10_neon(uint8_t *, uint8_t *, int); |
77 void ff_put_h264_qpel8_mc20_neon(uint8_t *, uint8_t *, int); | |
78 void ff_put_h264_qpel8_mc30_neon(uint8_t *, uint8_t *, int); | |
79 void ff_put_h264_qpel8_mc01_neon(uint8_t *, uint8_t *, int); | |
80 void ff_put_h264_qpel8_mc11_neon(uint8_t *, uint8_t *, int); | |
81 void ff_put_h264_qpel8_mc21_neon(uint8_t *, uint8_t *, int); | |
82 void ff_put_h264_qpel8_mc31_neon(uint8_t *, uint8_t *, int); | |
83 void ff_put_h264_qpel8_mc02_neon(uint8_t *, uint8_t *, int); | |
84 void ff_put_h264_qpel8_mc12_neon(uint8_t *, uint8_t *, int); | |
85 void ff_put_h264_qpel8_mc22_neon(uint8_t *, uint8_t *, int); | |
86 void ff_put_h264_qpel8_mc32_neon(uint8_t *, uint8_t *, int); | |
87 void ff_put_h264_qpel8_mc03_neon(uint8_t *, uint8_t *, int); | |
88 void ff_put_h264_qpel8_mc13_neon(uint8_t *, uint8_t *, int); | |
89 void ff_put_h264_qpel8_mc23_neon(uint8_t *, uint8_t *, int); | |
90 void ff_put_h264_qpel8_mc33_neon(uint8_t *, uint8_t *, int); | |
8334 | 91 |
92 void ff_avg_h264_qpel16_mc00_neon(uint8_t *, uint8_t *, int); | |
10616 | 93 void ff_avg_h264_qpel16_mc10_neon(uint8_t *, uint8_t *, int); |
94 void ff_avg_h264_qpel16_mc20_neon(uint8_t *, uint8_t *, int); | |
95 void ff_avg_h264_qpel16_mc30_neon(uint8_t *, uint8_t *, int); | |
96 void ff_avg_h264_qpel16_mc01_neon(uint8_t *, uint8_t *, int); | |
97 void ff_avg_h264_qpel16_mc11_neon(uint8_t *, uint8_t *, int); | |
98 void ff_avg_h264_qpel16_mc21_neon(uint8_t *, uint8_t *, int); | |
99 void ff_avg_h264_qpel16_mc31_neon(uint8_t *, uint8_t *, int); | |
100 void ff_avg_h264_qpel16_mc02_neon(uint8_t *, uint8_t *, int); | |
101 void ff_avg_h264_qpel16_mc12_neon(uint8_t *, uint8_t *, int); | |
102 void ff_avg_h264_qpel16_mc22_neon(uint8_t *, uint8_t *, int); | |
103 void ff_avg_h264_qpel16_mc32_neon(uint8_t *, uint8_t *, int); | |
104 void ff_avg_h264_qpel16_mc03_neon(uint8_t *, uint8_t *, int); | |
105 void ff_avg_h264_qpel16_mc13_neon(uint8_t *, uint8_t *, int); | |
106 void ff_avg_h264_qpel16_mc23_neon(uint8_t *, uint8_t *, int); | |
107 void ff_avg_h264_qpel16_mc33_neon(uint8_t *, uint8_t *, int); | |
8334 | 108 |
10375 | 109 void ff_avg_h264_qpel8_mc00_neon(uint8_t *, uint8_t *, int); |
10616 | 110 void ff_avg_h264_qpel8_mc10_neon(uint8_t *, uint8_t *, int); |
111 void ff_avg_h264_qpel8_mc20_neon(uint8_t *, uint8_t *, int); | |
112 void ff_avg_h264_qpel8_mc30_neon(uint8_t *, uint8_t *, int); | |
113 void ff_avg_h264_qpel8_mc01_neon(uint8_t *, uint8_t *, int); | |
114 void ff_avg_h264_qpel8_mc11_neon(uint8_t *, uint8_t *, int); | |
115 void ff_avg_h264_qpel8_mc21_neon(uint8_t *, uint8_t *, int); | |
116 void ff_avg_h264_qpel8_mc31_neon(uint8_t *, uint8_t *, int); | |
117 void ff_avg_h264_qpel8_mc02_neon(uint8_t *, uint8_t *, int); | |
118 void ff_avg_h264_qpel8_mc12_neon(uint8_t *, uint8_t *, int); | |
119 void ff_avg_h264_qpel8_mc22_neon(uint8_t *, uint8_t *, int); | |
120 void ff_avg_h264_qpel8_mc32_neon(uint8_t *, uint8_t *, int); | |
121 void ff_avg_h264_qpel8_mc03_neon(uint8_t *, uint8_t *, int); | |
122 void ff_avg_h264_qpel8_mc13_neon(uint8_t *, uint8_t *, int); | |
123 void ff_avg_h264_qpel8_mc23_neon(uint8_t *, uint8_t *, int); | |
124 void ff_avg_h264_qpel8_mc33_neon(uint8_t *, uint8_t *, int); | |
10375 | 125 |
8336 | 126 void ff_put_h264_chroma_mc8_neon(uint8_t *, uint8_t *, int, int, int, int); |
127 void ff_put_h264_chroma_mc4_neon(uint8_t *, uint8_t *, int, int, int, int); | |
10617 | 128 void ff_put_h264_chroma_mc2_neon(uint8_t *, uint8_t *, int, int, int, int); |
8336 | 129 |
130 void ff_avg_h264_chroma_mc8_neon(uint8_t *, uint8_t *, int, int, int, int); | |
131 void ff_avg_h264_chroma_mc4_neon(uint8_t *, uint8_t *, int, int, int, int); | |
10617 | 132 void ff_avg_h264_chroma_mc2_neon(uint8_t *, uint8_t *, int, int, int, int); |
8336 | 133 |
8337 | 134 void ff_h264_v_loop_filter_luma_neon(uint8_t *pix, int stride, int alpha, |
135 int beta, int8_t *tc0); | |
136 void ff_h264_h_loop_filter_luma_neon(uint8_t *pix, int stride, int alpha, | |
137 int beta, int8_t *tc0); | |
138 void ff_h264_v_loop_filter_chroma_neon(uint8_t *pix, int stride, int alpha, | |
139 int beta, int8_t *tc0); | |
140 void ff_h264_h_loop_filter_chroma_neon(uint8_t *pix, int stride, int alpha, | |
141 int beta, int8_t *tc0); | |
142 | |
8664 | 143 void ff_weight_h264_pixels_16x16_neon(uint8_t *ds, int stride, int log2_den, |
144 int weight, int offset); | |
145 void ff_weight_h264_pixels_16x8_neon(uint8_t *ds, int stride, int log2_den, | |
146 int weight, int offset); | |
147 void ff_weight_h264_pixels_8x16_neon(uint8_t *ds, int stride, int log2_den, | |
148 int weight, int offset); | |
149 void ff_weight_h264_pixels_8x8_neon(uint8_t *ds, int stride, int log2_den, | |
150 int weight, int offset); | |
151 void ff_weight_h264_pixels_8x4_neon(uint8_t *ds, int stride, int log2_den, | |
152 int weight, int offset); | |
153 void ff_weight_h264_pixels_4x8_neon(uint8_t *ds, int stride, int log2_den, | |
154 int weight, int offset); | |
155 void ff_weight_h264_pixels_4x4_neon(uint8_t *ds, int stride, int log2_den, | |
156 int weight, int offset); | |
157 void ff_weight_h264_pixels_4x2_neon(uint8_t *ds, int stride, int log2_den, | |
158 int weight, int offset); | |
159 | |
8663 | 160 void ff_biweight_h264_pixels_16x16_neon(uint8_t *dst, uint8_t *src, int stride, |
161 int log2_den, int weightd, int weights, | |
162 int offset); | |
163 void ff_biweight_h264_pixels_16x8_neon(uint8_t *dst, uint8_t *src, int stride, | |
164 int log2_den, int weightd, int weights, | |
165 int offset); | |
166 void ff_biweight_h264_pixels_8x16_neon(uint8_t *dst, uint8_t *src, int stride, | |
167 int log2_den, int weightd, int weights, | |
168 int offset); | |
169 void ff_biweight_h264_pixels_8x8_neon(uint8_t *dst, uint8_t *src, int stride, | |
170 int log2_den, int weightd, int weights, | |
171 int offset); | |
172 void ff_biweight_h264_pixels_8x4_neon(uint8_t *dst, uint8_t *src, int stride, | |
173 int log2_den, int weightd, int weights, | |
174 int offset); | |
175 void ff_biweight_h264_pixels_4x8_neon(uint8_t *dst, uint8_t *src, int stride, | |
176 int log2_den, int weightd, int weights, | |
177 int offset); | |
178 void ff_biweight_h264_pixels_4x4_neon(uint8_t *dst, uint8_t *src, int stride, | |
179 int log2_den, int weightd, int weights, | |
180 int offset); | |
181 void ff_biweight_h264_pixels_4x2_neon(uint8_t *dst, uint8_t *src, int stride, | |
182 int log2_den, int weightd, int weights, | |
183 int offset); | |
184 | |
8339 | 185 void ff_h264_idct_add_neon(uint8_t *dst, DCTELEM *block, int stride); |
8340 | 186 void ff_h264_idct_dc_add_neon(uint8_t *dst, DCTELEM *block, int stride); |
8462 | 187 void ff_h264_idct_add16_neon(uint8_t *dst, const int *block_offset, |
188 DCTELEM *block, int stride, | |
189 const uint8_t nnzc[6*8]); | |
190 void ff_h264_idct_add16intra_neon(uint8_t *dst, const int *block_offset, | |
191 DCTELEM *block, int stride, | |
192 const uint8_t nnzc[6*8]); | |
193 void ff_h264_idct_add8_neon(uint8_t **dest, const int *block_offset, | |
194 DCTELEM *block, int stride, | |
195 const uint8_t nnzc[6*8]); | |
8339 | 196 |
9692 | 197 void ff_vp3_v_loop_filter_neon(uint8_t *, int, int *); |
198 void ff_vp3_h_loop_filter_neon(uint8_t *, int, int *); | |
199 | |
8697 | 200 void ff_vector_fmul_neon(float *dst, const float *src, int len); |
8698 | 201 void ff_vector_fmul_window_neon(float *dst, const float *src0, |
202 const float *src1, const float *win, | |
203 float add_bias, int len); | |
10221 | 204 void ff_vector_fmul_scalar_neon(float *dst, const float *src, float mul, |
205 int len); | |
206 void ff_vector_fmul_sv_scalar_2_neon(float *dst, const float *src, | |
207 const float **vp, float mul, int len); | |
208 void ff_vector_fmul_sv_scalar_4_neon(float *dst, const float *src, | |
209 const float **vp, float mul, int len); | |
210 void ff_sv_fmul_scalar_2_neon(float *dst, const float **vp, float mul, | |
211 int len); | |
212 void ff_sv_fmul_scalar_4_neon(float *dst, const float **vp, float mul, | |
213 int len); | |
214 void ff_butterflies_float_neon(float *v1, float *v2, int len); | |
10228 | 215 float ff_scalarproduct_float_neon(const float *v1, const float *v2, int len); |
10253 | 216 void ff_int32_to_float_fmul_scalar_neon(float *dst, const int *src, |
217 float mul, int len); | |
10274 | 218 void ff_vector_fmul_reverse_neon(float *dst, const float *src0, |
219 const float *src1, int len); | |
10302 | 220 void ff_vector_fmul_add_neon(float *dst, const float *src0, const float *src1, |
221 const float *src2, int len); | |
8697 | 222 |
10276 | 223 void ff_vector_clipf_neon(float *dst, const float *src, float min, float max, |
224 int len); | |
8492 | 225 void ff_float_to_int16_neon(int16_t *, const float *, long); |
226 void ff_float_to_int16_interleave_neon(int16_t *, const float **, long, int); | |
227 | |
10046 | 228 void ff_vorbis_inverse_coupling_neon(float *mag, float *ang, int blocksize); |
229 | |
8334 | 230 void ff_dsputil_init_neon(DSPContext *c, AVCodecContext *avctx) |
231 { | |
10359 | 232 if (!avctx->lowres) { |
233 if (avctx->idct_algo == FF_IDCT_AUTO || | |
234 avctx->idct_algo == FF_IDCT_SIMPLENEON) { | |
10362 | 235 c->idct_put = ff_simple_idct_put_neon; |
236 c->idct_add = ff_simple_idct_add_neon; | |
237 c->idct = ff_simple_idct_neon; | |
10359 | 238 c->idct_permutation_type = FF_PARTTRANS_IDCT_PERM; |
239 } else if ((CONFIG_VP3_DECODER || CONFIG_VP5_DECODER || | |
240 CONFIG_VP6_DECODER) && | |
241 avctx->idct_algo == FF_IDCT_VP3) { | |
10362 | 242 c->idct_put = ff_vp3_idct_put_neon; |
243 c->idct_add = ff_vp3_idct_add_neon; | |
244 c->idct = ff_vp3_idct_neon; | |
10359 | 245 c->idct_permutation_type = FF_TRANSPOSE_IDCT_PERM; |
246 } | |
247 } | |
248 | |
8334 | 249 c->put_pixels_tab[0][0] = ff_put_pixels16_neon; |
250 c->put_pixels_tab[0][1] = ff_put_pixels16_x2_neon; | |
251 c->put_pixels_tab[0][2] = ff_put_pixels16_y2_neon; | |
252 c->put_pixels_tab[0][3] = ff_put_pixels16_xy2_neon; | |
253 c->put_pixels_tab[1][0] = ff_put_pixels8_neon; | |
254 c->put_pixels_tab[1][1] = ff_put_pixels8_x2_neon; | |
255 c->put_pixels_tab[1][2] = ff_put_pixels8_y2_neon; | |
256 c->put_pixels_tab[1][3] = ff_put_pixels8_xy2_neon; | |
257 | |
258 c->put_no_rnd_pixels_tab[0][0] = ff_put_pixels16_neon; | |
259 c->put_no_rnd_pixels_tab[0][1] = ff_put_pixels16_x2_no_rnd_neon; | |
260 c->put_no_rnd_pixels_tab[0][2] = ff_put_pixels16_y2_no_rnd_neon; | |
261 c->put_no_rnd_pixels_tab[0][3] = ff_put_pixels16_xy2_no_rnd_neon; | |
262 c->put_no_rnd_pixels_tab[1][0] = ff_put_pixels8_neon; | |
263 c->put_no_rnd_pixels_tab[1][1] = ff_put_pixels8_x2_no_rnd_neon; | |
264 c->put_no_rnd_pixels_tab[1][2] = ff_put_pixels8_y2_no_rnd_neon; | |
265 c->put_no_rnd_pixels_tab[1][3] = ff_put_pixels8_xy2_no_rnd_neon; | |
266 | |
267 c->avg_pixels_tab[0][0] = ff_avg_pixels16_neon; | |
10375 | 268 c->avg_pixels_tab[1][0] = ff_avg_pixels8_neon; |
8334 | 269 |
9344 | 270 c->add_pixels_clamped = ff_add_pixels_clamped_neon; |
9580 | 271 c->put_pixels_clamped = ff_put_pixels_clamped_neon; |
9345 | 272 c->put_signed_pixels_clamped = ff_put_signed_pixels_clamped_neon; |
9344 | 273 |
9976
e52cd349e708
Only compile in NEON optimizations for H.264 when the H.264 decoder is enabled.
diego
parents:
9975
diff
changeset
|
274 if (CONFIG_H264_DECODER) { |
9977 | 275 c->put_h264_chroma_pixels_tab[0] = ff_put_h264_chroma_mc8_neon; |
276 c->put_h264_chroma_pixels_tab[1] = ff_put_h264_chroma_mc4_neon; | |
10617 | 277 c->put_h264_chroma_pixels_tab[2] = ff_put_h264_chroma_mc2_neon; |
8336 | 278 |
9977 | 279 c->avg_h264_chroma_pixels_tab[0] = ff_avg_h264_chroma_mc8_neon; |
280 c->avg_h264_chroma_pixels_tab[1] = ff_avg_h264_chroma_mc4_neon; | |
10617 | 281 c->avg_h264_chroma_pixels_tab[2] = ff_avg_h264_chroma_mc2_neon; |
8336 | 282 |
9977 | 283 c->put_h264_qpel_pixels_tab[0][ 0] = ff_put_h264_qpel16_mc00_neon; |
284 c->put_h264_qpel_pixels_tab[0][ 1] = ff_put_h264_qpel16_mc10_neon; | |
285 c->put_h264_qpel_pixels_tab[0][ 2] = ff_put_h264_qpel16_mc20_neon; | |
286 c->put_h264_qpel_pixels_tab[0][ 3] = ff_put_h264_qpel16_mc30_neon; | |
287 c->put_h264_qpel_pixels_tab[0][ 4] = ff_put_h264_qpel16_mc01_neon; | |
288 c->put_h264_qpel_pixels_tab[0][ 5] = ff_put_h264_qpel16_mc11_neon; | |
289 c->put_h264_qpel_pixels_tab[0][ 6] = ff_put_h264_qpel16_mc21_neon; | |
290 c->put_h264_qpel_pixels_tab[0][ 7] = ff_put_h264_qpel16_mc31_neon; | |
291 c->put_h264_qpel_pixels_tab[0][ 8] = ff_put_h264_qpel16_mc02_neon; | |
292 c->put_h264_qpel_pixels_tab[0][ 9] = ff_put_h264_qpel16_mc12_neon; | |
293 c->put_h264_qpel_pixels_tab[0][10] = ff_put_h264_qpel16_mc22_neon; | |
294 c->put_h264_qpel_pixels_tab[0][11] = ff_put_h264_qpel16_mc32_neon; | |
295 c->put_h264_qpel_pixels_tab[0][12] = ff_put_h264_qpel16_mc03_neon; | |
296 c->put_h264_qpel_pixels_tab[0][13] = ff_put_h264_qpel16_mc13_neon; | |
297 c->put_h264_qpel_pixels_tab[0][14] = ff_put_h264_qpel16_mc23_neon; | |
298 c->put_h264_qpel_pixels_tab[0][15] = ff_put_h264_qpel16_mc33_neon; | |
8338 | 299 |
9977 | 300 c->put_h264_qpel_pixels_tab[1][ 0] = ff_put_h264_qpel8_mc00_neon; |
301 c->put_h264_qpel_pixels_tab[1][ 1] = ff_put_h264_qpel8_mc10_neon; | |
302 c->put_h264_qpel_pixels_tab[1][ 2] = ff_put_h264_qpel8_mc20_neon; | |
303 c->put_h264_qpel_pixels_tab[1][ 3] = ff_put_h264_qpel8_mc30_neon; | |
304 c->put_h264_qpel_pixels_tab[1][ 4] = ff_put_h264_qpel8_mc01_neon; | |
305 c->put_h264_qpel_pixels_tab[1][ 5] = ff_put_h264_qpel8_mc11_neon; | |
306 c->put_h264_qpel_pixels_tab[1][ 6] = ff_put_h264_qpel8_mc21_neon; | |
307 c->put_h264_qpel_pixels_tab[1][ 7] = ff_put_h264_qpel8_mc31_neon; | |
308 c->put_h264_qpel_pixels_tab[1][ 8] = ff_put_h264_qpel8_mc02_neon; | |
309 c->put_h264_qpel_pixels_tab[1][ 9] = ff_put_h264_qpel8_mc12_neon; | |
310 c->put_h264_qpel_pixels_tab[1][10] = ff_put_h264_qpel8_mc22_neon; | |
311 c->put_h264_qpel_pixels_tab[1][11] = ff_put_h264_qpel8_mc32_neon; | |
312 c->put_h264_qpel_pixels_tab[1][12] = ff_put_h264_qpel8_mc03_neon; | |
313 c->put_h264_qpel_pixels_tab[1][13] = ff_put_h264_qpel8_mc13_neon; | |
314 c->put_h264_qpel_pixels_tab[1][14] = ff_put_h264_qpel8_mc23_neon; | |
315 c->put_h264_qpel_pixels_tab[1][15] = ff_put_h264_qpel8_mc33_neon; | |
8334 | 316 |
9977 | 317 c->avg_h264_qpel_pixels_tab[0][ 0] = ff_avg_h264_qpel16_mc00_neon; |
10616 | 318 c->avg_h264_qpel_pixels_tab[0][ 1] = ff_avg_h264_qpel16_mc10_neon; |
319 c->avg_h264_qpel_pixels_tab[0][ 2] = ff_avg_h264_qpel16_mc20_neon; | |
320 c->avg_h264_qpel_pixels_tab[0][ 3] = ff_avg_h264_qpel16_mc30_neon; | |
321 c->avg_h264_qpel_pixels_tab[0][ 4] = ff_avg_h264_qpel16_mc01_neon; | |
322 c->avg_h264_qpel_pixels_tab[0][ 5] = ff_avg_h264_qpel16_mc11_neon; | |
323 c->avg_h264_qpel_pixels_tab[0][ 6] = ff_avg_h264_qpel16_mc21_neon; | |
324 c->avg_h264_qpel_pixels_tab[0][ 7] = ff_avg_h264_qpel16_mc31_neon; | |
325 c->avg_h264_qpel_pixels_tab[0][ 8] = ff_avg_h264_qpel16_mc02_neon; | |
326 c->avg_h264_qpel_pixels_tab[0][ 9] = ff_avg_h264_qpel16_mc12_neon; | |
327 c->avg_h264_qpel_pixels_tab[0][10] = ff_avg_h264_qpel16_mc22_neon; | |
328 c->avg_h264_qpel_pixels_tab[0][11] = ff_avg_h264_qpel16_mc32_neon; | |
329 c->avg_h264_qpel_pixels_tab[0][12] = ff_avg_h264_qpel16_mc03_neon; | |
330 c->avg_h264_qpel_pixels_tab[0][13] = ff_avg_h264_qpel16_mc13_neon; | |
331 c->avg_h264_qpel_pixels_tab[0][14] = ff_avg_h264_qpel16_mc23_neon; | |
332 c->avg_h264_qpel_pixels_tab[0][15] = ff_avg_h264_qpel16_mc33_neon; | |
8337 | 333 |
10375 | 334 c->avg_h264_qpel_pixels_tab[1][ 0] = ff_avg_h264_qpel8_mc00_neon; |
10616 | 335 c->avg_h264_qpel_pixels_tab[1][ 1] = ff_avg_h264_qpel8_mc10_neon; |
336 c->avg_h264_qpel_pixels_tab[1][ 2] = ff_avg_h264_qpel8_mc20_neon; | |
337 c->avg_h264_qpel_pixels_tab[1][ 3] = ff_avg_h264_qpel8_mc30_neon; | |
338 c->avg_h264_qpel_pixels_tab[1][ 4] = ff_avg_h264_qpel8_mc01_neon; | |
339 c->avg_h264_qpel_pixels_tab[1][ 5] = ff_avg_h264_qpel8_mc11_neon; | |
340 c->avg_h264_qpel_pixels_tab[1][ 6] = ff_avg_h264_qpel8_mc21_neon; | |
341 c->avg_h264_qpel_pixels_tab[1][ 7] = ff_avg_h264_qpel8_mc31_neon; | |
342 c->avg_h264_qpel_pixels_tab[1][ 8] = ff_avg_h264_qpel8_mc02_neon; | |
343 c->avg_h264_qpel_pixels_tab[1][ 9] = ff_avg_h264_qpel8_mc12_neon; | |
344 c->avg_h264_qpel_pixels_tab[1][10] = ff_avg_h264_qpel8_mc22_neon; | |
345 c->avg_h264_qpel_pixels_tab[1][11] = ff_avg_h264_qpel8_mc32_neon; | |
346 c->avg_h264_qpel_pixels_tab[1][12] = ff_avg_h264_qpel8_mc03_neon; | |
347 c->avg_h264_qpel_pixels_tab[1][13] = ff_avg_h264_qpel8_mc13_neon; | |
348 c->avg_h264_qpel_pixels_tab[1][14] = ff_avg_h264_qpel8_mc23_neon; | |
349 c->avg_h264_qpel_pixels_tab[1][15] = ff_avg_h264_qpel8_mc33_neon; | |
10375 | 350 |
9977 | 351 c->h264_v_loop_filter_luma = ff_h264_v_loop_filter_luma_neon; |
352 c->h264_h_loop_filter_luma = ff_h264_h_loop_filter_luma_neon; | |
353 c->h264_v_loop_filter_chroma = ff_h264_v_loop_filter_chroma_neon; | |
354 c->h264_h_loop_filter_chroma = ff_h264_h_loop_filter_chroma_neon; | |
8339 | 355 |
9977 | 356 c->weight_h264_pixels_tab[0] = ff_weight_h264_pixels_16x16_neon; |
357 c->weight_h264_pixels_tab[1] = ff_weight_h264_pixels_16x8_neon; | |
358 c->weight_h264_pixels_tab[2] = ff_weight_h264_pixels_8x16_neon; | |
359 c->weight_h264_pixels_tab[3] = ff_weight_h264_pixels_8x8_neon; | |
360 c->weight_h264_pixels_tab[4] = ff_weight_h264_pixels_8x4_neon; | |
361 c->weight_h264_pixels_tab[5] = ff_weight_h264_pixels_4x8_neon; | |
362 c->weight_h264_pixels_tab[6] = ff_weight_h264_pixels_4x4_neon; | |
363 c->weight_h264_pixels_tab[7] = ff_weight_h264_pixels_4x2_neon; | |
8664 | 364 |
9977 | 365 c->biweight_h264_pixels_tab[0] = ff_biweight_h264_pixels_16x16_neon; |
366 c->biweight_h264_pixels_tab[1] = ff_biweight_h264_pixels_16x8_neon; | |
367 c->biweight_h264_pixels_tab[2] = ff_biweight_h264_pixels_8x16_neon; | |
368 c->biweight_h264_pixels_tab[3] = ff_biweight_h264_pixels_8x8_neon; | |
369 c->biweight_h264_pixels_tab[4] = ff_biweight_h264_pixels_8x4_neon; | |
370 c->biweight_h264_pixels_tab[5] = ff_biweight_h264_pixels_4x8_neon; | |
371 c->biweight_h264_pixels_tab[6] = ff_biweight_h264_pixels_4x4_neon; | |
372 c->biweight_h264_pixels_tab[7] = ff_biweight_h264_pixels_4x2_neon; | |
8663 | 373 |
9977 | 374 c->h264_idct_add = ff_h264_idct_add_neon; |
375 c->h264_idct_dc_add = ff_h264_idct_dc_add_neon; | |
376 c->h264_idct_add16 = ff_h264_idct_add16_neon; | |
377 c->h264_idct_add16intra = ff_h264_idct_add16intra_neon; | |
378 c->h264_idct_add8 = ff_h264_idct_add8_neon; | |
9976
e52cd349e708
Only compile in NEON optimizations for H.264 when the H.264 decoder is enabled.
diego
parents:
9975
diff
changeset
|
379 } |
8492 | 380 |
9975
d6d7e8d4a04d
Do not redundantly check for both CONFIG_THEORA_DECODER and CONFIG_VP3_DECODER.
diego
parents:
9692
diff
changeset
|
381 if (CONFIG_VP3_DECODER) { |
9692 | 382 c->vp3_v_loop_filter = ff_vp3_v_loop_filter_neon; |
383 c->vp3_h_loop_filter = ff_vp3_h_loop_filter_neon; | |
384 } | |
385 | |
10362 | 386 c->vector_fmul = ff_vector_fmul_neon; |
387 c->vector_fmul_window = ff_vector_fmul_window_neon; | |
388 c->vector_fmul_scalar = ff_vector_fmul_scalar_neon; | |
389 c->butterflies_float = ff_butterflies_float_neon; | |
390 c->scalarproduct_float = ff_scalarproduct_float_neon; | |
10253 | 391 c->int32_to_float_fmul_scalar = ff_int32_to_float_fmul_scalar_neon; |
10362 | 392 c->vector_fmul_reverse = ff_vector_fmul_reverse_neon; |
393 c->vector_fmul_add = ff_vector_fmul_add_neon; | |
394 c->vector_clipf = ff_vector_clipf_neon; | |
10221 | 395 |
396 c->vector_fmul_sv_scalar[0] = ff_vector_fmul_sv_scalar_2_neon; | |
397 c->vector_fmul_sv_scalar[1] = ff_vector_fmul_sv_scalar_4_neon; | |
398 | |
399 c->sv_fmul_scalar[0] = ff_sv_fmul_scalar_2_neon; | |
400 c->sv_fmul_scalar[1] = ff_sv_fmul_scalar_4_neon; | |
8697 | 401 |
8492 | 402 if (!(avctx->flags & CODEC_FLAG_BITEXACT)) { |
10362 | 403 c->float_to_int16 = ff_float_to_int16_neon; |
8492 | 404 c->float_to_int16_interleave = ff_float_to_int16_interleave_neon; |
405 } | |
10046 | 406 |
407 if (CONFIG_VORBIS_DECODER) | |
408 c->vorbis_inverse_coupling = ff_vorbis_inverse_coupling_neon; | |
8334 | 409 } |