x86: Move some variable declarations below the appropriat #ifdef.
[libav.git] / libavcodec / x86 / h264_intrapred_init.c
CommitLineData
de1c253b
RB
1/*
2 * Copyright (c) 2010 Jason Garrett-Glaser
3 *
2912e87a 4 * This file is part of Libav.
de1c253b 5 *
2912e87a 6 * Libav is free software; you can redistribute it and/or
de1c253b
RB
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
10 *
2912e87a 11 * Libav is distributed in the hope that it will be useful,
de1c253b
RB
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
15 *
16 * You should have received a copy of the GNU Lesser General Public
2912e87a 17 * License along with Libav; if not, write to the Free Software
de1c253b
RB
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19 */
20
c6c98d08 21#include "libavutil/cpu.h"
de1c253b
RB
22#include "libavcodec/h264pred.h"
23
a8d44f9d
DK
24#define PRED4x4(TYPE, DEPTH, OPT) \
25void ff_pred4x4_ ## TYPE ## _ ## DEPTH ## _ ## OPT (uint8_t *src, const uint8_t *topright, int stride);
26
27PRED4x4(dc, 10, mmxext)
28PRED4x4(down_left, 10, sse2)
29PRED4x4(down_left, 10, avx)
30PRED4x4(down_right, 10, sse2)
31PRED4x4(down_right, 10, ssse3)
32PRED4x4(down_right, 10, avx)
33PRED4x4(vertical_left, 10, sse2)
34PRED4x4(vertical_left, 10, avx)
35PRED4x4(vertical_right, 10, sse2)
36PRED4x4(vertical_right, 10, ssse3)
37PRED4x4(vertical_right, 10, avx)
38PRED4x4(horizontal_up, 10, mmxext)
39PRED4x4(horizontal_down, 10, sse2)
40PRED4x4(horizontal_down, 10, ssse3)
41PRED4x4(horizontal_down, 10, avx)
42
43#define PRED8x8(TYPE, DEPTH, OPT) \
44void ff_pred8x8_ ## TYPE ## _ ## DEPTH ## _ ## OPT (uint8_t *src, int stride);
45
c0483d0c
DK
46PRED8x8(dc, 10, mmxext)
47PRED8x8(dc, 10, sse2)
c0483d0c 48PRED8x8(top_dc, 10, sse2)
ac4a85f4 49PRED8x8(plane, 10, sse2)
a8d44f9d
DK
50PRED8x8(vertical, 10, sse2)
51PRED8x8(horizontal, 10, sse2)
52
c0483d0c
DK
53#define PRED8x8L(TYPE, DEPTH, OPT)\
54void ff_pred8x8l_ ## TYPE ## _ ## DEPTH ## _ ## OPT (uint8_t *src, int has_topleft, int has_topright, int stride);
55
56PRED8x8L(dc, 10, sse2)
406fbd24 57PRED8x8L(dc, 10, avx)
ac4a85f4
DK
58PRED8x8L(128_dc, 10, mmxext)
59PRED8x8L(128_dc, 10, sse2)
c0483d0c 60PRED8x8L(top_dc, 10, sse2)
406fbd24 61PRED8x8L(top_dc, 10, avx)
c0483d0c 62PRED8x8L(vertical, 10, sse2)
406fbd24 63PRED8x8L(vertical, 10, avx)
c0483d0c
DK
64PRED8x8L(horizontal, 10, sse2)
65PRED8x8L(horizontal, 10, ssse3)
406fbd24 66PRED8x8L(horizontal, 10, avx)
c0483d0c
DK
67PRED8x8L(down_left, 10, sse2)
68PRED8x8L(down_left, 10, ssse3)
406fbd24 69PRED8x8L(down_left, 10, avx)
c0483d0c
DK
70PRED8x8L(down_right, 10, sse2)
71PRED8x8L(down_right, 10, ssse3)
406fbd24 72PRED8x8L(down_right, 10, avx)
c0483d0c
DK
73PRED8x8L(vertical_right, 10, sse2)
74PRED8x8L(vertical_right, 10, ssse3)
406fbd24 75PRED8x8L(vertical_right, 10, avx)
c0483d0c
DK
76PRED8x8L(horizontal_up, 10, sse2)
77PRED8x8L(horizontal_up, 10, ssse3)
406fbd24 78PRED8x8L(horizontal_up, 10, avx)
c0483d0c
DK
79
80#define PRED16x16(TYPE, DEPTH, OPT)\
81void ff_pred16x16_ ## TYPE ## _ ## DEPTH ## _ ## OPT (uint8_t *src, int stride);
82
ac4a85f4
DK
83PRED16x16(dc, 10, mmxext)
84PRED16x16(dc, 10, sse2)
85PRED16x16(top_dc, 10, mmxext)
86PRED16x16(top_dc, 10, sse2)
87PRED16x16(128_dc, 10, mmxext)
88PRED16x16(128_dc, 10, sse2)
89PRED16x16(left_dc, 10, mmxext)
90PRED16x16(left_dc, 10, sse2)
c0483d0c
DK
91PRED16x16(vertical, 10, mmxext)
92PRED16x16(vertical, 10, sse2)
93PRED16x16(horizontal, 10, mmxext)
94PRED16x16(horizontal, 10, sse2)
95
de1c253b
RB
96void ff_pred16x16_vertical_mmx (uint8_t *src, int stride);
97void ff_pred16x16_vertical_sse (uint8_t *src, int stride);
98void ff_pred16x16_horizontal_mmx (uint8_t *src, int stride);
99void ff_pred16x16_horizontal_mmxext(uint8_t *src, int stride);
100void ff_pred16x16_horizontal_ssse3 (uint8_t *src, int stride);
101void ff_pred16x16_dc_mmxext (uint8_t *src, int stride);
102void ff_pred16x16_dc_sse2 (uint8_t *src, int stride);
103void ff_pred16x16_dc_ssse3 (uint8_t *src, int stride);
dd68d4db
RB
104void ff_pred16x16_plane_h264_mmx (uint8_t *src, int stride);
105void ff_pred16x16_plane_h264_mmx2 (uint8_t *src, int stride);
106void ff_pred16x16_plane_h264_sse2 (uint8_t *src, int stride);
107void ff_pred16x16_plane_h264_ssse3 (uint8_t *src, int stride);
108void ff_pred16x16_plane_rv40_mmx (uint8_t *src, int stride);
109void ff_pred16x16_plane_rv40_mmx2 (uint8_t *src, int stride);
110void ff_pred16x16_plane_rv40_sse2 (uint8_t *src, int stride);
111void ff_pred16x16_plane_rv40_ssse3 (uint8_t *src, int stride);
112void ff_pred16x16_plane_svq3_mmx (uint8_t *src, int stride);
113void ff_pred16x16_plane_svq3_mmx2 (uint8_t *src, int stride);
114void ff_pred16x16_plane_svq3_sse2 (uint8_t *src, int stride);
115void ff_pred16x16_plane_svq3_ssse3 (uint8_t *src, int stride);
de1c253b
RB
116void ff_pred16x16_tm_vp8_mmx (uint8_t *src, int stride);
117void ff_pred16x16_tm_vp8_mmxext (uint8_t *src, int stride);
118void ff_pred16x16_tm_vp8_sse2 (uint8_t *src, int stride);
725a3f9d 119void ff_pred8x8_top_dc_mmxext (uint8_t *src, int stride);
de1c253b 120void ff_pred8x8_dc_rv40_mmxext (uint8_t *src, int stride);
a2dfe8d1 121void ff_pred8x8_dc_mmxext (uint8_t *src, int stride);
de1c253b
RB
122void ff_pred8x8_vertical_mmx (uint8_t *src, int stride);
123void ff_pred8x8_horizontal_mmx (uint8_t *src, int stride);
124void ff_pred8x8_horizontal_mmxext (uint8_t *src, int stride);
125void ff_pred8x8_horizontal_ssse3 (uint8_t *src, int stride);
dd68d4db
RB
126void ff_pred8x8_plane_mmx (uint8_t *src, int stride);
127void ff_pred8x8_plane_mmx2 (uint8_t *src, int stride);
128void ff_pred8x8_plane_sse2 (uint8_t *src, int stride);
129void ff_pred8x8_plane_ssse3 (uint8_t *src, int stride);
de1c253b
RB
130void ff_pred8x8_tm_vp8_mmx (uint8_t *src, int stride);
131void ff_pred8x8_tm_vp8_mmxext (uint8_t *src, int stride);
132void ff_pred8x8_tm_vp8_sse2 (uint8_t *src, int stride);
133void ff_pred8x8_tm_vp8_ssse3 (uint8_t *src, int stride);
2e93fd4b
DK
134void ff_pred8x8l_top_dc_mmxext (uint8_t *src, int has_topleft, int has_topright, int stride);
135void ff_pred8x8l_top_dc_ssse3 (uint8_t *src, int has_topleft, int has_topright, int stride);
abab14ea
DK
136void ff_pred8x8l_dc_mmxext (uint8_t *src, int has_topleft, int has_topright, int stride);
137void ff_pred8x8l_dc_ssse3 (uint8_t *src, int has_topleft, int has_topright, int stride);
04207ef3
DK
138void ff_pred8x8l_horizontal_mmxext (uint8_t *src, int has_topleft, int has_topright, int stride);
139void ff_pred8x8l_horizontal_ssse3 (uint8_t *src, int has_topleft, int has_topright, int stride);
ee1ba9c3
DK
140void ff_pred8x8l_vertical_mmxext (uint8_t *src, int has_topleft, int has_topright, int stride);
141void ff_pred8x8l_vertical_ssse3 (uint8_t *src, int has_topleft, int has_topright, int stride);
536e9b2f 142void ff_pred8x8l_down_left_mmxext (uint8_t *src, int has_topleft, int has_topright, int stride);
c249e665
DK
143void ff_pred8x8l_down_left_sse2 (uint8_t *src, int has_topleft, int has_topright, int stride);
144void ff_pred8x8l_down_left_ssse3 (uint8_t *src, int has_topleft, int has_topright, int stride);
e916acbc 145void ff_pred8x8l_down_right_mmxext (uint8_t *src, int has_topleft, int has_topright, int stride);
602a4cb2
DK
146void ff_pred8x8l_down_right_sse2 (uint8_t *src, int has_topleft, int has_topright, int stride);
147void ff_pred8x8l_down_right_ssse3 (uint8_t *src, int has_topleft, int has_topright, int stride);
f25112fc 148void ff_pred8x8l_vertical_right_mmxext(uint8_t *src, int has_topleft, int has_topright, int stride);
bdd93f1b
DK
149void ff_pred8x8l_vertical_right_sse2(uint8_t *src, int has_topleft, int has_topright, int stride);
150void ff_pred8x8l_vertical_right_ssse3(uint8_t *src, int has_topleft, int has_topright, int stride);
ecc7efbb
DK
151void ff_pred8x8l_vertical_left_sse2(uint8_t *src, int has_topleft, int has_topright, int stride);
152void ff_pred8x8l_vertical_left_ssse3(uint8_t *src, int has_topleft, int has_topright, int stride);
98c6053c
DK
153void ff_pred8x8l_horizontal_up_mmxext(uint8_t *src, int has_topleft, int has_topright, int stride);
154void ff_pred8x8l_horizontal_up_ssse3(uint8_t *src, int has_topleft, int has_topright, int stride);
04cbdf3d 155void ff_pred8x8l_horizontal_down_mmxext(uint8_t *src, int has_topleft, int has_topright, int stride);
57b1f334
DK
156void ff_pred8x8l_horizontal_down_sse2(uint8_t *src, int has_topleft, int has_topright, int stride);
157void ff_pred8x8l_horizontal_down_ssse3(uint8_t *src, int has_topleft, int has_topright, int stride);
de1c253b 158void ff_pred4x4_dc_mmxext (uint8_t *src, const uint8_t *topright, int stride);
911b32f4 159void ff_pred4x4_down_left_mmxext (uint8_t *src, const uint8_t *topright, int stride);
720ea2d5 160void ff_pred4x4_down_right_mmxext (uint8_t *src, const uint8_t *topright, int stride);
92f441ae 161void ff_pred4x4_vertical_left_mmxext(uint8_t *src, const uint8_t *topright, int stride);
d0aebe23 162void ff_pred4x4_vertical_right_mmxext(uint8_t *src, const uint8_t *topright, int stride);
e9c576a4 163void ff_pred4x4_horizontal_up_mmxext(uint8_t *src, const uint8_t *topright, int stride);
76497232 164void ff_pred4x4_horizontal_down_mmxext(uint8_t *src, const uint8_t *topright, int stride);
de1c253b
RB
165void ff_pred4x4_tm_vp8_mmx (uint8_t *src, const uint8_t *topright, int stride);
166void ff_pred4x4_tm_vp8_mmxext (uint8_t *src, const uint8_t *topright, int stride);
167void ff_pred4x4_tm_vp8_ssse3 (uint8_t *src, const uint8_t *topright, int stride);
168void ff_pred4x4_vertical_vp8_mmxext(uint8_t *src, const uint8_t *topright, int stride);
169
19a0729b 170void ff_h264_pred_init_x86(H264PredContext *h, int codec_id, const int bit_depth)
de1c253b 171{
265980da 172#if HAVE_YASM
c6c98d08 173 int mm_flags = av_get_cpu_flags();
de1c253b 174
4de83b7b
DK
175 if (bit_depth == 8) {
176 if (mm_flags & AV_CPU_FLAG_MMX) {
177 h->pred16x16[VERT_PRED8x8 ] = ff_pred16x16_vertical_mmx;
178 h->pred16x16[HOR_PRED8x8 ] = ff_pred16x16_horizontal_mmx;
179 h->pred8x8 [VERT_PRED8x8 ] = ff_pred8x8_vertical_mmx;
180 h->pred8x8 [HOR_PRED8x8 ] = ff_pred8x8_horizontal_mmx;
181 if (codec_id == CODEC_ID_VP8) {
182 h->pred16x16[PLANE_PRED8x8 ] = ff_pred16x16_tm_vp8_mmx;
183 h->pred8x8 [PLANE_PRED8x8 ] = ff_pred8x8_tm_vp8_mmx;
184 h->pred4x4 [TM_VP8_PRED ] = ff_pred4x4_tm_vp8_mmx;
dd68d4db 185 } else {
4de83b7b
DK
186 h->pred8x8 [PLANE_PRED8x8] = ff_pred8x8_plane_mmx;
187 if (codec_id == CODEC_ID_SVQ3) {
188 h->pred16x16[PLANE_PRED8x8] = ff_pred16x16_plane_svq3_mmx;
189 } else if (codec_id == CODEC_ID_RV40) {
190 h->pred16x16[PLANE_PRED8x8] = ff_pred16x16_plane_rv40_mmx;
191 } else {
192 h->pred16x16[PLANE_PRED8x8] = ff_pred16x16_plane_h264_mmx;
193 }
dd68d4db 194 }
de1c253b 195 }
de1c253b 196
4de83b7b
DK
197 if (mm_flags & AV_CPU_FLAG_MMX2) {
198 h->pred16x16[HOR_PRED8x8 ] = ff_pred16x16_horizontal_mmxext;
199 h->pred16x16[DC_PRED8x8 ] = ff_pred16x16_dc_mmxext;
200 h->pred8x8 [HOR_PRED8x8 ] = ff_pred8x8_horizontal_mmxext;
201 h->pred8x8l [TOP_DC_PRED ] = ff_pred8x8l_top_dc_mmxext;
202 h->pred8x8l [DC_PRED ] = ff_pred8x8l_dc_mmxext;
203 h->pred8x8l [HOR_PRED ] = ff_pred8x8l_horizontal_mmxext;
204 h->pred8x8l [VERT_PRED ] = ff_pred8x8l_vertical_mmxext;
205 h->pred8x8l [DIAG_DOWN_RIGHT_PRED ] = ff_pred8x8l_down_right_mmxext;
206 h->pred8x8l [VERT_RIGHT_PRED ] = ff_pred8x8l_vertical_right_mmxext;
207 h->pred8x8l [HOR_UP_PRED ] = ff_pred8x8l_horizontal_up_mmxext;
208 h->pred8x8l [DIAG_DOWN_LEFT_PRED ] = ff_pred8x8l_down_left_mmxext;
209 h->pred8x8l [HOR_DOWN_PRED ] = ff_pred8x8l_horizontal_down_mmxext;
210 h->pred4x4 [DIAG_DOWN_RIGHT_PRED ] = ff_pred4x4_down_right_mmxext;
211 h->pred4x4 [VERT_RIGHT_PRED ] = ff_pred4x4_vertical_right_mmxext;
212 h->pred4x4 [HOR_DOWN_PRED ] = ff_pred4x4_horizontal_down_mmxext;
213 h->pred4x4 [DC_PRED ] = ff_pred4x4_dc_mmxext;
214 if (codec_id == CODEC_ID_VP8 || codec_id == CODEC_ID_H264) {
215 h->pred4x4 [DIAG_DOWN_LEFT_PRED] = ff_pred4x4_down_left_mmxext;
216 }
217 if (codec_id == CODEC_ID_SVQ3 || codec_id == CODEC_ID_H264) {
218 h->pred4x4 [VERT_LEFT_PRED ] = ff_pred4x4_vertical_left_mmxext;
219 }
220 if (codec_id != CODEC_ID_RV40) {
221 h->pred4x4 [HOR_UP_PRED ] = ff_pred4x4_horizontal_up_mmxext;
222 }
223 if (codec_id == CODEC_ID_SVQ3 || codec_id == CODEC_ID_H264) {
224 h->pred8x8 [TOP_DC_PRED8x8 ] = ff_pred8x8_top_dc_mmxext;
225 h->pred8x8 [DC_PRED8x8 ] = ff_pred8x8_dc_mmxext;
226 }
227 if (codec_id == CODEC_ID_VP8) {
228 h->pred16x16[PLANE_PRED8x8 ] = ff_pred16x16_tm_vp8_mmxext;
229 h->pred8x8 [DC_PRED8x8 ] = ff_pred8x8_dc_rv40_mmxext;
230 h->pred8x8 [PLANE_PRED8x8 ] = ff_pred8x8_tm_vp8_mmxext;
231 h->pred4x4 [TM_VP8_PRED ] = ff_pred4x4_tm_vp8_mmxext;
232 h->pred4x4 [VERT_PRED ] = ff_pred4x4_vertical_vp8_mmxext;
dd68d4db 233 } else {
4de83b7b
DK
234 h->pred8x8 [PLANE_PRED8x8] = ff_pred8x8_plane_mmx2;
235 if (codec_id == CODEC_ID_SVQ3) {
236 h->pred16x16[PLANE_PRED8x8 ] = ff_pred16x16_plane_svq3_mmx2;
237 } else if (codec_id == CODEC_ID_RV40) {
238 h->pred16x16[PLANE_PRED8x8 ] = ff_pred16x16_plane_rv40_mmx2;
239 } else {
240 h->pred16x16[PLANE_PRED8x8 ] = ff_pred16x16_plane_h264_mmx2;
241 }
dd68d4db 242 }
de1c253b 243 }
de1c253b 244
4de83b7b
DK
245 if (mm_flags & AV_CPU_FLAG_SSE) {
246 h->pred16x16[VERT_PRED8x8] = ff_pred16x16_vertical_sse;
247 }
de1c253b 248
4de83b7b
DK
249 if (mm_flags & AV_CPU_FLAG_SSE2) {
250 h->pred16x16[DC_PRED8x8 ] = ff_pred16x16_dc_sse2;
251 h->pred8x8l [DIAG_DOWN_LEFT_PRED ] = ff_pred8x8l_down_left_sse2;
252 h->pred8x8l [DIAG_DOWN_RIGHT_PRED ] = ff_pred8x8l_down_right_sse2;
253 h->pred8x8l [VERT_RIGHT_PRED ] = ff_pred8x8l_vertical_right_sse2;
254 h->pred8x8l [VERT_LEFT_PRED ] = ff_pred8x8l_vertical_left_sse2;
255 h->pred8x8l [HOR_DOWN_PRED ] = ff_pred8x8l_horizontal_down_sse2;
256 if (codec_id == CODEC_ID_VP8) {
257 h->pred16x16[PLANE_PRED8x8 ] = ff_pred16x16_tm_vp8_sse2;
258 h->pred8x8 [PLANE_PRED8x8 ] = ff_pred8x8_tm_vp8_sse2;
dd68d4db 259 } else {
4de83b7b
DK
260 h->pred8x8 [PLANE_PRED8x8 ] = ff_pred8x8_plane_sse2;
261 if (codec_id == CODEC_ID_SVQ3) {
262 h->pred16x16[PLANE_PRED8x8] = ff_pred16x16_plane_svq3_sse2;
263 } else if (codec_id == CODEC_ID_RV40) {
264 h->pred16x16[PLANE_PRED8x8] = ff_pred16x16_plane_rv40_sse2;
265 } else {
266 h->pred16x16[PLANE_PRED8x8] = ff_pred16x16_plane_h264_sse2;
267 }
dd68d4db 268 }
de1c253b 269 }
de1c253b 270
4de83b7b
DK
271 if (mm_flags & AV_CPU_FLAG_SSSE3) {
272 h->pred16x16[HOR_PRED8x8 ] = ff_pred16x16_horizontal_ssse3;
273 h->pred16x16[DC_PRED8x8 ] = ff_pred16x16_dc_ssse3;
274 h->pred8x8 [HOR_PRED8x8 ] = ff_pred8x8_horizontal_ssse3;
275 h->pred8x8l [TOP_DC_PRED ] = ff_pred8x8l_top_dc_ssse3;
276 h->pred8x8l [DC_PRED ] = ff_pred8x8l_dc_ssse3;
277 h->pred8x8l [HOR_PRED ] = ff_pred8x8l_horizontal_ssse3;
278 h->pred8x8l [VERT_PRED ] = ff_pred8x8l_vertical_ssse3;
279 h->pred8x8l [DIAG_DOWN_LEFT_PRED ] = ff_pred8x8l_down_left_ssse3;
280 h->pred8x8l [DIAG_DOWN_RIGHT_PRED ] = ff_pred8x8l_down_right_ssse3;
281 h->pred8x8l [VERT_RIGHT_PRED ] = ff_pred8x8l_vertical_right_ssse3;
282 h->pred8x8l [VERT_LEFT_PRED ] = ff_pred8x8l_vertical_left_ssse3;
283 h->pred8x8l [HOR_UP_PRED ] = ff_pred8x8l_horizontal_up_ssse3;
284 h->pred8x8l [HOR_DOWN_PRED ] = ff_pred8x8l_horizontal_down_ssse3;
285 if (codec_id == CODEC_ID_VP8) {
286 h->pred8x8 [PLANE_PRED8x8 ] = ff_pred8x8_tm_vp8_ssse3;
287 h->pred4x4 [TM_VP8_PRED ] = ff_pred4x4_tm_vp8_ssse3;
dd68d4db 288 } else {
4de83b7b
DK
289 h->pred8x8 [PLANE_PRED8x8] = ff_pred8x8_plane_ssse3;
290 if (codec_id == CODEC_ID_SVQ3) {
291 h->pred16x16[PLANE_PRED8x8] = ff_pred16x16_plane_svq3_ssse3;
292 } else if (codec_id == CODEC_ID_RV40) {
293 h->pred16x16[PLANE_PRED8x8] = ff_pred16x16_plane_rv40_ssse3;
294 } else {
295 h->pred16x16[PLANE_PRED8x8] = ff_pred16x16_plane_h264_ssse3;
296 }
dd68d4db 297 }
de1c253b 298 }
a8d44f9d 299 } else if (bit_depth == 10) {
a8d44f9d
DK
300 if (mm_flags & AV_CPU_FLAG_MMX2) {
301 h->pred4x4[DC_PRED ] = ff_pred4x4_dc_10_mmxext;
302 h->pred4x4[HOR_UP_PRED ] = ff_pred4x4_horizontal_up_10_mmxext;
c0483d0c
DK
303
304 h->pred8x8[DC_PRED8x8 ] = ff_pred8x8_dc_10_mmxext;
c0483d0c 305
ac4a85f4
DK
306 h->pred8x8l[DC_128_PRED ] = ff_pred8x8l_128_dc_10_mmxext;
307
308 h->pred16x16[DC_PRED8x8 ] = ff_pred16x16_dc_10_mmxext;
309 h->pred16x16[TOP_DC_PRED8x8 ] = ff_pred16x16_top_dc_10_mmxext;
310 h->pred16x16[DC_128_PRED8x8 ] = ff_pred16x16_128_dc_10_mmxext;
311 h->pred16x16[LEFT_DC_PRED8x8 ] = ff_pred16x16_left_dc_10_mmxext;
c0483d0c
DK
312 h->pred16x16[VERT_PRED8x8 ] = ff_pred16x16_vertical_10_mmxext;
313 h->pred16x16[HOR_PRED8x8 ] = ff_pred16x16_horizontal_10_mmxext;
a8d44f9d
DK
314 }
315 if (mm_flags & AV_CPU_FLAG_SSE2) {
316 h->pred4x4[DIAG_DOWN_LEFT_PRED ] = ff_pred4x4_down_left_10_sse2;
317 h->pred4x4[DIAG_DOWN_RIGHT_PRED] = ff_pred4x4_down_right_10_sse2;
318 h->pred4x4[VERT_LEFT_PRED ] = ff_pred4x4_vertical_left_10_sse2;
319 h->pred4x4[VERT_RIGHT_PRED ] = ff_pred4x4_vertical_right_10_sse2;
320 h->pred4x4[HOR_DOWN_PRED ] = ff_pred4x4_horizontal_down_10_sse2;
321
c0483d0c
DK
322 h->pred8x8[DC_PRED8x8 ] = ff_pred8x8_dc_10_sse2;
323 h->pred8x8[TOP_DC_PRED8x8 ] = ff_pred8x8_top_dc_10_sse2;
ac4a85f4 324 h->pred8x8[PLANE_PRED8x8 ] = ff_pred8x8_plane_10_sse2;
a8d44f9d
DK
325 h->pred8x8[VERT_PRED8x8 ] = ff_pred8x8_vertical_10_sse2;
326 h->pred8x8[HOR_PRED8x8 ] = ff_pred8x8_horizontal_10_sse2;
c0483d0c
DK
327
328 h->pred8x8l[VERT_PRED ] = ff_pred8x8l_vertical_10_sse2;
329 h->pred8x8l[HOR_PRED ] = ff_pred8x8l_horizontal_10_sse2;
330 h->pred8x8l[DC_PRED ] = ff_pred8x8l_dc_10_sse2;
ac4a85f4 331 h->pred8x8l[DC_128_PRED ] = ff_pred8x8l_128_dc_10_sse2;
c0483d0c
DK
332 h->pred8x8l[TOP_DC_PRED ] = ff_pred8x8l_top_dc_10_sse2;
333 h->pred8x8l[DIAG_DOWN_LEFT_PRED ] = ff_pred8x8l_down_left_10_sse2;
334 h->pred8x8l[DIAG_DOWN_RIGHT_PRED] = ff_pred8x8l_down_right_10_sse2;
335 h->pred8x8l[VERT_RIGHT_PRED ] = ff_pred8x8l_vertical_right_10_sse2;
336 h->pred8x8l[HOR_UP_PRED ] = ff_pred8x8l_horizontal_up_10_sse2;
337
ac4a85f4
DK
338 h->pred16x16[DC_PRED8x8 ] = ff_pred16x16_dc_10_sse2;
339 h->pred16x16[TOP_DC_PRED8x8 ] = ff_pred16x16_top_dc_10_sse2;
340 h->pred16x16[DC_128_PRED8x8 ] = ff_pred16x16_128_dc_10_sse2;
341 h->pred16x16[LEFT_DC_PRED8x8 ] = ff_pred16x16_left_dc_10_sse2;
c0483d0c
DK
342 h->pred16x16[VERT_PRED8x8 ] = ff_pred16x16_vertical_10_sse2;
343 h->pred16x16[HOR_PRED8x8 ] = ff_pred16x16_horizontal_10_sse2;
a8d44f9d
DK
344 }
345 if (mm_flags & AV_CPU_FLAG_SSSE3) {
346 h->pred4x4[DIAG_DOWN_RIGHT_PRED] = ff_pred4x4_down_right_10_ssse3;
347 h->pred4x4[VERT_RIGHT_PRED ] = ff_pred4x4_vertical_right_10_ssse3;
348 h->pred4x4[HOR_DOWN_PRED ] = ff_pred4x4_horizontal_down_10_ssse3;
c0483d0c 349
c0483d0c 350 h->pred8x8l[HOR_PRED ] = ff_pred8x8l_horizontal_10_ssse3;
c0483d0c 351 h->pred8x8l[DIAG_DOWN_LEFT_PRED ] = ff_pred8x8l_down_left_10_ssse3;
406fbd24
DK
352 h->pred8x8l[DIAG_DOWN_RIGHT_PRED] = ff_pred8x8l_down_right_10_ssse3;
353 h->pred8x8l[VERT_RIGHT_PRED ] = ff_pred8x8l_vertical_right_10_ssse3;
354 h->pred8x8l[HOR_UP_PRED ] = ff_pred8x8l_horizontal_up_10_ssse3;
a8d44f9d
DK
355 }
356#if HAVE_AVX
4de83b7b 357 if (mm_flags & AV_CPU_FLAG_AVX) {
a8d44f9d
DK
358 h->pred4x4[DIAG_DOWN_LEFT_PRED ] = ff_pred4x4_down_left_10_avx;
359 h->pred4x4[DIAG_DOWN_RIGHT_PRED] = ff_pred4x4_down_right_10_avx;
406fbd24 360 h->pred4x4[VERT_LEFT_PRED ] = ff_pred4x4_vertical_left_10_avx;
a8d44f9d
DK
361 h->pred4x4[VERT_RIGHT_PRED ] = ff_pred4x4_vertical_right_10_avx;
362 h->pred4x4[HOR_DOWN_PRED ] = ff_pred4x4_horizontal_down_10_avx;
406fbd24
DK
363
364 h->pred8x8l[VERT_PRED ] = ff_pred8x8l_vertical_10_avx;
365 h->pred8x8l[HOR_PRED ] = ff_pred8x8l_horizontal_10_avx;
366 h->pred8x8l[DC_PRED ] = ff_pred8x8l_dc_10_avx;
367 h->pred8x8l[TOP_DC_PRED ] = ff_pred8x8l_top_dc_10_avx;
368 h->pred8x8l[DIAG_DOWN_RIGHT_PRED] = ff_pred8x8l_down_right_10_avx;
369 h->pred8x8l[DIAG_DOWN_LEFT_PRED ] = ff_pred8x8l_down_left_10_avx;
370 h->pred8x8l[VERT_RIGHT_PRED ] = ff_pred8x8l_vertical_right_10_avx;
371 h->pred8x8l[HOR_UP_PRED ] = ff_pred8x8l_horizontal_up_10_avx;
a8d44f9d
DK
372 }
373#endif /* HAVE_AVX */
a8d44f9d 374 }
4de83b7b 375#endif /* HAVE_YASM */
de1c253b 376}