All users of BitStream were in fact using a specific, hardcoded variant,
so we can hardcode that variant, removing the need for virtual calls,
and enabling inlining.
The accumulator 'bases' is 16-bit but when used in 8-bit audio we need to
wrap as if 'bases' is 8-bit. Clipping on output is no longer required.
This fixes noise in The Neverhood's in-game "making of" videos,
particularly the section called "Construction, powertools & painting",
hash 0x21080009.
The intro video in The Neverhood is 16-bit audio and was not affected by
this bug. No other videos or games have been tested.
Apparently, in some movies the Smacker decoder would peek ahead
past the end of the bitstream, even though it didn't necessarily
use all of those bits later. Fix that by first checking how many
bits are still available. (This was originally reported for the
mg1shoot.smk cutscene in the 4 CD version of The Feeble Files.)
This name change accompanies a slight meaning change; now it means the current time position from the beginning of the video and not from starting the video.
Certain codecs seem to use a Surface with Bpp 2, but do not have any proper
format description. Whoever is maintaining these should check this commit and
fix the format properly.
MKID_BE relied on unspecified behavior of the C++ compiler,
and as such was always a bit unsafe. The new MKTAG macro
is slightly less elegant, but does no longer depend on the
behavior of the compiler.
Inspired by FFmpeg, which has an almost identical macro.
This should not cause any code behavior changes at this time, but if any
of the intermediate VideoDecoder classes ever starts to overload stuff,
this would become important.
svn-id: r55841