Hacker News new | ask | show | jobs
by jmvalin 4722 days ago
CPU usage in the decoder is currently higher than Vorbis, though most of the difference is due to having less optimizations. As for the encoder, it's already faster than Vorbis and should become even faster in the future. I haven't checked, but I suspect the same is true when compared to MP3. That being said, the complexity is pretty much negligible on a desktop machine.
1 comments

Interesting. I tested a while back and found opusenc consistently slower than oggenc. I don't remember the specifics, but I'm surprised a 27% improvement was enough to make up the difference.

It's not negligible to me, as I'm running a music server on a Raspberry Pi that needs to transcode audio, and the Pi can only transcode FLAC to Vorbis at 1.8x realtime. This makes it terribly sensitive to background tasks — anything else going on tends to prevent it from keeping up. So I'm quite glad you all are optimizing for ARM :)

Uh. On a Raspberry Pi you should be using the Opus encoder compiled as fixed point. It will be a _ton_ faster than Vorbis, as the floating point on the rpi is very slow and there is no fixed point vorbis encoder. (Unfortunately, if your input requires resampling, there isn't currently an option to compile the opus-tools front end to use the fixed point resampler, so that will add some slowdown— I guess that should go up in priority)

Although ... rpi ugh. I often feel that device was an evil scheme to turn people off of arm. It is _remarkably_ slow for its cost and power consumption. For $100 you can have an arm device which is easily 32x faster for most DSP-ish stuff, and which draws similar power.

I have an odd affliction - I collect ARM devices. Right from the OpenMoko Freerunner, through the N900 and now the Raspberry Pi.

It's always a tradeoff between price, community size and compute power with these little things. Hell, even the ZipIt Z2 running a tiny little Freescale processor had a good community when it was new.

I can go and get a HardKernel O2 and have really good performance but there won't be that many people in the IRC channel to help me out when I have a device specific question.

The Raspberry Pi has captured such an audience that there's people everywhere who can help, as well as a huge amount of development going on.

The other advantage of the Raspberry Pi is that replacing the whole board is cheaper than buying the JTAG breakout for other devices (I'm looking at you, GlobalScale).

I'd love to talk with you further about the different devices around - I really do have a lot of them and I have more on the way. Support and communities for ARM devices seems to be really fragmented, and it's a shame.

I think my contact details are in my profile. Sorry for the rambling reply, it's late here.

Tremor is an integer-only Vorbis decoder, correct? Same they never ported the encoder as well!
Good to know, thanks :) What's this $100 ARM device you speak of?
Now I'm not sure how much floating point arithmetic the ogg vorbis encoder would use, but ARM can be sensitive to this. If you have the choice between "hardfp" and "softfp" for you distro, you want hardfp, as this will use the floating point hardware (which is present in the pi). Some ARM systems require softfp, since they lack fp hardware.

Also, what optimisations have you got turned on (on the compiler). For a realtime system, it might make sense to turn them down, trading stream size for processing time.