Pink Noise Productions

Tremolo

Tremolo is an ARM optimised version of the Tremor lib from xiph.org. For those that don't know, the Tremor lib is an integer only library for doing Ogg Vorbis decompression.

For those that really don't know, Ogg Vorbis is a (supposedly) patent/royalty free audio compression scheme that pretty much beats the pants off everything else out there (but of course the thing it gets compared to most is MP3). Everything you could possibly want to know about Ogg Vorbis (and lots you don't) can again be found at xiph.org.

What Tremolo is:

The Tremor lib as supplied is (fairly) portable C, but with the option to use gcc's inline assembler in the speed critical sections for ARM based machines.

Tremolo has taken this further; these speed critical sections (and many others) have been completely written in hand optimised ARM code. Tremolo makes no attempt to target anything other than ARM based devices with the long multiply instruction. The bit reading sections of the code assume a little endian memory system, but this can probably be changed if required.

The API to the library is identical - Tremolo and Tremor should be interchangable (except Tremolo should be faster)!

I Am Not A Lawyer:

The tremor lib was supplied under a BSD license. See the exact license for details, but (AIUI) basically you can do what you want with it as long as you acknowledge that its their work.

Tremolo is not released under a BSD license, but under a home brew license of my own. The license terms are described below. I think they're pretty clear, but then IANAL, so if you want them clarified etc, feel free to rent me a lawyer for the afternoon.

Firstly, by "free" software I mean software that you do not derive any kind of revenue from. Shareware isn't free. Software that generates advertising revenue isn't free. Software bundled with other software/hardware that has to be paid for and can't be freely obtained elsewhere isn't free.

Free software does NOT need to give source away, but of course it can if it wants to.

Given this definition, if you want to use Tremolo as part of a free piece of software, please do. Obviously if you do give source away, then the Tremolo source should be clearly marked and all the distribution files (including this license) should be included unchanged.

If you want to use Tremolo (or a derivative of it) in any other type of system (be it software/hardware etc), then you need to contact me first.

I'm not looking to make my fortune here; Shareware programs with a reasonable fee, will almost certainly get permission to use the library as if they were 'free' code.

On the other hand, if someone wants to put Tremolo into a piece of hardware (say into new versions of the Creative Nomad Jukebox thingy, or the Apple iPod), I'd kinda like to make something for the time and effort I've put in.

Of course, it would just be nice to see it used - if you use Tremolo in a free bit of software please do drop me a mail and let me know!

Other things:

While I removed most of the gccisms in Tremolo, there are one or two left. I plan to remove these completely to allow other compilers (like ADS or eVC etc) to be used. This is fairly high on my list.

The output from Tremolo and Tremor differs (in all the cases I've tried) by at most the bottom bit due to rounding errors). I don't consider this a bug.

Timings etc:

You'd probably like some timings, to show how much better Tremolo is than Tremor, right? Well, I'll try to generate some better figures in future, but here is what I have to hand...

The first version of the Tremor lib I compiled took 52.32 seconds to read from disc/play a 130s 45kbps track. The current version of Tremolo takes 46.41 seconds (thats 21% better). According to profiles 78.6% of the time is now spent in my optimised ARM code routines, and 12% of the time is spent reading from disc.

I haven't been doing high bitrate tests for as long, but a 255s 500kbps stream takes 126.9 seconds to read from disc/decode. The earliest version of Tremolo I can find did it in 137.5s, so we've improved by at least 9% since then. If the improvement at high bitrate mirrors that of the low bitrate records, then there were about another 9% worth of improvements before I started keeping records. According to profiles 64.4% of time is spent in my optimised ARM code routines, and 9.5% spent reading from disc.

The test platform is a 202MHz StrongARM based RISC PC with a 16MHz memory bus - most StrongARM devices will have a much spiffier bus nowadays.

I reckon low bitrate stuff is within spitting distance of being pretty much as fast as we can hope for it to get. High bitrate stuff might improve a bit more.

Warranty:

The original Tremor lib included the following disclaimer:

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

The same applies to Tremolo.

ChangeLog:


Copyright © 2002, Pink Noise Productions