ffmpeg.libavutil.pixdesc

Undocumented in source.

Members

Functions

av_chroma_location_from_name
int av_chroma_location_from_name(const(char)* name)

@return the AVChromaLocation value for name or an AVError if not found.

av_chroma_location_name
const(char)* av_chroma_location_name(AVChromaLocation location)

@return the name for provided chroma location or NULL if unknown.

av_color_primaries_from_name
int av_color_primaries_from_name(const(char)* name)

@return the AVColorPrimaries value for name or an AVError if not found.

av_color_primaries_name
const(char)* av_color_primaries_name(AVColorPrimaries primaries)

@return the name for provided color primaries or NULL if unknown.

av_color_range_from_name
int av_color_range_from_name(const(char)* name)

@return the AVColorRange value for name or an AVError if not found.

av_color_range_name
const(char)* av_color_range_name(AVColorRange range)

@return the name for provided color range or NULL if unknown.

av_color_space_from_name
int av_color_space_from_name(const(char)* name)

@return the AVColorSpace value for name or an AVError if not found.

av_color_space_name
const(char)* av_color_space_name(AVColorSpace space)

@return the name for provided color space or NULL if unknown.

av_color_transfer_from_name
int av_color_transfer_from_name(const(char)* name)

@return the AVColorTransferCharacteristic value for name or an AVError if not found.

av_color_transfer_name
const(char)* av_color_transfer_name(AVColorTransferCharacteristic transfer)

@return the name for provided color transfer or NULL if unknown.

