diff options
author | Paul Gilbert | 2016-09-05 23:00:08 -0400 |
---|---|---|
committer | Paul Gilbert | 2016-09-10 10:08:10 -0400 |
commit | 5f0962696f97df2cce27d065d99b04243de59334 (patch) | |
tree | 001c83f1550677226cf264d6dc6a3c9ceaa70e2f /image/codecs/indeo4.h | |
parent | 73e79031865a71dd5ced18fe3269f79ceba6e08c (diff) | |
download | scummvm-rg350-5f0962696f97df2cce27d065d99b04243de59334.tar.gz scummvm-rg350-5f0962696f97df2cce27d065d99b04243de59334.tar.bz2 scummvm-rg350-5f0962696f97df2cce27d065d99b04243de59334.zip |
IMAGE: Added Indeo4Decoder decodePictureHeader, and lots of dependencies
Diffstat (limited to 'image/codecs/indeo4.h')
-rw-r--r-- | image/codecs/indeo4.h | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/image/codecs/indeo4.h b/image/codecs/indeo4.h index 44007e08b8..838b0c3aef 100644 --- a/image/codecs/indeo4.h +++ b/image/codecs/indeo4.h @@ -21,6 +21,7 @@ */ #include "common/scummsys.h" +#include "image/codecs/indeo/get_bits.h" /* Intel Indeo 4 decompressor, derived from ffmpeg. * @@ -33,10 +34,14 @@ #define IMAGE_CODECS_INDEO4_H #include "image/codecs/codec.h" +#include "image/codecs/indeo/get_bits.h" +#include "image/codecs/indeo/indeo.h" #include "graphics/managed_surface.h" namespace Image { +using namespace Indeo; + /** * Intel Indeo 4 decoder. * @@ -57,6 +62,33 @@ public: private: Graphics::PixelFormat _pixelFormat; Graphics::ManagedSurface *_surface; + IVI45DecContext _ctx; + + /** + * Decode the Indeo 4 picture header. + * @returns 0 = Ok, negative number = error + */ + int decodePictureHeader(); + + int scaleTileSize(int def_size, int size_factor); + + /** + * Decode subdivision of a plane. + * This is a simplified version that checks for two supported subdivisions: + * - 1 wavelet band per plane, size factor 1:1, code pattern: 3 + * - 4 wavelet bands per plane, size factor 1:4, code pattern: 2,3,3,3,3 + * Anything else is either unsupported or corrupt. + * + * @param[in,out] gb the GetBit context + * @return number of wavelet bands or 0 on error + */ + int decodePlaneSubdivision(); + +private: + /** + * Standard picture dimensions + */ + static const uint _ivi4_common_pic_sizes[14]; }; } // End of namespace Image |