37 int x,
int y,
int c,
int w,
38 int read_pal_component)
51 int shift = 8 - depth - (skip & 7);
55 if (read_pal_component)
56 val = data[1][4*val +
c];
65 int is_8bit = shift + depth <= 8;
71 int val = is_8bit ? *p :
73 val = (val >>
shift) & mask;
74 if (read_pal_component)
75 val = data[1][4 * val +
c];
85 int x,
int y,
int c,
int w)
96 int shift = 8 - depth - (skip & 7);
99 *p |= *src++ <<
shift;
109 if (shift + depth <= 8) {
112 *p |= (*src++ <<
shift);
130 #if !FF_API_PIX_FMT_DESC
609 .name =
"yuv440p10le",
621 .name =
"yuv440p10be",
633 .name =
"yuv440p12le",
645 .name =
"yuv440p12be",
696 .name =
"yuva420p9be",
709 .name =
"yuva420p9le",
722 .name =
"yuva422p9be",
735 .name =
"yuva422p9le",
748 .name =
"yuva444p9be",
761 .name =
"yuva444p9le",
774 .name =
"yuva420p10be",
787 .name =
"yuva420p10le",
800 .name =
"yuva422p10be",
813 .name =
"yuva422p10le",
826 .name =
"yuva444p10be",
839 .name =
"yuva444p10le",
852 .name =
"yuva420p16be",
865 .name =
"yuva420p16le",
878 .name =
"yuva422p16be",
891 .name =
"yuva422p16le",
904 .name =
"yuva444p16be",
917 .name =
"yuva444p16le",
931 .name =
"vdpau_h264",
937 .name =
"vdpau_mpeg1",
943 .name =
"vdpau_mpeg2",
949 .name =
"vdpau_wmv3",
961 .name =
"vdpau_mpeg4",
1213 .name =
"vaapi_moco",
1219 .name =
"vaapi_idct",
1225 .name =
"vaapi_vld",
1239 .name =
"yuv420p9le",
1251 .name =
"yuv420p9be",
1263 .name =
"yuv420p10le",
1275 .name =
"yuv420p10be",
1287 .name =
"yuv420p12le",
1299 .name =
"yuv420p12be",
1311 .name =
"yuv420p14le",
1323 .name =
"yuv420p14be",
1335 .name =
"yuv420p16le",
1347 .name =
"yuv420p16be",
1359 .name =
"yuv422p9le",
1371 .name =
"yuv422p9be",
1383 .name =
"yuv422p10le",
1395 .name =
"yuv422p10be",
1407 .name =
"yuv422p12le",
1419 .name =
"yuv422p12be",
1431 .name =
"yuv422p14le",
1443 .name =
"yuv422p14be",
1455 .name =
"yuv422p16le",
1467 .name =
"yuv422p16be",
1479 .name =
"yuv444p16le",
1491 .name =
"yuv444p16be",
1503 .name =
"yuv444p10le",
1515 .name =
"yuv444p10be",
1527 .name =
"yuv444p9le",
1539 .name =
"yuv444p9be",
1551 .name =
"yuv444p12le",
1563 .name =
"yuv444p12be",
1575 .name =
"yuv444p14le",
1587 .name =
"yuv444p14be",
1599 .name =
"d3d11va_vld",
1605 .name =
"dxva2_vld",
1645 .name =
"videotoolbox_vld",
1795 .name =
"gbrap16le",
1809 .name =
"gbrap16be",
1853 #define BAYER8_DESC_COMMON \
1854 .nb_components= 3, \
1855 .log2_chroma_w= 0, \
1856 .log2_chroma_h= 0, \
1863 #define BAYER16_DESC_COMMON \
1864 .nb_components= 3, \
1865 .log2_chroma_w= 0, \
1866 .log2_chroma_h= 0, \
1874 .name =
"bayer_bggr8",
1879 .name =
"bayer_bggr16le",
1884 .name =
"bayer_bggr16be",
1889 .name =
"bayer_rggb8",
1894 .name =
"bayer_rggb16le",
1899 .name =
"bayer_rggb16be",
1904 .name =
"bayer_gbrg8",
1909 .name =
"bayer_gbrg16le",
1914 .name =
"bayer_gbrg16be",
1919 .name =
"bayer_grbg8",
1924 .name =
"bayer_grbg16le",
1929 .name =
"bayer_grbg16be",
2010 "unknown",
"tv",
"pc",
2014 "reserved",
"bt709",
"unknown",
"reserved",
"bt470m",
2015 "bt470bg",
"smpte170m",
"smpte240m",
"film",
"bt2020",
2019 "reserved",
"bt709",
"unknown",
"reserved",
"bt470m",
2020 "bt470bg",
"smpte170m",
"smpte240m",
"linear",
"log100",
2021 "log316",
"iec61966-2-4",
"bt1361e",
"iec61966-2-1",
2022 "bt2020-10",
"bt2020-20",
2026 "gbr",
"bt709",
"unknown",
"reserved",
"fcc",
2027 "bt470bg",
"smpte170m",
"smpte240m",
"ycgco",
2028 "bt2020nc",
"bt2020c",
2032 "unspecified",
"left",
"center",
"topleft",
2033 "top",
"bottomleft",
"bottom",
2042 if (av_pix_fmt_descriptors[pix_fmt].name &&
2043 (!strcmp(av_pix_fmt_descriptors[pix_fmt].name, name) ||
2044 av_match_name(name, av_pix_fmt_descriptors[pix_fmt].alias)))
2057 # define X_NE(be, le) be
2059 # define X_NE(be, le) le
2066 if (!strcmp(name,
"rgb32"))
2067 name =
X_NE(
"argb",
"bgra");
2068 else if (!strcmp(name,
"bgr32"))
2069 name =
X_NE(
"abgr",
"rgba");
2075 snprintf(name2,
sizeof(name2),
"%s%s", name,
X_NE(
"be",
"le"));
2087 int s = c == 1 || c == 2 ? 0 : log2_pixels;
2091 return bits >> log2_pixels;
2102 int s = c == 1 || c == 2 ? 0 : log2_pixels;
2105 for (c = 0; c < 4; c++)
2111 return bits >> log2_pixels;
2119 snprintf (buf, buf_size,
"name" " nb_components" " nb_bits");
2122 snprintf(buf, buf_size,
"%-11s %7d %10d", pixdesc->
name,
2133 return &av_pix_fmt_descriptors[
pix_fmt];
2139 return &av_pix_fmt_descriptors[0];
2140 while (prev - av_pix_fmt_descriptors <
FF_ARRAY_ELEMS(av_pix_fmt_descriptors) - 1) {
2150 if (desc < av_pix_fmt_descriptors ||
2151 desc >= av_pix_fmt_descriptors +
FF_ARRAY_ELEMS(av_pix_fmt_descriptors))
2158 int *h_shift,
int *v_shift)
2172 int i, planes[4] = { 0 }, ret = 0;
2189 uint8_t fill[4][8+6+3] = {{0}};
2190 uint8_t *
data[4] = {fill[0], fill[1], fill[2], fill[3]};
2191 int linesize[4] = {0,0,0,0};
2215 if (!strncmp(d->
name,
"bayer_", 6))
2233 if (!desc || strlen(desc->
name) < 2)
2236 i = strlen(name) - 2;
2237 if (strcmp(name + i,
"be") && strcmp(name + i,
"le"))
2240 name[i] ^=
'b' ^
'l';
2245 #define FF_COLOR_NA -1
2246 #define FF_COLOR_RGB 0
2247 #define FF_COLOR_GRAY 1
2248 #define FF_COLOR_YUV 2
2249 #define FF_COLOR_YUV_JPEG 3
2251 #define pixdesc_has_alpha(pixdesc) \
2252 ((pixdesc)->nb_components == 2 || (pixdesc)->nb_components == 4 || (pixdesc)->flags & AV_PIX_FMT_FLAG_PAL)
2262 if(desc->
name && !strncmp(desc->
name,
"yuvj", 4))
2284 *min = INT_MAX, *max = -INT_MAX;
2294 unsigned *lossp,
unsigned consider)
2298 int src_color, dst_color;
2299 int src_min_depth, src_max_depth, dst_min_depth, dst_max_depth;
2300 int ret, loss, i, nb_components;
2301 int score = INT_MAX - 1;
2309 if (dst_pix_fmt == src_pix_fmt)
2324 for (i = 0; i < nb_components; i++) {
2328 score -= 65536 >> depth_minus1;
2371 if (src_color != dst_color)
2375 if(loss & FF_LOSS_COLORSPACE)
2409 enum AVPixelFormat src_pix_fmt,
int has_alpha,
int *loss_ptr)
2412 int loss1, loss2, loss_mask;
2417 loss_mask= loss_ptr?~*loss_ptr:~0;
2424 if (score1 == score2) {
2431 dst_pix_fmt = score1 < score2 ? dst_pix_fmt2 : dst_pix_fmt1;
2478 if(!desc || !desc->
name) {
#define AV_PIX_FMT_FLAG_PAL
Pixel format has a palette in data[1], values are indexes in this palette.
packed YUV 4:2:2, 16bpp, Cb Y0 Cr Y1
HW acceleration through VA API at motion compensation entry-point, Picture.data[3] contains a vaapi_r...
planar YUV 4:2:2, 18bpp, (1 Cr & Cb sample per 2x1 Y samples), big-endian
const char const char void * val
planar YUV 4:4:0,20bpp, (1 Cr & Cb sample per 1x2 Y samples), little-endian
planar YUV 4:4:4,42bpp, (1 Cr & Cb sample per 1x1 Y samples), big-endian
static enum AVPixelFormat pix_fmt
static int shift(int a, int b)
planar YUV 4:2:0,21bpp, (1 Cr & Cb sample per 2x2 Y samples), little-endian
const AVPixFmtDescriptor * av_pix_fmt_desc_get(enum AVPixelFormat pix_fmt)
ptrdiff_t const GLvoid * data
planar YUV 4:2:2,28bpp, (1 Cr & Cb sample per 2x1 Y samples), little-endian
planar YUV 4:2:0, 15bpp, (1 Cr & Cb sample per 2x2 Y samples), little-endian
packed RGBA 16:16:16:16, 64bpp, 16B, 16G, 16R, 16A, the 2-byte value for each R/G/B/A component is st...
planar YUV 4:4:4, 24bpp, (1 Cr & Cb sample per 1x1 Y samples)
static const char * color_range_names[AVCOL_RANGE_NB]
MPEG-2 HW decoding with VDPAU, data[0] contains a vdpau_render_state struct which contains the bitstr...
#define FF_LOSS_ALPHA
loss of alpha bits
int av_pix_fmt_count_planes(enum AVPixelFormat pix_fmt)
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 ...
hardware decoding through Videotoolbox
planar YUV 4:4:4, 27bpp, (1 Cr & Cb sample per 1x1 Y samples), big-endian
#define FF_LOSS_CHROMA
loss of chroma (e.g.
int av_get_bits_per_pixel(const AVPixFmtDescriptor *pixdesc)
Return the number of bits per pixel used by the pixel format described by pixdesc.
char * av_get_pix_fmt_string(char *buf, int buf_size, enum AVPixelFormat pix_fmt)
Print in buf the string corresponding to the pixel format with number pix_fmt, or a header if pix_fmt...
planar YUV 4:4:4,36bpp, (1 Cr & Cb sample per 1x1 Y samples), big-endian
bayer, GBGB..(odd line), RGRG..(even line), 8-bit samples */
bayer, GRGR..(odd line), BGBG..(even line), 8-bit samples */
packed RGBA 16:16:16:16, 64bpp, 16B, 16G, 16R, 16A, the 2-byte value for each R/G/B/A component is st...
packed RGB 5:5:5, 16bpp, (msb)1X 5R 5G 5B(lsb), little-endian, X=unused/undefined ...
bayer, GRGR..(odd line), BGBG..(even line), 16-bit samples, little-endian */
HW decoding through VA API, Picture.data[3] contains a vaapi_render_state struct which contains the b...
static const char * color_primaries_names[AVCOL_PRI_NB]
planar YUV 4:4:4 40bpp, (1 Cr & Cb sample per 1x1 Y & A samples, little-endian)
packed BGR 5:6:5, 16bpp, (msb) 5B 6G 5R(lsb), little-endian
planar GBR 4:4:4 36bpp, little-endian
The following 12 formats have the disadvantage of needing 1 format for each bit depth.
packed RGB 4:4:4, 16bpp, (msb)4X 4R 4G 4B(lsb), big-endian, X=unused/undefined
const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB]
The array of all the pixel format descriptors.
packed BGR 8:8:8, 32bpp, XBGRXBGR... X=unused/undefined
bayer, BGBG..(odd line), GRGR..(even line), 8-bit samples */
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
planar GBR 4:4:4 36bpp, big-endian
planar YUV 4:2:0, 24bpp, (1 Cr & Cb sample per 2x2 Y samples), little-endian
uint64_t_TMPL AV_WL64 unsigned int_TMPL AV_WL32 unsigned int_TMPL AV_WL24 unsigned int_TMPL AV_RL16
uint8_t log2_chroma_w
Amount to shift the luma width right to find the chroma width.
AVColorTransferCharacteristic
Color Transfer Characteristic.
static const char * chroma_location_names[AVCHROMA_LOC_NB]
packed RGB 1:2:1 bitstream, 4bpp, (msb)1R 2G 1B(lsb), a byte contains two pixels, the first pixel in ...
const char * av_color_space_name(enum AVColorSpace space)
uint16_t shift
Number of least significant bits that must be shifted away to get the value.
packed RGB 5:6:5, 16bpp, (msb) 5R 6G 5B(lsb), little-endian
packed RGB 1:2:1, 8bpp, (msb)1B 2G 1R(lsb)
planar YUV 4:2:0 22.5bpp, (1 Cr & Cb sample per 2x2 Y & A samples), little-endian ...
#define av_assert0(cond)
assert() equivalent, that is always enabled.
planar GBRA 4:4:4:4 64bpp, big-endian
planar YUV 4:2:0 40bpp, (1 Cr & Cb sample per 2x2 Y & A samples, big-endian)
planar YUV 4:2:0, 20bpp, (1 Cr & Cb sample per 2x2 Y & A samples)
AVComponentDescriptor comp[4]
Parameters that describe how pixels are packed.
#define AV_PIX_FMT_FLAG_ALPHA
The pixel format has an alpha channel.
#define av_assert2(cond)
assert() equivalent, that does lie in speed critical code.
#define BAYER16_DESC_COMMON
packed RGB 8:8:8, 32bpp, RGBXRGBX... X=unused/undefined
8 bit with AV_PIX_FMT_RGB32 palette
packed RGB 16:16:16, 48bpp, 16R, 16G, 16B, the 2-byte value for each R/G/B component is stored as lit...
AVColorSpace
YUV colorspace type.
bayer, GBGB..(odd line), RGRG..(even line), 16-bit samples, little-endian */
const char * av_color_range_name(enum AVColorRange range)
bayer, GBGB..(odd line), RGRG..(even line), 16-bit samples, big-endian */
packed RGBA 16:16:16:16, 64bpp, 16R, 16G, 16B, 16A, the 2-byte value for each R/G/B/A component is st...
packed RGB 4:4:4, 16bpp, (msb)4X 4R 4G 4B(lsb), little-endian, X=unused/undefined ...
planar YUV 4:4:4,36bpp, (1 Cr & Cb sample per 1x1 Y samples), little-endian
void av_write_image_line(const uint16_t *src, uint8_t *data[4], const int linesize[4], const AVPixFmtDescriptor *desc, int x, int y, int c, int w)
Write the values from src to the pixel format component c of an image line.
packed RGB 5:6:5, 16bpp, (msb) 5R 6G 5B(lsb), big-endian
static const char * color_transfer_names[AVCOL_TRC_NB]
packed ABGR 8:8:8:8, 32bpp, ABGRABGR...
planar YUV 4:2:0 40bpp, (1 Cr & Cb sample per 2x2 Y & A samples, little-endian)
planar YUV 4:4:0,20bpp, (1 Cr & Cb sample per 1x2 Y samples), big-endian
planar GBR 4:4:4 48bpp, big-endian
FF_ENABLE_DEPRECATION_WARNINGS enum AVPixelFormat av_pix_fmt_swap_endianness(enum AVPixelFormat pix_fmt)
Utility function to swap the endianness of a pixel format.
planar YUV 4:4:0 full scale (JPEG), deprecated in favor of AV_PIX_FMT_YUV440P and setting color_range...
planar YUV 4:2:2, 16bpp, full scale (JPEG), deprecated in favor of AV_PIX_FMT_YUV422P and setting col...
planar YUV 4:4:4 64bpp, (1 Cr & Cb sample per 1x1 Y & A samples, big-endian)
MPEG-1 HW decoding with VDPAU, data[0] contains a vdpau_render_state struct which contains the bitstr...
WMV3 HW decoding with VDPAU, data[0] contains a vdpau_render_state struct which contains the bitstrea...
AVColorRange
MPEG vs JPEG YUV range.
planar YUV 4:4:0,24bpp, (1 Cr & Cb sample per 1x2 Y samples), big-endian
AVColorPrimaries
Chromaticity coordinates of the source primaries.
bayer, BGBG..(odd line), GRGR..(even line), 16-bit samples, little-endian */
planar YUV 4:2:0, 13.5bpp, (1 Cr & Cb sample per 2x2 Y samples), little-endian
planar GBR 4:4:4 27bpp, big-endian
planar YUV 4:4:4, 30bpp, (1 Cr & Cb sample per 1x1 Y samples), little-endian
const char * av_chroma_location_name(enum AVChromaLocation location)
planar YUV 4:2:2 24bpp, (1 Cr & Cb sample per 2x1 Y & A samples)
uint16_t depth_minus1
Number of bits in the component minus 1.
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
16bit gray, 16bit alpha (big-endian)
uint8_t log2_chroma_h
Amount to shift the luma height right to find the chroma height.
static const uint16_t mask[17]
planar YUV 4:4:4, 48bpp, (1 Cr & Cb sample per 1x1 Y samples), big-endian
#define AV_PIX_FMT_FLAG_RGB
The pixel format contains RGB-like data (as opposed to YUV/grayscale).
int av_pix_fmt_get_chroma_sub_sample(enum AVPixelFormat pix_fmt, int *h_shift, int *v_shift)
Utility function to access log2_chroma_w log2_chroma_h from the pixel format AVPixFmtDescriptor.
packed BGRA 8:8:8:8, 32bpp, BGRABGRA...
int av_get_padded_bits_per_pixel(const AVPixFmtDescriptor *pixdesc)
Return the number of bits per pixel for the pixel format described by pixdesc, including any padding ...
#define FF_LOSS_DEPTH
loss due to color depth change
planar YUV 4:4:4 36bpp, (1 Cr & Cb sample per 1x1 Y & A 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_FLAG_HWACCEL
Pixel format is an HW accelerated format.
simple assert() macros that are a bit more flexible than ISO C assert().
planar YUV 4:2:2,28bpp, (1 Cr & Cb sample per 2x1 Y samples), big-endian
XVideo Motion Acceleration via common packet passing.
int av_match_name(const char *name, const char *names)
Match instances of a name in a comma-separated list of names.
planar YUV 4:2:2, 32bpp, (1 Cr & Cb sample per 2x1 Y samples), big-endian
Libavutil version macros.
HW acceleration through VDA, data[3] contains a CVPixelBufferRef.
planar YUV 4:4:4 36bpp, (1 Cr & Cb sample per 1x1 Y & A samples), little-endian
static const char * color_space_names[AVCOL_SPC_NB]
packed ARGB 8:8:8:8, 32bpp, ARGBARGB...
size_t av_strlcpy(char *dst, const char *src, size_t size)
Copy the string src to dst, but no more than size - 1 bytes, and null-terminate dst.
packed RGB 16:16:16, 48bpp, 16B, 16G, 16R, the 2-byte value for each R/G/B component is stored as lit...
packed RGBA 8:8:8:8, 32bpp, RGBARGBA...
const char * av_color_primaries_name(enum AVColorPrimaries primaries)
planar YUV 4:2:0 25bpp, (1 Cr & Cb sample per 2x2 Y & A samples, big-endian)
planar YUV 4:2:2, 16bpp, (1 Cr & Cb sample per 2x1 Y samples)
common internal API header
as above, but U and V bytes are swapped
enum AVPixelFormat av_pix_fmt_desc_get_id(const AVPixFmtDescriptor *desc)
uint8_t nb_components
The number of components each pixel has, (1-4)
#define BAYER8_DESC_COMMON
packed RGB 1:2:1, 8bpp, (msb)1R 2G 1B(lsb)
planar YUV 4:2:0, 12bpp, full scale (JPEG), deprecated in favor of AV_PIX_FMT_YUV420P and setting col...
#define FF_COLOR_YUV_JPEG
YUV color space.
#define AV_PIX_FMT_FLAG_PSEUDOPAL
The pixel format is "pseudo-paletted".
planar YUV 4:4:4 40bpp, (1 Cr & Cb sample per 1x1 Y & A samples, big-endian)
packed YUV 4:2:2, 16bpp, Y0 Cr Y1 Cb
planar YUV 4:2:2 27bpp, (1 Cr & Cb sample per 2x1 Y & A samples), big-endian
packed RGB 8:8:8, 24bpp, BGRBGR...
planar YUV 4:2:0,18bpp, (1 Cr & Cb sample per 2x2 Y samples), little-endian
packed XYZ 4:4:4, 36 bpp, (msb) 12X, 12Y, 12Z (lsb), the 2-byte value for each X/Y/Z is stored as big...
planar YUV 4:2:0, 15bpp, (1 Cr & Cb sample per 2x2 Y samples), big-endian
interleaved chroma YUV 4:2:2, 20bpp, (1 Cr & Cb sample per 2x1 Y samples), big-endian ...
static int get_color_type(const AVPixFmtDescriptor *desc)
#define pixdesc_has_alpha(pixdesc)
planar YUV 4:2:2, 18bpp, (1 Cr & Cb sample per 2x1 Y samples), little-endian
packed RGB 16:16:16, 48bpp, 16B, 16G, 16R, the 2-byte value for each R/G/B component is stored as big...
packed BGR 5:6:5, 16bpp, (msb) 5B 6G 5R(lsb), big-endian
#define FF_ARRAY_ELEMS(a)
HW acceleration through VA API at IDCT entry-point, Picture.data[3] contains a vaapi_render_state str...
packed RGB 3:3:2, 8bpp, (msb)2B 3G 3R(lsb)
#define AV_LOG_INFO
Standard information.
planar YUV 4:2:0, 24bpp, (1 Cr & Cb sample per 2x2 Y samples), big-endian
planar YUV 4:4:4 32bpp, (1 Cr & Cb sample per 1x1 Y & A samples)
Descriptor that unambiguously describes how the bits of a pixel are stored in the up to 4 data planes...
bayer, RGRG..(odd line), GBGB..(even line), 16-bit samples, big-endian */
planar GBR 4:4:4 30bpp, big-endian
bayer, GRGR..(odd line), BGBG..(even line), 16-bit samples, big-endian */
planar YUV 4:2:2 48bpp, (1 Cr & Cb sample per 2x1 Y & A samples, big-endian)
static int get_pix_fmt_score(enum AVPixelFormat dst_pix_fmt, enum AVPixelFormat src_pix_fmt, unsigned *lossp, unsigned consider)
#define FF_COLOR_YUV
YUV color space.
packed YUV 4:2:2, 16bpp, Y0 Cb Y1 Cr
planar YUV 4:4:0,24bpp, (1 Cr & Cb sample per 1x2 Y samples), little-endian
planar GBR 4:4:4 42bpp, little-endian
MPEG4 HW decoding with VDPAU, data[0] contains a vdpau_render_state struct which contains the bitstre...
H.264 HW decoding with VDPAU, data[0] contains a vdpau_render_state struct which contains the bitstre...
planar YUV 4:1:0, 9bpp, (1 Cr & Cb sample per 4x4 Y samples)
planar YUV 4:2:2 48bpp, (1 Cr & Cb sample per 2x1 Y & A samples, little-endian)
planar YUV 4:4:4 64bpp, (1 Cr & Cb sample per 1x1 Y & A samples, little-endian)
HW acceleration through VDPAU, Picture.data[3] contains a VdpVideoSurface.
planar YUV 4:2:0,21bpp, (1 Cr & Cb sample per 2x2 Y samples), big-endian
uint16_t step_minus1
Number of elements between 2 horizontally consecutive pixels minus 1.
int av_get_pix_fmt_loss(enum AVPixelFormat dst_pix_fmt, enum AVPixelFormat src_pix_fmt, int has_alpha)
Compute what kind of losses will occur when converting from one specific pixel format to another...
HW acceleration through QSV, data[3] contains a pointer to the mfxFrameSurface1 structure.
packed BGR 8:8:8, 32bpp, BGRXBGRX... X=unused/undefined
planar GBR 4:4:4 42bpp, big-endian
static int get_pix_fmt_depth(int *min, int *max, enum AVPixelFormat pix_fmt)
planar YUV 4:2:0 22.5bpp, (1 Cr & Cb sample per 2x2 Y & A samples), big-endian
packed BGR 5:5:5, 16bpp, (msb)1X 5B 5G 5R(lsb), little-endian, X=unused/undefined ...
bayer, BGBG..(odd line), GRGR..(even line), 16-bit samples, big-endian */
#define AV_PIX_FMT_FLAG_BITSTREAM
All values of a component are bit-wise packed end to end.
HW decoding through DXVA2, Picture.data[3] contains a LPDIRECT3DSURFACE9 pointer. ...
void av_read_image_line(uint16_t *dst, const uint8_t *data[4], const int linesize[4], const AVPixFmtDescriptor *desc, int x, int y, int c, int w, int read_pal_component)
Read a line from an image, and write the values of the pixel format component c to dst...
planar YUV 4:2:2 30bpp, (1 Cr & Cb sample per 2x1 Y & A samples, little-endian)
packed RGB 5:5:5, 16bpp, (msb)1X 5R 5G 5B(lsb), big-endian , X=unused/undefined
bayer, RGRG..(odd line), GBGB..(even line), 16-bit samples, little-endian */
#define FF_COLOR_RGB
RGB color space.
packed BGR 4:4:4, 16bpp, (msb)4X 4B 4G 4R(lsb), big-endian, X=unused/undefined
planar YUV 4:4:4, 27bpp, (1 Cr & Cb sample per 1x1 Y samples), little-endian
planar YUV 4:4:4, 48bpp, (1 Cr & Cb sample per 1x1 Y samples), little-endian
VC-1 HW decoding with VDPAU, data[0] contains a vdpau_render_state struct which contains the bitstrea...
#define FF_LOSS_COLORSPACE
loss due to color space conversion
hardware decoding through VDA
uint16_t plane
Which of the 4 planes contains the component.
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)
planar YUV 4:2:2,24bpp, (1 Cr & Cb sample per 2x1 Y samples), little-endian
#define FF_DISABLE_DEPRECATION_WARNINGS
common internal and external API header
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
planar GBR 4:4:4 27bpp, little-endian
const char * av_color_transfer_name(enum AVColorTransferCharacteristic transfer)
packed RGB 16:16:16, 48bpp, 16R, 16G, 16B, the 2-byte value for each R/G/B component is stored as big...
planar YUV 4:2:2, 32bpp, (1 Cr & Cb sample per 2x1 Y samples), little-endian
planar YUV 4:4:4, 24bpp, full scale (JPEG), deprecated in favor of AV_PIX_FMT_YUV444P and setting col...
bayer, RGRG..(odd line), GBGB..(even line), 8-bit samples */
packed RGB 3:3:2, 8bpp, (msb)2R 3G 3B(lsb)
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...
planar YUV 4:2:0 25bpp, (1 Cr & Cb sample per 2x2 Y & A samples, little-endian)
#define AV_PIX_FMT_FLAG_BE
Pixel format is big-endian.
#define FF_LOSS_RESOLUTION
loss due to resolution change
static FF_DISABLE_DEPRECATION_WARNINGS enum AVPixelFormat get_pix_fmt_internal(const char *name)
packed XYZ 4:4:4, 36 bpp, (msb) 12X, 12Y, 12Z (lsb), the 2-byte value for each X/Y/Z is stored as lit...
packed AYUV 4:4:4,64bpp (1 Cr & Cb sample per 1x1 Y & A samples), big-endian
#define FF_ENABLE_DEPRECATION_WARNINGS
planar YUV 4:4:4,42bpp, (1 Cr & Cb sample per 1x1 Y samples), little-endian
uint16_t offset_plus1
Number of elements before the component of the first pixel plus 1.
Y , 16bpp, little-endian.
planar YUV 4:1:1, 12bpp, (1 Cr & Cb sample per 4x1 Y samples) full scale (JPEG), deprecated in favor ...
16bit gray, 16bit alpha (little-endian)
planar YUV 4:2:2 30bpp, (1 Cr & Cb sample per 2x1 Y & A samples, big-endian)
packed BGR 5:5:5, 16bpp, (msb)1X 5B 5G 5R(lsb), big-endian , X=unused/undefined
number of pixel formats, DO NOT USE THIS if you want to link with shared libav* because the number of...
static void comp(unsigned char *dst, int dst_stride, unsigned char *src, int src_stride, int add)
planar YUV 4:4:0 (1 Cr & Cb sample per 1x2 Y samples)
#define FF_LOSS_COLORQUANT
loss due to color quantization
AVChromaLocation
Location of chroma samples.
HW decoding through Direct3D11, Picture.data[3] contains a ID3D11VideoDecoderOutputView pointer...
planar GBR 4:4:4 48bpp, little-endian
void ff_check_pixfmt_descriptors(void)
packed BGR 4:4:4, 16bpp, (msb)4X 4B 4G 4R(lsb), little-endian, X=unused/undefined ...
enum AVPixelFormat av_get_pix_fmt(const char *name)
Return the pixel format corresponding to name.
const char * av_get_pix_fmt_name(enum AVPixelFormat pix_fmt)
Return the short name for a pixel format, NULL in case pix_fmt is unknown.
planar YUV 4:2:2 27bpp, (1 Cr & Cb sample per 2x1 Y & A samples), little-endian
int main(int argc, char **argv)
interleaved chroma YUV 4:2:2, 20bpp, (1 Cr & Cb sample per 2x1 Y samples), little-endian ...
HW acceleration though MMAL, data[3] contains a pointer to the MMAL_BUFFER_HEADER_T structure...
planar GBRA 4:4:4:4 64bpp, little-endian
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_FLAG_PLANAR
At least one pixel component is not in the first data plane.
planar YUV 4:2:0,18bpp, (1 Cr & Cb sample per 2x2 Y samples), big-endian
planar YUV 4:4:4, 30bpp, (1 Cr & Cb sample per 1x1 Y samples), big-endian
planar YUV 4:2:2,24bpp, (1 Cr & Cb sample per 2x1 Y samples), big-endian
planar GBR 4:4:4 30bpp, little-endian
packed RGBA 16:16:16:16, 64bpp, 16R, 16G, 16B, 16A, the 2-byte value for each R/G/B/A component is st...
packed AYUV 4:4:4,64bpp (1 Cr & Cb sample per 1x1 Y & A samples), little-endian
const AVPixFmtDescriptor * av_pix_fmt_desc_next(const AVPixFmtDescriptor *prev)
Iterate over all pixel format descriptors known to libavutil.
#define FF_COLOR_GRAY
gray color space
planar YUV 4:2:2, 20bpp, (1 Cr & Cb sample per 2x1 Y samples), big-endian