LAME source code is now on sourceforge.net :-) We still have 3 files
with ISO code, so this may not be 100% legit, but it is source code
only and lets try to keep it low profile!
You should be able to get the latest version from anon cvs,
which has Segher's quantization fix. (and Takehiro's implementaton).
One problem: The code is now about 50% slower, mostly because
the old quantize_xrpow had some hand rolled asm for gcc and MSVC.
Recently Acy Stapp <[EMAIL PROTECTED]> send a MSVC assembly verson
of quantize_xrpow() that boosted his speed from 2.6x to 3.3x. It
hadn't made it into the code, and now it looks like we will change the
algorithm, so I've asked him if he would write a new version. Any asm
hackers out there want to take a crack at the gcc code?
the routine is quantize_xrpow(), in quantize-pvt.c.
The old routine is also still there, quantize_xrpow_old().
Mark
> From: Takehiro Tominaga <[EMAIL PROTECTED]>
> Date: Sat, 27 Nov 1999 22:52:23 +0900
>
> >>>>> "S" == Segher Boessenkool <[EMAIL PROTECTED]> writes:
>
> S> Calculate i = floor(pow(x, 0.75)) as usual. i is integer.
>
> S> Now:
>
> S> if (x > pow(0.5 * (pow(i, 8.0/3.0) + pow(i+1, 8.0/3.0)), 0.375))
> S> i++;
>
> S> and i is the quantized value.
>
> S> Rationale: minimize the quantization noise per sample. The iso
> S> formula merely minimizes the average case, and not really good
> S> either.
>
> Wow! this will bring us a big quality improvement....
>
> S> Hope you like it,
>
> Yes, but I don't like there's "if statement" in a loop :p.
> My implementation is this.
>
> Old formula is
> *pi++ = (int)(istep * (*xp++) + 0.4054);
>
> And I changed
> x = istep * *xp++;
> *pi++ = (int)(x + adj43[(int)x]);
>
> And adj43[] is a lookup table, building up like this.
>
> for (i = 0; i < PRECALC_SIZE - 1; i++)
> adj43[i] = (i + 1) - pow(0.5 * (pow43[i] + pow43[i + 1]), 0.75);
>
> adj43[i] = 0.5;
> ---
> Takehiro TOMINAGA // may the source be with you!
> --
> MP3 ENCODER mailing list ( http://geek.rcc.se/mp3encoder/ )
>
--
MP3 ENCODER mailing list ( http://geek.rcc.se/mp3encoder/ )