From patchwork Wed Sep 14 17:50:11 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?R=C3=A9mi_Denis-Courmont?= X-Patchwork-Id: 34813 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:3b1c:b0:96:9ee8:5cfd with SMTP id c28csp1475569pzh; Wed, 14 Sep 2022 10:50:23 -0700 (PDT) X-Google-Smtp-Source: AA6agR6Tt8zit8m/w35JeMIHATKh3FsHnsH5xTLKXvs/GLtOYKnUALsqviIvax6ioKtIj6Aldhlo X-Received: by 2002:aa7:c90e:0:b0:44e:b410:b1d5 with SMTP id b14-20020aa7c90e000000b0044eb410b1d5mr31696552edt.359.1663177822836; Wed, 14 Sep 2022 10:50:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663177822; cv=none; d=google.com; s=arc-20160816; b=oyGAxWSvUQHiY7uI1z5Lzy9KKc99lTAviPX/+3vcto5ab7Pfsmc2dkGCJACUIdDxl1 4sYlf7ajPr/HQNb6EIATUF50fu0udyLItDIvwBBwmEnVioHaXlFyv+d6OUeFQag7xqRm L7HqVHxn6i6JY4WL9VfTwVdl8Sppe/P98clS6kbw/sKVeeaWzpeTgz7+L+CNabIV6AEx sH4g/FKv0DRyH2AWBTmv8AGNx5E+lR1FKxZPRJMnmxTiWXAyAeHWMp6i0d/zfJLzoBxg LbCkwcnpHRKbnvTzJB97JhbS0gMyxBWoEyaNBWioD7WR90yHxPteGQMSZLhtdodheYrX ECBA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; 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:organization:message-id:date:to :from:delivered-to; bh=kCGsWwS0ttgbFrswiUcXZYGnfR3xm6bs7mup9GEX1xw=; b=vFY++EOk5t9yOqcBfhRJh4iqrlLTGDnfZehTAWeXg/nHY+npTmBTSe0MIhCRSwIqmn cKkBqAYYU/gjLA2bQwWsiVvV2L1pp0+WE9amxpHcs5MgnIVT76hJQd+GdaWpKJVWUr8u C4z6iQoAspnDbWhfNOj+u6SMhlqyiGG+PIHrRHv8/j1oXA42/00n1RSo0gQL+W/XhQhd ext8Jpd6s7NilNsO0n5PwSkR8wKGTD7xMwD6G6PHOqCeOzp8vw04WeSeLDaYJzGBwSXa 6pYOPqh9NIJ/qxECLweo0nrTb+EhvbjgVkuqQS5AZRC2d5zi5nD5tVNfycslcmeXGG22 GgBA== ARC-Authentication-Results: i=1; mx.google.com; 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 hd13-20020a170907968d00b00730672860bdsi14023704ejc.123.2022.09.14.10.50.21; Wed, 14 Sep 2022 10:50:22 -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; 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 DE57668BB5E; Wed, 14 Sep 2022 20:50:18 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from ursule.remlab.net (vps-a2bccee9.vps.ovh.net [51.75.19.47]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id DBCB368B74D for ; Wed, 14 Sep 2022 20:50:12 +0300 (EEST) Received: from ursule.remlab.net (localhost [IPv6:::1]) by ursule.remlab.net (Postfix) with ESMTP id 690D4C003A for ; Wed, 14 Sep 2022 20:50:12 +0300 (EEST) Received: from basile.remlab.net ([2001:14ba:a080:a501:23a6:ebae:8f2a:4d73]) by ursule.remlab.net with ESMTPSA id oZUJF1QUImMk5QMAwZXkwQ (envelope-from ) for ; Wed, 14 Sep 2022 20:50:12 +0300 From: =?iso-8859-1?q?R=E9mi?= Denis-Courmont To: ffmpeg-devel@ffmpeg.org Date: Wed, 14 Sep 2022 20:50:11 +0300 Message-ID: <4768066.31r3eYUQgx@basile.remlab.net> Organization: Remlab MIME-Version: 1.0 Subject: [FFmpeg-devel] [RFC] [PATCH 0/3] RISC-V CPU detection 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: +Ya4Gix+iI9M Hi, This small series introduces the same CPU detection and assembler macros as the earlier V extension stuff but sticking to a scalar use case. Benchmark results are included in the last patch. ---------------------------------------------------------------- RĂ©mi Denis-Courmont (3): lavu: detect RISC-V F extension (i.e. float) lavu/riscv: initial common header for assembler macros lavc/audiodsp: add RISC-V F float vector clip libavcodec/audiodsp.c | 2 ++ libavcodec/audiodsp.h | 1 + libavcodec/riscv/Makefile | 2 ++ libavcodec/riscv/audiodsp_init.c | 31 +++++++++++++++++ libavcodec/riscv/audiodsp_rvf.S | 46 +++++++++++++++++++++++++ libavutil/cpu.c | 4 +++ libavutil/cpu.h | 3 ++ libavutil/cpu_internal.h | 1 + libavutil/riscv/Makefile | 1 + libavutil/riscv/asm.S | 74 ++++++++++++++++++++++++++++++++++++++++ libavutil/riscv/cpu.c | 44 ++++++++++++++++++++++++ tests/checkasm/checkasm.c | 2 ++ 12 files changed, 211 insertions(+) create mode 100644 libavcodec/riscv/Makefile create mode 100644 libavcodec/riscv/audiodsp_init.c create mode 100644 libavcodec/riscv/audiodsp_rvf.S create mode 100644 libavutil/riscv/Makefile create mode 100644 libavutil/riscv/asm.S create mode 100644 libavutil/riscv/cpu.c