diff options
author | Manfred Tremmel <manfredtremmel@users.sourceforge.net> | 2004-08-21 21:21:12 +0000 |
---|---|---|
committer | Manfred Tremmel <manfredtremmel@users.sourceforge.net> | 2004-08-21 21:21:12 +0000 |
commit | 7451e0ea0e150060fcbe24b96f2f6eff418c7a4b (patch) | |
tree | 1a903c0bed341708d76f010486e3e8e59b0f70ce /src/libxinevdec/bitplane.c | |
parent | a51c09fc68c5adb8ce7c0855e9a35a191e3515fa (diff) | |
download | xine-lib-7451e0ea0e150060fcbe24b96f2f6eff418c7a4b.tar.gz xine-lib-7451e0ea0e150060fcbe24b96f2f6eff418c7a4b.tar.bz2 |
little cleanup and improved the playback of broaken iff files
CVS patchset: 6902
CVS date: 2004/08/21 21:21:12
Diffstat (limited to 'src/libxinevdec/bitplane.c')
-rw-r--r-- | src/libxinevdec/bitplane.c | 50 |
1 files changed, 23 insertions, 27 deletions
diff --git a/src/libxinevdec/bitplane.c b/src/libxinevdec/bitplane.c index f6bb27c2e..203dc300e 100644 --- a/src/libxinevdec/bitplane.c +++ b/src/libxinevdec/bitplane.c @@ -28,7 +28,7 @@ * 8 (long and short) * - untested (found no testfiles) IFF-ANIM OPT 3, 4 and 6 * - * $Id: bitplane.c,v 1.9 2004/03/07 12:48:15 manfredtremmel Exp $ + * $Id: bitplane.c,v 1.10 2004/08/21 21:21:13 manfredtremmel Exp $ */ #include <stdio.h> @@ -1031,19 +1031,17 @@ static void bitplane_dlta_8_long (bitplane_decoder_t *this) { /* Uniq ops */ count = op & 0x7fffffff; /* get count */ while(count--) { - if (data > data_end || rowworkptr > picture_end) { - printf("Fehler decoding (1)\n"); - return; - } - yuv_index = ((row_ptr * this->width) + pixel_ptr_bit); - if( this->is_ham ) { - IFF_REPLACE_LONG_SIMPLE(&this->index_buf[yuv_index], - rowworkptr, data, bitplainoffeset[palette_index] ); - } else { - IFF_REPLACE_LONG( &this->index_buf[((row_ptr * this->width) + pixel_ptr_bit)], - &this->yuv_planes.y[yuv_index], &this->yuv_planes.u[yuv_index], - &this->yuv_planes.v[yuv_index], this->yuv_palette, - rowworkptr, data, bitplainoffeset[palette_index] ); + if (data <= data_end || rowworkptr <= picture_end) { + yuv_index = ((row_ptr * this->width) + pixel_ptr_bit); + if( this->is_ham ) { + IFF_REPLACE_LONG_SIMPLE(&this->index_buf[yuv_index], + rowworkptr, data, bitplainoffeset[palette_index] ); + } else { + IFF_REPLACE_LONG( &this->index_buf[((row_ptr * this->width) + pixel_ptr_bit)], + &this->yuv_planes.y[yuv_index], &this->yuv_planes.u[yuv_index], + &this->yuv_planes.v[yuv_index], this->yuv_palette, + rowworkptr, data, bitplainoffeset[palette_index] ); + } } data++; rowworkptr += rowsize_all_planes; @@ -1055,19 +1053,17 @@ static void bitplane_dlta_8_long (bitplane_decoder_t *this) { count = BE_32(data); data++; while(count--) { - if (data > data_end || rowworkptr > picture_end) { - printf("Fehler decoding (2)\n"); - return; - } - yuv_index = ((row_ptr * this->width) + pixel_ptr_bit); - if( this->is_ham ) { - IFF_REPLACE_LONG_SIMPLE(&this->index_buf[yuv_index], - rowworkptr, data, bitplainoffeset[palette_index] ); - } else { - IFF_REPLACE_LONG( &this->index_buf[yuv_index], - &this->yuv_planes.y[yuv_index], &this->yuv_planes.u[yuv_index], - &this->yuv_planes.v[yuv_index], this->yuv_palette, - rowworkptr, data, bitplainoffeset[palette_index] ); + if (data <= data_end && rowworkptr <= picture_end) { + yuv_index = ((row_ptr * this->width) + pixel_ptr_bit); + if( this->is_ham ) { + IFF_REPLACE_LONG_SIMPLE(&this->index_buf[yuv_index], + rowworkptr, data, bitplainoffeset[palette_index] ); + } else { + IFF_REPLACE_LONG( &this->index_buf[yuv_index], + &this->yuv_planes.y[yuv_index], &this->yuv_planes.u[yuv_index], + &this->yuv_planes.v[yuv_index], this->yuv_palette, + rowworkptr, data, bitplainoffeset[palette_index] ); + } } rowworkptr += rowsize_all_planes; row_ptr++; |