Page 1 of 1

Gen compressed audio, Opus

Posted: Thu Dec 17, 2015 7:31 pm
by cero
I checked Vorbis' RAM usage, and while Tremor has a low-RAM branch, it's still too much for an unaided Genesis. Though I see someone used it with a 32x.

Opus being the latest craze, I have an interesting quote:
The amount of RAM that Opus requires depends on several factors:
1) Whether you're encoding and/or decoding
2) The number of channels
3) Whether you built as fixed-point or float (I assume fixed-point)
4) If you're encoding, it further depends on the mode you're using

In all cases, the RAM requirements are split between the "state" that
needs to be preserved across calls to the encoder or decoder, and the
stack that it only needed during a call.

For example, a fixed-point stereo decoder state takes about 25 kB to
hold, and IIRC the actual decoding takes about 8 kB of stack. Expect the
encoder to take more RAM though.
http://lists.xiph.org/pipermail/opus/20 ... 02823.html

Thus, a fixed-point mono decoder, targeting 8-bit 16kHz, would be possible on a plain Genesis, bringing great quality with it. Now the only question is how fast it'd be. I'll try it out and see what happens.

Re: Gen compressed audio, Opus

Posted: Thu Dec 17, 2015 9:50 pm
by Mask of Destiny
I'm almost positive it's going to be vastly slower than realtime. Opus is more CPU intensive than Vorbis and even Vorbis is probably unrealistic on anything slower than a 68040.

Re: Gen compressed audio, Opus

Posted: Fri Dec 18, 2015 9:48 am
by cero
On my desktop, Vorbis is 480x realtime while Opus is 240x realtime decoding. Both using C code at -O2. It's possible it'd be too slow, but nobody else has measured it yet ;)

Re: Gen compressed audio, Opus

Posted: Fri Dec 18, 2015 2:03 pm
by cero
First results are in: Opus runs successfully on the Genesis, and needs even less RAM than expected.

Downside: the current build, completely unoptimized C and -O2, took 57.5 seconds to decode 400ms of audio, making it 0.0069x realtime. :D

I might try O3 later, sadly without PGO since that doesn't work on embedded and autoFDO isn't there in 4.8.

Re: Gen compressed audio, Opus

Posted: Fri Dec 18, 2015 2:31 pm
by Stef
57 second to half of second of sound ? outch ! that will really require insane optimization :p

Re: Gen compressed audio, Opus

Posted: Fri Dec 18, 2015 4:33 pm
by cero
-O3: 27s, 0.015x realtime. Dropping it here, may Google preserve this to all eternity.