diff --git a/libavcodec/aac/aacdec_usac.c b/libavcodec/aac/aacdec_usac.c index 9173f1b354..edbf0bc1be 100644 --- a/libavcodec/aac/aacdec_usac.c +++ b/libavcodec/aac/aacdec_usac.c @@ -757,7 +757,7 @@ static int setup_sce(AACDecContext *ac, SingleChannelElement *sce, ics->swb_offset = ff_swb_offset_128[usac->rate_idx]; ics->num_swb = ff_aac_num_swb_128[usac->rate_idx]; } - ics->tns_max_bands = ff_tns_max_bands_128[usac->rate_idx]; + ics->tns_max_bands = ff_tns_max_bands_usac_128[usac->rate_idx]; /* Setup scalefactor grouping. 7 bit mask. */ ics->num_window_groups = 0; @@ -780,7 +780,7 @@ static int setup_sce(AACDecContext *ac, SingleChannelElement *sce, ics->swb_offset = ff_swb_offset_1024[usac->rate_idx]; ics->num_swb = ff_aac_num_swb_1024[usac->rate_idx]; } - ics->tns_max_bands = ff_tns_max_bands_1024[usac->rate_idx]; + ics->tns_max_bands = ff_tns_max_bands_usac_1024[usac->rate_idx]; ics->group_len[0] = 1; ics->num_window_groups = 1; diff --git a/libavcodec/aactab.c b/libavcodec/aactab.c index 7b040531aa..8d4587d241 100644 --- a/libavcodec/aactab.c +++ b/libavcodec/aactab.c @@ -1985,6 +1985,10 @@ const uint8_t ff_tns_max_bands_1024[] = { 31, 31, 34, 40, 42, 51, 46, 46, 42, 42, 42, 39, 39 }; +const uint8_t ff_tns_max_bands_usac_1024[] = { + 31, 31, 34, 40, 42, 51, 47, 47, 43, 43, 43, 40, 40 +}; + const uint8_t ff_tns_max_bands_512[] = { 0, 0, 0, 31, 32, 37, 31, 31, 0, 0, 0, 0, 0 }; @@ -1996,6 +2000,10 @@ const uint8_t ff_tns_max_bands_480[] = { const uint8_t ff_tns_max_bands_128[] = { 9, 9, 10, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14 }; + +const uint8_t ff_tns_max_bands_usac_128[] = { + 9, 9, 10, 14, 14, 14, 15, 15, 15, 15, 15, 15, 15 +}; // @} const uint8_t ff_usac_noise_fill_start_offset[2][2] = { diff --git a/libavcodec/aactab.h b/libavcodec/aactab.h index 8dbb2098c5..84879aa8f8 100644 --- a/libavcodec/aactab.h +++ b/libavcodec/aactab.h @@ -115,6 +115,9 @@ extern const uint8_t ff_tns_max_bands_512 [13]; extern const uint8_t ff_tns_max_bands_480 [13]; extern const uint8_t ff_tns_max_bands_128 [13]; +extern const uint8_t ff_tns_max_bands_usac_1024[13]; +extern const uint8_t ff_tns_max_bands_usac_128[13]; + /* [x][y], x == 1 -> frame len is 768 frames, y == 1 -> is eight_short */ extern const uint8_t ff_usac_noise_fill_start_offset[2][2];