]> git.sesse.net Git - ffmpeg/blob - libavcodec/arm/vc1dsp_init_neon.c
h264chroma: Change type of stride parameters to ptrdiff_t
[ffmpeg] / libavcodec / arm / vc1dsp_init_neon.c
1 /*
2  * This file is part of Libav.
3  *
4  * Libav 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.
8  *
9  * Libav 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.
13  *
14  * You should have received a copy of the GNU Lesser General Public
15  * License along with Libav; if not, write to the Free Software
16  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17  */
18
19 #include <stdint.h>
20
21 #include "libavutil/attributes.h"
22 #include "libavcodec/vc1dsp.h"
23 #include "vc1dsp.h"
24
25 #include "config.h"
26
27 void ff_vc1_inv_trans_8x8_neon(int16_t *block);
28 void ff_vc1_inv_trans_4x8_neon(uint8_t *dest, ptrdiff_t stride, int16_t *block);
29 void ff_vc1_inv_trans_8x4_neon(uint8_t *dest, ptrdiff_t stride, int16_t *block);
30 void ff_vc1_inv_trans_4x4_neon(uint8_t *dest, ptrdiff_t stride, int16_t *block);
31
32 void ff_vc1_inv_trans_8x8_dc_neon(uint8_t *dest, ptrdiff_t stride, int16_t *block);
33 void ff_vc1_inv_trans_4x8_dc_neon(uint8_t *dest, ptrdiff_t stride, int16_t *block);
34 void ff_vc1_inv_trans_8x4_dc_neon(uint8_t *dest, ptrdiff_t stride, int16_t *block);
35 void ff_vc1_inv_trans_4x4_dc_neon(uint8_t *dest, ptrdiff_t stride, int16_t *block);
36
37 void ff_put_pixels8x8_neon(uint8_t *block, const uint8_t *pixels,
38                            ptrdiff_t line_size, int rnd);
39
40 void ff_put_vc1_mspel_mc10_neon(uint8_t *dst, const uint8_t *src,
41                                 ptrdiff_t stride, int rnd);
42 void ff_put_vc1_mspel_mc20_neon(uint8_t *dst, const uint8_t *src,
43                                 ptrdiff_t stride, int rnd);
44 void ff_put_vc1_mspel_mc30_neon(uint8_t *dst, const uint8_t *src,
45                                 ptrdiff_t stride, int rnd);
46
47 void ff_put_vc1_mspel_mc01_neon(uint8_t *dst, const uint8_t *src,
48                                 ptrdiff_t stride, int rnd);
49 void ff_put_vc1_mspel_mc02_neon(uint8_t *dst, const uint8_t *src,
50                                 ptrdiff_t stride, int rnd);
51 void ff_put_vc1_mspel_mc03_neon(uint8_t *dst, const uint8_t *src,
52                                 ptrdiff_t stride, int rnd);
53
54 void ff_put_vc1_mspel_mc11_neon(uint8_t *dst, const uint8_t *src,
55                                 ptrdiff_t stride, int rnd);
56 void ff_put_vc1_mspel_mc12_neon(uint8_t *dst, const uint8_t *src,
57                                 ptrdiff_t stride, int rnd);
58 void ff_put_vc1_mspel_mc13_neon(uint8_t *dst, const uint8_t *src,
59                                 ptrdiff_t stride, int rnd);
60
61 void ff_put_vc1_mspel_mc21_neon(uint8_t *dst, const uint8_t *src,
62                                 ptrdiff_t stride, int rnd);
63 void ff_put_vc1_mspel_mc22_neon(uint8_t *dst, const uint8_t *src,
64                                 ptrdiff_t stride, int rnd);
65 void ff_put_vc1_mspel_mc23_neon(uint8_t *dst, const uint8_t *src,
66                                 ptrdiff_t stride, int rnd);
67
68 void ff_put_vc1_mspel_mc31_neon(uint8_t *dst, const uint8_t *src,
69                                 ptrdiff_t stride, int rnd);
70 void ff_put_vc1_mspel_mc32_neon(uint8_t *dst, const uint8_t *src,
71                                 ptrdiff_t stride, int rnd);
72 void ff_put_vc1_mspel_mc33_neon(uint8_t *dst, const uint8_t *src,
73                                 ptrdiff_t stride, int rnd);
74
75 void ff_put_vc1_chroma_mc8_neon(uint8_t *dst, uint8_t *src, ptrdiff_t stride,
76                                 int h, int x, int y);
77 void ff_avg_vc1_chroma_mc8_neon(uint8_t *dst, uint8_t *src, ptrdiff_t stride,
78                                 int h, int x, int y);
79 void ff_put_vc1_chroma_mc4_neon(uint8_t *dst, uint8_t *src, ptrdiff_t stride,
80                                 int h, int x, int y);
81 void ff_avg_vc1_chroma_mc4_neon(uint8_t *dst, uint8_t *src, ptrdiff_t stride,
82                                 int h, int x, int y);
83
84 av_cold void ff_vc1dsp_init_neon(VC1DSPContext *dsp)
85 {
86     dsp->vc1_inv_trans_8x8 = ff_vc1_inv_trans_8x8_neon;
87     dsp->vc1_inv_trans_4x8 = ff_vc1_inv_trans_4x8_neon;
88     dsp->vc1_inv_trans_8x4 = ff_vc1_inv_trans_8x4_neon;
89     dsp->vc1_inv_trans_4x4 = ff_vc1_inv_trans_4x4_neon;
90     dsp->vc1_inv_trans_8x8_dc = ff_vc1_inv_trans_8x8_dc_neon;
91     dsp->vc1_inv_trans_4x8_dc = ff_vc1_inv_trans_4x8_dc_neon;
92     dsp->vc1_inv_trans_8x4_dc = ff_vc1_inv_trans_8x4_dc_neon;
93     dsp->vc1_inv_trans_4x4_dc = ff_vc1_inv_trans_4x4_dc_neon;
94
95     dsp->put_vc1_mspel_pixels_tab[ 0] = ff_put_pixels8x8_neon;
96     if (HAVE_AS_DN_DIRECTIVE) {
97     dsp->put_vc1_mspel_pixels_tab[ 1] = ff_put_vc1_mspel_mc10_neon;
98     dsp->put_vc1_mspel_pixels_tab[ 2] = ff_put_vc1_mspel_mc20_neon;
99     dsp->put_vc1_mspel_pixels_tab[ 3] = ff_put_vc1_mspel_mc30_neon;
100     dsp->put_vc1_mspel_pixels_tab[ 4] = ff_put_vc1_mspel_mc01_neon;
101     dsp->put_vc1_mspel_pixels_tab[ 5] = ff_put_vc1_mspel_mc11_neon;
102     dsp->put_vc1_mspel_pixels_tab[ 6] = ff_put_vc1_mspel_mc21_neon;
103     dsp->put_vc1_mspel_pixels_tab[ 7] = ff_put_vc1_mspel_mc31_neon;
104     dsp->put_vc1_mspel_pixels_tab[ 8] = ff_put_vc1_mspel_mc02_neon;
105     dsp->put_vc1_mspel_pixels_tab[ 9] = ff_put_vc1_mspel_mc12_neon;
106     dsp->put_vc1_mspel_pixels_tab[10] = ff_put_vc1_mspel_mc22_neon;
107     dsp->put_vc1_mspel_pixels_tab[11] = ff_put_vc1_mspel_mc32_neon;
108     dsp->put_vc1_mspel_pixels_tab[12] = ff_put_vc1_mspel_mc03_neon;
109     dsp->put_vc1_mspel_pixels_tab[13] = ff_put_vc1_mspel_mc13_neon;
110     dsp->put_vc1_mspel_pixels_tab[14] = ff_put_vc1_mspel_mc23_neon;
111     dsp->put_vc1_mspel_pixels_tab[15] = ff_put_vc1_mspel_mc33_neon;
112     }
113
114     dsp->put_no_rnd_vc1_chroma_pixels_tab[0] = ff_put_vc1_chroma_mc8_neon;
115     dsp->avg_no_rnd_vc1_chroma_pixels_tab[0] = ff_avg_vc1_chroma_mc8_neon;
116     dsp->put_no_rnd_vc1_chroma_pixels_tab[1] = ff_put_vc1_chroma_mc4_neon;
117     dsp->avg_no_rnd_vc1_chroma_pixels_tab[1] = ff_avg_vc1_chroma_mc4_neon;
118 }