diff options
author | Matthew Hoops | 2012-01-09 14:52:06 -0500 |
---|---|---|
committer | Willem Jan Palenstijn | 2012-02-23 22:48:18 +0100 |
commit | ee35d32a362d58891fedff9843867397f2d4497b (patch) | |
tree | 4a7ab5d7868ab22aa515fb3c6ec7e3870d5228f5 /video/psx_decoder.h | |
parent | 8812f885bc95f0e4af05c333780eb77a8c2eaa19 (diff) | |
download | scummvm-rg350-ee35d32a362d58891fedff9843867397f2d4497b.tar.gz scummvm-rg350-ee35d32a362d58891fedff9843867397f2d4497b.tar.bz2 scummvm-rg350-ee35d32a362d58891fedff9843867397f2d4497b.zip |
VIDEO: Implement PSX stream v3 frame support
Diffstat (limited to 'video/psx_decoder.h')
-rw-r--r-- | video/psx_decoder.h | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/video/psx_decoder.h b/video/psx_decoder.h index e8de507589..4223f0344e 100644 --- a/video/psx_decoder.h +++ b/video/psx_decoder.h @@ -96,15 +96,26 @@ private: Audio::QueuingAudioStream *_audStream; void queueAudioFromSector(Common::SeekableReadStream *sector); - Common::Huffman *_huffman; + enum PlaneType { + kPlaneY = 0, + kPlaneU = 1, + kPlaneV = 2 + }; + uint16 _macroBlocksW, _macroBlocksH; byte *_yBuffer, *_cbBuffer, *_crBuffer; void decodeFrame(Common::SeekableReadStream *frame); void decodeMacroBlock(Common::BitStream *bits, int mbX, int mbY, uint16 scale, uint16 version); - void decodeBlock(Common::BitStream *bits, byte *block, int pitch, uint16 scale, uint16 version); + void decodeBlock(Common::BitStream *bits, byte *block, int pitch, uint16 scale, uint16 version, PlaneType plane); - void dequantizeBlock(int *coefficients, float *block, uint16 scale); void readAC(Common::BitStream *bits, int *block); + Common::Huffman *_acHuffman; + + int readDC(Common::BitStream *bits, uint16 version, PlaneType plane); + Common::Huffman *_dcHuffmanLuma, *_dcHuffmanChroma; + int _lastDC[3]; + + void dequantizeBlock(int *coefficients, float *block, uint16 scale); void idct(float *dequantData, float *result); int readSignedCoefficient(Common::BitStream *bits); |