• Status Closed
  • Percent Complete
  • Task Type Patches
  • Category Codecs
  • Assigned To No-one
  • Operating System All players
  • Severity Low
  • Priority Very Low
  • Reported Version Daily build (which?)
  • Due in Version Undecided
  • Due Date Undecided
  • Votes
  • Private
Attached to Project: Rockbox
Opened by Uchida - 2009-07-26
Last edited by saratoga - 2009-08-23

FS#10467 - [mp3 codec] Patch that reduces consumption of stack.

The mp3 codec consumes very a lot of stack compared with other codec files.

codec_thread'stack usage:
mp3: 92 %
wav: 16 %
aac: 16 %
ogg: 17 %
flac: 16 %

I create the patch to which mp3 codec did not consume stack so much.

After patch apply: mp3 stack usage 17%

Closed by  saratoga
2009-08-23 15:51
Reason for closing:  Rejected
Additional comments about closing:   Warning: Undefined array key "typography" in /home/rockbox/flyspray/plugins/dokuwiki/inc/parserutils.php on line 371 Warning: Undefined array key "camelcase" in /home/rockbox/flyspray/plugins/dokuwiki/inc/parserutils.php on line 407

High stack usage for codecs is a good thing since it represented efficient usage of memory. This patch simply replaces fast IRAM with slower DRAM for no reason that I can find.

Thanks for the attempt though, more people looking at MP3 are always welcome.

Since it moves buffers out of iram (where the stack is), have you checked how it affects performance? It could have a noticeable impact on coldfire targets…

The high stack use is intentional to improve performance. Unused stack represents wasted IRAM and is not desirable in my opinion.

I have been running this patch for a while now, and so far I have experienced no problems. Though admittedly I haven't been running really high quality mp3s such as 320 kbs or 256 kbs and I imagine if this patch is going to cause problems it will do on very high quality mp3s. But so far mp3 playback is fine. This is being run on an h140 if its of any interest.

Hi. today I listened to several mp3 files of 320 kbs on my h140 with this patch applied. I experienced no player freezes or crashes. I had no problems with choppy audio or anything. Obviously I don't know if decoding was worse with this patch applied I can only speak from a users point of view and say I didn't hear any obvious problems, but I guess someone might want to look at various technical statistics to see if there are any problems the average user might not notice.


Available keyboard shortcuts


Task Details

Task Editing