[FFmpeg-cvslog] r15467 - trunk/libavcodec/utils.c

michael subversion
Tue Sep 30 03:45:54 CEST 2008


Author: michael
Date: Tue Sep 30 03:45:53 2008
New Revision: 15467

Log:
Allocate 1 line more in the chroma plane for H.264, this avoids some
out of array reads with mmx/sse2 code.
Fixes issue327.


Modified:
   trunk/libavcodec/utils.c

Modified: trunk/libavcodec/utils.c
==============================================================================
--- trunk/libavcodec/utils.c	(original)
+++ trunk/libavcodec/utils.c	Tue Sep 30 03:45:53 2008
@@ -170,6 +170,8 @@ void avcodec_align_dimensions(AVCodecCon
 
     *width = ALIGN(*width , w_align);
     *height= ALIGN(*height, h_align);
+    if(s->codec_id == CODEC_ID_H264)
+        *height+=2; // some of the optimized chroma MC reads one line too much
 }
 
 int avcodec_check_dimensions(void *av_log_ctx, unsigned int w, unsigned int h){




More information about the ffmpeg-cvslog mailing list