Color depths greater than 32 have grayscale bit 0x20 set, but the
decoder incorrectly treats 32 as grayscale and and clears the bit,
leaving the color depth as zero and causing codecs to fail.
Confirmed correct behavior in the ffmpeg code that the decoder was
based off. The decoder was introduced with the Mohawk engine in
2009,so presumably no Mohawk movies had color depth 32.
Fixes videos in the Director game Virtual Cocktail Bar
QuickTimeDecoder has a bug which causes the mediaTime offset to be
ignored when a track begins with an empty edit and is followed by an
edit with a non-zero mediaTime. This causes the KQ6 Mac opening movie
to start several tracks at unintended frames (they're never supposed to
be displayed) and the intended frames at the end of the edit to never
be displayed. (Bug #11085)
QuickTimeDecoder has a workaround for a video in a Spanish version of
Riven, but this workaround breaks valid QuickTime videos such as the
KQ6 Macintosh opening movie. (Bug #11085)
Until the original Riven video bug can be debugged to improve the
workaround, it is now disabled unless an engine enables it.
Workaround added in: b8abe40085
Mostly done using the following Ruby script:
(Dir.glob('**/*.cpp') + Dir.glob('**/*.h')).each do |file|
s = File.read(file, encoding: 'iso8859-1')
t = s.gsub(/(([\w_.\[\]]+)\s*=\s*new\s+\S+?\[[^\]]+?\](?!\())([^\{\}]*?)\n\s+memset\(\s*\2\s*,\s*0\s*,[^;]*;/m, '\1()\3')
if t != s
File.open(file, 'w') { |io| io.write(t) }
end
end
This emulates the "slow" render mode of the Smacker lib,
which returns the blocks changed each frame instead of full frames.
Nightlong relies on this to correctly refresh its screen buffer.
Excerpt from specification:
The first byte of each packet is the column skip count;
the second byte is the RLE count byte.
Zero or more data words follow the RLE count byte.
Don't pass flags to various decoding blocks thay don't need it.
Unifiy frame handling in a unique procedure which handles deinterlacing.
Don't memcpy with HNM4A frames, point the surface at framebuffer