It makes more sense for a bit mask to use an unsigned type.
The change should be source and binary compatible on all
supported systems, hence micro version bump.
Fixes a few invalid shifts.
Signed-off-by: Mans Rullgard <mans@mansr.com>
Add some parameters to existing function documentation.
Remove some unneeded documentation.
Convert some static function documentation to non-doxygen style.
Move bit counting to the bit allocation function. Move exponent grouping to
after bit allocation. This will allow for adjustment of bandwidth parameters
during bit allocation without having to do exponent grouping multiple times.
This checks if the set of selected exponent strategies for all blocks in a
channel are in the frame exponent strategy table, and if so, writes the
table index instead of each strategy. This saves up to 7 bits per channel per
frame, so the overall effect on quality is small.
Since both the fixed-point and floating-point encoders use the FFTContext,
this no longer needs to be in a separate context. Also, when a short-transform
context is added, the same MDCT window will be used.
They introduce too much complexity for very little benefit. The result is that
encoding will be more likely to fail at extremely low bitrates where quality
would be awful anyway.
Aligned local variables must use the LOCAL_ALIGNED macro to ensure
correct alignment on all systems. The unusual size argument to
memset is required since the implementation of LOCAL_ALIGNED may
use a pointer to an array.
Signed-off-by: Mans Rullgard <mans@mansr.com>
Uninitialized coefficients were being used to generate exponents, some
of which actually ended up in the final stream. Even though, they were
just extra exponents that are not used by any decoder, it is still
better to have consistent output for testing. This also fixes valgrind
errors.
Channel coupling is an optional AC-3 feature that increases quality by
combining high frequency information from multiple channels into a
single channel. The per-channel high frequency information is sent with
less accuracy in both the frequency and time domains. This allows more
bits to be used for lower frequencies while preserving enough
information to reconstruct the high frequencies.