From patchwork Tue Sep 17 12:14:18 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Martin_Storsj=C3=B6?= X-Patchwork-Id: 51634 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a59:d32e:0:b0:48e:c0f8:d0de with SMTP id cf14csp211383vqb; Tue, 17 Sep 2024 05:15:11 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXcB6qUU/7/areLBB7I15RoA+ujFDjKZnJDmAP8xunqlmUhk2l5CVhAmEur0K+ulbRalrefRN4SlVYr0p/2xDaY@gmail.com X-Google-Smtp-Source: AGHT+IF3etG/ED/zDfCzzVjYEkoJacbZPpyCje3YhIX2WWrJc+1YqOId/XbyvwIhFcopPnTtYIGg X-Received: by 2002:a05:6512:230a:b0:530:e1f1:8dc9 with SMTP id 2adb3069b0e04-53678fed1b2mr8958332e87.46.1726575310814; Tue, 17 Sep 2024 05:15:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1726575310; cv=none; d=google.com; s=arc-20240605; b=c1nOaCdvbP0MWGvhI6PLZaXrRlZSeXWxDUB8SVOrZ5hSIQbaFkpJbq37H8Ae0M6nb6 VU+cjxuJiX+qJxQzm2BRHf00bxep0SAuGOa6kcmdQCn9i8317tb/uvQ7AT4uK+cIOSV0 AI6CnzXjPJCfLkZwgWbEWu/77Qb9btXj0dEEu9ZemBteYH1/FontlKKfWWlWZe5IS+Jr l5SAPshvqqMl7PDqEOOQ2bxkTvIyMuBxWQZKLmQ7S+PLJ0AMYeKxxYSip1Ys5abJpHl7 7CQPjXAVkvJirEBEO9iJd1I2RSw8WU6zLQOv1bPxb0XFH7Xb8OzpUwspD6iyrD2qUSG7 VR4w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:content-transfer-encoding:reply-to:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:subject:mime-version:references:in-reply-to:message-id :date:to:from:dkim-signature:delivered-to; bh=AtgScGnpXUiNrpJxnFYNz4O2n09sie6CtDub3uo4/Ww=; fh=YOA8vD9MJZuwZ71F/05pj6KdCjf6jQRmzLS+CATXUQk=; b=foZkNZXVLww/Y2kHGdjHy9K51gb4ALzxDuZfma30mOqa9lJB29z2LNyBpwmZNz9SNv 7tmuVU0pKy/R8lHF0T+SCdJ9/ybHgMKtDVMNkP4iD/Jwu45j5FzICcgoJMAvFexuwFRx os5mkV3Cpq4Apelnevu1fQc9Y6NufHRIKCtRLGO6xmt+Vx17vh7ibzKyu1y1BRzR7XCN yWmLO95VYLXwuQtU5BbjxlkUVsUEOzjGYFF01Hx9tj8swbG+fTuswbCR4NHf5pd2cx/B m1F2d/M5U3ZG8HxrOj3NxLLB4Rj4SDZW3hcK6BTQU1FPKYkQtMVfeqg6nu9qASX/VSKv /3GA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@martin-st.20230601.gappssmtp.com header.s=20230601 header.b=PYAasZrU; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; dara=fail header.i=@gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id 2adb3069b0e04-536870a0c78si2457406e87.421.2024.09.17.05.15.10; Tue, 17 Sep 2024 05:15:10 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@martin-st.20230601.gappssmtp.com header.s=20230601 header.b=PYAasZrU; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; dara=fail header.i=@gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 101FD68DB33; Tue, 17 Sep 2024 15:14:34 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-lj1-f174.google.com (mail-lj1-f174.google.com [209.85.208.174]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 795C068DAD5 for ; Tue, 17 Sep 2024 15:14:23 +0300 (EEST) Received: by mail-lj1-f174.google.com with SMTP id 38308e7fff4ca-2f759688444so47296711fa.1 for ; Tue, 17 Sep 2024 05:14:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=martin-st.20230601.gappssmtp.com; s=20230601; t=1726575263; x=1727180063; darn=ffmpeg.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=mqFu9rjFkO7/KW1owz1C3vZ6sTLA6ccZFe+CZIagSvA=; b=PYAasZrUAzL9OKDoY1xFZ9HddXLrxGXuz7JyASohzaisRSGS2C8QkV0hcc999ilhqp hNVDPUA/2b42OTAqLSKSZn452Zo1ZbwW7z8PuYfgDui80rGe+aYj4Z8XIxShWDt+K/ss AEYbnN9/9AecqUWSgRJaYvQ6OPWur3Rysp8hHvwkYELYELSxMfVYEHjnU/SrwBG18N6u FSo4gNGc6JVkRQBj4SZR7evz6uJJeloSSHAfrIC55/Y8d4mhhblFhGqTnpkaqp3bet/I S3KeALmmDI+PRXh/F4C7oOBmOAoSvjvKdJ2T80D/qvF3ioq7a2ZwvPMMUbDsT87i5L/7 KbAA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1726575263; x=1727180063; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=mqFu9rjFkO7/KW1owz1C3vZ6sTLA6ccZFe+CZIagSvA=; b=X06P8k9bOUFguZr/IW7aa9DsFz/S2u7rOTlpAgBY2TbIu4gvaASWk9snK+NtyvSNSn ppM3k+csNUnAYuU2i/HKWkSPZWEdmCqNJj4gVroHUOfZakDeDSKVCt4sROD5Eh1tOfCi 8vwVBFr2XuYqyD/bhOipnQMZ07PAS+Gre5KMJPJZcxew+Qu0RxM9ZN9ywavF3HFCG/jh MbH8VV/Zj3MmuETw7fYCdE+kQ+x3RIawWiXHWFadbLldFAXuM3/YaZP6sKiuitUBY6U8 JMIq5Wr6E5W592H36NXHUYsCVDHPYv9bDbLuoChdtU6uU/wdHz0yeoP48te3Ces2pIm1 epQA== X-Gm-Message-State: AOJu0Yxp8RhVXrwCtBwJLSnGOR0BTt/MXHkVJsxKcKN8EOwEP8Tqr9NF sE2evEl2zDyWgwp0GODqVSCCgncV8fuKHg7Fl3IbNazqKKsROUp3cOYW6v6xfe5F5E+JieEEV6o 1yw== X-Received: by 2002:a05:651c:2129:b0:2f7:7ea4:2a1e with SMTP id 38308e7fff4ca-2f787f4460amr102858081fa.28.1726575262539; Tue, 17 Sep 2024 05:14:22 -0700 (PDT) Received: from localhost (dsl-tkubng21-58c01c-243.dhcp.inet.fi. [88.192.28.243]) by smtp.gmail.com with ESMTPSA id 38308e7fff4ca-2f79d3267e3sm10103741fa.68.2024.09.17.05.14.22 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Sep 2024 05:14:22 -0700 (PDT) From: =?utf-8?q?Martin_Storsj=C3=B6?= To: ffmpeg-devel@ffmpeg.org Date: Tue, 17 Sep 2024 15:14:18 +0300 Message-Id: <20240917121419.610349-5-martin@martin.st> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240917121419.610349-1-martin@martin.st> References: <20240917121419.610349-1-martin@martin.st> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 5/5] checkasm: Print the SVE vector length at startup 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: eMwKA98ecsvP --- tests/checkasm/checkasm.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/tests/checkasm/checkasm.c b/tests/checkasm/checkasm.c index c932e028a5..c9d2b5faf1 100644 --- a/tests/checkasm/checkasm.c +++ b/tests/checkasm/checkasm.c @@ -94,6 +94,10 @@ #define isatty(fd) 1 #endif +#if ARCH_AARCH64 +#include "libavutil/aarch64/cpu.h" +#endif + #if ARCH_ARM && HAVE_ARMV5TE_EXTERNAL #include "libavutil/arm/cpu.h" @@ -917,6 +921,7 @@ int main(int argc, char *argv[]) { unsigned int seed = av_get_random_seed(); int i, ret = 0; + char arch_info_buf[50] = ""; #ifdef _WIN32 #if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) @@ -981,7 +986,12 @@ int main(int argc, char *argv[]) } } - fprintf(stderr, "checkasm: using random seed %u\n", seed); +#if ARCH_AARCH64 && HAVE_SVE + if (have_sve(av_get_cpu_flags())) + snprintf(arch_info_buf, sizeof(arch_info_buf), + "SVE %d bits, ", 8 * ff_aarch64_sve_length()); +#endif + fprintf(stderr, "checkasm: %susing random seed %u\n", arch_info_buf, seed); av_lfg_init(&checkasm_lfg, seed); if (state.bench_pattern)