summaryrefslogtreecommitdiff
path: root/apps/codecs/libwma
diff options
context:
space:
mode:
authorNils Wallménius <nils@rockbox.org>2010-07-17 10:57:40 +0000
committerNils Wallménius <nils@rockbox.org>2010-07-17 10:57:40 +0000
commitfa15494ab8638f0a9d2e7b160514b5062cccf715 (patch)
treecc2c6c118ed2623e1bca076bc4c251035fda6682 /apps/codecs/libwma
parent87b29215d5fb77313c8cb9cfe8b3f27ef22ec415 (diff)
downloadrockbox-fa15494ab8638f0a9d2e7b160514b5062cccf715.tar.gz
rockbox-fa15494ab8638f0a9d2e7b160514b5062cccf715.zip
libwma: void pointer voodoo to get rid ov strict aliasing warnings
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27463 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/codecs/libwma')
-rw-r--r--apps/codecs/libwma/wmadec.h4
-rw-r--r--apps/codecs/libwma/wmadeci.c12
2 files changed, 8 insertions, 8 deletions
diff --git a/apps/codecs/libwma/wmadec.h b/apps/codecs/libwma/wmadec.h
index 1f08e653cf..ec295fa472 100644
--- a/apps/codecs/libwma/wmadec.h
+++ b/apps/codecs/libwma/wmadec.h
@@ -147,8 +147,8 @@ typedef struct WMADecodeContext
147 fixed32 noise_mult; /* XXX: suppress that and integrate it in the noise array */ 147 fixed32 noise_mult; /* XXX: suppress that and integrate it in the noise array */
148 /* lsp_to_curve tables */ 148 /* lsp_to_curve tables */
149 fixed32 lsp_cos_table[BLOCK_MAX_SIZE]; 149 fixed32 lsp_cos_table[BLOCK_MAX_SIZE];
150 fixed32 *lsp_pow_m_table1; 150 void *lsp_pow_m_table1;
151 fixed32 *lsp_pow_m_table2; 151 void *lsp_pow_m_table2;
152 152
153 /* State of current superframe decoding */ 153 /* State of current superframe decoding */
154 int bit_offset; 154 int bit_offset;
diff --git a/apps/codecs/libwma/wmadeci.c b/apps/codecs/libwma/wmadeci.c
index 8172e33783..bd085080d8 100644
--- a/apps/codecs/libwma/wmadeci.c
+++ b/apps/codecs/libwma/wmadeci.c
@@ -587,8 +587,8 @@ static inline fixed32 pow_m1_4(WMADecodeContext *s, fixed32 x)
587 m = (u.v >> (23 - LSP_POW_BITS)) & ((1 << LSP_POW_BITS) - 1); 587 m = (u.v >> (23 - LSP_POW_BITS)) & ((1 << LSP_POW_BITS) - 1);
588 /* build interpolation scale: 1 <= t < 2. */ 588 /* build interpolation scale: 1 <= t < 2. */
589 t.v = ((u.v << LSP_POW_BITS) & ((1 << 23) - 1)) | (127 << 23); 589 t.v = ((u.v << LSP_POW_BITS) & ((1 << 23) - 1)) | (127 << 23);
590 a = s->lsp_pow_m_table1[m]; 590 a = ((fixed32*)s->lsp_pow_m_table1)[m];
591 b = s->lsp_pow_m_table2[m]; 591 b = ((fixed32*)s->lsp_pow_m_table2)[m];
592 592
593 /* lsp_pow_e_table contains 32.32 format */ 593 /* lsp_pow_e_table contains 32.32 format */
594 /* TODO: Since we're unlikely have value that cover the whole 594 /* TODO: Since we're unlikely have value that cover the whole
@@ -617,16 +617,16 @@ static void wma_lsp_to_curve_init(WMADecodeContext *s, int frame_len)
617 b = itofix32(1); 617 b = itofix32(1);
618 int ix = 0; 618 int ix = 0;
619 619
620 s->lsp_pow_m_table1 = (fixed32*)&vlcbuf3[0]; 620 s->lsp_pow_m_table1 = &vlcbuf3[0];
621 s->lsp_pow_m_table2 = (fixed32*)&vlcbuf3[VLCBUF3SIZE]; 621 s->lsp_pow_m_table2 = &vlcbuf3[VLCBUF3SIZE];
622 622
623 /*double check this later*/ 623 /*double check this later*/
624 for(i=(1 << LSP_POW_BITS) - 1;i>=0;i--) 624 for(i=(1 << LSP_POW_BITS) - 1;i>=0;i--)
625 { 625 {
626 m = (1 << LSP_POW_BITS) + i; 626 m = (1 << LSP_POW_BITS) + i;
627 a = pow_a_table[ix++]<<4; 627 a = pow_a_table[ix++]<<4;
628 s->lsp_pow_m_table1[i] = 2 * a - b; 628 ((fixed32*)s->lsp_pow_m_table1)[i] = 2 * a - b;
629 s->lsp_pow_m_table2[i] = b - a; 629 ((fixed32*)s->lsp_pow_m_table2)[i] = b - a;
630 b = a; 630 b = a;
631 } 631 }
632 632