Commit ae4ffe9f authored by Michael Niedermayer's avatar Michael Niedermayer

Allocate 1 line more in the chroma plane for H.264, this avoids some

out of array reads with mmx/sse2 code.
Fixes issue327.

Originally committed as revision 15467 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent 503bc402
...@@ -170,6 +170,8 @@ void avcodec_align_dimensions(AVCodecContext *s, int *width, int *height){ ...@@ -170,6 +170,8 @@ void avcodec_align_dimensions(AVCodecContext *s, int *width, int *height){
*width = ALIGN(*width , w_align); *width = ALIGN(*width , w_align);
*height= ALIGN(*height, h_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){ int avcodec_check_dimensions(void *av_log_ctx, unsigned int w, unsigned int h){
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment