[FFmpeg-cvslog] r12074 - trunk/libavfilter/defaults.c

vitor subversion
Fri Feb 15 23:00:09 CET 2008


Author: vitor
Date: Fri Feb 15 23:00:09 2008
New Revision: 12074

Log:
Force linesize to be a multiple of 16
Commited in SoC by Vitor Sessak on 2008-02-10 20:51:58


Modified:
   trunk/libavfilter/defaults.c

Modified: trunk/libavfilter/defaults.c
==============================================================================
--- trunk/libavfilter/defaults.c	(original)
+++ trunk/libavfilter/defaults.c	Fri Feb 15 23:00:09 2008
@@ -46,7 +46,9 @@ AVFilterPicRef *avfilter_default_get_vid
     pic->refcount = 1;
     pic->format   = link->format;
     pic->free     = avfilter_default_free_video_buffer;
-    avpicture_alloc((AVPicture *)pic, pic->format, ref->w, ref->h);
+    avpicture_alloc((AVPicture *)pic, pic->format,
+                    (ref->w + 15) & (~15), // make linesize a multiple of 16
+                    (ref->h + 15) & (~15));
 
     memcpy(ref->data,     pic->data,     sizeof(pic->data));
     memcpy(ref->linesize, pic->linesize, sizeof(pic->linesize));




More information about the ffmpeg-cvslog mailing list