diff options
author | Sven Hesse | 2008-12-09 14:56:33 +0000 |
---|---|---|
committer | Sven Hesse | 2008-12-09 14:56:33 +0000 |
commit | 99322bf68f7b21e53265b02ceaf06c4a85e59da9 (patch) | |
tree | 09151265e95e75d6c01a95079de707109d3a3106 /engines/gob/coktelvideo.h | |
parent | 9a788d8bf3cc35640312071178c80b7b2cd62c6f (diff) | |
download | scummvm-rg350-99322bf68f7b21e53265b02ceaf06c4a85e59da9.tar.gz scummvm-rg350-99322bf68f7b21e53265b02ceaf06c4a85e59da9.tar.bz2 scummvm-rg350-99322bf68f7b21e53265b02ceaf06c4a85e59da9.zip |
Experimental support for VMD frames encoded in Indeo 3 (Indeo 3 decoder closely based on the one in ffmpeg).
Since Indeo 3 uses full 24bit colors (in YUV-space), frame data is mapped to the current palette (using an octree, should be the fasted way, methinks) and dithered with the Sierra-2-4A ("Filter Light") error distribution algorithm.
svn-id: r35290
Diffstat (limited to 'engines/gob/coktelvideo.h')
-rw-r--r-- | engines/gob/coktelvideo.h | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/engines/gob/coktelvideo.h b/engines/gob/coktelvideo.h index 72df93ab56..c167db68cd 100644 --- a/engines/gob/coktelvideo.h +++ b/engines/gob/coktelvideo.h @@ -33,6 +33,8 @@ namespace Gob { +class Indeo3; + /** Common interface for handling Coktel Vision videos and derivated formats. */ class CoktelVideo { public: @@ -51,7 +53,9 @@ public: /** Has a frame positions table. */ kFeaturesFramesPos = 0x200, /** Has video. */ - kFeaturesVideo = 0x400 + kFeaturesVideo = 0x400, + /** Is a full color (non-paletted) video. */ + kFeaturesFullColor = 0x4000 }; enum StateFlags { @@ -133,6 +137,8 @@ public: /** Set the frame rate. */ virtual void setFrameRate(int16 frameRate) = 0; + virtual void setPalette(const byte *palette) = 0; + /** Set the coordinations where to draw the video. */ virtual void setXY(int16 x, int16 y) = 0; /** Use a specific memory block as video memory. */ @@ -179,6 +185,9 @@ public: virtual void copyCurrentFrame(byte *dest, uint16 left, uint16 top, uint16 width, uint16 height, uint16 x, uint16 y, uint16 pitch, int16 transp = -1) = 0; + +protected: + virtual void notifyChangedPalette() {} }; /** Coktel Vision's IMD files. @@ -212,6 +221,8 @@ public: void setFrameRate(int16 frameRate); + void setPalette(const byte *palette); + bool load(Common::SeekableReadStream &stream); void unload(); @@ -256,6 +267,7 @@ protected: uint32 _frameDataSize, _vidBufferSize; byte *_frameData, *_vidBuffer; + uint32 _frameDataLen; byte _palette[768]; @@ -331,6 +343,8 @@ protected: } PACKED_STRUCT; struct Part { PartType type; + byte field_1; + byte field_E; uint32 size; int16 left; int16 top; @@ -359,10 +373,12 @@ protected: byte _soundBytesPerSample; byte _soundStereo; // (0: mono, 1: old-style stereo, 2: new-style stereo) + Indeo3 *_codecIndeo3; + void clear(bool del = true); State processFrame(uint16 frame); - uint32 renderFrame(int16 left, int16 top, int16 right, int16 bottom); + uint32 renderFrame(int16 &left, int16 &top, int16 &right, int16 &bottom); void deRLE(byte *&srcPtr, byte *&destPtr, int16 len); @@ -372,6 +388,8 @@ protected: void filledSoundSlice(uint32 size); void filledSoundSlices(uint32 size, uint32 mask); void deDPCM(byte *soundBuf, byte *dataBuf, int16 &init, uint32 n); + + void notifyChangedPalette(); }; } // End of namespace Gob |