mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
Add support for sample rate index 12, 7350 Hz
Patch by Alex Converse ( alex converse gmail com ) Originally committed as revision 17180 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
ff587009ae
commit
30272450f9
@ -173,7 +173,7 @@ static int decode_pce(AACContext * ac, enum ChannelPosition new_che_pos[4][MAX_E
|
||||
skip_bits(gb, 2); // object_type
|
||||
|
||||
sampling_index = get_bits(gb, 4);
|
||||
if(sampling_index > 11) {
|
||||
if(sampling_index > 12) {
|
||||
av_log(ac->avccontext, AV_LOG_ERROR, "invalid sampling rate index %d\n", ac->m4ac.sampling_index);
|
||||
return -1;
|
||||
}
|
||||
@ -326,7 +326,7 @@ static int decode_audio_specific_config(AACContext * ac, void *data, int data_si
|
||||
|
||||
if((i = ff_mpeg4audio_get_config(&ac->m4ac, data, data_size)) < 0)
|
||||
return -1;
|
||||
if(ac->m4ac.sampling_index > 11) {
|
||||
if(ac->m4ac.sampling_index > 12) {
|
||||
av_log(ac->avccontext, AV_LOG_ERROR, "invalid sampling rate index %d\n", ac->m4ac.sampling_index);
|
||||
return -1;
|
||||
}
|
||||
@ -1555,7 +1555,7 @@ static int aac_decode_frame(AVCodecContext * avccontext, void * data, int * data
|
||||
av_log(avccontext, AV_LOG_ERROR, "Error decoding AAC frame header.\n");
|
||||
return -1;
|
||||
}
|
||||
if (ac->m4ac.sampling_index > 11) {
|
||||
if (ac->m4ac.sampling_index > 12) {
|
||||
av_log(ac->avccontext, AV_LOG_ERROR, "invalid sampling rate index %d\n", ac->m4ac.sampling_index);
|
||||
return -1;
|
||||
}
|
||||
|
@ -142,7 +142,8 @@ static const uint16_t *swb_offset_1024[] = {
|
||||
swb_offset_1024_96, swb_offset_1024_96, swb_offset_1024_64,
|
||||
swb_offset_1024_48, swb_offset_1024_48, swb_offset_1024_32,
|
||||
swb_offset_1024_24, swb_offset_1024_24, swb_offset_1024_16,
|
||||
swb_offset_1024_16, swb_offset_1024_16, swb_offset_1024_8
|
||||
swb_offset_1024_16, swb_offset_1024_16, swb_offset_1024_8,
|
||||
swb_offset_1024_8
|
||||
};
|
||||
|
||||
static const uint16_t *swb_offset_128[] = {
|
||||
@ -151,7 +152,8 @@ static const uint16_t *swb_offset_128[] = {
|
||||
swb_offset_128_96, swb_offset_128_96, swb_offset_128_96,
|
||||
swb_offset_128_48, swb_offset_128_48, swb_offset_128_48,
|
||||
swb_offset_128_24, swb_offset_128_24, swb_offset_128_16,
|
||||
swb_offset_128_16, swb_offset_128_16, swb_offset_128_8
|
||||
swb_offset_128_16, swb_offset_128_16, swb_offset_128_8,
|
||||
swb_offset_128_8
|
||||
};
|
||||
|
||||
// @}
|
||||
@ -163,11 +165,11 @@ static const uint16_t *swb_offset_128[] = {
|
||||
* @{
|
||||
*/
|
||||
static const uint8_t tns_max_bands_1024[] = {
|
||||
31, 31, 34, 40, 42, 51, 46, 46, 42, 42, 42, 39
|
||||
31, 31, 34, 40, 42, 51, 46, 46, 42, 42, 42, 39, 39
|
||||
};
|
||||
|
||||
static const uint8_t tns_max_bands_128[] = {
|
||||
9, 9, 10, 14, 14, 14, 14, 14, 14, 14, 14, 14
|
||||
9, 9, 10, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14
|
||||
};
|
||||
// @}
|
||||
|
||||
|
@ -36,15 +36,15 @@ DECLARE_ALIGNED(16, float, ff_aac_kbd_long_1024[1024]);
|
||||
DECLARE_ALIGNED(16, float, ff_aac_kbd_short_128[128]);
|
||||
|
||||
const uint8_t ff_aac_num_swb_1024[] = {
|
||||
41, 41, 47, 49, 49, 51, 47, 47, 43, 43, 43, 40
|
||||
41, 41, 47, 49, 49, 51, 47, 47, 43, 43, 43, 40, 40
|
||||
};
|
||||
|
||||
const uint8_t ff_aac_num_swb_128[] = {
|
||||
12, 12, 12, 14, 14, 14, 15, 15, 15, 15, 15, 15
|
||||
12, 12, 12, 14, 14, 14, 15, 15, 15, 15, 15, 15, 15
|
||||
};
|
||||
|
||||
const uint8_t ff_aac_pred_sfb_max[] = {
|
||||
33, 33, 38, 40, 40, 40, 41, 41, 37, 37, 37, 34
|
||||
33, 33, 38, 40, 40, 40, 41, 41, 37, 37, 37, 34, 34
|
||||
};
|
||||
|
||||
const uint32_t ff_aac_scalefactor_code[121] = {
|
||||
|
Loading…
Reference in New Issue
Block a user