From 14bc6e6371cf7b2196b5edbafd67b119a1238b0a Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Thu, 24 Jul 2003 21:52:41 +0000 Subject: fix Originally committed as revision 2078 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavcodec/vcr1.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'libavcodec/vcr1.c') diff --git a/libavcodec/vcr1.c b/libavcodec/vcr1.c index b89260eaa3..18e250dd6b 100644 --- a/libavcodec/vcr1.c +++ b/libavcodec/vcr1.c @@ -79,7 +79,7 @@ static int decode_frame(AVCodecContext *avctx, for(i=0; i<4; i++) a->offset[i]= *(bytestream++); - offset= a->offset[0]; + offset= a->offset[0] - a->delta[ bytestream[2]&0xF ]; for(x=0; xwidth; x+=4){ luma[0]=( offset += a->delta[ bytestream[2]&0xF ]); luma[1]=( offset += a->delta[ bytestream[2]>>4 ]); @@ -87,13 +87,13 @@ static int decode_frame(AVCodecContext *avctx, luma[3]=( offset += a->delta[ bytestream[0]>>4 ]); luma += 4; - *(cb++) = bytestream[1]; - *(cr++) = bytestream[3]; + *(cb++) = bytestream[3]; + *(cr++) = bytestream[1]; bytestream+= 4; } }else{ - offset= a->offset[y&3]; + offset= a->offset[y&3] - a->delta[ bytestream[2]&0xF ]; for(x=0; xwidth; x+=8){ luma[0]=( offset += a->delta[ bytestream[2]&0xF ]); -- cgit v1.2.3