57 #define TEST(input, expected) do { \
58 output = find_best(input); \
59 if (output != expected) { \
60 printf("Matching %s: got %s, expected %s\n", \
61 av_get_pix_fmt_name(input), \
62 av_get_pix_fmt_name(output), \
63 av_get_pix_fmt_name(expected)); \
137 printf(
"%d tests passed, %d tests failed.\n", pass,
fail);
packed YUV 4:2:2, 16bpp, Cb Y0 Cr Y1
static enum AVPixelFormat pixfmt_list[]
#define AV_PIX_FMT_YUV440P10
8 bits gray, 8 bits alpha
#define AV_PIX_FMT_GBRAP10
planar YUV 4:4:4, 24bpp, (1 Cr & Cb sample per 1x1 Y samples)
packed RGB 8:8:8, 24bpp, RGBRGB...
packed RGB 1:2:1 bitstream, 4bpp, (msb)1B 2G 1R(lsb), a byte contains two pixels, the first pixel in ...
#define AV_PIX_FMT_RGBA64
#define AV_PIX_FMT_GBRP10
#define AV_PIX_FMT_BGRA64
#define AV_PIX_FMT_YUV420P12
#define AV_PIX_FMT_RGB444
#define AV_PIX_FMT_GRAY10
packed RGB 5:6:5, 16bpp, (msb) 5R 6G 5B(lsb), little-endian
#define AV_PIX_FMT_GRAY12
planar YUV 4:2:0, 20bpp, (1 Cr & Cb sample per 2x2 Y & A samples)
packed RGB 16:16:16, 48bpp, 16R, 16G, 16B, the 2-byte value for each R/G/B component is stored as lit...
packed RGB 5:6:5, 16bpp, (msb) 5R 6G 5B(lsb), big-endian
packed ABGR 8:8:8:8, 32bpp, ABGRABGR...
#define AV_PIX_FMT_YUV444P16
Y , 10bpp, little-endian.
static enum AVPixelFormat find_best(enum AVPixelFormat pixfmt)
planar YUV 4:2:2 24bpp, (1 Cr & Cb sample per 2x1 Y & A samples)
planar YUV 4:4:4, 48bpp, (1 Cr & Cb sample per 1x1 Y samples), big-endian
planar YUV 4:2:2, 20bpp, (1 Cr & Cb sample per 2x1 Y samples), little-endian
planar YUV 4:2:0, 12bpp, 1 plane for Y and 1 plane for the UV components, which are interleaved (firs...
#define AV_PIX_FMT_GBRAP12
#define AV_PIX_FMT_YUV444P10
#define AV_PIX_FMT_GBRAP16
packed RGBA 8:8:8:8, 32bpp, RGBARGBA...
planar YUV 4:2:2, 16bpp, (1 Cr & Cb sample per 2x1 Y samples)
#define AV_PIX_FMT_GBRP16
#define AV_PIX_FMT_GRAY16
packed RGB 8:8:8, 24bpp, BGRBGR...
#define AV_PIX_FMT_YUV444P9
#define FF_ARRAY_ELEMS(a)
#define AV_PIX_FMT_YUV420P16
planar YUV 4:4:4 32bpp, (1 Cr & Cb sample per 1x1 Y & A samples)
packed YUV 4:2:2, 16bpp, Y0 Cb Y1 Cr
#define AV_PIX_FMT_YUV420P10
planar YUV 4:1:0, 9bpp, (1 Cr & Cb sample per 4x4 Y samples)
HW acceleration through VDPAU, Picture.data[3] contains a VdpVideoSurface.
#define AV_PIX_FMT_YUV440P12
#define TEST(input, expected)
#define AV_PIX_FMT_YUV420P9
HW decoding through DXVA2, Picture.data[3] contains a LPDIRECT3DSURFACE9 pointer. ...
#define AV_PIX_FMT_BGR565
#define AV_PIX_FMT_AYUV64
#define AV_PIX_FMT_YUV422P10
#define AV_PIX_FMT_YUV444P12
planar YUV 4:4:4, 48bpp, (1 Cr & Cb sample per 1x1 Y samples), little-endian
Y , 1bpp, 0 is black, 1 is white, in each byte pixels are ordered from the msb to the lsb...
planar YUV 4:2:0, 12bpp, (1 Cr & Cb sample per 2x2 Y samples)
Y , 1bpp, 0 is white, 1 is black, in each byte pixels are ordered from the msb to the lsb...
planar GBRA 4:4:4:4 32bpp
packed RGB 16:16:16, 48bpp, 16R, 16G, 16B, the 2-byte value for each R/G/B component is stored as big...
#define AV_PIX_FMT_RGB555
planar YUV 4:1:1, 12bpp, (1 Cr & Cb sample per 4x1 Y samples)
interleaved chroma YUV 4:2:2, 16bpp, (1 Cr & Cb sample per 2x1 Y samples)
enum AVPixelFormat av_find_best_pix_fmt_of_2(enum AVPixelFormat dst_pix_fmt1, enum AVPixelFormat dst_pix_fmt2, enum AVPixelFormat src_pix_fmt, int has_alpha, int *loss_ptr)
Compute what kind of losses will occur when converting from one specific pixel format to another...
Y , 16bpp, little-endian.
enum AVPixelFormat pixfmt
#define AV_PIX_FMT_RGB565
planar YUV 4:4:0 (1 Cr & Cb sample per 1x2 Y samples)
packed RGB 8:8:8, 32bpp, XRGBXRGB... X=unused/undefined
packed YUV 4:1:1, 12bpp, Cb Y0 Y1 Cr Y2 Y3
AVPixelFormat
Pixel format.
#define AV_PIX_FMT_YUV422P16
planar YUV 4:2:2, 20bpp, (1 Cr & Cb sample per 2x1 Y samples), big-endian