diff options
author | S.N. Hemanth Meenakshisundaram <smeenaks@ucsd.edu> | 2010-08-11 11:06:04 +0000 |
---|---|---|
committer | Stefano Sabatini <stefano.sabatini-lala@poste.it> | 2010-08-11 11:06:04 +0000 |
commit | cc80caff52a3a20d2ef4285d06263e542e3ddf46 (patch) | |
tree | 2b9820513a08b21da8159ff7c704dde70c037105 /libavfilter/defaults.c | |
parent | fd7b11d027da7cc350d867d22d4c6bbe6022d8df (diff) | |
download | ffmpeg-cc80caff52a3a20d2ef4285d06263e542e3ddf46.tar.gz |
Separate video specific BufferRef properties into VideoProps.
Define a new struct AVFilterBufferRefVideoProps and add a type field
to AVFilterBufferRef.
Video specific properties in AVFilterBufferRefVideoProps are now
referred to by *video pointer in AVFilterBufferRef.
Patch by S.N. Hemanth Meenakshisundaram smeenaks->ucsd.edu.
Originally committed as revision 24763 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavfilter/defaults.c')
-rw-r--r-- | libavfilter/defaults.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/libavfilter/defaults.c b/libavfilter/defaults.c index 5b1d5b86a6..2140436e8d 100644 --- a/libavfilter/defaults.c +++ b/libavfilter/defaults.c @@ -39,9 +39,10 @@ AVFilterBufferRef *avfilter_default_get_video_buffer(AVFilterLink *link, int per int i, tempsize; char *buf; - ref->buf = pic; - ref->w = w; - ref->h = h; + ref->buf = pic; + ref->video = av_mallocz(sizeof(AVFilterBufferRefVideoProps)); + ref->video->w = w; + ref->video->h = h; /* make sure the buffer gets read permission or it's useless for output */ ref->perms = perms | AV_PERM_READ; @@ -49,15 +50,15 @@ AVFilterBufferRef *avfilter_default_get_video_buffer(AVFilterLink *link, int per pic->refcount = 1; ref->format = link->format; pic->free = avfilter_default_free_buffer; - av_fill_image_linesizes(pic->linesize, ref->format, ref->w); + av_fill_image_linesizes(pic->linesize, ref->format, ref->video->w); for (i=0; i<4;i++) pic->linesize[i] = FFALIGN(pic->linesize[i], 16); - tempsize = av_fill_image_pointers(pic->data, ref->format, ref->h, NULL, pic->linesize); + tempsize = av_fill_image_pointers(pic->data, ref->format, ref->video->h, NULL, pic->linesize); buf = av_malloc(tempsize + 16); // +2 is needed for swscaler, +16 to be // SIMD-friendly - av_fill_image_pointers(pic->data, ref->format, ref->h, buf, pic->linesize); + av_fill_image_pointers(pic->data, ref->format, ref->video->h, buf, pic->linesize); memcpy(ref->data, pic->data, 4*sizeof(pic->data[0])); memcpy(ref->linesize, pic->linesize, 4*sizeof(pic->linesize[0])); |