This allows the AC-3 decoder to be used directly with RealMedia
decoders that unlike the libavformat one do not byte-swap automatically.
Since the new code is only used in case we would fail directly otherwise
there should be no risk for regressions.
Depending on error_recognition is not correct, low values do
certainly not mean it is ok to crash.
Based on a patch by Reimar Döffinger <Reimar.Doeffinger@gmx.de>
These windows do not really belong in fft/mdct files and were
easily confused with the similarly named tables used by rdft.
Signed-off-by: Mans Rullgard <mans@mansr.com>
This function is not tightly coupled to mdct, and it's in the way
of making a fixed-point mdct implementation.
Signed-off-by: Mans Rullgard <mans@mansr.com>
This removes the rather pointless wrappers (one not even inline)
for calling the fft_calc and related function pointers.
Signed-off-by: Mans Rullgard <mans@mansr.com>
Since initially committed in 2004, this codec has only been touched
for maintenanance. Functionally, it contains no novel ideas and
its intended audience is better served by existing mature codecs.
Signed-off-by: Mans Rullgard <mans@mansr.com>
3GPP:
Remove ffac from and move min_snr out of AacPsyBand.
Rearrange AacPsyCoeffs to make it easier to implement energy spreading.
Rename the band[] array to bands[]
Copy energies and thresholds at the end of analysis.
LAME:
Use a loop instead of an if chain in LAME windowing.
There are several places where a buffer is byte-swapped in 16-bit units.
This allows them to share code which can be optimised for various
architectures.
Signed-off-by: Mans Rullgard <mans@mansr.com>
If the function is not inlined, an immmediate cannot be used for the
shift parameter, so the %cl register must be used instead in that case.
This fixes compilation for x86-32 using gcc with --disable-optimizations.
This fixes unexpected name collisions that were occurring with variables
declared within the macros.
It also fixes the fate-acodec-ac3_fixed regression test on x86-32.
This increases the accuracy of coefficients, leading to improved quality.
Rescaling of the coefficients to full 25-bit accuracy is done rather than
offsetting the exponent values. This requires coefficient scaling to be done
before determining the rematrixing strategy. Also, the rematrixing strategy
calculation must use 64-bit math to prevent overflow due to the higher
precision coefficients.