67 for(i = 1; i <=
align; i += i) {
77 for (i = 0; i < 4 && pool->
linesize[i]; i++) {
82 for (i = 0; i < 4 && pool->
linesize[i]; i++) {
116 *width = pool->
width;
119 *align = pool->
align;
145 for (i = 0; i < 4; i++) {
151 if (!frame->
buf[i]) {
184 for (i = 0; i < 4; i++) {
#define AV_PIX_FMT_FLAG_PAL
Pixel format has a palette in data[1], values are indexes in this palette.
const AVPixFmtDescriptor * av_pix_fmt_desc_get(enum AVPixelFormat pix_fmt)
This structure describes decoded (raw) audio or video data.
void ff_video_frame_pool_uninit(FFVideoFramePool **pool)
Deallocate the video frame pool.
memory handling functions
AVBufferRef * buf[AV_NUM_DATA_POINTERS]
AVBuffer references backing the data for this frame.
FFVideoFramePool * ff_video_frame_pool_init(AVBufferRef *(*alloc)(int size), int width, int height, enum AVPixelFormat format, int align)
Allocate and initialize a video frame pool.
#define av_assert0(cond)
assert() equivalent, that is always enabled.
AVFrame * av_frame_alloc(void)
Allocate an AVFrame and set its fields to default values.
8 bits with AV_PIX_FMT_RGB32 palette
int avpriv_set_systematic_pal2(uint32_t pal[256], enum AVPixelFormat pix_fmt)
int ff_video_frame_pool_get_config(FFVideoFramePool *pool, int *width, int *height, enum AVPixelFormat *format, int *align)
Get the video frame pool configuration.
int width
width and height of the video frame
uint8_t log2_chroma_h
Amount to shift the luma height right to find the chroma height.
AVFrame * ff_video_frame_pool_get(FFVideoFramePool *pool)
Allocate a new AVFrame, reussing old buffers from the pool when available.
void av_frame_free(AVFrame **frame)
Free the frame and any dynamically allocated objects in it, e.g.
simple assert() macros that are a bit more flexible than ISO C assert().
reference-counted frame API
uint64_t flags
Combination of AV_PIX_FMT_FLAG_...
int av_image_check_size(unsigned int w, unsigned int h, int log_offset, void *log_ctx)
Check if the given dimension of an image is valid, meaning that all bytes of the image can be address...
#define AV_PIX_FMT_FLAG_PSEUDOPAL
The pixel format is "pseudo-paletted".
int format
format of the frame, -1 if unknown or unset Values correspond to enum AVPixelFormat for video frames...
const AVS_VideoInfo int align
packed RGB 3:3:2, 8bpp, (msb)2B 3G 3R(lsb)
int linesize[AV_NUM_DATA_POINTERS]
For video, size in bytes of each picture line.
Descriptor that unambiguously describes how the bits of a pixel are stored in the up to 4 data planes...
uint8_t * data
The data buffer.
static const char * format
int av_image_fill_linesizes(int linesizes[4], enum AVPixelFormat pix_fmt, int width)
Fill plane linesizes for an image with pixel format pix_fmt and width width.
void av_buffer_pool_uninit(AVBufferPool **ppool)
Mark the pool as being available for freeing.
refcounted data buffer API
uint8_t * data[AV_NUM_DATA_POINTERS]
pointer to the picture/channel planes.
A reference to a data buffer.
AVBufferPool * av_buffer_pool_init(int size, AVBufferRef *(*alloc)(int size))
Allocate and initialize a buffer pool.
AVBufferRef * av_buffer_pool_get(AVBufferPool *pool)
Allocate a new AVBuffer, reusing an old buffer from the pool when available.
uint8_t ** extended_data
pointers to the data planes/channels.
AVPixelFormat
Pixel format.
void * av_mallocz(size_t size)
Allocate a block of size bytes with alignment suitable for all memory accesses (including vectors if ...
#define AV_CEIL_RSHIFT(a, b)