> >
> >
> > Hi all,
> > played a bit with calcnoise2. Just tweaked the inner most loops
> > to check first whether ix[]=0 (which is pretty common). This then skips the
> > pow43 table look up and calculation.
> > This gives about a 25-30% speedup for this routine.
> >
> > one note about this routine, is that the diff[] values can sometimes be
> > negative. In calc_noise1 this really didn't matter as we were squaring the
> > difference. in calcnoise2 however, we're doing a combination of the two
> > differences in a mid/side fashion. bug or feature?
> >
>
> Thanks Mike, I just added this.
>
> diff[] < 0 is no problem because the final sum is still a square:
>
>
> > sum[0] += (diff[0]+diff[1])*(diff[0]+diff[1]);
> > sum[1] += (diff[0]-diff[1])*(diff[0]-diff[1]);
>
Why not dropping the 10*log10 thingy? This would speed up calc_noise further.
There is no real need to calculate noise on a db basis.
But we have to be careful, because this would require changes at least in
amp_scalefac_bands and some other points where we use noise in a db
context now.
Robert
--
MP3 ENCODER mailing list ( http://geek.rcc.se/mp3encoder/ )