diff options
| author | Andree Buschmann <AndreeBuschmann@t-online.de> | 2010-07-01 21:18:42 +0000 |
|---|---|---|
| committer | Andree Buschmann <AndreeBuschmann@t-online.de> | 2010-07-01 21:18:42 +0000 |
| commit | 52f17dfe9d5221fdc83b2c5d719fe701dce46f24 (patch) | |
| tree | 6fdecfc1e9560e2566214bc8336b401df02663bc /apps/codecs/libfaad/codebook | |
| parent | b013fb76c464b5125026b4d6c95c49a046d0924c (diff) | |
| download | rockbox-52f17dfe9d5221fdc83b2c5d719fe701dce46f24.zip rockbox-52f17dfe9d5221fdc83b2c5d719fe701dce46f24.tar.gz rockbox-52f17dfe9d5221fdc83b2c5d719fe701dce46f24.tar.bz2 rockbox-52f17dfe9d5221fdc83b2c5d719fe701dce46f24.tar.xz | |
Submit FS#11445. Speed up of faad (aac) decoder via several optimizations like refactoring some requantization routines, moving several arrays and code tables to IRAM, using an optimized swap32() function and inlining several huffman decoder functions. Decoding is sped up by ~10% (PP5002, PP5022, MCF5249) and ~22% (MCF5250).
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27225 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/codecs/libfaad/codebook')
| -rw-r--r-- | apps/codecs/libfaad/codebook/hcb_1.h | 4 | ||||
| -rw-r--r-- | apps/codecs/libfaad/codebook/hcb_10.h | 4 | ||||
| -rw-r--r-- | apps/codecs/libfaad/codebook/hcb_11.h | 4 | ||||
| -rw-r--r-- | apps/codecs/libfaad/codebook/hcb_2.h | 4 | ||||
| -rw-r--r-- | apps/codecs/libfaad/codebook/hcb_3.h | 2 | ||||
| -rw-r--r-- | apps/codecs/libfaad/codebook/hcb_4.h | 4 | ||||
| -rw-r--r-- | apps/codecs/libfaad/codebook/hcb_5.h | 2 | ||||
| -rw-r--r-- | apps/codecs/libfaad/codebook/hcb_6.h | 4 | ||||
| -rw-r--r-- | apps/codecs/libfaad/codebook/hcb_7.h | 2 | ||||
| -rw-r--r-- | apps/codecs/libfaad/codebook/hcb_8.h | 4 | ||||
| -rw-r--r-- | apps/codecs/libfaad/codebook/hcb_9.h | 2 | ||||
| -rw-r--r-- | apps/codecs/libfaad/codebook/hcb_sf.h | 2 |
12 files changed, 19 insertions, 19 deletions
diff --git a/apps/codecs/libfaad/codebook/hcb_1.h b/apps/codecs/libfaad/codebook/hcb_1.h index 610e578..88c04b6 100644 --- a/apps/codecs/libfaad/codebook/hcb_1.h +++ b/apps/codecs/libfaad/codebook/hcb_1.h @@ -33,7 +33,7 @@ * * Used to find offset into 2nd step table and number of extra bits to get */ -static hcb hcb1_1[] = { +static hcb hcb1_1[] ICONST_ATTR_FAAD_LARGE_IRAM = { { /* 00000 */ 0, 0 }, { /* */ 0, 0 }, { /* */ 0, 0 }, @@ -78,7 +78,7 @@ static hcb hcb1_1[] = { * * Gives size of codeword and actual data (x,y,v,w) */ -static hcb_2_quad hcb1_2[] = { +static hcb_2_quad hcb1_2[] ICONST_ATTR_FAAD_LARGE_IRAM = { /* 1 bit codeword */ { 1, 0, 0, 0, 0 }, diff --git a/apps/codecs/libfaad/codebook/hcb_10.h b/apps/codecs/libfaad/codebook/hcb_10.h index 7f1b6a4..971d06a 100644 --- a/apps/codecs/libfaad/codebook/hcb_10.h +++ b/apps/codecs/libfaad/codebook/hcb_10.h @@ -33,7 +33,7 @@ * * Used to find offset into 2nd step table and number of extra bits to get */ -static hcb hcb10_1[] = { +static hcb hcb10_1[] ICONST_ATTR_FAAD_LARGE_IRAM = { /* 4 bit codewords */ { /* 000000 */ 0, 0 }, { /* */ 0, 0 }, @@ -115,7 +115,7 @@ static hcb hcb10_1[] = { * * Gives size of codeword and actual data (x,y,v,w) */ -static hcb_2_pair hcb10_2[] = { +static hcb_2_pair hcb10_2[] ICONST_ATTR = { /* 4 bit codewords */ { 4, 1, 1 }, { 4, 1, 2 }, diff --git a/apps/codecs/libfaad/codebook/hcb_11.h b/apps/codecs/libfaad/codebook/hcb_11.h index c513721..49e97af 100644 --- a/apps/codecs/libfaad/codebook/hcb_11.h +++ b/apps/codecs/libfaad/codebook/hcb_11.h @@ -33,7 +33,7 @@ * * Used to find offset into 2nd step table and number of extra bits to get */ -static hcb hcb11_1[] = { +static hcb hcb11_1[] ICONST_ATTR_FAAD_LARGE_IRAM = { /* 4 bits */ { /* 00000 */ 0, 0 }, { /* */ 0, 0 }, @@ -95,7 +95,7 @@ static hcb hcb11_1[] = { * * Gives size of codeword and actual data (x,y,v,w) */ -static hcb_2_pair hcb11_2[] = { +static hcb_2_pair hcb11_2[] ICONST_ATTR_FAAD_LARGE_IRAM = { /* 4 */ { 4, 0, 0 }, { 4, 1, 1 }, diff --git a/apps/codecs/libfaad/codebook/hcb_2.h b/apps/codecs/libfaad/codebook/hcb_2.h index bcc8857..15e7d57 100644 --- a/apps/codecs/libfaad/codebook/hcb_2.h +++ b/apps/codecs/libfaad/codebook/hcb_2.h @@ -33,7 +33,7 @@ * * Used to find offset into 2nd step table and number of extra bits to get */ -static hcb hcb2_1[] = { +static hcb hcb2_1[] ICONST_ATTR_FAAD_LARGE_IRAM = { { /* 00000 */ 0, 0 }, { /* */ 0, 0 }, { /* */ 0, 0 }, @@ -82,7 +82,7 @@ static hcb hcb2_1[] = { * * Gives size of codeword and actual data (x,y,v,w) */ -static hcb_2_quad hcb2_2[] = { +static hcb_2_quad hcb2_2[] ICONST_ATTR_FAAD_LARGE_IRAM = { /* 3 bit codeword */ { 3, 0, 0, 0, 0 }, diff --git a/apps/codecs/libfaad/codebook/hcb_3.h b/apps/codecs/libfaad/codebook/hcb_3.h index 2672de0..3b12fdf 100644 --- a/apps/codecs/libfaad/codebook/hcb_3.h +++ b/apps/codecs/libfaad/codebook/hcb_3.h @@ -28,7 +28,7 @@ /* Binary search huffman table HCB_3 */ -static hcb_bin_quad hcb3[] = { +static hcb_bin_quad hcb3[] ICONST_ATTR_FAAD_LARGE_IRAM = { { /* 0 */ 0, { 1, 2, 0, 0 } }, { /* 1 */ 1, { 0, 0, 0, 0 } }, /* 0 */ { /* 2 */ 0, { 1, 2, 0, 0 } }, diff --git a/apps/codecs/libfaad/codebook/hcb_4.h b/apps/codecs/libfaad/codebook/hcb_4.h index 1dc9040..67397e1f 100644 --- a/apps/codecs/libfaad/codebook/hcb_4.h +++ b/apps/codecs/libfaad/codebook/hcb_4.h @@ -33,7 +33,7 @@ * * Used to find offset into 2nd step table and number of extra bits to get */ -static hcb hcb4_1[] = { +static hcb hcb4_1[] ICONST_ATTR_FAAD_LARGE_IRAM = { /* 4 bit codewords */ { /* 00000 */ 0, 0 }, { /* */ 0, 0 }, @@ -85,7 +85,7 @@ static hcb hcb4_1[] = { * * Gives size of codeword and actual data (x,y,v,w) */ -static hcb_2_quad hcb4_2[] = { +static hcb_2_quad hcb4_2[] ICONST_ATTR_FAAD_LARGE_IRAM = { /* 4 bit codewords */ { 4, 1, 1, 1, 1 }, { 4, 0, 1, 1, 1 }, diff --git a/apps/codecs/libfaad/codebook/hcb_5.h b/apps/codecs/libfaad/codebook/hcb_5.h index d094a6b..0143482 100644 --- a/apps/codecs/libfaad/codebook/hcb_5.h +++ b/apps/codecs/libfaad/codebook/hcb_5.h @@ -28,7 +28,7 @@ /* Binary search huffman table HCB_5 */ -static hcb_bin_pair hcb5[] = { +static hcb_bin_pair hcb5[] ICONST_ATTR_FAAD_LARGE_IRAM = { { /* 0 */ 0, { 1, 2 } }, { /* 1 */ 1, { 0, 0 } }, /* 0 */ { /* 2 */ 0, { 1, 2 } }, diff --git a/apps/codecs/libfaad/codebook/hcb_6.h b/apps/codecs/libfaad/codebook/hcb_6.h index 4df2380..9988133 100644 --- a/apps/codecs/libfaad/codebook/hcb_6.h +++ b/apps/codecs/libfaad/codebook/hcb_6.h @@ -33,7 +33,7 @@ * * Used to find offset into 2nd step table and number of extra bits to get */ -static hcb hcb6_1[] = { +static hcb hcb6_1[] ICONST_ATTR = { /* 4 bit codewords */ { /* 00000 */ 0, 0 }, { /* */ 0, 0 }, @@ -83,7 +83,7 @@ static hcb hcb6_1[] = { * * Gives size of codeword and actual data (x,y,v,w) */ -static hcb_2_pair hcb6_2[] = { +static hcb_2_pair hcb6_2[] ICONST_ATTR = { /* 4 bit codewords */ { 4, 0, 0 }, { 4, 1, 0 }, diff --git a/apps/codecs/libfaad/codebook/hcb_7.h b/apps/codecs/libfaad/codebook/hcb_7.h index c26a1a3..3b378dc 100644 --- a/apps/codecs/libfaad/codebook/hcb_7.h +++ b/apps/codecs/libfaad/codebook/hcb_7.h @@ -28,7 +28,7 @@ /* Binary search huffman table HCB_7 */ -static hcb_bin_pair hcb7[] = { +static hcb_bin_pair hcb7[] ICONST_ATTR_FAAD_LARGE_IRAM = { { /* 0 */ 0, { 1, 2 } }, { /* 1 */ 1, { 0, 0 } }, { /* 2 */ 0, { 1, 2 } }, diff --git a/apps/codecs/libfaad/codebook/hcb_8.h b/apps/codecs/libfaad/codebook/hcb_8.h index d75da90..b76eb8f 100644 --- a/apps/codecs/libfaad/codebook/hcb_8.h +++ b/apps/codecs/libfaad/codebook/hcb_8.h @@ -33,7 +33,7 @@ * * Used to find offset into 2nd step table and number of extra bits to get */ -static hcb hcb8_1[] = { +static hcb hcb8_1[] ICONST_ATTR = { /* 3 bit codeword */ { /* 00000 */ 0, 0 }, { /* */ 0, 0 }, @@ -87,7 +87,7 @@ static hcb hcb8_1[] = { * * Gives size of codeword and actual data (x,y,v,w) */ -static hcb_2_pair hcb8_2[] = { +static hcb_2_pair hcb8_2[] ICONST_ATTR = { /* 3 bit codeword */ { 3, 1, 1 }, diff --git a/apps/codecs/libfaad/codebook/hcb_9.h b/apps/codecs/libfaad/codebook/hcb_9.h index 740a6c3..2932001 100644 --- a/apps/codecs/libfaad/codebook/hcb_9.h +++ b/apps/codecs/libfaad/codebook/hcb_9.h @@ -28,7 +28,7 @@ /* Binary search huffman table HCB_9 */ -static hcb_bin_pair hcb9[] = { +static hcb_bin_pair hcb9[] ICONST_ATTR_FAAD_LARGE_IRAM = { { /* 0 */ 0, { 1, 2 } }, { /* 1 */ 1, { 0, 0 } }, { /* 2 */ 0, { 1, 2 } }, diff --git a/apps/codecs/libfaad/codebook/hcb_sf.h b/apps/codecs/libfaad/codebook/hcb_sf.h index aa5ccdb..66762e2 100644 --- a/apps/codecs/libfaad/codebook/hcb_sf.h +++ b/apps/codecs/libfaad/codebook/hcb_sf.h @@ -28,7 +28,7 @@ /* Binary search huffman table HCB_SF */ -static uint8_t hcb_sf[][2] = { +static uint8_t hcb_sf[][2] ICONST_ATTR_FAAD_LARGE_IRAM = { { /* 0 */ 1, 2 }, { /* 1 */ 60, 0 }, { /* 2 */ 1, 2 }, |