diff options
author | Paul Gilbert | 2016-09-06 08:13:10 -0400 |
---|---|---|
committer | Paul Gilbert | 2016-09-10 10:08:12 -0400 |
commit | c165826316a71b378e3493a4a5fb6a6e1740bbab (patch) | |
tree | fc657dae321669b08bb962510002dd8d0c01535a /image/codecs/indeo4.cpp | |
parent | 5f0962696f97df2cce27d065d99b04243de59334 (diff) | |
download | scummvm-rg350-c165826316a71b378e3493a4a5fb6a6e1740bbab.tar.gz scummvm-rg350-c165826316a71b378e3493a4a5fb6a6e1740bbab.tar.bz2 scummvm-rg350-c165826316a71b378e3493a4a5fb6a6e1740bbab.zip |
IMAGE: Created Indeo decoder base class for shared Indeo4/5 functionality
Diffstat (limited to 'image/codecs/indeo4.cpp')
-rw-r--r-- | image/codecs/indeo4.cpp | 21 |
1 files changed, 4 insertions, 17 deletions
diff --git a/image/codecs/indeo4.cpp b/image/codecs/indeo4.cpp index bce9b5ad78..29616e9c63 100644 --- a/image/codecs/indeo4.cpp +++ b/image/codecs/indeo4.cpp @@ -28,7 +28,6 @@ * written, produced, and directed by Alan Smithee */ -#include "common/system.h" #include "common/endian.h" #include "common/stream.h" #include "common/textconsole.h" @@ -40,19 +39,8 @@ namespace Image { #define IVI4_PIC_SIZE_ESC 7 -Indeo4Decoder::Indeo4Decoder(uint16 width, uint16 height) { - _pixelFormat = g_system->getScreenFormat(); - _surface = new Graphics::ManagedSurface(); - _surface->create(width, height, _pixelFormat); - _ctx.gb = nullptr; - _ctx.pic_conf.pic_width = _ctx.pic_conf.pic_height = 0; +Indeo4Decoder::Indeo4Decoder(uint16 width, uint16 height) : IndeoDecoderBase(width, height) { _ctx.is_indeo4 = true; - _ctx.show_indeo4_info = false; - _ctx.b_ref_buf = 3; // buffer 2 is used for scalability mode -} - -Indeo4Decoder::~Indeo4Decoder() { - delete _surface; } bool Indeo4Decoder::isIndeo4(Common::SeekableReadStream &stream) { @@ -80,14 +68,13 @@ const Graphics::Surface *Indeo4Decoder::decodeFrame(Common::SeekableReadStream & // Set up the GetBits instance for reading the stream _ctx.gb = new GetBits(stream); - // Decode the header - int err = decodePictureHeader(); + // Decode the frame + int err = decodeIndeoFrame(); + // Free the bit reader delete _ctx.gb; _ctx.gb = nullptr; - // TODO - err = -1; return (err < 0) ? nullptr : &_surface->rawSurface(); } |