diff options
author | Matthew Hoops | 2013-06-23 19:38:22 -0400 |
---|---|---|
committer | Matthew Hoops | 2015-04-11 14:36:31 -0400 |
commit | ad32fb58326657b05731681b1a8945978928ef55 (patch) | |
tree | 14f1657c1a3e86307dc96d24b88dcccb737b7b23 /image/codecs/cinepak.h | |
parent | cfc64157a093bd369432169d069effc9e622ba21 (diff) | |
download | scummvm-rg350-ad32fb58326657b05731681b1a8945978928ef55.tar.gz scummvm-rg350-ad32fb58326657b05731681b1a8945978928ef55.tar.bz2 scummvm-rg350-ad32fb58326657b05731681b1a8945978928ef55.zip |
IMAGE: Add support for Cinepak VFW dithering
Diffstat (limited to 'image/codecs/cinepak.h')
-rw-r--r-- | image/codecs/cinepak.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/image/codecs/cinepak.h b/image/codecs/cinepak.h index e9cd437730..ce8451bf9a 100644 --- a/image/codecs/cinepak.h +++ b/image/codecs/cinepak.h @@ -72,14 +72,32 @@ public: const Graphics::Surface *decodeFrame(Common::SeekableReadStream &stream); Graphics::PixelFormat getPixelFormat() const { return _pixelFormat; } + bool containsPalette() const { return _ditherPalette != 0; } + const byte *getPalette() { _dirtyPalette = false; return _ditherPalette; } + bool hasDirtyPalette() const { return _dirtyPalette; } + bool canDither() const; + void setDither(const byte *palette); + private: CinepakFrame _curFrame; int32 _y; + int _bitsPerPixel; Graphics::PixelFormat _pixelFormat; byte *_clipTable, *_clipTableBuf; + byte *_ditherPalette; + bool _dirtyPalette; + byte *_rgbLookup; + byte *_colorMap; + void loadCodebook(Common::SeekableReadStream &stream, uint16 strip, byte codebookType, byte chunkID, uint32 chunkSize); void decodeVectors(Common::SeekableReadStream &stream, uint16 strip, byte chunkID, uint32 chunkSize); + + byte findNearestRGB(int index) const; + void ditherVectors(Common::SeekableReadStream &stream, uint16 strip, byte chunkID, uint32 chunkSize); + void ditherCodebookDetail(const CinepakCodebook &codebook, byte *dst) const; + void ditherCodebookSmooth(const CinepakCodebook &codebook, byte *dst) const; + byte getRGBLookupEntry(uint16 index) const; }; } // End of namespace Image |