diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2008-09-30 01:45:53 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2008-09-30 01:45:53 +0000 |
commit | ae4ffe9f643bb9f0d5f158dca39c468dd5994adf (patch) | |
tree | f9a17f3c678f5d6a581f8c73a001d0439994e452 /libavcodec/utils.c | |
parent | 503bc4026d73a2e02f472b166aa068176859e376 (diff) | |
download | ffmpeg-ae4ffe9f643bb9f0d5f158dca39c468dd5994adf.tar.gz |
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
Diffstat (limited to 'libavcodec/utils.c')
-rw-r--r-- | libavcodec/utils.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/utils.c b/libavcodec/utils.c index 66122a5c9f..cf40681759 100644 --- a/libavcodec/utils.c +++ b/libavcodec/utils.c @@ -170,6 +170,8 @@ void avcodec_align_dimensions(AVCodecContext *s, int *width, int *height){ *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){ |