Does this give any speed improvement?  It is beginning to get
rather complicated for what I'm guessing is very little gain?

I did add your code for adj43asm, which lead me to the following:

Since ix <= 8191+15 = 8206, 
pow43, adj43 and adj43asm need to be dimensioned 
from 0..8206, so PRECALC_SIZE should be 8207, not 8206?

Mark

> From: Mathew Hendry <[EMAIL PROTECTED]>
> Date: Wed, 8 Dec 1999 16:19:06 -0000 
> 
> In quantize-pvt.c I've also adjusted iteration_init to use the pow43 lookup
> table to generate adj43asm. Should be a bit faster, and fixes a bug which
> would leave the last entry in the array uninitialised.
> 
> diff -r1.11 quantize-pvt.c
> 133,137c133,135
> < 
> <     adj43asm[0]=0.0;
> <     for (i = 1; i < PRECALC_SIZE - 1; i++)
> <     adj43asm[i] = i -.5 - pow(0.5 * (pow((double)(i - 1), 4.0/3.0)
> <                          + pow((double)i,4.0/3.0)), 0.75);
> ---
> >     adj43asm[0] = 0.0;
> >     for (i = 1; i < PRECALC_SIZE; i++)
> >         adj43asm[i] = i - 0.5 - pow(0.5 * (pow43[i - 1] + pow43[i]),
> 0.75);
> 376a375
> >     FLOAT8 xrp_max;
> 378a378,390
> > 
> >     if (highq) {
> >         int i;
> >         const FLOAT8 *xrp = xrpow;
> >         xrp_max = 0;
> >         for (i = 576 / 4; i > 0; --i, xrp += 4) {
> >             if (xrp[0] > xrp_max) xrp_max = xrp[0];
> >             if (xrp[1] > xrp_max) xrp_max = xrp[1];
> >             if (xrp[2] > xrp_max) xrp_max = xrp[2];
> >             if (xrp[3] > xrp_max) xrp_max = xrp[3];
> >         }
> >     }
> > 
> 381,382c393,398
> <       cod_info->quantizerStepSize += 1.0;
> <       bits = count_bits(l3_enc[gr][ch], xrpow, cod_info);  
> ---
> >         cod_info->quantizerStepSize += 1.0;
> >         if (highq && xrp_max * pow(2.0, cod_info->quantizerStepSize *
> -0.1875) >= PRECALC_SIZE - 0.5) {
> >             bits = 100000;
> >         } else {
> >             bits = count_bits(l3_enc[gr][ch], xrpow, cod_info);  
> >         }
> 982a999,1012
> >     FLOAT8 xrp_max;
> > 
> >     if (highq) {
> >         int i;
> >         const FLOAT8 *xrp = xrspow;
> >         xrp_max = 0;
> >         for (i = 576 / 4; i > 0; --i, xrp += 4) {
> >             if (xrp[0] > xrp_max) xrp_max = xrp[0];
> >             if (xrp[1] > xrp_max) xrp_max = xrp[1];
> >             if (xrp[2] > xrp_max) xrp_max = xrp[2];
> >             if (xrp[3] > xrp_max) xrp_max = xrp[3];
> >         }
> >     }
> > 
> 986c1016,1020
> <     nBits = count_bits(ix, xrspow, cod_info);  
> ---
> >         if (highq && xrp_max * pow(2.0, cod_info->quantizerStepSize *
> -0.1875) >= PRECALC_SIZE - 0.5) {
> >             nBits = 100000;
> >         } else {
> >             nBits = count_bits(ix, xrspow, cod_info);  
> >         }
> 
> diff -r1.3 takehiro.c
> 549a550,551
> > 
> > /*
> 556a559,560
> > */
> > 
> 
> -- Mat.
> --
> MP3 ENCODER mailing list ( http://geek.rcc.se/mp3encoder/ )
> 
--
MP3 ENCODER mailing list ( http://geek.rcc.se/mp3encoder/ )

Reply via email to