av_find_best_pix_fmt_of_2
AVPixelFormat av_find_best_pix_fmt_of_2(AVPixelFormat dst_pix_fmt1, AVPixelFormat dst_pix_fmt2, 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. When converting from one pixel format to another, information loss may occur. For example, when converting from RGB24 to GRAY, the color information will be lost. Similarly, other losses occur when converting from some formats to other formats. These losses can involve loss of chroma, but also loss of resolution, loss of color depth, loss due to the color space conversion, loss of the alpha bits or loss due to color quantization. av_get_fix_fmt_loss() informs you about the various types of losses which will occur when converting from one pixel format to another.

av_get_bits_per_pixel
int av_get_bits_per_pixel(const(AVPixFmtDescriptor)* pixdesc)

Return the number of bits per pixel used by the pixel format described by pixdesc. Note that this is not the same as the number of bits per sample.

av_get_padded_bits_per_pixel
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 or unused bits.

av_get_pix_fmt
AVPixelFormat av_get_pix_fmt(const(char)* name)

Return the pixel format corresponding to name.

av_get_pix_fmt_loss
int av_get_pix_fmt_loss(AVPixelFormat dst_pix_fmt, AVPixelFormat src_pix_fmt, int has_alpha)

Compute what kind of losses will occur when converting from one specific pixel format to another. When converting from one pixel format to another, information loss may occur. For example, when converting from RGB24 to GRAY, the color information will be lost. Similarly, other losses occur when converting from some formats to other formats. These losses can involve loss of chroma, but also loss of resolution, loss of color depth, loss due to the color space conversion, loss of the alpha bits or loss due to color quantization. av_get_fix_fmt_loss() informs you about the various types of losses which will occur when converting from one pixel format to another.

av_get_pix_fmt_name
const(char)* av_get_pix_fmt_name(AVPixelFormat pix_fmt)

Return the short name for a pixel format, NULL in case pix_fmt is unknown.

av_get_pix_fmt_string
char* av_get_pix_fmt_string(char* buf, int buf_size, AVPixelFormat pix_fmt)

Print in buf the string corresponding to the pixel format with number pix_fmt, or a header if pix_fmt is negative.

av_pix_fmt_count_planes
int av_pix_fmt_count_planes(AVPixelFormat pix_fmt)

@return number of planes in pix_fmt, a negative AVERROR if pix_fmt is not a valid pixel format.

av_pix_fmt_desc_get
const(AVPixFmtDescriptor)* av_pix_fmt_desc_get(AVPixelFormat pix_fmt)

@return a pixel format descriptor for provided pixel format or NULL if this pixel format is unknown.

av_pix_fmt_desc_get_id
AVPixelFormat av_pix_fmt_desc_get_id(const(AVPixFmtDescriptor)* desc)

@return an AVPixelFormat id described by desc, or AV_PIX_FMT_NONE if desc is not a valid pointer to a pixel format descriptor.

av_pix_fmt_desc_next
const(AVPixFmtDescriptor)* av_pix_fmt_desc_next(const(AVPixFmtDescriptor)* prev)

Iterate over all pixel format descriptors known to libavutil.

av_pix_fmt_get_chroma_sub_sample
int av_pix_fmt_get_chroma_sub_sample(AVPixelFormat pix_fmt, int* h_shift, int* v_shift)

Utility function to access log2_chroma_w log2_chroma_h from the pixel format AVPixFmtDescriptor.

av_pix_fmt_swap_endianness
AVPixelFormat av_pix_fmt_swap_endianness(AVPixelFormat pix_fmt)

Utility function to swap the endianness of a pixel format.

av_read_image_line
void av_read_image_line(ushort* dst, const(ubyte)*[4] data, const(int)[4] linesize, const(AVPixFmtDescriptor)* desc, int x, int y, int c, int w, int read_pal_component)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
av_read_image_line2
void av_read_image_line2(void* dst, const(ubyte)*[4] data, const(int)[4] linesize, 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_write_image_line
void av_write_image_line(const(ushort)* src, ubyte*[4] data, const(int)[4] linesize, const(AVPixFmtDescriptor)* desc, int x, int y, int c, int w)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
av_write_image_line2
void av_write_image_line2(const(void)* src, ubyte*[4] data, const(int)[4] linesize, 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.

Manifest constants

AV_PIX_FMT_FLAG_ALPHA
enum AV_PIX_FMT_FLAG_ALPHA;

The pixel format has an alpha channel. This is set on all formats that support alpha in some way, including AV_PIX_FMT_PAL8. The alpha is always straight, never pre-multiplied.

AV_PIX_FMT_FLAG_BAYER
enum AV_PIX_FMT_FLAG_BAYER;

The pixel format is following a Bayer pattern

AV_PIX_FMT_FLAG_BE
enum AV_PIX_FMT_FLAG_BE;

Pixel format is big-endian.

AV_PIX_FMT_FLAG_BITSTREAM
enum AV_PIX_FMT_FLAG_BITSTREAM;

All values of a component are bit-wise packed end to end.

AV_PIX_FMT_FLAG_FLOAT
enum AV_PIX_FMT_FLAG_FLOAT;

The pixel format contains IEEE-754 floating point values. Precision (double, single, or half) should be determined by the pixel size (64, 32, or 16 bits).

AV_PIX_FMT_FLAG_HWACCEL
enum AV_PIX_FMT_FLAG_HWACCEL;

Pixel format is an HW accelerated format.

AV_PIX_FMT_FLAG_PAL
enum AV_PIX_FMT_FLAG_PAL;

Pixel format has a palette in data[1], values are indexes in this palette.

AV_PIX_FMT_FLAG_PLANAR
enum AV_PIX_FMT_FLAG_PLANAR;

At least one pixel component is not in the first data plane.

AV_PIX_FMT_FLAG_PSEUDOPAL
enum AV_PIX_FMT_FLAG_PSEUDOPAL;

The pixel format is "pseudo-paletted". This means that it contains a fixed palette in the 2nd plane but the palette is fixed/constant for each PIX_FMT. This allows interpreting the data as if it was PAL8, which can in some cases be simpler. Or the data can be interpreted purely based on the pixel format without using the palette. An example of a pseudo-paletted format is AV_PIX_FMT_GRAY8

AV_PIX_FMT_FLAG_RGB
enum AV_PIX_FMT_FLAG_RGB;

The pixel format contains RGB-like data (as opposed to YUV/grayscale).

FF_LOSS_ALPHA
enum FF_LOSS_ALPHA;

< loss of alpha bits

FF_LOSS_CHROMA
enum FF_LOSS_CHROMA;

< loss of chroma (e.g. RGB to gray conversion)

FF_LOSS_COLORQUANT
enum FF_LOSS_COLORQUANT;

< loss due to color quantization

FF_LOSS_COLORSPACE
enum FF_LOSS_COLORSPACE;

< loss due to color space conversion

FF_LOSS_DEPTH
enum FF_LOSS_DEPTH;

< loss due to color depth change

FF_LOSS_RESOLUTION
enum FF_LOSS_RESOLUTION;

< loss due to resolution change

Structs

AVComponentDescriptor
struct AVComponentDescriptor
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
AVPixFmtDescriptor
struct AVPixFmtDescriptor

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.

Meta