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 5259746A35 for ; Sun, 2 Jul 2023 10:27:21 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 1753068C1E3; Sun, 2 Jul 2023 13:27:19 +0300 (EEST) Received: from mail-wr1-f52.google.com (mail-wr1-f52.google.com [209.85.221.52]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id E6E1368BF57 for ; Sun, 2 Jul 2023 13:27:12 +0300 (EEST) Received: by mail-wr1-f52.google.com with SMTP id ffacd0b85a97d-314172bac25so3774862f8f.3 for ; Sun, 02 Jul 2023 03:27:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kynesim-co-uk.20221208.gappssmtp.com; s=20221208; t=1688293632; x=1690885632; h=content-transfer-encoding:mime-version:user-agent:in-reply-to :references:message-id:date:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to; bh=trK6yUkaoh6ClLirUDxtwz4GOUxaRZvzDQMHUSXmoWk=; b=EK6kvx6AA4gDRS0rJRGI45vStDTpr0Vb1mvMlhRXRkJcGRkUP9wvLCQIKbIL4oeDe9 +f4Fmu7FCNRBV8HZDPEIxaQ1bhk9MzM5mz3FzIpz1SKjelgu3oeIaJ4Wz5KKcAFiWls5 aOuG4e1/wRrWZu/dN+FoI12veP5ZwU6Xdwx47uPHrVIn5Jr7r2zK76IUENrjypvp0X1p GKPi1z18aw4LSVknY139RqXbvbnnUnNE8g/IloE5YlFFY3n59YdGTd8rXUJKoGRX3u31 88Epjb6uSFMhXQ6orItEyMsWa2kbXr9O85gR8C3ediQnDvKXoy2m2FhMP6kJFwtoqWmN eJNw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688293632; x=1690885632; h=content-transfer-encoding:mime-version:user-agent:in-reply-to :references:message-id:date:subject:cc:to:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=trK6yUkaoh6ClLirUDxtwz4GOUxaRZvzDQMHUSXmoWk=; b=WFpvc2Evl8PnwqWbNFL5pnKJJwlIOfK5c5gY/LdMrFQaYK8Cm60rlzM48uxZhG5wd0 5c25GzXUh5hwG25JsvP0TRW/tjuc+rHfCFUkD5szDhcJXafB97GDUXLX9Mbq8V3W3GKR 5QmewvZBVsE58bFPZhPeNd6riFV4FfsSNl/8YbwAwweLGOMC3w2hFlSPeZ9vwIq1ECIw NkzcR00DtpwpwG55P8HGJ6QmGOPtc2z0IJvPKwZWdGe0INYchL5sVB9/K06sLhz/abp+ un3ANHwfLE4PBVUd+ltkvVHkgRX88XlzA00aSk4SuMt6Vwc5RzRsAUDzN8gqrnZbvsfV IQRA== X-Gm-Message-State: ABy/qLbTx3UqYO8AZRiVrqjZ9rYEvuvdHUxczKE0YRDYXNb9XWPpXb54 iZb06bNRo49krOLwuhYeVA7Ek/tTnLgr4ErCQU4= X-Google-Smtp-Source: APBJJlG7fLwXKkAfnzaFjlucVA+6etql49F1tL5wI3L82s3QQSbg3KcdW21eVhZE7M/PDZGecJygUA== X-Received: by 2002:a5d:61d2:0:b0:313:e57b:e96d with SMTP id q18-20020a5d61d2000000b00313e57be96dmr5065383wrv.36.1688293632081; Sun, 02 Jul 2023 03:27:12 -0700 (PDT) Received: from CTHALPA.outer.uphall.net (cpc1-cmbg20-2-0-cust759.5-4.cable.virginm.net. [86.21.218.248]) by smtp.gmail.com with ESMTPSA id b2-20020adfde02000000b0030c4d8930b1sm22725377wrm.91.2023.07.02.03.27.11 (version=TLS1 cipher=ECDHE-ECDSA-AES128-SHA bits=128/128); Sun, 02 Jul 2023 03:27:11 -0700 (PDT) From: John Cox To: =?utf-8?Q?Martin_Storsj=C3=B6?= Date: Sun, 02 Jul 2023 11:27:10 +0100 Message-ID: References: <20230629175729.224383-1-jc@kynesim.co.uk> <20230629175729.224383-3-jc@kynesim.co.uk> <41d6b9bd-803-a12c-8e90-84dc9dc9beb0@martin.st> In-Reply-To: <41d6b9bd-803-a12c-8e90-84dc9dc9beb0@martin.st> User-Agent: ForteAgent/8.00.32.1272 MIME-Version: 1.0 Subject: Re: [FFmpeg-devel] [PATCH 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, FFmpeg development discussions and patches 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: On Sun, 2 Jul 2023 00:35:14 +0300 (EEST), you wrote: >On Thu, 29 Jun 2023, John Cox wrote: > >> 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 | 46 +++++++++++++++++++++++++++++ >> 1 file changed, 46 insertions(+) >> >> diff --git a/libavfilter/aarch64/vf_bwdif_neon.S b/libavfilter/aarch64/vf_bwdif_neon.S >> index 639ab22998..a8f0ed525a 100644 >> --- a/libavfilter/aarch64/vf_bwdif_neon.S >> +++ b/libavfilter/aarch64/vf_bwdif_neon.S >> @@ -23,3 +23,49 @@ >> >> #include "libavutil/aarch64/asm.S" >> >> +.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 }; >> + >> + .align 16 > >Note that .align for arm is power of two; this triggers a 2^16 byte >alignment here, which certainly isn't intended. Yikes! I'll swap that for a .balign now I've looked that up >But in general, the usual way of defining constants is with a >const/endconst block, which places them in the right rdata section instead >of in the text section. But that then requires you to use a movrel macro >for accessing the data, instead of a plain ldr instruction. Yeah - arm has a history of mixing text & const - I went with the simpler code. Is this a deal breaker or can I leave it as is? JC >> +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] >> + >> -- > > >// Martin _______________________________________________ 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".