ra144enc: drop pointless "encoder" from .long_name
[libav.git] / libswscale / x86 / swscale_mmx.c
CommitLineData
983260b0
RB
1/*
2 * Copyright (C) 2001-2003 Michael Niedermayer <michaelni@gmx.at>
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 <inttypes.h>
22#include "config.h"
23#include "libswscale/swscale.h"
24#include "libswscale/swscale_internal.h"
25#include "libavutil/intreadwrite.h"
26#include "libavutil/x86_cpu.h"
27#include "libavutil/cpu.h"
28#include "libavutil/pixdesc.h"
29
378c5ef9
RB
30#define DITHER1XBPP
31
983260b0
RB
32DECLARE_ASM_CONST(8, uint64_t, bF8)= 0xF8F8F8F8F8F8F8F8LL;
33DECLARE_ASM_CONST(8, uint64_t, bFC)= 0xFCFCFCFCFCFCFCFCLL;
34DECLARE_ASM_CONST(8, uint64_t, w10)= 0x0010001000100010LL;
35DECLARE_ASM_CONST(8, uint64_t, w02)= 0x0002000200020002LL;
983260b0
RB
36
37const DECLARE_ALIGNED(8, uint64_t, ff_dither4)[2] = {
38 0x0103010301030103LL,
39 0x0200020002000200LL,};
40
41const DECLARE_ALIGNED(8, uint64_t, ff_dither8)[2] = {
42 0x0602060206020602LL,
43 0x0004000400040004LL,};
44
45DECLARE_ASM_CONST(8, uint64_t, b16Mask)= 0x001F001F001F001FLL;
46DECLARE_ASM_CONST(8, uint64_t, g16Mask)= 0x07E007E007E007E0LL;
47DECLARE_ASM_CONST(8, uint64_t, r16Mask)= 0xF800F800F800F800LL;
48DECLARE_ASM_CONST(8, uint64_t, b15Mask)= 0x001F001F001F001FLL;
49DECLARE_ASM_CONST(8, uint64_t, g15Mask)= 0x03E003E003E003E0LL;
50DECLARE_ASM_CONST(8, uint64_t, r15Mask)= 0x7C007C007C007C00LL;
51
52DECLARE_ALIGNED(8, const uint64_t, ff_M24A) = 0x00FF0000FF0000FFLL;
53DECLARE_ALIGNED(8, const uint64_t, ff_M24B) = 0xFF0000FF0000FF00LL;
54DECLARE_ALIGNED(8, const uint64_t, ff_M24C) = 0x0000FF0000FF0000LL;
55
56#ifdef FAST_BGR2YV12
57DECLARE_ALIGNED(8, const uint64_t, ff_bgr2YCoeff) = 0x000000210041000DULL;
58DECLARE_ALIGNED(8, const uint64_t, ff_bgr2UCoeff) = 0x0000FFEEFFDC0038ULL;
59DECLARE_ALIGNED(8, const uint64_t, ff_bgr2VCoeff) = 0x00000038FFD2FFF8ULL;
60#else
61DECLARE_ALIGNED(8, const uint64_t, ff_bgr2YCoeff) = 0x000020E540830C8BULL;
62DECLARE_ALIGNED(8, const uint64_t, ff_bgr2UCoeff) = 0x0000ED0FDAC23831ULL;
63DECLARE_ALIGNED(8, const uint64_t, ff_bgr2VCoeff) = 0x00003831D0E6F6EAULL;
64#endif /* FAST_BGR2YV12 */
65DECLARE_ALIGNED(8, const uint64_t, ff_bgr2YOffset) = 0x1010101010101010ULL;
66DECLARE_ALIGNED(8, const uint64_t, ff_bgr2UVOffset) = 0x8080808080808080ULL;
67DECLARE_ALIGNED(8, const uint64_t, ff_w1111) = 0x0001000100010001ULL;
68
983260b0
RB
69//MMX versions
70#if HAVE_MMX
71#undef RENAME
72#define COMPILE_TEMPLATE_MMX2 0
73#define RENAME(a) a ## _MMX
74#include "swscale_template.c"
75#endif
76
77//MMX2 versions
78#if HAVE_MMX2
79#undef RENAME
80#undef COMPILE_TEMPLATE_MMX2
81#define COMPILE_TEMPLATE_MMX2 1
82#define RENAME(a) a ## _MMX2
83#include "swscale_template.c"
84#endif
85
86void updateMMXDitherTables(SwsContext *c, int dstY, int lumBufIndex, int chrBufIndex,
87 int lastInLumBuf, int lastInChrBuf)
88{
89 const int dstH= c->dstH;
90 const int flags= c->flags;
91 int16_t **lumPixBuf= c->lumPixBuf;
92 int16_t **chrUPixBuf= c->chrUPixBuf;
93 int16_t **alpPixBuf= c->alpPixBuf;
94 const int vLumBufSize= c->vLumBufSize;
95 const int vChrBufSize= c->vChrBufSize;
96 int16_t *vLumFilterPos= c->vLumFilterPos;
97 int16_t *vChrFilterPos= c->vChrFilterPos;
98 int16_t *vLumFilter= c->vLumFilter;
99 int16_t *vChrFilter= c->vChrFilter;
100 int32_t *lumMmxFilter= c->lumMmxFilter;
101 int32_t *chrMmxFilter= c->chrMmxFilter;
102 int32_t av_unused *alpMmxFilter= c->alpMmxFilter;
103 const int vLumFilterSize= c->vLumFilterSize;
104 const int vChrFilterSize= c->vChrFilterSize;
105 const int chrDstY= dstY>>c->chrDstVSubSample;
106 const int firstLumSrcY= vLumFilterPos[dstY]; //First line needed as input
107 const int firstChrSrcY= vChrFilterPos[chrDstY]; //First line needed as input
108
109 c->blueDither= ff_dither8[dstY&1];
110 if (c->dstFormat == PIX_FMT_RGB555 || c->dstFormat == PIX_FMT_BGR555)
111 c->greenDither= ff_dither8[dstY&1];
112 else
113 c->greenDither= ff_dither4[dstY&1];
114 c->redDither= ff_dither8[(dstY+1)&1];
115 if (dstY < dstH - 2) {
116 const int16_t **lumSrcPtr= (const int16_t **) lumPixBuf + lumBufIndex + firstLumSrcY - lastInLumBuf + vLumBufSize;
117 const int16_t **chrUSrcPtr= (const int16_t **) chrUPixBuf + chrBufIndex + firstChrSrcY - lastInChrBuf + vChrBufSize;
118 const int16_t **alpSrcPtr= (CONFIG_SWSCALE_ALPHA && alpPixBuf) ? (const int16_t **) alpPixBuf + lumBufIndex + firstLumSrcY - lastInLumBuf + vLumBufSize : NULL;
119 int i;
120 if (flags & SWS_ACCURATE_RND) {
121 int s= APCK_SIZE / 8;
122 for (i=0; i<vLumFilterSize; i+=2) {
123 *(const void**)&lumMmxFilter[s*i ]= lumSrcPtr[i ];
124 *(const void**)&lumMmxFilter[s*i+APCK_PTR2/4 ]= lumSrcPtr[i+(vLumFilterSize>1)];
125 lumMmxFilter[s*i+APCK_COEF/4 ]=
126 lumMmxFilter[s*i+APCK_COEF/4+1]= vLumFilter[dstY*vLumFilterSize + i ]
127 + (vLumFilterSize>1 ? vLumFilter[dstY*vLumFilterSize + i + 1]<<16 : 0);
128 if (CONFIG_SWSCALE_ALPHA && alpPixBuf) {
129 *(const void**)&alpMmxFilter[s*i ]= alpSrcPtr[i ];
130 *(const void**)&alpMmxFilter[s*i+APCK_PTR2/4 ]= alpSrcPtr[i+(vLumFilterSize>1)];
131 alpMmxFilter[s*i+APCK_COEF/4 ]=
132 alpMmxFilter[s*i+APCK_COEF/4+1]= lumMmxFilter[s*i+APCK_COEF/4 ];
133 }
134 }
135 for (i=0; i<vChrFilterSize; i+=2) {
136 *(const void**)&chrMmxFilter[s*i ]= chrUSrcPtr[i ];
137 *(const void**)&chrMmxFilter[s*i+APCK_PTR2/4 ]= chrUSrcPtr[i+(vChrFilterSize>1)];
138 chrMmxFilter[s*i+APCK_COEF/4 ]=
139 chrMmxFilter[s*i+APCK_COEF/4+1]= vChrFilter[chrDstY*vChrFilterSize + i ]
140 + (vChrFilterSize>1 ? vChrFilter[chrDstY*vChrFilterSize + i + 1]<<16 : 0);
141 }
142 } else {
143 for (i=0; i<vLumFilterSize; i++) {
144 *(const void**)&lumMmxFilter[4*i+0]= lumSrcPtr[i];
145 lumMmxFilter[4*i+2]=
146 lumMmxFilter[4*i+3]=
147 ((uint16_t)vLumFilter[dstY*vLumFilterSize + i])*0x10001;
148 if (CONFIG_SWSCALE_ALPHA && alpPixBuf) {
149 *(const void**)&alpMmxFilter[4*i+0]= alpSrcPtr[i];
150 alpMmxFilter[4*i+2]=
151 alpMmxFilter[4*i+3]= lumMmxFilter[4*i+2];
152 }
153 }
154 for (i=0; i<vChrFilterSize; i++) {
155 *(const void**)&chrMmxFilter[4*i+0]= chrUSrcPtr[i];
156 chrMmxFilter[4*i+2]=
157 chrMmxFilter[4*i+3]=
158 ((uint16_t)vChrFilter[chrDstY*vChrFilterSize + i])*0x10001;
159 }
160 }
161 }
162}
163
e0c3e073
RB
164#define SCALE_FUNC(filter_n, from_bpc, to_bpc, opt) \
165extern void ff_hscale ## from_bpc ## to ## to_bpc ## _ ## filter_n ## _ ## opt( \
166 SwsContext *c, int16_t *data, \
167 int dstW, const uint8_t *src, \
168 const int16_t *filter, \
373211d8 169 const int16_t *filterPos, int filterSize)
e0c3e073
RB
170
171#define SCALE_FUNCS(filter_n, opt) \
172 SCALE_FUNC(filter_n, 8, 15, opt); \
173 SCALE_FUNC(filter_n, 9, 15, opt); \
174 SCALE_FUNC(filter_n, 10, 15, opt); \
175 SCALE_FUNC(filter_n, 16, 15, opt); \
176 SCALE_FUNC(filter_n, 8, 19, opt); \
177 SCALE_FUNC(filter_n, 9, 19, opt); \
178 SCALE_FUNC(filter_n, 10, 19, opt); \
179 SCALE_FUNC(filter_n, 16, 19, opt)
180
181#define SCALE_FUNCS_MMX(opt) \
182 SCALE_FUNCS(4, opt); \
183 SCALE_FUNCS(8, opt); \
184 SCALE_FUNCS(X, opt)
185
186#define SCALE_FUNCS_SSE(opt) \
187 SCALE_FUNCS(4, opt); \
188 SCALE_FUNCS(8, opt); \
189 SCALE_FUNCS(X4, opt); \
190 SCALE_FUNCS(X8, opt)
191
192#if ARCH_X86_32
193SCALE_FUNCS_MMX(mmx);
194#endif
195SCALE_FUNCS_SSE(sse2);
196SCALE_FUNCS_SSE(ssse3);
197SCALE_FUNCS_SSE(sse4);
198
6cacecdc
RB
199#define VSCALEX_FUNC(size, opt) \
200extern void ff_yuv2planeX_ ## size ## _ ## opt(const int16_t *filter, int filterSize, \
201 const int16_t **src, uint8_t *dest, int dstW, \
202 const uint8_t *dither, int offset)
3c62a714
DB
203#define VSCALEX_FUNCS(opt) \
204 VSCALEX_FUNC(8, opt); \
205 VSCALEX_FUNC(9, opt); \
206 VSCALEX_FUNC(10, opt)
7fbbf952 207
6cacecdc 208#if ARCH_X86_32
3c62a714 209VSCALEX_FUNCS(mmx2);
6cacecdc 210#endif
3c62a714
DB
211VSCALEX_FUNCS(sse2);
212VSCALEX_FUNCS(sse4);
6cacecdc 213VSCALEX_FUNC(16, sse4);
3c62a714 214VSCALEX_FUNCS(avx);
7fbbf952 215
c4356536
RB
216#define VSCALE_FUNC(size, opt) \
217extern void ff_yuv2plane1_ ## size ## _ ## opt(const int16_t *src, uint8_t *dst, int dstW, \
218 const uint8_t *dither, int offset)
219#define VSCALE_FUNCS(opt1, opt2) \
220 VSCALE_FUNC(8, opt1); \
221 VSCALE_FUNC(9, opt2); \
222 VSCALE_FUNC(10, opt2); \
223 VSCALE_FUNC(16, opt1)
224
225#if ARCH_X86_32
226VSCALE_FUNCS(mmx, mmx2);
227#endif
228VSCALE_FUNCS(sse2, sse2);
229VSCALE_FUNC(16, sse4);
230VSCALE_FUNCS(avx, avx);
231
b5d08c27
RB
232#define INPUT_Y_FUNC(fmt, opt) \
233extern void ff_ ## fmt ## ToY_ ## opt(uint8_t *dst, const uint8_t *src, \
234 int w, uint32_t *unused)
2170a0e6
RB
235#define INPUT_UV_FUNC(fmt, opt) \
236extern void ff_ ## fmt ## ToUV_ ## opt(uint8_t *dstU, uint8_t *dstV, \
237 const uint8_t *src, const uint8_t *unused1, \
238 int w, uint32_t *unused2)
239#define INPUT_FUNC(fmt, opt) \
b5d08c27 240 INPUT_Y_FUNC(fmt, opt); \
2170a0e6
RB
241 INPUT_UV_FUNC(fmt, opt)
242#define INPUT_FUNCS(opt) \
243 INPUT_FUNC(uyvy, opt); \
244 INPUT_FUNC(yuyv, opt); \
245 INPUT_UV_FUNC(nv12, opt); \
b5d08c27
RB
246 INPUT_UV_FUNC(nv21, opt); \
247 INPUT_FUNC(rgb24, opt); \
248 INPUT_FUNC(bgr24, opt)
2170a0e6
RB
249
250#if ARCH_X86_32
251INPUT_FUNCS(mmx);
252#endif
253INPUT_FUNCS(sse2);
b5d08c27 254INPUT_FUNCS(ssse3);
2170a0e6
RB
255INPUT_FUNCS(avx);
256
983260b0
RB
257void ff_sws_init_swScale_mmx(SwsContext *c)
258{
259 int cpu_flags = av_get_cpu_flags();
260
261 if (cpu_flags & AV_CPU_FLAG_MMX)
262 sws_init_swScale_MMX(c);
97e057ff 263#if HAVE_MMX2
983260b0
RB
264 if (cpu_flags & AV_CPU_FLAG_MMX2)
265 sws_init_swScale_MMX2(c);
97e057ff 266#endif
e0c3e073
RB
267
268#if HAVE_YASM
269#define ASSIGN_SCALE_FUNC2(hscalefn, filtersize, opt1, opt2) do { \
270 if (c->srcBpc == 8) { \
271 hscalefn = c->dstBpc <= 10 ? ff_hscale8to15_ ## filtersize ## _ ## opt2 : \
272 ff_hscale8to19_ ## filtersize ## _ ## opt1; \
273 } else if (c->srcBpc == 9) { \
274 hscalefn = c->dstBpc <= 10 ? ff_hscale9to15_ ## filtersize ## _ ## opt2 : \
275 ff_hscale9to19_ ## filtersize ## _ ## opt1; \
276 } else if (c->srcBpc == 10) { \
277 hscalefn = c->dstBpc <= 10 ? ff_hscale10to15_ ## filtersize ## _ ## opt2 : \
278 ff_hscale10to19_ ## filtersize ## _ ## opt1; \
279 } else /* c->srcBpc == 16 */ { \
280 hscalefn = c->dstBpc <= 10 ? ff_hscale16to15_ ## filtersize ## _ ## opt2 : \
281 ff_hscale16to19_ ## filtersize ## _ ## opt1; \
282 } \
283} while (0)
284#define ASSIGN_MMX_SCALE_FUNC(hscalefn, filtersize, opt1, opt2) \
285 switch (filtersize) { \
286 case 4: ASSIGN_SCALE_FUNC2(hscalefn, 4, opt1, opt2); break; \
287 case 8: ASSIGN_SCALE_FUNC2(hscalefn, 8, opt1, opt2); break; \
288 default: ASSIGN_SCALE_FUNC2(hscalefn, X, opt1, opt2); break; \
289 }
3c62a714 290#define ASSIGN_VSCALEX_FUNC(vscalefn, opt, do_16_case) \
6cacecdc 291switch(c->dstBpc){ \
3c62a714
DB
292 case 16: do_16_case; break; \
293 case 10: if (!isBE(c->dstFormat)) vscalefn = ff_yuv2planeX_10_ ## opt; break; \
294 case 9: if (!isBE(c->dstFormat)) vscalefn = ff_yuv2planeX_9_ ## opt; break; \
295 default: vscalefn = ff_yuv2planeX_8_ ## opt; break; \
6cacecdc 296 }
c4356536
RB
297#define ASSIGN_VSCALE_FUNC(vscalefn, opt1, opt2, opt2chk) \
298 switch(c->dstBpc){ \
299 case 16: if (!isBE(c->dstFormat)) vscalefn = ff_yuv2plane1_16_ ## opt1; break; \
300 case 10: if (!isBE(c->dstFormat) && opt2chk) vscalefn = ff_yuv2plane1_10_ ## opt2; break; \
301 case 9: if (!isBE(c->dstFormat) && opt2chk) vscalefn = ff_yuv2plane1_9_ ## opt2; break; \
302 default: vscalefn = ff_yuv2plane1_8_ ## opt1; break; \
303 }
b5d08c27
RB
304#define case_rgb(x, X, opt) \
305 case PIX_FMT_ ## X: \
306 c->lumToYV12 = ff_ ## x ## ToY_ ## opt; \
307 if (!c->chrSrcHSubSample) \
308 c->chrToYV12 = ff_ ## x ## ToUV_ ## opt; \
309 break
e0c3e073
RB
310#if ARCH_X86_32
311 if (cpu_flags & AV_CPU_FLAG_MMX) {
312 ASSIGN_MMX_SCALE_FUNC(c->hyScale, c->hLumFilterSize, mmx, mmx);
313 ASSIGN_MMX_SCALE_FUNC(c->hcScale, c->hChrFilterSize, mmx, mmx);
c4356536 314 ASSIGN_VSCALE_FUNC(c->yuv2plane1, mmx, mmx2, cpu_flags & AV_CPU_FLAG_MMX2);
2170a0e6
RB
315
316 switch (c->srcFormat) {
317 case PIX_FMT_Y400A:
318 c->lumToYV12 = ff_yuyvToY_mmx;
319 if (c->alpPixBuf)
320 c->alpToYV12 = ff_uyvyToY_mmx;
321 break;
322 case PIX_FMT_YUYV422:
323 c->lumToYV12 = ff_yuyvToY_mmx;
324 c->chrToYV12 = ff_yuyvToUV_mmx;
325 break;
326 case PIX_FMT_UYVY422:
327 c->lumToYV12 = ff_uyvyToY_mmx;
328 c->chrToYV12 = ff_uyvyToUV_mmx;
329 break;
330 case PIX_FMT_NV12:
331 c->chrToYV12 = ff_nv12ToUV_mmx;
332 break;
333 case PIX_FMT_NV21:
334 c->chrToYV12 = ff_nv21ToUV_mmx;
335 break;
b5d08c27
RB
336 case_rgb(rgb24, RGB24, mmx);
337 case_rgb(bgr24, BGR24, mmx);
2170a0e6
RB
338 default:
339 break;
340 }
e0c3e073 341 }
52de07e1 342 if (cpu_flags & AV_CPU_FLAG_MMX2) {
3c62a714 343 ASSIGN_VSCALEX_FUNC(c->yuv2planeX, mmx2,);
52de07e1 344 }
e0c3e073
RB
345#endif
346#define ASSIGN_SSE_SCALE_FUNC(hscalefn, filtersize, opt1, opt2) \
347 switch (filtersize) { \
348 case 4: ASSIGN_SCALE_FUNC2(hscalefn, 4, opt1, opt2); break; \
349 case 8: ASSIGN_SCALE_FUNC2(hscalefn, 8, opt1, opt2); break; \
350 default: if (filtersize & 4) ASSIGN_SCALE_FUNC2(hscalefn, X4, opt1, opt2); \
351 else ASSIGN_SCALE_FUNC2(hscalefn, X8, opt1, opt2); \
352 break; \
353 }
354 if (cpu_flags & AV_CPU_FLAG_SSE2) {
355 ASSIGN_SSE_SCALE_FUNC(c->hyScale, c->hLumFilterSize, sse2, sse2);
356 ASSIGN_SSE_SCALE_FUNC(c->hcScale, c->hChrFilterSize, sse2, sse2);
3c62a714 357 ASSIGN_VSCALEX_FUNC(c->yuv2planeX, sse2,);
c4356536 358 ASSIGN_VSCALE_FUNC(c->yuv2plane1, sse2, sse2, 1);
2170a0e6
RB
359
360 switch (c->srcFormat) {
361 case PIX_FMT_Y400A:
362 c->lumToYV12 = ff_yuyvToY_sse2;
363 if (c->alpPixBuf)
364 c->alpToYV12 = ff_uyvyToY_sse2;
365 break;
366 case PIX_FMT_YUYV422:
367 c->lumToYV12 = ff_yuyvToY_sse2;
368 c->chrToYV12 = ff_yuyvToUV_sse2;
369 break;
370 case PIX_FMT_UYVY422:
371 c->lumToYV12 = ff_uyvyToY_sse2;
372 c->chrToYV12 = ff_uyvyToUV_sse2;
373 break;
374 case PIX_FMT_NV12:
375 c->chrToYV12 = ff_nv12ToUV_sse2;
376 break;
377 case PIX_FMT_NV21:
378 c->chrToYV12 = ff_nv21ToUV_sse2;
379 break;
b5d08c27
RB
380 case_rgb(rgb24, RGB24, sse2);
381 case_rgb(bgr24, BGR24, sse2);
382 default:
383 break;
2170a0e6 384 }
e0c3e073
RB
385 }
386 if (cpu_flags & AV_CPU_FLAG_SSSE3) {
387 ASSIGN_SSE_SCALE_FUNC(c->hyScale, c->hLumFilterSize, ssse3, ssse3);
388 ASSIGN_SSE_SCALE_FUNC(c->hcScale, c->hChrFilterSize, ssse3, ssse3);
b5d08c27
RB
389 switch (c->srcFormat) {
390 case_rgb(rgb24, RGB24, ssse3);
391 case_rgb(bgr24, BGR24, ssse3);
392 default:
393 break;
394 }
e0c3e073
RB
395 }
396 if (cpu_flags & AV_CPU_FLAG_SSE4) {
397 /* Xto15 don't need special sse4 functions */
398 ASSIGN_SSE_SCALE_FUNC(c->hyScale, c->hLumFilterSize, sse4, ssse3);
399 ASSIGN_SSE_SCALE_FUNC(c->hcScale, c->hChrFilterSize, sse4, ssse3);
3c62a714 400 ASSIGN_VSCALEX_FUNC(c->yuv2planeX, sse4,
6cacecdc 401 if (!isBE(c->dstFormat)) c->yuv2planeX = ff_yuv2planeX_16_sse4);
c4356536
RB
402 if (c->dstBpc == 16 && !isBE(c->dstFormat))
403 c->yuv2plane1 = ff_yuv2plane1_16_sse4;
7fbbf952
KK
404 }
405
406 if (cpu_flags & AV_CPU_FLAG_AVX) {
3c62a714 407 ASSIGN_VSCALEX_FUNC(c->yuv2planeX, avx,);
c4356536 408 ASSIGN_VSCALE_FUNC(c->yuv2plane1, avx, avx, 1);
2170a0e6
RB
409
410 switch (c->srcFormat) {
411 case PIX_FMT_YUYV422:
412 c->chrToYV12 = ff_yuyvToUV_avx;
413 break;
414 case PIX_FMT_UYVY422:
415 c->chrToYV12 = ff_uyvyToUV_avx;
416 break;
417 case PIX_FMT_NV12:
418 c->chrToYV12 = ff_nv12ToUV_avx;
419 break;
420 case PIX_FMT_NV21:
421 c->chrToYV12 = ff_nv21ToUV_avx;
422 break;
b5d08c27
RB
423 case_rgb(rgb24, RGB24, avx);
424 case_rgb(bgr24, BGR24, avx);
2170a0e6
RB
425 default:
426 break;
427 }
e0c3e073
RB
428 }
429#endif
983260b0 430}