22 #ifndef AVUTIL_PIXDESC_H
23 #define AVUTIL_PIXDESC_H
88 #define PIX_FMT_BITSTREAM 4
89 #define PIX_FMT_HWACCEL 8
90 #define PIX_FMT_PLANAR 16
91 #define PIX_FMT_RGB 32
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...
uint8_t log2_chroma_w
Amount to shift the luma width right to find the chroma width.
uint16_t shift
number of least significant bits that must be shifted away to get the value
int av_get_bits_per_pixel(const AVPixFmtDescriptor *pixdesc)
Return the number of bits per pixel used by the pixel format described by pixdesc.
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.
AVComponentDescriptor comp[4]
Parameters that describe how pixels are packed.
char * av_get_pix_fmt_string(char *buf, int buf_size, enum PixelFormat pix_fmt)
Print in buf the string corresponding to the pixel format with number pix_fmt, or an header if pix_fm...
uint16_t depth_minus1
number of bits in the component minus 1
uint8_t log2_chroma_h
Amount to shift the luma height right to find the chroma height.
const char * av_get_pix_fmt_name(enum PixelFormat pix_fmt)
Return the short name for a pixel format, NULL in case pix_fmt is unknown.
struct AVComponentDescriptor AVComponentDescriptor
uint8_t nb_components
The number of components each pixel has, (1-4)
Descriptor that unambiguously describes how the bits of a pixel are stored in the up to 4 data planes...
enum PixelFormat av_get_pix_fmt(const char *name)
Return the pixel format corresponding to name.
struct AVPixFmtDescriptor AVPixFmtDescriptor
Descriptor that unambiguously describes how the bits of a pixel are stored in the up to 4 data planes...
const AVPixFmtDescriptor av_pix_fmt_descriptors[]
The array of all the pixel format descriptors.
uint16_t step_minus1
Number of elements between 2 horizontally consecutive pixels minus 1.
uint16_t plane
which of the 4 planes contains the component
uint16_t offset_plus1
Number of elements before the component of the first pixel plus 1.