[FFmpeg-soc] [soc]: r1892 - libavfilter/defaults.c

vitor subversion at mplayerhq.hu
Sun Feb 10 21:51:58 CET 2008


Author: vitor
Date: Sun Feb 10 21:51:58 2008
New Revision: 1892

Log:
Force linesize to be a multiple of 16

Modified:
   libavfilter/defaults.c

Modified: libavfilter/defaults.c
==============================================================================
--- libavfilter/defaults.c	(original)
+++ libavfilter/defaults.c	Sun Feb 10 21:51:58 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-soc mailing list