You are here: Home » Reply » Reply To: ivorbis

Reply To: ivorbis


By the way, in case people are puzzled why and when all this “tremor-patch” thing has to be done, the background is actually quite simple:

1. oggdec uses normally floating point arithmetic for the decoding.

2. Some of the small network storage units (as e.g. the NSLU) have a RISC processor that does NOT have a floating point unit in the processor. No problem, the linux kernel uses software emulation for such instructions then.

3. The software emulation of an FPU is of course way slower than a hardware unit. And if the processor is then in general underpowered (as these CPUs often are!), it won’t work fast enough.

4. The tremor patch is a hack that substitutes all floating point arithmetic with integer operations. That runs then natively on the processor and is much faster.

5. Oh, and to make it more nasty, some of the ARM processors are BIG endian (this means how a 2 byte word is encoded, first highest significant byte, then the LSB – that is exotic!), while all intel and most other are little endian (as all normal computers). So if you run a tremor patch written for a big endian processor (this patch is badly (!) written as it hardcodes a byteswap!) on a little-endian machine, you get the bytes swapped and you hear only noise, because the LEAST significant byte gets interpreted as the most significant byte. Nasty.

6. As these CPUs without a FPU are quite rare that tremor patch is not mainstream. On all “normal” CPUs the FPU version works perfect and better than the tremor one.