comparison arm/dsputil_neon.c @ 8359:9281a8a9387a libavcodec

ARM: replace "armv4l" with "arm"
author mru
date Wed, 17 Dec 2008 00:54:54 +0000
parents armv4l/dsputil_neon.c@834a77844ba3
children 0ca0e3c98ed5
comparison
equal deleted inserted replaced
8358:c30b92cf446b 8359:9281a8a9387a
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"
26
27 void ff_put_pixels16_neon(uint8_t *, const uint8_t *, int, int);
28 void ff_put_pixels16_x2_neon(uint8_t *, const uint8_t *, int, int);
29 void ff_put_pixels16_y2_neon(uint8_t *, const uint8_t *, int, int);
30 void ff_put_pixels16_xy2_neon(uint8_t *, const uint8_t *, int, int);
31 void ff_put_pixels8_neon(uint8_t *, const uint8_t *, int, int);
32 void ff_put_pixels8_x2_neon(uint8_t *, const uint8_t *, int, int);
33 void ff_put_pixels8_y2_neon(uint8_t *, const uint8_t *, int, int);
34 void ff_put_pixels8_xy2_neon(uint8_t *, const uint8_t *, int, int);
35 void ff_put_pixels16_x2_no_rnd_neon(uint8_t *, const uint8_t *, int, int);
36 void ff_put_pixels16_y2_no_rnd_neon(uint8_t *, const uint8_t *, int, int);
37 void ff_put_pixels16_xy2_no_rnd_neon(uint8_t *, const uint8_t *, int, int);
38 void ff_put_pixels8_x2_no_rnd_neon(uint8_t *, const uint8_t *, int, int);
39 void ff_put_pixels8_y2_no_rnd_neon(uint8_t *, const uint8_t *, int, int);
40 void ff_put_pixels8_xy2_no_rnd_neon(uint8_t *, const uint8_t *, int, int);
41
42 void ff_avg_pixels16_neon(uint8_t *, const uint8_t *, int, int);
43
44 void ff_put_h264_qpel16_mc00_neon(uint8_t *, uint8_t *, int);
45 void ff_put_h264_qpel16_mc10_neon(uint8_t *, uint8_t *, int);
46 void ff_put_h264_qpel16_mc20_neon(uint8_t *, uint8_t *, int);
47 void ff_put_h264_qpel16_mc30_neon(uint8_t *, uint8_t *, int);
48 void ff_put_h264_qpel16_mc01_neon(uint8_t *, uint8_t *, int);
49 void ff_put_h264_qpel16_mc11_neon(uint8_t *, uint8_t *, int);
50 void ff_put_h264_qpel16_mc21_neon(uint8_t *, uint8_t *, int);
51 void ff_put_h264_qpel16_mc31_neon(uint8_t *, uint8_t *, int);
52 void ff_put_h264_qpel16_mc02_neon(uint8_t *, uint8_t *, int);
53 void ff_put_h264_qpel16_mc12_neon(uint8_t *, uint8_t *, int);
54 void ff_put_h264_qpel16_mc22_neon(uint8_t *, uint8_t *, int);
55 void ff_put_h264_qpel16_mc32_neon(uint8_t *, uint8_t *, int);
56 void ff_put_h264_qpel16_mc03_neon(uint8_t *, uint8_t *, int);
57 void ff_put_h264_qpel16_mc13_neon(uint8_t *, uint8_t *, int);
58 void ff_put_h264_qpel16_mc23_neon(uint8_t *, uint8_t *, int);
59 void ff_put_h264_qpel16_mc33_neon(uint8_t *, uint8_t *, int);
60
61 void ff_put_h264_qpel8_mc00_neon(uint8_t *, uint8_t *, int);
62 void ff_put_h264_qpel8_mc10_neon(uint8_t *, uint8_t *, int);
63 void ff_put_h264_qpel8_mc20_neon(uint8_t *, uint8_t *, int);
64 void ff_put_h264_qpel8_mc30_neon(uint8_t *, uint8_t *, int);
65 void ff_put_h264_qpel8_mc01_neon(uint8_t *, uint8_t *, int);
66 void ff_put_h264_qpel8_mc11_neon(uint8_t *, uint8_t *, int);
67 void ff_put_h264_qpel8_mc21_neon(uint8_t *, uint8_t *, int);
68 void ff_put_h264_qpel8_mc31_neon(uint8_t *, uint8_t *, int);
69 void ff_put_h264_qpel8_mc02_neon(uint8_t *, uint8_t *, int);
70 void ff_put_h264_qpel8_mc12_neon(uint8_t *, uint8_t *, int);
71 void ff_put_h264_qpel8_mc22_neon(uint8_t *, uint8_t *, int);
72 void ff_put_h264_qpel8_mc32_neon(uint8_t *, uint8_t *, int);
73 void ff_put_h264_qpel8_mc03_neon(uint8_t *, uint8_t *, int);
74 void ff_put_h264_qpel8_mc13_neon(uint8_t *, uint8_t *, int);
75 void ff_put_h264_qpel8_mc23_neon(uint8_t *, uint8_t *, int);
76 void ff_put_h264_qpel8_mc33_neon(uint8_t *, uint8_t *, int);
77
78 void ff_avg_h264_qpel16_mc00_neon(uint8_t *, uint8_t *, int);
79
80 void ff_put_h264_chroma_mc8_neon(uint8_t *, uint8_t *, int, int, int, int);
81 void ff_put_h264_chroma_mc4_neon(uint8_t *, uint8_t *, int, int, int, int);
82
83 void ff_avg_h264_chroma_mc8_neon(uint8_t *, uint8_t *, int, int, int, int);
84 void ff_avg_h264_chroma_mc4_neon(uint8_t *, uint8_t *, int, int, int, int);
85
86 void ff_h264_v_loop_filter_luma_neon(uint8_t *pix, int stride, int alpha,
87 int beta, int8_t *tc0);
88 void ff_h264_h_loop_filter_luma_neon(uint8_t *pix, int stride, int alpha,
89 int beta, int8_t *tc0);
90 void ff_h264_v_loop_filter_chroma_neon(uint8_t *pix, int stride, int alpha,
91 int beta, int8_t *tc0);
92 void ff_h264_h_loop_filter_chroma_neon(uint8_t *pix, int stride, int alpha,
93 int beta, int8_t *tc0);
94
95 void ff_h264_idct_add_neon(uint8_t *dst, DCTELEM *block, int stride);
96 void ff_h264_idct_dc_add_neon(uint8_t *dst, DCTELEM *block, int stride);
97
98 void ff_dsputil_init_neon(DSPContext *c, AVCodecContext *avctx)
99 {
100 c->put_pixels_tab[0][0] = ff_put_pixels16_neon;
101 c->put_pixels_tab[0][1] = ff_put_pixels16_x2_neon;
102 c->put_pixels_tab[0][2] = ff_put_pixels16_y2_neon;
103 c->put_pixels_tab[0][3] = ff_put_pixels16_xy2_neon;
104 c->put_pixels_tab[1][0] = ff_put_pixels8_neon;
105 c->put_pixels_tab[1][1] = ff_put_pixels8_x2_neon;
106 c->put_pixels_tab[1][2] = ff_put_pixels8_y2_neon;
107 c->put_pixels_tab[1][3] = ff_put_pixels8_xy2_neon;
108
109 c->put_no_rnd_pixels_tab[0][0] = ff_put_pixels16_neon;
110 c->put_no_rnd_pixels_tab[0][1] = ff_put_pixels16_x2_no_rnd_neon;
111 c->put_no_rnd_pixels_tab[0][2] = ff_put_pixels16_y2_no_rnd_neon;
112 c->put_no_rnd_pixels_tab[0][3] = ff_put_pixels16_xy2_no_rnd_neon;
113 c->put_no_rnd_pixels_tab[1][0] = ff_put_pixels8_neon;
114 c->put_no_rnd_pixels_tab[1][1] = ff_put_pixels8_x2_no_rnd_neon;
115 c->put_no_rnd_pixels_tab[1][2] = ff_put_pixels8_y2_no_rnd_neon;
116 c->put_no_rnd_pixels_tab[1][3] = ff_put_pixels8_xy2_no_rnd_neon;
117
118 c->avg_pixels_tab[0][0] = ff_avg_pixels16_neon;
119
120 c->put_h264_chroma_pixels_tab[0] = ff_put_h264_chroma_mc8_neon;
121 c->put_h264_chroma_pixels_tab[1] = ff_put_h264_chroma_mc4_neon;
122
123 c->avg_h264_chroma_pixels_tab[0] = ff_avg_h264_chroma_mc8_neon;
124 c->avg_h264_chroma_pixels_tab[1] = ff_avg_h264_chroma_mc4_neon;
125
126 c->put_h264_qpel_pixels_tab[0][ 0] = ff_put_h264_qpel16_mc00_neon;
127 c->put_h264_qpel_pixels_tab[0][ 1] = ff_put_h264_qpel16_mc10_neon;
128 c->put_h264_qpel_pixels_tab[0][ 2] = ff_put_h264_qpel16_mc20_neon;
129 c->put_h264_qpel_pixels_tab[0][ 3] = ff_put_h264_qpel16_mc30_neon;
130 c->put_h264_qpel_pixels_tab[0][ 4] = ff_put_h264_qpel16_mc01_neon;
131 c->put_h264_qpel_pixels_tab[0][ 5] = ff_put_h264_qpel16_mc11_neon;
132 c->put_h264_qpel_pixels_tab[0][ 6] = ff_put_h264_qpel16_mc21_neon;
133 c->put_h264_qpel_pixels_tab[0][ 7] = ff_put_h264_qpel16_mc31_neon;
134 c->put_h264_qpel_pixels_tab[0][ 8] = ff_put_h264_qpel16_mc02_neon;
135 c->put_h264_qpel_pixels_tab[0][ 9] = ff_put_h264_qpel16_mc12_neon;
136 c->put_h264_qpel_pixels_tab[0][10] = ff_put_h264_qpel16_mc22_neon;
137 c->put_h264_qpel_pixels_tab[0][11] = ff_put_h264_qpel16_mc32_neon;
138 c->put_h264_qpel_pixels_tab[0][12] = ff_put_h264_qpel16_mc03_neon;
139 c->put_h264_qpel_pixels_tab[0][13] = ff_put_h264_qpel16_mc13_neon;
140 c->put_h264_qpel_pixels_tab[0][14] = ff_put_h264_qpel16_mc23_neon;
141 c->put_h264_qpel_pixels_tab[0][15] = ff_put_h264_qpel16_mc33_neon;
142
143 c->put_h264_qpel_pixels_tab[1][ 0] = ff_put_h264_qpel8_mc00_neon;
144 c->put_h264_qpel_pixels_tab[1][ 1] = ff_put_h264_qpel8_mc10_neon;
145 c->put_h264_qpel_pixels_tab[1][ 2] = ff_put_h264_qpel8_mc20_neon;
146 c->put_h264_qpel_pixels_tab[1][ 3] = ff_put_h264_qpel8_mc30_neon;
147 c->put_h264_qpel_pixels_tab[1][ 4] = ff_put_h264_qpel8_mc01_neon;
148 c->put_h264_qpel_pixels_tab[1][ 5] = ff_put_h264_qpel8_mc11_neon;
149 c->put_h264_qpel_pixels_tab[1][ 6] = ff_put_h264_qpel8_mc21_neon;
150 c->put_h264_qpel_pixels_tab[1][ 7] = ff_put_h264_qpel8_mc31_neon;
151 c->put_h264_qpel_pixels_tab[1][ 8] = ff_put_h264_qpel8_mc02_neon;
152 c->put_h264_qpel_pixels_tab[1][ 9] = ff_put_h264_qpel8_mc12_neon;
153 c->put_h264_qpel_pixels_tab[1][10] = ff_put_h264_qpel8_mc22_neon;
154 c->put_h264_qpel_pixels_tab[1][11] = ff_put_h264_qpel8_mc32_neon;
155 c->put_h264_qpel_pixels_tab[1][12] = ff_put_h264_qpel8_mc03_neon;
156 c->put_h264_qpel_pixels_tab[1][13] = ff_put_h264_qpel8_mc13_neon;
157 c->put_h264_qpel_pixels_tab[1][14] = ff_put_h264_qpel8_mc23_neon;
158 c->put_h264_qpel_pixels_tab[1][15] = ff_put_h264_qpel8_mc33_neon;
159
160 c->avg_h264_qpel_pixels_tab[0][ 0] = ff_avg_h264_qpel16_mc00_neon;
161
162 c->h264_v_loop_filter_luma = ff_h264_v_loop_filter_luma_neon;
163 c->h264_h_loop_filter_luma = ff_h264_h_loop_filter_luma_neon;
164 c->h264_v_loop_filter_chroma = ff_h264_v_loop_filter_chroma_neon;
165 c->h264_h_loop_filter_chroma = ff_h264_h_loop_filter_chroma_neon;
166
167 c->h264_idct_add = ff_h264_idct_add_neon;
168 c->h264_idct_dc_add = ff_h264_idct_dc_add_neon;
169 }