From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id 4DF014B3D6 for ; Wed, 5 Jun 2024 03:09:06 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 0AAEC68D717; Wed, 5 Jun 2024 06:08:54 +0300 (EEST) Received: from vidala.lynne.ee (vidala.pars.ee [116.203.72.101]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 3B92368D709 for ; Wed, 5 Jun 2024 06:08:46 +0300 (EEST) To: ffmpeg-devel@ffmpeg.org Date: Wed, 5 Jun 2024 05:08:35 +0200 Message-ID: <20240605030843.2807174-1-dev@lynne.ee> X-Mailer: git-send-email 2.43.0.381.gb435a96ce8 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 1/4] mpeg4audio: rename AOT_USAC_NOSBR to AOT_USAC X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Lynne via ffmpeg-devel Reply-To: FFmpeg development discussions and patches Cc: Lynne Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: 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. --- libavcodec/aac/aacdec.c | 7 ++----- libavcodec/mpeg4audio.h | 3 +-- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/libavcodec/aac/aacdec.c b/libavcodec/aac/aacdec.c index 2b8322fc68..24d2bdde4c 100644 --- a/libavcodec/aac/aacdec.c +++ b/libavcodec/aac/aacdec.c @@ -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"); diff --git a/libavcodec/mpeg4audio.h b/libavcodec/mpeg4audio.h index 56615ef321..5daba7824b 100644 --- a/libavcodec/mpeg4audio.h +++ b/libavcodec/mpeg4audio.h @@ -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 ///