[FFmpeg-devel] [PATCH] WMA Voice decoder
Michael Niedermayer
michaelni
Mon Feb 1 15:49:37 CET 2010
On Sun, Jan 31, 2010 at 09:53:47PM -0500, Ronald S. Bultje wrote:
> Hi,
>
> same as Reimar - all comments taken care of unless otherwise stated:
>
> On Sat, Jan 30, 2010 at 8:06 PM, Vitor Sessak <vitor1001 at gmail.com> wrote:
> > Ronald S. Bultje wrote:
> >> + ? ?idx = get_bits(gb, 7);
> >> + ? ?fcb_gain = ff_wmavoice_gain_codebook_fcb[idx] *
> >> + ? ? ? ? ? ? ? expf(ff_dot_productf(s->gain_pred_err, gain_coeff, 6) -
> >> + ? ? ? ? ? ? ? ? ? ?5.2409161640);
> >> + ? ?acb_gain = ff_wmavoice_gain_codebook_acb[idx];
> >> + ? ?pred_err = logf(av_clipf(ff_wmavoice_gain_codebook_fcb[idx], 0.05,
> >> 5.0));
> >
> > You can avoid the logf() if you replace the table by its logarithm and
> >
> > ? ?fcb_gain = expf(ff_dot_productf(s->gain_pred_err, gain_coeff, 6) -
> > ? ? ? ? ? ? ? ? ? ?5.2409161640 + ff_wmavoice_gain_codebook_fcb[idx]);
> > ? ?pred_err = av_clipf(ff_wmavoice_gain_codebook_fcb[idx], log(0.05),
> > log(5.0)));
>
> Oddly, I had the feeling this change made the code slower.
does gcc replace log(0.05) and 5.0 by constants or does t call log() ?
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
I am the wisest man alive, for I know one thing, and that is that I know
nothing. -- Socrates
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100201/3c73c191/attachment.pgp>
More information about the ffmpeg-devel
mailing list