[vorbis-dev] Modification requests / question

Segher Boessenkool segher at wanadoo.nl
Tue Dec 26 16:21:24 PST 2000



> My experiences say that such "it's enough for the current purpose" are seeds
> for long term bugs. They are hardly to find.

That's where the macro's are for: they isolate this "hack". And it's
documented as well.

> If you really need fast code, use good code, not such hacks. The time you
> need to find errors which are a result of such hacks you can investigate in
> real optimization.

gcc is bad at converting floating point to integer on x86; this is mostly
Intel's fault, and made worse by some of the weird things of C. This macro
is there to have Vorbis on x86 just do a "fistp" for doing
"i = (int)(f+.5f);"
So there's nothing wrong in having the macgine-independent version
of the code just doing that.

> BTW: There's code available, which is:
>        - 5 times faster (on Intel)

This is done by Vorbis (10-15 times faster, actually).

>        - works always correct (0.5 => 0, 0.51 => 1, 1.5 => 2, -1.5 => -2)

This is not an issue.

Please read the source.

Ciao,

Segher

--- >8 ----
List archives:  http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'vorbis-dev-request at xiph.org'
containing only the word 'unsubscribe' in the body.  No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.



More information about the Vorbis-dev mailing list