summaryrefslogtreecommitdiff
path: root/apps/codecs
diff options
context:
space:
mode:
Diffstat (limited to 'apps/codecs')
-rw-r--r--apps/codecs/libwma/wmadec.h4
-rw-r--r--apps/codecs/libwma/wmadeci.c7
2 files changed, 7 insertions, 4 deletions
diff --git a/apps/codecs/libwma/wmadec.h b/apps/codecs/libwma/wmadec.h
index 585e4b0..1f08e65 100644
--- a/apps/codecs/libwma/wmadec.h
+++ b/apps/codecs/libwma/wmadec.h
@@ -147,8 +147,8 @@ typedef struct WMADecodeContext
fixed32 noise_mult; /* XXX: suppress that and integrate it in the noise array */
/* lsp_to_curve tables */
fixed32 lsp_cos_table[BLOCK_MAX_SIZE];
- fixed32 lsp_pow_m_table1[(1 << LSP_POW_BITS)];
- fixed32 lsp_pow_m_table2[(1 << LSP_POW_BITS)];
+ fixed32 *lsp_pow_m_table1;
+ fixed32 *lsp_pow_m_table2;
/* State of current superframe decoding */
int bit_offset;
diff --git a/apps/codecs/libwma/wmadeci.c b/apps/codecs/libwma/wmadeci.c
index 5a03a0a..8172e33 100644
--- a/apps/codecs/libwma/wmadeci.c
+++ b/apps/codecs/libwma/wmadeci.c
@@ -47,7 +47,6 @@ fixed32 stat0[2048], stat1[1024], stat2[512], stat3[256], stat4[128];
/*VLC lookup tables*/
uint16_t *runtabarray[2], *levtabarray[2];
-/*these could be made smaller since only one can be 1336*/
uint16_t runtab_big[1336], runtab_small[1072], levtab_big[1336], levtab_small[1072];
#define VLCBUF1SIZE 4598
@@ -59,7 +58,8 @@ uint16_t runtab_big[1336], runtab_small[1072], levtab_big[1336], levtab_small[10
VLC_TYPE vlcbuf1[VLCBUF1SIZE][2];
VLC_TYPE vlcbuf2[VLCBUF2SIZE][2];
-VLC_TYPE vlcbuf3[VLCBUF3SIZE][2];
+/* This buffer gets reused for lsp tables */
+VLC_TYPE vlcbuf3[VLCBUF3SIZE][2] __attribute__((aligned (sizeof(fixed32))));
VLC_TYPE vlcbuf4[VLCBUF4SIZE][2];
@@ -617,6 +617,9 @@ static void wma_lsp_to_curve_init(WMADecodeContext *s, int frame_len)
b = itofix32(1);
int ix = 0;
+ s->lsp_pow_m_table1 = (fixed32*)&vlcbuf3[0];
+ s->lsp_pow_m_table2 = (fixed32*)&vlcbuf3[VLCBUF3SIZE];
+
/*double check this later*/
for(i=(1 << LSP_POW_BITS) - 1;i>=0;i--)
{