Merge commit 'b2212dec0f011893ec68eecaa990170fa24050d7'

* commit 'b2212dec0f011893ec68eecaa990170fa24050d7':
  aac: Fix TNS decoding for the 512 sample window family.

also temporarily disable fate-aac-er_ad6000np_44_ep0 as this commit
causes a mismatch with the reference pcm file
The test will be reenabled after all fixes and with a new pcm reference

Merged-by: Michael Niedermayer <michaelni@gmx.at>
pull/53/head
Michael Niedermayer 11 years ago
commit 4195ae0fd8
  1. 3
      libavcodec/aacdec.c
  2. 4
      libavcodec/aactab.c
  3. 1
      libavcodec/aactab.h
  4. 2
      tests/fate/aac.mak

@ -1246,13 +1246,14 @@ static int decode_ics_info(AACContext *ac, IndividualChannelStream *ics,
if (aot == AOT_ER_AAC_LD || aot == AOT_ER_AAC_ELD) { if (aot == AOT_ER_AAC_LD || aot == AOT_ER_AAC_ELD) {
ics->swb_offset = ff_swb_offset_512[ac->oc[1].m4ac.sampling_index]; ics->swb_offset = ff_swb_offset_512[ac->oc[1].m4ac.sampling_index];
ics->num_swb = ff_aac_num_swb_512[ac->oc[1].m4ac.sampling_index]; ics->num_swb = ff_aac_num_swb_512[ac->oc[1].m4ac.sampling_index];
ics->tns_max_bands = ff_tns_max_bands_512[ac->oc[1].m4ac.sampling_index];
if (!ics->num_swb || !ics->swb_offset) if (!ics->num_swb || !ics->swb_offset)
return AVERROR_BUG; return AVERROR_BUG;
} else { } else {
ics->swb_offset = ff_swb_offset_1024[ac->oc[1].m4ac.sampling_index]; ics->swb_offset = ff_swb_offset_1024[ac->oc[1].m4ac.sampling_index];
ics->num_swb = ff_aac_num_swb_1024[ac->oc[1].m4ac.sampling_index]; ics->num_swb = ff_aac_num_swb_1024[ac->oc[1].m4ac.sampling_index];
ics->tns_max_bands = ff_tns_max_bands_1024[ac->oc[1].m4ac.sampling_index];
} }
ics->tns_max_bands = ff_tns_max_bands_1024[ac->oc[1].m4ac.sampling_index];
if (aot != AOT_ER_AAC_ELD) { if (aot != AOT_ER_AAC_ELD) {
ics->predictor_present = get_bits1(gb); ics->predictor_present = get_bits1(gb);
ics->predictor_reset_group = 0; ics->predictor_reset_group = 0;

@ -1237,6 +1237,10 @@ const uint8_t ff_tns_max_bands_1024[] = {
31, 31, 34, 40, 42, 51, 46, 46, 42, 42, 42, 39, 39 31, 31, 34, 40, 42, 51, 46, 46, 42, 42, 42, 39, 39
}; };
const uint8_t ff_tns_max_bands_512[] = {
0, 0, 0, 31, 32, 37, 31, 31, 0, 0, 0, 0, 0
};
const uint8_t ff_tns_max_bands_128[] = { const uint8_t ff_tns_max_bands_128[] = {
9, 9, 10, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14 9, 9, 10, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14
}; };

@ -76,6 +76,7 @@ extern const uint16_t * const ff_swb_offset_512 [13];
extern const uint16_t * const ff_swb_offset_128 [13]; extern const uint16_t * const ff_swb_offset_128 [13];
extern const uint8_t ff_tns_max_bands_1024[13]; extern const uint8_t ff_tns_max_bands_1024[13];
extern const uint8_t ff_tns_max_bands_512 [13];
extern const uint8_t ff_tns_max_bands_128 [13]; extern const uint8_t ff_tns_max_bands_128 [13];
#endif /* AVCODEC_AACTAB_H */ #endif /* AVCODEC_AACTAB_H */

@ -54,7 +54,7 @@ FATE_AAC += fate-aac-ap05_48
fate-aac-ap05_48: CMD = pcm -i $(TARGET_SAMPLES)/aac/ap05_48.mp4 fate-aac-ap05_48: CMD = pcm -i $(TARGET_SAMPLES)/aac/ap05_48.mp4
fate-aac-ap05_48: REF = $(SAMPLES)/aac/ap05_48.s16 fate-aac-ap05_48: REF = $(SAMPLES)/aac/ap05_48.s16
FATE_AAC += fate-aac-er_ad6000np_44_ep0 #FATE_AAC += fate-aac-er_ad6000np_44_ep0
fate-aac-er_ad6000np_44_ep0: CMD = pcm -i $(TARGET_SAMPLES)/aac/er_ad6000np_44_ep0.mp4 fate-aac-er_ad6000np_44_ep0: CMD = pcm -i $(TARGET_SAMPLES)/aac/er_ad6000np_44_ep0.mp4
fate-aac-er_ad6000np_44_ep0: REF = $(SAMPLES)/aac/er_ad6000np_44_ep0.s16 fate-aac-er_ad6000np_44_ep0: REF = $(SAMPLES)/aac/er_ad6000np_44_ep0.s16

Loading…
Cancel
Save