diff options
author | Wincent Balin <wincent@rockbox.org> | 2010-06-03 22:03:37 +0000 |
---|---|---|
committer | Wincent Balin <wincent@rockbox.org> | 2010-06-03 22:03:37 +0000 |
commit | 2e5b1b1a9cab0ff19170815fda13f40268126027 (patch) | |
tree | f5bdfad43f09a329c7b07d15b0d5f44505ce7ecd /apps/plugins/pdbox/PDa/intern/cos~.c | |
parent | 2438d8b58467d9498ab2009636d3df50447390bc (diff) | |
download | rockbox-2e5b1b1a9cab0ff19170815fda13f40268126027.tar.gz rockbox-2e5b1b1a9cab0ff19170815fda13f40268126027.zip |
pdbox: Applied several changes by Buschel. Reintroduced compilation for iPods.
Changes by Buschel:
* Reduced footprint by making cosine table of size 1^13 instead of 1^15
* Corrected interpolation in the cos~ object
* Optimized multiplication on ARM platforms
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26534 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins/pdbox/PDa/intern/cos~.c')
-rw-r--r-- | apps/plugins/pdbox/PDa/intern/cos~.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/apps/plugins/pdbox/PDa/intern/cos~.c b/apps/plugins/pdbox/PDa/intern/cos~.c index 9e2d61f848..f787496c16 100644 --- a/apps/plugins/pdbox/PDa/intern/cos~.c +++ b/apps/plugins/pdbox/PDa/intern/cos~.c | |||
@@ -36,10 +36,20 @@ static t_int *cos_perform(t_int *w) | |||
36 | phase = *in++; | 36 | phase = *in++; |
37 | phase &= ((1<<fix1)-1); | 37 | phase &= ((1<<fix1)-1); |
38 | off = fixtoi((long long)phase<<ILOGCOSTABSIZE); | 38 | off = fixtoi((long long)phase<<ILOGCOSTABSIZE); |
39 | 39 | #ifdef ROCKBOX | |
40 | #ifdef NO_INTERPOLATION | ||
41 | *out = *(tab+off); | ||
42 | #else /* NO_INTERPOLATION */ | ||
43 | frac = phase & ((1<<(fix1-ILOGCOSTABSIZE))-1); | ||
44 | frac <<= ILOGCOSTABSIZE; | ||
45 | *out = mult(*(tab + off ), (itofix(1) - frac)) + | ||
46 | mult(*(tab + off + 1), frac); | ||
47 | #endif /* NO_INTERPOLATION */ | ||
48 | #else /* ROCKBOX */ | ||
40 | frac = phase&(itofix(1)-1); | 49 | frac = phase&(itofix(1)-1); |
41 | *out = mult(*(tab + off),itofix(1) - frac) + | 50 | *out = mult(*(tab + off),itofix(1) - frac) + |
42 | mult(*(tab + off + 1),frac); | 51 | mult(*(tab + off + 1),frac); |
52 | #endif /* ROCKBOX */ | ||
43 | out++; | 53 | out++; |
44 | } | 54 | } |
45 | return (w+4); | 55 | return (w+4); |