summaryrefslogtreecommitdiff
path: root/apps/codecs/libwma/wmadeci.c
diff options
context:
space:
mode:
authorMohamed Tarek <mt@rockbox.org>2009-08-15 22:06:42 +0000
committerMohamed Tarek <mt@rockbox.org>2009-08-15 22:06:42 +0000
commitadf3f09251db5269214952820732ae39f859ba25 (patch)
tree0f352b8619b9d1906beaf397cca0bf8350da72a5 /apps/codecs/libwma/wmadeci.c
parent29ac0a6278d6f5967e80b82333d40a46b77e5e64 (diff)
downloadrockbox-adf3f09251db5269214952820732ae39f859ba25.tar.gz
rockbox-adf3f09251db5269214952820732ae39f859ba25.zip
Move bitstream.[ch] to codecs/lib/ffmpeg_bitstream.[ch] to avoid duplicate copies across codecs.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22337 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/codecs/libwma/wmadeci.c')
-rw-r--r--apps/codecs/libwma/wmadeci.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/apps/codecs/libwma/wmadeci.c b/apps/codecs/libwma/wmadeci.c
index d1baca4c99..f01ffefc13 100644
--- a/apps/codecs/libwma/wmadeci.c
+++ b/apps/codecs/libwma/wmadeci.c
@@ -30,6 +30,34 @@
30#include "bitstream.h" 30#include "bitstream.h"
31#include "wmadata.h" 31#include "wmadata.h"
32 32
33static const uint8_t ff_log2_tab[256]={
34 0,0,1,1,2,2,2,2,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,
35 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,
36 6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,
37 6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,
38 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,
39 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,
40 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,
41 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7
42};
43
44static inline int av_log2(unsigned int v)
45{
46 int n;
47
48 n = 0;
49 if (v & 0xffff0000) {
50 v >>= 16;
51 n += 16;
52 }
53 if (v & 0xff00) {
54 v >>= 8;
55 n += 8;
56 }
57 n += ff_log2_tab[v];
58
59 return n;
60}
33 61
34static void wma_lsp_to_curve_init(WMADecodeContext *s, int frame_len); 62static void wma_lsp_to_curve_init(WMADecodeContext *s, int frame_len);
35inline void vector_fmul_add_add(fixed32 *dst, const fixed32 *data, 63inline void vector_fmul_add_add(fixed32 *dst, const fixed32 *data,