X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavcodec%2Faacdec_template.c;h=fbe30740715fecaacf5f9ebddf31b647fc62ca9d;hb=3cc2e15b91d785c936cd1e775d225c5e69f72dbf;hp=21db12fdab8651a7fa8b7ca148caa3fdb9e9c4f0;hpb=3fcfe6ba40130d017bf2c9ca1d03d1f6426c8cec;p=ffmpeg diff --git a/libavcodec/aacdec_template.c b/libavcodec/aacdec_template.c index 21db12fdab8..fbe30740715 100644 --- a/libavcodec/aacdec_template.c +++ b/libavcodec/aacdec_template.c @@ -198,7 +198,7 @@ struct elem_to_channel { static int assign_pair(struct elem_to_channel e2c_vec[MAX_ELEM_ID], uint8_t (*layout_map)[3], int offset, uint64_t left, - uint64_t right, int pos) + uint64_t right, int pos, uint64_t *layout) { if (layout_map[offset][0] == TYPE_CPE) { e2c_vec[offset] = (struct elem_to_channel) { @@ -207,6 +207,9 @@ static int assign_pair(struct elem_to_channel e2c_vec[MAX_ELEM_ID], .elem_id = layout_map[offset][1], .aac_position = pos }; + if (e2c_vec[offset].av_position != UINT64_MAX) + *layout |= e2c_vec[offset].av_position; + return 1; } else { e2c_vec[offset] = (struct elem_to_channel) { @@ -221,6 +224,12 @@ static int assign_pair(struct elem_to_channel e2c_vec[MAX_ELEM_ID], .elem_id = layout_map[offset + 1][1], .aac_position = pos }; + if (left != UINT64_MAX) + *layout |= left; + + if (right != UINT64_MAX) + *layout |= right; + return 2; } } @@ -257,12 +266,13 @@ static int count_paired_channels(uint8_t (*layout_map)[3], int tags, int pos, return num_pos_channels; } +#define PREFIX_FOR_22POINT2 (AV_CH_LAYOUT_7POINT1_WIDE_BACK|AV_CH_BACK_CENTER|AV_CH_SIDE_LEFT|AV_CH_SIDE_RIGHT|AV_CH_LOW_FREQUENCY_2) static uint64_t sniff_channel_order(uint8_t (*layout_map)[3], int tags) { int i, n, total_non_cc_elements; struct elem_to_channel e2c_vec[4 * MAX_ELEM_ID] = { { 0 } }; int num_front_channels, num_side_channels, num_back_channels; - uint64_t layout; + uint64_t layout = 0; if (FF_ARRAY_ELEMS(e2c_vec) < tags) return 0; @@ -294,6 +304,7 @@ static uint64_t sniff_channel_order(uint8_t (*layout_map)[3], int tags) .elem_id = layout_map[i][1], .aac_position = AAC_CHANNEL_FRONT }; + layout |= e2c_vec[i].av_position; i++; num_front_channels--; } @@ -301,21 +312,21 @@ static uint64_t sniff_channel_order(uint8_t (*layout_map)[3], int tags) i += assign_pair(e2c_vec, layout_map, i, AV_CH_FRONT_LEFT_OF_CENTER, AV_CH_FRONT_RIGHT_OF_CENTER, - AAC_CHANNEL_FRONT); + AAC_CHANNEL_FRONT, &layout); num_front_channels -= 2; } if (num_front_channels >= 2) { i += assign_pair(e2c_vec, layout_map, i, AV_CH_FRONT_LEFT, AV_CH_FRONT_RIGHT, - AAC_CHANNEL_FRONT); + AAC_CHANNEL_FRONT, &layout); num_front_channels -= 2; } while (num_front_channels >= 2) { i += assign_pair(e2c_vec, layout_map, i, UINT64_MAX, UINT64_MAX, - AAC_CHANNEL_FRONT); + AAC_CHANNEL_FRONT, &layout); num_front_channels -= 2; } @@ -323,14 +334,14 @@ static uint64_t sniff_channel_order(uint8_t (*layout_map)[3], int tags) i += assign_pair(e2c_vec, layout_map, i, AV_CH_SIDE_LEFT, AV_CH_SIDE_RIGHT, - AAC_CHANNEL_FRONT); + AAC_CHANNEL_FRONT, &layout); num_side_channels -= 2; } while (num_side_channels >= 2) { i += assign_pair(e2c_vec, layout_map, i, UINT64_MAX, UINT64_MAX, - AAC_CHANNEL_SIDE); + AAC_CHANNEL_SIDE, &layout); num_side_channels -= 2; } @@ -338,14 +349,14 @@ static uint64_t sniff_channel_order(uint8_t (*layout_map)[3], int tags) i += assign_pair(e2c_vec, layout_map, i, UINT64_MAX, UINT64_MAX, - AAC_CHANNEL_BACK); + AAC_CHANNEL_BACK, &layout); num_back_channels -= 2; } if (num_back_channels >= 2) { i += assign_pair(e2c_vec, layout_map, i, AV_CH_BACK_LEFT, AV_CH_BACK_RIGHT, - AAC_CHANNEL_BACK); + AAC_CHANNEL_BACK, &layout); num_back_channels -= 2; } if (num_back_channels) { @@ -355,6 +366,7 @@ static uint64_t sniff_channel_order(uint8_t (*layout_map)[3], int tags) .elem_id = layout_map[i][1], .aac_position = AAC_CHANNEL_BACK }; + layout |= e2c_vec[i].av_position; i++; num_back_channels--; } @@ -366,6 +378,7 @@ static uint64_t sniff_channel_order(uint8_t (*layout_map)[3], int tags) .elem_id = layout_map[i][1], .aac_position = AAC_CHANNEL_LFE }; + layout |= e2c_vec[i].av_position; i++; } if (i < tags && layout_map[i][2] == AAC_CHANNEL_LFE) { @@ -375,6 +388,7 @@ static uint64_t sniff_channel_order(uint8_t (*layout_map)[3], int tags) .elem_id = layout_map[i][1], .aac_position = AAC_CHANNEL_LFE }; + layout |= e2c_vec[i].av_position; i++; } while (i < tags && layout_map[i][2] == AAC_CHANNEL_LFE) { @@ -387,26 +401,95 @@ static uint64_t sniff_channel_order(uint8_t (*layout_map)[3], int tags) i++; } - // Must choose a stable sort + // The previous checks would end up at 8 at this point for 22.2 + if (layout == PREFIX_FOR_22POINT2 && tags == 16 && i == 8) { + const uint8_t (*reference_layout_map)[3] = aac_channel_layout_map[12]; + for (int j = 0; j < tags; j++) { + if (layout_map[j][0] != reference_layout_map[j][0] || + layout_map[j][2] != reference_layout_map[j][2]) + goto end_of_layout_definition; + } + + e2c_vec[i] = (struct elem_to_channel) { + .av_position = AV_CH_TOP_FRONT_CENTER, + .syn_ele = layout_map[i][0], + .elem_id = layout_map[i][1], + .aac_position = layout_map[i][2] + }; layout |= e2c_vec[i].av_position; i++; + i += assign_pair(e2c_vec, layout_map, i, + AV_CH_TOP_FRONT_LEFT, + AV_CH_TOP_FRONT_RIGHT, + AAC_CHANNEL_FRONT, + &layout); + i += assign_pair(e2c_vec, layout_map, i, + AV_CH_TOP_SIDE_LEFT, + AV_CH_TOP_SIDE_RIGHT, + AAC_CHANNEL_SIDE, + &layout); + e2c_vec[i] = (struct elem_to_channel) { + .av_position = AV_CH_TOP_CENTER, + .syn_ele = layout_map[i][0], + .elem_id = layout_map[i][1], + .aac_position = layout_map[i][2] + }; layout |= e2c_vec[i].av_position; i++; + i += assign_pair(e2c_vec, layout_map, i, + AV_CH_TOP_BACK_LEFT, + AV_CH_TOP_BACK_RIGHT, + AAC_CHANNEL_BACK, + &layout); + e2c_vec[i] = (struct elem_to_channel) { + .av_position = AV_CH_TOP_BACK_CENTER, + .syn_ele = layout_map[i][0], + .elem_id = layout_map[i][1], + .aac_position = layout_map[i][2] + }; layout |= e2c_vec[i].av_position; i++; + e2c_vec[i] = (struct elem_to_channel) { + .av_position = AV_CH_BOTTOM_FRONT_CENTER, + .syn_ele = layout_map[i][0], + .elem_id = layout_map[i][1], + .aac_position = layout_map[i][2] + }; layout |= e2c_vec[i].av_position; i++; + i += assign_pair(e2c_vec, layout_map, i, + AV_CH_BOTTOM_FRONT_LEFT, + AV_CH_BOTTOM_FRONT_RIGHT, + AAC_CHANNEL_FRONT, + &layout); + } + +end_of_layout_definition: + total_non_cc_elements = n = i; - do { - int next_n = 0; - for (i = 1; i < n; i++) - if (e2c_vec[i - 1].av_position > e2c_vec[i].av_position) { - FFSWAP(struct elem_to_channel, e2c_vec[i - 1], e2c_vec[i]); - next_n = i; - } - n = next_n; - } while (n > 0); - layout = 0; + if (layout == AV_CH_LAYOUT_22POINT2) { + // For 22.2 reorder the result as needed + FFSWAP(struct elem_to_channel, e2c_vec[2], e2c_vec[0]); // FL & FR first (final), FC third + FFSWAP(struct elem_to_channel, e2c_vec[2], e2c_vec[1]); // FC second (final), FLc & FRc third + FFSWAP(struct elem_to_channel, e2c_vec[6], e2c_vec[2]); // LFE1 third (final), FLc & FRc seventh + FFSWAP(struct elem_to_channel, e2c_vec[4], e2c_vec[3]); // BL & BR fourth (final), SiL & SiR fifth + FFSWAP(struct elem_to_channel, e2c_vec[6], e2c_vec[4]); // FLc & FRc fifth (final), SiL & SiR seventh + FFSWAP(struct elem_to_channel, e2c_vec[7], e2c_vec[6]); // LFE2 seventh (final), SiL & SiR eight (final) + FFSWAP(struct elem_to_channel, e2c_vec[9], e2c_vec[8]); // TpFL & TpFR ninth (final), TFC tenth (final) + FFSWAP(struct elem_to_channel, e2c_vec[11], e2c_vec[10]); // TC eleventh (final), TpSiL & TpSiR twelth + FFSWAP(struct elem_to_channel, e2c_vec[12], e2c_vec[11]); // TpBL & TpBR twelth (final), TpSiL & TpSiR thirteenth (final) + } else { + // For everything else, utilize the AV channel position define as a + // stable sort. + do { + int next_n = 0; + for (i = 1; i < n; i++) + if (e2c_vec[i - 1].av_position > e2c_vec[i].av_position) { + FFSWAP(struct elem_to_channel, e2c_vec[i - 1], e2c_vec[i]); + next_n = i; + } + n = next_n; + } while (n > 0); + + } + for (i = 0; i < total_non_cc_elements; i++) { layout_map[i][0] = e2c_vec[i].syn_ele; layout_map[i][1] = e2c_vec[i].elem_id; layout_map[i][2] = e2c_vec[i].aac_position; - if (e2c_vec[i].av_position != UINT64_MAX) { - layout |= e2c_vec[i].av_position; - } } return layout; @@ -535,7 +618,7 @@ static int set_default_channel_config(AACContext *ac, AVCodecContext *avctx, int channel_config) { if (channel_config < 1 || (channel_config > 7 && channel_config < 11) || - channel_config > 12) { + channel_config > 13) { av_log(avctx, AV_LOG_ERROR, "invalid default channel configuration (%d)\n", channel_config); @@ -615,6 +698,13 @@ static ChannelElement *get_che(AACContext *ac, int type, int elem_id) /* For indexed channel configurations map the channels solely based * on position. */ switch (ac->oc[1].m4ac.chan_config) { + case 13: + if (ac->tags_mapped > 3 && ((type == TYPE_CPE && elem_id < 8) || + (type == TYPE_SCE && elem_id < 6) || + (type == TYPE_LFE && elem_id < 2))) { + ac->tags_mapped++; + return ac->tag_che_map[type][elem_id] = ac->che[type][elem_id]; + } case 12: case 7: if (ac->tags_mapped == 3 && type == TYPE_CPE) { @@ -1105,29 +1195,25 @@ static void reset_predictor_group(PredictorState *ps, int group_num) reset_predict_state(&ps[i]); } -#define AAC_INIT_VLC_STATIC(num, size) \ - INIT_VLC_STATIC(&vlc_spectral[num], 8, ff_aac_spectral_sizes[num], \ - ff_aac_spectral_bits[num], sizeof(ff_aac_spectral_bits[num][0]), \ - sizeof(ff_aac_spectral_bits[num][0]), \ - ff_aac_spectral_codes[num], sizeof(ff_aac_spectral_codes[num][0]), \ - sizeof(ff_aac_spectral_codes[num][0]), \ - size); - static void aacdec_init(AACContext *ac); static av_cold void aac_static_table_init(void) { - AAC_INIT_VLC_STATIC( 0, 304); - AAC_INIT_VLC_STATIC( 1, 270); - AAC_INIT_VLC_STATIC( 2, 550); - AAC_INIT_VLC_STATIC( 3, 300); - AAC_INIT_VLC_STATIC( 4, 328); - AAC_INIT_VLC_STATIC( 5, 294); - AAC_INIT_VLC_STATIC( 6, 306); - AAC_INIT_VLC_STATIC( 7, 268); - AAC_INIT_VLC_STATIC( 8, 510); - AAC_INIT_VLC_STATIC( 9, 366); - AAC_INIT_VLC_STATIC(10, 462); + static VLC_TYPE vlc_buf[304 + 270 + 550 + 300 + 328 + + 294 + 306 + 268 + 510 + 366 + 462][2]; + for (unsigned i = 0, offset = 0; i < 11; i++) { + vlc_spectral[i].table = &vlc_buf[offset]; + vlc_spectral[i].table_allocated = FF_ARRAY_ELEMS(vlc_buf) - offset; + ff_init_vlc_sparse(&vlc_spectral[i], 8, ff_aac_spectral_sizes[i], + ff_aac_spectral_bits[i], sizeof(ff_aac_spectral_bits[i][0]), + sizeof(ff_aac_spectral_bits[i][0]), + ff_aac_spectral_codes[i], sizeof(ff_aac_spectral_codes[i][0]), + sizeof(ff_aac_spectral_codes[i][0]), + ff_aac_codebook_vector_idx[i], sizeof(ff_aac_codebook_vector_idx[i][0]), + sizeof(ff_aac_codebook_vector_idx[i][0]), + INIT_VLC_STATIC_OVERLONG); + offset += vlc_spectral[i].table_size; + } AAC_RENAME(ff_aac_sbr_init)(); @@ -1144,17 +1230,19 @@ static av_cold void aac_static_table_init(void) 352); // window initialization - AAC_RENAME(ff_kbd_window_init)(AAC_RENAME(ff_aac_kbd_long_1024), 4.0, 1024); - AAC_RENAME(ff_kbd_window_init)(AAC_RENAME(ff_aac_kbd_short_128), 6.0, 128); #if !USE_FIXED - AAC_RENAME(ff_kbd_window_init)(AAC_RENAME(ff_aac_kbd_long_960), 4.0, 960); - AAC_RENAME(ff_kbd_window_init)(AAC_RENAME(ff_aac_kbd_short_120), 6.0, 120); - AAC_RENAME(ff_sine_window_init)(AAC_RENAME(ff_sine_960), 960); - AAC_RENAME(ff_sine_window_init)(AAC_RENAME(ff_sine_120), 120); -#endif + AAC_RENAME(ff_kbd_window_init)(AAC_RENAME(aac_kbd_long_960), 4.0, 960); + AAC_RENAME(ff_kbd_window_init)(AAC_RENAME(aac_kbd_short_120), 6.0, 120); + AAC_RENAME(ff_sine_window_init)(AAC_RENAME(sine_960), 960); + AAC_RENAME(ff_sine_window_init)(AAC_RENAME(sine_120), 120); + ff_aac_float_common_init(); +#else + AAC_RENAME(ff_kbd_window_init)(AAC_KBD_RENAME(kbd_long_1024), 4.0, 1024); + AAC_RENAME(ff_kbd_window_init)(AAC_KBD_RENAME(kbd_short_128), 6.0, 128); AAC_RENAME(ff_init_ff_sine_windows)(10); - AAC_RENAME(ff_init_ff_sine_windows)( 9); AAC_RENAME(ff_init_ff_sine_windows)( 7); +#endif + AAC_RENAME(ff_init_ff_sine_windows)( 9); AAC_RENAME(ff_cbrt_tableinit)(); } @@ -1712,7 +1800,6 @@ static int decode_spectrum_and_dequant(AACContext *ac, INTFLOAT coef[1024], #if !USE_FIXED const float *vq = ff_aac_codebook_vector_vals[cbt_m1]; #endif /* !USE_FIXED */ - const uint16_t *cb_vector_idx = ff_aac_codebook_vector_idx[cbt_m1]; VLC_TYPE (*vlc_tab)[2] = vlc_spectral[cbt_m1].table; OPEN_READER(re, gb); @@ -1728,7 +1815,7 @@ static int decode_spectrum_and_dequant(AACContext *ac, INTFLOAT coef[1024], UPDATE_CACHE(re, gb); GET_VLC(code, re, gb, vlc_tab, 8, 2); - cb_idx = cb_vector_idx[code]; + cb_idx = code; #if USE_FIXED cf = DEC_SQUAD(cf, cb_idx); #else @@ -1751,7 +1838,7 @@ static int decode_spectrum_and_dequant(AACContext *ac, INTFLOAT coef[1024], UPDATE_CACHE(re, gb); GET_VLC(code, re, gb, vlc_tab, 8, 2); - cb_idx = cb_vector_idx[code]; + cb_idx = code; nnz = cb_idx >> 8 & 15; bits = nnz ? GET_CACHE(re, gb) : 0; LAST_SKIP_BITS(re, gb, nnz); @@ -1775,7 +1862,7 @@ static int decode_spectrum_and_dequant(AACContext *ac, INTFLOAT coef[1024], UPDATE_CACHE(re, gb); GET_VLC(code, re, gb, vlc_tab, 8, 2); - cb_idx = cb_vector_idx[code]; + cb_idx = code; #if USE_FIXED cf = DEC_SPAIR(cf, cb_idx); #else @@ -1799,7 +1886,7 @@ static int decode_spectrum_and_dequant(AACContext *ac, INTFLOAT coef[1024], UPDATE_CACHE(re, gb); GET_VLC(code, re, gb, vlc_tab, 8, 2); - cb_idx = cb_vector_idx[code]; + cb_idx = code; nnz = cb_idx >> 8 & 15; sign = nnz ? SHOW_UBITS(re, gb, nnz) << (cb_idx >> 12) : 0; LAST_SKIP_BITS(re, gb, nnz); @@ -1832,14 +1919,14 @@ static int decode_spectrum_and_dequant(AACContext *ac, INTFLOAT coef[1024], UPDATE_CACHE(re, gb); GET_VLC(code, re, gb, vlc_tab, 8, 2); + cb_idx = code; - if (!code) { + if (cb_idx == 0x0000) { *icf++ = 0; *icf++ = 0; continue; } - cb_idx = cb_vector_idx[code]; nnz = cb_idx >> 12; nzt = cb_idx >> 8; bits = SHOW_UBITS(re, gb, nnz) << (32-nnz); @@ -2557,10 +2644,10 @@ static void apply_tns(INTFLOAT coef_param[1024], TemporalNoiseShaping *tns, static void windowing_and_mdct_ltp(AACContext *ac, INTFLOAT *out, INTFLOAT *in, IndividualChannelStream *ics) { - const INTFLOAT *lwindow = ics->use_kb_window[0] ? AAC_RENAME(ff_aac_kbd_long_1024) : AAC_RENAME(ff_sine_1024); - const INTFLOAT *swindow = ics->use_kb_window[0] ? AAC_RENAME(ff_aac_kbd_short_128) : AAC_RENAME(ff_sine_128); - const INTFLOAT *lwindow_prev = ics->use_kb_window[1] ? AAC_RENAME(ff_aac_kbd_long_1024) : AAC_RENAME(ff_sine_1024); - const INTFLOAT *swindow_prev = ics->use_kb_window[1] ? AAC_RENAME(ff_aac_kbd_short_128) : AAC_RENAME(ff_sine_128); + const INTFLOAT *lwindow = ics->use_kb_window[0] ? AAC_KBD_RENAME(kbd_long_1024) : AAC_RENAME(ff_sine_1024); + const INTFLOAT *swindow = ics->use_kb_window[0] ? AAC_KBD_RENAME(kbd_short_128) : AAC_RENAME(ff_sine_128); + const INTFLOAT *lwindow_prev = ics->use_kb_window[1] ? AAC_KBD_RENAME(kbd_long_1024) : AAC_RENAME(ff_sine_1024); + const INTFLOAT *swindow_prev = ics->use_kb_window[1] ? AAC_KBD_RENAME(kbd_short_128) : AAC_RENAME(ff_sine_128); if (ics->window_sequence[0] != LONG_STOP_SEQUENCE) { ac->fdsp->vector_fmul(in, in, lwindow_prev, 1024); @@ -2617,8 +2704,8 @@ static void update_ltp(AACContext *ac, SingleChannelElement *sce) IndividualChannelStream *ics = &sce->ics; INTFLOAT *saved = sce->saved; INTFLOAT *saved_ltp = sce->coeffs; - const INTFLOAT *lwindow = ics->use_kb_window[0] ? AAC_RENAME(ff_aac_kbd_long_1024) : AAC_RENAME(ff_sine_1024); - const INTFLOAT *swindow = ics->use_kb_window[0] ? AAC_RENAME(ff_aac_kbd_short_128) : AAC_RENAME(ff_sine_128); + const INTFLOAT *lwindow = ics->use_kb_window[0] ? AAC_KBD_RENAME(kbd_long_1024) : AAC_RENAME(ff_sine_1024); + const INTFLOAT *swindow = ics->use_kb_window[0] ? AAC_KBD_RENAME(kbd_short_128) : AAC_RENAME(ff_sine_128); int i; if (ics->window_sequence[0] == EIGHT_SHORT_SEQUENCE) { @@ -2656,9 +2743,9 @@ static void imdct_and_windowing(AACContext *ac, SingleChannelElement *sce) INTFLOAT *in = sce->coeffs; INTFLOAT *out = sce->ret; INTFLOAT *saved = sce->saved; - const INTFLOAT *swindow = ics->use_kb_window[0] ? AAC_RENAME(ff_aac_kbd_short_128) : AAC_RENAME(ff_sine_128); - const INTFLOAT *lwindow_prev = ics->use_kb_window[1] ? AAC_RENAME(ff_aac_kbd_long_1024) : AAC_RENAME(ff_sine_1024); - const INTFLOAT *swindow_prev = ics->use_kb_window[1] ? AAC_RENAME(ff_aac_kbd_short_128) : AAC_RENAME(ff_sine_128); + const INTFLOAT *swindow = ics->use_kb_window[0] ? AAC_KBD_RENAME(kbd_short_128) : AAC_RENAME(ff_sine_128); + const INTFLOAT *lwindow_prev = ics->use_kb_window[1] ? AAC_KBD_RENAME(kbd_long_1024) : AAC_RENAME(ff_sine_1024); + const INTFLOAT *swindow_prev = ics->use_kb_window[1] ? AAC_KBD_RENAME(kbd_short_128) : AAC_RENAME(ff_sine_128); INTFLOAT *buf = ac->buf_mdct; INTFLOAT *temp = ac->temp; int i; @@ -2725,9 +2812,9 @@ static void imdct_and_windowing_960(AACContext *ac, SingleChannelElement *sce) INTFLOAT *in = sce->coeffs; INTFLOAT *out = sce->ret; INTFLOAT *saved = sce->saved; - const INTFLOAT *swindow = ics->use_kb_window[0] ? AAC_RENAME(ff_aac_kbd_short_120) : AAC_RENAME(ff_sine_120); - const INTFLOAT *lwindow_prev = ics->use_kb_window[1] ? AAC_RENAME(ff_aac_kbd_long_960) : AAC_RENAME(ff_sine_960); - const INTFLOAT *swindow_prev = ics->use_kb_window[1] ? AAC_RENAME(ff_aac_kbd_short_120) : AAC_RENAME(ff_sine_120); + const INTFLOAT *swindow = ics->use_kb_window[0] ? AAC_RENAME(aac_kbd_short_120) : AAC_RENAME(sine_120); + const INTFLOAT *lwindow_prev = ics->use_kb_window[1] ? AAC_RENAME(aac_kbd_long_960) : AAC_RENAME(sine_960); + const INTFLOAT *swindow_prev = ics->use_kb_window[1] ? AAC_RENAME(aac_kbd_short_120) : AAC_RENAME(sine_120); INTFLOAT *buf = ac->buf_mdct; INTFLOAT *temp = ac->temp; int i; @@ -3222,7 +3309,7 @@ static int aac_decode_frame_int(AVCodecContext *avctx, void *data, break; case TYPE_PCE: { - uint8_t layout_map[MAX_ELEM_ID*4][3]; + uint8_t layout_map[MAX_ELEM_ID*4][3] = {{0}}; int tags; int pushed = push_output_configuration(ac);