62 #if FF_API_AVFILTERBUFFER
67 AVFilterBuffer *pic =
av_mallocz(
sizeof(AVFilterBuffer));
68 AVFilterBufferRef *picref =
av_mallocz(
sizeof(AVFilterBufferRef));
74 picref->buf->free = ff_avfilter_default_free_buffer;
75 if (!(picref->video =
av_mallocz(
sizeof(AVFilterBufferRefVideoProps))))
78 pic->w = picref->video->w = w;
79 pic->h = picref->video->h =
h;
82 picref->perms = perms | AV_PERM_READ;
86 pic->format = picref->format = format;
88 memcpy(pic->data, data, 4*
sizeof(data[0]));
89 memcpy(pic->linesize, linesize, 4*
sizeof(linesize[0]));
90 memcpy(picref->data, pic->data,
sizeof(picref->data));
91 memcpy(picref->linesize, pic->linesize,
sizeof(picref->linesize));
93 pic-> extended_data = pic->data;
94 picref->extended_data = picref->data;
101 if (picref && picref->video)
This structure describes decoded (raw) audio or video data.
ptrdiff_t const GLvoid * data
Main libavfilter public API header.
memory handling functions
AVFrame * ff_null_get_video_buffer(AVFilterLink *link, int w, int h)
AVFrame * ff_get_video_buffer(AVFilterLink *link, int w, int h)
Request a picture buffer with a specific set of permissions.
AVFilterPad * dstpad
input pad on the dest filter
AVFrame * av_frame_alloc(void)
Allocate an AVFrame and set its fields to default values.
static AVFrame * get_video_buffer(AVFilterLink *inlink, int w, int h)
A link between two filters.
int width
width and height of the video frame
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().
#define FF_TPRINTF_START(ctx, func)
int format
agreed upon media format
int format
format of the frame, -1 if unknown or unset Values correspond to enum AVPixelFormat for video frames...
AVFrame *(* get_video_buffer)(AVFilterLink *link, int w, int h)
Callback function to get a video buffer.
void ff_tlog_link(void *ctx, AVFilterLink *link, int end)
AVFilterBufferRef * avfilter_get_video_buffer_ref_from_arrays(uint8_t *const data[4], const int linesize[4], int perms, int w, int h, enum AVPixelFormat format)
refcounted data buffer API
AVFilterLink ** outputs
array of pointers to output links
int av_frame_get_buffer(AVFrame *frame, int align)
Allocate new buffer(s) for audio or video data.
AVFrame * ff_default_get_video_buffer(AVFilterLink *link, int w, int h)
AVFilterContext * dst
dest filter
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_NOPTS_VALUE
Undefined timestamp value.