Forgot your password?
typodupeerror
Programming

Journal: My own Vorbis decoder implementation from scratch

Journal by pslam
Check it out here (edited for new location)

Basically, I've been putting the finishing touches on my from-scratch implementation of Vorbis. It now fits in 110KB of data, 35KB of code, and has some obvious ways to get even smaller. It's fast - about the same as Tremor, if not faster, and there's still some really easy ways to speed it up. It does one memory allocation total. It's in C++, and quite readable (more than Tremor in my opinion :)

All that's left to do is:

  • Implement seeking
  • Implement a callback interface for file reads/writes
  • Distinguish between EOF and bad streams
  • Remove DCT and window coefficient calculation from startup

Not much, eh?

If it weren't for the obvious licensing issues, I'd love to implement it into the Rio portable players. It would fit in with a tiny wrapper into a Rio Karma, and most likely eat up way less battery life than the Tremor library does (Tremor wasn't designed with very limited fast RAM in mind). I'd have to rewrite it from scratch for the Rio S-series and Nitrus (char == int == 24 bits, lovely).

Maybe I'll just do it one day and all of a sudden everyone finds their players magically start playing vorbis files...

"Religion is something left over from the infancy of our intelligence, it will fade away as we adopt reason and science as our guidelines." -- Bertrand Russell

Working...