37 int x,
int y,
int c,
int w,
38 int read_pal_component)
41 int plane = comp.
plane;
50 const uint8_t *p = data[plane] + y * linesize[plane] + (skip >> 3);
51 int shift = 8 - depth - (skip & 7);
55 if (read_pal_component)
56 val = data[1][4*val +
c];
63 const uint8_t *p = data[plane] + y * linesize[plane] +
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)
88 int plane = comp.
plane;
95 uint8_t *p = data[plane] + y * linesize[plane] + (skip >> 3);
96 int shift = 8 - depth - (skip & 7);
99 *p |= *src++ <<
shift;
106 uint8_t *p = data[plane] + y * linesize[plane] +
109 if (shift + depth <= 8) {
112 *p |= (*src++ <<
shift);
130 #if !FF_API_PIX_FMT_DESC
648 .name =
"yuva420p9be",
661 .name =
"yuva420p9le",
674 .name =
"yuva422p9be",
687 .name =
"yuva422p9le",
700 .name =
"yuva444p9be",
713 .name =
"yuva444p9le",
726 .name =
"yuva420p10be",
739 .name =
"yuva420p10le",
752 .name =
"yuva422p10be",
765 .name =
"yuva422p10le",
778 .name =
"yuva444p10be",
791 .name =
"yuva444p10le",
804 .name =
"yuva420p16be",
817 .name =
"yuva420p16le",
830 .name =
"yuva422p16be",
843 .name =
"yuva422p16le",
856 .name =
"yuva444p16be",
869 .name =
"yuva444p16le",
883 .name =
"vdpau_h264",
889 .name =
"vdpau_mpeg1",
895 .name =
"vdpau_mpeg2",
901 .name =
"vdpau_wmv3",
913 .name =
"vdpau_mpeg4",
1164 .name =
"vaapi_moco",
1170 .name =
"vaapi_idct",
1176 .name =
"vaapi_vld",
1182 .name =
"yuv420p9le",
1194 .name =
"yuv420p9be",
1206 .name =
"yuv420p10le",
1218 .name =
"yuv420p10be",
1230 .name =
"yuv420p12le",
1242 .name =
"yuv420p12be",
1254 .name =
"yuv420p14le",
1266 .name =
"yuv420p14be",
1278 .name =
"yuv420p16le",
1290 .name =
"yuv420p16be",
1302 .name =
"yuv422p9le",
1314 .name =
"yuv422p9be",
1326 .name =
"yuv422p10le",
1338 .name =
"yuv422p10be",
1350 .name =
"yuv422p12le",
1362 .name =
"yuv422p12be",
1374 .name =
"yuv422p14le",
1386 .name =
"yuv422p14be",
1398 .name =
"yuv422p16le",
1410 .name =
"yuv422p16be",
1422 .name =
"yuv444p16le",
1434 .name =
"yuv444p16be",
1446 .name =
"yuv444p10le",
1458 .name =
"yuv444p10be",
1470 .name =
"yuv444p9le",
1482 .name =
"yuv444p9be",
1494 .name =
"yuv444p12le",
1506 .name =
"yuv444p12be",
1518 .name =
"yuv444p14le",
1530 .name =
"yuv444p14be",
1542 .name =
"dxva2_vld",
1727 .name =
"gbrap16le",
1740 .name =
"gbrap16be",
1783 #define BAYER8_DESC_COMMON \
1784 .nb_components= 3, \
1785 .log2_chroma_w= 0, \
1786 .log2_chroma_h= 0, \
1793 #define BAYER16_DESC_COMMON \
1794 .nb_components= 3, \
1795 .log2_chroma_w= 0, \
1796 .log2_chroma_h= 0, \
1804 .name =
"bayer_bggr8",
1809 .name =
"bayer_bggr16le",
1814 .name =
"bayer_bggr16be",
1819 .name =
"bayer_rggb8",
1824 .name =
"bayer_rggb16le",
1829 .name =
"bayer_rggb16be",
1834 .name =
"bayer_gbrg8",
1839 .name =
"bayer_gbrg16le",
1844 .name =
"bayer_gbrg16be",
1849 .name =
"bayer_grbg8",
1854 .name =
"bayer_grbg16le",
1859 .name =
"bayer_grbg16be",
1910 "unknown",
"tv",
"pc",
1914 "reserved",
"bt709",
"unknown",
"reserved",
"bt470m",
1915 "bt470bg",
"smpte170m",
"smpte240m",
"film",
"bt2020",
1919 "reserved",
"bt709",
"unknown",
"reserved",
"bt470m",
1920 "bt470bg",
"smpte170m",
"smpte240m",
"linear",
"log100",
1921 "log316",
"iec61966-2-4",
"bt1361e",
"iec61966-2-1",
1922 "bt2020-10",
"bt2020-20",
1926 "gbr",
"bt709",
"unknown",
"reserved",
"fcc",
1927 "bt470bg",
"smpte170m",
"smpte240m",
"ycgco",
1928 "bt2020nc",
"bt2020c",
1932 "unspecified",
"left",
"center",
"topleft",
1933 "top",
"bottomleft",
"bottom",
1942 if (av_pix_fmt_descriptors[pix_fmt].name &&
1943 (!strcmp(av_pix_fmt_descriptors[pix_fmt].name, name) ||
1944 av_match_name(name, av_pix_fmt_descriptors[pix_fmt].alias)))
1957 # define X_NE(be, le) be
1959 # define X_NE(be, le) le
1966 if (!strcmp(name,
"rgb32"))
1967 name =
X_NE(
"argb",
"bgra");
1968 else if (!strcmp(name,
"bgr32"))
1969 name =
X_NE(
"abgr",
"rgba");
1975 snprintf(name2,
sizeof(name2),
"%s%s", name,
X_NE(
"be",
"le"));
1987 int s = c == 1 || c == 2 ? 0 : log2_pixels;
1991 return bits >> log2_pixels;
2002 int s = c == 1 || c == 2 ? 0 : log2_pixels;
2005 for (c = 0; c < 4; c++)
2011 return bits >> log2_pixels;
2019 snprintf (buf, buf_size,
"name" " nb_components" " nb_bits");
2022 snprintf(buf, buf_size,
"%-11s %7d %10d", pixdesc->
name,
2033 return &av_pix_fmt_descriptors[
pix_fmt];
2039 return &av_pix_fmt_descriptors[0];
2040 while (prev - av_pix_fmt_descriptors <
FF_ARRAY_ELEMS(av_pix_fmt_descriptors) - 1) {
2050 if (desc < av_pix_fmt_descriptors ||
2051 desc >= av_pix_fmt_descriptors +
FF_ARRAY_ELEMS(av_pix_fmt_descriptors))
2058 int *h_shift,
int *v_shift)
2072 int i, planes[4] = { 0 },
ret = 0;
2089 uint8_t fill[4][8+6+3] = {{0}};
2090 uint8_t *
data[4] = {fill[0], fill[1], fill[2], fill[3]};
2091 int linesize[4] = {0,0,0,0};
2115 if (!strncmp(d->
name,
"bayer_", 6))
2133 if (!desc || strlen(desc->
name) < 2)
2136 i = strlen(name) - 2;
2137 if (strcmp(name + i,
"be") && strcmp(name + i,
"le"))
2140 name[i] ^=
'b' ^
'l';
2145 #define FF_COLOR_NA -1
2146 #define FF_COLOR_RGB 0
2147 #define FF_COLOR_GRAY 1
2148 #define FF_COLOR_YUV 2
2149 #define FF_COLOR_YUV_JPEG 3
2151 #define pixdesc_has_alpha(pixdesc) \
2152 ((pixdesc)->nb_components == 2 || (pixdesc)->nb_components == 4 || (pixdesc)->flags & AV_PIX_FMT_FLAG_PAL)
2162 if(desc->
name && !strncmp(desc->
name,
"yuvj", 4))
2184 *min = INT_MAX, *max = -INT_MAX;
2194 unsigned *lossp,
unsigned consider)
2198 int src_color, dst_color;
2199 int src_min_depth, src_max_depth, dst_min_depth, dst_max_depth;
2200 int ret, loss, i, nb_components;
2201 int score = INT_MAX - 1;
2209 if (dst_pix_fmt == src_pix_fmt)
2224 for (i = 0; i < nb_components; i++) {
2228 score -= 65536 >> depth_minus1;
2271 if (src_color != dst_color)
2275 if(loss & FF_LOSS_COLORSPACE)
2309 enum AVPixelFormat src_pix_fmt,
int has_alpha,
int *loss_ptr)
2312 int loss1, loss2, loss_mask;
2317 loss_mask= loss_ptr?~*loss_ptr:~0;
2324 if (score1 == score2) {
2331 dst_pix_fmt = score1 < score2 ? dst_pix_fmt2 : dst_pix_fmt1;
2378 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: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 ...
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
#define FF_ARRAY_ELEMS(a)
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 */
planar GBR 4:4:4 36bpp, big-endian
planar YUV 4:2:0, 24bpp, (1 Cr & Cb sample per 2x2 Y samples), little-endian
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 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 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 PIX_FMT_YUV440P and setting color_range ...
planar YUV 4:2:2, 16bpp, full scale (JPEG), deprecated in favor of PIX_FMT_YUV422P and setting color_...
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.
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 PIX_FMT_YUV420P and setting color_...
#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
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 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 PIX_FMT_YUV444P and setting color_...
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...
#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.
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 ...
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...
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