diff options
| author | Thomas Jarosch <tomj@simonv.com> | 2015-01-11 21:40:51 +0100 |
|---|---|---|
| committer | Thomas Jarosch <tomj@simonv.com> | 2015-01-11 21:40:51 +0100 |
| commit | 2a3e1628a50b9de7c1462ee95eb79937795f5409 (patch) | |
| tree | 3c2c965007a71c4895a65d8a91252b9ce2255719 /lib/rbcodec/codecs/libfaad | |
| parent | 85c98bc63c6635fe9e337178f23faa9c0ec3f9fb (diff) | |
| download | rockbox-2a3e1628a50b9de7c1462ee95eb79937795f5409.zip rockbox-2a3e1628a50b9de7c1462ee95eb79937795f5409.tar.gz rockbox-2a3e1628a50b9de7c1462ee95eb79937795f5409.tar.bz2 rockbox-2a3e1628a50b9de7c1462ee95eb79937795f5409.tar.xz | |
Limit more variables to file scope
Change-Id: I30219d626316776eb73b4205d63376fa3dbc6361
Diffstat (limited to 'lib/rbcodec/codecs/libfaad')
| -rw-r--r-- | lib/rbcodec/codecs/libfaad/codebook/hcb.h | 10 | ||||
| -rw-r--r-- | lib/rbcodec/codecs/libfaad/huffman.c | 21 | ||||
| -rw-r--r-- | lib/rbcodec/codecs/libfaad/syntax.c | 10 |
3 files changed, 17 insertions, 24 deletions
diff --git a/lib/rbcodec/codecs/libfaad/codebook/hcb.h b/lib/rbcodec/codecs/libfaad/codebook/hcb.h index eaefdbf..53e234a 100644 --- a/lib/rbcodec/codecs/libfaad/codebook/hcb.h +++ b/lib/rbcodec/codecs/libfaad/codebook/hcb.h @@ -112,16 +112,6 @@ typedef struct int8_t data[2]; } hcb_bin_pair; -hcb *hcb_table[]; -hcb_2_quad *hcb_2_quad_table[]; -hcb_2_pair *hcb_2_pair_table[]; -hcb_bin_pair *hcb_bin_table[]; -uint8_t hcbN[]; -uint8_t unsigned_cb[]; -int hcb_2_quad_table_size[]; -int hcb_2_pair_table_size[]; -int hcb_bin_table_size[]; - #include "codebook/hcb_1.h" #include "codebook/hcb_2.h" #include "codebook/hcb_3.h" diff --git a/lib/rbcodec/codecs/libfaad/huffman.c b/lib/rbcodec/codecs/libfaad/huffman.c index bea0dd7..93e3a2d 100644 --- a/lib/rbcodec/codecs/libfaad/huffman.c +++ b/lib/rbcodec/codecs/libfaad/huffman.c @@ -76,33 +76,33 @@ int8_t huffman_scale_factor(bitfile *ld) } -hcb *hcb_table[] ICONST_ATTR = { +static hcb *hcb_table[] ICONST_ATTR = { 0, hcb1_1, hcb2_1, 0, hcb4_1, 0, hcb6_1, 0, hcb8_1, 0, hcb10_1, hcb11_1 }; -hcb_2_quad *hcb_2_quad_table[] ICONST_ATTR = { +static hcb_2_quad *hcb_2_quad_table[] ICONST_ATTR = { 0, hcb1_2, hcb2_2, 0, hcb4_2, 0, 0, 0, 0, 0, 0, 0 }; -hcb_2_pair *hcb_2_pair_table[] ICONST_ATTR = { +static hcb_2_pair *hcb_2_pair_table[] ICONST_ATTR = { 0, 0, 0, 0, 0, 0, hcb6_2, 0, hcb8_2, 0, hcb10_2, hcb11_2 }; -hcb_bin_pair *hcb_bin_table[] ICONST_ATTR = { +static hcb_bin_pair *hcb_bin_table[] ICONST_ATTR = { 0, 0, 0, 0, 0, hcb5, 0, hcb7, 0, hcb9, 0, 0 }; -uint8_t hcbN[] ICONST_ATTR = { 0, 5, 5, 0, 5, 0, 5, 0, 5, 0, 6, 5 }; +static uint8_t hcbN[] ICONST_ATTR = { 0, 5, 5, 0, 5, 0, 5, 0, 5, 0, 6, 5 }; /* defines whether a huffman codebook is unsigned or not */ /* Table 4.6.2 */ -uint8_t unsigned_cb[] ICONST_ATTR = { 0, 0, 0, 1, 1, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, +static uint8_t unsigned_cb[] ICONST_ATTR = { 0, 0, 0, 1, 1, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, /* codebook 16 to 31 */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }; -int hcb_2_quad_table_size[] ICONST_ATTR = { 0, 114, 86, 0, 185, 0, 0, 0, 0, 0, 0, 0 }; -int hcb_2_pair_table_size[] ICONST_ATTR = { 0, 0, 0, 0, 0, 0, 126, 0, 83, 0, 210, 373 }; -int hcb_bin_table_size[] ICONST_ATTR = { 0, 0, 0, 161, 0, 161, 0, 127, 0, 337, 0, 0 }; +static int hcb_2_quad_table_size[] ICONST_ATTR = { 0, 114, 86, 0, 185, 0, 0, 0, 0, 0, 0, 0 }; +static int hcb_2_pair_table_size[] ICONST_ATTR = { 0, 0, 0, 0, 0, 0, 126, 0, 83, 0, 210, 373 }; +static int hcb_bin_table_size[] ICONST_ATTR = { 0, 0, 0, 161, 0, 161, 0, 127, 0, 337, 0, 0 }; #define FAAD_GET_SIGN(idx) \ if (sp[idx]) \ @@ -113,6 +113,9 @@ static INLINE void huffman_sign_bits_pair(bitfile *ld, int16_t *sp) { FAAD_GET_SIGN(0) FAAD_GET_SIGN(1) + + /* silence compiler warning about unused globals */ + (void)unsigned_cb; } static INLINE void huffman_sign_bits_quad(bitfile *ld, int16_t *sp) diff --git a/lib/rbcodec/codecs/libfaad/syntax.c b/lib/rbcodec/codecs/libfaad/syntax.c index d3d7f9e..65e1bf7 100644 --- a/lib/rbcodec/codecs/libfaad/syntax.c +++ b/lib/rbcodec/codecs/libfaad/syntax.c @@ -558,8 +558,8 @@ void raw_data_block(NeAACDecHandle hDecoder, NeAACDecFrameInfo *hInfo, /* Table 4.4.4 and */ /* Table 4.4.9 */ -int16_t spec_data[FRAME_LEN] MEM_ALIGN_ATTR = {0}; -element sce; +static int16_t spec_data[FRAME_LEN] MEM_ALIGN_ATTR = {0}; +static element sce; static uint8_t single_lfe_channel_element(NeAACDecHandle hDecoder, bitfile *ld, uint8_t channel, uint8_t *tag) { @@ -604,9 +604,9 @@ static uint8_t single_lfe_channel_element(NeAACDecHandle hDecoder, bitfile *ld, /* Table 4.4.5 */ -int16_t spec_data1[FRAME_LEN] IBSS_ATTR MEM_ALIGN_ATTR; -int16_t spec_data2[FRAME_LEN] IBSS_ATTR MEM_ALIGN_ATTR; -element cpe; +static int16_t spec_data1[FRAME_LEN] IBSS_ATTR MEM_ALIGN_ATTR; +static int16_t spec_data2[FRAME_LEN] IBSS_ATTR MEM_ALIGN_ATTR; +static element cpe; static uint8_t channel_pair_element(NeAACDecHandle hDecoder, bitfile *ld, uint8_t channels, uint8_t *tag) { |