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

vitor subversion
Mon May 10 02:28:19 CEST 2010


Author: vitor
Date: Mon May 10 02:28:18 2010
New Revision: 23077

Log:
Alloc 16 extra bytes in libavfilter frames. Needed for MMX-optimized swscale.

Fix issue 1924.

Modified:
   trunk/libavfilter/defaults.c

Modified: trunk/libavfilter/defaults.c
==============================================================================
--- trunk/libavfilter/defaults.c	Mon May 10 01:19:19 2010	(r23076)
+++ trunk/libavfilter/defaults.c	Mon May 10 02:28:18 2010	(r23077)
@@ -55,7 +55,8 @@ AVFilterPicRef *avfilter_default_get_vid
         pic->linesize[i] = FFALIGN(pic->linesize[i], 16);
 
     tempsize = ff_fill_pointer((AVPicture *)pic, NULL, pic->format, ref->h);
-    buf = av_malloc(tempsize);
+    buf = av_malloc(tempsize + 16); // +2 is needed for swscaler, +16 to be
+                                    // SIMD-friendly
     ff_fill_pointer((AVPicture *)pic, buf, pic->format, ref->h);
 
     memcpy(ref->data,     pic->data,     sizeof(pic->data));



More information about the ffmpeg-cvslog mailing list