Mercurial > libavcodec.hg
comparison mpegaudiodec.c @ 12044:49c528a39187 libavcodec
mpegaudio: move compute_antialias_float() to mpegaudiodec_float.c
Also put compute_antialias_integer() under !CONFIG_FLOAT and change
forward declarations to declare only the relevant one of these.
Fixes warnings about unused functions and pointer type mismatches.
author | mru |
---|---|
date | Thu, 01 Jul 2010 23:21:20 +0000 |
parents | f9a0bd0888a4 |
children | 06c7d6e5eeb6 |
comparison
equal
deleted
inserted
replaced
12043:f9a0bd0888a4 | 12044:49c528a39187 |
---|---|
71 # include "fft.h" | 71 # include "fft.h" |
72 #else | 72 #else |
73 # include "dct32.c" | 73 # include "dct32.c" |
74 #endif | 74 #endif |
75 | 75 |
76 static void compute_antialias_integer(MPADecodeContext *s, GranuleDef *g); | 76 static void compute_antialias(MPADecodeContext *s, GranuleDef *g); |
77 static void compute_antialias_float(MPADecodeContext *s, GranuleDef *g); | |
78 static void apply_window_mp3_c(MPA_INT *synth_buf, MPA_INT *window, | 77 static void apply_window_mp3_c(MPA_INT *synth_buf, MPA_INT *window, |
79 int *dither_state, OUT_INT *samples, int incr); | 78 int *dither_state, OUT_INT *samples, int incr); |
80 | 79 |
81 /* vlc structure for decoding layer 3 huffman tables */ | 80 /* vlc structure for decoding layer 3 huffman tables */ |
82 static VLC huff_vlc[16]; | 81 static VLC huff_vlc[16]; |
1573 tab1[i] = tmp0 - tmp1; | 1572 tab1[i] = tmp0 - tmp1; |
1574 } | 1573 } |
1575 } | 1574 } |
1576 } | 1575 } |
1577 | 1576 |
1577 #if !CONFIG_FLOAT | |
1578 static void compute_antialias_integer(MPADecodeContext *s, | 1578 static void compute_antialias_integer(MPADecodeContext *s, |
1579 GranuleDef *g) | 1579 GranuleDef *g) |
1580 { | 1580 { |
1581 int32_t *ptr, *csa; | 1581 int32_t *ptr, *csa; |
1582 int n, i; | 1582 int n, i; |
1612 INT_AA(7) | 1612 INT_AA(7) |
1613 | 1613 |
1614 ptr += 18; | 1614 ptr += 18; |
1615 } | 1615 } |
1616 } | 1616 } |
1617 | 1617 #endif |
1618 static void compute_antialias_float(MPADecodeContext *s, | |
1619 GranuleDef *g) | |
1620 { | |
1621 float *ptr; | |
1622 int n, i; | |
1623 | |
1624 /* we antialias only "long" bands */ | |
1625 if (g->block_type == 2) { | |
1626 if (!g->switch_point) | |
1627 return; | |
1628 /* XXX: check this for 8000Hz case */ | |
1629 n = 1; | |
1630 } else { | |
1631 n = SBLIMIT - 1; | |
1632 } | |
1633 | |
1634 ptr = g->sb_hybrid + 18; | |
1635 for(i = n;i > 0;i--) { | |
1636 float tmp0, tmp1; | |
1637 float *csa = &csa_table_float[0][0]; | |
1638 #define FLOAT_AA(j)\ | |
1639 tmp0= ptr[-1-j];\ | |
1640 tmp1= ptr[ j];\ | |
1641 ptr[-1-j] = tmp0 * csa[0+4*j] - tmp1 * csa[1+4*j];\ | |
1642 ptr[ j] = tmp0 * csa[1+4*j] + tmp1 * csa[0+4*j]; | |
1643 | |
1644 FLOAT_AA(0) | |
1645 FLOAT_AA(1) | |
1646 FLOAT_AA(2) | |
1647 FLOAT_AA(3) | |
1648 FLOAT_AA(4) | |
1649 FLOAT_AA(5) | |
1650 FLOAT_AA(6) | |
1651 FLOAT_AA(7) | |
1652 | |
1653 ptr += 18; | |
1654 } | |
1655 } | |
1656 | 1618 |
1657 static void compute_imdct(MPADecodeContext *s, | 1619 static void compute_imdct(MPADecodeContext *s, |
1658 GranuleDef *g, | 1620 GranuleDef *g, |
1659 INTFLOAT *sb_samples, | 1621 INTFLOAT *sb_samples, |
1660 INTFLOAT *mdct_buf) | 1622 INTFLOAT *mdct_buf) |