diff options
author | Paul Gilbert | 2016-11-18 21:04:12 -0500 |
---|---|---|
committer | Paul Gilbert | 2016-11-18 21:04:12 -0500 |
commit | 4888433c46a8e36c84dbc1b4ace7aeee83d12f2d (patch) | |
tree | 8e07e40036b6ae1ac0c5df321adcf34a1fc4da4a /image | |
parent | 91d61b2cdbb95ee67bdb3d07da198be9575b561b (diff) | |
download | scummvm-rg350-4888433c46a8e36c84dbc1b4ace7aeee83d12f2d.tar.gz scummvm-rg350-4888433c46a8e36c84dbc1b4ace7aeee83d12f2d.tar.bz2 scummvm-rg350-4888433c46a8e36c84dbc1b4ace7aeee83d12f2d.zip |
IMAGE: Fix some confusion of bytes vs bits in Indeo decoders
Diffstat (limited to 'image')
-rw-r--r-- | image/codecs/indeo/indeo.cpp | 6 | ||||
-rw-r--r-- | image/codecs/indeo/indeo.h | 2 | ||||
-rw-r--r-- | image/codecs/indeo4.cpp | 4 | ||||
-rw-r--r-- | image/codecs/indeo4.h | 2 | ||||
-rw-r--r-- | image/codecs/indeo5.cpp | 4 | ||||
-rw-r--r-- | image/codecs/indeo5.h | 2 |
6 files changed, 10 insertions, 10 deletions
diff --git a/image/codecs/indeo/indeo.cpp b/image/codecs/indeo/indeo.cpp index f0be92483c..f82c4829af 100644 --- a/image/codecs/indeo/indeo.cpp +++ b/image/codecs/indeo/indeo.cpp @@ -466,8 +466,8 @@ IVI45DecContext::IVI45DecContext() : _gb(nullptr), _frameNum(0), _frameType(0), /*------------------------------------------------------------------------*/ -IndeoDecoderBase::IndeoDecoderBase(uint16 width, uint16 height, uint bytesPerPixel) : Codec() { - switch (bytesPerPixel) { +IndeoDecoderBase::IndeoDecoderBase(uint16 width, uint16 height, uint bitsPerPixel) : Codec() { + switch (bitsPerPixel) { case 16: _pixelFormat = Graphics::PixelFormat(2, 5, 6, 5, 0, 11, 5, 0, 0); break; @@ -484,7 +484,7 @@ IndeoDecoderBase::IndeoDecoderBase(uint16 width, uint16 height, uint bytesPerPix _surface = new Graphics::Surface(); _surface->create(width, height, _pixelFormat); - _surface->fillRect(Common::Rect(0, 0, width, height), (bytesPerPixel == 4) ? 0xff : 0); + _surface->fillRect(Common::Rect(0, 0, width, height), (bitsPerPixel == 32) ? 0xff : 0); _ctx._bRefBuf = 3; // buffer 2 is used for scalability mode } diff --git a/image/codecs/indeo/indeo.h b/image/codecs/indeo/indeo.h index 114f0a10c8..068f8c9f25 100644 --- a/image/codecs/indeo/indeo.h +++ b/image/codecs/indeo/indeo.h @@ -574,7 +574,7 @@ protected: */ int scaleMV(int mv, int mvScale); public: - IndeoDecoderBase(uint16 width, uint16 height, uint bytesPerPixel); + IndeoDecoderBase(uint16 width, uint16 height, uint bitsPerPixel); virtual ~IndeoDecoderBase(); }; diff --git a/image/codecs/indeo4.cpp b/image/codecs/indeo4.cpp index 62b5cae271..6141bf0fc8 100644 --- a/image/codecs/indeo4.cpp +++ b/image/codecs/indeo4.cpp @@ -37,8 +37,8 @@ namespace Image { #define IVI4_PIC_SIZE_ESC 7 -Indeo4Decoder::Indeo4Decoder(uint16 width, uint16 height, uint bytesPerPixel) : - IndeoDecoderBase(width, height, bytesPerPixel) { +Indeo4Decoder::Indeo4Decoder(uint16 width, uint16 height, uint bitsPerPixel) : + IndeoDecoderBase(width, height, bitsPerPixel) { _ctx._isIndeo4 = true; _ctx._refBuf = 1; _ctx._bRefBuf = 3; diff --git a/image/codecs/indeo4.h b/image/codecs/indeo4.h index 9fb6435ed5..420acc3f33 100644 --- a/image/codecs/indeo4.h +++ b/image/codecs/indeo4.h @@ -52,7 +52,7 @@ class Indeo4Decoder : public IndeoDecoderBase { bool _is2dTrans; }; public: - Indeo4Decoder(uint16 width, uint16 height, uint bytesPerPixel = 2); + Indeo4Decoder(uint16 width, uint16 height, uint bitsPerPixel = 16); virtual ~Indeo4Decoder() {} virtual const Graphics::Surface *decodeFrame(Common::SeekableReadStream &stream); diff --git a/image/codecs/indeo5.cpp b/image/codecs/indeo5.cpp index c2a4656cea..f4a78574d3 100644 --- a/image/codecs/indeo5.cpp +++ b/image/codecs/indeo5.cpp @@ -48,8 +48,8 @@ enum { #define IVI5_PIC_SIZE_ESC 15 -Indeo5Decoder::Indeo5Decoder(uint16 width, uint16 height, uint bytesPerPixel) : - IndeoDecoderBase(width, height, bytesPerPixel) { +Indeo5Decoder::Indeo5Decoder(uint16 width, uint16 height, uint bitsPerPixel) : + IndeoDecoderBase(width, height, bitsPerPixel) { _ctx._isIndeo4 = false; _ctx._refBuf = 1; _ctx._bRefBuf = 3; diff --git a/image/codecs/indeo5.h b/image/codecs/indeo5.h index 4ce9d30b92..859eb11a29 100644 --- a/image/codecs/indeo5.h +++ b/image/codecs/indeo5.h @@ -52,7 +52,7 @@ class Indeo5Decoder : public IndeoDecoderBase { int is_2d_trans; }; public: - Indeo5Decoder(uint16 width, uint16 height, uint bytesPerPixel = 2); + Indeo5Decoder(uint16 width, uint16 height, uint bitsPerPixel = 16); virtual ~Indeo5Decoder() {} virtual const Graphics::Surface *decodeFrame(Common::SeekableReadStream &stream); |