[Scummvm-cvs-logs] SF.net SVN: scummvm:[49121] scummvm/trunk/engines/mohawk/video
mthreepwood at users.sourceforge.net
mthreepwood at users.sourceforge.net
Thu May 20 20:45:13 CEST 2010
Revision: 49121
http://scummvm.svn.sourceforge.net/scummvm/?rev=49121&view=rev
Author: mthreepwood
Date: 2010-05-20 18:45:12 +0000 (Thu, 20 May 2010)
Log Message:
-----------
The QuickTime getPalette() function should output in RGB format, not RGBA.
Modified Paths:
--------------
scummvm/trunk/engines/mohawk/video/qt_player.cpp
scummvm/trunk/engines/mohawk/video/qt_player.h
scummvm/trunk/engines/mohawk/video/video.cpp
Modified: scummvm/trunk/engines/mohawk/video/qt_player.cpp
===================================================================
--- scummvm/trunk/engines/mohawk/video/qt_player.cpp 2010-05-20 18:38:06 UTC (rev 49120)
+++ scummvm/trunk/engines/mohawk/video/qt_player.cpp 2010-05-20 18:45:12 UTC (rev 49121)
@@ -822,7 +822,7 @@
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 @@
// 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();
}
}
Modified: scummvm/trunk/engines/mohawk/video/qt_player.h
===================================================================
--- scummvm/trunk/engines/mohawk/video/qt_player.h 2010-05-20 18:38:06 UTC (rev 49120)
+++ scummvm/trunk/engines/mohawk/video/qt_player.h 2010-05-20 18:45:12 UTC (rev 49121)
@@ -114,12 +114,12 @@
// 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.
Common::SeekableReadStream *_fd;
@@ -227,7 +227,7 @@
int _ni;
ScaleMode _scaleMode;
MOVStreamContext *_streams[20];
- byte _palette[256 * 4];
+ byte _palette[256 * 3];
bool _dirtyPalette;
uint32 _beginOffset;
Modified: scummvm/trunk/engines/mohawk/video/video.cpp
===================================================================
--- scummvm/trunk/engines/mohawk/video/video.cpp 2010-05-20 18:38:06 UTC (rev 49120)
+++ scummvm/trunk/engines/mohawk/video/video.cpp 2010-05-20 18:45:12 UTC (rev 49121)
@@ -176,9 +176,9 @@
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
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list