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 D502E4C4F4 for ; Fri, 7 Feb 2025 09:25:29 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 162F868BD13; Fri, 7 Feb 2025 11:25:23 +0200 (EET) Received: from mail-lj1-f176.google.com (mail-lj1-f176.google.com [209.85.208.176]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id F179A68B875 for ; Fri, 7 Feb 2025 11:25:15 +0200 (EET) Received: by mail-lj1-f176.google.com with SMTP id 38308e7fff4ca-307d9a13782so15636751fa.2 for ; Fri, 07 Feb 2025 01:25:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=martin-st.20230601.gappssmtp.com; s=20230601; t=1738920315; x=1739525115; darn=ffmpeg.org; h=mime-version:references:message-id:in-reply-to:subject:cc:to:from :date:from:to:cc:subject:date:message-id:reply-to; bh=dX+vERp4PiEWE2/r/j5Fhi/I0v9UrUAWpPESujurb48=; b=1gSbXq4IZc0zpGkatz5Jk0l0h9VkMmHKj0ceQ3lCbmroe/LodEPykTyvrHFg29eFcf 4KaHastPeGpsl3xVXs6bi9F43HriQhtwX9eHgDDAX7issJ9sw07mI341IZtN6JQ162rz JBb+WfldmSPlmblhRzJuzukiQHX0XRgHHNZVSRpRABVEKAkopyED3JF784FU3/rpgZdi 2xh1mU0o8GDdOszlMVh6u+Wdqed7mr655Ycrji5NkKw5RHi5RNPtKdkI/EWRqMLQDdwN WYoe4hJ5j1FHyjFnJTMFe9HpiXXnx36FKUTks12lDlcV5gwyX6OCsgIjBjg6Np4pHHhp BEPQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1738920315; x=1739525115; h=mime-version:references:message-id:in-reply-to:subject:cc:to:from :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=dX+vERp4PiEWE2/r/j5Fhi/I0v9UrUAWpPESujurb48=; b=BA9Td+YMLLS3ZbUqZSzi4D8DYSEEeWg6RI0iZhDSJM8HUltPopDWB+gH6SnoBpxnsH jtvv0KfmzrWgNLAYJ/lHnVnl/Fkfkn5qoKKNLuJvwVrV8CKKfgS0qEbsOYk/o18fbQxH j9U2PIrkVgDeuw7ehpAJd6OO9cJjRYJHQ0pMwqbM1l7ljqwGGv1WYU7PMg4+abXhlOoY guVZ4JHYGLW7+7+9+NsLRIVvIzVZP+pFqdGCxiKCmCLuKhrQftSiA2MDPTqT4a80Zj+8 qbqjyO4uvfjGB9NibovSgeePkez2zXMslM66JCpmtmXEeV9deAcOtPrpYq//mh+YNJnC wqOg== X-Gm-Message-State: AOJu0YzKPrJZavkQ0PH6xFVAjJ31BT3Kdk3IiF0CQPTbREfD+rsfMPqF aWtcQDSlNL+QRExbUSLL4uIobuhQlT5BhxqrEoiDCEEjpNeKGJoh1Y5rgJIFEznCZhMzEACT+wG dlA== X-Gm-Gg: ASbGncsAWZ/ThF+ZEBM/LA2jiQRZb2j9w6dtjSQwMX0ZmstteyAYVe3Y+If/+ezTUZ5 vl/mtbff1HvU+sUZEeVD1oL8coQv2M7RluOeAoYdjnUuZp0wWjaQJAwzeWPzCluzubOs25lt4t1 4xeUuAQ4bGVxSm+OA0eCrfHKWexo7Wc5rzBDPWmRXyPJY8+8SpCr32lBYuRiSsEB+ahJBMarloR Bdagra+DFjK2d/niN2q5hc34LDvzpGPftFBHfSKTdWhMpPOETRa/tL3vROCxbLzzy+PUQRW73bh +rFIsLo6PjLWcyOr5f2NBRdMUsxXS/BkscI0c7aIvR6iOYpPh3ilKq3CW3mS2Nss3ShBKXQsNI2 3CmI/Xh1hMeo= X-Google-Smtp-Source: AGHT+IEPQmed4OhMstRUcUZWN8HQ5K4nQDxrAXvjAAJsvhnNWLtOcH92n1JhzE9W04oEg1HhMf1w6Q== X-Received: by 2002:a2e:a98e:0:b0:2ff:a7c1:8c2e with SMTP id 38308e7fff4ca-307e5a6697cmr6848791fa.28.1738920314700; Fri, 07 Feb 2025 01:25:14 -0800 (PST) Received: from tunnel335574-pt.tunnel.tserv24.sto1.ipv6.he.net (tunnel335574-pt.tunnel.tserv24.sto1.ipv6.he.net. [2001:470:27:11::2]) by smtp.gmail.com with ESMTPSA id 38308e7fff4ca-307de2f5321sm3670321fa.105.2025.02.07.01.25.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 07 Feb 2025 01:25:14 -0800 (PST) Date: Fri, 7 Feb 2025 11:25:13 +0200 (EET) From: =?ISO-8859-15?Q?Martin_Storsj=F6?= To: ffmpeg-devel@ffmpeg.org In-Reply-To: <20250205211929.4108078-2-martin@martin.st> Message-ID: References: <20250205211929.4108078-1-martin@martin.st> <20250205211929.4108078-2-martin@martin.st> MIME-Version: 1.0 X-Content-Filtered-By: Mailman/MimeDel 2.1.29 Subject: Re: [FFmpeg-devel] [PATCH v2 2/2] checkasm: aacencdsp: Actually test nonzero values in quant_bands 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 Cc: Lynne Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="iso-8859-15"; Format="flowed" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: On Wed, 5 Feb 2025, Martin Storsj=F6 wrote: > Previously, we read elements from ff_aac_pow34sf_tab; however > that table is initialized to zero; one needs to call > ff_aac_float_common_init() to make sure that the table is > initialized. > > However, given the range of the input values, a large number of > entries in ff_aac_pow34sf_tab would give results outside of the > range for signed 32 bit integers. As the largest aac_cb_maxval > entry is 16, it seems more reasonable to produce values within > an order of mangitude of that value. > > (When hitting INT_MIN, implementations may end up with different > results depending on whether the value is negated as a float or > as an int. This corner case is irrelevant in practice as this > is way outside of the expected value range here.) > > Coincidentally, this fixes linking checkasm with Apple's older > linker. (In Xcode 15, Apple switched to a new linker. The one in > older toolchains seems to have a bug where it won't figure out to > load object files from a static library, if the only symbol > referenced in the object file is a "common" symbol, i.e. one for > a zero-initialized variable. This issue can also be reproduced with > newer Apple toolchains by passing -Wl,-ld_classic to the linker.) > --- > tests/checkasm/aacencdsp.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/tests/checkasm/aacencdsp.c b/tests/checkasm/aacencdsp.c > index 5308a2ac03..713284211c 100644 > --- a/tests/checkasm/aacencdsp.c > +++ b/tests/checkasm/aacencdsp.c > @@ -67,7 +67,7 @@ static void test_abs_pow34(AACEncDSPContext *s) > static void test_quant_bands(AACEncDSPContext *s) > { > int maxval =3D randomize_elem(aac_cb_maxval); > - float q34 =3D randomize_elem(ff_aac_pow34sf_tab); > + float q34 =3D (float)rnd() / (UINT_MAX / 1024); > float rounding =3D (rnd() & 1) ? ROUND_TO_ZERO : ROUND_STANDARD; > LOCAL_ALIGNED_16(float, in, [BUF_SIZE]); > LOCAL_ALIGNED_16(float, scaled, [BUF_SIZE]); > -- = > 2.43.0 These changes were OK'd by Lynne on irc, I'll push them later if there's = no more feedback on it. (I've tested these changes with thousands of = different checkasm seeds now.) // Martin _______________________________________________ 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".