summaryrefslogtreecommitdiff
path: root/lib/rbcodec/codecs/libfaad
diff options
context:
space:
mode:
Diffstat (limited to 'lib/rbcodec/codecs/libfaad')
-rw-r--r--lib/rbcodec/codecs/libfaad/codebook/hcb.h10
-rw-r--r--lib/rbcodec/codecs/libfaad/huffman.c21
-rw-r--r--lib/rbcodec/codecs/libfaad/syntax.c10
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
115hcb *hcb_table[];
116hcb_2_quad *hcb_2_quad_table[];
117hcb_2_pair *hcb_2_pair_table[];
118hcb_bin_pair *hcb_bin_table[];
119uint8_t hcbN[];
120uint8_t unsigned_cb[];
121int hcb_2_quad_table_size[];
122int hcb_2_pair_table_size[];
123int 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
79hcb *hcb_table[] ICONST_ATTR = { 79static 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
83hcb_2_quad *hcb_2_quad_table[] ICONST_ATTR = { 83static 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
87hcb_2_pair *hcb_2_pair_table[] ICONST_ATTR = { 87static 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
91hcb_bin_pair *hcb_bin_table[] ICONST_ATTR = { 91static 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
95uint8_t hcbN[] ICONST_ATTR = { 0, 5, 5, 0, 5, 0, 5, 0, 5, 0, 6, 5 }; 95static 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 */
99uint8_t unsigned_cb[] ICONST_ATTR = { 0, 0, 0, 1, 1, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 99static 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
103int hcb_2_quad_table_size[] ICONST_ATTR = { 0, 114, 86, 0, 185, 0, 0, 0, 0, 0, 0, 0 }; 103static int hcb_2_quad_table_size[] ICONST_ATTR = { 0, 114, 86, 0, 185, 0, 0, 0, 0, 0, 0, 0 };
104int hcb_2_pair_table_size[] ICONST_ATTR = { 0, 0, 0, 0, 0, 0, 126, 0, 83, 0, 210, 373 }; 104static int hcb_2_pair_table_size[] ICONST_ATTR = { 0, 0, 0, 0, 0, 0, 126, 0, 83, 0, 210, 373 };
105int hcb_bin_table_size[] ICONST_ATTR = { 0, 0, 0, 161, 0, 161, 0, 127, 0, 337, 0, 0 }; 105static 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
118static INLINE void huffman_sign_bits_quad(bitfile *ld, int16_t *sp) 121static 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 */
561int16_t spec_data[FRAME_LEN] MEM_ALIGN_ATTR = {0}; 561static int16_t spec_data[FRAME_LEN] MEM_ALIGN_ATTR = {0};
562element sce; 562static element sce;
563static uint8_t single_lfe_channel_element(NeAACDecHandle hDecoder, bitfile *ld, 563static 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
607int16_t spec_data1[FRAME_LEN] IBSS_ATTR MEM_ALIGN_ATTR; 607static int16_t spec_data1[FRAME_LEN] IBSS_ATTR MEM_ALIGN_ATTR;
608int16_t spec_data2[FRAME_LEN] IBSS_ATTR MEM_ALIGN_ATTR; 608static int16_t spec_data2[FRAME_LEN] IBSS_ATTR MEM_ALIGN_ATTR;
609element cpe; 609static element cpe;
610static uint8_t channel_pair_element(NeAACDecHandle hDecoder, bitfile *ld, 610static 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{