[Ffmpeg-devel] ac3 encoder volume correction

Reimar Döffinger Reimar.Doeffinger
Tue Nov 21 20:31:03 CET 2006


Hello,
On Tue, Nov 21, 2006 at 01:20:29PM +0100, Michael Niedermayer wrote:
[...]
> >             }
> > 
> > @@ -1379,7 +1384,7 @@
> >             v = 14 - log2_tab(input_samples, N);
> >             if (v < 0)
> >                 v = 0;
> > -            exp_samples[i][ch] = v - 9;
> > +            exp_samples[i][ch] = v - 10;
> 
> this may or may not be correct (=requires quotation from the ac3 spec
> saying that this is correct)

With the short time I spent on it I could not even really see what the
code has to do with the spec at all :-), but I wondered about this:
"The number of leading zeroes (up to a maximum of 24) becomes the initial
exponent value" (section 8.2.7)
Now this makes me wonder, the current code uses av_log2 to determine
this it seems, but the value of av_log2 is the same (i.e. 0) for both 0
and 1, while the number of "leading" zeros is different...
Maybe this helps someone.

Greetings,
Reimar D?ffinger




More information about the ffmpeg-devel mailing list