From 3cd9d4ab79cb7ad92f60a3ce6e523f1ff9ce4d09 Mon Sep 17 00:00:00 2001 From: Mike Melanson Date: Sat, 29 May 2004 22:55:11 +0000 Subject: re-instate 32-bit decoding CVS patchset: 6608 CVS date: 2004/05/29 22:55:11 --- src/libxinevdec/rgb.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/libxinevdec/rgb.c b/src/libxinevdec/rgb.c index 15ed4e5fe..24fc9b90a 100644 --- a/src/libxinevdec/rgb.c +++ b/src/libxinevdec/rgb.c @@ -27,10 +27,10 @@ * file can be 32-, 24-, 16-, 8-, 4-, 2-, or 1-bit. Any resolutions <= 8 * can also be greyscale depending on what the QT file specifies. * - * One more catch: Raw RGB from a Microsoft is upside down. This is indicated - * by a negative height parameter. + * One more catch: Raw RGB from a Microsoft file is upside down. This is + * indicated by a negative height parameter. * - * $Id: rgb.c,v 1.27 2004/05/29 22:34:43 tmmm Exp $ + * $Id: rgb.c,v 1.28 2004/05/29 22:55:11 tmmm Exp $ */ #include @@ -133,8 +133,10 @@ static void rgb_decode_data (video_decoder_t *this_gen, this->upside_down = 0; this->ratio = (double)this->width/(double)this->height; + this->bit_depth = bih->biBitCount; + if (this->bit_depth > 32) + this->bit_depth &= 0x1F; /* round this number up in case of 15 */ - this->bit_depth = bih->biBitCount & 0x1F; this->bytes_per_pixel = (this->bit_depth + 1) / 8; if (this->buf) -- cgit v1.2.3