summaryrefslogtreecommitdiff
path: root/apps/codecs/libwma
diff options
context:
space:
mode:
authorMichael Giacomelli <giac2000@hotmail.com>2007-10-29 23:16:41 +0000
committerMichael Giacomelli <giac2000@hotmail.com>2007-10-29 23:16:41 +0000
commit132bc634edfb54aa857230eb6976309c8d4a2360 (patch)
tree424469a9823452addcd39b0f55d5bff57dbf17b5 /apps/codecs/libwma
parent3da91a9cd13004515aec710b1e55ab1e98c3d1da (diff)
downloadrockbox-132bc634edfb54aa857230eb6976309c8d4a2360.zip
rockbox-132bc634edfb54aa857230eb6976309c8d4a2360.tar.gz
rockbox-132bc634edfb54aa857230eb6976309c8d4a2360.tar.bz2
rockbox-132bc634edfb54aa857230eb6976309c8d4a2360.tar.xz
We removed the old Q15.16 precision trig functions from decoding ages ago, so no need to leave them in. Also, this code needs a GPL header.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15366 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/codecs/libwma')
-rw-r--r--apps/codecs/libwma/wmafixed.c75
-rw-r--r--apps/codecs/libwma/wmafixed.h20
2 files changed, 36 insertions, 59 deletions
diff --git a/apps/codecs/libwma/wmafixed.c b/apps/codecs/libwma/wmafixed.c
index 9c3b211..333f1d4 100644
--- a/apps/codecs/libwma/wmafixed.c
+++ b/apps/codecs/libwma/wmafixed.c
@@ -1,3 +1,21 @@
+/****************************************************************************
+ * __________ __ ___.
+ * Open \______ \ ____ ____ | | _\_ |__ _______ ___
+ * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
+ * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
+ * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
+ * \/ \/ \/ \/ \/
+ *
+ *
+ *
+ * All files in this archive are subject to the GNU General Public License.
+ * See the file COPYING in the source tree root for full license agreement.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ ****************************************************************************/
+
#include "wmadec.h"
#include "wmafixed.h"
#include <codecs.h>
@@ -221,60 +239,3 @@ long fsincos(unsigned long phase, fixed32 *cos)
}
-/*
- Old trig functions. Still used in 1 place each.
-
-*/
-
-
-fixed32 fixsin32(fixed32 x)
-{
-
- fixed64 x2, temp;
- int sign = 1;
-
- if(x < 0)
- {
- sign = -1;
- x = -x;
- }
- while (x > 0x19220)
- {
- x -= M_PI_F;
- sign = -sign;
- }
- if (x > 0x19220)
- {
- x = M_PI_F - x;
- }
- x2 = (fixed64)x * x;
- x2 >>= PRECISION;
- if(sign != 1)
- {
- x = -x;
- }
- /**
- temp = ftofix32(-.0000000239f) * x2;
- temp >>= PRECISION;
- **/
- temp = 0; // PJJ
- //temp = (temp + 0x0) * x2; //MGG: this can't possibly do anything?
- //temp >>= PRECISION;
- temp = (temp - 0xd) * x2;
- temp >>= PRECISION;
- temp = (temp + 0x222) * x2;
- temp >>= PRECISION;
- temp = (temp - 0x2aab) * x2;
- temp >>= PRECISION;
- temp += 0x10000;
- temp = temp * x;
- temp >>= PRECISION;
-
- return (fixed32)(temp);
-}
-
-fixed32 fixcos32(fixed32 x)
-{
- return fixsin32(x - (M_PI_F>>1))*-1;
-}
-
diff --git a/apps/codecs/libwma/wmafixed.h b/apps/codecs/libwma/wmafixed.h
index b92c12a..713c4d0 100644
--- a/apps/codecs/libwma/wmafixed.h
+++ b/apps/codecs/libwma/wmafixed.h
@@ -1,3 +1,21 @@
+/****************************************************************************
+ * __________ __ ___.
+ * Open \______ \ ____ ____ | | _\_ |__ _______ ___
+ * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
+ * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
+ * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
+ * \/ \/ \/ \/ \/
+ *
+ *
+ *
+ * All files in this archive are subject to the GNU General Public License.
+ * See the file COPYING in the source tree root for full license agreement.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ ****************************************************************************/
+
/* fixed precision code. We use a combination of Sign 15.16 and Sign.31
precision here.
@@ -31,8 +49,6 @@ fixed64 fixmul64byfixed(fixed64 x, fixed32 y);
fixed32 fixdiv32(fixed32 x, fixed32 y);
fixed64 fixdiv64(fixed64 x, fixed64 y);
fixed32 fixsqrt32(fixed32 x);
-fixed32 fixsin32(fixed32 x);
-fixed32 fixcos32(fixed32 x);
long fsincos(unsigned long phase, fixed32 *cos);
#ifdef CPU_ARM