diff options
author | Mike Melanson <mike@multimedia.cx> | 2002-07-20 04:24:59 +0000 |
---|---|---|
committer | Mike Melanson <mike@multimedia.cx> | 2002-07-20 04:24:59 +0000 |
commit | b88dc465f1df3bc2bafb5d141f3e58f02f34f5c2 (patch) | |
tree | 71e294a65eff317dc0c5b510b866632c035e23a1 | |
parent | 5625e25c27b9c59d3f4cf4926bbfccfaf17258ce (diff) | |
download | xine-lib-b88dc465f1df3bc2bafb5d141f3e58f02f34f5c2.tar.gz xine-lib-b88dc465f1df3bc2bafb5d141f3e58f02f34f5c2.tar.bz2 |
updated to use FINISH_LINE() macro
CVS patchset: 2325
CVS date: 2002/07/20 04:24:59
-rw-r--r-- | src/libxinevdec/msrle.c | 15 | ||||
-rw-r--r-- | src/libxinevdec/rgb.c | 14 |
2 files changed, 15 insertions, 14 deletions
diff --git a/src/libxinevdec/msrle.c b/src/libxinevdec/msrle.c index 9c6ea3940..982d689dc 100644 --- a/src/libxinevdec/msrle.c +++ b/src/libxinevdec/msrle.c @@ -21,7 +21,7 @@ * For more information on the MS RLE format, visit: * http://www.pcisys.net/~melanson/codecs/ * - * $Id: msrle.c,v 1.2 2002/07/15 21:42:34 esnel Exp $ + * $Id: msrle.c,v 1.3 2002/07/20 04:24:59 tmmm Exp $ */ #include <stdio.h> @@ -90,13 +90,22 @@ void decode_msrle8(msrle_decoder_t *this) { /* fetch the next byte to see how to handle escape code */ FETCH_NEXT_STREAM_BYTE(); if (stream_byte == 0) { + /* take care of the extra 2 pixels on the C lines */ + FINISH_LINE(this->yuv_planes, row_ptr); + /* line is done, goto the next one */ row_ptr -= row_dec; pixel_ptr = 0; - } else if (stream_byte == 1) + } else if (stream_byte == 1) { + /* take care of the extra 2 pixels on the C lines */ + FINISH_LINE(this->yuv_planes, row_ptr); + /* decode is done */ return; - else if (stream_byte == 2) { + } else if (stream_byte == 2) { + /* take care of the extra 2 pixels on the C lines */ + FINISH_LINE(this->yuv_planes, row_ptr); + /* reposition frame decode coordinates */ FETCH_NEXT_STREAM_BYTE(); pixel_ptr += stream_byte; diff --git a/src/libxinevdec/rgb.c b/src/libxinevdec/rgb.c index bc88d44af..3c6368ee0 100644 --- a/src/libxinevdec/rgb.c +++ b/src/libxinevdec/rgb.c @@ -21,7 +21,7 @@ * Actually, this decoder just converts a raw RGB image to a YUY2 map * suitable for display under xine. * - * $Id: rgb.c,v 1.2 2002/07/15 21:42:34 esnel Exp $ + * $Id: rgb.c,v 1.3 2002/07/20 04:24:59 tmmm Exp $ */ #include <stdio.h> @@ -207,16 +207,8 @@ static void rgb_decode_data (video_decoder_t *this_gen, } } - // take care of the extra 2 pixels on the C lines - this->yuv_planes.u[row_ptr + pixel_ptr] = - this->yuv_planes.u[row_ptr + pixel_ptr - 1]; - this->yuv_planes.u[row_ptr + pixel_ptr + 1] = - this->yuv_planes.u[row_ptr + pixel_ptr - 2]; - - this->yuv_planes.v[row_ptr + pixel_ptr] = - this->yuv_planes.v[row_ptr + pixel_ptr - 1]; - this->yuv_planes.v[row_ptr + pixel_ptr + 1] = - this->yuv_planes.v[row_ptr + pixel_ptr - 2]; + /* take care of the extra 2 pixels on the C lines */ + FINISH_LINE(this->yuv_planes, row_ptr); } yuv444_to_yuy2(&this->yuv_planes, img->base[0], img->pitches[0]); |