2 * This file is part of FFmpeg.
4 * FFmpeg is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * FFmpeg is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with FFmpeg; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
21 #include "libavutil/attributes.h"
22 #include "libavcodec/vc1dsp.h"
27 void ff_vc1_inv_trans_8x8_neon(int16_t *block);
28 void ff_vc1_inv_trans_4x8_neon(uint8_t *dest, int linesize, int16_t *block);
29 void ff_vc1_inv_trans_8x4_neon(uint8_t *dest, int linesize, int16_t *block);
30 void ff_vc1_inv_trans_4x4_neon(uint8_t *dest, int linesize, int16_t *block);
32 void ff_vc1_inv_trans_8x8_dc_neon(uint8_t *dest, int linesize, int16_t *block);
33 void ff_vc1_inv_trans_4x8_dc_neon(uint8_t *dest, int linesize, int16_t *block);
34 void ff_vc1_inv_trans_8x4_dc_neon(uint8_t *dest, int linesize, int16_t *block);
35 void ff_vc1_inv_trans_4x4_dc_neon(uint8_t *dest, int linesize, int16_t *block);
37 void ff_put_pixels8x8_neon(uint8_t *block, const uint8_t *pixels,
38 ptrdiff_t line_size, int rnd);
40 #define DECL_PUT(X, Y) \
41 void ff_put_vc1_mspel_mc##X##Y##_neon(uint8_t *dst, const uint8_t *src, \
42 ptrdiff_t stride, int rnd); \
43 static void ff_put_vc1_mspel_mc##X##Y##_16_neon(uint8_t *dst, const uint8_t *src, \
44 ptrdiff_t stride, int rnd) \
46 ff_put_vc1_mspel_mc##X##Y##_neon(dst+0, src+0, stride, rnd); \
47 ff_put_vc1_mspel_mc##X##Y##_neon(dst+8, src+8, stride, rnd); \
48 dst += 8*stride; src += 8*stride; \
49 ff_put_vc1_mspel_mc##X##Y##_neon(dst+0, src+0, stride, rnd); \
50 ff_put_vc1_mspel_mc##X##Y##_neon(dst+8, src+8, stride, rnd); \
73 void ff_put_vc1_chroma_mc8_neon(uint8_t *dst, uint8_t *src, int stride, int h,
75 void ff_avg_vc1_chroma_mc8_neon(uint8_t *dst, uint8_t *src, int stride, int h,
77 void ff_put_vc1_chroma_mc4_neon(uint8_t *dst, uint8_t *src, int stride, int h,
79 void ff_avg_vc1_chroma_mc4_neon(uint8_t *dst, uint8_t *src, int stride, int h,
82 #define FN_ASSIGN(X, Y) \
83 dsp->put_vc1_mspel_pixels_tab[0][X+4*Y] = ff_put_vc1_mspel_mc##X##Y##_16_neon; \
84 dsp->put_vc1_mspel_pixels_tab[1][X+4*Y] = ff_put_vc1_mspel_mc##X##Y##_neon
86 av_cold void ff_vc1dsp_init_neon(VC1DSPContext *dsp)
88 dsp->vc1_inv_trans_8x8 = ff_vc1_inv_trans_8x8_neon;
89 dsp->vc1_inv_trans_4x8 = ff_vc1_inv_trans_4x8_neon;
90 dsp->vc1_inv_trans_8x4 = ff_vc1_inv_trans_8x4_neon;
91 dsp->vc1_inv_trans_4x4 = ff_vc1_inv_trans_4x4_neon;
92 dsp->vc1_inv_trans_8x8_dc = ff_vc1_inv_trans_8x8_dc_neon;
93 dsp->vc1_inv_trans_4x8_dc = ff_vc1_inv_trans_4x8_dc_neon;
94 dsp->vc1_inv_trans_8x4_dc = ff_vc1_inv_trans_8x4_dc_neon;
95 dsp->vc1_inv_trans_4x4_dc = ff_vc1_inv_trans_4x4_dc_neon;
97 dsp->put_vc1_mspel_pixels_tab[1][ 0] = ff_put_pixels8x8_neon;
98 if (HAVE_AS_DN_DIRECTIVE) {
119 dsp->put_no_rnd_vc1_chroma_pixels_tab[0] = ff_put_vc1_chroma_mc8_neon;
120 dsp->avg_no_rnd_vc1_chroma_pixels_tab[0] = ff_avg_vc1_chroma_mc8_neon;
121 dsp->put_no_rnd_vc1_chroma_pixels_tab[1] = ff_put_vc1_chroma_mc4_neon;
122 dsp->avg_no_rnd_vc1_chroma_pixels_tab[1] = ff_avg_vc1_chroma_mc4_neon;