Go to the documentation of this file.
31 #define input_pixel(pos) (isBE(origin) ? AV_RB16(pos) : AV_RL16(pos))
33 #define r ((origin == AV_PIX_FMT_BGR48BE || origin == AV_PIX_FMT_BGR48LE || origin == AV_PIX_FMT_BGRA64BE || origin == AV_PIX_FMT_BGRA64LE) ? b_r : r_b)
34 #define b ((origin == AV_PIX_FMT_BGR48BE || origin == AV_PIX_FMT_BGR48LE || origin == AV_PIX_FMT_BGRA64BE || origin == AV_PIX_FMT_BGRA64LE) ? r_b : b_r)
53 const uint16_t *
src1,
const uint16_t *
src2,
72 const uint16_t *
src1,
const uint16_t *
src2,
89 #define rgb64funcs(pattern, BE_LE, origin) \
90 static void pattern ## 64 ## BE_LE ## ToY_c(uint8_t *_dst, const uint8_t *_src, const uint8_t *unused0, const uint8_t *unused1,\
91 int width, uint32_t *rgb2yuv) \
93 const uint16_t *src = (const uint16_t *) _src; \
94 uint16_t *dst = (uint16_t *) _dst; \
95 rgb64ToY_c_template(dst, src, width, origin, rgb2yuv); \
98 static void pattern ## 64 ## BE_LE ## ToUV_c(uint8_t *_dstU, uint8_t *_dstV, \
99 const uint8_t *unused0, const uint8_t *_src1, const uint8_t *_src2, \
100 int width, uint32_t *rgb2yuv) \
102 const uint16_t *src1 = (const uint16_t *) _src1, \
103 *src2 = (const uint16_t *) _src2; \
104 uint16_t *dstU = (uint16_t *) _dstU, *dstV = (uint16_t *) _dstV; \
105 rgb64ToUV_c_template(dstU, dstV, src1, src2, width, origin, rgb2yuv); \
108 static void pattern ## 64 ## BE_LE ## ToUV_half_c(uint8_t *_dstU, uint8_t *_dstV, \
109 const uint8_t *unused0, const uint8_t *_src1, const uint8_t *_src2, \
110 int width, uint32_t *rgb2yuv) \
112 const uint16_t *src1 = (const uint16_t *) _src1, \
113 *src2 = (const uint16_t *) _src2; \
114 uint16_t *dstU = (uint16_t *) _dstU, *dstV = (uint16_t *) _dstV; \
115 rgb64ToUV_half_c_template(dstU, dstV, src1, src2, width, origin, rgb2yuv); \
141 const uint16_t *
src1,
142 const uint16_t *
src2,
163 const uint16_t *
src1,
164 const uint16_t *
src2,
190 #define rgb48funcs(pattern, BE_LE, origin) \
191 static void pattern ## 48 ## BE_LE ## ToY_c(uint8_t *_dst, \
192 const uint8_t *_src, \
193 const uint8_t *unused0, const uint8_t *unused1,\
197 const uint16_t *src = (const uint16_t *)_src; \
198 uint16_t *dst = (uint16_t *)_dst; \
199 rgb48ToY_c_template(dst, src, width, origin, rgb2yuv); \
202 static void pattern ## 48 ## BE_LE ## ToUV_c(uint8_t *_dstU, \
204 const uint8_t *unused0, \
205 const uint8_t *_src1, \
206 const uint8_t *_src2, \
210 const uint16_t *src1 = (const uint16_t *)_src1, \
211 *src2 = (const uint16_t *)_src2; \
212 uint16_t *dstU = (uint16_t *)_dstU, \
213 *dstV = (uint16_t *)_dstV; \
214 rgb48ToUV_c_template(dstU, dstV, src1, src2, width, origin, rgb2yuv); \
217 static void pattern ## 48 ## BE_LE ## ToUV_half_c(uint8_t *_dstU, \
219 const uint8_t *unused0, \
220 const uint8_t *_src1, \
221 const uint8_t *_src2, \
225 const uint16_t *src1 = (const uint16_t *)_src1, \
226 *src2 = (const uint16_t *)_src2; \
227 uint16_t *dstU = (uint16_t *)_dstU, \
228 *dstV = (uint16_t *)_dstV; \
229 rgb48ToUV_half_c_template(dstU, dstV, src1, src2, width, origin, rgb2yuv); \
237 #define input_pixel(i) ((origin == AV_PIX_FMT_RGBA || \
238 origin == AV_PIX_FMT_BGRA || \
239 origin == AV_PIX_FMT_ARGB || \
240 origin == AV_PIX_FMT_ABGR) \
241 ? AV_RN32A(&src[(i) * 4]) \
242 : ((origin == AV_PIX_FMT_X2RGB10LE || \
243 origin == AV_PIX_FMT_X2BGR10LE) \
244 ? AV_RL32(&src[(i) * 4]) \
245 : (isBE(origin) ? AV_RB16(&src[(i) * 2]) \
246 : AV_RL16(&src[(i) * 2]))))
254 int maskr,
int maskg,
256 int gsh,
int bsh,
int S,
260 const unsigned rnd = (32<<((
S)-1)) + (1<<(
S-7));
265 int b = (px & maskb) >> shb;
266 int g = (px & maskg) >> shg;
267 int r = (px & maskr) >> shr;
269 dst[
i] = (ry *
r + gy *
g + by *
b +
rnd) >> ((
S)-6);
280 int maskr,
int maskg,
282 int gsh,
int bsh,
int S,
287 const unsigned rnd = (256
u<<((
S)-1)) + (1<<(
S-7));
292 int b = (px & maskb) >> shb;
293 int g = (px & maskg) >> shg;
294 int r = (px & maskr) >> shr;
296 dstU[
i] = (ru *
r + gu *
g + bu *
b +
rnd) >> ((
S)-6);
297 dstV[
i] = (rv *
r + gv *
g + bv *
b +
rnd) >> ((
S)-6);
308 int maskr,
int maskg,
310 int gsh,
int bsh,
int S,
315 maskgx = ~(maskr | maskb);
316 const unsigned rnd = (256
U<<(
S)) + (1<<(
S-6));
325 int b,
r,
g = (px0 & maskgx) + (px1 & maskgx);
326 int rb = px0 + px1 -
g;
328 b = (rb & maskb) >> shb;
334 g = (
g & maskg) >> shg;
336 r = (rb & maskr) >> shr;
338 dstU[
i] = (ru *
r + gu *
g + bu *
b + (unsigned)
rnd) >> ((
S)-6+1);
339 dstV[
i] = (rv *
r + gv *
g + bv *
b + (unsigned)
rnd) >> ((
S)-6+1);
345 #define rgb16_32_wrapper(fmt, name, shr, shg, shb, shp, maskr, \
346 maskg, maskb, rsh, gsh, bsh, S) \
347 static void name ## ToY_c(uint8_t *dst, const uint8_t *src, const uint8_t *unused1, const uint8_t *unused2, \
348 int width, uint32_t *tab) \
350 rgb16_32ToY_c_template((int16_t*)dst, src, width, fmt, shr, shg, shb, shp, \
351 maskr, maskg, maskb, rsh, gsh, bsh, S, tab); \
354 static void name ## ToUV_c(uint8_t *dstU, uint8_t *dstV, \
355 const uint8_t *unused0, const uint8_t *src, const uint8_t *dummy, \
356 int width, uint32_t *tab) \
358 rgb16_32ToUV_c_template((int16_t*)dstU, (int16_t*)dstV, src, width, fmt, \
359 shr, shg, shb, shp, \
360 maskr, maskg, maskb, rsh, gsh, bsh, S, tab);\
363 static void name ## ToUV_half_c(uint8_t *dstU, uint8_t *dstV, \
364 const uint8_t *unused0, const uint8_t *src, \
365 const uint8_t *dummy, \
366 int width, uint32_t *tab) \
368 rgb16_32ToUV_half_c_template((int16_t*)dstU, (int16_t*)dstV, src, width, fmt, \
369 shr, shg, shb, shp, \
370 maskr, maskg, maskb, \
371 rsh, gsh, bsh, S, tab); \
374 rgb16_32_wrapper(
AV_PIX_FMT_BGR32, bgr32, 16, 0, 0, 0, 0xFF0000, 0xFF00, 0x00FF, 8, 0, 8,
RGB2YUV_SHIFT + 8)
375 rgb16_32_wrapper(
AV_PIX_FMT_BGR32_1,
bgr321, 16, 0, 0, 8, 0xFF0000, 0xFF00, 0x00FF, 8, 0, 8,
RGB2YUV_SHIFT + 8)
376 rgb16_32_wrapper(
AV_PIX_FMT_RGB32, rgb32, 0, 0, 16, 0, 0x00FF, 0xFF00, 0xFF0000, 8, 0, 8,
RGB2YUV_SHIFT + 8)
377 rgb16_32_wrapper(
AV_PIX_FMT_RGB32_1,
rgb321, 0, 0, 16, 8, 0x00FF, 0xFF00, 0xFF0000, 8, 0, 8,
RGB2YUV_SHIFT + 8)
378 rgb16_32_wrapper(
AV_PIX_FMT_BGR565LE, bgr16le, 0, 0, 0, 0, 0x001F, 0x07E0, 0xF800, 11, 5, 0,
RGB2YUV_SHIFT + 8)
379 rgb16_32_wrapper(
AV_PIX_FMT_BGR555LE,
bgr15le, 0, 0, 0, 0, 0x001F, 0x03E0, 0x7C00, 10, 5, 0,
RGB2YUV_SHIFT + 7)
380 rgb16_32_wrapper(
AV_PIX_FMT_BGR444LE, bgr12le, 0, 0, 0, 0, 0x000F, 0x00F0, 0x0F00, 8, 4, 0,
RGB2YUV_SHIFT + 4)
381 rgb16_32_wrapper(
AV_PIX_FMT_RGB565LE,
rgb16le, 0, 0, 0, 0, 0xF800, 0x07E0, 0x001F, 0, 5, 11,
RGB2YUV_SHIFT + 8)
382 rgb16_32_wrapper(
AV_PIX_FMT_RGB555LE, rgb15le, 0, 0, 0, 0, 0x7C00, 0x03E0, 0x001F, 0, 5, 10,
RGB2YUV_SHIFT + 7)
383 rgb16_32_wrapper(
AV_PIX_FMT_RGB444LE,
rgb12le, 0, 0, 0, 0, 0x0F00, 0x00F0, 0x000F, 0, 4, 8,
RGB2YUV_SHIFT + 4)
384 rgb16_32_wrapper(
AV_PIX_FMT_BGR565BE, bgr16be, 0, 0, 0, 0, 0x001F, 0x07E0, 0xF800, 11, 5, 0,
RGB2YUV_SHIFT + 8)
385 rgb16_32_wrapper(
AV_PIX_FMT_BGR555BE,
bgr15be, 0, 0, 0, 0, 0x001F, 0x03E0, 0x7C00, 10, 5, 0,
RGB2YUV_SHIFT + 7)
386 rgb16_32_wrapper(
AV_PIX_FMT_BGR444BE, bgr12be, 0, 0, 0, 0, 0x000F, 0x00F0, 0x0F00, 8, 4, 0,
RGB2YUV_SHIFT + 4)
387 rgb16_32_wrapper(
AV_PIX_FMT_RGB565BE,
rgb16be, 0, 0, 0, 0, 0xF800, 0x07E0, 0x001F, 0, 5, 11,
RGB2YUV_SHIFT + 8)
388 rgb16_32_wrapper(
AV_PIX_FMT_RGB555BE, rgb15be, 0, 0, 0, 0, 0x7C00, 0x03E0, 0x001F, 0, 5, 10,
RGB2YUV_SHIFT + 7)
389 rgb16_32_wrapper(
AV_PIX_FMT_RGB444BE,
rgb12be, 0, 0, 0, 0, 0x0F00, 0x00F0, 0x000F, 0, 4, 8,
RGB2YUV_SHIFT + 4)
390 rgb16_32_wrapper(
AV_PIX_FMT_X2RGB10LE, rgb30le, 16, 6, 0, 0, 0x3FF00000, 0xFFC00, 0x3FF, 0, 0, 4,
RGB2YUV_SHIFT + 6)
391 rgb16_32_wrapper(
AV_PIX_FMT_X2BGR10LE,
bgr30le, 0, 6, 16, 0, 0x3FF, 0xFFC00, 0x3FF00000, 4, 0, 0,
RGB2YUV_SHIFT + 6)
394 const uint8_t *gsrc, const uint8_t *bsrc, const uint8_t *rsrc,
397 uint16_t *dstU = (uint16_t *)_dstU;
398 uint16_t *dstV = (uint16_t *)_dstV;
404 unsigned int g = gsrc[2*
i] + gsrc[2*
i+1];
405 unsigned int b = bsrc[2*
i] + bsrc[2*
i+1];
406 unsigned int r = rsrc[2*
i] + rsrc[2*
i+1];
413 static void rgba64leToA_c(uint8_t *_dst,
const uint8_t *_src,
const uint8_t *unused1,
414 const uint8_t *unused2,
int width, uint32_t *unused)
416 int16_t *dst = (int16_t *)_dst;
417 const uint16_t *
src = (
const uint16_t *)_src;
423 static void rgba64beToA_c(uint8_t *_dst,
const uint8_t *_src,
const uint8_t *unused1,
424 const uint8_t *unused2,
int width, uint32_t *unused)
426 int16_t *dst = (int16_t *)_dst;
427 const uint16_t *
src = (
const uint16_t *)_src;
433 static void abgrToA_c(uint8_t *_dst,
const uint8_t *
src,
const uint8_t *unused1,
const uint8_t *unused2,
int width, uint32_t *unused)
435 int16_t *dst = (int16_t *)_dst;
442 static void rgbaToA_c(uint8_t *_dst,
const uint8_t *
src,
const uint8_t *unused1,
const uint8_t *unused2,
int width, uint32_t *unused)
444 int16_t *dst = (int16_t *)_dst;
451 static void palToA_c(uint8_t *_dst,
const uint8_t *
src,
const uint8_t *unused1,
const uint8_t *unused2,
int width, uint32_t *pal)
453 int16_t *dst = (int16_t *)_dst;
458 dst[
i]= (pal[
d] >> 24)<<6 | pal[
d]>>26;
462 static void palToY_c(uint8_t *_dst,
const uint8_t *
src,
const uint8_t *unused1,
const uint8_t *unused2,
int width, uint32_t *pal)
464 int16_t *dst = (int16_t *)_dst;
469 dst[
i] = (pal[
d] & 0xFF)<<6;
474 const uint8_t *unused0,
const uint8_t *
src1,
const uint8_t *
src2,
475 int width, uint32_t *pal)
477 uint16_t *dstU = (uint16_t *)_dstU;
478 int16_t *dstV = (int16_t *)_dstV;
482 int p = pal[
src1[
i]];
484 dstU[
i] = (uint8_t)(p>> 8)<<6;
485 dstV[
i] = (uint8_t)(p>>16)<<6;
489 static void monowhite2Y_c(uint8_t *_dst,
const uint8_t *
src,
const uint8_t *unused1,
const uint8_t *unused2,
int width, uint32_t *unused)
491 int16_t *dst = (int16_t *)_dst;
496 for (j = 0; j < 8; j++)
497 dst[8*
i+j]= ((
d>>(7-j))&1) * 16383;
501 for (j = 0; j < (
width&7); j++)
502 dst[8*
i+j]= ((
d>>(7-j))&1) * 16383;
506 static void monoblack2Y_c(uint8_t *_dst,
const uint8_t *
src,
const uint8_t *unused1,
const uint8_t *unused2,
int width, uint32_t *unused)
508 int16_t *dst = (int16_t *)_dst;
513 for (j = 0; j < 8; j++)
514 dst[8*
i+j]= ((
d>>(7-j))&1) * 16383;
518 for (j = 0; j < (
width&7); j++)
519 dst[8*
i+j] = ((
d>>(7-j))&1) * 16383;
523 static void yuy2ToY_c(uint8_t *dst,
const uint8_t *
src,
const uint8_t *unused1,
const uint8_t *unused2,
int width,
531 static void yuy2ToUV_c(uint8_t *dstU, uint8_t *dstV,
const uint8_t *unused0,
const uint8_t *
src1,
532 const uint8_t *
src2,
int width, uint32_t *unused)
536 dstU[
i] =
src1[4 *
i + 1];
537 dstV[
i] =
src1[4 *
i + 3];
542 static void yvy2ToUV_c(uint8_t *dstU, uint8_t *dstV,
const uint8_t *unused0,
const uint8_t *
src1,
543 const uint8_t *
src2,
int width, uint32_t *unused)
547 dstV[
i] =
src1[4 *
i + 1];
548 dstU[
i] =
src1[4 *
i + 3];
553 static void y210le_UV_c(uint8_t *dstU, uint8_t *dstV,
const uint8_t *unused0,
const uint8_t *
src,
554 const uint8_t *unused1,
int width, uint32_t *unused2)
563 static void y210le_Y_c(uint8_t *dst,
const uint8_t *
src,
const uint8_t *unused0,
564 const uint8_t *unused1,
int width, uint32_t *unused2)
571 static void bswap16Y_c(uint8_t *_dst,
const uint8_t *_src,
const uint8_t *unused1,
const uint8_t *unused2,
int width,
575 const uint16_t *
src = (
const uint16_t *)_src;
576 uint16_t *dst = (uint16_t *)_dst;
581 static void bswap16UV_c(uint8_t *_dstU, uint8_t *_dstV,
const uint8_t *unused0,
const uint8_t *_src1,
582 const uint8_t *_src2,
int width, uint32_t *unused)
585 const uint16_t *
src1 = (
const uint16_t *)_src1,
586 *
src2 = (
const uint16_t *)_src2;
587 uint16_t *dstU = (uint16_t *)_dstU, *dstV = (uint16_t *)_dstV;
636 const uint8_t *unused1,
int width, uint32_t *unused2)
655 static void uyvyToY_c(uint8_t *dst,
const uint8_t *
src,
const uint8_t *unused1,
const uint8_t *unused2,
int width,
660 dst[
i] =
src[2 *
i + 1];
663 static void uyvyToUV_c(uint8_t *dstU, uint8_t *dstV,
const uint8_t *unused0,
const uint8_t *
src1,
664 const uint8_t *
src2,
int width, uint32_t *unused)
668 dstU[
i] =
src1[4 *
i + 0];
669 dstV[
i] =
src1[4 *
i + 2];
679 dst1[
i] =
src[2 *
i + 0];
680 dst2[
i] =
src[2 *
i + 1];
685 const uint8_t *unused0,
const uint8_t *
src1,
const uint8_t *
src2,
686 int width, uint32_t *unused)
692 const uint8_t *unused0,
const uint8_t *
src1,
const uint8_t *
src2,
693 int width, uint32_t *unused)
698 static void p010LEToY_c(uint8_t *dst,
const uint8_t *
src,
const uint8_t *unused1,
699 const uint8_t *unused2,
int width, uint32_t *unused)
707 static void p010BEToY_c(uint8_t *dst,
const uint8_t *
src,
const uint8_t *unused1,
708 const uint8_t *unused2,
int width, uint32_t *unused)
717 const uint8_t *unused0,
const uint8_t *
src1,
const uint8_t *
src2,
718 int width, uint32_t *unused)
728 const uint8_t *unused0,
const uint8_t *
src1,
const uint8_t *
src2,
729 int width, uint32_t *unused)
739 const uint8_t *unused0,
const uint8_t *
src1,
const uint8_t *
src2,
740 int width, uint32_t *unused)
750 const uint8_t *unused0,
const uint8_t *
src1,
const uint8_t *
src2,
751 int width, uint32_t *unused)
760 #define input_pixel(pos) (isBE(origin) ? AV_RB16(pos) : AV_RL16(pos))
762 static void bgr24ToY_c(uint8_t *_dst,
const uint8_t *
src,
const uint8_t *unused1,
const uint8_t *unused2,
765 int16_t *dst = (int16_t *)_dst;
769 int b =
src[
i * 3 + 0];
770 int g =
src[
i * 3 + 1];
771 int r =
src[
i * 3 + 2];
777 static void bgr24ToUV_c(uint8_t *_dstU, uint8_t *_dstV,
const uint8_t *unused0,
const uint8_t *
src1,
780 int16_t *dstU = (int16_t *)_dstU;
781 int16_t *dstV = (int16_t *)_dstV;
799 int16_t *dstU = (int16_t *)_dstU;
800 int16_t *dstV = (int16_t *)_dstV;
815 static void rgb24ToY_c(uint8_t *_dst,
const uint8_t *
src,
const uint8_t *unused1,
const uint8_t *unused2,
int width,
818 int16_t *dst = (int16_t *)_dst;
822 int r =
src[
i * 3 + 0];
823 int g =
src[
i * 3 + 1];
824 int b =
src[
i * 3 + 2];
830 static void rgb24ToUV_c(uint8_t *_dstU, uint8_t *_dstV,
const uint8_t *unused0,
const uint8_t *
src1,
833 int16_t *dstU = (int16_t *)_dstU;
834 int16_t *dstV = (int16_t *)_dstV;
852 int16_t *dstU = (int16_t *)_dstU;
853 int16_t *dstV = (int16_t *)_dstV;
870 uint16_t *dst = (uint16_t *)_dst;
884 uint16_t *dst = (uint16_t *)_dst;
887 dst[
i] =
src[3][
i] << 6;
892 uint16_t *dstU = (uint16_t *)_dstU;
893 uint16_t *dstV = (uint16_t *)_dstV;
908 (is_be ? AV_RB16(src) : AV_RL16(src))
913 const uint16_t **
src = (
const uint16_t **)_src;
914 uint16_t *dst = (uint16_t *)_dst;
916 int shift = bpc < 16 ? bpc : 14;
930 const uint16_t **
src = (
const uint16_t **)_src;
931 uint16_t *dst = (uint16_t *)_dst;
932 int shift = bpc < 16 ? bpc : 14;
940 const uint8_t *_src[4],
int width,
944 const uint16_t **
src = (
const uint16_t **)_src;
945 uint16_t *dstU = (uint16_t *)_dstU;
946 uint16_t *dstV = (uint16_t *)_dstV;
949 int shift = bpc < 16 ? bpc : 14;
961 #define rdpx(src) (is_be ? av_int2float(AV_RB32(src)): av_int2float(AV_RL32(src)))
966 const float **
src = (
const float **)_src;
967 uint16_t *dst = (uint16_t *)_dst;
977 const float **
src = (
const float **)_src;
978 uint16_t *dstU = (uint16_t *)_dstU;
979 uint16_t *dstV = (uint16_t *)_dstV;
996 const float **
src = (
const float **)_src;
997 uint16_t *dst = (uint16_t *)_dst;
1011 const uint8_t *unused2,
int width,
int is_be, uint32_t *unused)
1014 const float *
src = (
const float *)_src;
1015 uint16_t *dst = (uint16_t *)_dst;
1024 #define rgb9plus_planar_funcs_endian(nbits, endian_name, endian) \
1025 static void planar_rgb##nbits##endian_name##_to_y(uint8_t *dst, const uint8_t *src[4], \
1026 int w, int32_t *rgb2yuv) \
1028 planar_rgb16_to_y(dst, src, w, nbits, endian, rgb2yuv); \
1030 static void planar_rgb##nbits##endian_name##_to_uv(uint8_t *dstU, uint8_t *dstV, \
1031 const uint8_t *src[4], int w, int32_t *rgb2yuv) \
1033 planar_rgb16_to_uv(dstU, dstV, src, w, nbits, endian, rgb2yuv); \
1036 #define rgb9plus_planar_transparency_funcs(nbits) \
1037 static void planar_rgb##nbits##le_to_a(uint8_t *dst, const uint8_t *src[4], \
1038 int w, int32_t *rgb2yuv) \
1040 planar_rgb16_to_a(dst, src, w, nbits, 0, rgb2yuv); \
1042 static void planar_rgb##nbits##be_to_a(uint8_t *dst, const uint8_t *src[4], \
1043 int w, int32_t *rgb2yuv) \
1045 planar_rgb16_to_a(dst, src, w, nbits, 1, rgb2yuv); \
1048 #define rgb9plus_planar_funcs(nbits) \
1049 rgb9plus_planar_funcs_endian(nbits, le, 0) \
1050 rgb9plus_planar_funcs_endian(nbits, be, 1)
1062 #define rgbf32_planar_funcs_endian(endian_name, endian) \
1063 static void planar_rgbf32##endian_name##_to_y(uint8_t *dst, const uint8_t *src[4], \
1064 int w, int32_t *rgb2yuv) \
1066 planar_rgbf32_to_y(dst, src, w, endian, rgb2yuv); \
1068 static void planar_rgbf32##endian_name##_to_uv(uint8_t *dstU, uint8_t *dstV, \
1069 const uint8_t *src[4], int w, int32_t *rgb2yuv) \
1071 planar_rgbf32_to_uv(dstU, dstV, src, w, endian, rgb2yuv); \
1073 static void planar_rgbf32##endian_name##_to_a(uint8_t *dst, const uint8_t *src[4], \
1074 int w, int32_t *rgb2yuv) \
1076 planar_rgbf32_to_a(dst, src, w, endian, rgb2yuv); \
1078 static void grayf32##endian_name##ToY16_c(uint8_t *dst, const uint8_t *src, \
1079 const uint8_t *unused1, const uint8_t *unused2, \
1080 int width, uint32_t *unused) \
1082 grayf32ToY16_c(dst, src, unused1, unused2, width, endian, unused); \
1092 c->chrToYV12 =
NULL;
1093 switch (srcFormat) {
1119 c->readChrPlanar = planar_rgb9le_to_uv;
1123 c->readChrPlanar = planar_rgb10le_to_uv;
1127 c->readChrPlanar = planar_rgb12le_to_uv;
1130 c->readChrPlanar = planar_rgb14le_to_uv;
1134 c->readChrPlanar = planar_rgb16le_to_uv;
1138 c->readChrPlanar = planar_rgbf32le_to_uv;
1141 c->readChrPlanar = planar_rgb9be_to_uv;
1145 c->readChrPlanar = planar_rgb10be_to_uv;
1149 c->readChrPlanar = planar_rgb12be_to_uv;
1152 c->readChrPlanar = planar_rgb14be_to_uv;
1156 c->readChrPlanar = planar_rgb16be_to_uv;
1160 c->readChrPlanar = planar_rgbf32be_to_uv;
1258 if (
c->chrSrcHSubSample) {
1259 switch (srcFormat) {
1261 c->chrToYV12 = rgb64BEToUV_half_c;
1264 c->chrToYV12 = rgb64LEToUV_half_c;
1267 c->chrToYV12 = bgr64BEToUV_half_c;
1270 c->chrToYV12 = bgr64LEToUV_half_c;
1273 c->chrToYV12 = rgb48BEToUV_half_c;
1276 c->chrToYV12 = rgb48LEToUV_half_c;
1279 c->chrToYV12 = bgr48BEToUV_half_c;
1282 c->chrToYV12 = bgr48LEToUV_half_c;
1285 c->chrToYV12 = bgr32ToUV_half_c;
1288 c->chrToYV12 = bgr321ToUV_half_c;
1294 c->chrToYV12 = bgr16leToUV_half_c;
1297 c->chrToYV12 = bgr16beToUV_half_c;
1300 c->chrToYV12 = bgr15leToUV_half_c;
1303 c->chrToYV12 = bgr15beToUV_half_c;
1310 c->chrToYV12 = bgr12leToUV_half_c;
1313 c->chrToYV12 = bgr12beToUV_half_c;
1316 c->chrToYV12 = rgb32ToUV_half_c;
1319 c->chrToYV12 = rgb321ToUV_half_c;
1325 c->chrToYV12 = rgb16leToUV_half_c;
1328 c->chrToYV12 = rgb16beToUV_half_c;
1331 c->chrToYV12 = rgb15leToUV_half_c;
1334 c->chrToYV12 = rgb15beToUV_half_c;
1337 c->chrToYV12 = rgb12leToUV_half_c;
1340 c->chrToYV12 = rgb12beToUV_half_c;
1343 c->chrToYV12 = rgb30leToUV_half_c;
1346 c->chrToYV12 = bgr30leToUV_half_c;
1350 switch (srcFormat) {
1352 c->chrToYV12 = rgb64BEToUV_c;
1355 c->chrToYV12 = rgb64LEToUV_c;
1358 c->chrToYV12 = bgr64BEToUV_c;
1361 c->chrToYV12 = bgr64LEToUV_c;
1364 c->chrToYV12 = rgb48BEToUV_c;
1367 c->chrToYV12 = rgb48LEToUV_c;
1370 c->chrToYV12 = bgr48BEToUV_c;
1373 c->chrToYV12 = bgr48LEToUV_c;
1376 c->chrToYV12 = bgr32ToUV_c;
1379 c->chrToYV12 = bgr321ToUV_c;
1385 c->chrToYV12 = bgr16leToUV_c;
1388 c->chrToYV12 = bgr16beToUV_c;
1391 c->chrToYV12 = bgr15leToUV_c;
1394 c->chrToYV12 = bgr15beToUV_c;
1397 c->chrToYV12 = bgr12leToUV_c;
1400 c->chrToYV12 = bgr12beToUV_c;
1403 c->chrToYV12 = rgb32ToUV_c;
1406 c->chrToYV12 = rgb321ToUV_c;
1412 c->chrToYV12 = rgb16leToUV_c;
1415 c->chrToYV12 = rgb16beToUV_c;
1418 c->chrToYV12 = rgb15leToUV_c;
1421 c->chrToYV12 = rgb15beToUV_c;
1424 c->chrToYV12 = rgb12leToUV_c;
1427 c->chrToYV12 = rgb12beToUV_c;
1430 c->chrToYV12 = rgb30leToUV_c;
1433 c->chrToYV12 = bgr30leToUV_c;
1438 c->lumToYV12 =
NULL;
1439 c->alpToYV12 =
NULL;
1440 switch (srcFormat) {
1442 c->readLumPlanar = planar_rgb9le_to_y;
1445 c->readAlpPlanar = planar_rgb10le_to_a;
1447 c->readLumPlanar = planar_rgb10le_to_y;
1450 c->readAlpPlanar = planar_rgb12le_to_a;
1452 c->readLumPlanar = planar_rgb12le_to_y;
1455 c->readLumPlanar = planar_rgb14le_to_y;
1458 c->readAlpPlanar = planar_rgb16le_to_a;
1460 c->readLumPlanar = planar_rgb16le_to_y;
1463 c->readAlpPlanar = planar_rgbf32le_to_a;
1465 c->readLumPlanar = planar_rgbf32le_to_y;
1468 c->readLumPlanar = planar_rgb9be_to_y;
1471 c->readAlpPlanar = planar_rgb10be_to_a;
1473 c->readLumPlanar = planar_rgb10be_to_y;
1476 c->readAlpPlanar = planar_rgb12be_to_a;
1478 c->readLumPlanar = planar_rgb12be_to_y;
1481 c->readLumPlanar = planar_rgb14be_to_y;
1484 c->readAlpPlanar = planar_rgb16be_to_a;
1486 c->readLumPlanar = planar_rgb16be_to_y;
1489 c->readAlpPlanar = planar_rgbf32be_to_a;
1491 c->readLumPlanar = planar_rgbf32be_to_y;
1608 c->lumToYV12 = bgr16leToY_c;
1611 c->lumToYV12 = bgr16beToY_c;
1614 c->lumToYV12 = bgr15leToY_c;
1617 c->lumToYV12 = bgr15beToY_c;
1620 c->lumToYV12 = bgr12leToY_c;
1623 c->lumToYV12 = bgr12beToY_c;
1629 c->lumToYV12 = rgb16leToY_c;
1632 c->lumToYV12 = rgb16beToY_c;
1635 c->lumToYV12 = rgb15leToY_c;
1638 c->lumToYV12 = rgb15beToY_c;
1641 c->lumToYV12 = rgb12leToY_c;
1644 c->lumToYV12 = rgb12beToY_c;
1660 c->lumToYV12 = bgr32ToY_c;
1663 c->lumToYV12 = bgr321ToY_c;
1666 c->lumToYV12 = rgb32ToY_c;
1669 c->lumToYV12 = rgb321ToY_c;
1672 c->lumToYV12 = rgb48BEToY_c;
1675 c->lumToYV12 = rgb48LEToY_c;
1678 c->lumToYV12 = bgr48BEToY_c;
1681 c->lumToYV12 = bgr48LEToY_c;
1684 c->lumToYV12 = rgb64BEToY_c;
1687 c->lumToYV12 = rgb64LEToY_c;
1690 c->lumToYV12 = bgr64BEToY_c;
1693 c->lumToYV12 = bgr64LEToY_c;
1706 c->lumToYV12 = grayf32leToY16_c;
1709 c->lumToYV12 = grayf32beToY16_c;
1715 c->lumToYV12 = rgb30leToY_c;
1718 c->lumToYV12 = bgr30leToY_c;
1723 if (HAVE_BIGENDIAN == !
isBE(srcFormat) && !
c->readAlpPlanar)
1726 switch (srcFormat) {
it s the only field you need to keep assuming you have a context There is some magic you don t need to care about around this just let it be(in the first position) for now. Options ------- Then comes the options array. This is what will define the user accessible options. For example
@ AV_PIX_FMT_YUV420P9LE
planar YUV 4:2:0, 13.5bpp, (1 Cr & Cb sample per 2x2 Y samples), little-endian
@ AV_PIX_FMT_GRAY10BE
Y , 10bpp, big-endian.
AVPixelFormat
Pixel format.
@ AV_PIX_FMT_BGR48LE
packed RGB 16:16:16, 48bpp, 16B, 16G, 16R, the 2-byte value for each R/G/B component is stored as lit...
@ AV_PIX_FMT_P416BE
interleaved chroma YUV 4:4:4, 48bpp, big-endian
@ AV_PIX_FMT_YA8
8 bits gray, 8 bits alpha
@ AV_PIX_FMT_BGRA64BE
packed RGBA 16:16:16:16, 64bpp, 16B, 16G, 16R, 16A, the 2-byte value for each R/G/B/A component is st...
@ AV_PIX_FMT_RGB444LE
packed RGB 4:4:4, 16bpp, (msb)4X 4R 4G 4B(lsb), little-endian, X=unused/undefined
#define u(width, name, range_min, range_max)
@ AV_PIX_FMT_GBRP16BE
planar GBR 4:4:4 48bpp, big-endian
@ AV_PIX_FMT_GBRP10BE
planar GBR 4:4:4 30bpp, big-endian
@ AV_PIX_FMT_YUV422P14LE
planar YUV 4:2:2,28bpp, (1 Cr & Cb sample per 2x1 Y samples), little-endian
@ AV_PIX_FMT_YUVA444P10BE
planar YUV 4:4:4 40bpp, (1 Cr & Cb sample per 1x1 Y & A samples, big-endian)
@ AV_PIX_FMT_RGBA64BE
packed RGBA 16:16:16:16, 64bpp, 16R, 16G, 16B, 16A, the 2-byte value for each R/G/B/A component is st...
@ AV_PIX_FMT_YUV440P12BE
planar YUV 4:4:0,24bpp, (1 Cr & Cb sample per 1x2 Y samples), big-endian
@ AV_PIX_FMT_GBRAPF32LE
IEEE-754 single precision planar GBRA 4:4:4:4, 128bpp, little-endian.
@ AV_PIX_FMT_GBRPF32BE
IEEE-754 single precision planar GBR 4:4:4, 96bpp, big-endian.
void ff_sws_init_input_funcs(SwsContext *c)
@ AV_PIX_FMT_MONOWHITE
Y , 1bpp, 0 is white, 1 is black, in each byte pixels are ordered from the msb to the lsb.
@ AV_PIX_FMT_P010BE
like NV12, with 10bpp per component, data in the high bits, zeros in the low bits,...
static const char rgb2yuv[]
@ AV_PIX_FMT_YUV420P14BE
planar YUV 4:2:0,21bpp, (1 Cr & Cb sample per 2x2 Y samples), big-endian
@ AV_PIX_FMT_YUV420P16LE
planar YUV 4:2:0, 24bpp, (1 Cr & Cb sample per 2x2 Y samples), little-endian
#define AV_PIX_FMT_RGB32_1
@ AV_PIX_FMT_GBRP14BE
planar GBR 4:4:4 42bpp, big-endian
@ AV_PIX_FMT_BGR24
packed RGB 8:8:8, 24bpp, BGRBGR...
@ AV_PIX_FMT_BGRA
packed BGRA 8:8:8:8, 32bpp, BGRABGRA...
@ AV_PIX_FMT_YUVA444P9BE
planar YUV 4:4:4 36bpp, (1 Cr & Cb sample per 1x1 Y & A samples), big-endian
@ AV_PIX_FMT_YUV422P9BE
planar YUV 4:2:2, 18bpp, (1 Cr & Cb sample per 2x1 Y samples), big-endian
@ AV_PIX_FMT_GRAY10LE
Y , 10bpp, little-endian.
@ AV_PIX_FMT_GRAYF32LE
IEEE-754 single precision Y, 32bpp, little-endian.
@ AV_PIX_FMT_RGB555BE
packed RGB 5:5:5, 16bpp, (msb)1X 5R 5G 5B(lsb), big-endian , X=unused/undefined
@ AV_PIX_FMT_AYUV64LE
packed AYUV 4:4:4,64bpp (1 Cr & Cb sample per 1x1 Y & A samples), little-endian
@ AV_PIX_FMT_YUV444P16LE
planar YUV 4:4:4, 48bpp, (1 Cr & Cb sample per 1x1 Y samples), little-endian
@ AV_PIX_FMT_GBRAP12LE
planar GBR 4:4:4:4 48bpp, little-endian
@ AV_PIX_FMT_GRAY16BE
Y , 16bpp, big-endian.
static av_always_inline int is16BPS(enum AVPixelFormat pix_fmt)
@ AV_PIX_FMT_GBRAP
planar GBRA 4:4:4:4 32bpp
@ AV_PIX_FMT_YUV420P12LE
planar YUV 4:2:0,18bpp, (1 Cr & Cb sample per 2x2 Y samples), little-endian
@ AV_PIX_FMT_GRAY9LE
Y , 9bpp, little-endian.
static av_always_inline int isNBPS(enum AVPixelFormat pix_fmt)
@ AV_PIX_FMT_YUVA444P16BE
planar YUV 4:4:4 64bpp, (1 Cr & Cb sample per 1x1 Y & A samples, big-endian)
@ AV_PIX_FMT_YUV444P10BE
planar YUV 4:4:4, 30bpp, (1 Cr & Cb sample per 1x1 Y samples), big-endian
@ AV_PIX_FMT_YUV420P10LE
planar YUV 4:2:0, 15bpp, (1 Cr & Cb sample per 2x2 Y samples), little-endian
@ AV_PIX_FMT_YUV444P12LE
planar YUV 4:4:4,36bpp, (1 Cr & Cb sample per 1x1 Y samples), little-endian
@ AV_PIX_FMT_YUV422P12BE
planar YUV 4:2:2,24bpp, (1 Cr & Cb sample per 2x1 Y samples), big-endian
@ AV_PIX_FMT_YUV444P14LE
planar YUV 4:4:4,42bpp, (1 Cr & Cb sample per 1x1 Y samples), little-endian
@ AV_PIX_FMT_BGR8
packed RGB 3:3:2, 8bpp, (msb)2B 3G 3R(lsb)
@ AV_PIX_FMT_GBRAP16BE
planar GBRA 4:4:4:4 64bpp, big-endian
@ AV_PIX_FMT_GBRP16LE
planar GBR 4:4:4 48bpp, little-endian
@ AV_PIX_FMT_P416LE
interleaved chroma YUV 4:4:4, 48bpp, little-endian
@ AV_PIX_FMT_P210LE
interleaved chroma YUV 4:2:2, 20bpp, data in the high bits, little-endian
@ AV_PIX_FMT_P016BE
like NV12, with 16bpp per component, big-endian
@ AV_PIX_FMT_GBRP12LE
planar GBR 4:4:4 36bpp, little-endian
@ AV_PIX_FMT_YUVA420P16BE
planar YUV 4:2:0 40bpp, (1 Cr & Cb sample per 2x2 Y & A samples, big-endian)
uint64_t_TMPL AV_WL64 unsigned int_TMPL AV_WL32 unsigned int_TMPL AV_WL24 unsigned int_TMPL AV_RL16
@ AV_PIX_FMT_GBRP10LE
planar GBR 4:4:4 30bpp, little-endian
#define AV_PIX_FMT_BGR32_1
@ AV_PIX_FMT_RGBA
packed RGBA 8:8:8:8, 32bpp, RGBARGBA...
@ AV_PIX_FMT_YUV444P10LE
planar YUV 4:4:4, 30bpp, (1 Cr & Cb sample per 1x1 Y samples), little-endian
@ AV_PIX_FMT_YUVA422P10LE
planar YUV 4:2:2 30bpp, (1 Cr & Cb sample per 2x1 Y & A samples, little-endian)
@ AV_PIX_FMT_YUV444P9BE
planar YUV 4:4:4, 27bpp, (1 Cr & Cb sample per 1x1 Y samples), big-endian
@ AV_PIX_FMT_YUV422P10BE
planar YUV 4:2:2, 20bpp, (1 Cr & Cb sample per 2x1 Y samples), big-endian
@ AV_PIX_FMT_YUV422P16LE
planar YUV 4:2:2, 32bpp, (1 Cr & Cb sample per 2x1 Y samples), little-endian
@ AV_PIX_FMT_RGB565LE
packed RGB 5:6:5, 16bpp, (msb) 5R 6G 5B(lsb), little-endian
@ AV_PIX_FMT_GBRAPF32BE
IEEE-754 single precision planar GBRA 4:4:4:4, 128bpp, big-endian.
@ AV_PIX_FMT_GBRAP12BE
planar GBR 4:4:4:4 48bpp, big-endian
@ AV_PIX_FMT_YUYV422
packed YUV 4:2:2, 16bpp, Y0 Cb Y1 Cr
@ AV_PIX_FMT_P210BE
interleaved chroma YUV 4:2:2, 20bpp, data in the high bits, big-endian
@ AV_PIX_FMT_RGB48LE
packed RGB 16:16:16, 48bpp, 16R, 16G, 16B, the 2-byte value for each R/G/B component is stored as lit...
@ AV_PIX_FMT_YA16LE
16 bits gray, 16 bits alpha (little-endian)
@ AV_PIX_FMT_MONOBLACK
Y , 1bpp, 0 is black, 1 is white, in each byte pixels are ordered from the msb to the lsb.
@ AV_PIX_FMT_YUVA422P12LE
planar YUV 4:2:2,24bpp, (1 Cr & Cb sample per 2x1 Y samples), 12b alpha, little-endian
@ AV_PIX_FMT_BGR565LE
packed BGR 5:6:5, 16bpp, (msb) 5B 6G 5R(lsb), little-endian
@ AV_PIX_FMT_RGBA64LE
packed RGBA 16:16:16:16, 64bpp, 16R, 16G, 16B, 16A, the 2-byte value for each R/G/B/A component is st...
@ AV_PIX_FMT_YUVA444P12BE
planar YUV 4:4:4,36bpp, (1 Cr & Cb sample per 1x1 Y samples), 12b alpha, big-endian
@ AV_PIX_FMT_YUVA444P9LE
planar YUV 4:4:4 36bpp, (1 Cr & Cb sample per 1x1 Y & A samples), little-endian
@ AV_PIX_FMT_Y210LE
packed YUV 4:2:2 like YUYV422, 20bpp, data in the high bits, little-endian
@ AV_PIX_FMT_YUVA420P16LE
planar YUV 4:2:0 40bpp, (1 Cr & Cb sample per 2x2 Y & A samples, little-endian)
@ AV_PIX_FMT_RGB8
packed RGB 3:3:2, 8bpp, (msb)2R 3G 3B(lsb)
@ AV_PIX_FMT_YUV440P10LE
planar YUV 4:4:0,20bpp, (1 Cr & Cb sample per 1x2 Y samples), little-endian
@ AV_PIX_FMT_BGR555BE
packed BGR 5:5:5, 16bpp, (msb)1X 5B 5G 5R(lsb), big-endian , X=unused/undefined
@ AV_PIX_FMT_YUVA420P9LE
planar YUV 4:2:0 22.5bpp, (1 Cr & Cb sample per 2x2 Y & A samples), little-endian
@ AV_PIX_FMT_ABGR
packed ABGR 8:8:8:8, 32bpp, ABGRABGR...
Undefined Behavior In the C some operations are like signed integer dereferencing freed accessing outside allocated Undefined Behavior must not occur in a C it is not safe even if the output of undefined operations is unused The unsafety may seem nit picking but Optimizing compilers have in fact optimized code on the assumption that no undefined Behavior occurs Optimizing code based on wrong assumptions can and has in some cases lead to effects beyond the output of computations The signed integer overflow problem in speed critical code Code which is highly optimized and works with signed integers sometimes has the problem that often the output of the computation does not c
@ AV_PIX_FMT_YUV420P14LE
planar YUV 4:2:0,21bpp, (1 Cr & Cb sample per 2x2 Y samples), little-endian
@ AV_PIX_FMT_YUV444P14BE
planar YUV 4:4:4,42bpp, (1 Cr & Cb sample per 1x1 Y samples), big-endian
@ AV_PIX_FMT_BGR4_BYTE
packed RGB 1:2:1, 8bpp, (msb)1B 2G 1R(lsb)
@ AV_PIX_FMT_X2RGB10LE
packed RGB 10:10:10, 30bpp, (msb)2X 10R 10G 10B(lsb), little-endian, X=unused/undefined
@ AV_PIX_FMT_YUV420P9BE
The following 12 formats have the disadvantage of needing 1 format for each bit depth.
static av_always_inline int isBE(enum AVPixelFormat pix_fmt)
@ AV_PIX_FMT_RGB24
packed RGB 8:8:8, 24bpp, RGBRGB...
@ AV_PIX_FMT_YUV440P12LE
planar YUV 4:4:0,24bpp, (1 Cr & Cb sample per 1x2 Y samples), little-endian
@ AV_PIX_FMT_YUV420P12BE
planar YUV 4:2:0,18bpp, (1 Cr & Cb sample per 2x2 Y samples), big-endian
@ AV_PIX_FMT_YUV422P10LE
planar YUV 4:2:2, 20bpp, (1 Cr & Cb sample per 2x1 Y samples), little-endian
@ AV_PIX_FMT_RGB444BE
packed RGB 4:4:4, 16bpp, (msb)4X 4R 4G 4B(lsb), big-endian, X=unused/undefined
@ AV_PIX_FMT_YUV422P14BE
planar YUV 4:2:2,28bpp, (1 Cr & Cb sample per 2x1 Y samples), big-endian
@ AV_PIX_FMT_YA16BE
16 bits gray, 16 bits alpha (big-endian)
@ AV_PIX_FMT_GRAY12LE
Y , 12bpp, little-endian.
@ AV_PIX_FMT_GBRP9BE
planar GBR 4:4:4 27bpp, big-endian
@ AV_PIX_FMT_YUV420P10BE
planar YUV 4:2:0, 15bpp, (1 Cr & Cb sample per 2x2 Y samples), big-endian
@ AV_PIX_FMT_BGR444BE
packed BGR 4:4:4, 16bpp, (msb)4X 4B 4G 4R(lsb), big-endian, X=unused/undefined
@ AV_PIX_FMT_GBRP9LE
planar GBR 4:4:4 27bpp, little-endian
@ AV_PIX_FMT_GBRAP10LE
planar GBR 4:4:4:4 40bpp, little-endian
@ AV_PIX_FMT_BGR565BE
packed BGR 5:6:5, 16bpp, (msb) 5B 6G 5R(lsb), big-endian
@ AV_PIX_FMT_P410LE
interleaved chroma YUV 4:4:4, 30bpp, data in the high bits, little-endian
@ AV_PIX_FMT_YUVA420P10LE
planar YUV 4:2:0 25bpp, (1 Cr & Cb sample per 2x2 Y & A samples, little-endian)
@ AV_PIX_FMT_ARGB
packed ARGB 8:8:8:8, 32bpp, ARGBARGB...
@ AV_PIX_FMT_BGRA64LE
packed RGBA 16:16:16:16, 64bpp, 16B, 16G, 16R, 16A, the 2-byte value for each R/G/B/A component is st...
@ AV_PIX_FMT_YUVA422P10BE
planar YUV 4:2:2 30bpp, (1 Cr & Cb sample per 2x1 Y & A samples, big-endian)
@ AV_PIX_FMT_YUVA444P12LE
planar YUV 4:4:4,36bpp, (1 Cr & Cb sample per 1x1 Y samples), 12b alpha, little-endian
@ AV_PIX_FMT_YUVA422P9BE
planar YUV 4:2:2 27bpp, (1 Cr & Cb sample per 2x1 Y & A samples), big-endian
@ AV_PIX_FMT_RGB555LE
packed RGB 5:5:5, 16bpp, (msb)1X 5R 5G 5B(lsb), little-endian, X=unused/undefined
@ AV_PIX_FMT_RGB48BE
packed RGB 16:16:16, 48bpp, 16R, 16G, 16B, the 2-byte value for each R/G/B component is stored as big...
#define i(width, name, range_min, range_max)
@ AV_PIX_FMT_GRAY9BE
Y , 9bpp, big-endian.
@ AV_PIX_FMT_NV24
planar YUV 4:4:4, 24bpp, 1 plane for Y and 1 plane for the UV components, which are interleaved (firs...
#define av_assert1(cond)
assert() equivalent, that does not lie in speed critical code.
@ AV_PIX_FMT_NV21
as above, but U and V bytes are swapped
@ AV_PIX_FMT_RGB4_BYTE
packed RGB 1:2:1, 8bpp, (msb)1R 2G 1B(lsb)
@ AV_PIX_FMT_YUV444P16BE
planar YUV 4:4:4, 48bpp, (1 Cr & Cb sample per 1x1 Y samples), big-endian
@ AV_PIX_FMT_GBRPF32LE
IEEE-754 single precision planar GBR 4:4:4, 96bpp, little-endian.
@ AV_PIX_FMT_NV42
as above, but U and V bytes are swapped
@ AV_PIX_FMT_GBRAP16LE
planar GBRA 4:4:4:4 64bpp, little-endian
@ AV_PIX_FMT_PAL8
8 bits with AV_PIX_FMT_RGB32 palette
@ AV_PIX_FMT_GRAY12BE
Y , 12bpp, big-endian.
@ AV_PIX_FMT_YVYU422
packed YUV 4:2:2, 16bpp, Y0 Cr Y1 Cb
@ AV_PIX_FMT_NV12
planar YUV 4:2:0, 12bpp, 1 plane for Y and 1 plane for the UV components, which are interleaved (firs...
@ AV_PIX_FMT_P410BE
interleaved chroma YUV 4:4:4, 30bpp, data in the high bits, big-endian
@ AV_PIX_FMT_P016LE
like NV12, with 16bpp per component, little-endian
@ AV_PIX_FMT_GRAYF32BE
IEEE-754 single precision Y, 32bpp, big-endian.
@ AV_PIX_FMT_GBRP12BE
planar GBR 4:4:4 36bpp, big-endian
@ AV_PIX_FMT_UYVY422
packed YUV 4:2:2, 16bpp, Cb Y0 Cr Y1
@ AV_PIX_FMT_YUV444P12BE
planar YUV 4:4:4,36bpp, (1 Cr & Cb sample per 1x1 Y samples), big-endian
@ AV_PIX_FMT_YUV444P9LE
planar YUV 4:4:4, 27bpp, (1 Cr & Cb sample per 1x1 Y samples), little-endian
@ AV_PIX_FMT_P216LE
interleaved chroma YUV 4:2:2, 32bpp, little-endian
@ AV_PIX_FMT_YUVA420P10BE
planar YUV 4:2:0 25bpp, (1 Cr & Cb sample per 2x2 Y & A samples, big-endian)
@ AV_PIX_FMT_RGB565BE
packed RGB 5:6:5, 16bpp, (msb) 5R 6G 5B(lsb), big-endian
@ AV_PIX_FMT_YUV420P16BE
planar YUV 4:2:0, 24bpp, (1 Cr & Cb sample per 2x2 Y samples), big-endian
static int shift(int a, int b)
@ AV_PIX_FMT_GBRP
planar GBR 4:4:4 24bpp
@ AV_PIX_FMT_YUV422P16BE
planar YUV 4:2:2, 32bpp, (1 Cr & Cb sample per 2x1 Y samples), big-endian
@ AV_PIX_FMT_GRAY16LE
Y , 16bpp, little-endian.
@ AV_PIX_FMT_X2BGR10LE
packed BGR 10:10:10, 30bpp, (msb)2X 10B 10G 10R(lsb), little-endian, X=unused/undefined
@ AV_PIX_FMT_P010LE
like NV12, with 10bpp per component, data in the high bits, zeros in the low bits,...
@ AV_PIX_FMT_YUVA444P10LE
planar YUV 4:4:4 40bpp, (1 Cr & Cb sample per 1x1 Y & A samples, little-endian)
@ AV_PIX_FMT_BGR555LE
packed BGR 5:5:5, 16bpp, (msb)1X 5B 5G 5R(lsb), little-endian, X=unused/undefined
@ AV_PIX_FMT_P216BE
interleaved chroma YUV 4:2:2, 32bpp, big-endian
@ AV_PIX_FMT_GRAY14LE
Y , 14bpp, little-endian.
@ AV_PIX_FMT_GRAY14BE
Y , 14bpp, big-endian.
@ AV_PIX_FMT_YUVA422P16BE
planar YUV 4:2:2 48bpp, (1 Cr & Cb sample per 2x1 Y & A samples, big-endian)
@ AV_PIX_FMT_YUV440P10BE
planar YUV 4:4:0,20bpp, (1 Cr & Cb sample per 1x2 Y samples), big-endian
@ AV_PIX_FMT_YUV422P9LE
planar YUV 4:2:2, 18bpp, (1 Cr & Cb sample per 2x1 Y samples), little-endian
@ AV_PIX_FMT_YUVA422P16LE
planar YUV 4:2:2 48bpp, (1 Cr & Cb sample per 2x1 Y & A samples, little-endian)
@ AV_PIX_FMT_GBRP14LE
planar GBR 4:4:4 42bpp, little-endian
@ AV_PIX_FMT_GBRAP10BE
planar GBR 4:4:4:4 40bpp, big-endian
@ AV_PIX_FMT_YUVA444P16LE
planar YUV 4:4:4 64bpp, (1 Cr & Cb sample per 1x1 Y & A samples, little-endian)
@ AV_PIX_FMT_YUVA422P12BE
planar YUV 4:2:2,24bpp, (1 Cr & Cb sample per 2x1 Y samples), 12b alpha, big-endian
@ AV_PIX_FMT_BGR444LE
packed BGR 4:4:4, 16bpp, (msb)4X 4B 4G 4R(lsb), little-endian, X=unused/undefined
@ AV_PIX_FMT_YUV422P12LE
planar YUV 4:2:2,24bpp, (1 Cr & Cb sample per 2x1 Y samples), little-endian
@ AV_PIX_FMT_YUVA420P9BE
planar YUV 4:2:0 22.5bpp, (1 Cr & Cb sample per 2x2 Y & A samples), big-endian
uint64_t_TMPL AV_WL64 unsigned int_TMPL AV_WL32 unsigned int_TMPL AV_WL24 unsigned int_TMPL AV_WL16 uint64_t_TMPL AV_WB64 unsigned int_TMPL AV_WB32 unsigned int_TMPL AV_WB24 unsigned int_TMPL AV_RB16
@ AV_PIX_FMT_BGR48BE
packed RGB 16:16:16, 48bpp, 16B, 16G, 16R, the 2-byte value for each R/G/B component is stored as big...
@ AV_PIX_FMT_YUVA422P9LE
planar YUV 4:2:2 27bpp, (1 Cr & Cb sample per 2x1 Y & A samples), little-endian