Go to the documentation of this file.
32 const uint8_t *
data[4],
const int linesize[4],
34 int x,
int y,
int c,
int w,
35 int read_pal_component,
39 int plane =
comp.plane;
40 int depth =
comp.depth;
41 unsigned mask = (1ULL << depth) - 1;
45 uint16_t *dst16 =
dst;
46 uint32_t *dst32 =
dst;
54 const uint8_t *byte_p =
data[plane] + y * linesize[plane];
55 const uint32_t *p = (uint32_t *)byte_p;
60 if (read_pal_component)
62 if (dst_element_size == 4) *dst32++ =
val;
68 const uint8_t *p =
data[plane] + y * linesize[plane] + (
skip >> 3);
73 if (read_pal_component)
78 if (dst_element_size == 4) *dst32++ =
val;
83 const uint8_t *p =
data[plane] + y * linesize[plane] +
85 int is_8bit =
shift + depth <= 8;
86 int is_16bit=
shift + depth <=16;
93 if (is_8bit)
val = *p;
97 if (read_pal_component)
100 if (dst_element_size == 4) *dst32++ =
val;
107 const uint8_t *
data[4],
const int linesize[4],
109 int x,
int y,
int c,
int w,
110 int read_pal_component)
118 uint8_t *
data[4],
const int linesize[4],
120 int x,
int y,
int c,
int w,
int src_element_size)
123 int plane =
comp.plane;
124 int depth =
comp.depth;
127 const uint32_t *src32 =
src;
128 const uint16_t *src16 =
src;
136 const uint8_t *byte_p =
data[plane] + y * linesize[plane];
137 uint32_t *p = (uint32_t *)byte_p;
139 uint32_t
mask = ((1ULL << depth) - 1) <<
offset;
142 unsigned val = src_element_size == 4 ? *src32++ : *src16++;
148 uint8_t *p =
data[plane] + y * linesize[plane] + (
skip >> 3);
152 *p |= (src_element_size == 4 ? *src32++ : *src16++) <<
shift;
160 uint8_t *p =
data[plane] + y * linesize[plane] +
163 if (
shift + depth <= 8) {
166 *p |= ((src_element_size == 4 ? *src32++ : *src16++) <<
shift);
171 unsigned s = (src_element_size == 4 ? *src32++ : *src16++);
172 if (
shift + depth <= 16) {
196 uint8_t *
data[4],
const int linesize[4],
198 int x,
int y,
int c,
int w)
825 .name =
"yuv440p10le",
837 .name =
"yuv440p10be",
849 .name =
"yuv440p12le",
861 .name =
"yuv440p12be",
912 .name =
"yuva420p9be",
925 .name =
"yuva420p9le",
938 .name =
"yuva422p9be",
951 .name =
"yuva422p9le",
964 .name =
"yuva444p9be",
977 .name =
"yuva444p9le",
990 .name =
"yuva420p10be",
1003 .name =
"yuva420p10le",
1016 .name =
"yuva422p10be",
1029 .name =
"yuva422p10le",
1042 .name =
"yuva444p10be",
1055 .name =
"yuva444p10le",
1068 .name =
"yuva420p16be",
1081 .name =
"yuva420p16le",
1094 .name =
"yuva422p16be",
1107 .name =
"yuva422p16le",
1120 .name =
"yuva444p16be",
1133 .name =
"yuva444p16le",
1396 .name =
"yuv420p9le",
1408 .name =
"yuv420p9be",
1420 .name =
"yuv420p10le",
1432 .name =
"yuv420p10be",
1444 .name =
"yuv420p12le",
1456 .name =
"yuv420p12be",
1468 .name =
"yuv420p14le",
1480 .name =
"yuv420p14be",
1492 .name =
"yuv420p16le",
1504 .name =
"yuv420p16be",
1516 .name =
"yuv422p9le",
1528 .name =
"yuv422p9be",
1540 .name =
"yuv422p10le",
1552 .name =
"yuv422p10be",
1564 .name =
"yuv422p12le",
1576 .name =
"yuv422p12be",
1588 .name =
"yuv422p14le",
1600 .name =
"yuv422p14be",
1612 .name =
"yuv422p16le",
1624 .name =
"yuv422p16be",
1636 .name =
"yuv444p16le",
1648 .name =
"yuv444p16be",
1660 .name =
"yuv444p10le",
1672 .name =
"yuv444p10be",
1684 .name =
"yuv444p9le",
1696 .name =
"yuv444p9be",
1708 .name =
"yuv444p12le",
1720 .name =
"yuv444p12be",
1732 .name =
"yuv444p14le",
1744 .name =
"yuv444p14be",
1756 .name =
"d3d11va_vld",
1762 .name =
"dxva2_vld",
1796 .name =
"videotoolbox_vld",
1946 .name =
"gbrap16le",
1960 .name =
"gbrap16be",
2004 #define BAYER8_DESC_COMMON \
2005 .nb_components= 3, \
2006 .log2_chroma_w= 0, \
2007 .log2_chroma_h= 0, \
2009 { 0, 1, 0, 0, 2 }, \
2010 { 0, 1, 0, 0, 4 }, \
2011 { 0, 1, 0, 0, 2 }, \
2014 #define BAYER16_DESC_COMMON \
2015 .nb_components= 3, \
2016 .log2_chroma_w= 0, \
2017 .log2_chroma_h= 0, \
2019 { 0, 2, 0, 0, 4 }, \
2020 { 0, 2, 0, 0, 8 }, \
2021 { 0, 2, 0, 0, 4 }, \
2025 .name =
"bayer_bggr8",
2030 .name =
"bayer_bggr16le",
2035 .name =
"bayer_bggr16be",
2040 .name =
"bayer_rggb8",
2045 .name =
"bayer_rggb16le",
2050 .name =
"bayer_rggb16be",
2055 .name =
"bayer_gbrg8",
2060 .name =
"bayer_gbrg16le",
2065 .name =
"bayer_gbrg16be",
2070 .name =
"bayer_grbg8",
2075 .name =
"bayer_grbg16le",
2080 .name =
"bayer_grbg16be",
2125 .name =
"mediacodec",
2272 .name =
"gbrap14le",
2286 .name =
"gbrap14be",
2300 .name =
"gbrap12le",
2314 .name =
"gbrap12be",
2328 .name =
"gbrap10le",
2342 .name =
"gbrap10be",
2364 .name =
"gbrpf32be",
2377 .name =
"gbrpf32le",
2389 .name =
"gbrapf32be",
2404 .name =
"gbrapf32le",
2418 .name =
"drm_prime",
2426 .name =
"grayf32be",
2437 .name =
"grayf32le",
2448 .name =
"yuva422p12be",
2461 .name =
"yuva422p12le",
2474 .name =
"yuva444p12be",
2487 .name =
"yuva444p12le",
2674 .name =
"rgbaf16be",
2688 .name =
"rgbaf16le",
2742 { 0, 32, 10, 0, 10 },
2743 { 0, 32, 0, 0, 10 },
2744 { 0, 32, 20, 0, 10 },
2745 { 0, 32, 30, 0, 2 },
2817 { 0, 32, 12, 0, 10 },
2818 { 0, 32, 2, 0, 10 },
2819 { 0, 32, 22, 0, 10 },
2830 { 0, 12, 0, 0, 32 },
2831 { 0, 12, 4, 0, 32 },
2832 { 0, 12, 8, 0, 32 },
2843 { 0, 12, 0, 0, 32 },
2844 { 0, 12, 4, 0, 32 },
2845 { 0, 12, 8, 0, 32 },
2855 { 0, 12, 0, 0, 32 },
2856 { 0, 12, 4, 0, 32 },
2857 { 0, 12, 8, 0, 32 },
2867 { 0, 12, 0, 0, 32 },
2868 { 0, 12, 4, 0, 32 },
2869 { 0, 12, 8, 0, 32 },
2874 .name =
"rgbaf32be",
2879 { 0, 16, 0, 0, 32 },
2880 { 0, 16, 4, 0, 32 },
2881 { 0, 16, 8, 0, 32 },
2882 { 0, 16, 12, 0, 32 },
2888 .name =
"rgbaf32le",
2893 { 0, 16, 0, 0, 32 },
2894 { 0, 16, 4, 0, 32 },
2895 { 0, 16, 8, 0, 32 },
2896 { 0, 16, 12, 0, 32 },
2902 .name =
"rgba128be",
2907 { 0, 16, 0, 0, 32 },
2908 { 0, 16, 4, 0, 32 },
2909 { 0, 16, 8, 0, 32 },
2910 { 0, 16, 12, 0, 32 },
2916 .name =
"rgba128le",
2921 { 0, 16, 0, 0, 32 },
2922 { 0, 16, 4, 0, 32 },
2923 { 0, 16, 8, 0, 32 },
2924 { 0, 16, 12, 0, 32 },
3097 # define X_NE(be, le) be
3099 # define X_NE(be, le) le
3106 if (!strcmp(
name,
"rgb32"))
3108 else if (!strcmp(
name,
"bgr32"))
3128 int s =
c == 1 ||
c == 2 ? 0 : log2_pixels;
3132 return bits >> log2_pixels;
3143 int s =
c == 1 ||
c == 2 ? 0 : log2_pixels;
3146 for (
c = 0;
c < 4;
c++)
3152 return bits >> log2_pixels;
3160 snprintf (buf, buf_size,
"name" " nb_components" " nb_bits");
3163 snprintf(buf, buf_size,
"%-11s %7d %10d", pixdesc->
name,
3199 int *h_shift,
int *v_shift)
3204 *h_shift =
desc->log2_chroma_w;
3205 *v_shift =
desc->log2_chroma_h;
3218 for (
i = 0;
i <
desc->nb_components;
i++)
3231 if (!
desc || strlen(
desc->name) < 2)
3234 i = strlen(
name) - 2;
3235 if (strcmp(
name +
i,
"be") && strcmp(
name +
i,
"le"))
3238 name[
i] ^=
'b' ^
'l';
3243 #define FF_COLOR_NA -1
3244 #define FF_COLOR_RGB 0
3245 #define FF_COLOR_GRAY 1
3246 #define FF_COLOR_YUV 2
3247 #define FF_COLOR_YUV_JPEG 3
3248 #define FF_COLOR_XYZ 4
3250 #define pixdesc_has_alpha(pixdesc) \
3251 ((pixdesc)->flags & AV_PIX_FMT_FLAG_ALPHA)
3258 if(
desc->nb_components == 1 ||
desc->nb_components == 2)
3272 if(
desc->nb_components == 0)
3283 if (!
desc || !
desc->nb_components) {
3288 *
min = INT_MAX, *
max = -INT_MAX;
3289 for (
i = 0;
i <
desc->nb_components;
i++) {
3298 unsigned *lossp,
unsigned consider)
3302 int src_color, dst_color;
3303 int src_min_depth, src_max_depth, dst_min_depth, dst_max_depth;
3304 int ret, loss,
i, nb_components;
3305 int score = INT_MAX - 1;
3307 if (!src_desc || !dst_desc)
3312 if (dst_pix_fmt == src_pix_fmt)
3321 if (dst_pix_fmt == src_pix_fmt)
3336 for (
i = 0;
i < nb_components;
i++) {
3338 int depth_delta = src_desc->
comp[
i].
depth - 1 - depth_minus1;
3341 score -= 65536 >> depth_minus1;
3347 score += depth_delta;
3412 if (src_color != dst_color)
3450 enum AVPixelFormat src_pix_fmt,
int has_alpha,
int *loss_ptr)
3453 int loss1, loss2, loss_mask;
3459 dst_pix_fmt = dst_pix_fmt2;
3460 }
else if (!desc2) {
3461 dst_pix_fmt = dst_pix_fmt1;
3463 loss_mask= loss_ptr?~*loss_ptr:~0;
3470 if (score1 == score2) {
3477 dst_pix_fmt = score1 < score2 ? dst_pix_fmt2 : dst_pix_fmt1;
3594 *xpos = (
pos&1) * 128;
3595 *ypos = ((
pos>>1)^(
pos<4)) * 128;
3602 int pos, xout, yout;
@ AV_PIX_FMT_XYZ12LE
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...
enum AVPixelFormat av_pix_fmt_swap_endianness(enum AVPixelFormat pix_fmt)
Utility function to swap the endianness of a pixel format.
@ AV_PIX_FMT_YUV420P9LE
planar YUV 4:2:0, 13.5bpp, (1 Cr & Cb sample per 2x2 Y samples), little-endian
@ AV_PIX_FMT_XV30LE
packed XVYU 4:4:4, 32bpp, (msb)2X 10V 10Y 10U(lsb), little-endian, variant of Y410 where alpha channe...
@ AV_PIX_FMT_CUDA
HW acceleration through CUDA.
@ AV_PIX_FMT_GRAY10BE
Y , 10bpp, big-endian.
AVPixelFormat
Pixel format.
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 vf default minimum maximum flags name is the option name
@ AV_PIX_FMT_BAYER_GBRG16LE
bayer, GBGB..(odd line), RGRG..(even line), 16-bit samples, little-endian
@ 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...
@ AVCOL_PRI_EBU3213
EBU Tech. 3213-E (nothing there) / one of JEDEC P22 group phosphors.
@ AV_PIX_FMT_P416BE
interleaved chroma YUV 4:4:4, 48bpp, big-endian
Filter the word “frame” indicates either a video frame or a group of audio as stored in an AVFrame structure Format for each input and each output the list of supported formats For video that means pixel format For audio that means channel sample they are references to shared objects When the negotiation mechanism computes the intersection of the formats supported at each end of a all references to both lists are replaced with a reference to the intersection And when a single format is eventually chosen for a link amongst the remaining all references to the list are updated That means that if a filter requires that its input and output have the same format amongst a supported all it has to do is use a reference to the same list of formats query_formats can leave some formats unset and return AVERROR(EAGAIN) to cause the negotiation mechanism toagain later. That can be used by filters with complex requirements to use the format negotiated on one link to set the formats supported on another. Frame references ownership and permissions
@ AV_PIX_FMT_YA8
8 bits gray, 8 bits alpha
#define FF_LOSS_CHROMA
loss of chroma (e.g.
@ 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...
Undefined Behavior In the C some operations are like signed integer dereferencing freed accessing outside allocated space
AVColorTransferCharacteristic
Color Transfer Characteristic.
static void comp(unsigned char *dst, ptrdiff_t dst_stride, unsigned char *src, ptrdiff_t src_stride, int add)
@ AV_PIX_FMT_RGB444LE
packed RGB 4:4:4, 16bpp, (msb)4X 4R 4G 4B(lsb), little-endian, X=unused/undefined
@ AV_PIX_FMT_GBRP16BE
planar GBR 4:4:4 48bpp, big-endian
@ AVCOL_SPC_YCGCO_RE
YCgCo-R, even addition of bits.
@ AV_PIX_FMT_GBRP10BE
planar GBR 4:4:4 30bpp, big-endian
#define BAYER16_DESC_COMMON
const AVPixFmtDescriptor * av_pix_fmt_desc_get(enum AVPixelFormat pix_fmt)
@ AVCOL_TRC_LINEAR
"Linear transfer characteristics"
@ AV_PIX_FMT_YUV422P14LE
planar YUV 4:2:2,28bpp, (1 Cr & Cb sample per 2x1 Y samples), little-endian
@ AV_PIX_FMT_MMAL
HW acceleration though MMAL, data[3] contains a pointer to the MMAL_BUFFER_HEADER_T structure.
@ AV_PIX_FMT_RGBF16LE
IEEE-754 half precision packed RGB 16:16:16, 48bpp, RGBRGB..., little-endian.
#define AV_PIX_FMT_FLAG_FLOAT
The pixel format contains IEEE-754 floating point values.
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)
static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB]
int av_color_space_from_name(const char *name)
@ AVCOL_TRC_NB
Not part of ABI.
@ 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...
trying all byte sequences megabyte in length and selecting the best looking sequence will yield cases to try But a word about which is also called distortion Distortion can be quantified by almost any quality measurement one chooses the sum of squared differences is used but more complex methods that consider psychovisual effects can be used as well It makes no difference in this discussion First step
@ 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.
int av_color_range_from_name(const char *name)
@ AVCOL_RANGE_JPEG
Full range content.
@ AV_PIX_FMT_X2BGR10BE
packed BGR 10:10:10, 30bpp, (msb)2X 10B 10G 10R(lsb), big-endian, X=unused/undefined
@ AV_PIX_FMT_GBRPF32BE
IEEE-754 single precision planar GBR 4:4:4, 96bpp, big-endian.
@ AV_PIX_FMT_DRM_PRIME
DRM-managed buffers exposed through PRIME buffer sharing.
int depth
Number of bits in the component.
@ AV_PIX_FMT_P412BE
interleaved chroma YUV 4:4:4, 36bpp, data in the high bits, big-endian
@ AVCOL_SPC_NB
Not part of ABI.
@ AV_PIX_FMT_P010BE
like NV12, with 10bpp per component, data in the high bits, zeros in the low bits,...
@ AV_PIX_FMT_MONOWHITE
Y , 1bpp, 0 is white, 1 is black, in each byte pixels are ordered from the msb to the lsb.
static const struct @467 planes[]
const AVPixFmtDescriptor * av_pix_fmt_desc_next(const AVPixFmtDescriptor *prev)
Iterate over all pixel format descriptors known to libavutil.
@ 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
@ AV_PIX_FMT_D3D11VA_VLD
HW decoding through Direct3D11 via old API, Picture.data[3] contains a ID3D11VideoDecoderOutputView p...
@ AVCOL_SPC_RGB
order of coefficients is actually GBR, also IEC 61966-2-1 (sRGB), YZX and ST 428-1
@ AVCOL_TRC_BT2020_12
ITU-R BT2020 for 12-bit system.
@ 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...
int av_get_bits_per_pixel(const AVPixFmtDescriptor *pixdesc)
Return the number of bits per pixel used by the pixel format described by pixdesc.
@ AV_PIX_FMT_YUV440P
planar YUV 4:4:0 (1 Cr & Cb sample per 1x2 Y samples)
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...
AVColorPrimaries
Chromaticity coordinates of the source primaries.
#define FF_COLOR_GRAY
gray color space
@ AV_PIX_FMT_YUV422P9BE
planar YUV 4:2:2, 18bpp, (1 Cr & Cb sample per 2x1 Y samples), big-endian
@ AV_PIX_FMT_YUVA444P9BE
planar YUV 4:4:4 36bpp, (1 Cr & Cb sample per 1x1 Y & A samples), big-endian
@ AV_PIX_FMT_BAYER_GRBG16BE
bayer, GRGR..(odd line), BGBG..(even line), 16-bit 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_GBRAP14BE
planar GBR 4:4:4:4 56bpp, big-endian
@ AVCOL_SPC_BT2020_CL
ITU-R BT2020 constant luminance system.
const char * av_chroma_location_name(enum AVChromaLocation location)
@ AV_PIX_FMT_VULKAN
Vulkan hardware images.
@ AV_PIX_FMT_RGB555BE
packed RGB 5:5:5, 16bpp, (msb)1X 5R 5G 5B(lsb), big-endian , X=unused/undefined
@ AV_PIX_FMT_RGBAF16LE
IEEE-754 half precision packed RGBA 16:16:16:16, 64bpp, RGBARGBA..., little-endian.
#define FF_LOSS_EXCESS_RESOLUTION
loss due to unneeded extra resolution
@ 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
#define FF_LOSS_ALPHA
loss of alpha bits
@ AV_PIX_FMT_BAYER_GBRG16BE
bayer, GBGB..(odd line), RGRG..(even line), 16-bit samples, big-endian
@ AV_PIX_FMT_AYUV64BE
packed AYUV 4:4:4,64bpp (1 Cr & Cb sample per 1x1 Y & A samples), big-endian
@ AV_PIX_FMT_NB
number of pixel formats, DO NOT USE THIS if you want to link with shared libav* because the number of...
#define FF_LOSS_EXCESS_DEPTH
loss due to unneeded extra color depth
@ AV_PIX_FMT_GBRAP12LE
planar GBR 4:4:4:4 48bpp, little-endian
@ AV_PIX_FMT_GRAY16BE
Y , 16bpp, big-endian.
int av_pix_fmt_count_planes(enum AVPixelFormat pix_fmt)
@ AVCOL_SPC_BT470BG
also ITU-R BT601-6 625 / ITU-R BT1358 625 / ITU-R BT1700 625 PAL & SECAM / IEC 61966-2-4 xvYCC601
int av_chroma_location_from_name(const char *name)
@ AVCOL_SPC_RESERVED
reserved for future use by ITU-T and ISO/IEC just like 15-255 are
@ AV_PIX_FMT_RGB96BE
packed RGBA 32:32:32, 96bpp, RGBRGB..., big-endian
@ AVCOL_TRC_IEC61966_2_1
IEC 61966-2-1 (sRGB or sYCC)
@ AV_PIX_FMT_Y212BE
packed YUV 4:2:2 like YUYV422, 24bpp, data in the high bits, zeros in the low bits,...
const char * av_color_space_name(enum AVColorSpace space)
@ AV_PIX_FMT_GBRAP
planar GBRA 4:4:4:4 32bpp
@ AV_PIX_FMT_RGBA128BE
packed RGBA 32:32:32:32, 128bpp, RGBARGBA..., big-endian
@ AV_PIX_FMT_YUV420P12LE
planar YUV 4:2:0,18bpp, (1 Cr & Cb sample per 2x2 Y samples), little-endian
#define AV_PIX_FMT_FLAG_HWACCEL
Pixel format is an HW accelerated format.
@ AV_PIX_FMT_GRAY9LE
Y , 9bpp, little-endian.
@ AVCOL_RANGE_NB
Not part of ABI.
@ AVCOL_TRC_GAMMA28
also ITU-R BT470BG
int av_color_transfer_from_name(const char *name)
static double val(void *priv, double ch)
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.
static const char *const chroma_location_names[]
@ AVCOL_TRC_LOG_SQRT
"Logarithmic transfer characteristic (100 * Sqrt(10) : 1 range)"
@ 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
@ AVCOL_TRC_GAMMA22
also ITU-R BT470M / ITU-R BT1700 625 PAL & SECAM
@ AV_PIX_FMT_YUV420P10LE
planar YUV 4:2:0, 15bpp, (1 Cr & Cb sample per 2x2 Y samples), little-endian
@ AV_PIX_FMT_VUYA
packed VUYA 4:4:4:4, 32bpp (1 Cr & Cb sample per 1x1 Y & A samples), VUYAVUYA...
@ AV_PIX_FMT_YUV444P12LE
planar YUV 4:4:4,36bpp, (1 Cr & Cb sample per 1x1 Y samples), little-endian
@ AV_PIX_FMT_YUVJ411P
planar YUV 4:1:1, 12bpp, (1 Cr & Cb sample per 4x1 Y samples) full scale (JPEG), deprecated in favor ...
@ 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_BAYER_RGGB16BE
bayer, RGRG..(odd line), GBGB..(even line), 16-bit samples, big-endian
#define FF_ARRAY_ELEMS(a)
@ AV_PIX_FMT_YUVJ422P
planar YUV 4:2:2, 16bpp, full scale (JPEG), deprecated in favor of AV_PIX_FMT_YUV422P and setting col...
@ AV_PIX_FMT_GBRAP16BE
planar GBRA 4:4:4:4 64bpp, big-endian
@ AV_PIX_FMT_RGBA128LE
packed RGBA 32:32:32:32, 128bpp, RGBARGBA..., little-endian
@ AV_PIX_FMT_XV30BE
packed XVYU 4:4:4, 32bpp, (msb)2X 10V 10Y 10U(lsb), big-endian, variant of Y410 where alpha channel i...
@ AV_PIX_FMT_DXVA2_VLD
HW decoding through DXVA2, Picture.data[3] contains a LPDIRECT3DSURFACE9 pointer.
@ AV_PIX_FMT_GBRP16LE
planar GBR 4:4:4 48bpp, little-endian
int av_chroma_location_enum_to_pos(int *xpos, int *ypos, enum AVChromaLocation pos)
Converts AVChromaLocation to swscale x/y chroma position.
@ AVCOL_PRI_NB
Not part of ABI.
@ AV_PIX_FMT_YUVA420P
planar YUV 4:2:0, 20bpp, (1 Cr & Cb sample per 2x2 Y & A samples)
@ AVCOL_TRC_BT1361_ECG
ITU-R BT1361 Extended Colour Gamut.
static const char *const color_space_names[]
@ AV_PIX_FMT_P416LE
interleaved chroma YUV 4:4:4, 48bpp, little-endian
@ AV_PIX_FMT_BAYER_RGGB16LE
bayer, RGRG..(odd line), GBGB..(even line), 16-bit samples, little-endian
@ AV_PIX_FMT_P210LE
interleaved chroma YUV 4:2:2, 20bpp, data in the high bits, little-endian
@ AV_PIX_FMT_BAYER_BGGR8
bayer, BGBG..(odd line), GRGR..(even line), 8-bit samples
@ AVCOL_SPC_SMPTE170M
also ITU-R BT601-6 525 / ITU-R BT1358 525 / ITU-R BT1700 NTSC / functionally identical to above
static enum AVPixelFormat pix_fmt
@ AV_PIX_FMT_NV20BE
interleaved chroma YUV 4:2:2, 20bpp, (1 Cr & Cb sample per 2x1 Y samples), big-endian
@ AV_PIX_FMT_P016BE
like NV12, with 16bpp per component, big-endian
@ AV_PIX_FMT_RGB96LE
packed RGBA 32:32:32, 96bpp, RGBRGB..., little-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)
#define AV_PIX_FMT_FLAG_ALPHA
The pixel format has an alpha channel.
uint64_t_TMPL AV_WL64 unsigned int_TMPL AV_WL32 unsigned int_TMPL AV_WL24 unsigned int_TMPL AV_RL16
@ AVCOL_PRI_SMPTE428
SMPTE ST 428-1 (CIE 1931 XYZ)
static const char *const color_range_names[]
@ AV_PIX_FMT_RGB4
packed RGB 1:2:1 bitstream, 4bpp, (msb)1R 2G 1B(lsb), a byte contains two pixels, the first pixel in ...
uint8_t log2_chroma_w
Amount to shift the luma width right to find the chroma width.
@ AV_PIX_FMT_GBRP10LE
planar GBR 4:4:4 30bpp, little-endian
@ AV_PIX_FMT_YUV420P
planar YUV 4:2:0, 12bpp, (1 Cr & Cb sample per 2x2 Y samples)
@ AVCOL_PRI_SMPTE240M
identical to above, also called "SMPTE C" even though it uses D65
@ AVCOL_SPC_IPT_C2
SMPTE ST 2128, IPT-C2.
void av_read_image_line2(void *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, int dst_element_size)
Read a line from an image, and write the values of the pixel format component c to dst.
@ AV_PIX_FMT_RGBA
packed RGBA 8:8:8:8, 32bpp, RGBARGBA...
@ AV_PIX_FMT_YUVJ444P
planar YUV 4:4:4, 24bpp, full scale (JPEG), deprecated in favor of AV_PIX_FMT_YUV444P and setting col...
@ AVCOL_SPC_CHROMA_DERIVED_CL
Chromaticity-derived constant luminance system.
@ AVCOL_PRI_BT470BG
also ITU-R BT601-6 625 / ITU-R BT1358 625 / ITU-R BT1700 625 PAL & SECAM
@ AV_PIX_FMT_YUV444P10LE
planar YUV 4:4:4, 30bpp, (1 Cr & Cb sample per 1x1 Y samples), little-endian
@ AV_PIX_FMT_BAYER_RGGB8
bayer, RGRG..(odd line), GBGB..(even line), 8-bit samples
@ AV_PIX_FMT_MEDIACODEC
hardware decoding through MediaCodec
@ AVCOL_PRI_SMPTE170M
also ITU-R BT601-6 525 / ITU-R BT1358 525 / ITU-R BT1700 NTSC
@ AV_PIX_FMT_YUVA422P10LE
planar YUV 4:2:2 30bpp, (1 Cr & Cb sample per 2x1 Y & A samples, little-endian)
@ AV_PIX_FMT_BAYER_GRBG16LE
bayer, GRGR..(odd line), BGBG..(even line), 16-bit samples, little-endian
const char * av_color_range_name(enum AVColorRange range)
@ 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_Y216LE
packed YUV 4:2:2 like YUYV422, 32bpp, 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_P012LE
like NV12, with 12bpp per component, data in the high bits, zeros in the low bits,...
uint8_t nb_components
The number of components each pixel has, (1-4)
@ AVCHROMA_LOC_LEFT
MPEG-2/4 4:2:0, H.264 default for 4:2:0.
@ AV_PIX_FMT_YUYV422
packed YUV 4:2:2, 16bpp, Y0 Cb Y1 Cr
#define FF_LOSS_DEPTH
loss due to color depth change
@ AVCHROMA_LOC_TOPLEFT
ITU-R 601, SMPTE 274M 296M S314M(DV 4:1:1), mpeg2 4:2:2.
@ AVCOL_TRC_IEC61966_2_4
IEC 61966-2-4.
@ 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_YUVJ420P
planar YUV 4:2:0, 12bpp, full scale (JPEG), deprecated in favor of AV_PIX_FMT_YUV420P and setting col...
@ 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
@ AVCOL_PRI_BT709
also ITU-R BT1361 / IEC 61966-2-4 / SMPTE RP 177 Annex B
@ 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...
#define FF_COLOR_YUV_JPEG
YUV color space.
@ 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
const char * av_color_primaries_name(enum AVColorPrimaries primaries)
@ AV_PIX_FMT_YUVA420P16LE
planar YUV 4:2:0 40bpp, (1 Cr & Cb sample per 2x2 Y & A samples, little-endian)
@ AVCOL_TRC_BT2020_10
ITU-R BT2020 for 10-bit system.
@ AV_PIX_FMT_RGB8
packed RGB 3:3:2, 8bpp, (msb)3R 3G 2B(lsb)
@ AV_PIX_FMT_BGR0
packed BGR 8:8:8, 32bpp, BGRXBGRX... X=unused/undefined
@ AVCOL_SPC_YCGCO
used by Dirac / VC-2 and H.264 FRext, see ITU-T SG16
@ AV_PIX_FMT_OPENCL
Hardware surfaces for OpenCL.
@ AV_PIX_FMT_BGR4
packed RGB 1:2:1 bitstream, 4bpp, (msb)1B 2G 1R(lsb), a byte contains two pixels, the first pixel in ...
@ AV_PIX_FMT_D3D12
Hardware surfaces for Direct3D 12.
@ AV_PIX_FMT_YUV440P10LE
planar YUV 4:4:0,20bpp, (1 Cr & Cb sample per 1x2 Y samples), little-endian
@ AV_PIX_FMT_GRAY8
Y , 8bpp.
@ AV_PIX_FMT_QSV
HW acceleration through QSV, data[3] contains a pointer to the mfxFrameSurface1 structure.
@ 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
enum AVChromaLocation av_chroma_location_pos_to_enum(int xpos, int ypos)
Converts swscale x/y chroma position to AVChromaLocation.
#define pixdesc_has_alpha(pixdesc)
uint64_t flags
Combination of AV_PIX_FMT_FLAG_...
@ AV_PIX_FMT_ABGR
packed ABGR 8:8:8:8, 32bpp, ABGRABGR...
@ AVCOL_RANGE_UNSPECIFIED
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
#define BAYER8_DESC_COMMON
@ AV_PIX_FMT_YUV420P14LE
planar YUV 4:2:0,21bpp, (1 Cr & Cb sample per 2x2 Y samples), little-endian
@ AVCOL_PRI_BT2020
ITU-R BT2020.
@ 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_P212LE
interleaved chroma YUV 4:2:2, 24bpp, data in the high bits, little-endian
@ AV_PIX_FMT_YUV420P9BE
The following 12 formats have the disadvantage of needing 1 format for each bit depth.
static int get_color_type(const AVPixFmtDescriptor *desc)
static const char *const color_transfer_names[]
@ AVCOL_TRC_SMPTE2084
SMPTE ST 2084 for 10-, 12-, 14- and 16-bit systems.
@ AVCOL_PRI_SMPTE431
SMPTE ST 431-2 (2011) / DCI P3.
@ AV_PIX_FMT_RGBF32BE
IEEE-754 single precision packed RGB 32:32:32, 96bpp, RGBRGB..., big-endian.
@ 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
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.
@ AVCOL_PRI_FILM
colour filters using Illuminant C
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 AV_PIX_FMT_FLAG_RGB
The pixel format contains RGB-like data (as opposed to YUV/grayscale).
static int shift(int a, int b)
uint8_t ptrdiff_t const uint8_t ptrdiff_t int intptr_t intptr_t int int16_t * dst
@ AV_PIX_FMT_BAYER_BGGR16LE
bayer, BGBG..(odd line), GRGR..(even line), 16-bit samples, little-endian
@ AV_PIX_FMT_YUV420P12BE
planar YUV 4:2:0,18bpp, (1 Cr & Cb sample per 2x2 Y samples), big-endian
@ AVCOL_SPC_YCGCO_RO
YCgCo-R, odd addition of bits.
@ AV_PIX_FMT_YUV422P10LE
planar YUV 4:2:2, 20bpp, (1 Cr & Cb sample per 2x1 Y samples), little-endian
@ AVCOL_TRC_LOG
"Logarithmic transfer characteristic (100:1 range)"
@ AV_PIX_FMT_RGB444BE
packed RGB 4:4:4, 16bpp, (msb)4X 4R 4G 4B(lsb), big-endian, X=unused/undefined
@ AV_PIX_FMT_XV36BE
packed XVYU 4:4:4, 48bpp, data in the high bits, zeros in the low bits, big-endian,...
@ 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.
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_RB32
@ AV_PIX_FMT_GBRP9BE
planar GBR 4:4:4 27bpp, big-endian
#define AV_PIX_FMT_FLAG_BITSTREAM
All values of a component are bit-wise packed end to end.
@ AVCHROMA_LOC_UNSPECIFIED
@ AV_PIX_FMT_YUV420P10BE
planar YUV 4:2:0, 15bpp, (1 Cr & Cb sample per 2x2 Y samples), big-endian
@ AV_PIX_FMT_RGBAF16BE
IEEE-754 half precision packed RGBA 16:16:16:16, 64bpp, RGBARGBA..., big-endian.
@ AV_PIX_FMT_NV16
interleaved chroma YUV 4:2:2, 16bpp, (1 Cr & Cb sample per 2x1 Y samples)
@ AV_PIX_FMT_BGR444BE
packed BGR 4:4:4, 16bpp, (msb)4X 4B 4G 4R(lsb), big-endian, X=unused/undefined
#define FF_COLOR_RGB
RGB color space.
@ AV_PIX_FMT_GBRP9LE
planar GBR 4:4:4 27bpp, little-endian
@ AV_PIX_FMT_YUVA444P
planar YUV 4:4:4 32bpp, (1 Cr & Cb sample per 1x1 Y & A samples)
@ 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
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 vf offset
enum AVPixelFormat av_pix_fmt_desc_get_id(const AVPixFmtDescriptor *desc)
@ AV_PIX_FMT_RGB0
packed RGB 8:8:8, 32bpp, RGBXRGBX... X=unused/undefined
@ AV_PIX_FMT_D3D11
Hardware surfaces for Direct3D11.
int av_strstart(const char *str, const char *pfx, const char **ptr)
Return non-zero if pfx is a prefix of str.
@ AV_PIX_FMT_P012BE
like NV12, with 12bpp per component, data in the high bits, zeros in the low bits,...
@ AV_PIX_FMT_P410LE
interleaved chroma YUV 4:4:4, 30bpp, data in the high bits, little-endian
@ AV_PIX_FMT_VAAPI
Hardware acceleration through VA-API, data[3] contains a VASurfaceID.
@ AV_PIX_FMT_YUVA420P10LE
planar YUV 4:2:0 25bpp, (1 Cr & Cb sample per 2x2 Y & A samples, little-endian)
@ AVCOL_SPC_CHROMA_DERIVED_NCL
Chromaticity-derived non-constant luminance system.
#define AV_PIX_FMT_FLAG_BAYER
The pixel format is following a Bayer pattern.
@ AVCOL_TRC_BT709
also ITU-R BT1361
AVChromaLocation
Location of chroma samples.
@ AV_PIX_FMT_AYUV
packed AYUV 4:4:4:4, 32bpp (1 Cr & Cb sample per 1x1 Y & A samples), AYUVAYUV...
@ 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_VDPAU
HW acceleration through VDPAU, Picture.data[3] contains a VdpVideoSurface.
@ AVCOL_SPC_SMPTE240M
derived from 170M primaries and D65 white point, 170M is derived from BT470 System M's primaries
@ AV_PIX_FMT_VIDEOTOOLBOX
hardware decoding through Videotoolbox
@ AV_PIX_FMT_UYVA
packed UYVA 4:4:4:4, 32bpp (1 Cr & Cb sample per 1x1 Y & A samples), UYVAUYVA...
@ 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)
@ AVCOL_SPC_BT2020_NCL
ITU-R BT2020 non-constant luminance system.
AVColorSpace
YUV colorspace type.
@ 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...
int av_color_primaries_from_name(const char *name)
@ AV_PIX_FMT_BAYER_GBRG8
bayer, GBGB..(odd line), RGRG..(even line), 8-bit samples
static const char *const color_primaries_names[AVCOL_PRI_NB]
@ AV_PIX_FMT_NV20LE
interleaved chroma YUV 4:2:2, 20bpp, (1 Cr & Cb sample per 2x1 Y samples), little-endian
#define AV_PIX_FMT_FLAG_BE
Pixel format is big-endian.
@ AV_PIX_FMT_YUVJ440P
planar YUV 4:4:0 full scale (JPEG), deprecated in favor of AV_PIX_FMT_YUV440P and setting color_range
@ AV_PIX_FMT_XYZ12BE
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...
@ AV_PIX_FMT_X2RGB10BE
packed RGB 10:10:10, 30bpp, (msb)2X 10R 10G 10B(lsb), big-endian, X=unused/undefined
@ AV_PIX_FMT_NV21
as above, but U and V bytes are swapped
static int get_pix_fmt_score(enum AVPixelFormat dst_pix_fmt, enum AVPixelFormat src_pix_fmt, unsigned *lossp, unsigned consider)
@ 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
#define FF_LOSS_COLORSPACE
loss due to color space conversion
#define FF_COLOR_YUV
YUV color space.
@ 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
@ AVCOL_RANGE_MPEG
Narrow or limited range content.
@ 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
@ AVCOL_PRI_BT470M
also FCC Title 47 Code of Federal Regulations 73.682 (a)(20)
@ AV_PIX_FMT_0BGR
packed BGR 8:8:8, 32bpp, XBGRXBGR... X=unused/undefined
@ 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_Y212LE
packed YUV 4:2:2 like YUYV422, 24bpp, data in the high bits, zeros in the low bits,...
static enum AVPixelFormat get_pix_fmt_internal(const char *name)
@ AV_PIX_FMT_BAYER_BGGR16BE
bayer, BGBG..(odd line), GRGR..(even line), 16-bit samples, big-endian
@ 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
static int get_pix_fmt_depth(int *min, int *max, enum AVPixelFormat pix_fmt)
@ AV_PIX_FMT_GRAYF32BE
IEEE-754 single precision Y, 32bpp, big-endian.
@ AV_PIX_FMT_RGBF16BE
IEEE-754 half precision packed RGB 16:16:16, 48bpp, RGBRGB..., 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
uint64_t_TMPL AV_WL64 unsigned int_TMPL AV_RL32
@ AV_PIX_FMT_YUV444P12BE
planar YUV 4:4:4,36bpp, (1 Cr & Cb sample per 1x1 Y samples), big-endian
enum AVPixelFormat av_get_pix_fmt(const char *name)
Return the pixel format corresponding to name.
static const int16_t steps[16]
@ AV_PIX_FMT_RGBAF32BE
IEEE-754 single precision packed RGBA 32:32:32:32, 128bpp, RGBARGBA..., big-endian.
@ AVCOL_TRC_ARIB_STD_B67
ARIB STD-B67, known as "Hybrid log-gamma".
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.
@ AV_PIX_FMT_Y210BE
packed YUV 4:2:2 like YUYV422, 20bpp, data in the high bits, big-endian
#define AV_PIX_FMT_FLAG_XYZ
The pixel format contains XYZ-like data (as opposed to YUV/RGB/grayscale).
@ AVCHROMA_LOC_CENTER
MPEG-1 4:2:0, JPEG 4:2:0, H.263 4:2:0.
@ AVCOL_SPC_FCC
FCC Title 47 Code of Federal Regulations 73.682 (a)(20)
@ AV_PIX_FMT_XV48LE
packed XVYU 4:4:4, 64bpp, little-endian, variant of Y416 where alpha channel is left undefined
@ AV_PIX_FMT_YUV444P9LE
planar YUV 4:4:4, 27bpp, (1 Cr & Cb sample per 1x1 Y samples), little-endian
int av_match_name(const char *name, const char *names)
Match instances of a name in a comma-separated list of names.
AVComponentDescriptor comp[4]
Parameters that describe how pixels are packed.
#define AV_PIX_FMT_FLAG_PLANAR
At least one pixel component is not in the first data plane.
@ AV_PIX_FMT_P216LE
interleaved chroma YUV 4:2:2, 32bpp, little-endian
@ AV_PIX_FMT_RGBF32LE
IEEE-754 single precision packed RGB 32:32:32, 96bpp, RGBRGB..., little-endian.
@ AV_PIX_FMT_V30XBE
packed VYUX 4:4:4 like XV30, 32bpp, (msb)10V 10Y 10U 2X(lsb), big-endian
@ AVCOL_TRC_SMPTE170M
also ITU-R BT601-6 525 or 625 / ITU-R BT1358 525 or 625 / ITU-R BT1700 NTSC
@ AV_PIX_FMT_YUVA420P10BE
planar YUV 4:2:0 25bpp, (1 Cr & Cb sample per 2x2 Y & A samples, big-endian)
@ AV_PIX_FMT_YUV444P
planar YUV 4:4:4, 24bpp, (1 Cr & Cb sample per 1x1 Y samples)
@ 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
@ 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_P212BE
interleaved chroma YUV 4:2:2, 24bpp, data in the high bits, big-endian
@ AV_PIX_FMT_RGBAF32LE
IEEE-754 single precision packed RGBA 32:32:32:32, 128bpp, RGBARGBA..., little-endian.
#define FF_LOSS_COLORQUANT
loss due to color quantization
@ 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_V30XLE
packed VYUX 4:4:4 like XV30, 32bpp, (msb)10V 10Y 10U 2X(lsb), little-endian
@ AV_PIX_FMT_YUV422P
planar YUV 4:2:2, 16bpp, (1 Cr & Cb sample per 2x1 Y samples)
@ AV_PIX_FMT_P010LE
like NV12, with 10bpp per component, data in the high bits, zeros in the low bits,...
@ AV_PIX_FMT_XV48BE
packed XVYU 4:4:4, 64bpp, big-endian, variant of Y416 where alpha channel is left undefined
@ AV_PIX_FMT_YUVA444P10LE
planar YUV 4:4:4 40bpp, (1 Cr & Cb sample per 1x1 Y & A samples, little-endian)
Descriptor that unambiguously describes how the bits of a pixel are stored in the up to 4 data planes...
@ AV_PIX_FMT_BGR555LE
packed BGR 5:5:5, 16bpp, (msb)1X 5B 5G 5R(lsb), little-endian, X=unused/undefined
@ AVCOL_PRI_SMPTE432
SMPTE ST 432-1 (2010) / P3 D65 / Display P3.
#define FF_LOSS_RESOLUTION
loss due to resolution change
@ AV_PIX_FMT_P216BE
interleaved chroma YUV 4:2:2, 32bpp, big-endian
@ AV_PIX_FMT_P412LE
interleaved chroma YUV 4:4:4, 36bpp, data in the high bits, little-endian
@ AV_PIX_FMT_GRAY14LE
Y , 14bpp, little-endian.
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)
@ AVCOL_SPC_SMPTE2085
SMPTE 2085, Y'D'zD'x.
@ AV_PIX_FMT_XV36LE
packed XVYU 4:4:4, 48bpp, data in the high bits, zeros in the low bits, little-endian,...
@ AV_PIX_FMT_YUV411P
planar YUV 4:1:1, 12bpp, (1 Cr & Cb sample per 4x1 Y samples)
@ 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_Y216BE
packed YUV 4:2:2 like YUYV422, 32bpp, big-endian
#define flags(name, subs,...)
@ AVCHROMA_LOC_NB
Not part of ABI.
@ AV_PIX_FMT_0RGB
packed RGB 8:8:8, 32bpp, XRGBXRGB... X=unused/undefined
@ AV_PIX_FMT_YUV410P
planar YUV 4:1:0, 9bpp, (1 Cr & Cb sample per 4x4 Y samples)
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.
@ AV_PIX_FMT_GBRAP10BE
planar GBR 4:4:4:4 40bpp, big-endian
@ AVCOL_TRC_SMPTE428
SMPTE ST 428-1.
@ AV_PIX_FMT_YUVA444P16LE
planar YUV 4:4:4 64bpp, (1 Cr & Cb sample per 1x1 Y & A samples, little-endian)
@ AV_PIX_FMT_VUYX
packed VUYX 4:4:4:4, 32bpp, Variant of VUYA where alpha channel is left undefined
@ AV_PIX_FMT_VYU444
packed VYU 4:4:4, 24bpp (1 Cr & Cb sample per 1x1 Y), VYUVYU...
void av_write_image_line2(const void *src, uint8_t *data[4], const int linesize[4], const AVPixFmtDescriptor *desc, int x, int y, int c, int w, int src_element_size)
Write the values from src to the pixel format component c of an image line.
@ AV_PIX_FMT_YUVA422P12BE
planar YUV 4:2:2,24bpp, (1 Cr & Cb sample per 2x1 Y samples), 12b alpha, big-endian
@ AVCOL_SPC_BT709
also ITU-R BT1361 / IEC 61966-2-4 xvYCC709 / derived in SMPTE RP 177 Annex B
AVColorRange
Visual content value range.
#define AV_PIX_FMT_FLAG_PAL
Pixel format has a palette in data[1], values are indexes in this palette.
@ AV_PIX_FMT_BGR444LE
packed BGR 4:4:4, 16bpp, (msb)4X 4B 4G 4R(lsb), little-endian, X=unused/undefined
@ AVCOL_SPC_ICTCP
ITU-R BT.2100-0, ICtCp.
@ 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
const char * av_color_transfer_name(enum AVColorTransferCharacteristic transfer)
@ AVCHROMA_LOC_BOTTOMLEFT
static void BS_FUNC() skip(BSCTX *bc, unsigned int n)
Skip n bits in the buffer.
@ AV_PIX_FMT_BAYER_GRBG8
bayer, GRGR..(odd line), BGBG..(even line), 8-bit samples
uint8_t log2_chroma_h
Amount to shift the luma height right to find the chroma height.
@ AV_PIX_FMT_GBRAP14LE
planar GBR 4:4:4:4 56bpp, little-endian
@ AV_PIX_FMT_YUVA422P
planar YUV 4:2:2 24bpp, (1 Cr & Cb sample per 2x1 Y & A samples)
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.
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_UYYVYY411
packed YUV 4:1:1, 12bpp, Cb Y0 Y1 Cr Y2 Y3
@ 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