From patchwork Tue Jan 4 05:20:16 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "J. Dekker" X-Patchwork-Id: 33043 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:cd86:0:0:0:0:0 with SMTP id d128csp16692249iog; Mon, 3 Jan 2022 21:21:11 -0800 (PST) X-Google-Smtp-Source: ABdhPJzPgSs+OGQI99cSPsOwbNxtiYSiQknoik0U20Fn/840qkLrpjf8eVkbLKqXQVb2DpTeNXW0 X-Received: by 2002:aa7:d64e:: with SMTP id v14mr47807590edr.194.1641273671613; Mon, 03 Jan 2022 21:21:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1641273671; cv=none; d=google.com; s=arc-20160816; b=DG2y10JXnPlvlS0+kXh3gdpSNkdjyCbvQ2s8MUMDD2r3IG2CQDAVw1TCb6U4j1VaF8 bMChCdGCX1dpXSr1KUrSxE3wrTTseuvDkmJlDh8NpsCB39NZWM4UYHoFYZzVCUnYnKZj eQaaqUDAerOPIx5cRjG3Z1HxYX9Kfnf6f15an94+HF0w+dNOEHRlfh0rSA5VFGLCRrOB bvWWsUNlwWYWh7Gmr7ATt+DL8/QQ1wQ31hnol9J0rdgbTkIcBUhFhcVaKlYy2fmvNjQP 4zcqqNuK55xLvsZB6PtYiJ0IJmXza6iCleOAj4w7C6p2ZBttnpSt/BD4WkrErm+qx8XH WpBQ== 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:references:in-reply-to:message-id :date:to:from:dkim-signature:dkim-signature:delivered-to; bh=kwgmlCAVVfUONCzrkXc0lVu42UpetWAx40DG4DXCAsw=; b=z9yrthpq3tTEHXGvRvl4+8CI8tdwiSvGRkeKb/dpJNC736WOyM4SfpLWXeY1Hm8yQT 5rKrhS19UsvTj/eOvfYJmm/YR3aLIYYCJGHMA080Prx309kNl/k01/psaaNSm0wcfKkf aoZ5wb6kLlw4Hm46D/yLWr4FIbfhkH1kUDrZDWroYH+MLUcUfoiogwC+PWw+WoCVxvUH BCZ6sqB40GMlJ0hwG4ddUvRO3i8aWoIM1MQk6vqOPUYuTF8d31kWYLMaTFhxRLOwi1wj jVi/33GyPezTZdwDYuQQ7JgXQWXwuV10XTnIeALfItEQOtJ5SVvVMOAu5wGWDA0C8e4X qyyg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@itanimul.li header.s=fm3 header.b=eVAcw+gf; dkim=neutral (body hash did not verify) header.i=@messagingengine.com header.s=fm1 header.b=JVone+Zw; 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 o17si7551292edf.383.2022.01.03.21.21.11; Mon, 03 Jan 2022 21:21:11 -0800 (PST) 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=@itanimul.li header.s=fm3 header.b=eVAcw+gf; dkim=neutral (body hash did not verify) header.i=@messagingengine.com header.s=fm1 header.b=JVone+Zw; 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 06C4A68B219; Tue, 4 Jan 2022 07:20:37 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from wout3-smtp.messagingengine.com (wout3-smtp.messagingengine.com [64.147.123.19]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 02EF168B22C for ; Tue, 4 Jan 2022 07:20:30 +0200 (EET) Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.west.internal (Postfix) with ESMTP id 54FD93201F18 for ; Tue, 4 Jan 2022 00:20:28 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute3.internal (MEProxy); Tue, 04 Jan 2022 00:20:28 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=itanimul.li; h= from:to:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; s=fm3; bh=WTcuqIK9tjG0L SumyHJSTKk3CNoRWiepBzdl95IvA94=; b=eVAcw+gfqwR58UhQPtafAjwTq8DZ6 fxLwvFYs6NoIykkCAndLST84oJ0OmpS2B1sngz7JBJuGp+8dNYilma1U2CT1aI60 qdj1xz3U9Rvk15iAYxPqX1lDqGMqSXmcqN3Xt9BPuMmYvdjV156x/iQr8ljjZNF9 iCy4Bll48RjwN5kR61OdnGAhhsL6aCysvmus99J0LTU3ySdQzrJSsqGi3d0Fqf/M 4QtbbYzVMg5nBYC6fDLPR+pWtKUaObp+iVLCbmjQwLPHpw+OCz5WEwV7wlHU6Oxi x3Ljdlt2OV29ySJ8S4naJgz+hKhL/UqxteFSbTqhhXSZj4qi5DJJN0SFw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:date:from :in-reply-to:message-id:mime-version:references:subject:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; bh=WTcuqIK9tjG0LSumyHJSTKk3CNoRWiepBzdl95IvA94=; b=JVone+Zw +hU/ak3YvD+kGjANfe6XPsnHmw98OnAuNCfDpSQNq56n1U0FNxVQBaMtoEoIH1i4 wKy8OVxbZtLgcHu3NK5PJkSjB3fO8Hyvt2tkMuGTtNPfyn+sBhAHZ/gXXwse9MoI Z9FoBhDP/TL+TVlrJ6NZpYC4FdBxt/31HBPriNAE9OhYK1Ef1LSP9cZBNnKnxZwC ucQXsYwROj4nJPu0wRd0sp8s2HGm0ViPI/GMiPJJwlWf718hwnsLoYiNC5gaW/eL Mcl0UkGRRyFi5nBR1jKzdFzCnrzeLSV3w6yQi7zrJleOemM0kU+PsH4xFXifT5wz ofc7jTDji14tPw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvuddrudefvddgjeelucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvffufffkofgjfhgggfestdekre dtredttdenucfhrhhomhepfdflrdcuffgvkhhkvghrfdcuoehjuggvkhesihhtrghnihhm uhhlrdhliheqnecuggftrfgrthhtvghrnhephfdvfeejffegffefieefvefgheeuudelhe fhffevtddthfehudeitdetfeehieetnecuffhomhgrihhnpehnvghonhdrshgsnecuvehl uhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepjhguvghksehith grnhhimhhulhdrlhhi X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA for ; Tue, 4 Jan 2022 00:20:26 -0500 (EST) From: "J. Dekker" To: ffmpeg-devel@ffmpeg.org Date: Tue, 4 Jan 2022 06:20:16 +0100 Message-Id: <20220104052018.9541-4-jdek@itanimul.li> X-Mailer: git-send-email 2.32.0 (Apple Git-132) In-Reply-To: <20220104052018.9541-1-jdek@itanimul.li> References: <20220104052018.9541-1-jdek@itanimul.li> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH v3 4/6] lavc/aarch64: add hevc sao edge 8x8 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: UYHNa9oBlzkA bench on AWS Graviton: hevc_sao_edge_8x8_8_c: 516.0 hevc_sao_edge_8x8_8_neon: 81.0 Signed-off-by: J. Dekker --- libavcodec/aarch64/hevcdsp_init_aarch64.c | 3 ++ libavcodec/aarch64/hevcdsp_sao_neon.S | 51 +++++++++++++++++++++++ 2 files changed, 54 insertions(+) diff --git a/libavcodec/aarch64/hevcdsp_init_aarch64.c b/libavcodec/aarch64/hevcdsp_init_aarch64.c index 747ff0412d..b93cec9e44 100644 --- a/libavcodec/aarch64/hevcdsp_init_aarch64.c +++ b/libavcodec/aarch64/hevcdsp_init_aarch64.c @@ -59,6 +59,8 @@ void ff_hevc_sao_band_filter_8x8_8_neon(uint8_t *_dst, uint8_t *_src, int width, int height); void ff_hevc_sao_edge_filter_16x16_8_neon(uint8_t *dst, uint8_t *src, ptrdiff_t stride_dst, int16_t *sao_offset_val, int eo, int width, int height); +void ff_hevc_sao_edge_filter_8x8_8_neon(uint8_t *dst, uint8_t *src, ptrdiff_t stride_dst, + int16_t *sao_offset_val, int eo, int width, int height); av_cold void ff_hevc_dsp_init_aarch64(HEVCDSPContext *c, const int bit_depth) { @@ -76,6 +78,7 @@ av_cold void ff_hevc_dsp_init_aarch64(HEVCDSPContext *c, const int bit_depth) c->idct_dc[2] = ff_hevc_idct_16x16_dc_8_neon; c->idct_dc[3] = ff_hevc_idct_32x32_dc_8_neon; c->sao_band_filter[0] = ff_hevc_sao_band_filter_8x8_8_neon; + c->sao_edge_filter[0] = ff_hevc_sao_edge_filter_8x8_8_neon; c->sao_edge_filter[1] = c->sao_edge_filter[2] = c->sao_edge_filter[3] = diff --git a/libavcodec/aarch64/hevcdsp_sao_neon.S b/libavcodec/aarch64/hevcdsp_sao_neon.S index 4b895959d8..167b9676d8 100644 --- a/libavcodec/aarch64/hevcdsp_sao_neon.S +++ b/libavcodec/aarch64/hevcdsp_sao_neon.S @@ -150,3 +150,54 @@ function ff_hevc_sao_edge_filter_16x16_8_neon, export=1 // no lines to filter ret endfunc + +// ff_hevc_sao_edge_filter_8x8_8_neon(char *dst, char *src, ptrdiff stride_dst, +// int16 *sao_offset_val, int eo, int width, int height) +function ff_hevc_sao_edge_filter_8x8_8_neon, export=1 + adr x7, .Lsao_edge_pos + ldr w4, [x7, w4, uxtw #2] + ld1 {v3.8h}, [x3] + mov v3.h[7], v3.h[0] + mov v3.h[0], v3.h[1] + mov v3.h[1], v3.h[2] + mov v3.h[2], v3.h[7] + uzp2 v1.16b, v3.16b, v3.16b + uzp1 v0.16b, v3.16b, v3.16b + movi v2.16b, #2 + add x16, x0, x2 + lsl x2, x2, #1 + mov x15, #192 + mov x8, x1 + sub x9, x1, x4 + add x10, x1, x4 + mov x17, #4 +1: ld1 {v3.d}[0], [ x8], x15 + ld1 {v4.d}[0], [ x9], x15 + ld1 {v5.d}[0], [x10], x15 + ld1 {v3.d}[1], [ x8], x15 + ld1 {v4.d}[1], [ x9], x15 + ld1 {v5.d}[1], [x10], x15 + cmhi v16.16b, v4.16b, v3.16b + cmhi v17.16b, v3.16b, v4.16b + cmhi v18.16b, v5.16b, v3.16b + cmhi v19.16b, v3.16b, v5.16b + sub v20.16b, v16.16b, v17.16b + sub v21.16b, v18.16b, v19.16b + add v20.16b, v20.16b, v21.16b + add v20.16b, v20.16b, v2.16b + tbl v16.16b, {v0.16b}, v20.16b + tbl v17.16b, {v1.16b}, v20.16b + uxtl v20.8h, v3.8b + uxtl2 v21.8h, v3.16b + zip1 v18.16b, v16.16b, v17.16b + zip2 v19.16b, v16.16b, v17.16b + sqadd v20.8h, v18.8h, v20.8h + sqadd v21.8h, v19.8h, v21.8h + sqxtun v6.8b, v20.8h + sqxtun v7.8b, v21.8h + st1 {v6.8b}, [ x0], x2 + st1 {v7.8b}, [x16], x2 + subs x17, x17, #1 + b.ne 1b + ret +endfunc