~medibuntu-maintainers/mplayer/medibuntu.precise

« back to all changes in this revision

Viewing changes to ffmpeg/libavcodec/arm/dsputil_init_neon.c

  • Committer: Package Import Robot
  • Author(s): Reinhard Tartler
  • Date: 2012-01-12 22:23:28 UTC
  • mfrom: (0.4.7 sid)
  • mto: This revision was merged to the branch mainline in revision 76.
  • Revision ID: package-import@ubuntu.com-20120112222328-8jqdyodym3p84ygu
Tags: 2:1.0~rc4.dfsg1+svn34540-1
* New upstream snapshot
* upload to unstable

Show diffs side-by-side

added added

removed removed

Lines of Context:
53
53
void ff_put_pixels8_xy2_no_rnd_neon(uint8_t *, const uint8_t *, int, int);
54
54
 
55
55
void ff_avg_pixels16_neon(uint8_t *, const uint8_t *, int, int);
 
56
void ff_avg_pixels16_x2_neon(uint8_t *, const uint8_t *, int, int);
 
57
void ff_avg_pixels16_y2_neon(uint8_t *, const uint8_t *, int, int);
 
58
void ff_avg_pixels16_xy2_neon(uint8_t *, const uint8_t *, int, int);
56
59
void ff_avg_pixels8_neon(uint8_t *, const uint8_t *, int, int);
 
60
void ff_avg_pixels8_x2_neon(uint8_t *, const uint8_t *, int, int);
 
61
void ff_avg_pixels8_y2_neon(uint8_t *, const uint8_t *, int, int);
 
62
void ff_avg_pixels8_xy2_neon(uint8_t *, const uint8_t *, int, int);
 
63
void ff_avg_pixels16_x2_no_rnd_neon(uint8_t *, const uint8_t *, int, int);
 
64
void ff_avg_pixels16_y2_no_rnd_neon(uint8_t *, const uint8_t *, int, int);
 
65
void ff_avg_pixels16_xy2_no_rnd_neon(uint8_t *, const uint8_t *, int, int);
 
66
void ff_avg_pixels8_x2_no_rnd_neon(uint8_t *, const uint8_t *, int, int);
 
67
void ff_avg_pixels8_y2_no_rnd_neon(uint8_t *, const uint8_t *, int, int);
 
68
void ff_avg_pixels8_xy2_no_rnd_neon(uint8_t *, const uint8_t *, int, int);
57
69
 
58
70
void ff_add_pixels_clamped_neon(const DCTELEM *, uint8_t *, int);
59
71
void ff_put_pixels_clamped_neon(const DCTELEM *, uint8_t *, int);
143
155
                                const float *src1, const float *win, int len);
144
156
void ff_vector_fmul_scalar_neon(float *dst, const float *src, float mul,
145
157
                                int len);
146
 
void ff_vector_fmul_sv_scalar_2_neon(float *dst, const float *src,
147
 
                                     const float **vp, float mul, int len);
148
 
void ff_vector_fmul_sv_scalar_4_neon(float *dst, const float *src,
149
 
                                     const float **vp, float mul, int len);
150
 
void ff_sv_fmul_scalar_2_neon(float *dst, const float **vp, float mul,
151
 
                              int len);
152
 
void ff_sv_fmul_scalar_4_neon(float *dst, const float **vp, float mul,
153
 
                              int len);
 
158
void ff_vector_fmac_scalar_neon(float *dst, const float *src, float mul,
 
159
                                int len);
