----- Original Message ----- 
From: "Gabriel Bouvigne" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, November 27, 1999 1:03 PM
Subject: Re: [MP3 ENCODER] quantization formula


> > The midpoint (in terms of the error) is:  .5 * (1 + 2.52) = 1.76.
> > So if x<1.76, we should take i=1 and if x>1.76 we take i=2.
> 
> I think that for this kind of test, something like:
> i=(int)(x^.75+.5)
> would be faster than a comparison, and produces the same output.

Only if ((FLT_ROUNDS == 0) || (FLT_ROUNDS == 3))

(x is always +ve here, right?)

-- Mat.


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

Reply via email to