Rockbox

This is the bug/patch tracker for Rockbox. Click here for more information.

Quick links: Bugs · Patches · Rockbox frontpage

Tasklist

FS#12115 - Use more IRAM for cook, use MEM_ALIGN_ATTR

Attached to Project: Rockbox
Opened by Andree Buschmann (Buschel) - Saturday, 14 May 2011, 20:51 GMT+2
Last edited by Andree Buschmann (Buschel) - Sunday, 22 May 2011, 21:18 GMT+2
Task Type Patches
Category Codecs
Status Closed
Assigned To No-one
Player Type All players
Severity Low
Priority Normal
Reported Version Release 3.8.1
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Private No

Details

This patch moves a few arrays to IRAM and makes use of MEM_ALIGN_ATTR. Performance is slightly increasing on iPod nano 2G (+1-2%) and stable on iPod Video. I would like to see a test on Coldfire targets as well.
   cook_v01.patch (3 KiB)
 apps/codecs/libcook/cook.h              |   14 +++++++-------
 apps/codecs/libcook/cookdata_fixpoint.h |   12 ++++++------
 2 files changed, 13 insertions(+), 13 deletions(-)

This task depends upon

Closed by  Andree Buschmann (Buschel)
Sunday, 22 May 2011, 21:18 GMT+2
Reason for closing:  Accepted
Additional comments about closing:  Submitted with r29913.
Comment by Andree Buschmann (Buschel) - Saturday, 14 May 2011, 23:49 GMT+2
You may use the attached test file.
Comment by Michael Sevakis (MikeS) - Sunday, 15 May 2011, 00:12 GMT+2
r29684 / w/cook_v01.patch

H100 (MCF5249):
cook_stereo_64.ra:27.76MHz:39.33s / 27.70MHz:39.24s (+0.22%)


X5 (MCF5250):
cook_stereo_64.ra:27.91MHz:39.54s / 27.87MHz:39.48s (+0.10%)

Comment by Michael Sevakis (MikeS) - Sunday, 15 May 2011, 23:51 GMT+2
I was slightly lurking in IRC. What's new here to test?
Comment by Andree Buschmann (Buschel) - Monday, 16 May 2011, 07:36 GMT+2
My fault, I was asking you to test this even though you already did... But you might check  FS#12117 .
Comment by Andree Buschmann (Buschel) - Tuesday, 17 May 2011, 00:07 GMT+2
Several new changes. Speedup on nano 2G is +3% now.
   cook_v02.patch (5.3 KiB)
 apps/codecs/libcook/cook.h              |   30 +++++++++++++++++++++++-------
 apps/codecs/libcook/cookdata_fixpoint.h |   12 ++++++------
 apps/codecs/libcook/cook.c              |    7 +++----
 apps/codecs/cook.c                      |    8 ++++----
 4 files changed, 36 insertions(+), 21 deletions(-)

Comment by Michael Sevakis (MikeS) - Tuesday, 17 May 2011, 00:20 GMT+2
X5 (MCF5250):
r29887 / w/cook_v02.patch
cook_stereo_64.ra: 27.95MHz:39.60s / 27.54MHz:39.01s (+1.49%)
Comment by Andree Buschmann (Buschel) - Thursday, 19 May 2011, 23:39 GMT+2
Moved several VLC data arrays to IRAM. Performance needs to be measured again.
   cook_v04.patch (7.6 KiB)
 apps/codecs/libcook/cook.h              |   40 ++++++++++++++++++++++++++------
 apps/codecs/libcook/cookdata_fixpoint.h |   12 ++++-----
 apps/codecs/libcook/cook.c              |   39 +++++++++++++++++++++----------
 apps/codecs/cook.c                      |    8 +++---
 4 files changed, 70 insertions(+), 29 deletions(-)

Comment by Michael Sevakis (MikeS) - Friday, 20 May 2011, 00:08 GMT+2
(Using same results above for comparison)
X5 (MCF5250):
r29887 / r29899 w/cook_v04.patch
cook_stereo_64.ra: 27.95MHz:39.60s / 27.23MHz:38.58s (+2.64%)

Edit: Fix patch name

Comment by Andree Buschmann (Buschel) - Friday, 20 May 2011, 08:14 GMT+2
svn / patch (in MHz) for cook_stereo_64.ra

iPod Video: 28.08 / 27.55 => +1.9%
iPod nano 2G: 45.85 / 44.31 => +3.5%
Comment by Andree Buschmann (Buschel) - Friday, 20 May 2011, 23:54 GMT+2
The VLC-tables were all using the same size (VLCBUFSIZE). This patch reduces the overall size of the VLC tables by more than a factor of 2. As a result more VLC tables can be moved to IRAM for PP5022, PP5024, MCF5250 and S5L870x. Speed increases a bit further:

iPod Video: 28.08 / 27.36 => +2.6%
iPod nano 2G: 45.85 / 44.27 => +3.5%
   cook_v06.patch (9.7 KiB)
 apps/codecs/libcook/cook.h              |   40 +++++++++++++---
 apps/codecs/libcook/cookdata_fixpoint.h |   12 ++--
 apps/codecs/libcook/cook.c              |   80 ++++++++++++++++++++++++++------
 apps/codecs/cook.c                      |    8 +--
 4 files changed, 108 insertions(+), 32 deletions(-)

Comment by Jens Arnold (amiconn) - Sunday, 22 May 2011, 13:48 GMT+2
svn / patch v06 (in MHz) for cook_stereo_64.ra

iPod 2nd Gen (PP5002): 36.67 / 36.61 ==> +0.16 %
Iriver H10 6GB (PP5020): 31.63 / 32.19 ==> -1.7 %
Comment by Andree Buschmann (Buschel) - Sunday, 22 May 2011, 19:26 GMT+2
Same speed as svn for PP5002 and PP5020.

PP5022: 28.08 / 27.32 => +2.8%
S5L870x: 45.85 / 44.91 => +2.1%
MCF5250: 27.67 / 26.82 => +3.1%
   cook_v10.patch (7 KiB)
 apps/codecs/libcook/cook.h |   40 ++++++++++++++++++++----
 apps/codecs/libcook/cook.c |   73 ++++++++++++++++++++++++++++++++++++++-------
 apps/codecs/cook.c         |    8 ++--
 3 files changed, 99 insertions(+), 22 deletions(-)

Comment by Andree Buschmann (Buschel) - Sunday, 22 May 2011, 21:00 GMT+2
Move several functions to IRAM for S5L, speed on S5L870x: 45.85 / 44.00 => +4.4%
   cook_v12.patch (9.8 KiB)
 apps/codecs/libcook/cook.h          |   43 +++++++++++++++---
 apps/codecs/libcook/cook_fixpoint.h |    5 ++
 apps/codecs/libcook/cook.c          |   86 +++++++++++++++++++++++++++++-------
 apps/codecs/cook.c                  |    8 +--
 4 files changed, 116 insertions(+), 26 deletions(-)

Loading...