[Scummvm-cvs-logs] scummvm master -> c620f1076dc50106350c881278ffba49b8c61c6f
m-kiewitz
m_kiewitz at users.sourceforge.net
Tue Nov 24 16:25:48 CET 2015
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
c620f1076d ACCESS: movie player: convert 6-bit pal properly
Commit: c620f1076dc50106350c881278ffba49b8c61c6f
https://github.com/scummvm/scummvm/commit/c620f1076dc50106350c881278ffba49b8c61c6f
Author: Martin Kiewitz (m_kiewitz at users.sourceforge.net)
Date: 2015-11-24T16:26:02+01:00
Commit Message:
ACCESS: movie player: convert 6-bit pal properly
Changed paths:
engines/access/video/movie_decoder.cpp
diff --git a/engines/access/video/movie_decoder.cpp b/engines/access/video/movie_decoder.cpp
index c67dac6..3e1a496 100644
--- a/engines/access/video/movie_decoder.cpp
+++ b/engines/access/video/movie_decoder.cpp
@@ -617,13 +617,17 @@ bool AccessVIDMovieDecoder::StreamVideoTrack::skipOverPalette(Common::SeekableRe
}
void AccessVIDMovieDecoder::StreamVideoTrack::decodePalette(Common::SeekableReadStream *stream) {
+ byte red, green, blue;
assert(stream);
// VID files use a 6-bit palette and not a 8-bit one, we change it to 8-bit
for (uint16 curColor = 0; curColor < 256; curColor++) {
- _palette[curColor * 3] = stream->readByte() << 2;
- _palette[curColor * 3 + 1] = stream->readByte() << 2;
- _palette[curColor * 3 + 2] = stream->readByte() << 2;
+ red = stream->readByte() & 0x3F;
+ green = stream->readByte() & 0x3F;
+ blue = stream->readByte() & 0x3F;
+ _palette[curColor * 3] = (red << 2) | (red >> 4);
+ _palette[curColor * 3 + 1] = (green << 2) | (green >> 4);
+ _palette[curColor * 3 + 2] = (blue << 2) | (blue >> 4);
}
_dirtyPalette = true;
More information about the Scummvm-git-logs
mailing list