diff options
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 eaefdbf437..53e234ade9 100644 --- a/lib/rbcodec/codecs/libfaad/codebook/hcb.h +++ b/lib/rbcodec/codecs/libfaad/codebook/hcb.h | |||
@@ -112,16 +112,6 @@ typedef struct | |||
112 | int8_t data[2]; | 112 | int8_t data[2]; |
113 | } hcb_bin_pair; | 113 | } hcb_bin_pair; |
114 | 114 | ||
115 | hcb *hcb_table[]; | ||
116 | hcb_2_quad *hcb_2_quad_table[]; | ||
117 | hcb_2_pair *hcb_2_pair_table[]; | ||
118 | hcb_bin_pair *hcb_bin_table[]; | ||
119 | uint8_t hcbN[]; | ||
120 | uint8_t unsigned_cb[]; | ||
121 | int hcb_2_quad_table_size[]; | ||
122 | int hcb_2_pair_table_size[]; | ||
123 | int hcb_bin_table_size[]; | ||
124 | |||
125 | #include "codebook/hcb_1.h" | 115 | #include "codebook/hcb_1.h" |
126 | #include "codebook/hcb_2.h" | 116 | #include "codebook/hcb_2.h" |
127 | #include "codebook/hcb_3.h" | 117 | #include "codebook/hcb_3.h" |
diff --git a/lib/rbcodec/codecs/libfaad/huffman.c b/lib/rbcodec/codecs/libfaad/huffman.c index bea0dd7bf2..93e3a2dfc3 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) | |||
76 | } | 76 | } |
77 | 77 | ||
78 | 78 | ||
79 | hcb *hcb_table[] ICONST_ATTR = { | 79 | static hcb *hcb_table[] ICONST_ATTR = { |
80 | 0, hcb1_1, hcb2_1, 0, hcb4_1, 0, hcb6_1, 0, hcb8_1, 0, hcb10_1, hcb11_1 | 80 | 0, hcb1_1, hcb2_1, 0, hcb4_1, 0, hcb6_1, 0, hcb8_1, 0, hcb10_1, hcb11_1 |
81 | }; | 81 | }; |
82 | 82 | ||
83 | hcb_2_quad *hcb_2_quad_table[] ICONST_ATTR = { | 83 | static hcb_2_quad *hcb_2_quad_table[] ICONST_ATTR = { |
84 | 0, hcb1_2, hcb2_2, 0, hcb4_2, 0, 0, 0, 0, 0, 0, 0 | 84 | 0, hcb1_2, hcb2_2, 0, hcb4_2, 0, 0, 0, 0, 0, 0, 0 |
85 | }; | 85 | }; |
86 | 86 | ||
87 | hcb_2_pair *hcb_2_pair_table[] ICONST_ATTR = { | 87 | static hcb_2_pair *hcb_2_pair_table[] ICONST_ATTR = { |
88 | 0, 0, 0, 0, 0, 0, hcb6_2, 0, hcb8_2, 0, hcb10_2, hcb11_2 | 88 | 0, 0, 0, 0, 0, 0, hcb6_2, 0, hcb8_2, 0, hcb10_2, hcb11_2 |
89 | }; | 89 | }; |
90 | 90 | ||
91 | hcb_bin_pair *hcb_bin_table[] ICONST_ATTR = { | 91 | static hcb_bin_pair *hcb_bin_table[] ICONST_ATTR = { |
92 | 0, 0, 0, 0, 0, hcb5, 0, hcb7, 0, hcb9, 0, 0 | 92 | 0, 0, 0, 0, 0, hcb5, 0, hcb7, 0, hcb9, 0, 0 |
93 | }; | 93 | }; |
94 | 94 | ||
95 | uint8_t hcbN[] ICONST_ATTR = { 0, 5, 5, 0, 5, 0, 5, 0, 5, 0, 6, 5 }; | 95 | static uint8_t hcbN[] ICONST_ATTR = { 0, 5, 5, 0, 5, 0, 5, 0, 5, 0, 6, 5 }; |
96 | 96 | ||
97 | /* defines whether a huffman codebook is unsigned or not */ | 97 | /* defines whether a huffman codebook is unsigned or not */ |
98 | /* Table 4.6.2 */ | 98 | /* Table 4.6.2 */ |
99 | uint8_t unsigned_cb[] ICONST_ATTR = { 0, 0, 0, 1, 1, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, | 99 | static uint8_t unsigned_cb[] ICONST_ATTR = { 0, 0, 0, 1, 1, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, |
100 | /* codebook 16 to 31 */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 | 100 | /* codebook 16 to 31 */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 |
101 | }; | 101 | }; |
102 | 102 | ||
103 | int hcb_2_quad_table_size[] ICONST_ATTR = { 0, 114, 86, 0, 185, 0, 0, 0, 0, 0, 0, 0 }; | 103 | static int hcb_2_quad_table_size[] ICONST_ATTR = { 0, 114, 86, 0, 185, 0, 0, 0, 0, 0, 0, 0 }; |
104 | int hcb_2_pair_table_size[] ICONST_ATTR = { 0, 0, 0, 0, 0, 0, 126, 0, 83, 0, 210, 373 }; | 104 | static int hcb_2_pair_table_size[] ICONST_ATTR = { 0, 0, 0, 0, 0, 0, 126, 0, 83, 0, 210, 373 }; |
105 | int hcb_bin_table_size[] ICONST_ATTR = { 0, 0, 0, 161, 0, 161, 0, 127, 0, 337, 0, 0 }; | 105 | static int hcb_bin_table_size[] ICONST_ATTR = { 0, 0, 0, 161, 0, 161, 0, 127, 0, 337, 0, 0 }; |
106 | 106 | ||
107 | #define FAAD_GET_SIGN(idx) \ | 107 | #define FAAD_GET_SIGN(idx) \ |
108 | if (sp[idx]) \ | 108 | if (sp[idx]) \ |
@@ -113,6 +113,9 @@ static INLINE void huffman_sign_bits_pair(bitfile *ld, int16_t *sp) | |||
113 | { | 113 | { |
114 | FAAD_GET_SIGN(0) | 114 | FAAD_GET_SIGN(0) |
115 | FAAD_GET_SIGN(1) | 115 | FAAD_GET_SIGN(1) |
116 | |||
117 | /* silence compiler warning about unused globals */ | ||
118 | (void)unsigned_cb; | ||
116 | } | 119 | } |
117 | 120 | ||
118 | static INLINE void huffman_sign_bits_quad(bitfile *ld, int16_t *sp) | 121 | 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 d3d7f9e3d4..65e1bf7744 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, | |||
558 | 558 | ||
559 | /* Table 4.4.4 and */ | 559 | /* Table 4.4.4 and */ |
560 | /* Table 4.4.9 */ | 560 | /* Table 4.4.9 */ |
561 | int16_t spec_data[FRAME_LEN] MEM_ALIGN_ATTR = {0}; | 561 | static int16_t spec_data[FRAME_LEN] MEM_ALIGN_ATTR = {0}; |
562 | element sce; | 562 | static element sce; |
563 | static uint8_t single_lfe_channel_element(NeAACDecHandle hDecoder, bitfile *ld, | 563 | static uint8_t single_lfe_channel_element(NeAACDecHandle hDecoder, bitfile *ld, |
564 | uint8_t channel, uint8_t *tag) | 564 | uint8_t channel, uint8_t *tag) |
565 | { | 565 | { |
@@ -604,9 +604,9 @@ static uint8_t single_lfe_channel_element(NeAACDecHandle hDecoder, bitfile *ld, | |||
604 | 604 | ||
605 | /* Table 4.4.5 */ | 605 | /* Table 4.4.5 */ |
606 | 606 | ||
607 | int16_t spec_data1[FRAME_LEN] IBSS_ATTR MEM_ALIGN_ATTR; | 607 | static int16_t spec_data1[FRAME_LEN] IBSS_ATTR MEM_ALIGN_ATTR; |
608 | int16_t spec_data2[FRAME_LEN] IBSS_ATTR MEM_ALIGN_ATTR; | 608 | static int16_t spec_data2[FRAME_LEN] IBSS_ATTR MEM_ALIGN_ATTR; |
609 | element cpe; | 609 | static element cpe; |
610 | static uint8_t channel_pair_element(NeAACDecHandle hDecoder, bitfile *ld, | 610 | static uint8_t channel_pair_element(NeAACDecHandle hDecoder, bitfile *ld, |
611 | uint8_t channels, uint8_t *tag) | 611 | uint8_t channels, uint8_t *tag) |
612 | { | 612 | { |