syn_ele = TYPE_LFE;
break;
default:
+ // AAC_CHANNEL_OFF has no channel map
av_assert0(0);
}
layout_map[0][0] = syn_ele;
{
int crc_flag = 0;
int res = cnt;
- switch (get_bits(gb, 4)) { // extension type
+ int type = get_bits(gb, 4);
+
+ if (ac->avctx->debug & FF_DEBUG_STARTCODE)
+ av_log(ac->avctx, AV_LOG_DEBUG, "extension type: %d len:%d\n", type, cnt);
+
+ switch (type) { // extension type
case EXT_SBR_DATA_CRC:
crc_flag++;
case EXT_SBR_DATA:
for (type = 3; type >= 0; type--) {
for (i = 0; i < MAX_ELEM_ID; i++) {
ChannelElement *che = ac->che[type][i];
- if (che) {
+ if (che && che->present) {
if (type <= TYPE_CPE)
apply_channel_coupling(ac, che, type, i, BEFORE_TNS, apply_dependent_coupling);
if (ac->oc[1].m4ac.object_type == AOT_AAC_LTP) {
}
if (type <= TYPE_CCE)
apply_channel_coupling(ac, che, type, i, AFTER_IMDCT, apply_independent_coupling);
+ che->present = 0;
+ } else if (che) {
+ av_log(ac->avctx, AV_LOG_WARNING, "ChannelElement %d.%d missing \n", type, i);
}
}
}
elem_type, elem_id);
return AVERROR_INVALIDDATA;
}
+ che->present = 1;
if (aot != AOT_ER_AAC_ELD)
skip_bits(gb, 4);
switch (elem_type) {
goto fail;
}
samples = 1024;
+ che->present = 1;
}
switch (elem_type) {
.version = LIBAVUTIL_VERSION_INT,
};
+static const AVProfile profiles[] = {
+ { FF_PROFILE_AAC_MAIN, "Main" },
+ { FF_PROFILE_AAC_LOW, "LC" },
+ { FF_PROFILE_AAC_SSR, "SSR" },
+ { FF_PROFILE_AAC_LTP, "LTP" },
+ { FF_PROFILE_AAC_HE, "HE-AAC" },
+ { FF_PROFILE_AAC_HE_V2, "HE-AACv2" },
+ { FF_PROFILE_AAC_LD, "LD" },
+ { FF_PROFILE_AAC_ELD, "ELD" },
+ { FF_PROFILE_UNKNOWN },
+};
+
AVCodec ff_aac_decoder = {
.name = "aac",
.long_name = NULL_IF_CONFIG_SMALL("AAC (Advanced Audio Coding)"),
.channel_layouts = aac_channel_layout,
.flush = flush,
.priv_class = &aac_decoder_class,
+ .profiles = profiles,
};
/*
.capabilities = CODEC_CAP_CHANNEL_CONF | CODEC_CAP_DR1,
.channel_layouts = aac_channel_layout,
.flush = flush,
+ .profiles = profiles,
};