From patchwork Sat Sep 21 09:05:32 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Brad Smith X-Patchwork-Id: 51684 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a59:d154:0:b0:48e:c0f8:d0de with SMTP id bt20csp1447797vqb; Sat, 21 Sep 2024 02:05:47 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVvyEcjeM3iHfZprHyQTZ8BWiKEYwcISCZLzxXOzMqF+TksNghrY8J/eNNuL4L+QCpQmPjD1FCobUZCm5rP+ZKR@gmail.com X-Google-Smtp-Source: AGHT+IE5Dh9dRkrjNKGHkRC0INVOkHv2stAXhFbTRGjTdSMQxMCJqSZe/cPgzQfsZwWwPAfhFLQS X-Received: by 2002:a05:651c:1988:b0:2f7:5c24:979 with SMTP id 38308e7fff4ca-2f7cb389db3mr8521651fa.10.1726909547186; Sat, 21 Sep 2024 02:05:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1726909547; cv=none; d=google.com; s=arc-20240605; b=lAIxR4F4wsYjhwBsJszwcRHFr7lEwfsKKidTT4QN77kgDJ+ih7lOrjG40QyW/QvghF jcLfsnHVhtgEpHP6Kqk7cnBhb50dE0FjNaYqjROjl2ZjszVQz7owVSynzrSrhibFlt5z bfLJG/BV64z1OwZgvorgaqVRCPON0XyY6tKPzV+pTD6efPI4w/qAtk9tZax9jbJxMZGQ VapUj4Ye5WwNw2vew619LabLvhsPYpmlpCBE02u3Yz+19suhvYiwd6q5yLKoQepaIgsx nuYqhdto8KxHvHpYcmUBJ8/IjoajwEYgNtF2Q9Wi4gFoD6rII8OUv7U6tOlep+GAJjfD Aacg== 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:content-disposition:mime-version:message-id:to :from:date:domainkey-signature:dkim-signature:delivered-to; bh=LJZjReIgb+KehewgjJH/qEN/isqCDCABDngFvSdQcVA=; fh=YOA8vD9MJZuwZ71F/05pj6KdCjf6jQRmzLS+CATXUQk=; b=lwGXIkMG2JoWTV3QzitwVO93Z16aoQgqiZJzJ01FQwOMCH16zas2uhxAAZ9ozaE3ka RCvWFQn9SAHtfbGnVsKtgTRSEi/1+UjLuxjWGk9W+lwETXkZXRuGEB0wH8untXadfoKY AtLlE/patAAzo6xlgZxSNDYBO/WgFWLtDBcd2tPkq943d7jYVeviXL+hlFBwpme/weu7 piyTQduhgY7m5HJHkpwSidnqXXH/zOS5mREO8S7miygVUrrllaLhxB1LtIj499EdEg2P 3jWkv1IkRYVFljA+E3QB1NwoQBM7eg9yi0snJhWxlupGrR7vnwM8BBp+CUOYGFrrIjCi docg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@comstyle.com header.s=default header.b=Gwj3A6+K; 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 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id 38308e7fff4ca-2f79d2c7ca2si48838251fa.122.2024.09.21.02.05.46; Sat, 21 Sep 2024 02:05:47 -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=@comstyle.com header.s=default header.b=Gwj3A6+K; 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 Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 2173068DBCF; Sat, 21 Sep 2024 12:05:42 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail.comstyle.com (speedy.comstyle.com [206.51.28.2]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 5DDE168DB93 for ; Sat, 21 Sep 2024 12:05:35 +0300 (EEST) Received: from mail.comstyle.com (localhost [127.0.0.1]) by mail.comstyle.com (Postfix) with ESMTP id 4X9jyj4XDyz8PbQ for ; Sat, 21 Sep 2024 05:05:33 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=comstyle.com; h=date :from:to:subject:message-id:mime-version:content-type; s= default; bh=jUOYe3fAPwGUiQ1QhHdul8k/wuFSjD2ZEmVMv0NaYrE=; b=Gwj3 A6+KZwAtxdOozwa0vX7f3T6HZC5RbE0j1afTf2n0owAuKBSd6Xu5qeYAQQLDqLOd ElOzDS7JB5IW3loV3JdOuTlBnPhxNyndpBtLTaID5Gcl2eEabLyYlLx75oEnPhS0 uSDbpfkif0KYNXLWDRavXth/Rxtx1ID+Ynkv/tA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=comstyle.com; h=date:from:to :subject:message-id:mime-version:content-type; q=dns; s=default; b= k1YnJKZP3JbvFF730K2IyLzlS1x1Xf6T5cO93dzG5+Zcqr36J+hi1/PFhXowe+nl c2shHDNastwdwUcuTVMR1jupEhvZkhTylFiGoa3lXsT/07JffSnh2UIFlAoQSJMh l92ZPMsOmlQz92GYD4tiOLi0R2dxlC7Ml4TdJtdVztU= Received: from humpty.home.comstyle.com (unknown [IPv6:2001:470:b050:3:9648:fe7d:b28e:2d42]) (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 4X9jyj2QS2z8PbP for ; Sat, 21 Sep 2024 05:05:33 -0400 (EDT) Date: Sat, 21 Sep 2024 05:05:32 -0400 From: Brad Smith To: ffmpeg-devel@ffmpeg.org Message-ID: MIME-Version: 1.0 Content-Disposition: inline Subject: [FFmpeg-devel] [PATCH] ppc: Recognize the PPC VSX and Power8 CPU flags 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: GtFpt3WtUXZO ppc: Recognize the PPC VSX and Power8 CPU flags Signed-off-by: Brad Smith --- libavutil/cpu.c | 2 ++ libavutil/tests/cpu.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/libavutil/cpu.c b/libavutil/cpu.c index df00bd541f..44cbb9e9ff 100644 --- a/libavutil/cpu.c +++ b/libavutil/cpu.c @@ -120,6 +120,8 @@ int av_parse_cpu_caps(unsigned *flags, const char *s) { "flags" , NULL, 0, AV_OPT_TYPE_FLAGS, { .i64 = 0 }, INT64_MIN, INT64_MAX, .unit = "flags" }, #if ARCH_PPC { "altivec" , NULL, 0, AV_OPT_TYPE_CONST, { .i64 = AV_CPU_FLAG_ALTIVEC }, .unit = "flags" }, + { "vsx" , NULL, 0, AV_OPT_TYPE_CONST, { .i64 = AV_CPU_FLAG_VSX }, .unit = "flags" }, + { "power8" , NULL, 0, AV_OPT_TYPE_CONST, { .i64 = AV_CPU_FLAG_POWER8 }, .unit = "flags" }, #elif ARCH_X86 { "mmx" , NULL, 0, AV_OPT_TYPE_CONST, { .i64 = AV_CPU_FLAG_MMX }, .unit = "flags" }, { "mmx2" , NULL, 0, AV_OPT_TYPE_CONST, { .i64 = AV_CPU_FLAG_MMX2 }, .unit = "flags" }, diff --git a/libavutil/tests/cpu.c b/libavutil/tests/cpu.c index 0a459c1d9e..53e9f99950 100644 --- a/libavutil/tests/cpu.c +++ b/libavutil/tests/cpu.c @@ -51,6 +51,8 @@ static const struct { { AV_CPU_FLAG_SETEND, "setend" }, #elif ARCH_PPC { AV_CPU_FLAG_ALTIVEC, "altivec" }, + { AV_CPU_FLAG_VSX, "vsx" }, + { AV_CPU_FLAG_POWER8, "power8" }, #elif ARCH_MIPS { AV_CPU_FLAG_MMI, "mmi" }, { AV_CPU_FLAG_MSA, "msa" },