summaryrefslogtreecommitdiff
path: root/apps/codecs/libwmapro/wmaprodata.h
diff options
context:
space:
mode:
authorMohamed Tarek <mt@rockbox.org>2010-07-12 15:41:10 +0000
committerMohamed Tarek <mt@rockbox.org>2010-07-12 15:41:10 +0000
commitec4ee483181d01d14444e4431159282ecd92a2c5 (patch)
tree2f5c121e1fd41f518b0ee06362e3023110043e3f /apps/codecs/libwmapro/wmaprodata.h
parentddbfffb2173630b16b5ddafaa6449cad8709bf83 (diff)
downloadrockbox-ec4ee483181d01d14444e4431159282ecd92a2c5.zip
rockbox-ec4ee483181d01d14444e4431159282ecd92a2c5.tar.gz
rockbox-ec4ee483181d01d14444e4431159282ecd92a2c5.tar.bz2
rockbox-ec4ee483181d01d14444e4431159282ecd92a2c5.tar.xz
Complete the conversion of WMA Pro to fixed point. Floating point code is still there for better history and to have a returning point in svn should something go wrong.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27402 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/codecs/libwmapro/wmaprodata.h')
-rw-r--r--apps/codecs/libwmapro/wmaprodata.h49
1 files changed, 49 insertions, 0 deletions
diff --git a/apps/codecs/libwmapro/wmaprodata.h b/apps/codecs/libwmapro/wmaprodata.h
index a1d186e..7fb784b 100644
--- a/apps/codecs/libwmapro/wmaprodata.h
+++ b/apps/codecs/libwmapro/wmaprodata.h
@@ -31,6 +31,15 @@
#include <stddef.h>
#include <stdint.h>
+const int32_t fixed_sin64[33] = {
+ 0x00000000, 0xF9B82685, 0xF3742CA3, 0xED37EF92, 0xE70747C5, 0xE0E60686,
+ 0xDAD7F3A3, 0xD4E0CB16, 0xCF043AB4, 0xC945DFED, 0xC3A94591, 0xBE31E19C,
+ 0xB8E3131A, 0xB3C0200D, 0xAECC336D, 0xAA0A5B2F, 0xA57D8667, 0xA1288377,
+ 0x9D0DFE55, 0x99307EE1, 0x9592675D, 0x9235F2ED, 0x8F1D343B, 0x8C4A1430,
+ 0x89BE50C4, 0x877B7BED, 0x8582FAA6, 0x83D60413, 0x8275A0C1, 0x8162AA05,
+ 0x809DC972, 0x80277873, 0x80000001,
+};
+
/**
* @brief frequencies to divide the frequency spectrum into scale factor bands
*/
@@ -375,6 +384,29 @@ static const float coef0_level[HUFF_COEF0_SIZE] = {
25, 26, 26, 27, 27, 28,
};
+static const int32_t fixcoef0_level[HUFF_COEF0_SIZE] = {
+ 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5,
+ 5, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11,
+ 11, 12, 12, 13, 13, 14, 14, 15, 15, 16, 16, 17, 17, 18,
+ 18, 19, 19, 20, 20, 21, 21, 22, 22, 23, 23, 24, 24, 25,
+ 25, 26, 26, 27, 27, 28,
+};
+
static const uint16_t coef1_run[HUFF_COEF1_SIZE] = {
0, 0, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
@@ -409,6 +441,23 @@ static const float coef1_level[HUFF_COEF1_SIZE] = {
37, 38, 38, 39, 39, 40, 40, 41, 41, 42, 42, 43, 43, 44, 44, 45, 45, 46,
46, 47, 47, 48, 48, 49, 49, 50, 51, 52,
};
+
+static const int32_t fixcoef1_level[HUFF_COEF1_SIZE] = {
+ 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4,
+ 4, 4, 4, 4, 5, 5, 5, 6, 6, 6, 7, 7, 7, 8, 8, 9, 9, 10,
+ 10, 11, 11, 12, 12, 13, 13, 14, 14, 15, 15, 16, 16, 17, 17, 18, 18, 19,
+ 19, 20, 20, 21, 21, 22, 22, 23, 23, 24, 24, 25, 25, 26, 26, 27, 27, 28,
+ 28, 29, 29, 30, 30, 31, 31, 32, 32, 33, 33, 34, 34, 35, 35, 36, 36, 37,
+ 37, 38, 38, 39, 39, 40, 40, 41, 41, 42, 42, 43, 43, 44, 44, 45, 45, 46,
+ 46, 47, 47, 48, 48, 49, 49, 50, 51, 52,
+};
/** @} */