[Scummvm-git-logs] scummvm master -> ff1b7ff89d03dce2e10bda136c954bb20c384c36
bonki
bonki at users.noreply.github.com
Thu May 17 19:47:03 CEST 2018
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:
ff1b7ff89d VIDEO: FLIC: Fix decoding of BYTE_RUN/FLI_BRUN chunks
Commit: ff1b7ff89d03dce2e10bda136c954bb20c384c36
https://github.com/scummvm/scummvm/commit/ff1b7ff89d03dce2e10bda136c954bb20c384c36
Author: whiterandrek (whiterandrek at gmail.com)
Date: 2018-05-17T19:45:16+02:00
Commit Message:
VIDEO: FLIC: Fix decoding of BYTE_RUN/FLI_BRUN chunks
Our decoder currently only supports the standard FLC format which
does not rely on the stored packet count (which is part of the FLI
format and limited to 255 packets per line).
Instead, the image width should be used as criterion when decoding
a frame which allows for more than 255 packets per line.
See also https://www.compuphase.com/flic.htm
Changed paths:
video/flic_decoder.cpp
diff --git a/video/flic_decoder.cpp b/video/flic_decoder.cpp
index a1976e2..57d8fb5 100644
--- a/video/flic_decoder.cpp
+++ b/video/flic_decoder.cpp
@@ -265,9 +265,9 @@ void FlicDecoder::FlicVideoTrack::copyFrame(uint8 *data) {
void FlicDecoder::FlicVideoTrack::decodeByteRun(uint8 *data) {
byte *ptr = (byte *)_surface->getPixels();
- while ((int32)(ptr - (byte *)_surface->getPixels()) < (getWidth() * getHeight())) {
- int chunks = *data++;
- while (chunks--) {
+ for (int i = 0; i < getHeight(); ++i) {
+ data++;
+ for (int j = 0; j < getWidth();) {
int count = (int8)*data++;
if (count > 0) {
memset(ptr, *data++, count);
@@ -277,6 +277,7 @@ void FlicDecoder::FlicVideoTrack::decodeByteRun(uint8 *data) {
data += count;
}
ptr += count;
+ j += count;
}
}
More information about the Scummvm-git-logs
mailing list