[Scummvm-git-logs] scummvm master -> 97ae70740c160c27b96a5af516b549a879fada94
neuromancer
noreply at scummvm.org
Wed Jun 3 09:51:10 UTC 2026
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://api.github.com/repos/scummvm/scummvm .
Summary:
97ae70740c SCUMM: RA: add codec4/5 post processing
Commit: 97ae70740c160c27b96a5af516b549a879fada94
https://github.com/scummvm/scummvm/commit/97ae70740c160c27b96a5af516b549a879fada94
Author: Manuel Lauss (manuel.lauss at gmail.com)
Date: 2026-06-03T11:51:05+02:00
Commit Message:
SCUMM: RA: add codec4/5 post processing
Adds the post-processing found in the high-quality implementations
of codec4/5/33/34 of RA1 DOS: It reduces the inherent "blocky" look
of these codecs.
Changed paths:
engines/scumm/smush/rebel/codec_ra1.cpp
diff --git a/engines/scumm/smush/rebel/codec_ra1.cpp b/engines/scumm/smush/rebel/codec_ra1.cpp
index e9c0a0ba9e9..3620dea06df 100644
--- a/engines/scumm/smush/rebel/codec_ra1.cpp
+++ b/engines/scumm/smush/rebel/codec_ra1.cpp
@@ -317,6 +317,26 @@ void smushDecodeRA1Block(byte *dst, const byte *src, int left, int top, int widt
*(dst + yo * pitch + xo) = *gs;
}
}
+
+ /* post processing of the hiquality implementations of codec4/5,
+ * see e.g. ASSAULT.EXE 121e8 - 12242
+ */
+ if (x <= 0 || y <= 0 || (x + 4) >= mx || (y + 4) >= my)
+ continue; /* skip unreachable edges */
+ const uint32 dstoff = y * pitch + x;
+ if (s_ra1C4Param & 0x80) {
+ for (int k = 0; k < 4; k++)
+ *(dst + dstoff + k) = ((*(dst + dstoff + k) + *(dst + dstoff + k - pitch)) >> 1) | 0x80;
+ *(dst + dstoff + 1 * pitch) = ((*(dst + dstoff + 1 * pitch) + *(dst + dstoff + 1 * pitch - 1)) >> 1) | 0x80;
+ *(dst + dstoff + 2 * pitch) = ((*(dst + dstoff + 2 * pitch) + *(dst + dstoff + 2 * pitch - 1)) >> 1) | 0x80;
+ *(dst + dstoff + 3 * pitch) = ((*(dst + dstoff + 3 * pitch) + *(dst + dstoff + 3 * pitch - 1)) >> 1) | 0x80;
+ } else {
+ for (int k = 0; k < 4; k++)
+ *(dst + dstoff + k) = ((*(dst + dstoff + k) + *(dst + dstoff + k - pitch)) >> 1) & 0x7f;
+ *(dst + dstoff + 1 * pitch) = ((*(dst + dstoff + 1 * pitch) + *(dst + dstoff + 1 * pitch - 1)) >> 1) & 0x7f;
+ *(dst + dstoff + 2 * pitch) = ((*(dst + dstoff + 2 * pitch) + *(dst + dstoff + 2 * pitch - 1)) >> 1) & 0x7f;
+ *(dst + dstoff + 3 * pitch) = ((*(dst + dstoff + 3 * pitch) + *(dst + dstoff + 3 * pitch - 1)) >> 1) & 0x7f;
+ }
}
}
}
More information about the Scummvm-git-logs
mailing list