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 ESMTPS id CD5CA4C81B for ; Sun, 9 Feb 2025 02:24:44 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 46B7168BC7C; Sun, 9 Feb 2025 04:24:33 +0200 (EET) Received: from relay2-d.mail.gandi.net (relay2-d.mail.gandi.net [217.70.183.194]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 6547868B882 for ; Sun, 9 Feb 2025 04:24:24 +0200 (EET) Received: by mail.gandi.net (Postfix) with ESMTPSA id AC731440D8 for ; Sun, 9 Feb 2025 02:24:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=niedermayer.cc; s=gm1; t=1739067863; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=03ihVlVEeKIe3dq026tTLHJaXuoRO11p5r9fWZ8pLe8=; b=Jmne6t6oUJfyITjoGO670e/VzwGBC/6CthgjY+vlinQ+NrKftoqyyZS8BF8h7ZYP2odjcJ kyk/LB7TGxk9LUClhaeVlM7pbUddeU2+411ivel9cMYQOUuh5xQco6ILSmB8ksgJMsamvm ewcsHbC9VgPxwOlpr9C0FhL5ZtRkbG81pCbtQJi4TKi3wdv/Zqa8PIF6UCjxVoYcFBTTAe E+E0S2j2k6/2ygruNtAVpvUY1Hl6lya5z3MblEz2JrwIhjIPplPQO5X6fgUSBMNEvfnTX9 y/8A4cBuPozq5DRWICZcTb6VIJ8ezBhZonIoAThsNCDzXxBFiNXlNLqphHintQ== From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Sun, 9 Feb 2025 03:24:17 +0100 Message-ID: <20250209022421.2346210-2-michael@niedermayer.cc> X-Mailer: git-send-email 2.48.1 In-Reply-To: <20250209022421.2346210-1-michael@niedermayer.cc> References: <20250209022421.2346210-1-michael@niedermayer.cc> MIME-Version: 1.0 X-GND-State: clean X-GND-Score: -70 X-GND-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgdeffeeltdcutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfitefpfffkpdcuggftfghnshhusghstghrihgsvgenuceurghilhhouhhtmecufedtudenucesvcftvggtihhpihgvnhhtshculddquddttddmnegfrhhlucfvnfffucdlfedtmdenucfjughrpefhvffufffkofgjfhgggfestdekredtredttdenucfhrhhomhepofhitghhrggvlhcupfhivgguvghrmhgrhigvrhcuoehmihgthhgrvghlsehnihgvuggvrhhmrgihvghrrdgttgeqnecuggftrfgrthhtvghrnhepvdfgfeduieejteeijeekgfffhfdtleduueffvdefleeiveejteevudefteefjeefnecukfhppeeguddrieeirdeijedruddufeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpeeguddrieeirdeijedruddufedphhgvlhhopehlohgtrghlhhhoshhtpdhmrghilhhfrhhomhepmhhitghhrggvlhesnhhivgguvghrmhgrhigvrhdrtggtpdhnsggprhgtphhtthhopedupdhrtghpthhtohepfhhfmhhpvghgqdguvghvvghlsehffhhmphgvghdrohhrgh X-GND-Sasl: michael@niedermayer.cc Subject: [FFmpeg-devel] [PATCH 2/6] avcodec/aac/aacdec_usac: Simplify decode_usac_scale_factors() 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: , Reply-To: FFmpeg development discussions and patches 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: Signed-off-by: Michael Niedermayer --- libavcodec/aac/aacdec_usac.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/libavcodec/aac/aacdec_usac.c b/libavcodec/aac/aacdec_usac.c index 2938e693874..ccdf58bc8e2 100644 --- a/libavcodec/aac/aacdec_usac.c +++ b/libavcodec/aac/aacdec_usac.c @@ -567,15 +567,8 @@ static int decode_usac_scale_factors(AACDecContext *ac, int offset_sf = global_gain; for (int g = 0; g < ics->num_window_groups; g++) { for (int sfb = 0; sfb < ics->max_sfb; sfb++) { - /* First coefficient is just the global gain */ - if (!g && !sfb) { - /* The cannonical representation of quantized scalefactors - * in the spec is with 100 subtracted. */ - sce->sfo[0] = offset_sf - 100; - continue; - } - - offset_sf += get_vlc2(gb, ff_vlc_scalefactors, 7, 3) - SCALE_DIFF_ZERO; + if (g || sfb) + offset_sf += get_vlc2(gb, ff_vlc_scalefactors, 7, 3) - SCALE_DIFF_ZERO; if (offset_sf > 255U) { av_log(ac->avctx, AV_LOG_ERROR, "Scalefactor (%d) out of range.\n", offset_sf); -- 2.48.1 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".