changeset 10609:f864e7927dff libavcodec

4:2:2 4:4:4 bugfix for the error concealment code.
author michael
date Tue, 01 Dec 2009 01:01:37 +0000
parents dab94852ac8b
children cf7af348a11a
files error_resilience.c
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/error_resilience.c	Mon Nov 30 23:52:28 2009 +0000
+++ b/error_resilience.c	Tue Dec 01 01:01:37 2009 +0000
@@ -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);
 }