56 ptrdiff_t linesizes[4];
57 for (
int i = 0;
i < 4;
i++)
71 CONFIG_MEMORY_POISONING
99 .nb_samples = nb_samples,
116 if (!pool->
pools[0]) {
146 for (
int i = 0;
i < 4;
i++) {
178 sizeof(*
frame->extended_data));
181 sizeof(*
frame->extended_buf));
182 if (!
frame->extended_data || !
frame->extended_buf)
196 for (
int i = 0;
i <
frame->nb_extended_buf;
i++) {
198 if (!
frame->extended_buf[
i])
217 for (
int i = 0;
i < 4;
i++)
220 memset(pool, 0,
sizeof(*pool));
static const char *const format[]
simple assert() macros that are a bit more flexible than ISO C assert().
#define av_unreachable(msg)
Asserts that are used as compiler optimization hints depending upon ASSERT_LEVEL and NBDEBUG.
#define av_assert0(cond)
assert() equivalent, that is always enabled.
Convenience header that includes libavutil's core.
static const uint8_t *BS_FUNC align(BSCTX *bc)
Skip bits to a byte boundary.
refcounted data buffer API
#define i(width, name, range_min, range_max)
reference-counted frame API
#define AV_NUM_DATA_POINTERS
AVBufferRef * av_buffer_allocz(size_t size)
Same as av_buffer_alloc(), except the returned buffer will be initialized to zero.
void av_buffer_pool_uninit(AVBufferPool **ppool)
Mark the pool as being available for freeing.
AVBufferPool * av_buffer_pool_init(size_t size, AVBufferRef *(*alloc)(size_t 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.
void av_frame_free(AVFrame **frame)
Free the frame and any dynamically allocated objects in it, e.g.
AVFrame * av_frame_alloc(void)
Allocate an AVFrame and set its fields to default values.
int av_image_fill_plane_sizes(size_t sizes[4], enum AVPixelFormat pix_fmt, int height, const ptrdiff_t linesizes[4])
Fill plane sizes for an image with pixel format pix_fmt and height height.
int av_image_check_size2(unsigned int w, unsigned int h, int64_t max_pixels, enum AVPixelFormat pix_fmt, int log_offset, void *log_ctx)
Check if the given dimension of an image is valid, meaning that all bytes of a plane of an image with...
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.
int av_sample_fmt_is_planar(enum AVSampleFormat sample_fmt)
Check if the sample format is planar.
int av_samples_get_buffer_size(int *linesize, int nb_channels, int nb_samples, enum AVSampleFormat sample_fmt, int align)
Get the required buffer size for the given audio parameters.
AVSampleFormat
Audio sample formats.
static const int sizes[][2]
int avpriv_set_systematic_pal2(uint32_t pal[256], enum AVPixelFormat pix_fmt)
static av_cold int frame_pool_video_init(int width, int height, enum AVPixelFormat format, int align, FFFramePool *pool)
AVFrame * ff_frame_pool_get(FFFramePool *pool)
Allocate a new AVFrame, reusing old buffers from the pool when available.
av_cold void ff_frame_pool_uninit(FFFramePool *pool)
Deallocate the frame pool.
int ff_frame_pool_audio_reinit(FFFramePool *pool, int channels, int nb_samples, enum AVSampleFormat format, int align)
Recreate the audio frame pool if its current configuration differs from the provided configuration.
static av_cold int frame_pool_audio_init(int channels, int nb_samples, enum AVSampleFormat format, int align, FFFramePool *pool)
int ff_frame_pool_video_reinit(FFFramePool *pool, int width, int height, enum AVPixelFormat format, int align)
Recreate the video frame pool if its current configuration differs from the provided configuration.
void * av_calloc(size_t nmemb, size_t size)
Memory handling functions.
const AVPixFmtDescriptor * av_pix_fmt_desc_get(enum AVPixelFormat pix_fmt)
#define AV_PIX_FMT_FLAG_PAL
Pixel format has a palette in data[1], values are indexes in this palette.
AVPixelFormat
Pixel format.
@ AV_PIX_FMT_BGR8
packed RGB 3:3:2, 8bpp, (msb)2B 3G 3R(lsb)
@ AV_PIX_FMT_PAL8
8 bits with AV_PIX_FMT_RGB32 palette
This structure describes decoded (raw) audio or video data.
Descriptor that unambiguously describes how the bits of a pixel are stored in the up to 4 data planes...
enum AVPixelFormat pix_fmt
enum AVSampleFormat sample_fmt