mirror of https://git.ffmpeg.org/ffmpeg.git
aacdec_usac: use correct TNS values
The standard slightly modified the maximum TNS bands allowed.
This commit is contained in:
parent
9b41cc0430
commit
7223523335
|
@ -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;
|
||||
|
|
|
@ -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] = {
|
||||
|
|
|
@ -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];
|
||||
|
||||
|
|
Loading…
Reference in New Issue