[vorbis-dev] SIMD instructions
xiphmont at xiph.org
Wed Feb 5 09:32:12 PST 2003
> SSE2 uses 64-bit floats, Vorbis uses 32-bit...
> If we use 64-bit precision instead of 32, the result will be different.
You get slightly different rounding. It doesn't matter one bit
(actually... it matters considerably less than one bit). No aspect of
Vorbis for which an arithmetic result is roundoff-sensitive uses
> I've made an encoder/decoder with 64-bit precision
> (I've changed float(s) to double(s) almost everywhere),
> but the sound-result has changed, the tone was a little
> different (not correct).
Then you have a bug, or you're imagining the problem. You ears have
given you a hint, now go use some tools that can tell you for certain.
> The new (v1.0) huffman/codebook decoding is not
> really good if we want to make a fast assembly code (normal x86).
> It's easier to omptimize the older (RC3) routines...
They're 100% equivalent code. There's no part of Vorbis where you're
required to preserve a specific algorithm, just preserve the
equivalency. It's what optimization is all about. If rc3 was easier
to optimize, then use that version of the algorithm. I expect that
even with rc3 in assembly, the 1.0 version wins on performance.
Given that you're worried about bitreverse() being hard to do in ASM,
I also believe you have a flawed understanding about where cycles are
going anyway. Segher is right: The next few rounds of Vorbis tuning
should have nothing to do with ASM and everything to do with improving
algorithmic efficiency. Memory use patterns are a good initial
Otherwise, you'll get yourself into a position where you have a
difficult-to-maintain assembly Vorbis decoder that took a long time to
write being outperformed by a carefully tuned pure-C version that took
less time to make. It's happened to GOGO and LAME, where the C tuning
outperformed the original translation into assembly, and the assembly
took ten times as long.
--- >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