|
int | av_get_bits_per_pixel (const AVPixFmtDescriptor *pixdesc) |
| Return the number of bits per pixel used by the pixel format described by pixdesc. More...
|
|
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. More...
|
|
const AVPixFmtDescriptor * | av_pix_fmt_desc_get (enum AVPixelFormat pix_fmt) |
|
const AVPixFmtDescriptor * | av_pix_fmt_desc_next (const AVPixFmtDescriptor *prev) |
| Iterate over all pixel format descriptors known to libavutil. More...
|
|
enum AVPixelFormat | av_pix_fmt_desc_get_id (const AVPixFmtDescriptor *desc) |
|
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. More...
|
|
int | av_pix_fmt_count_planes (enum AVPixelFormat pix_fmt) |
|
const char * | av_color_range_name (enum AVColorRange range) |
|
int | av_color_range_from_name (const char *name) |
|
const char * | av_color_primaries_name (enum AVColorPrimaries primaries) |
|
int | av_color_primaries_from_name (const char *name) |
|
const char * | av_color_transfer_name (enum AVColorTransferCharacteristic transfer) |
|
int | av_color_transfer_from_name (const char *name) |
|
const char * | av_color_space_name (enum AVColorSpace space) |
|
int | av_color_space_from_name (const char *name) |
|
const char * | av_chroma_location_name (enum AVChromaLocation location) |
|
int | av_chroma_location_from_name (const char *name) |
|
enum AVPixelFormat | av_get_pix_fmt (const char *name) |
| Return the pixel format corresponding to name. More...
|
|
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. More...
|
|
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 is negative. More...
|
|
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. More...
|
|
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. More...
|
|
enum AVPixelFormat | av_pix_fmt_swap_endianness (enum AVPixelFormat pix_fmt) |
| Utility function to swap the endianness of a pixel format. More...
|
|
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. More...
|
|
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. More...
|
|
#define AV_PIX_FMT_FLAG_PSEUDOPAL (1 << 6) |
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
- Deprecated:
- This flag is deprecated, and will be removed. When it is removed, the extra palette allocation in AVFrame.data[1] is removed as well. Only actual paletted formats (as indicated by AV_PIX_FMT_FLAG_PAL) will have a palette. Starting with FFmpeg versions which have this flag deprecated, the extra "pseudo" palette is already ignored, and API users are not required to allocate a palette for AV_PIX_FMT_FLAG_PSEUDOPAL formats (it was required before the deprecation, though).
Definition at line 166 of file pixdesc.h.
#define AV_PIX_FMT_FLAG_ALPHA (1 << 7) |
The pixel format has an alpha channel.
This is set on all formats that support alpha in some way. The exception is AV_PIX_FMT_PAL8, which can carry alpha as part of the palette. Details are explained in the AVPixelFormat enum, and are also encoded in the corresponding AVPixFmtDescriptor.
The alpha is always straight, never pre-multiplied.
If a codec or a filter does not support alpha, it should set all alpha to opaque, or use the equivalent pixel formats without alpha component, e.g. AV_PIX_FMT_RGB0 (or AV_PIX_FMT_RGB24 etc.) instead of AV_PIX_FMT_RGBA.
Definition at line 181 of file pixdesc.h.
#define AV_PIX_FMT_FLAG_FLOAT (1 << 9) |
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).
Definition at line 192 of file pixdesc.h.
Return the pixel format corresponding to name.
If there is no pixel format with name name, then looks for a pixel format with the name corresponding to the native endian format of name. For example in a little-endian system, first looks for "gray16", then for "gray16le".
Finally if no pixel format has been found, returns AV_PIX_FMT_NONE.
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.
- Parameters
-
[in] | dst_pix_fmt | destination pixel format |
[in] | src_pix_fmt | source pixel format |
[in] | has_alpha | Whether the source pixel format alpha channel is used. |
- Returns
- Combination of flags informing you what kind of losses will occur (maximum loss for an invalid dst_pix_fmt).
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.
- Parameters
-
[in] | dst_pix_fmt | destination pixel format |
[in] | src_pix_fmt | source pixel format |
[in] | has_alpha | Whether the source pixel format alpha channel is used. |
- Returns
- Combination of flags informing you what kind of losses will occur (maximum loss for an invalid dst_pix_fmt).