diff options
author | Matthew Hoops | 2010-05-20 18:45:12 +0000 |
---|---|---|
committer | Matthew Hoops | 2010-05-20 18:45:12 +0000 |
commit | ad42fa0b2d613a879250cd601a4c0756bfe699cd (patch) | |
tree | 8af19338dc6a88958b46b67f5a03189fb8541876 /engines/mohawk/video | |
parent | 2e0fdda51ff9ff48bb8cbfcc770f9fd99cccd43e (diff) | |
download | scummvm-rg350-ad42fa0b2d613a879250cd601a4c0756bfe699cd.tar.gz scummvm-rg350-ad42fa0b2d613a879250cd601a4c0756bfe699cd.tar.bz2 scummvm-rg350-ad42fa0b2d613a879250cd601a4c0756bfe699cd.zip |
The QuickTime getPalette() function should output in RGB format, not RGBA.
svn-id: r49121
Diffstat (limited to 'engines/mohawk/video')
-rw-r--r-- | engines/mohawk/video/qt_player.cpp | 8 | ||||
-rw-r--r-- | engines/mohawk/video/qt_player.h | 12 | ||||
-rw-r--r-- | engines/mohawk/video/video.cpp | 6 |
3 files changed, 13 insertions, 13 deletions
diff --git a/engines/mohawk/video/qt_player.cpp b/engines/mohawk/video/qt_player.cpp index 28ddc446e9..0ed05bb84d 100644 --- a/engines/mohawk/video/qt_player.cpp +++ b/engines/mohawk/video/qt_player.cpp @@ -822,7 +822,7 @@ int QTPlayer::readSTSD(MOVatom atom) { int16 colorIndex = 255; byte colorDec = 256 / (colorCount - 1); for (byte j = 0; j < colorCount; j++) { - _palette[j * 4] = _palette[j * 4 + 1] = _palette[j * 4 + 2] = colorIndex; + _palette[j * 3] = _palette[j * 3 + 1] = _palette[j * 3 + 2] = colorIndex; colorIndex -= colorDec; if (colorIndex < 0) colorIndex = 0; @@ -864,11 +864,11 @@ int QTPlayer::readSTSD(MOVatom atom) { // up front _fd->readByte(); _fd->readByte(); - _palette[j * 4] = _fd->readByte(); + _palette[j * 3] = _fd->readByte(); _fd->readByte(); - _palette[j * 4 + 1] = _fd->readByte(); + _palette[j * 3 + 1] = _fd->readByte(); _fd->readByte(); - _palette[j * 4 + 2] = _fd->readByte(); + _palette[j * 3 + 2] = _fd->readByte(); _fd->readByte(); } } diff --git a/engines/mohawk/video/qt_player.h b/engines/mohawk/video/qt_player.h index 6a6b6b43d0..6657d3edba 100644 --- a/engines/mohawk/video/qt_player.h +++ b/engines/mohawk/video/qt_player.h @@ -114,11 +114,11 @@ public: // RewindableVideoDecoder API void rewind(); - // TODO: These audio functions need to be removed from the public and/or added to - // the VideoDecoder API directly. - void updateAudioBuffer(); // This is going to be problematic. - - + // TODO: This audio function need to be removed from the public and/or added to + // the VideoDecoder API directly. I plan on replacing this function with something + // that can figure out how much audio is needed instead of constantly keeping two + // chunks in memory. + void updateAudioBuffer(); protected: // This is the file handle from which data is read from. It can be the actual file handle or a decompressed stream. @@ -227,7 +227,7 @@ protected: int _ni; ScaleMode _scaleMode; MOVStreamContext *_streams[20]; - byte _palette[256 * 4]; + byte _palette[256 * 3]; bool _dirtyPalette; uint32 _beginOffset; diff --git a/engines/mohawk/video/video.cpp b/engines/mohawk/video/video.cpp index ce50653c73..86ecd4dedf 100644 --- a/engines/mohawk/video/video.cpp +++ b/engines/mohawk/video/video.cpp @@ -176,9 +176,9 @@ bool VideoManager::updateBackgroundMovies() { for (uint16 j = 0; j < frame->h; j++) { for (uint16 k = 0; k < frame->w; k++) { byte palIndex = *((byte *)frame->getBasePtr(k, j)); - byte r = palette[palIndex * 4]; - byte g = palette[palIndex * 4 + 1]; - byte b = palette[palIndex * 4 + 2]; + byte r = palette[palIndex * 3]; + byte g = palette[palIndex * 3 + 1]; + byte b = palette[palIndex * 3 + 2]; if (pixelFormat.bytesPerPixel == 2) *((uint16 *)newFrame->getBasePtr(k, j)) = pixelFormat.RGBToColor(r, g, b); else |