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 ESMTP id F004846059 for ; Sun, 2 Jul 2023 12:33:34 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id AB00D68C26E; Sun, 2 Jul 2023 15:33:14 +0300 (EEST) Received: from mail-wm1-f50.google.com (mail-wm1-f50.google.com [209.85.128.50]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 7CE1A68018F for ; Sun, 2 Jul 2023 15:33:07 +0300 (EEST) Received: by mail-wm1-f50.google.com with SMTP id 5b1f17b1804b1-3fba8e2aa52so41891945e9.1 for ; Sun, 02 Jul 2023 05:33:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kynesim-co-uk.20221208.gappssmtp.com; s=20221208; t=1688301187; x=1690893187; 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=XKa+UiolT/cvRc6+nW3p8QVxV9VjykxOL609dgbfLuI=; b=sa7U6eaNsmKQMYhbUKNVFtbQ4wk6u/5nz7LAi4v4OdKXedbm+UbIICNueC4kX8Qu8Y HK02rvXcYD857wDLZISIth9tlNFZQNGSnQKgK43HRMq69aW/hRqmOQ1K2uj2r2+NDtVt PXnyDOXEuXR2bAEFB2rwKmPpRQZ8r5+935jGc3o/gd6/0TEOmoHMWHYPsII3RkrBp7LZ 91VimtJno3TgwuQAcRwi4T2AGahvUxXVdBicYqbtL8zRq/2zX0q6Jr8IzifLHmmD3mXx OAgB2GBekEUhP/7+nhl0x2gNCL6whSy2aA1FVk5NeQexxofs9yJgTdBBHGpY2f2pZW4y v7UQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688301187; x=1690893187; 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=XKa+UiolT/cvRc6+nW3p8QVxV9VjykxOL609dgbfLuI=; b=iRLYQm7hd8Nu+eG2uX3tWrjv/KhIQb5ZCGcC2FTHVms4f6tgFTlB9ufB27w+OEaOS2 1AY89vGUWTM+eGmJuG5azEpIwbDzhIuivOFo2GMu4u3PeJkVZizqbyXm7dJ71CZlg4x/ W+HW7g1/Fr4+ZwG5vuc44yQfI3pJtB2fgEEfcPI+uLVUiCkuOBo4V8+s4n0jOGa73OHV W1uLRKUeJysjz++AwOl0soy4a8LganpehBsAd/00kUgGdP+qBycLltHtctKR3Lgpe0VS 2PSqQHZZ+Op6GiyN5Y6YUBOZLFB/hFU3mecnZSflRpMIG3N/naUKhMtZLRsfN137Tg2b FdbA== X-Gm-Message-State: AC+VfDznBV/wBj+0hjQzhogKyivFc2l0sj6+DveEmVSJxfmiKWRlvmyZ +IIqkfA5cmsIQEXca8yD1dSSHkDhhicXUeh9CM8= X-Google-Smtp-Source: ACHHUZ4aa5+ijwUMHD5RBkrawK6Z4InE45eYwHDhV+yFVRiDKGSxLRvsM0j3K7S+UbArXyeIwPfENw== X-Received: by 2002:a1c:7705:0:b0:3fb:a9e1:8bf0 with SMTP id t5-20020a1c7705000000b003fba9e18bf0mr6124712wmi.39.1688301186925; Sun, 02 Jul 2023 05:33:06 -0700 (PDT) Received: from sucnaath.outer.uphall.net (cpc1-cmbg20-2-0-cust759.5-4.cable.virginm.net. [86.21.218.248]) by smtp.gmail.com with ESMTPSA id f12-20020a7bc8cc000000b003fbbe41fd78sm8816167wml.10.2023.07.02.05.33.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 02 Jul 2023 05:33:06 -0700 (PDT) From: John Cox To: ffmpeg-devel@ffmpeg.org Date: Sun, 2 Jul 2023 12:32:29 +0000 Message-Id: <20230702123242.232484-3-jc@kynesim.co.uk> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230702123242.232484-1-jc@kynesim.co.uk> References: <20230702123242.232484-1-jc@kynesim.co.uk> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH v2 02/15] avfilter/vf_bwdif: Add common macros and consts for aarch64 neon 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: thomas.mundt@hr.de, John Cox , martin@martin.st 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: Add macros for dual scalar half->single multiply and accumulate Add macro for shift, saturate and shorten single to byte Add filter constants Signed-off-by: John Cox --- libavfilter/aarch64/vf_bwdif_neon.S | 53 +++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) diff --git a/libavfilter/aarch64/vf_bwdif_neon.S b/libavfilter/aarch64/vf_bwdif_neon.S index 639ab22998..c2f5eb1f73 100644 --- a/libavfilter/aarch64/vf_bwdif_neon.S +++ b/libavfilter/aarch64/vf_bwdif_neon.S @@ -23,3 +23,56 @@ #include "libavutil/aarch64/asm.S" +// Space taken on the stack by an int (32-bit) +#ifdef __APPLE__ +.set SP_INT, 4 +#else +.set SP_INT, 8 +#endif + +.macro SQSHRUNN b, s0, s1, s2, s3, n + sqshrun \s0\().4h, \s0\().4s, #\n - 8 + sqshrun2 \s0\().8h, \s1\().4s, #\n - 8 + sqshrun \s1\().4h, \s2\().4s, #\n - 8 + sqshrun2 \s1\().8h, \s3\().4s, #\n - 8 + uzp2 \b\().16b, \s0\().16b, \s1\().16b +.endm + +.macro SMULL4K a0, a1, a2, a3, s0, s1, k + smull \a0\().4s, \s0\().4h, \k + smull2 \a1\().4s, \s0\().8h, \k + smull \a2\().4s, \s1\().4h, \k + smull2 \a3\().4s, \s1\().8h, \k +.endm + +.macro UMULL4K a0, a1, a2, a3, s0, s1, k + umull \a0\().4s, \s0\().4h, \k + umull2 \a1\().4s, \s0\().8h, \k + umull \a2\().4s, \s1\().4h, \k + umull2 \a3\().4s, \s1\().8h, \k +.endm + +.macro UMLAL4K a0, a1, a2, a3, s0, s1, k + umlal \a0\().4s, \s0\().4h, \k + umlal2 \a1\().4s, \s0\().8h, \k + umlal \a2\().4s, \s1\().4h, \k + umlal2 \a3\().4s, \s1\().8h, \k +.endm + +.macro UMLSL4K a0, a1, a2, a3, s0, s1, k + umlsl \a0\().4s, \s0\().4h, \k + umlsl2 \a1\().4s, \s0\().8h, \k + umlsl \a2\().4s, \s1\().4h, \k + umlsl2 \a3\().4s, \s1\().8h, \k +.endm + +// static const uint16_t coef_lf[2] = { 4309, 213 }; +// static const uint16_t coef_hf[3] = { 5570, 3801, 1016 }; +// static const uint16_t coef_sp[2] = { 5077, 981 }; + + .balign 16 +coeffs: + .hword 4309 * 4, 213 * 4 // lf[0]*4 = v0.h[0] + .hword 5570, 3801, 1016, -3801 // hf[0] = v0.h[2], -hf[1] = v0.h[5] + .hword 5077, 981 // sp[0] = v0.h[6] + -- 2.39.2 _______________________________________________ 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".