diff options
author | Robin KAY <komadori@users.sourceforge.net> | 2002-12-20 01:35:49 +0000 |
---|---|---|
committer | Robin KAY <komadori@users.sourceforge.net> | 2002-12-20 01:35:49 +0000 |
commit | e497eb1f9172f0e620e807a99b3379b7348d6410 (patch) | |
tree | 40567861b773c17641df8fed551032382a59c42c /src/libxinevdec/rgb.c | |
parent | 217ed50549e44bf3f6d0e4d812629833b4d13d88 (diff) | |
download | xine-lib-e497eb1f9172f0e620e807a99b3379b7348d6410.tar.gz xine-lib-e497eb1f9172f0e620e807a99b3379b7348d6410.tar.bz2 |
MNG demuxer added
CVS patchset: 3591
CVS date: 2002/12/20 01:35:49
Diffstat (limited to 'src/libxinevdec/rgb.c')
-rw-r--r-- | src/libxinevdec/rgb.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/libxinevdec/rgb.c b/src/libxinevdec/rgb.c index addf45efe..2a13fb068 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.14 2002/12/18 21:35:42 esnel Exp $ + * $Id: rgb.c,v 1.15 2002/12/20 01:35:50 komadori Exp $ */ #include <stdio.h> @@ -153,9 +153,8 @@ static void rgb_decode_data (video_decoder_t *this_gen, /* iterate through each row */ buf_ptr = 0; - row_ptr = this->yuv_planes.row_width * - (this->yuv_planes.row_count - 1); - for (; row_ptr >= 0; row_ptr -= this->yuv_planes.row_width) { + + for (row_ptr = 0; row_ptr < this->yuv_planes.row_width * this->yuv_planes.row_count; row_ptr += this->yuv_planes.row_width) { for (pixel_ptr = 0; pixel_ptr < this->width; pixel_ptr++) { if (this->bytes_per_pixel == 1) { @@ -188,6 +187,8 @@ static void rgb_decode_data (video_decoder_t *this_gen, g = this->buf[buf_ptr++]; r = this->buf[buf_ptr++]; + buf_ptr += this->bytes_per_pixel - 3; + this->yuv_planes.y[row_ptr + pixel_ptr] = COMPUTE_Y(r, g, b); this->yuv_planes.u[row_ptr + pixel_ptr] = |