From f40a7fd3162222e1cc8af3b43d4d47033558278b Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Tue, 1 Dec 2009 01:01:37 +0000 Subject: [PATCH] 4:2:2 4:4:4 bugfix for the error concealment code. Originally committed as revision 20678 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavcodec/error_resilience.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavcodec/error_resilience.c b/libavcodec/error_resilience.c index 3c0d2773fd..8c6ac9d8a3 100644 --- a/libavcodec/error_resilience.c +++ b/libavcodec/error_resilience.c @@ -33,8 +33,8 @@ static void decode_mb(MpegEncContext *s){ s->dest[0] = s->current_picture.data[0] + (s->mb_y * 16* s->linesize ) + s->mb_x * 16; - s->dest[1] = s->current_picture.data[1] + (s->mb_y * 8 * s->uvlinesize) + s->mb_x * 8; - s->dest[2] = s->current_picture.data[2] + (s->mb_y * 8 * s->uvlinesize) + s->mb_x * 8; + s->dest[1] = s->current_picture.data[1] + (s->mb_y * (16>>s->chroma_y_shift) * s->uvlinesize) + s->mb_x * (16>>s->chroma_x_shift); + s->dest[2] = s->current_picture.data[2] + (s->mb_y * (16>>s->chroma_y_shift) * s->uvlinesize) + s->mb_x * (16>>s->chroma_x_shift); MPV_decode_mb(s, s->block); }