154
160
void ff_butterflies_float_neon(float *v1, float *v2, int len);
155
161
float ff_scalarproduct_float_neon(const float *v1, const float *v2, int len);
156
162
void ff_vector_fmul_reverse_neon(float *dst, const float *src0,
160
166
 
161
167
void ff_vector_clipf_neon(float *dst, const float *src, float min, float max,
162
168
                          int len);
 
169
void ff_vector_clip_int32_neon(int32_t *dst, const int32_t *src, int32_t min,
 
170
                               int32_t max, unsigned int len);
163
171
 
164
172
void ff_vorbis_inverse_coupling_neon(float *mag, float *ang, int blocksize);
165
173
 
173
181
 
174
182
void ff_dsputil_init_neon(DSPContext *c, AVCodecContext *avctx)
175
183
{
176
 
    const int high_bit_depth = avctx->codec_id == CODEC_ID_H264 && avctx->bits_per_raw_sample > 8;
 
184
    const int high_bit_depth = avctx->bits_per_raw_sample > 8;
177
185
 
178
 
    if (!avctx->lowres) {
 
186
    if (!avctx->lowres && avctx->bits_per_raw_sample <= 8) {
179
187
        if (avctx->idct_algo == FF_IDCT_AUTO ||
180
188
            avctx->idct_algo == FF_IDCT_SIMPLENEON) {
181
189
            c->idct_put              = ff_simple_idct_put_neon;
193
201
    }
194
202
 
195
203
    if (!high_bit_depth) {
196
 
    c->clear_block  = ff_clear_block_neon;
197
 
    c->clear_blocks = ff_clear_blocks_neon;
198
 
 
199
 
    c->put_pixels_tab[0][0] = ff_put_pixels16_neon;
200
 
    c->put_pixels_tab[0][1] = ff_put_pixels16_x2_neon;
201
 
    c->put_pixels_tab[0][2] = ff_put_pixels16_y2_neon;
202
 
    c->put_pixels_tab[0][3] = ff_put_pixels16_xy2_neon;
203
 
    c->put_pixels_tab[1][0] = ff_put_pixels8_neon;
204
 
    c->put_pixels_tab[1][1] = ff_put_pixels8_x2_neon;
205
 
    c->put_pixels_tab[1][2] = ff_put_pixels8_y2_neon;
206
 
    c->put_pixels_tab[1][3] = ff_put_pixels8_xy2_neon;
207
 
 
208
 
    c->put_no_rnd_pixels_tab[0][0] = ff_put_pixels16_neon;
209
 
    c->put_no_rnd_pixels_tab[0][1] = ff_put_pixels16_x2_no_rnd_neon;
210
 
    c->put_no_rnd_pixels_tab[0][2] = ff_put_pixels16_y2_no_rnd_neon;
211
 
    c->put_no_rnd_pixels_tab[0][3] = ff_put_pixels16_xy2_no_rnd_neon;
212
 
    c->put_no_rnd_pixels_tab[1][0] = ff_put_pixels8_neon;
213
 
    c->put_no_rnd_pixels_tab[1][1] = ff_put_pixels8_x2_no_rnd_neon;
214
 
    c->put_no_rnd_pixels_tab[1][2] = ff_put_pixels8_y2_no_rnd_neon;
215
 
    c->put_no_rnd_pixels_tab[1][3] = ff_put_pixels8_xy2_no_rnd_neon;
216
 
 
217
 
    c->avg_pixels_tab[0][0] = ff_avg_pixels16_neon;
218
 
    c->avg_pixels_tab[1][0] = ff_avg_pixels8_neon;
 
204
        c->clear_block  = ff_clear_block_neon;
 
205
        c->clear_blocks = ff_clear_blocks_neon;
 
206
 
 
207
        c->put_pixels_tab[0][0] = ff_put_pixels16_neon;
 
208
        c->put_pixels_tab[0][1] = ff_put_pixels16_x2_neon;
 
209
        c->put_pixels_tab[0][2] = ff_put_pixels16_y2_neon;
 
210
        c->put_pixels_tab[0][3] = ff_put_pixels16_xy2_neon;
 
211
        c->put_pixels_tab[1][0] = ff_put_pixels8_neon;
 
212
        c->put_pixels_tab[1][1] = ff_put_pixels8_x2_neon;
 
213
        c->put_pixels_tab[1][2] = ff_put_pixels8_y2_neon;
 
214
        c->put_pixels_tab[1][3] = ff_put_pixels8_xy2_neon;
 
215
 
 
216
        c->put_no_rnd_pixels_tab[0][0] = ff_put_pixels16_neon;
 
217
        c->put_no_rnd_pixels_tab[0][1] = ff_put_pixels16_x2_no_rnd_neon;
 
218
        c->put_no_rnd_pixels_tab[0][2] = ff_put_pixels16_y2_no_rnd_neon;
 
219
        c->put_no_rnd_pixels_tab[0][3] = ff_put_pixels16_xy2_no_rnd_neon;
 
220
        c->put_no_rnd_pixels_tab[1][0] = ff_put_pixels8_neon;
 
221
        c->put_no_rnd_pixels_tab[1][1] = ff_put_pixels8_x2_no_rnd_neon;
 
222
        c->put_no_rnd_pixels_tab[1][2] = ff_put_pixels8_y2_no_rnd_neon;
 
223
        c->put_no_rnd_pixels_tab[1][3] = ff_put_pixels8_xy2_no_rnd_neon;
 
224
 
 
225
        c->avg_pixels_tab[0][0] = ff_avg_pixels16_neon;
 
226
        c->avg_pixels_tab[0][1] = ff_avg_pixels16_x2_neon;
 
227
        c->avg_pixels_tab[0][2] = ff_avg_pixels16_y2_neon;
 
228
        c->avg_pixels_tab[0][3] = ff_avg_pixels16_xy2_neon;
 
229
        c->avg_pixels_tab[1][0] = ff_avg_pixels8_neon;
 
230
        c->avg_pixels_tab[1][1] = ff_avg_pixels8_x2_neon;
 
231
        c->avg_pixels_tab[1][2] = ff_avg_pixels8_y2_neon;
 
232
        c->avg_pixels_tab[1][3] = ff_avg_pixels8_xy2_neon;
 
233
 
 
234
        c->avg_no_rnd_pixels_tab[0][0] = ff_avg_pixels16_neon;
 
235
        c->avg_no_rnd_pixels_tab[0][1] = ff_avg_pixels16_x2_no_rnd_neon;
 
236
        c->avg_no_rnd_pixels_tab[0][2] = ff_avg_pixels16_y2_no_rnd_neon;
 
237
        c->avg_no_rnd_pixels_tab[0][3] = ff_avg_pixels16_xy2_no_rnd_neon;
 
238
        c->avg_no_rnd_pixels_tab[1][0] = ff_avg_pixels8_neon;
 
239
        c->avg_no_rnd_pixels_tab[1][1] = ff_avg_pixels8_x2_no_rnd_neon;
 
240
        c->avg_no_rnd_pixels_tab[1][2] = ff_avg_pixels8_y2_no_rnd_neon;
 
241
        c->avg_no_rnd_pixels_tab[1][3] = ff_avg_pixels8_xy2_no_rnd_neon;
219
242
    }
220
243
 
221
244
    c->add_pixels_clamped = ff_add_pixels_clamped_neon;
222
245
    c->put_pixels_clamped = ff_put_pixels_clamped_neon;
223
246
    c->put_signed_pixels_clamped = ff_put_signed_pixels_clamped_neon;
224
247
 
225
 
    if (CONFIG_H264_DECODER) {
226
 
        if (!high_bit_depth) {
 
248
    if (CONFIG_H264_DECODER && !high_bit_depth) {
227
249
        c->put_h264_chroma_pixels_tab[0] = ff_put_h264_chroma_mc8_neon;
228
250
        c->put_h264_chroma_pixels_tab[1] = ff_put_h264_chroma_mc4_neon;
229
251
        c->put_h264_chroma_pixels_tab[2] = ff_put_h264_chroma_mc2_neon;
299
321
        c->avg_h264_qpel_pixels_tab[1][13] = ff_avg_h264_qpel8_mc13_neon;
300
322
        c->avg_h264_qpel_pixels_tab[1][14] = ff_avg_h264_qpel8_mc23_neon;
301
323
        c->avg_h264_qpel_pixels_tab[1][15] = ff_avg_h264_qpel8_mc33_neon;
302
 
        }
303
324
    }
304
325
 
305
326
    if (CONFIG_VP3_DECODER) {
311
332
    c->vector_fmul                = ff_vector_fmul_neon;
312
333
    c->vector_fmul_window         = ff_vector_fmul_window_neon;
313
334
    c->vector_fmul_scalar         = ff_vector_fmul_scalar_neon;
 
335
    c->vector_fmac_scalar         = ff_vector_fmac_scalar_neon;
314
336
    c->butterflies_float          = ff_butterflies_float_neon;
315
337
    c->scalarproduct_float        = ff_scalarproduct_float_neon;
316
338
    c->vector_fmul_reverse        = ff_vector_fmul_reverse_neon;
317
339
    c->vector_fmul_add            = ff_vector_fmul_add_neon;
318
340
    c->vector_clipf               = ff_vector_clipf_neon;
319
 
 
320
 
    c->vector_fmul_sv_scalar[0] = ff_vector_fmul_sv_scalar_2_neon;
321
 
    c->vector_fmul_sv_scalar[1] = ff_vector_fmul_sv_scalar_4_neon;
322
 
 
323
 
    c->sv_fmul_scalar[0] = ff_sv_fmul_scalar_2_neon;
324
 
    c->sv_fmul_scalar[1] = ff_sv_fmul_scalar_4_neon;
 
341
    c->vector_clip_int32          = ff_vector_clip_int32_neon;
325
342
 
326
343
    if (CONFIG_VORBIS_DECODER)
327
344
        c->vorbis_inverse_coupling = ff_vorbis_inverse_coupling_neon;