codecs/video/Legacy: Cinepak, Microsoft Video 1, QuickTime RLE / SMC and FLIC decoders

Registry decoders (codecs/video/Video BUILTIN: cvid, CRAM / MSVC / WHAM, 'rle ', 'smc ', AFLC), rgba8 pictures
painted over the previous picture, palettes from track.palette (or packet.palette). Bit-exact with ffmpeg on
28 AVI / MOV / MKV fixtures (tools/fixtures/legacy.py: ffmpeg's encoders plus encoders in _legacy_mux.py for
QuickTime RLE 1/2/4/8-bit, 8-bit MS Video 1 and Cinepak). Also fixes QtPalette's big-endian reads.
This commit is contained in:
4DBug committed 2026-10-31 14:20:17 -05:00
1 parent 7b4bf1ee43
commit 8e3873c9fb
14 files changed
+2171 -3

No files matched your search

@@ -10,7 +10,14 @@
-- -- depth: the stored depth (24, 32, 40, ...), palette: 256 u32 entries (bytes R, G, B, 0xFF) | nil
--
-- Never throws.
local readu8, readu16, readu32, writeu32 = buffer.readu8, buffer.readu16, buffer.readu32, buffer.writeu32
local readu8, writeu32 = buffer.readu8, buffer.writeu32
local function readu16(b: buffer, o: number): number -- big-endian
return readu8(b, o) * 256 + readu8(b, o + 1)
end
local function readu32(b: buffer, o: number): number
return readu16(b, o) * 65536 + readu16(b, o + 2)
end
local QtPalette = {}