From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.ffmpeg.org (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTPS id 8D0B84AC03 for ; Mon, 22 Sep 2025 11:20:45 +0000 (UTC) Authentication-Results: ffbox; dkim=fail (body hash mismatch (got b'm2HwUrbBbssCIEoNBRWEhk2KFTylDW3cCKtU3WDr5R0=', expected b'vYsqprp59PrJb0EoKRxZFKuSyTTDP6RIxhT5wLi+PDI=')) header.d=comstyle.com header.a=rsa-sha256 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ffmpeg.org; i=@ffmpeg.org; q=dns/txt; s=mail; t=1758539997; h=date : to : message-id : mime-version : reply-to : subject : list-id : list-archive : list-archive : list-help : list-owner : list-post : list-subscribe : list-unsubscribe : from : cc : content-type : content-transfer-encoding : from; bh=m2HwUrbBbssCIEoNBRWEhk2KFTylDW3cCKtU3WDr5R0=; b=BfFznD0kVa/dZLsuaL54y3bDG9aKvj6zo0m0HvW65WGIKD+EsqHUhUBDA4zDjcofiVfTU F5VY4das70qgem5n3MAx1GhD3mJkhV2QHxZkmQQ72rvzRaLYgHJmggs1W2kci86ZYuVk6U1 hdDkKcdd58bp4Q28Lw+P8CDorzK4L0bKhjOTG9puqMFyZoc7IWuFbgJtt2vyMaHBIoSqlUs ZnQAabCapFmOvSchSoE7i/h51+gyCVfyAG+G2e6YQn6x2nuirZTv2lafhC8UjgX9LX6TRdI HLMngCkZFFXadBx5Xgzsof5A0p8xecpiie2Sxo9StAqOo2NGFJ3zt1jjiQAg== Received: from [172.19.0.4] (unknown [172.19.0.4]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTP id 98D9768EA62; Mon, 22 Sep 2025 14:19:57 +0300 (EEST) ARC-Seal: i=1; cv=none; a=rsa-sha256; d=ffmpeg.org; s=arc; t=1758539993; b=tQ56PT0CBqAXnBPKCqHDGcSHk+PD/SxmrcyKsUtWgzK/EU+tVFXk7Z1o5NA/liyxnzFGg 5+nAy3UeL3QjF/q6g4Z7SFp6R5t9VID2dhkZjFiBa4xY+eIsXTeF8wzR+PALGZ4ET6Gj8Q8 9gSbyy5UuwF6oWBXZucXJqvfanW5GmLNL0MsYmUJl3n2JSiJjWCY034lvL3dQY4o7F4bhhr S76+T6H8BNUaNzL0LQ3t5ybM+Gf4W1YOoRG5FdZ8c/p5knA0cRpYy7hhispFVfAsAMcjsDC Zp+jbKdWKK7GpSlpSbBrYU8Jdqo6AR6+o8536mdxDCFQN4rgLpi6WardxQNA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=ffmpeg.org; s=arc; t=1758539993; h=from : sender : reply-to : subject : date : message-id : to : cc : mime-version : content-type : content-transfer-encoding : content-id : content-description : resent-date : resent-from : resent-sender : resent-to : resent-cc : resent-message-id : in-reply-to : references : list-id : list-help : list-unsubscribe : list-subscribe : list-post : list-owner : list-archive; bh=8pFMoIP+mEOEMMH0EYghIZItPnNf9Kh732eYB1WYcH0=; b=jD/LwB6KjEOQJzWD+nKpqwt5Z7gYkXeaX5+c+h+osGD5Lo45RS7Q4DnuDWd68pnqd764q 6canXvAmVv+F+VEknucVeIqjSx9JBbHfwU9X4ySAQrXkJGOmknVcAp/uYNtoEy9Bn2zauvA 763CKUx7HaX+AgBDlEwtwd+B8f65y5d4dzTF9qQPnAU/dcoOXVLZ5XNl01akKMEWGfur5Hf ltcbdTPzeB9h3WDu0NxRa9NoVVuKv+C37A514DlxEKznObihOIf6obw1N/BEiac8+ohEnH3 Jxyf5ow2TCKml/5I4bZh1fzZ/XMlsnGn+Hi9b7G9olz5ruWmkYNgLM0QHv0g== ARC-Authentication-Results: i=1; ffmpeg.org; dkim=pass header.d=comstyle.com; arc=none; dmarc=pass header.from=comstyle.com policy.dmarc=none Authentication-Results: ffmpeg.org; dkim=pass header.d=comstyle.com; arc=none (Message is not ARC signed); dmarc=pass (Used From Domain Record) header.from=comstyle.com policy.dmarc=none Received: from mail.comstyle.com (unknown [206.51.28.2]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTPS id 08347687D3D for ; Mon, 22 Sep 2025 14:19:33 +0300 (EEST) Received: from mail.comstyle.com (localhost [127.0.0.1]) by mail.comstyle.com (Postfix) with ESMTP id 4cVgcB0hY0z8PbP; Mon, 22 Sep 2025 07:19:22 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=comstyle.com; h=date :from:to:cc:subject:message-id:mime-version:content-type; s= default; bh=vYsqprp59PrJb0EoKRxZFKuSyTTDP6RIxhT5wLi+PDI=; b=Rkq4 MAdjjQo5W4SDRt+VDNfRTj/sfukpAvYMDNYRkaF10O+wTQuFOw+YForVAQEQSGus Tj4D2YtVsKJwhPxy7aUVvgZq9vZ+4NojWAyXujpM8ZmlcMq2WR0eC3Xqo3qCB+P9 NGa+IhHjnjsD+NP652rNi4EjeRyL/7+Z6v6iivw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=comstyle.com; h=date:from:to :cc:subject:message-id:mime-version:content-type; q=dns; s= default; b=Wr+GZiWbjgdrwDtBspTG/8rAKHXzAroKii7BZmXuxCz7c9xOcMkYA bfIvSnb6Gd3j1DouAHYjyDwgCK8BnwH3R76rpSTXIJLuq3UGmQhAHEXCvLr5FTJK I83KT0xbFtt8GxYIBbUFYHbNOti/N3vV+Xw3uCBp3UGU8nUn7saESg= Received: from humpty.home.comstyle.com (unknown [IPv6:2001:470:b050:3:f1f2:2989:3fdc:44f1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA512) (No client certificate requested) (Authenticated sender: brad) by mail.comstyle.com (Postfix) with ESMTPSA id 4cVgcB065Jz8PbN; Mon, 22 Sep 2025 07:19:22 -0400 (EDT) Date: Mon, 22 Sep 2025 07:19:20 -0400 To: ffmpeg-devel@ffmpeg.org Message-ID: MIME-Version: 1.0 Content-Disposition: inline Message-ID-Hash: YLH6M2SOVZPETNNJKNVAD4GIFV6OSBSU X-Message-ID-Hash: YLH6M2SOVZPETNNJKNVAD4GIFV6OSBSU X-MailFrom: SRS0=qdme=4B=comstyle.com=brad@ffmpeg.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; header-match-ffmpeg-devel.ffmpeg.org-0; header-match-ffmpeg-devel.ffmpeg.org-1; header-match-ffmpeg-devel.ffmpeg.org-2; header-match-ffmpeg-devel.ffmpeg.org-3; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list Reply-To: FFmpeg development discussions and patches Subject: [FFmpeg-devel] [PATCH] libavutil/arm: Make use of elf_aux_info() on FreeBSD/OpenBSD List-Id: FFmpeg development discussions and patches Archived-At: Archived-At: List-Archive: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Brad Smith via ffmpeg-devel Cc: martin@martin.st, Brad Smith Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Archived-At: List-Archive: List-Post: libavutil/arm: Make use of elf_aux_info() on FreeBSD/OpenBSD - FreBSD/OpenBSD have elf_aux_info() on arm - Wrap AT_HWCAP as the value is different for BSD vs Linux (16 vs 25) Signed-off-by: Brad Smith --- libavutil/arm/cpu.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/libavutil/arm/cpu.c b/libavutil/arm/cpu.c index b84882005a..8ec28143d7 100644 --- a/libavutil/arm/cpu.c +++ b/libavutil/arm/cpu.c @@ -31,18 +31,20 @@ CORE_FLAG(VFPV3) | \ CORE_FLAG(NEON)) -#if defined __linux__ || defined __ANDROID__ +#if defined __linux__ || defined __ANDROID__ || HAVE_ELF_AUX_INFO #include #include #include #include "libavutil/avstring.h" -#if HAVE_GETAUXVAL +#if HAVE_GETAUXVAL || HAVE_ELF_AUX_INFO #include #endif +#ifndef AT_HWCAP #define AT_HWCAP 16 +#endif /* Relevant HWCAP values from kernel headers */ #define HWCAP_VFP (1 << 6) @@ -54,7 +56,7 @@ static int get_auxval(uint32_t *hwcap) { -#if HAVE_GETAUXVAL +#if HAVE_GETAUXVAL || HAVE_ELF_AUX_INFO unsigned long ret = ff_getauxval(AT_HWCAP); if (ret == 0) return -1; @@ -65,6 +67,7 @@ static int get_auxval(uint32_t *hwcap) #endif } +#if defined __linux__ || defined __ANDROID__ static int get_hwcap(uint32_t *hwcap) { struct { uint32_t a_type; uint32_t a_val; } auxv; @@ -117,6 +120,7 @@ static int get_cpuinfo(uint32_t *hwcap) fclose(f); return 0; } +#endif int ff_get_cpu_flags_arm(void) { @@ -124,8 +128,10 @@ int ff_get_cpu_flags_arm(void) uint32_t hwcap; if (get_auxval(&hwcap) < 0) +#if defined __linux__ || defined __ANDROID__ if (get_hwcap(&hwcap) < 0) if (get_cpuinfo(&hwcap) < 0) +#endif return flags; #define check_cap(cap, flag) do { \ -- 2.51.0 _______________________________________________ ffmpeg-devel mailing list -- ffmpeg-devel@ffmpeg.org To unsubscribe send an email to ffmpeg-devel-leave@ffmpeg.org