Rockbox Technical Forums

Support and General Use => Audio Playback, Database and Playlists => Topic started by: K4sum1 on June 20, 2022, 10:21:24 AM

Title: Looking for the most efficient (easiest to decode) format for iPod 5
Post by: K4sum1 on June 20, 2022, 10:21:24 AM
I'm thinking of using my iPod Video 5 again, and I'm wondering what would be the most efficient codec to use for it would be. With MP3, I've had issues with some equalizers, so I want to try something else, but I don't know what to use. I don't want an uncompressed codec, but any lossy codec with decent quality would be fine.
Title: Re: Looking for the most efficient (easiest to decode) format for iPod 5
Post by: K4sum1 on June 23, 2022, 12:53:25 PM
So I found this page (https://www.rockbox.org/wiki/CodecPerformanceComparison#Portal_Player_40ARM7TDMI_41), which was buried in the manual, it appears that FLAC is the best (probably .wav if it got tested). For compressed stuffs, MP3s are best. Tests are a little old though, but I can't be bothered to compile a build of Rockbox.
Title: Re: Looking for the most efficient (easiest to decode) format for iPod 5
Post by: saratoga on June 23, 2022, 10:29:14 PM
There was some minor optimization after that, but you won't get compression for much less than 10-20 MHz, which is only about 110-220 CPU cycles per output sample on a CPU that can fetch an instruction or fetch data (but not both) once per cycle. 

If possible, optimize your EQ usage.  Each EQ band will consume several MHz of CPU time, so pick your bands optimally to avoid using too much CPU time.
Title: Re: Looking for the most efficient (easiest to decode) format for iPod 5
Post by: K4sum1 on June 23, 2022, 11:05:23 PM
Well, I don't use a normal EQ, I use the perceptual bass enhancement option.
Title: Re: Looking for the most efficient (easiest to decode) format for iPod 5
Post by: gevaerts on June 24, 2022, 05:04:15 AM
Assuming efficiency is about battery runtime (and not some half-philosophical things that don't have any real-world impact), there may be some other things to take into account than purely decoder CPU usage.

Especially if you're on rotating disks lossless codecs will probably result in lower runtime, because the files are a lot bigger and therefore the disk needs to spin up a lot more often, which uses a *lot* of power.

If you use one of the various flash options, I think it's still worth testing. With "pure" flash the effect probably won't be noticeable (which is why modern flash-based players can get away with much less RAM and still get good runtimes), but with the various ATA to whatever adapters I'm not sure. I'd recommend just encoding some audio of your choice (more than 32MB or 64MB, depending on your specific ipod. I'd just go for 100MB or so) in both FLAC and mp3 (or your lossy codec of choice), set things up to play in a loop, and see how long the battery lasts with both of those. See https://www.rockbox.org/wiki/PluginBatteryBenchmark for one way to make that sort of test easier.
Title: Re: Looking for the most efficient (easiest to decode) format for iPod 5
Post by: K4sum1 on June 24, 2022, 08:55:31 AM
Lazy
Title: Re: Looking for the most efficient (easiest to decode) format for iPod 5
Post by: mookee on October 07, 2022, 10:16:39 AM
well wav aka pcm should be the purest form of audio files, isnt it!?

but its huge cause uncompressed.

i have a funny tiny phone with a poor dac but a headphone out. mp3 sounds terrible but if i use wav it seems to be much better..
Title: Re: Looking for the most efficient (easiest to decode) format for iPod 5
Post by: saratoga on October 07, 2022, 12:09:52 PM
well wav aka pcm should be the purest form of audio files, isnt it!?

but its huge cause uncompressed.


FLAC is more efficient since you don't waste tons of energy loading the uncompressed samples from disk. 
Title: Re: Looking for the most efficient (easiest to decode) format for iPod 5
Post by: K4sum1 on October 07, 2022, 06:46:59 PM
FLAC is more efficient since you don't waste tons of energy loading the uncompressed samples from disk. 
What about if a SD is used as the disk?