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 6DACE4663E for ; Thu, 29 Jun 2023 17:59:25 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 3D28768C3C6; Thu, 29 Jun 2023 20:58:33 +0300 (EEST) Received: from mail-wm1-f51.google.com (mail-wm1-f51.google.com [209.85.128.51]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id EDBD168C2FB for ; Thu, 29 Jun 2023 20:58:23 +0300 (EEST) Received: by mail-wm1-f51.google.com with SMTP id 5b1f17b1804b1-3fb4146e8deso12472465e9.0 for ; Thu, 29 Jun 2023 10:58:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kynesim-co-uk.20221208.gappssmtp.com; s=20221208; t=1688061503; x=1690653503; 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=x+saD+BnCBEtcb98eFn/V8STBqBNA6I31bxLY0CUGew=; b=G1ad/le/szr+XOdj6aszTL9ZJ//fyxomSY+APbP3OKS+o6spnMQFBwgTCZDCybt1/+ zp4iaLmBBJYaC6rRIpu7DC/wUgYoaX5PwyBBLj65lDYjkdz3LwbloIrjEKGUSbiCQRQi iHXY27vCtJuYQ7sGFvclObzqB+O1fGETcvSlEei3nXbVylJ5NxGmJLoSXz9W6MgnE/xx Ri+cvOVsGxdW8/67pZ7Hn3A8iafyUPSYMvg16/vLF9Ll61kB1PsCKBwxEAMAzL9xQW/d 8OsQIRaog+H8r67zv1zSI4TiAc+TNM0jOy289WkBajnqEhBOAo+jYIYI+cFgpQP1mhuD EGdg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688061503; x=1690653503; 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=x+saD+BnCBEtcb98eFn/V8STBqBNA6I31bxLY0CUGew=; b=HI6BxRU5Sk29IYPjLeLj0QkNwhNq5CG7xlhgnJi+XS79+amK/8Tktz+p688sOMmzpF LyhZXj0W3kstMQNfj9mTj0CtQgBeRFeA68E1XcebnntTJ/el88NOrNG+yD0qnOhz8IWV FPiICYcDzhS4DnHNw0PDIFckwLCiZf4UkK7AyvEuj1ZvbfGf00LzbKXNakiUuOhVglTc XODhLgNRtJb1NklB6jDCr045UEQWZR4N7d9s9CUBtuTNQiHmEtZ83/er4pSEvgTM51TR K+CUbDo61ENMu34sKFGLrmCtEm6KPJGYbok9q4x98lxYvrFI1doNDKw90mr504lNcRCC /vDw== X-Gm-Message-State: AC+VfDyMtBtQz0omknysqYFKVsQ+UJhnedzBMdze3JxlC+retRFh+zbI 7nUAoihLvrJX5QIDOlX+WCXPgmPnlllg9LhlNnA= X-Google-Smtp-Source: ACHHUZ6s6zx+WLWNzr2cLv3lMBJ5eAnhDOPMAl4rH1wNBRZj/bvxPj2gg4VGLWk4eEuhs1tOWqKCXw== X-Received: by 2002:a05:600c:2301:b0:3fa:97ad:2b9f with SMTP id 1-20020a05600c230100b003fa97ad2b9fmr105784wmo.16.1688061503395; Thu, 29 Jun 2023 10:58:23 -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 f26-20020a7bcd1a000000b003fbba5f21b6sm2041541wmj.28.2023.06.29.10.58.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Jun 2023 10:58:23 -0700 (PDT) From: John Cox To: ffmpeg-devel@ffmpeg.org Date: Thu, 29 Jun 2023 17:57:20 +0000 Message-Id: <20230629175729.224383-7-jc@kynesim.co.uk> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230629175729.224383-1-jc@kynesim.co.uk> References: <20230629175729.224383-1-jc@kynesim.co.uk> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 06/15] avfilter/vf_bwdif: Add clip and spatial macros 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 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: Signed-off-by: John Cox --- libavfilter/aarch64/vf_bwdif_neon.S | 59 +++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) diff --git a/libavfilter/aarch64/vf_bwdif_neon.S b/libavfilter/aarch64/vf_bwdif_neon.S index b863b3447d..6c5d1598f4 100644 --- a/libavfilter/aarch64/vf_bwdif_neon.S +++ b/libavfilter/aarch64/vf_bwdif_neon.S @@ -59,6 +59,65 @@ umlsl2 \a3\().4s, \s1\().8h, \k .endm +// int b = m2s1 - m1; +// int f = p2s1 - p1; +// int dc = c0s1 - m1; +// int de = c0s1 - p1; +// int sp_max = FFMIN(p1 - c0s1, m1 - c0s1); +// sp_max = FFMIN(sp_max, FFMAX(-b,-f)); +// int sp_min = FFMIN(c0s1 - p1, c0s1 - m1); +// sp_min = FFMIN(sp_min, FFMAX(b,f)); +// diff = diff == 0 ? 0 : FFMAX3(diff, sp_min, sp_max); +.macro SPAT_CHECK diff, m2s1, m1, c0s1, p1, p2s1, t0, t1, t2, t3 + uqsub \t0\().16b, \p1\().16b, \c0s1\().16b + uqsub \t2\().16b, \m1\().16b, \c0s1\().16b + umin \t2\().16b, \t0\().16b, \t2\().16b + + uqsub \t1\().16b, \m1\().16b, \m2s1\().16b + uqsub \t3\().16b, \p1\().16b, \p2s1\().16b + umax \t3\().16b, \t3\().16b, \t1\().16b + umin \t3\().16b, \t3\().16b, \t2\().16b + + uqsub \t0\().16b, \c0s1\().16b, \p1\().16b + uqsub \t2\().16b, \c0s1\().16b, \m1\().16b + umin \t2\().16b, \t0\().16b, \t2\().16b + + uqsub \t1\().16b, \m2s1\().16b, \m1\().16b + uqsub \t0\().16b, \p2s1\().16b, \p1\().16b + umax \t0\().16b, \t0\().16b, \t1\().16b + umin \t2\().16b, \t2\().16b, \t0\().16b + + cmeq \t1\().16b, \diff\().16b, #0 + umax \diff\().16b, \diff\().16b, \t3\().16b + umax \diff\().16b, \diff\().16b, \t2\().16b + bic \diff\().16b, \diff\().16b, \t1\().16b +.endm + +// i0 = s0; +// if (i0 > d0 + diff0) +// i0 = d0 + diff0; +// else if (i0 < d0 - diff0) +// i0 = d0 - diff0; +// +// i0 = s0 is safe +.macro DIFF_CLIP i0, s0, d0, diff, t0, t1 + uqadd \t0\().16b, \d0\().16b, \diff\().16b + uqsub \t1\().16b, \d0\().16b, \diff\().16b + umin \i0\().16b, \s0\().16b, \t0\().16b + umax \i0\().16b, \i0\().16b, \t1\().16b +.endm + +// i0 = FFABS(m1 - p1) > td0 ? i1 : i2; +// DIFF_CLIP +// +// i0 = i1 is safe +.macro INTERPOL i0, i1, i2, m1, d0, p1, td0, diff, t0, t1, t2 + uabd \t0\().16b, \m1\().16b, \p1\().16b + cmhi \t0\().16b, \t0\().16b, \td0\().16b + bsl \t0\().16b, \i1\().16b, \i2\().16b + DIFF_CLIP \i0, \t0, \d0, \diff, \t1, \t2 +.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 }; -- 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".