mpeg4audio: rename AOT_USAC_NOSBR to AOT_USAC

The issue is that AOT 45 isn't defined anywhere, and looking at the git
blame, it seems to have sprung up through a reordering of the enum,
and adding a hole.

The spec does not define an explicit AOT for SBR and no SBR, and only
uses AOT 42 (previously AOT_USAC_NOSBR), so just rename AOT_USAC to
it and replace its use everywhere.
This commit is contained in:
Lynne 2024-06-05 04:53:18 +02:00
parent 840f2bc18e
commit 8a2fe8a5b9
No known key found for this signature in database
GPG Key ID: A2FEA5F03F034464
2 changed files with 3 additions and 7 deletions

View File

@ -1046,7 +1046,6 @@ static int decode_audio_specific_config_gb(AACDecContext *ac,
return ret;
break;
#if CONFIG_AAC_DECODER
case AOT_USAC_NOSBR: /* fallthrough */
case AOT_USAC:
if ((ret = ff_aac_usac_config_decode(ac, avctx, gb,
oc, m4ac->chan_config)) < 0)
@ -1571,8 +1570,7 @@ int ff_aac_decode_tns(AACDecContext *ac, TemporalNoiseShaping *tns,
GetBitContext *gb, const IndividualChannelStream *ics)
{
int tns_max_order = INT32_MAX;
const int is_usac = ac->oc[1].m4ac.object_type == AOT_USAC ||
ac->oc[1].m4ac.object_type == AOT_USAC_NOSBR;
const int is_usac = ac->oc[1].m4ac.object_type == AOT_USAC;
int w, filt, i, coef_len, coef_res, coef_compress;
const int is8 = ics->window_sequence[0] == EIGHT_SHORT_SEQUENCE;
@ -2421,8 +2419,7 @@ static int aac_decode_frame_int(AVCodecContext *avctx, AVFrame *frame,
ac->tags_mapped = 0;
if ((ac->oc[1].m4ac.object_type == AOT_USAC) ||
(ac->oc[1].m4ac.object_type == AOT_USAC_NOSBR)) {
if (ac->oc[1].m4ac.object_type == AOT_USAC) {
if (ac->is_fixed) {
avpriv_report_missing_feature(ac->avctx,
"AAC USAC fixed-point decoding");

View File

@ -108,10 +108,9 @@ enum AudioObjectType {
AOT_ER_AAC_ELD, ///< N Error Resilient Enhanced Low Delay
AOT_SMR_SIMPLE, ///< N Symbolic Music Representation Simple
AOT_SMR_MAIN, ///< N Symbolic Music Representation Main
AOT_USAC_NOSBR, ///< N Unified Speech and Audio Coding (no SBR)
AOT_USAC, ///< Y Unified Speech and Audio Coding
AOT_SAOC, ///< N Spatial Audio Object Coding
AOT_LD_SURROUND, ///< N Low Delay MPEG Surround
AOT_USAC, ///< N Unified Speech and Audio Coding
};
#define MAX_PCE_SIZE 320 ///<Maximum size of a PCE including the 3-bit ID_PCE