]> git.sesse.net Git - ffmpeg/blob - libavcodec/x86/h264_intrapred_init.c
H.264: Add x86 assembly for 10-bit H.264 predict functions
[ffmpeg] / libavcodec / x86 / h264_intrapred_init.c
1 /*
2  * Copyright (c) 2010 Jason Garrett-Glaser
3  *
4  * This file is part of Libav.
5  *
6  * Libav 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  * Libav 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 Libav; 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, mmxext)
49 PRED8x8(top_dc, 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, ssse3)
58 PRED8x8L(top_dc, 10, sse2)
59 PRED8x8L(top_dc, 10, ssse3)
60 PRED8x8L(vertical, 10, sse2)
61 PRED8x8L(vertical, 10, ssse3)
62 PRED8x8L(horizontal, 10, sse2)
63 PRED8x8L(horizontal, 10, ssse3)
64 PRED8x8L(down_left, 10, sse2)
65 PRED8x8L(down_left, 10, ssse3)
66 PRED8x8L(down_right, 10, sse2)
67 PRED8x8L(down_right, 10, ssse3)
68 PRED8x8L(vertical_right, 10, sse2)
69 PRED8x8L(vertical_right, 10, ssse3)
70 PRED8x8L(horizontal_up, 10, sse2)
71 PRED8x8L(horizontal_up, 10, ssse3)
72
73 #define PRED16x16(TYPE, DEPTH, OPT)\
74 void ff_pred16x16_ ## TYPE ## _ ## DEPTH ## _ ## OPT (uint8_t *src, int stride);
75
76 PRED16x16(vertical, 10, mmxext)
77 PRED16x16(vertical, 10, sse2)
78 PRED16x16(horizontal, 10, mmxext)
79 PRED16x16(horizontal, 10, sse2)
80
81 void ff_pred16x16_vertical_mmx     (uint8_t *src, int stride);
82 void ff_pred16x16_vertical_sse     (uint8_t *src, int stride);
83 void ff_pred16x16_horizontal_mmx   (uint8_t *src, int stride);
84 void ff_pred16x16_horizontal_mmxext(uint8_t *src, int stride);
85 void ff_pred16x16_horizontal_ssse3 (uint8_t *src, int stride);
86 void ff_pred16x16_dc_mmxext        (uint8_t *src, int stride);
87 void ff_pred16x16_dc_sse2          (uint8_t *src, int stride);
88 void ff_pred16x16_dc_ssse3         (uint8_t *src, int stride);
89 void ff_pred16x16_plane_h264_mmx   (uint8_t *src, int stride);
90 void ff_pred16x16_plane_h264_mmx2  (uint8_t *src, int stride);
91 void ff_pred16x16_plane_h264_sse2  (uint8_t *src, int stride);
92 void ff_pred16x16_plane_h264_ssse3 (uint8_t *src, int stride);
93 void ff_pred16x16_plane_rv40_mmx   (uint8_t *src, int stride);
94 void ff_pred16x16_plane_rv40_mmx2  (uint8_t *src, int stride);
95 void ff_pred16x16_plane_rv40_sse2  (uint8_t *src, int stride);
96 void ff_pred16x16_plane_rv40_ssse3 (uint8_t *src, int stride);
97 void ff_pred16x16_plane_svq3_mmx   (uint8_t *src, int stride);
98 void ff_pred16x16_plane_svq3_mmx2  (uint8_t *src, int stride);
99 void ff_pred16x16_plane_svq3_sse2  (uint8_t *src, int stride);
100 void ff_pred16x16_plane_svq3_ssse3 (uint8_t *src, int stride);
101 void ff_pred16x16_tm_vp8_mmx       (uint8_t *src, int stride);
102 void ff_pred16x16_tm_vp8_mmxext    (uint8_t *src, int stride);
103 void ff_pred16x16_tm_vp8_sse2      (uint8_t *src, int stride);
104 void ff_pred8x8_top_dc_mmxext      (uint8_t *src, int stride);
105 void ff_pred8x8_dc_rv40_mmxext     (uint8_t *src, int stride);
106 void ff_pred8x8_dc_mmxext          (uint8_t *src, int stride);
107 void ff_pred8x8_vertical_mmx       (uint8_t *src, int stride);
108 void ff_pred8x8_horizontal_mmx     (uint8_t *src, int stride);
109 void ff_pred8x8_horizontal_mmxext  (uint8_t *src, int stride);
110 void ff_pred8x8_horizontal_ssse3   (uint8_t *src, int stride);
111 void ff_pred8x8_plane_mmx          (uint8_t *src, int stride);
112 void ff_pred8x8_plane_mmx2         (uint8_t *src, int stride);
113 void ff_pred8x8_plane_sse2         (uint8_t *src, int stride);
114 void ff_pred8x8_plane_ssse3        (uint8_t *src, int stride);
115 void ff_pred8x8_tm_vp8_mmx         (uint8_t *src, int stride);
116 void ff_pred8x8_tm_vp8_mmxext      (uint8_t *src, int stride);
117 void ff_pred8x8_tm_vp8_sse2        (uint8_t *src, int stride);
118 void ff_pred8x8_tm_vp8_ssse3       (uint8_t *src, int stride);
119 void ff_pred8x8l_top_dc_mmxext     (uint8_t *src, int has_topleft, int has_topright, int stride);
120 void ff_pred8x8l_top_dc_ssse3      (uint8_t *src, int has_topleft, int has_topright, int stride);
121 void ff_pred8x8l_dc_mmxext         (uint8_t *src, int has_topleft, int has_topright, int stride);
122 void ff_pred8x8l_dc_ssse3          (uint8_t *src, int has_topleft, int has_topright, int stride);
123 void ff_pred8x8l_horizontal_mmxext (uint8_t *src, int has_topleft, int has_topright, int stride);
124 void ff_pred8x8l_horizontal_ssse3  (uint8_t *src, int has_topleft, int has_topright, int stride);
125 void ff_pred8x8l_vertical_mmxext   (uint8_t *src, int has_topleft, int has_topright, int stride);
126 void ff_pred8x8l_vertical_ssse3    (uint8_t *src, int has_topleft, int has_topright, int stride);
127 void ff_pred8x8l_down_left_mmxext  (uint8_t *src, int has_topleft, int has_topright, int stride);
128 void ff_pred8x8l_down_left_sse2    (uint8_t *src, int has_topleft, int has_topright, int stride);
129 void ff_pred8x8l_down_left_ssse3   (uint8_t *src, int has_topleft, int has_topright, int stride);
130 void ff_pred8x8l_down_right_mmxext (uint8_t *src, int has_topleft, int has_topright, int stride);
131 void ff_pred8x8l_down_right_sse2   (uint8_t *src, int has_topleft, int has_topright, int stride);
132 void ff_pred8x8l_down_right_ssse3  (uint8_t *src, int has_topleft, int has_topright, int stride);
133 void ff_pred8x8l_vertical_right_mmxext(uint8_t *src, int has_topleft, int has_topright, int stride);
134 void ff_pred8x8l_vertical_right_sse2(uint8_t *src, int has_topleft, int has_topright, int stride);
135 void ff_pred8x8l_vertical_right_ssse3(uint8_t *src, int has_topleft, int has_topright, int stride);
136 void ff_pred8x8l_vertical_left_sse2(uint8_t *src, int has_topleft, int has_topright, int stride);
137 void ff_pred8x8l_vertical_left_ssse3(uint8_t *src, int has_topleft, int has_topright, int stride);
138 void ff_pred8x8l_horizontal_up_mmxext(uint8_t *src, int has_topleft, int has_topright, int stride);
139 void ff_pred8x8l_horizontal_up_ssse3(uint8_t *src, int has_topleft, int has_topright, int stride);
140 void ff_pred8x8l_horizontal_down_mmxext(uint8_t *src, int has_topleft, int has_topright, int stride);
141 void ff_pred8x8l_horizontal_down_sse2(uint8_t *src, int has_topleft, int has_topright, int stride);
142 void ff_pred8x8l_horizontal_down_ssse3(uint8_t *src, int has_topleft, int has_topright, int stride);
143 void ff_pred4x4_dc_mmxext          (uint8_t *src, const uint8_t *topright, int stride);
144 void ff_pred4x4_down_left_mmxext   (uint8_t *src, const uint8_t *topright, int stride);
145 void ff_pred4x4_down_right_mmxext  (uint8_t *src, const uint8_t *topright, int stride);
146 void ff_pred4x4_vertical_left_mmxext(uint8_t *src, const uint8_t *topright, int stride);
147 void ff_pred4x4_vertical_right_mmxext(uint8_t *src, const uint8_t *topright, int stride);
148 void ff_pred4x4_horizontal_up_mmxext(uint8_t *src, const uint8_t *topright, int stride);
149 void ff_pred4x4_horizontal_down_mmxext(uint8_t *src, const uint8_t *topright, int stride);
150 void ff_pred4x4_tm_vp8_mmx         (uint8_t *src, const uint8_t *topright, int stride);
151 void ff_pred4x4_tm_vp8_mmxext      (uint8_t *src, const uint8_t *topright, int stride);
152 void ff_pred4x4_tm_vp8_ssse3       (uint8_t *src, const uint8_t *topright, int stride);
153 void ff_pred4x4_vertical_vp8_mmxext(uint8_t *src, const uint8_t *topright, int stride);
154
155 void ff_h264_pred_init_x86(H264PredContext *h, int codec_id, const int bit_depth)
156 {
157     int mm_flags = av_get_cpu_flags();
158
159 #if HAVE_YASM
160     if (bit_depth == 8) {
161         if (mm_flags & AV_CPU_FLAG_MMX) {
162             h->pred16x16[VERT_PRED8x8         ] = ff_pred16x16_vertical_mmx;
163             h->pred16x16[HOR_PRED8x8          ] = ff_pred16x16_horizontal_mmx;
164             h->pred8x8  [VERT_PRED8x8         ] = ff_pred8x8_vertical_mmx;
165             h->pred8x8  [HOR_PRED8x8          ] = ff_pred8x8_horizontal_mmx;
166             if (codec_id == CODEC_ID_VP8) {
167                 h->pred16x16[PLANE_PRED8x8    ] = ff_pred16x16_tm_vp8_mmx;
168                 h->pred8x8  [PLANE_PRED8x8    ] = ff_pred8x8_tm_vp8_mmx;
169                 h->pred4x4  [TM_VP8_PRED      ] = ff_pred4x4_tm_vp8_mmx;
170             } else {
171                 h->pred8x8  [PLANE_PRED8x8] = ff_pred8x8_plane_mmx;
172                 if (codec_id == CODEC_ID_SVQ3) {
173                     h->pred16x16[PLANE_PRED8x8] = ff_pred16x16_plane_svq3_mmx;
174                 } else if (codec_id == CODEC_ID_RV40) {
175                     h->pred16x16[PLANE_PRED8x8] = ff_pred16x16_plane_rv40_mmx;
176                 } else {
177                     h->pred16x16[PLANE_PRED8x8] = ff_pred16x16_plane_h264_mmx;
178                 }
179             }
180         }
181
182         if (mm_flags & AV_CPU_FLAG_MMX2) {
183             h->pred16x16[HOR_PRED8x8            ] = ff_pred16x16_horizontal_mmxext;
184             h->pred16x16[DC_PRED8x8             ] = ff_pred16x16_dc_mmxext;
185             h->pred8x8  [HOR_PRED8x8            ] = ff_pred8x8_horizontal_mmxext;
186             h->pred8x8l [TOP_DC_PRED            ] = ff_pred8x8l_top_dc_mmxext;
187             h->pred8x8l [DC_PRED                ] = ff_pred8x8l_dc_mmxext;
188             h->pred8x8l [HOR_PRED               ] = ff_pred8x8l_horizontal_mmxext;
189             h->pred8x8l [VERT_PRED              ] = ff_pred8x8l_vertical_mmxext;
190             h->pred8x8l [DIAG_DOWN_RIGHT_PRED   ] = ff_pred8x8l_down_right_mmxext;
191             h->pred8x8l [VERT_RIGHT_PRED        ] = ff_pred8x8l_vertical_right_mmxext;
192             h->pred8x8l [HOR_UP_PRED            ] = ff_pred8x8l_horizontal_up_mmxext;
193             h->pred8x8l [DIAG_DOWN_LEFT_PRED    ] = ff_pred8x8l_down_left_mmxext;
194             h->pred8x8l [HOR_DOWN_PRED          ] = ff_pred8x8l_horizontal_down_mmxext;
195             h->pred4x4  [DIAG_DOWN_RIGHT_PRED   ] = ff_pred4x4_down_right_mmxext;
196             h->pred4x4  [VERT_RIGHT_PRED        ] = ff_pred4x4_vertical_right_mmxext;
197             h->pred4x4  [HOR_DOWN_PRED          ] = ff_pred4x4_horizontal_down_mmxext;
198             h->pred4x4  [DC_PRED                ] = ff_pred4x4_dc_mmxext;
199             if (codec_id == CODEC_ID_VP8 || codec_id == CODEC_ID_H264) {
200                 h->pred4x4  [DIAG_DOWN_LEFT_PRED] = ff_pred4x4_down_left_mmxext;
201             }
202             if (codec_id == CODEC_ID_SVQ3 || codec_id == CODEC_ID_H264) {
203                 h->pred4x4  [VERT_LEFT_PRED     ] = ff_pred4x4_vertical_left_mmxext;
204             }
205             if (codec_id != CODEC_ID_RV40) {
206                 h->pred4x4  [HOR_UP_PRED        ] = ff_pred4x4_horizontal_up_mmxext;
207             }
208             if (codec_id == CODEC_ID_SVQ3 || codec_id == CODEC_ID_H264) {
209                 h->pred8x8  [TOP_DC_PRED8x8     ] = ff_pred8x8_top_dc_mmxext;
210                 h->pred8x8  [DC_PRED8x8         ] = ff_pred8x8_dc_mmxext;
211             }
212             if (codec_id == CODEC_ID_VP8) {
213                 h->pred16x16[PLANE_PRED8x8      ] = ff_pred16x16_tm_vp8_mmxext;
214                 h->pred8x8  [DC_PRED8x8         ] = ff_pred8x8_dc_rv40_mmxext;
215                 h->pred8x8  [PLANE_PRED8x8      ] = ff_pred8x8_tm_vp8_mmxext;
216                 h->pred4x4  [TM_VP8_PRED        ] = ff_pred4x4_tm_vp8_mmxext;
217                 h->pred4x4  [VERT_PRED          ] = ff_pred4x4_vertical_vp8_mmxext;
218             } else {
219                 h->pred8x8  [PLANE_PRED8x8] = ff_pred8x8_plane_mmx2;
220                 if (codec_id == CODEC_ID_SVQ3) {
221                     h->pred16x16[PLANE_PRED8x8  ] = ff_pred16x16_plane_svq3_mmx2;
222                 } else if (codec_id == CODEC_ID_RV40) {
223                     h->pred16x16[PLANE_PRED8x8  ] = ff_pred16x16_plane_rv40_mmx2;
224                 } else {
225                     h->pred16x16[PLANE_PRED8x8  ] = ff_pred16x16_plane_h264_mmx2;
226                 }
227             }
228         }
229
230         if (mm_flags & AV_CPU_FLAG_SSE) {
231             h->pred16x16[VERT_PRED8x8] = ff_pred16x16_vertical_sse;
232         }
233
234         if (mm_flags & AV_CPU_FLAG_SSE2) {
235             h->pred16x16[DC_PRED8x8           ] = ff_pred16x16_dc_sse2;
236             h->pred8x8l [DIAG_DOWN_LEFT_PRED  ] = ff_pred8x8l_down_left_sse2;
237             h->pred8x8l [DIAG_DOWN_RIGHT_PRED ] = ff_pred8x8l_down_right_sse2;
238             h->pred8x8l [VERT_RIGHT_PRED      ] = ff_pred8x8l_vertical_right_sse2;
239             h->pred8x8l [VERT_LEFT_PRED       ] = ff_pred8x8l_vertical_left_sse2;
240             h->pred8x8l [HOR_DOWN_PRED        ] = ff_pred8x8l_horizontal_down_sse2;
241             if (codec_id == CODEC_ID_VP8) {
242                 h->pred16x16[PLANE_PRED8x8    ] = ff_pred16x16_tm_vp8_sse2;
243                 h->pred8x8  [PLANE_PRED8x8    ] = ff_pred8x8_tm_vp8_sse2;
244             } else {
245                 h->pred8x8  [PLANE_PRED8x8    ] = ff_pred8x8_plane_sse2;
246                 if (codec_id == CODEC_ID_SVQ3) {
247                     h->pred16x16[PLANE_PRED8x8] = ff_pred16x16_plane_svq3_sse2;
248                 } else if (codec_id == CODEC_ID_RV40) {
249                     h->pred16x16[PLANE_PRED8x8] = ff_pred16x16_plane_rv40_sse2;
250                 } else {
251                     h->pred16x16[PLANE_PRED8x8] = ff_pred16x16_plane_h264_sse2;
252                 }
253             }
254         }
255
256         if (mm_flags & AV_CPU_FLAG_SSSE3) {
257             h->pred16x16[HOR_PRED8x8          ] = ff_pred16x16_horizontal_ssse3;
258             h->pred16x16[DC_PRED8x8           ] = ff_pred16x16_dc_ssse3;
259             h->pred8x8  [HOR_PRED8x8          ] = ff_pred8x8_horizontal_ssse3;
260             h->pred8x8l [TOP_DC_PRED          ] = ff_pred8x8l_top_dc_ssse3;
261             h->pred8x8l [DC_PRED              ] = ff_pred8x8l_dc_ssse3;
262             h->pred8x8l [HOR_PRED             ] = ff_pred8x8l_horizontal_ssse3;
263             h->pred8x8l [VERT_PRED            ] = ff_pred8x8l_vertical_ssse3;
264             h->pred8x8l [DIAG_DOWN_LEFT_PRED  ] = ff_pred8x8l_down_left_ssse3;
265             h->pred8x8l [DIAG_DOWN_RIGHT_PRED ] = ff_pred8x8l_down_right_ssse3;
266             h->pred8x8l [VERT_RIGHT_PRED      ] = ff_pred8x8l_vertical_right_ssse3;
267             h->pred8x8l [VERT_LEFT_PRED       ] = ff_pred8x8l_vertical_left_ssse3;
268             h->pred8x8l [HOR_UP_PRED          ] = ff_pred8x8l_horizontal_up_ssse3;
269             h->pred8x8l [HOR_DOWN_PRED        ] = ff_pred8x8l_horizontal_down_ssse3;
270             if (codec_id == CODEC_ID_VP8) {
271                 h->pred8x8  [PLANE_PRED8x8    ] = ff_pred8x8_tm_vp8_ssse3;
272                 h->pred4x4  [TM_VP8_PRED      ] = ff_pred4x4_tm_vp8_ssse3;
273             } else {
274                 h->pred8x8  [PLANE_PRED8x8] = ff_pred8x8_plane_ssse3;
275                 if (codec_id == CODEC_ID_SVQ3) {
276                     h->pred16x16[PLANE_PRED8x8] = ff_pred16x16_plane_svq3_ssse3;
277                 } else if (codec_id == CODEC_ID_RV40) {
278                     h->pred16x16[PLANE_PRED8x8] = ff_pred16x16_plane_rv40_ssse3;
279                 } else {
280                     h->pred16x16[PLANE_PRED8x8] = ff_pred16x16_plane_h264_ssse3;
281                 }
282             }
283         }
284     } else if (bit_depth == 10) {
285         if (mm_flags & AV_CPU_FLAG_MMX2) {
286             h->pred4x4[DC_PRED             ] = ff_pred4x4_dc_10_mmxext;
287             h->pred4x4[HOR_UP_PRED         ] = ff_pred4x4_horizontal_up_10_mmxext;
288
289             h->pred8x8[DC_PRED8x8          ] = ff_pred8x8_dc_10_mmxext;
290             h->pred8x8[TOP_DC_PRED8x8      ] = ff_pred8x8_top_dc_10_mmxext;
291
292             h->pred16x16[VERT_PRED8x8      ] = ff_pred16x16_vertical_10_mmxext;
293             h->pred16x16[HOR_PRED8x8       ] = ff_pred16x16_horizontal_10_mmxext;
294         }
295         if (mm_flags & AV_CPU_FLAG_SSE2) {
296             h->pred4x4[DIAG_DOWN_LEFT_PRED ] = ff_pred4x4_down_left_10_sse2;
297             h->pred4x4[DIAG_DOWN_RIGHT_PRED] = ff_pred4x4_down_right_10_sse2;
298             h->pred4x4[VERT_LEFT_PRED      ] = ff_pred4x4_vertical_left_10_sse2;
299             h->pred4x4[VERT_RIGHT_PRED     ] = ff_pred4x4_vertical_right_10_sse2;
300             h->pred4x4[HOR_DOWN_PRED       ] = ff_pred4x4_horizontal_down_10_sse2;
301
302             h->pred8x8[DC_PRED8x8          ] = ff_pred8x8_dc_10_sse2;
303             h->pred8x8[TOP_DC_PRED8x8      ] = ff_pred8x8_top_dc_10_sse2;
304             h->pred8x8[VERT_PRED8x8        ] = ff_pred8x8_vertical_10_sse2;
305             h->pred8x8[HOR_PRED8x8         ] = ff_pred8x8_horizontal_10_sse2;
306
307             h->pred8x8l[VERT_PRED           ] = ff_pred8x8l_vertical_10_sse2;
308             h->pred8x8l[HOR_PRED            ] = ff_pred8x8l_horizontal_10_sse2;
309             h->pred8x8l[DC_PRED             ] = ff_pred8x8l_dc_10_sse2;
310             h->pred8x8l[TOP_DC_PRED         ] = ff_pred8x8l_top_dc_10_sse2;
311             h->pred8x8l[DIAG_DOWN_LEFT_PRED ] = ff_pred8x8l_down_left_10_sse2;
312             h->pred8x8l[DIAG_DOWN_RIGHT_PRED] = ff_pred8x8l_down_right_10_sse2;
313             h->pred8x8l[VERT_RIGHT_PRED     ] = ff_pred8x8l_vertical_right_10_sse2;
314             h->pred8x8l[HOR_UP_PRED         ] = ff_pred8x8l_horizontal_up_10_sse2;
315
316             h->pred16x16[VERT_PRED8x8      ] = ff_pred16x16_vertical_10_sse2;
317             h->pred16x16[HOR_PRED8x8       ] = ff_pred16x16_horizontal_10_sse2;
318         }
319         if (mm_flags & AV_CPU_FLAG_SSSE3) {
320             h->pred4x4[DIAG_DOWN_RIGHT_PRED] = ff_pred4x4_down_right_10_ssse3;
321             h->pred4x4[VERT_RIGHT_PRED     ] = ff_pred4x4_vertical_right_10_ssse3;
322             h->pred4x4[HOR_DOWN_PRED       ] = ff_pred4x4_horizontal_down_10_ssse3;
323
324             h->pred8x8l[VERT_PRED           ] = ff_pred8x8l_vertical_10_ssse3;
325             h->pred8x8l[HOR_PRED            ] = ff_pred8x8l_horizontal_10_ssse3;
326             h->pred8x8l[DC_PRED             ] = ff_pred8x8l_dc_10_ssse3;
327             h->pred8x8l[TOP_DC_PRED         ] = ff_pred8x8l_top_dc_10_ssse3;
328             h->pred8x8l[DIAG_DOWN_LEFT_PRED ] = ff_pred8x8l_down_left_10_ssse3;
329         }
330 #if HAVE_AVX
331         if (mm_flags & AV_CPU_FLAG_AVX) {
332             h->pred4x4[DIAG_DOWN_LEFT_PRED ] = ff_pred4x4_down_left_10_avx;
333             h->pred4x4[DIAG_DOWN_RIGHT_PRED] = ff_pred4x4_down_right_10_avx;
334             h->pred4x4[VERT_RIGHT_PRED     ] = ff_pred4x4_vertical_right_10_avx;
335             h->pred4x4[HOR_DOWN_PRED       ] = ff_pred4x4_horizontal_down_10_avx;
336         }
337 #endif /* HAVE_AVX */
338     }
339 #endif /* HAVE_YASM */
340 }