Merge remote-tracking branch 'qatar/master'
[ffmpeg.git] / libavcodec / x86 / h264_intrapred_init.c
1 /*
2  * Copyright (c) 2010 Jason Garrett-Glaser
3  *
4  * This file is part of FFmpeg.
5  *
6  * FFmpeg is free software; you can redistribute it and/or
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  *
11  * FFmpeg is distributed in the hope that it will be useful,
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
17  * License along with FFmpeg; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19  */
20
21 #include "libavutil/cpu.h"
22 #include "libavcodec/h264pred.h"
23
24 #define PRED4x4(TYPE, DEPTH, OPT) \
25 void ff_pred4x4_ ## TYPE ## _ ## DEPTH ## _ ## OPT (uint8_t *src, const uint8_t *topright, int stride);
26
27 PRED4x4(dc, 10, mmxext)
28 PRED4x4(down_left, 10, sse2)
29 PRED4x4(down_left, 10, avx)
30 PRED4x4(down_right, 10, sse2)
31 PRED4x4(down_right, 10, ssse3)
32 PRED4x4(down_right, 10, avx)
33 PRED4x4(vertical_left, 10, sse2)
34 PRED4x4(vertical_left, 10, avx)
35 PRED4x4(vertical_right, 10, sse2)
36 PRED4x4(vertical_right, 10, ssse3)
37 PRED4x4(vertical_right, 10, avx)
38 PRED4x4(horizontal_up, 10, mmxext)
39 PRED4x4(horizontal_down, 10, sse2)
40 PRED4x4(horizontal_down, 10, ssse3)
41 PRED4x4(horizontal_down, 10, avx)
42
43 #define PRED8x8(TYPE, DEPTH, OPT) \
44 void ff_pred8x8_ ## TYPE ## _ ## DEPTH ## _ ## OPT (uint8_t *src, int stride);
45
46 PRED8x8(dc, 10, mmxext)
47 PRED8x8(dc, 10, sse2)
48 PRED8x8(top_dc, 10, sse2)
49 PRED8x8(plane, 10, sse2)
50 PRED8x8(vertical, 10, sse2)
51 PRED8x8(horizontal, 10, sse2)
52
53 #define PRED8x8L(TYPE, DEPTH, OPT)\
54 void ff_pred8x8l_ ## TYPE ## _ ## DEPTH ## _ ## OPT (uint8_t *src, int has_topleft, int has_topright, int stride);
55
56 PRED8x8L(dc, 10, sse2)
57 PRED8x8L(dc, 10, avx)
58 PRED8x8L(128_dc, 10, mmxext)
59 PRED8x8L(128_dc, 10, sse2)
60 PRED8x8L(top_dc, 10, sse2)
61 PRED8x8L(top_dc, 10, avx)
62 PRED8x8L(vertical, 10, sse2)
63 PRED8x8L(vertical, 10, avx)
64 PRED8x8L(horizontal, 10, sse2)
65 PRED8x8L(horizontal, 10, ssse3)
66 PRED8x8L(horizontal, 10, avx)
67 PRED8x8L(down_left, 10, sse2)
68 PRED8x8L(down_left, 10, ssse3)
69 PRED8x8L(down_left, 10, avx)
70 PRED8x8L(down_right, 10, sse2)
71 PRED8x8L(down_right, 10, ssse3)
72 PRED8x8L(down_right, 10, avx)
73 PRED8x8L(vertical_right, 10, sse2)
74 PRED8x8L(vertical_right, 10, ssse3)
75 PRED8x8L(vertical_right, 10, avx)
76 PRED8x8L(horizontal_up, 10, sse2)
77 PRED8x8L(horizontal_up, 10, ssse3)
78 PRED8x8L(horizontal_up, 10, avx)
79
80 #define PRED16x16(TYPE, DEPTH, OPT)\
81 void ff_pred16x16_ ## TYPE ## _ ## DEPTH ## _ ## OPT (uint8_t *src, int stride);
82
83 PRED16x16(dc, 10, mmxext)
84 PRED16x16(dc, 10, sse2)
85 PRED16x16(top_dc, 10, mmxext)
86 PRED16x16(top_dc, 10, sse2)
87 PRED16x16(128_dc, 10, mmxext)
88 PRED16x16(128_dc, 10, sse2)
89 PRED16x16(left_dc, 10, mmxext)
90 PRED16x16(left_dc, 10, sse2)
91 PRED16x16(vertical, 10, mmxext)
92 PRED16x16(vertical, 10, sse2)
93 PRED16x16(horizontal, 10, mmxext)
94 PRED16x16(horizontal, 10, sse2)
95
96 void ff_pred16x16_vertical_mmx     (uint8_t *src, int stride);
97 void ff_pred16x16_vertical_sse     (uint8_t *src, int stride);
98 void ff_pred16x16_horizontal_mmx   (uint8_t *src, int stride);
99 void ff_pred16x16_horizontal_mmxext(uint8_t *src, int stride);
100 void ff_pred16x16_horizontal_ssse3 (uint8_t *src, int stride);
101 void ff_pred16x16_dc_mmxext        (uint8_t *src, int stride);
102 void ff_pred16x16_dc_sse2          (uint8_t *src, int stride);
103 void ff_pred16x16_dc_ssse3         (uint8_t *src, int stride);
104 void ff_pred16x16_plane_h264_mmx   (uint8_t *src, int stride);
105 void ff_pred16x16_plane_h264_mmx2  (uint8_t *src, int stride);
106 void ff_pred16x16_plane_h264_sse2  (uint8_t *src, int stride);
107 void ff_pred16x16_plane_h264_ssse3 (uint8_t *src, int stride);
108 void ff_pred16x16_plane_rv40_mmx   (uint8_t *src, int stride);
109 void ff_pred16x16_plane_rv40_mmx2  (uint8_t *src, int stride);
110 void ff_pred16x16_plane_rv40_sse2  (uint8_t *src, int stride);
111 void ff_pred16x16_plane_rv40_ssse3 (uint8_t *src, int stride);
112 void ff_pred16x16_plane_svq3_mmx   (uint8_t *src, int stride);
113 void ff_pred16x16_plane_svq3_mmx2  (uint8_t *src, int stride);
114 void ff_pred16x16_plane_svq3_sse2  (uint8_t *src, int stride);
115 void ff_pred16x16_plane_svq3_ssse3 (uint8_t *src, int stride);
116 void ff_pred16x16_tm_vp8_mmx       (uint8_t *src, int stride);
117 void ff_pred16x16_tm_vp8_mmxext    (uint8_t *src, int stride);
118 void ff_pred16x16_tm_vp8_sse2      (uint8_t *src, int stride);
119 void ff_pred8x8_top_dc_mmxext      (uint8_t *src, int stride);
120 void ff_pred8x8_dc_rv40_mmxext     (uint8_t *src, int stride);
121 void ff_pred8x8_dc_mmxext          (uint8_t *src, int stride);
122 void ff_pred8x8_vertical_mmx       (uint8_t *src, int stride);
123 void ff_pred8x8_horizontal_mmx     (uint8_t *src, int stride);
124 void ff_pred8x8_horizontal_mmxext  (uint8_t *src, int stride);
125 void ff_pred8x8_horizontal_ssse3   (uint8_t *src, int stride);
126 void ff_pred8x8_plane_mmx          (uint8_t *src, int stride);
127 void ff_pred8x8_plane_mmx2         (uint8_t *src, int stride);
128 void ff_pred8x8_plane_sse2         (uint8_t *src, int stride);
129 void ff_pred8x8_plane_ssse3        (uint8_t *src, int stride);
130 void ff_pred8x8_tm_vp8_mmx         (uint8_t *src, int stride);
131 void ff_pred8x8_tm_vp8_mmxext      (uint8_t *src, int stride);
132 void ff_pred8x8_tm_vp8_sse2        (uint8_t *src, int stride);
133 void ff_pred8x8_tm_vp8_ssse3       (uint8_t *src, int stride);
134 void ff_pred8x8l_top_dc_mmxext     (uint8_t *src, int has_topleft, int has_topright, int stride);
135 void ff_pred8x8l_top_dc_ssse3      (uint8_t *src, int has_topleft, int has_topright, int stride);
136 void ff_pred8x8l_dc_mmxext         (uint8_t *src, int has_topleft, int has_topright, int stride);
137 void ff_pred8x8l_dc_ssse3          (uint8_t *src, int has_topleft, int has_topright, int stride);
138 void ff_pred8x8l_horizontal_mmxext (uint8_t *src, int has_topleft, int has_topright, int stride);
139 void ff_pred8x8l_horizontal_ssse3  (uint8_t *src, int has_topleft, int has_topright, int stride);
140 void ff_pred8x8l_vertical_mmxext   (uint8_t *src, int has_topleft, int has_topright, int stride);
141 void ff_pred8x8l_vertical_ssse3    (uint8_t *src, int has_topleft, int has_topright, int stride);
142 void ff_pred8x8l_down_left_mmxext  (uint8_t *src, int has_topleft, int has_topright, int stride);
143 void ff_pred8x8l_down_left_sse2    (uint8_t *src, int has_topleft, int has_topright, int stride);
144 void ff_pred8x8l_down_left_ssse3   (uint8_t *src, int has_topleft, int has_topright, int stride);
145 void ff_pred8x8l_down_right_mmxext (uint8_t *src, int has_topleft, int has_topright, int stride);
146 void ff_pred8x8l_down_right_sse2   (uint8_t *src, int has_topleft, int has_topright, int stride);
147 void ff_pred8x8l_down_right_ssse3  (uint8_t *src, int has_topleft, int has_topright, int stride);
148 void ff_pred8x8l_vertical_right_mmxext(uint8_t *src, int has_topleft, int has_topright, int stride);
149 void ff_pred8x8l_vertical_right_sse2(uint8_t *src, int has_topleft, int has_topright, int stride);
150 void ff_pred8x8l_vertical_right_ssse3(uint8_t *src, int has_topleft, int has_topright, int stride);
151 void ff_pred8x8l_vertical_left_sse2(uint8_t *src, int has_topleft, int has_topright, int stride);
152 void ff_pred8x8l_vertical_left_ssse3(uint8_t *src, int has_topleft, int has_topright, int stride);
153 void ff_pred8x8l_horizontal_up_mmxext(uint8_t *src, int has_topleft, int has_topright, int stride);
154 void ff_pred8x8l_horizontal_up_ssse3(uint8_t *src, int has_topleft, int has_topright, int stride);
155 void ff_pred8x8l_horizontal_down_mmxext(uint8_t *src, int has_topleft, int has_topright, int stride);
156 void ff_pred8x8l_horizontal_down_sse2(uint8_t *src, int has_topleft, int has_topright, int stride);
157 void ff_pred8x8l_horizontal_down_ssse3(uint8_t *src, int has_topleft, int has_topright, int stride);
158 void ff_pred4x4_dc_mmxext          (uint8_t *src, const uint8_t *topright, int stride);
159 void ff_pred4x4_down_left_mmxext   (uint8_t *src, const uint8_t *topright, int stride);
160 void ff_pred4x4_down_right_mmxext  (uint8_t *src, const uint8_t *topright, int stride);
161 void ff_pred4x4_vertical_left_mmxext(uint8_t *src, const uint8_t *topright, int stride);
162 void ff_pred4x4_vertical_right_mmxext(uint8_t *src, const uint8_t *topright, int stride);
163 void ff_pred4x4_horizontal_up_mmxext(uint8_t *src, const uint8_t *topright, int stride);
164 void ff_pred4x4_horizontal_down_mmxext(uint8_t *src, const uint8_t *topright, int stride);
165 void ff_pred4x4_tm_vp8_mmx         (uint8_t *src, const uint8_t *topright, int stride);
166 void ff_pred4x4_tm_vp8_mmxext      (uint8_t *src, const uint8_t *topright, int stride);
167 void ff_pred4x4_tm_vp8_ssse3       (uint8_t *src, const uint8_t *topright, int stride);
168 void ff_pred4x4_vertical_vp8_mmxext(uint8_t *src, const uint8_t *topright, int stride);
169
170 void ff_h264_pred_init_x86(H264PredContext *h, int codec_id, const int bit_depth)
171 {
172     int mm_flags = av_get_cpu_flags();
173
174 #if HAVE_YASM
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;
185             } else {
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                 }
194             }
195         }
196
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;
233             } else {
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                 }
242             }
243         }
244
245         if (mm_flags & AV_CPU_FLAG_SSE) {
246             h->pred16x16[VERT_PRED8x8] = ff_pred16x16_vertical_sse;
247         }
248
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;
259             } else {
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                 }
268             }
269         }
270
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;
288             } else {
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                 }
297             }
298         }
299     } else if (bit_depth == 10) {
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;
303
304             h->pred8x8[DC_PRED8x8          ] = ff_pred8x8_dc_10_mmxext;
305
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;
312             h->pred16x16[VERT_PRED8x8      ] = ff_pred16x16_vertical_10_mmxext;
313             h->pred16x16[HOR_PRED8x8       ] = ff_pred16x16_horizontal_10_mmxext;
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
322             h->pred8x8[DC_PRED8x8          ] = ff_pred8x8_dc_10_sse2;
323             h->pred8x8[TOP_DC_PRED8x8      ] = ff_pred8x8_top_dc_10_sse2;
324             h->pred8x8[PLANE_PRED8x8       ] = ff_pred8x8_plane_10_sse2;
325             h->pred8x8[VERT_PRED8x8        ] = ff_pred8x8_vertical_10_sse2;
326             h->pred8x8[HOR_PRED8x8         ] = ff_pred8x8_horizontal_10_sse2;
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;
331             h->pred8x8l[DC_128_PRED         ] = ff_pred8x8l_128_dc_10_sse2;
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
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;
342             h->pred16x16[VERT_PRED8x8      ] = ff_pred16x16_vertical_10_sse2;
343             h->pred16x16[HOR_PRED8x8       ] = ff_pred16x16_horizontal_10_sse2;
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;
349
350             h->pred8x8l[HOR_PRED            ] = ff_pred8x8l_horizontal_10_ssse3;
351             h->pred8x8l[DIAG_DOWN_LEFT_PRED ] = ff_pred8x8l_down_left_10_ssse3;
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;
355         }
356 #if HAVE_AVX
357         if (mm_flags & AV_CPU_FLAG_AVX) {
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;
360             h->pred4x4[VERT_LEFT_PRED      ] = ff_pred4x4_vertical_left_10_avx;
361             h->pred4x4[VERT_RIGHT_PRED     ] = ff_pred4x4_vertical_right_10_avx;
362             h->pred4x4[HOR_DOWN_PRED       ] = ff_pred4x4_horizontal_down_10_avx;
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;
372         }
373 #endif /* HAVE_AVX */
374     }
375 #endif /* HAVE_YASM */
376 }