52 picref = pool->
pic[i];
53 if (picref && picref->buf->format == link->
format && picref->buf->w == w && picref->buf->h == h) {
54 AVFilterBuffer *pic = picref->buf;
60 picref->perms = full_perms;
61 picref->format = link->
format;
63 memcpy(picref->data, pic->data,
sizeof(picref->data));
64 memcpy(picref->linesize, pic->linesize,
sizeof(picref->linesize));
86 memset(
data[0], 128, i);
88 picref->buf->priv = pool;
89 picref->buf->free = NULL;
96 #if FF_API_AVFILTERBUFFER
98 avfilter_get_video_buffer_ref_from_arrays(
uint8_t *
const data[4],
const int linesize[4],
int perms,
101 AVFilterBuffer *pic =
av_mallocz(
sizeof(AVFilterBuffer));
102 AVFilterBufferRef *picref =
av_mallocz(
sizeof(AVFilterBufferRef));
109 if (!(picref->video =
av_mallocz(
sizeof(AVFilterBufferRefVideoProps))))
112 pic->w = picref->video->w = w;
113 pic->h = picref->video->h = h;
116 picref->perms = perms | AV_PERM_READ;
120 pic->format = picref->format = format;
122 memcpy(pic->data, data, 4*
sizeof(data[0]));
123 memcpy(pic->linesize, linesize, 4*
sizeof(linesize[0]));
124 memcpy(picref->data, pic->data,
sizeof(picref->data));
125 memcpy(picref->linesize, pic->linesize,
sizeof(picref->linesize));
127 pic-> extended_data = pic->data;
128 picref->extended_data = picref->data;
135 if (picref && picref->video)