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 722664C138 for ; Wed, 5 Feb 2025 21:19:52 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 1432668B972; Wed, 5 Feb 2025 23:19:40 +0200 (EET) Received: from mail-lj1-f182.google.com (mail-lj1-f182.google.com [209.85.208.182]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 775DA68B898 for ; Wed, 5 Feb 2025 23:19:32 +0200 (EET) Received: by mail-lj1-f182.google.com with SMTP id 38308e7fff4ca-30227ccf803so2044701fa.2 for ; Wed, 05 Feb 2025 13:19:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=martin-st.20230601.gappssmtp.com; s=20230601; t=1738790371; x=1739395171; darn=ffmpeg.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=n3RM3h+GEAXSImp/uyA6z1Z5N+QH2wEeRRv3gRWf9Qo=; b=FBfitJwuEck3xcrFgv2XB3+U7juCBcNgq7L5XtARLF3L5CetGQno90wIlhz5pHT6a9 dYBVBta53pBruehi+aS8b+kEd8y0RrcmOT5KDyKl6TL1yop3JLygVA06GoK86lELsS0f UomUziV5DEBx8GY+5HoMw4QyvuIcyUC4iSh+LUWQ/iISFusAwsmniaXUN5TANBDmJFUJ TXkjGbVlMDj01Rt7dJJAMe5BZpOXmUuQlXzfQ1hnOUSJT4A5pDzBoFiDldEw8+7bc6f9 Z4xaFtt70BW+YTwEa0yqxXLoNFNfTLZSZp75VUE+YXUZ/ucQM5ah6xqEJoSGlZHm/BVc mcLw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1738790371; x=1739395171; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=n3RM3h+GEAXSImp/uyA6z1Z5N+QH2wEeRRv3gRWf9Qo=; b=tlZr/RybHkLse5llRbKthMF9L9f7JsBocHMh7bAbvlqzHyx6aQKrqhrAbP6XFmcPu2 mjE8uTbdAkueeGPZb8mttZMtEx7p9G5I7ZKKowFF4ZQvB+IQqrcPjKrAkOgYnYKy9BK9 xSZ57g26H9JyHE2Y0M5KXAvNnDKKWkW4Fey1yd+CcbWyOD7RMyYyFecvc+tkBTUenM0R yDwVbLynTJNYqhnZV/9XCrkaJ+bLa88551+f8lnD6aBzZ/BAcOqd7bTgV3IiiFXu3HyM 76EOgl4Z8sqSnPaOOza5/ZlaUni5e9++KZ54nrjALEZHfPW1HwGQ9aN0IKeYDxnO8HIT /8ag== X-Gm-Message-State: AOJu0YwfSM9agHv3TmzTHEIHBQfamn2DPgmU8FqubaHLDji0VJ9RswKA 9TO/PV3oKvogwjInXRto4QgwPC7Tgq8wRcwp/fa669X4JxJrEyom5gi2X/LfiAHq7KIFs7/dtDT i+Q== X-Gm-Gg: ASbGncv9ZdFn1NM+7tBLR++6NfrZESi8nzYRrNhvpvm06SMOdv6nW+Y5gCMb4FvKxFQ UQUYaubx53IC630LAcrMZMI2RlyyC67mFKwL0gWudDDuHfKV5FvrUKkAnTIeipjPBWap/N1cXTH iPz4X3WJVLyfE468UI1UxRCiR5Q9xXz5J+yFHvPCxUlP0+HZziDjv5LxHG4FcQmiJsyKOpJdGrL LZCs3kbbWITuLpk5bcmNAzVH4M0Nuc4s4FOZvkZgY48T8vv0JpVOQ7Je/J+eyrWd3mHt3GdUXLK RU5mRZQATA9QFN48InM1egXJzSNBYtyS1X0q7CZM8shh4uc= X-Google-Smtp-Source: AGHT+IFhuT4MMq6h9axNtDpQB/xsliTl4rSxZYZdY38spcTnUUEindPeXPDMvlP0nEn5INv18WooMA== X-Received: by 2002:a05:651c:b0d:b0:300:1f2d:97a with SMTP id 38308e7fff4ca-307cf2fc3a7mr16145541fa.16.1738790371452; Wed, 05 Feb 2025 13:19:31 -0800 (PST) Received: from localhost (dsl-tkubng21-50de30-198.dhcp.inet.fi. [80.222.48.198]) by smtp.gmail.com with ESMTPSA id 38308e7fff4ca-307d87bf26esm952241fa.48.2025.02.05.13.19.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Feb 2025 13:19:30 -0800 (PST) From: =?UTF-8?q?Martin=20Storsj=C3=B6?= To: ffmpeg-devel@ffmpeg.org Date: Wed, 5 Feb 2025 23:19:20 +0200 Message-ID: <20250205211929.4108078-2-martin@martin.st> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250205211929.4108078-1-martin@martin.st> References: <20250205211929.4108078-1-martin@martin.st> MIME-Version: 1.0 Subject: [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-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: 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 = randomize_elem(aac_cb_maxval); - float q34 = randomize_elem(ff_aac_pow34sf_tab); + float q34 = (float)rnd() / (UINT_MAX / 1024); float rounding = (rnd() & 1) ? ROUND_TO_ZERO : ROUND_STANDARD; LOCAL_ALIGNED_16(float, in, [BUF_SIZE]); LOCAL_ALIGNED_16(float, scaled, [BUF_SIZE]); -- 2.43.0 _______________________________________________ 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".