Vorbis on DM642

Theora video on the DM642 may not be entirely successful, but Vorbis audio is a different story. I’ve been experimenting with the Tremor integer-only implementation of Vorbis decoding.

Tremor offers two modes of operation. Normal mode, and low precision mode. Normal mode requires 64-bit intermediate results in arithmetic operations, whereas low precision mode only requires 32-bit intermediates. Testing both modes against the standard Linux command line vorbis decoder, oggdec, reveals that the normal mode has a RMS error of 0.71 bits, whereas the low precision mode has RMS error of 58 bits. (I performed the test using Lepidoptera by Epoq from vorbis.com as the sample track, decoding to 16 bit, 44.1kHz stereo.) The result for low precision mode is consistent with user complaints of audible distortion.

The good news for Vorbis on DM642 is that using 48 bit intermediate results produces results very close to the normal mode, with RMS error of 1.0 bits. The mpylir instruction of the DM642 multiplies a 16 bit by a 32 bit quantity, and shifts the result to fit within 32 bits. This allows a decoder with quality almost indistinguishable from normal Vorbis output, but performance as fast as Tremor’s low quality mode.