diff options
Diffstat (limited to 'apps/codecs/libwma/wmadeci.c')
-rw-r--r-- | apps/codecs/libwma/wmadeci.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/apps/codecs/libwma/wmadeci.c b/apps/codecs/libwma/wmadeci.c index a3edea0e97..f24ac13a0e 100644 --- a/apps/codecs/libwma/wmadeci.c +++ b/apps/codecs/libwma/wmadeci.c | |||
@@ -595,15 +595,14 @@ static inline fixed32 pow_m1_4(WMADecodeContext *s, fixed32 x) | |||
595 | 595 | ||
596 | static void wma_lsp_to_curve_init(WMADecodeContext *s, int frame_len) | 596 | static void wma_lsp_to_curve_init(WMADecodeContext *s, int frame_len) |
597 | { | 597 | { |
598 | fixed32 wdel, a, b, temp, temp2; | 598 | fixed32 wdel, a, b, temp2; |
599 | int i, m; | 599 | int i, m; |
600 | 600 | ||
601 | wdel = fixdiv32(M_PI_F, itofix32(frame_len)); | 601 | wdel = fixdiv32(itofix32(1), itofix32(frame_len)); |
602 | temp = fixdiv32(itofix32(1), itofix32(frame_len)); | ||
603 | for (i=0; i<frame_len; ++i) | 602 | for (i=0; i<frame_len; ++i) |
604 | { | 603 | { |
605 | /* TODO: can probably reuse the trig_init values here */ | 604 | /* TODO: can probably reuse the trig_init values here */ |
606 | fsincos((temp*i)<<15, &temp2); | 605 | fsincos((wdel*i)<<15, &temp2); |
607 | /* get 3 bits headroom + 1 bit from not doubleing the values */ | 606 | /* get 3 bits headroom + 1 bit from not doubleing the values */ |
608 | s->lsp_cos_table[i] = temp2>>3; | 607 | s->lsp_cos_table[i] = temp2>>3; |
609 | 608 | ||
@@ -637,7 +636,7 @@ static void wma_lsp_to_curve(WMADecodeContext *s, | |||
637 | fixed32 *lsp) | 636 | fixed32 *lsp) |
638 | { | 637 | { |
639 | int i, j; | 638 | int i, j; |
640 | fixed32 p, q, w, v, val_max, temp, temp2; | 639 | fixed32 p, q, w, v, val_max, temp2; |
641 | 640 | ||
642 | val_max = 0; | 641 | val_max = 0; |
643 | for(i=0;i<n;++i) | 642 | for(i=0;i<n;++i) |
@@ -654,7 +653,6 @@ static void wma_lsp_to_curve(WMADecodeContext *s, | |||
654 | { | 653 | { |
655 | /* w is 5.27 format, lsp is in 16.16, temp2 becomes 5.27 format */ | 654 | /* w is 5.27 format, lsp is in 16.16, temp2 becomes 5.27 format */ |
656 | temp2 = ((w - (lsp[j - 1]<<11))); | 655 | temp2 = ((w - (lsp[j - 1]<<11))); |
657 | temp = q; | ||
658 | 656 | ||
659 | /* q is 16.16 format, temp2 is 5.27, q becomes 16.16 */ | 657 | /* q is 16.16 format, temp2 is 5.27, q becomes 16.16 */ |
660 | q = fixmul32b(q, temp2 )<<4; | 658 | q = fixmul32b(q, temp2 )<<4; |