aboutsummaryrefslogtreecommitdiff
path: root/video/psx_decoder.cpp
diff options
context:
space:
mode:
authorWillem Jan Palenstijn2017-07-24 21:01:19 +0200
committerWillem Jan Palenstijn2017-08-24 19:46:59 +0200
commitdde259f06813534c7179a714403d8fd6fe918d09 (patch)
tree1379a5c2600057ba53032c722e3a5a1578db8507 /video/psx_decoder.cpp
parent265fc48d1590cdd503187c79dc254d65623c8d7b (diff)
downloadscummvm-rg350-dde259f06813534c7179a714403d8fd6fe918d09.tar.gz
scummvm-rg350-dde259f06813534c7179a714403d8fd6fe918d09.tar.bz2
scummvm-rg350-dde259f06813534c7179a714403d8fd6fe918d09.zip
COMMON: Remove BitStream base class to allow inlining calls
All users of BitStream were in fact using a specific, hardcoded variant, so we can hardcode that variant, removing the need for virtual calls, and enabling inlining.
Diffstat (limited to 'video/psx_decoder.cpp')
-rw-r--r--video/psx_decoder.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/video/psx_decoder.cpp b/video/psx_decoder.cpp
index 426f5eb608..973803e69f 100644
--- a/video/psx_decoder.cpp
+++ b/video/psx_decoder.cpp
@@ -499,7 +499,7 @@ void PSXStreamDecoder::PSXVideoTrack::decodeFrame(Common::SeekableReadStream *fr
_nextFrameStartTime = _nextFrameStartTime.addFrames(sectorCount);
}
-void PSXStreamDecoder::PSXVideoTrack::decodeMacroBlock(Common::BitStream *bits, int mbX, int mbY, uint16 scale, uint16 version) {
+void PSXStreamDecoder::PSXVideoTrack::decodeMacroBlock(Common::BitStream16LEMSB *bits, int mbX, int mbY, uint16 scale, uint16 version) {
int pitchY = _macroBlocksW * 16;
int pitchC = _macroBlocksW * 8;
@@ -546,7 +546,7 @@ void PSXStreamDecoder::PSXVideoTrack::dequantizeBlock(int *coefficients, float *
}
}
-int PSXStreamDecoder::PSXVideoTrack::readDC(Common::BitStream *bits, uint16 version, PlaneType plane) {
+int PSXStreamDecoder::PSXVideoTrack::readDC(Common::BitStream16LEMSB *bits, uint16 version, PlaneType plane) {
// Version 2 just has its coefficient as 10-bits
if (version == 2)
return readSignedCoefficient(bits);
@@ -576,7 +576,7 @@ int PSXStreamDecoder::PSXVideoTrack::readDC(Common::BitStream *bits, uint16 vers
if (count > 63) \
error("PSXStreamDecoder::readAC(): Too many coefficients")
-void PSXStreamDecoder::PSXVideoTrack::readAC(Common::BitStream *bits, int *block) {
+void PSXStreamDecoder::PSXVideoTrack::readAC(Common::BitStream16LEMSB *bits, int *block) {
// Clear the block first
for (int i = 0; i < 63; i++)
block[i] = 0;
@@ -611,7 +611,7 @@ void PSXStreamDecoder::PSXVideoTrack::readAC(Common::BitStream *bits, int *block
}
}
-int PSXStreamDecoder::PSXVideoTrack::readSignedCoefficient(Common::BitStream *bits) {
+int PSXStreamDecoder::PSXVideoTrack::readSignedCoefficient(Common::BitStream16LEMSB *bits) {
uint val = bits->getBits(10);
// extend the sign
@@ -672,7 +672,7 @@ void PSXStreamDecoder::PSXVideoTrack::idct(float *dequantData, float *result) {
}
}
-void PSXStreamDecoder::PSXVideoTrack::decodeBlock(Common::BitStream *bits, byte *block, int pitch, uint16 scale, uint16 version, PlaneType plane) {
+void PSXStreamDecoder::PSXVideoTrack::decodeBlock(Common::BitStream16LEMSB *bits, byte *block, int pitch, uint16 scale, uint16 version, PlaneType plane) {
// Version 2 just has signed 10 bits for DC
// Version 3 has them huffman coded
int coefficients[8 * 8];