diff options
-rw-r--r-- | apps/codecs/libwma/wmadeci.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/apps/codecs/libwma/wmadeci.c b/apps/codecs/libwma/wmadeci.c index 8f1fb3cf32..7eefa0310d 100644 --- a/apps/codecs/libwma/wmadeci.c +++ b/apps/codecs/libwma/wmadeci.c | |||
@@ -582,7 +582,7 @@ int wma_decode_init(WMADecodeContext* s, asf_waveformatex_t *wfx) | |||
582 | fixed64 tmp = itofix64(s->bit_rate); | 582 | fixed64 tmp = itofix64(s->bit_rate); |
583 | fixed64 tmp2 = itofix64(s->nb_channels * s->sample_rate); | 583 | fixed64 tmp2 = itofix64(s->nb_channels * s->sample_rate); |
584 | bps = fixdiv64(tmp, tmp2); | 584 | bps = fixdiv64(tmp, tmp2); |
585 | fixed64 tim = fixmul64byfixed(bps, s->frame_len); | 585 | fixed64 tim = bps * s->frame_len; |
586 | fixed64 tmpi = fixdiv64(tim,itofix64(8)); | 586 | fixed64 tmpi = fixdiv64(tim,itofix64(8)); |
587 | s->byte_offset_bits = av_log2(fixtoi64(tmpi+0x8000)) + 2; | 587 | s->byte_offset_bits = av_log2(fixtoi64(tmpi+0x8000)) + 2; |
588 | 588 | ||
@@ -596,7 +596,7 @@ int wma_decode_init(WMADecodeContext* s, asf_waveformatex_t *wfx) | |||
596 | if (bps1 >= 0x9c29) | 596 | if (bps1 >= 0x9c29) |
597 | s->use_noise_coding = 0; | 597 | s->use_noise_coding = 0; |
598 | else | 598 | else |
599 | high_freq = fixmul64byfixed(high_freq,0x6666); | 599 | high_freq = fixmul32(high_freq,0x6666); |
600 | } | 600 | } |
601 | else if (sample_rate1 == 22050) | 601 | else if (sample_rate1 == 22050) |
602 | { | 602 | { |
@@ -610,19 +610,19 @@ int wma_decode_init(WMADecodeContext* s, asf_waveformatex_t *wfx) | |||
610 | else if (sample_rate1 == 16000) | 610 | else if (sample_rate1 == 16000) |
611 | { | 611 | { |
612 | if (bps > 0x8000) | 612 | if (bps > 0x8000) |
613 | high_freq = fixmul64byfixed(high_freq,0x8000); | 613 | high_freq = fixmul32(high_freq,0x8000); |
614 | else | 614 | else |
615 | high_freq = fixmul64byfixed(high_freq,0x4ccd); | 615 | high_freq = fixmul32(high_freq,0x4ccd); |
616 | } | 616 | } |
617 | else if (sample_rate1 == 11025) | 617 | else if (sample_rate1 == 11025) |
618 | { | 618 | { |
619 | high_freq = fixmul64byfixed(high_freq,0xb3333); | 619 | high_freq = fixmul32(high_freq,0xb333); |
620 | } | 620 | } |
621 | else if (sample_rate1 == 8000) | 621 | else if (sample_rate1 == 8000) |
622 | { | 622 | { |
623 | if (bps <= 0xa000) | 623 | if (bps <= 0xa000) |
624 | { | 624 | { |
625 | high_freq = fixmul64byfixed(high_freq,0x8000); | 625 | high_freq = fixmul32(high_freq,0x8000); |
626 | } | 626 | } |
627 | else if (bps > 0xc000) | 627 | else if (bps > 0xc000) |
628 | { | 628 | { |
@@ -630,22 +630,22 @@ int wma_decode_init(WMADecodeContext* s, asf_waveformatex_t *wfx) | |||
630 | } | 630 | } |
631 | else | 631 | else |
632 | { | 632 | { |
633 | high_freq = fixmul64byfixed(high_freq,0xa666); | 633 | high_freq = fixmul32(high_freq,0xa666); |
634 | } | 634 | } |
635 | } | 635 | } |
636 | else | 636 | else |
637 | { | 637 | { |
638 | if (bps >= 0xcccd) | 638 | if (bps >= 0xcccd) |
639 | { | 639 | { |
640 | high_freq = fixmul64byfixed(high_freq,0xc000); | 640 | high_freq = fixmul32(high_freq,0xc000); |
641 | } | 641 | } |
642 | else if (bps >= 0x999a) | 642 | else if (bps >= 0x999a) |
643 | { | 643 | { |
644 | high_freq = fixmul64byfixed(high_freq,0x999a); | 644 | high_freq = fixmul32(high_freq,0x999a); |
645 | } | 645 | } |
646 | else | 646 | else |
647 | { | 647 | { |
648 | high_freq = fixmul64byfixed(high_freq,0x8000); | 648 | high_freq = fixmul32(high_freq,0x8000); |
649 | } | 649 | } |
650 | } | 650 | } |
651 | 651 | ||