[FFmpeg-cvslog] mpegvideo: increase edge_emu_buffer size for VC1

Janne Grunau git at videolan.org
Thu Dec 20 02:55:04 CET 2012


ffmpeg | branch: master | Janne Grunau <janne-libav at jannau.net> | Tue Dec 18 22:57:58 2012 +0100| [45635885e44cb7adce35ac19279d48c1ef6c4779] | committer: Janne Grunau

mpegvideo: increase edge_emu_buffer size for VC1

The VC1 decoder uses edge_emu_buffer simultaneously for luma and chroma
and needs more space. That was not a problem before f1d8763a02b5fce
since the size for edge_emu_buffer was always calculated with 2 byte per
pixel since the linesize was not known.

Fixes occasionally fate errors in vc1_sa10143.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=45635885e44cb7adce35ac19279d48c1ef6c4779
---

 libavcodec/mpegvideo.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c
index 8cd8df8..edd5253 100644
--- a/libavcodec/mpegvideo.c
+++ b/libavcodec/mpegvideo.c
@@ -241,8 +241,10 @@ int ff_mpv_frame_size_alloc(MpegEncContext *s, int linesize)
 
     // edge emu needs blocksize + filter length - 1
     // (= 17x17 for  halfpel / 21x21 for  h264)
+    // VC1 computes luma and chroma simultaneously and needs 19X19 + 9x9
+    // at uvlinesize. It supports only YUV420 so 24x24 is enough
     // linesize * interlaced * MBsize
-    FF_ALLOCZ_OR_GOTO(s->avctx, s->edge_emu_buffer, alloc_size * 2 * 21,
+    FF_ALLOCZ_OR_GOTO(s->avctx, s->edge_emu_buffer, alloc_size * 2 * 24,
                       fail);
 
     FF_ALLOCZ_OR_GOTO(s->avctx, s->me.scratchpad, alloc_size * 2 * 16 * 2,



More information about the ffmpeg-cvslog mailing list