So a few days back audio engineer Hugh Fiennese postulated that the iPod may not have the computational horsepower to play OGG Vorbis files in the first place. Turns out that might not be the case, as Monty from Xiph.org — the author of the Tremor codec and OGG itself — explains in the email we'll quote after the jump.


Hi there; it's interesting to see one's software being talked about by others as if it fell from the sky

First off, the original iPod does indeed have the horsepower for Ogg;
the original Tremor codec written in C used approximately 40MHz of a
Cirrus Maverick (720TDMI), an ARM7 chip somewhat more underpowered
than the chip in the iPod. What the Maverick often has that many
other DSPs don't have is access to alot of memory. This was indeed a
stumbling block for a while.

Since then, we've made three mostly seperate branches of the Tremor
codec line (used in the Rio), each tailored to specific CPU and memory
structural differences found in different DSP architectures. Hugo
Fiennes didn't mention which he was using... or if he was aware there
are multiple different branches today (although I expect he is aware,
it's worth mentioning).

From the story:

"The 5002 has a "broken" cache (1 wait state per access for program or
data, meaning you effectively have half the effective clock rate when
running code from external memory). This means that running code that
doesn't fit in the internal 96kbyte SRAM of the player is very
inefficient, both in terms of CPU cycles and power."

He didn't say if he meant code, data or both, but modern Tremor can
fit both comfortably into this space. This is still substantially
faster than the ARM7 DRAM-based access Tremor was originally designed
for (using SRAM as a random-replacement cache with 7-14 wait-states on
a cache miss).

Also, he says it uses more power but also says they didn't optimize
much and so, they're mostly using the stock ANSI C Tremor decoder,
written by a single engineer (me) in a month as a 'starting point' to
help other engineers write a Vorbis decoder for their own
platforms. The mp3 playback is likely handcoded assembly written by a
professional team focused on only that task. This is in fact
astounding! It's also a testement to the power of good modern
compilers. I smile every time GCC soundly beats me at optimizing.

I agree that the newer iPods are more likely to decode Ogg and Vorbis
with ease. I do, however, strongly believe the original iPods can
also do so with room and cycles to spare.

Monty
TD, Xiph.Org