FFmpeg 5.1.4
Data Fields
AVPixFmtDescriptor Struct Reference

Descriptor that unambiguously describes how the bits of a pixel are stored in the up to 4 data planes of an image. More...

#include <libavutil/pixdesc.h>

Data Fields

const char * name
 
uint8_t nb_components
 The number of components each pixel has, (1-4) More...
 
uint8_t log2_chroma_w
 Amount to shift the luma width right to find the chroma width. More...
 
uint8_t log2_chroma_h
 Amount to shift the luma height right to find the chroma height. More...
 
uint64_t flags
 Combination of AV_PIX_FMT_FLAG_... flags. More...
 
AVComponentDescriptor comp [4]
 Parameters that describe how pixels are packed. More...
 
const char * alias
 Alternative comma-separated names. More...
 

Detailed Description

Descriptor that unambiguously describes how the bits of a pixel are stored in the up to 4 data planes of an image.

It also stores the subsampling factors and number of components.

Note
This is separate of the colorspace (RGB, YCbCr, YPbPr, JPEG-style YUV and all the YUV variants) AVPixFmtDescriptor just stores how values are stored not what these values represent.

Definition at line 69 of file pixdesc.h.

Field Documentation

◆ name

const char* AVPixFmtDescriptor::name

Definition at line 70 of file pixdesc.h.

◆ nb_components

uint8_t AVPixFmtDescriptor::nb_components

The number of components each pixel has, (1-4)

Definition at line 71 of file pixdesc.h.

◆ log2_chroma_w

uint8_t AVPixFmtDescriptor::log2_chroma_w

Amount to shift the luma width right to find the chroma width.

For YV12 this is 1 for example. chroma_width = AV_CEIL_RSHIFT(luma_width, log2_chroma_w) The note above is needed to ensure rounding up. This value only refers to the chroma components.

Definition at line 80 of file pixdesc.h.

◆ log2_chroma_h

uint8_t AVPixFmtDescriptor::log2_chroma_h

Amount to shift the luma height right to find the chroma height.

For YV12 this is 1 for example. chroma_height= AV_CEIL_RSHIFT(luma_height, log2_chroma_h) The note above is needed to ensure rounding up. This value only refers to the chroma components.

Definition at line 89 of file pixdesc.h.

◆ flags

uint64_t AVPixFmtDescriptor::flags

Combination of AV_PIX_FMT_FLAG_... flags.

Definition at line 94 of file pixdesc.h.

◆ comp

AVComponentDescriptor AVPixFmtDescriptor::comp[4]

Parameters that describe how pixels are packed.

If the format has 1 or 2 components, then luma is 0. If the format has 3 or 4 components: if the RGB flag is set then 0 is red, 1 is green and 2 is blue; otherwise 0 is luma, 1 is chroma-U and 2 is chroma-V.

If present, the Alpha channel is always the last component.

Definition at line 105 of file pixdesc.h.

◆ alias

const char* AVPixFmtDescriptor::alias

Alternative comma-separated names.

Definition at line 110 of file pixdesc.h.


The documentation for this struct was generated from the following file: