FFmpeg
Loading...
Searching...
No Matches
framepool.c
Go to the documentation of this file.
1/*
2 * This file is part of FFmpeg.
3 *
4 * Copyright (c) 2015 Matthieu Bouron <matthieu.bouron stupeflix.com>
5 *
6 * FFmpeg is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
10 *
11 * FFmpeg is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
15 *
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with FFmpeg; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19 */
20
21#include "framepool.h"
22#include "libavutil/avassert.h"
23#include "libavutil/avutil.h"
24#include "libavutil/buffer.h"
25#include "libavutil/frame.h"
26#include "libavutil/imgutils.h"
28#include "libavutil/mem.h"
29#include "libavutil/pixfmt.h"
30
33 int align, FFFramePool *pool)
34{
35 int ret;
36
37 *pool = (FFFramePool) {
38 .type = AVMEDIA_TYPE_VIDEO,
39 .width = width,
40 .height = height,
41 .pix_fmt = format,
42 .align = align,
43 };
44
45 if ((ret = av_image_check_size2(width, height, INT64_MAX, format, 0, NULL)) < 0)
46 goto fail;
47
48 ret = av_image_fill_linesizes(pool->linesize, pool->pix_fmt,
49 FFALIGN(pool->width, align));
50 if (ret < 0)
51 goto fail;
52
53 for (int i = 0; i < 4 && pool->linesize[i]; i++)
54 pool->linesize[i] = FFALIGN(pool->linesize[i], pool->align);
55
56 ptrdiff_t linesizes[4];
57 for (int i = 0; i < 4; i++)
58 linesizes[i] = pool->linesize[i];
59
60 size_t sizes[4];
62 FFALIGN(pool->height, align),
63 linesizes);
64 if (ret < 0)
65 goto fail;
66
67 for (int i = 0; i < 4 && sizes[i]; i++) {
68 if (sizes[i] > SIZE_MAX - align)
69 goto fail;
71 CONFIG_MEMORY_POISONING
72 ? NULL
74 if (!pool->pools[i]) {
75 ret = AVERROR(ENOMEM);
76 goto fail;
77 }
78 }
79
80 return 0;
81
82fail:
84 return ret;
85}
86
87static av_cold int frame_pool_audio_init(int channels, int nb_samples,
89 int align, FFFramePool *pool)
90{
91 int ret;
92
94
95 *pool = (FFFramePool) {
96 .type = AVMEDIA_TYPE_AUDIO,
97 .planes = planar ? channels : 1,
98 .channels = channels,
99 .nb_samples = nb_samples,
100 .sample_fmt = format,
101 .align = align,
102 };
103
105 nb_samples, format, 0);
106 if (ret < 0)
107 goto fail;
108
109 if (pool->linesize[0] > SIZE_MAX - align) {
110 ret = AVERROR(EINVAL);
111 goto fail;
112 }
113
114 pool->pools[0] = av_buffer_pool_init(pool->linesize[0] + align,
116 if (!pool->pools[0]) {
117 ret = AVERROR(ENOMEM);
118 goto fail;
119 }
120
121 return 0;
122
123fail:
125 return ret;
126}
127
129{
131
133 if (!frame)
134 return NULL;
135
136 switch(pool->type) {
139 if (!desc)
140 goto fail;
141
142 frame->width = pool->width;
143 frame->height = pool->height;
144 frame->format = pool->pix_fmt;
145
146 for (int i = 0; i < 4; i++) {
147 frame->linesize[i] = pool->linesize[i];
148 if (!pool->pools[i])
149 break;
150
151 frame->buf[i] = av_buffer_pool_get(pool->pools[i]);
152 if (!frame->buf[i])
153 goto fail;
154
155 frame->data[i] = (uint8_t *)FFALIGN((uintptr_t)frame->buf[i]->data, pool->align);
156 }
157
158 if (desc->flags & AV_PIX_FMT_FLAG_PAL) {
159 enum AVPixelFormat format = pool->pix_fmt;
160 if (format == AV_PIX_FMT_PAL8)
162
163 av_assert0(frame->data[1] != NULL);
164 if (avpriv_set_systematic_pal2((uint32_t *)frame->data[1], format) < 0)
165 goto fail;
166 }
167
168 frame->extended_data = frame->data;
169 break;
171 frame->nb_samples = pool->nb_samples;
172 frame->ch_layout.nb_channels = pool->channels;
173 frame->format = pool->sample_fmt;
174 frame->linesize[0] = pool->linesize[0];
175
176 if (pool->planes > AV_NUM_DATA_POINTERS) {
177 frame->extended_data = av_calloc(pool->planes,
178 sizeof(*frame->extended_data));
179 frame->nb_extended_buf = pool->planes - AV_NUM_DATA_POINTERS;
180 frame->extended_buf = av_calloc(frame->nb_extended_buf,
181 sizeof(*frame->extended_buf));
182 if (!frame->extended_data || !frame->extended_buf)
183 goto fail;
184 } else {
185 frame->extended_data = frame->data;
186 av_assert0(frame->nb_extended_buf == 0);
187 }
188
189 for (int i = 0; i < FFMIN(pool->planes, AV_NUM_DATA_POINTERS); i++) {
190 frame->buf[i] = av_buffer_pool_get(pool->pools[0]);
191 if (!frame->buf[i])
192 goto fail;
193 frame->extended_data[i] = frame->data[i] =
194 (uint8_t *)FFALIGN((uintptr_t)frame->buf[i]->data, pool->align);
195 }
196 for (int i = 0; i < frame->nb_extended_buf; i++) {
197 frame->extended_buf[i] = av_buffer_pool_get(pool->pools[0]);
198 if (!frame->extended_buf[i])
199 goto fail;
200 frame->extended_data[i + AV_NUM_DATA_POINTERS] =
201 (uint8_t *)FFALIGN((uintptr_t)frame->extended_buf[i]->data, pool->align);
202 }
203
204 break;
205 default:
206 av_unreachable("only audio and video frame pools exist");
207 }
208
209 return frame;
210fail:
212 return NULL;
213}
214
216{
217 for (int i = 0; i < 4; i++)
219
220 memset(pool, 0, sizeof(*pool));
221}
222
224 int width,
225 int height,
227 int align)
228{
229 if (pool->type == AVMEDIA_TYPE_VIDEO &&
230 pool->pix_fmt == format &&
231 FFALIGN(pool->width, pool->align) == FFALIGN(width, align) &&
232 FFALIGN(pool->height, pool->align) == FFALIGN(height, align) &&
233 pool->align == align)
234 {
235 pool->width = width;
236 pool->height = height;
237 return 0;
238 }
239
242}
243
245 int channels,
246 int nb_samples,
248 int align)
249{
250 if (pool->type == AVMEDIA_TYPE_AUDIO &&
251 pool->sample_fmt == format &&
252 pool->channels == channels &&
253 pool->nb_samples == nb_samples &&
254 pool->align == align)
255 {
256 return 0;
257 }
258
260 return frame_pool_audio_init(channels, nb_samples, format, align, pool);
261}
static const char *const format[]
Definition af_aiir.c:445
channels
Definition aptx.h:31
uint8_t pi<< 24) CONV_FUNC(AV_SAMPLE_FMT_S64, int64_t, AV_SAMPLE_FMT_U8,(uint64_t)((*(const uint8_t *) pi - 0x80U))<< 56) CONV_FUNC(AV_SAMPLE_FMT_FLT, float, AV_SAMPLE_FMT_U8,(*(const uint8_t *) pi - 0x80) *(1.0f/(1<< 7))) CONV_FUNC(AV_SAMPLE_FMT_DBL, double, AV_SAMPLE_FMT_U8,(*(const uint8_t *) pi - 0x80) *(1.0/(1<< 7))) CONV_FUNC(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_S16,(*(const int16_t *) pi > >8)+0x80) CONV_FUNC(AV_SAMPLE_FMT_S32, int32_t, AV_SAMPLE_FMT_S16, *(const int16_t *) pi *(1<< 16)) CONV_FUNC(AV_SAMPLE_FMT_S64, int64_t, AV_SAMPLE_FMT_S16,(uint64_t)(*(const int16_t *) pi)<< 48) CONV_FUNC(AV_SAMPLE_FMT_FLT, float, AV_SAMPLE_FMT_S16, *(const int16_t *) pi *(1.0f/(1<< 15))) CONV_FUNC(AV_SAMPLE_FMT_DBL, double, AV_SAMPLE_FMT_S16, *(const int16_t *) pi *(1.0/(1<< 15))) CONV_FUNC(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_S32,(*(const int32_t *) pi > >24)+0x80) CONV_FUNC(AV_SAMPLE_FMT_S64, int64_t, AV_SAMPLE_FMT_S32,(uint64_t)(*(const int32_t *) pi)<< 32) CONV_FUNC(AV_SAMPLE_FMT_FLT, float, AV_SAMPLE_FMT_S32, *(const int32_t *) pi *(1.0f/(1U<< 31))) CONV_FUNC(AV_SAMPLE_FMT_DBL, double, AV_SAMPLE_FMT_S32, *(const int32_t *) pi *(1.0/(1U<< 31))) CONV_FUNC(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_S64,(*(const int64_t *) pi > >56)+0x80) CONV_FUNC(AV_SAMPLE_FMT_FLT, float, AV_SAMPLE_FMT_S64, *(const int64_t *) pi *(1.0f/(UINT64_C(1)<< 63))) CONV_FUNC(AV_SAMPLE_FMT_DBL, double, AV_SAMPLE_FMT_S64, *(const int64_t *) pi *(1.0/(UINT64_C(1)<< 63))) CONV_FUNC(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_FLT, av_clip_uint8(lrintf(*(const float *) pi *(1<< 7))+0x80)) CONV_FUNC(AV_SAMPLE_FMT_S16, int16_t, AV_SAMPLE_FMT_FLT, av_clip_int16(lrintf(*(const float *) pi *(1<< 15)))) CONV_FUNC(AV_SAMPLE_FMT_S32, int32_t, AV_SAMPLE_FMT_FLT, av_clipl_int32(llrintf(*(const float *) pi *(1U<< 31)))) CONV_FUNC(AV_SAMPLE_FMT_S64, int64_t, AV_SAMPLE_FMT_FLT, llrintf(*(const float *) pi *(UINT64_C(1)<< 63))) CONV_FUNC(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_DBL, av_clip_uint8(lrint(*(const double *) pi *(1<< 7))+0x80)) CONV_FUNC(AV_SAMPLE_FMT_S16, int16_t, AV_SAMPLE_FMT_DBL, av_clip_int16(lrint(*(const double *) pi *(1<< 15)))) CONV_FUNC(AV_SAMPLE_FMT_S32, int32_t, AV_SAMPLE_FMT_DBL, av_clipl_int32(llrint(*(const double *) pi *(1U<< 31)))) CONV_FUNC(AV_SAMPLE_FMT_S64, int64_t, AV_SAMPLE_FMT_DBL, llrint(*(const double *) pi *(UINT64_C(1)<< 63))) #define FMT_PAIR_FUNC(out, in) static conv_func_type *const fmt_pair_to_conv_functions[AV_SAMPLE_FMT_NB *AV_SAMPLE_FMT_NB]={ FMT_PAIR_FUNC(AV_SAMPLE_FMT_U8, AV_SAMPLE_FMT_U8), FMT_PAIR_FUNC(AV_SAMPLE_FMT_S16, AV_SAMPLE_FMT_U8), FMT_PAIR_FUNC(AV_SAMPLE_FMT_S32, AV_SAMPLE_FMT_U8), FMT_PAIR_FUNC(AV_SAMPLE_FMT_FLT, AV_SAMPLE_FMT_U8), FMT_PAIR_FUNC(AV_SAMPLE_FMT_DBL, AV_SAMPLE_FMT_U8), FMT_PAIR_FUNC(AV_SAMPLE_FMT_S64, AV_SAMPLE_FMT_U8), FMT_PAIR_FUNC(AV_SAMPLE_FMT_U8, AV_SAMPLE_FMT_S16), FMT_PAIR_FUNC(AV_SAMPLE_FMT_S16, AV_SAMPLE_FMT_S16), FMT_PAIR_FUNC(AV_SAMPLE_FMT_S32, AV_SAMPLE_FMT_S16), FMT_PAIR_FUNC(AV_SAMPLE_FMT_FLT, AV_SAMPLE_FMT_S16), FMT_PAIR_FUNC(AV_SAMPLE_FMT_DBL, AV_SAMPLE_FMT_S16), FMT_PAIR_FUNC(AV_SAMPLE_FMT_S64, AV_SAMPLE_FMT_S16), FMT_PAIR_FUNC(AV_SAMPLE_FMT_U8, AV_SAMPLE_FMT_S32), FMT_PAIR_FUNC(AV_SAMPLE_FMT_S16, AV_SAMPLE_FMT_S32), FMT_PAIR_FUNC(AV_SAMPLE_FMT_S32, AV_SAMPLE_FMT_S32), FMT_PAIR_FUNC(AV_SAMPLE_FMT_FLT, AV_SAMPLE_FMT_S32), FMT_PAIR_FUNC(AV_SAMPLE_FMT_DBL, AV_SAMPLE_FMT_S32), FMT_PAIR_FUNC(AV_SAMPLE_FMT_S64, AV_SAMPLE_FMT_S32), FMT_PAIR_FUNC(AV_SAMPLE_FMT_U8, AV_SAMPLE_FMT_FLT), FMT_PAIR_FUNC(AV_SAMPLE_FMT_S16, AV_SAMPLE_FMT_FLT), FMT_PAIR_FUNC(AV_SAMPLE_FMT_S32, AV_SAMPLE_FMT_FLT), FMT_PAIR_FUNC(AV_SAMPLE_FMT_FLT, AV_SAMPLE_FMT_FLT), FMT_PAIR_FUNC(AV_SAMPLE_FMT_DBL, AV_SAMPLE_FMT_FLT), FMT_PAIR_FUNC(AV_SAMPLE_FMT_S64, AV_SAMPLE_FMT_FLT), FMT_PAIR_FUNC(AV_SAMPLE_FMT_U8, AV_SAMPLE_FMT_DBL), FMT_PAIR_FUNC(AV_SAMPLE_FMT_S16, AV_SAMPLE_FMT_DBL), FMT_PAIR_FUNC(AV_SAMPLE_FMT_S32, AV_SAMPLE_FMT_DBL), FMT_PAIR_FUNC(AV_SAMPLE_FMT_FLT, AV_SAMPLE_FMT_DBL), FMT_PAIR_FUNC(AV_SAMPLE_FMT_DBL, AV_SAMPLE_FMT_DBL), FMT_PAIR_FUNC(AV_SAMPLE_FMT_S64, AV_SAMPLE_FMT_DBL), FMT_PAIR_FUNC(AV_SAMPLE_FMT_U8, AV_SAMPLE_FMT_S64), FMT_PAIR_FUNC(AV_SAMPLE_FMT_S16, AV_SAMPLE_FMT_S64), FMT_PAIR_FUNC(AV_SAMPLE_FMT_S32, AV_SAMPLE_FMT_S64), FMT_PAIR_FUNC(AV_SAMPLE_FMT_FLT, AV_SAMPLE_FMT_S64), FMT_PAIR_FUNC(AV_SAMPLE_FMT_DBL, AV_SAMPLE_FMT_S64), FMT_PAIR_FUNC(AV_SAMPLE_FMT_S64, AV_SAMPLE_FMT_S64), };static void cpy1(uint8_t **dst, const uint8_t **src, int len){ memcpy(*dst, *src, len);} static void cpy2(uint8_t **dst, const uint8_t **src, int len){ memcpy(*dst, *src, 2 *len);} static void cpy4(uint8_t **dst, const uint8_t **src, int len){ memcpy(*dst, *src, 4 *len);} static void cpy8(uint8_t **dst, const uint8_t **src, int len){ memcpy(*dst, *src, 8 *len);} AudioConvert *swri_audio_convert_alloc(enum AVSampleFormat out_fmt, enum AVSampleFormat in_fmt, int channels, const int *ch_map, int flags) { AudioConvert *ctx;conv_func_type *f=fmt_pair_to_conv_functions[av_get_packed_sample_fmt(out_fmt)+AV_SAMPLE_FMT_NB *av_get_packed_sample_fmt(in_fmt)];if(!f) return NULL;ctx=av_mallocz(sizeof(*ctx));if(!ctx) return NULL;if(channels==1){ in_fmt=av_get_planar_sample_fmt(in_fmt);out_fmt=av_get_planar_sample_fmt(out_fmt);} ctx->channels=channels;ctx->conv_f=f;ctx->ch_map=ch_map;if(in_fmt==AV_SAMPLE_FMT_U8||in_fmt==AV_SAMPLE_FMT_U8P) memset(ctx->silence, 0x80, sizeof(ctx->silence));if(out_fmt==in_fmt &&!ch_map) { switch(av_get_bytes_per_sample(in_fmt)){ case 1:ctx->simd_f=cpy1;break;case 2:ctx->simd_f=cpy2;break;case 4:ctx->simd_f=cpy4;break;case 8:ctx->simd_f=cpy8;break;} } return ctx;} void swri_audio_convert_free(AudioConvert **ctx) { av_freep(ctx);} int swri_audio_convert(AudioConvert *ctx, AudioData *out, AudioData *in, int len) { int ch;int off=0;const int os=(out->planar ? 1 :out->ch_count) *out->bps;unsigned misaligned=0;av_assert0(ctx->channels==out->ch_count);if(ctx->in_simd_align_mask) { int planes=in->planar ? in->ch_count :1;unsigned m=0;for(ch=0;ch< planes;ch++) m|=(intptr_t) in->ch[ch];misaligned|=m &ctx->in_simd_align_mask;} if(ctx->out_simd_align_mask) { int planes=out->planar ? out->ch_count :1;unsigned m=0;for(ch=0;ch< planes;ch++) m|=(intptr_t) out->ch[ch];misaligned|=m &ctx->out_simd_align_mask;} if(ctx->simd_f &&!ctx->ch_map &&!misaligned){ off=len &~15;av_assert1(off >=0);av_assert1(off<=len);av_assert2(ctx->channels==SWR_CH_MAX||!in->ch[ctx->channels]);if(off >0){ if(out->planar==in->planar){ int planes=out->planar ? out->ch_count :1;for(ch=0;ch< planes;ch++){ ctx->simd_f(out->ch+ch,(const uint8_t **) in->ch+ch, off *(out-> planar
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.
Definition avassert.h:109
#define av_assert0(cond)
assert() equivalent, that is always enabled.
Definition avassert.h:42
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)
Definition cbs_h264.c:63
#define NULL
Definition coverity.c:32
static AVFrame * frame
reference-counted frame API
#define AV_NUM_DATA_POINTERS
Definition frame.h:473
#define fail
Definition test.h:479
AVBufferRef * av_buffer_allocz(size_t size)
Same as av_buffer_alloc(), except the returned buffer will be initialized to zero.
Definition buffer.c:93
void av_buffer_pool_uninit(AVBufferPool **ppool)
Mark the pool as being available for freeing.
Definition buffer.c:328
AVBufferPool * av_buffer_pool_init(size_t size, AVBufferRef *(*alloc)(size_t size))
Allocate and initialize a buffer pool.
Definition buffer.c:283
AVBufferRef * av_buffer_pool_get(AVBufferPool *pool)
Allocate a new AVBuffer, reusing an old buffer from the pool when available.
Definition buffer.c:390
#define AVERROR(e)
Definition error.h:45
void av_frame_free(AVFrame **frame)
Free the frame and any dynamically allocated objects in it, e.g.
Definition frame.c:64
AVFrame * av_frame_alloc(void)
Allocate an AVFrame and set its fields to default values.
Definition frame.c:52
@ AVMEDIA_TYPE_AUDIO
Definition avutil.h:201
@ AVMEDIA_TYPE_VIDEO
Definition avutil.h:200
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.
Definition imgutils.c:111
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...
Definition imgutils.c:289
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.
Definition imgutils.c:89
int av_sample_fmt_is_planar(enum AVSampleFormat sample_fmt)
Check if the sample format is planar.
Definition samplefmt.c:114
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.
Definition samplefmt.c:121
AVSampleFormat
Audio sample formats.
Definition samplefmt.h:55
static const int sizes[][2]
Definition img2dec.c:62
int avpriv_set_systematic_pal2(uint32_t pal[256], enum AVPixelFormat pix_fmt)
Definition imgutils.c:178
misc image utilities
static av_cold int frame_pool_video_init(int width, int height, enum AVPixelFormat format, int align, FFFramePool *pool)
Definition framepool.c:31
AVFrame * ff_frame_pool_get(FFFramePool *pool)
Allocate a new AVFrame, reusing old buffers from the pool when available.
Definition framepool.c:128
av_cold void ff_frame_pool_uninit(FFFramePool *pool)
Deallocate the frame pool.
Definition framepool.c:215
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.
Definition framepool.c:244
static av_cold int frame_pool_audio_init(int channels, int nb_samples, enum AVSampleFormat format, int align, FFFramePool *pool)
Definition framepool.c:87
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.
Definition framepool.c:223
#define av_cold
Definition attributes.h:117
const char * desc
Definition libsvtav1.c:83
#define FFMIN(a, b)
Definition macros.h:49
#define FFALIGN(x, a)
Definition macros.h:78
void * av_calloc(size_t nmemb, size_t size)
Definition mem.c:264
Memory handling functions.
const AVPixFmtDescriptor * av_pix_fmt_desc_get(enum AVPixelFormat pix_fmt)
Definition pixdesc.c:3460
#define AV_PIX_FMT_FLAG_PAL
Pixel format has a palette in data[1], values are indexes in this palette.
Definition pixdesc.h:120
pixel format definitions
AVPixelFormat
Pixel format.
Definition pixfmt.h:71
@ AV_PIX_FMT_BGR8
packed RGB 3:3:2, 8bpp, (msb)2B 3G 3R(lsb)
Definition pixfmt.h:90
@ AV_PIX_FMT_PAL8
8 bits with AV_PIX_FMT_RGB32 palette
Definition pixfmt.h:84
This structure describes decoded (raw) audio or video data.
Definition frame.h:472
Descriptor that unambiguously describes how the bits of a pixel are stored in the up to 4 data planes...
Definition pixdesc.h:69
Frame pool.
Definition framepool.h:32
enum AVPixelFormat pix_fmt
Definition framepool.h:36
AVBufferPool * pools[4]
Definition framepool.h:52
enum AVSampleFormat sample_fmt
Definition framepool.h:37
int linesize[4]
Definition framepool.h:51
enum AVMediaType type
Definition framepool.h:34
int nb_samples
Definition framepool.h:47
#define height
Definition dsp.h:89
#define width
Definition dsp.h:89