> 
> 
> 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]);

--
MP3 ENCODER mailing list ( http://geek.rcc.se/mp3encoder/ )

Reply via email to