1
0
Fork 0
forked from len0rd/rockbox

Limit more variables to file scope

Change-Id: I30219d626316776eb73b4205d63376fa3dbc6361
This commit is contained in:
Thomas Jarosch 2015-01-11 21:40:51 +01:00
parent 85c98bc63c
commit 2a3e1628a5
21 changed files with 70 additions and 77 deletions

View file

@ -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"

View file

@ -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)

View file

@ -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)
{