Page 2 of 3

Re: N64 benchmarks

Posted: Mon Dec 10, 2018 11:52 am
by calima
Vorbis is quite fast, much more than on the Rockbox codec benchmark page.

Re: N64 benchmarks

Posted: Mon Dec 10, 2018 2:20 pm
by lidnariq
Run your benchmarks against the samples actually provided by RockBox ? http://download.rockbox.org/test_files/

Your 96kbit/sec sample corresponds to needing a 20.47MHz MIPS, which puts it MHz-for-MHz better than about 3/4 of the tests there. (Kinda surprising, but maybe not comparing apples to apples?)

Re: N64 benchmarks

Posted: Tue Dec 11, 2018 1:35 am
by calima
Too much trouble IMHO. The clip I used (Nightwish), the bitrate, and being mono are representative of my future workloads.

Rockbox's vorbis_96.ogg is stereo, while I used mono. So a near-2x difference is plausible.

Re: N64 benchmarks

Posted: Thu Dec 13, 2018 8:32 am
by calima
Opus and MP3 added. Both far too slow sadly. I also tried MP2 since minimp3 supports it and the Rockbox page says it's faster, but it was exactly the same speed. Minimp3 looks like it's slower than mpg123 and libavcodec anyway, but it was the only freely licensed decoder I found. AC3 and Cook are also listed as fast on that page, but AC3 has no freely licensed decoder, and Cook lacks both a decoder and an encoder. So looks like it's Vorbis, probably at a lower sample rate than 44.1KHz that works best.

Re: N64 benchmarks

Posted: Thu Dec 13, 2018 8:46 am
by tepples
calima wrote:Minimp3 looks like it's slower than mpg123 and libavcodec anyway, but it was the only freely licensed decoder I found.
How is libavcodec not "freely licensed"? The libavcodec/mpegaudio* files in FFmpeg's repository appear to be LGPLv2.1, which is a free software license. Use of LGPLv2.1 software in a statically linked program requires providing object code files at cost to anyone who owns a lawfully made copy of the program for relinking with a modified library. Even recent Nintendo consoles' system software includes LGPLv2.1 software.
calima wrote:AC3 and Cook are also listed as fast on that page, but AC3 has no freely licensed decoder
The libavcodec/ac3dec* files are LGPLv2.1 as well. AC3 was standardized as part of the U.S. TV system ATSC, under the name "ATSC A/52". This turns up liba52, but that's copylefted (GPL version 2 or later) and thus not very practical for commercial games in the present market.

Re: N64 benchmarks

Posted: Thu Dec 13, 2018 8:55 am
by calima
You know very well what was meant, and why LGPL code is not viable for commercial games on many platforms.

Re: N64 benchmarks

Posted: Thu Dec 13, 2018 9:43 am
by tepples
The fact that I wrote "Even recent Nintendo consoles' system software includes LGPLv2.1 software." indicates that I don't know "why LGPL code is not viable for commercial games on many platforms", or at least that I can't explain adequately to others following this topic. What makes Nintendo 64 in particular among the "many platforms" to which you refer?

Re: N64 benchmarks

Posted: Fri Dec 14, 2018 2:00 am
by calima
It is a long topic that I'm not going to discuss now.

In other news, I stumbled upon a voip codec called isac. Google bought it and released under BSD. No data anywhere, not on performance, not on audio quality, but the wikipedia page makes it sound worth a try.

Re: N64 benchmarks

Posted: Fri Dec 14, 2018 6:07 am
by 93143
It seems Factor 5's MORT codec has been cracked, but only for decode. This happened about a year ago, so I doubt there's an encoder unless somebody's found some Factor 5 tools lying around...

Re: N64 benchmarks

Posted: Fri Dec 14, 2018 12:47 pm
by calima
isac sounds ok at its 56kbps rate, but it's slower than Vorbis. 234% realtime, but not directly comparable since it's 32 kHz.

Re: N64 benchmarks

Posted: Fri Dec 14, 2018 1:12 pm
by lidnariq
It really looks like minimp3 is a bit of a lemon performance-wise. Most other metrics I've seen everywhere show vorbis at equal bitrate being about 120% the computational cost of mp3...

Re: N64 benchmarks

Posted: Sat Dec 15, 2018 3:49 am
by calima
Yep.

I thought about trying musepack, but a listening test at 96 kbps says it sounds terrible, and its recommended rate of ~170 would take too much space. I guess audio codecs are now about exhausted. FLAC and ADPCM halve the size, making them suitable for sfx but not for music. Heavier ADPCM that go 1/4 or 1/8 sound too bad. Tremor may be somewhat optimizable, but this MIPS does not have any special instructions, limiting the potential. I guess I'll need to add profiling support to cen64.

Kinda disappointed that nothing was suitable as-is, I don't want to spend over 10% of a frame on audio, total. Oh well.

Re: N64 benchmarks

Posted: Sat Dec 15, 2018 5:17 am
by 93143
What does F-Zero X do? I believe the music is 32 kHz, and in the expansion kit it's in stereo. I'm pretty sure compute time was a priority for that game - actually, wasn't that why they went with streaming in the first place?

Also, how does BRR sound? I seem to recall getting decent results on whole tracks... Is VAG a noticeable improvement?

Re: N64 benchmarks

Posted: Sat Dec 15, 2018 6:55 am
by tepples
BRR, VAG, and LossyWAV+FLAC are forms of ADPCM, whose bitrate is too high for music.

Re: N64 benchmarks

Posted: Sat Dec 15, 2018 7:08 am
by 93143
The objection to 4:1 compression was not that it was too big, but that it sounded too bad. BRR is not that far off 4:1 and should sound better than vanilla ADPCM.

Then again, 8:1 was mentioned, and 96 kbps as a target suggests a very high desired compression ratio.

My first question remains: what did F-Zero X do? (Whatever it did, it seems it took too much space on a cartridge for stereo, but on a bulky disk it was fine. This suggests an acceptable processor load and a potentially borderline compression ratio.)