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.
This makes channel coupling more accurate, increasing quality for stereo
content. It also simplifies exponent extraction and mantissa quantization
by no longer needing to apply an offset to the exponents.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Currently it is always 4, but this change will allow it to be adjusted when
bandwidth-related features are added such as channel coupling, enhanced
channel coupling, and spectral extension.
(cherry picked from commit 53e35fd340)
Currently it is always 4, but this change will allow it to be adjusted when
bandwidth-related features are added such as channel coupling, enhanced
channel coupling, and spectral extension.
The rematrixing strategy reuse flags are not reset between frames, so they
need to be initialized for all blocks, not just block 0.
Signed-off-by: Mans Rullgard <mans@mansr.com>
(cherry picked from commit 5b54d4b376)
The rematrixing strategy reuse flags are not reset between frames, so they
need to be initialized for all blocks, not just block 0.
Signed-off-by: Mans Rullgard <mans@mansr.com>
This is to match the value in every (E-)AC-3 file from commercial sources.
It has a negligible effect on audio quality.
Signed-off-by: Mans Rullgard <mans@mansr.com>
(cherry picked from commit 50d7140441)
This is to match the value in every (E-)AC-3 file from commercial sources.
It has a negligible effect on audio quality.
Signed-off-by: Mans Rullgard <mans@mansr.com>
It is pretty hopeless that other considerable projects will adopt
libavutil alone in other projects. Projects that need small footprint
are better off with more specialized libraries such as gnulib or rather
just copy the necessary parts that they need. With this in mind, nobody
is helped by having libavutil and libavcore split. In order to ease
maintenance inside and around FFmpeg and to reduce confusion where to
put common code, avcore's functionality is merged (back) to avutil.
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
This patch changes the exponent difference threshold in the exponent
strategy decision function of the AC-3 encoder. I tested lowering in
increments of 100. From 1000 down to 500 generally increased in quality
with each step, but 400 was generally much worse.
Signed-off-by: Mans Rullgard <mans@mansr.com>
(cherry picked from commit c3beafa0f1)
This patch changes the exponent difference threshold in the exponent
strategy decision function of the AC-3 encoder. I tested lowering in
increments of 100. From 1000 down to 500 generally increased in quality
with each step, but 400 was generally much worse.
Signed-off-by: Mans Rullgard <mans@mansr.com>
exponent strategies for a single channel to compute_exp_strategy_ch().
This allows for removal of the temporary pointer arrays.
Originally committed as revision 26356 to svn://svn.ffmpeg.org/ffmpeg/trunk
This improves the audio quality significantly for stereo source with both the
fixed-point and floating-point AC-3 encoders.
Update acodec-ac3_fixed and seek-ac3_rm test references.
Originally committed as revision 26271 to svn://svn.ffmpeg.org/ffmpeg/trunk
instead of doing it separately in 2 different functions.
This makes float AC-3 encoding approx. 3-7% faster overall.
Also, the coefficient conversion can now be easily SIMD-optimized.
Originally committed as revision 26232 to svn://svn.ffmpeg.org/ffmpeg/trunk
accessing of structs and arrays inside the loop.
Approx. 30% faster in function extract_exponents().
Originally committed as revision 26226 to svn://svn.ffmpeg.org/ffmpeg/trunk
Fixed-point AC-3 encoder renamed to ac3_fixed.
Regression test acodec-ac3 renamed to acodec-ac3_fixed.
Regression test lavf-rm changed to use ac3_fixed encoder.
Originally committed as revision 26209 to svn://svn.ffmpeg.org/ffmpeg/trunk
maximum value of 1023.
This speeds up overall encoding depending on the content and bitrate.
The most improvement is with high bitrates and/or low complexity content.
Originally committed as revision 26181 to svn://svn.ffmpeg.org/ffmpeg/trunk
instead of 64. This will change output in some cases, but it happens to not
affect the AC-3 regression tests.
Originally committed as revision 26180 to svn://svn.ffmpeg.org/ffmpeg/trunk