diff options
Diffstat (limited to 'apps/codecs/libfaad/syntax.c')
-rw-r--r-- | apps/codecs/libfaad/syntax.c | 32 |
1 files changed, 21 insertions, 11 deletions
diff --git a/apps/codecs/libfaad/syntax.c b/apps/codecs/libfaad/syntax.c index 1ce086eb4b..85e927b74d 100644 --- a/apps/codecs/libfaad/syntax.c +++ b/apps/codecs/libfaad/syntax.c | |||
@@ -558,14 +558,16 @@ 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 | ALIGN int16_t spec_data[1024] = {0}; | ||
562 | element sce IBSS_ATTR; | ||
561 | static uint8_t single_lfe_channel_element(NeAACDecHandle hDecoder, bitfile *ld, | 563 | static uint8_t single_lfe_channel_element(NeAACDecHandle hDecoder, bitfile *ld, |
562 | uint8_t channel, uint8_t *tag) | 564 | uint8_t channel, uint8_t *tag) |
563 | { | 565 | { |
564 | uint8_t retval = 0; | 566 | uint8_t retval = 0; |
565 | element sce = {0}; | ||
566 | ic_stream *ics = &(sce.ics1); | 567 | ic_stream *ics = &(sce.ics1); |
567 | ALIGN int16_t spec_data[1024] = {0}; | ||
568 | 568 | ||
569 | memset(spec_data,0,sizeof(spec_data)); | ||
570 | memset(&sce,0,sizeof(sce)); | ||
569 | sce.element_instance_tag = (uint8_t)faad_getbits(ld, LEN_TAG | 571 | sce.element_instance_tag = (uint8_t)faad_getbits(ld, LEN_TAG |
570 | DEBUGVAR(1,38,"single_lfe_channel_element(): element_instance_tag")); | 572 | DEBUGVAR(1,38,"single_lfe_channel_element(): element_instance_tag")); |
571 | 573 | ||
@@ -601,16 +603,19 @@ static uint8_t single_lfe_channel_element(NeAACDecHandle hDecoder, bitfile *ld, | |||
601 | } | 603 | } |
602 | 604 | ||
603 | /* Table 4.4.5 */ | 605 | /* Table 4.4.5 */ |
606 | ALIGN int16_t spec_data1[1024]; | ||
607 | ALIGN int16_t spec_data2[1024]; | ||
608 | element cpe IBSS_ATTR; | ||
604 | static uint8_t channel_pair_element(NeAACDecHandle hDecoder, bitfile *ld, | 609 | static uint8_t channel_pair_element(NeAACDecHandle hDecoder, bitfile *ld, |
605 | uint8_t channels, uint8_t *tag) | 610 | uint8_t channels, uint8_t *tag) |
606 | { | 611 | { |
607 | ALIGN int16_t spec_data1[1024] = {0}; | ||
608 | ALIGN int16_t spec_data2[1024] = {0}; | ||
609 | element cpe = {0}; | ||
610 | ic_stream *ics1 = &(cpe.ics1); | 612 | ic_stream *ics1 = &(cpe.ics1); |
611 | ic_stream *ics2 = &(cpe.ics2); | 613 | ic_stream *ics2 = &(cpe.ics2); |
612 | uint8_t result; | 614 | uint8_t result; |
613 | 615 | ||
616 | memset(spec_data1,0,sizeof(spec_data1)); | ||
617 | memset(spec_data2,0,sizeof(spec_data2)); | ||
618 | memset(&cpe,0,sizeof(cpe)); | ||
614 | cpe.channel = channels; | 619 | cpe.channel = channels; |
615 | cpe.paired_channel = channels+1; | 620 | cpe.paired_channel = channels+1; |
616 | 621 | ||
@@ -876,7 +881,7 @@ static uint8_t coupling_channel_element(NeAACDecHandle hDecoder, bitfile *ld) | |||
876 | 881 | ||
877 | element el_empty = {0}; | 882 | element el_empty = {0}; |
878 | ic_stream ics_empty = {0}; | 883 | ic_stream ics_empty = {0}; |
879 | int16_t sh_data[1024]; | 884 | static int16_t sh_data[1024]; |
880 | 885 | ||
881 | c = faad_getbits(ld, LEN_TAG | 886 | c = faad_getbits(ld, LEN_TAG |
882 | DEBUGVAR(1,900,"coupling_channel_element(): element_instance_tag")); | 887 | DEBUGVAR(1,900,"coupling_channel_element(): element_instance_tag")); |
@@ -961,6 +966,8 @@ static uint16_t data_stream_element(NeAACDecHandle hDecoder, bitfile *ld) | |||
961 | uint8_t byte_aligned; | 966 | uint8_t byte_aligned; |
962 | uint16_t i, count; | 967 | uint16_t i, count; |
963 | 968 | ||
969 | (void)hDecoder; | ||
970 | |||
964 | /* element_instance_tag = */ faad_getbits(ld, LEN_TAG | 971 | /* element_instance_tag = */ faad_getbits(ld, LEN_TAG |
965 | DEBUGVAR(1,60,"data_stream_element(): element_instance_tag")); | 972 | DEBUGVAR(1,60,"data_stream_element(): element_instance_tag")); |
966 | byte_aligned = faad_get1bit(ld | 973 | byte_aligned = faad_get1bit(ld |
@@ -1158,6 +1165,8 @@ static void gain_control_data(bitfile *ld, ic_stream *ics) | |||
1158 | #endif | 1165 | #endif |
1159 | 1166 | ||
1160 | #ifdef SCALABLE_DEC | 1167 | #ifdef SCALABLE_DEC |
1168 | ALIGN int16_t spec_data1[1024] IBSS_ATTR; | ||
1169 | ALIGN int16_t spec_data2[1024] IBSS_ATTR; | ||
1161 | /* Table 4.4.13 ASME */ | 1170 | /* Table 4.4.13 ASME */ |
1162 | void aac_scalable_main_element(NeAACDecHandle hDecoder, NeAACDecFrameInfo *hInfo, | 1171 | void aac_scalable_main_element(NeAACDecHandle hDecoder, NeAACDecFrameInfo *hInfo, |
1163 | bitfile *ld, program_config *pce, drc_info *drc) | 1172 | bitfile *ld, program_config *pce, drc_info *drc) |
@@ -1170,9 +1179,9 @@ void aac_scalable_main_element(NeAACDecHandle hDecoder, NeAACDecFrameInfo *hInfo | |||
1170 | ic_stream *ics1 = &(cpe.ics1); | 1179 | ic_stream *ics1 = &(cpe.ics1); |
1171 | ic_stream *ics2 = &(cpe.ics2); | 1180 | ic_stream *ics2 = &(cpe.ics2); |
1172 | int16_t *spec_data; | 1181 | int16_t *spec_data; |
1173 | ALIGN int16_t spec_data1[1024] = {0}; | ||
1174 | ALIGN int16_t spec_data2[1024] = {0}; | ||
1175 | 1182 | ||
1183 | memset(spec_data1,0,sizeof(spec_data1)); | ||
1184 | memset(spec_data2,0,sizeof(spec_data2)); | ||
1176 | hDecoder->fr_ch_ele = 0; | 1185 | hDecoder->fr_ch_ele = 0; |
1177 | 1186 | ||
1178 | hInfo->error = aac_scalable_main_header(hDecoder, ics1, ics2, ld, this_layer_stereo); | 1187 | hInfo->error = aac_scalable_main_header(hDecoder, ics1, ics2, ld, this_layer_stereo); |
@@ -1810,7 +1819,8 @@ static uint8_t scale_factor_data(NeAACDecHandle hDecoder, ic_stream *ics, bitfil | |||
1810 | /* Table 4.4.27 */ | 1819 | /* Table 4.4.27 */ |
1811 | static void tns_data(ic_stream *ics, tns_info *tns, bitfile *ld) | 1820 | static void tns_data(ic_stream *ics, tns_info *tns, bitfile *ld) |
1812 | { | 1821 | { |
1813 | uint8_t w, filt, i, start_coef_bits, coef_bits; | 1822 | uint8_t w, filt, i, start_coef_bits = 0; |
1823 | int8_t coef_bits; | ||
1814 | uint8_t n_filt_bits = 2; | 1824 | uint8_t n_filt_bits = 2; |
1815 | uint8_t length_bits = 6; | 1825 | uint8_t length_bits = 6; |
1816 | uint8_t order_bits = 5; | 1826 | uint8_t order_bits = 5; |
@@ -2048,11 +2058,11 @@ static uint16_t extension_payload(bitfile *ld, drc_info *drc, uint16_t count) | |||
2048 | return n; | 2058 | return n; |
2049 | case EXT_FILL_DATA: | 2059 | case EXT_FILL_DATA: |
2050 | /* fill_nibble = */ faad_getbits(ld, 4 | 2060 | /* fill_nibble = */ faad_getbits(ld, 4 |
2051 | DEBUGVAR(1,136,"extension_payload(): fill_nibble")); /* must be ‘0000’ */ | 2061 | DEBUGVAR(1,136,"extension_payload(): fill_nibble")); /* must be æ0000Æ */ |
2052 | for (i = 0; i < count-1; i++) | 2062 | for (i = 0; i < count-1; i++) |
2053 | { | 2063 | { |
2054 | /* fill_byte[i] = */ faad_getbits(ld, 8 | 2064 | /* fill_byte[i] = */ faad_getbits(ld, 8 |
2055 | DEBUGVAR(1,88,"extension_payload(): fill_byte")); /* must be ‘10100101’ */ | 2065 | DEBUGVAR(1,88,"extension_payload(): fill_byte")); /* must be æ10100101Æ */ |
2056 | } | 2066 | } |
2057 | return count; | 2067 | return count; |
2058 | case EXT_DATA_ELEMENT: | 2068 | case EXT_DATA_ELEMENT: |