[FFmpeg-devel] [PATCH] ac3enc: change default floor code to 7.
Tue Feb 15 22:40:25 CET 2011
Justin Ruggles <justin.ruggles at gmail.com> writes:
> On 02/15/2011 02:47 PM, M?ns Rullg?rd wrote:
>> Justin Ruggles <justin.ruggles at gmail.com> writes:
>>> This is to match the value in every (E-)AC-3 file from commercial sources.
>>> It has a negligible effect on audio quality.
>>> libavcodec/ac3enc.c | 2 +-
>>> tests/ref/acodec/ac3_fixed | 2 +-
>>> tests/ref/lavf/rm | 2 +-
>>> 3 files changed, 3 insertions(+), 3 deletions(-)
>> What is the effect of this change? Why is matching commercial encoders
> Matching commercial encoders makes it easier to do encoder comparisons
> for all points in the process after bit allocation.
> There are many ways to describe the effect of this field. One way to
> look at it is this:
> - exponents are used to estimate spectral density
> - this is used as a baseline for allocating bits to mantissas
> - one effect of the floor value is to change this baseline
> - the value effectively puts a ceiling on bit allocation
> - floor code 7 cooresponds to a negative floor value, so instead it
> raises the ceiling and allows bits to be allocated to mantissas when
> available rather than having them end up as padding at the end of the frame.
> If we have VBR AC-3 encoding at some point it would be better to use a
> value of 4 in that case, but for CBR AC-3 or E-AC-3 (see below) a value
> of 7 is better.
Sounds like there's no downside to the change then, so patch OK.
mans at mansr.com
More information about the ffmpeg-devel