Lines Matching refs:m4ac
142 if (*channels >= MAX_CHANNELS - (type == TYPE_CPE || (type == TYPE_SCE && ac->oc[1].m4ac.ps == 1))) {
148 (type == TYPE_SCE && ac->oc[1].m4ac.ps == 1)) {
579 if (ac->oc[1].m4ac.ps == 1 && channels == 2) {
673 if (!ac->oc[1].m4ac.chan_config) {
678 ac->oc[1].m4ac.chan_config == 1) {
692 ac->oc[1].m4ac.chan_config = 2;
693 ac->oc[1].m4ac.ps = 0;
697 ac->oc[1].m4ac.chan_config == 2) {
713 if (ac->oc[1].m4ac.sbr)
714 ac->oc[1].m4ac.ps = -1;
718 switch (ac->oc[1].m4ac.chan_config) {
744 if (ac->tags_mapped == tags_per_config[ac->oc[1].m4ac.chan_config] - 1 && (type == TYPE_LFE || type == TYPE_SCE)) {
766 if (ac->tags_mapped == tags_per_config[ac->oc[1].m4ac.chan_config] - 1 && (type == TYPE_LFE || type == TYPE_SCE)) {
777 ac->oc[1].m4ac.chan_config == 4 &&
784 if (ac->tags_mapped == (ac->oc[1].m4ac.chan_config != 2) &&
788 } else if (ac->tags_mapped == 1 && ac->oc[1].m4ac.chan_config == 2 &&
851 static int decode_pce(AVCodecContext *avctx, MPEG4AudioConfig *m4ac,
863 if (m4ac->sampling_index != sampling_index)
924 MPEG4AudioConfig *m4ac,
936 m4ac->frame_length_short = 0;
938 m4ac->frame_length_short = get_bits1(gb);
939 if (m4ac->frame_length_short && m4ac->sbr == 1) {
942 m4ac->sbr = 0;
943 m4ac->ps = 0;
951 if (m4ac->object_type == AOT_AAC_SCALABLE ||
952 m4ac->object_type == AOT_ER_AAC_SCALABLE)
957 tags = decode_pce(avctx, m4ac, layout_map, gb, get_bit_alignment);
967 m4ac->ps = 0;
968 } else if (m4ac->sbr == 1 && m4ac->ps == -1)
969 m4ac->ps = 1;
975 switch (m4ac->object_type) {
995 switch (m4ac->object_type) {
1012 MPEG4AudioConfig *m4ac,
1020 m4ac->ps = 0;
1021 m4ac->sbr = 0;
1028 m4ac->frame_length_short = get_bits1(gb);
1078 * @param m4ac pointer to MPEG4AudioConfig, used for parsing
1087 MPEG4AudioConfig *m4ac,
1094 MPEG4AudioConfig m4ac_bak = *m4ac;
1096 if ((i = ff_mpeg4audio_get_config_gb(m4ac, &gbc, sync_extension, avctx)) < 0) {
1097 *m4ac = m4ac_bak;
1101 if (m4ac->sampling_index > 12) {
1104 m4ac->sampling_index);
1105 *m4ac = m4ac_bak;
1108 if (m4ac->object_type == AOT_ER_AAC_LD &&
1109 (m4ac->sampling_index < 3 || m4ac->sampling_index > 7)) {
1112 m4ac->sampling_index);
1113 *m4ac = m4ac_bak;
1119 switch (m4ac->object_type) {
1127 m4ac, m4ac->chan_config)) < 0)
1132 m4ac, m4ac->chan_config)) < 0)
1138 m4ac->sbr == 1 ? "SBR+" : "",
1139 m4ac->object_type);
1145 m4ac->object_type, m4ac->chan_config, m4ac->sampling_index,
1146 m4ac->sample_rate, m4ac->sbr,
1147 m4ac->ps);
1154 MPEG4AudioConfig *m4ac,
1174 return decode_audio_specific_config_gb(ac, avctx, m4ac, &gb, 0,
1287 ac->oc[1].m4ac.sample_rate = avctx->sample_rate;
1297 if ((ret = decode_audio_specific_config(ac, ac->avctx, &ac->oc[1].m4ac,
1308 ac->oc[1].m4ac.sampling_index = sr;
1309 ac->oc[1].m4ac.channels = avctx->ch_layout.nb_channels;
1310 ac->oc[1].m4ac.sbr = -1;
1311 ac->oc[1].m4ac.ps = -1;
1319 ac->oc[1].m4ac.chan_config = i;
1321 if (ac->oc[1].m4ac.chan_config) {
1323 &layout_map_tags, ac->oc[1].m4ac.chan_config);
1400 for (sfb = 0; sfb < FFMIN(ics->max_sfb, ff_aac_pred_sfb_max[ac->oc[1].m4ac.sampling_index]); sfb++) {
1426 const MPEG4AudioConfig *const m4ac = &ac->oc[1].m4ac;
1427 const int aot = m4ac->object_type;
1428 const int sampling_index = m4ac->sampling_index;
1464 if (m4ac->frame_length_short) {
1477 if (m4ac->frame_length_short) {
1491 if (m4ac->frame_length_short) {
1705 const int tns_max_order = is8 ? 7 : ac->oc[1].m4ac.object_type == AOT_AAC_MAIN ? 20 : 12;
2074 sfb < ff_aac_pred_sfb_max[ac->oc[1].m4ac.sampling_index];
2136 eld_syntax = ac->oc[1].m4ac.object_type == AOT_ER_AAC_ELD;
2137 er_syntax = ac->oc[1].m4ac.object_type == AOT_ER_AAC_LC ||
2138 ac->oc[1].m4ac.object_type == AOT_ER_AAC_LTP ||
2139 ac->oc[1].m4ac.object_type == AOT_ER_AAC_LD ||
2140 ac->oc[1].m4ac.object_type == AOT_ER_AAC_ELD;
2205 if (ac->oc[1].m4ac.object_type == AOT_AAC_MAIN && !common_window)
2308 int eld_syntax = ac->oc[1].m4ac.object_type == AOT_ER_AAC_ELD;
2318 (ac->oc[1].m4ac.object_type != AOT_AAC_MAIN))
2336 if (ac->oc[1].m4ac.object_type == AOT_AAC_MAIN) {
2558 } else if (ac->oc[1].m4ac.frame_length_short) {
2565 } else if (!ac->oc[1].m4ac.sbr) {
2569 } else if (ac->oc[1].m4ac.sbr == -1 && ac->oc[1].status == OC_LOCKED) {
2573 } else if (ac->oc[1].m4ac.ps == -1 && ac->oc[1].status < OC_LOCKED &&
2575 ac->oc[1].m4ac.sbr = 1;
2576 ac->oc[1].m4ac.ps = 1;
2581 ac->oc[1].m4ac.sbr = 1;
2934 const int n = ac->oc[1].m4ac.frame_length_short ? 480 : 512;
3037 switch (ac->oc[1].m4ac.object_type) {
3045 if (ac->oc[1].m4ac.frame_length_short)
3056 if (ac->oc[1].m4ac.object_type == AOT_AAC_LTP) {
3072 if (ac->oc[1].m4ac.object_type == AOT_AAC_LTP)
3076 if (ac->oc[1].m4ac.object_type == AOT_AAC_LTP)
3079 if (ac->oc[1].m4ac.sbr > 0) {
3123 ac->oc[1].m4ac.chan_config = hdr_info.chan_config;
3134 ac->oc[1].m4ac.chan_config = 0;
3151 ac->oc[1].m4ac.sample_rate = hdr_info.sample_rate;
3152 ac->oc[1].m4ac.sampling_index = hdr_info.sampling_index;
3153 ac->oc[1].m4ac.object_type = hdr_info.object_type;
3154 ac->oc[1].m4ac.frame_length_short = 0;
3156 ac->oc[0].m4ac.chan_config != hdr_info.chan_config ||
3157 ac->oc[0].m4ac.sample_rate != hdr_info.sample_rate) {
3158 ac->oc[1].m4ac.sbr = -1;
3159 ac->oc[1].m4ac.ps = -1;
3171 const MPEG4AudioConfig *const m4ac = &ac->oc[1].m4ac;
3174 int samples = m4ac->frame_length_short ? 960 : 1024;
3175 int chan_config = m4ac->chan_config;
3176 int aot = m4ac->object_type;
3259 if (ac->oc[1].m4ac.sampling_index > 12) {
3260 av_log(ac->avctx, AV_LOG_ERROR, "invalid sampling rate index %d\n", ac->oc[1].m4ac.sampling_index);
3271 ac->avctx->profile = ac->oc[1].m4ac.object_type - 1;
3305 samples = ac->oc[1].m4ac.frame_length_short ? 960 : 1024;
3345 tags = decode_pce(avctx, &ac->oc[1].m4ac, layout_map, gb,
3358 ac->oc[1].m4ac.chan_config = 0;
3408 multiplier = (ac->oc[1].m4ac.sbr == 1) ? ac->oc[1].m4ac.ext_sample_rate > ac->oc[1].m4ac.sample_rate : 0;
3414 avctx->sample_rate = ac->oc[1].m4ac.sample_rate << multiplier;
3474 err = decode_audio_specific_config(ac, ac->avctx, &ac->oc[1].m4ac,
3494 switch (ac->oc[1].m4ac.object_type) {