From patchwork Thu Jan 7 12:10:17 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Josh Dekker X-Patchwork-Id: 24828 Return-Path: X-Original-To: patchwork@ffaux-bg.ffmpeg.org Delivered-To: patchwork@ffaux-bg.ffmpeg.org Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by ffaux.localdomain (Postfix) with ESMTP id 14A0E44AF79 for ; Thu, 7 Jan 2021 14:10:35 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id E96E6689818; Thu, 7 Jan 2021 14:10:34 +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 6123D6880D7 for ; Thu, 7 Jan 2021 14:10:28 +0200 (EET) Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.west.internal (Postfix) with ESMTP id D60681773 for ; Thu, 7 Jan 2021 07:10:26 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Thu, 07 Jan 2021 07:10:26 -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=cjiSWAuSNKs6F bw5V95cw6baoGmSbeVigxxIZsPnwMs=; b=xpqqiIdFsFbAhNHCipp4/dZihdblx UIbubFoKsLrABFzJgMpECb21JzwzJCDRbfJZRHtA9Aw0jx88o5VgMRUSLWs2pA9j ZEwE8C6N/yEld10T3KRCbjCk3tNm65J6C2gvhReWdfEAG/e4dhk5v5e8qwzf6E6Q G76VjTuzNyeEblIRhl7EOl9/YjQspnoTGrjLm+t85Ceq+d0nlWhcukZCDY0G/GjB FDPDVRhQfZZ7XVVcbGjZgDkiL5XT92m4pNhDjIOCK3dT54iPVl25iFosQab+fua1 jbaTHzMmLVPiR3InoFjYvWl+9K695iT9tZV1TroArmdhJG+KK51s7mTTw== 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=cjiSWAuSNKs6Fbw5V95cw6baoGmSbeVigxxIZsPnwMs=; b=n4UUHHvm X2acXVJoh1jWegux68BaDgzKrQcCXyoZfG1dU/SAayKLlnZidei5yjPOXU667QQX sF53XHNcj2tFaAQXaFjyBh5/ooTe3Z5XLr3GNGwPBLGPfcVrgBq9Q2x5W4vllpku gz4kyBQvWbmlBJ1CXNV9yXF5h52jwbyCHHHlFolG8CwW9gSQVgOBVT3fRrHRjMoU hZ9CIAGlZZ63zkWgRdJxpRhU/IBIYRwwjLDP/N0H3Up8rGSsRMH2HPHBLEB4vPVK 00Zx24ZYyfJ+Ot4YZj6fviI86gcjkZQLsy/E9mgcZpXvEO6bvou9AvseteIVgESr MqgbBOLdDavAiQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedrvdegvddgfeeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvffufffkofgjfhgggfestdekre dtredttdenucfhrhhomheplfhoshhhucffvghkkhgvrhcuoehjohhshhesihhtrghnihhm uhhlrdhliheqnecuggftrfgrthhtvghrnhepgeduieeltdeltedugfegffehfefgudduhe ehgfejgeeuiedukedvtdejiefgheeunecuffhomhgrihhnpehnvghonhdrshgsnecukfhp peekkedrudeftddrgeekrddufeejnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrg hmpehmrghilhhfrhhomhepjhhoshhhsehithgrnhhimhhulhdrlhhi X-ME-Proxy: Received: from localhost.localdomain (mue-88-130-48-137.dsl.tropolys.de [88.130.48.137]) by mail.messagingengine.com (Postfix) with ESMTPA id 91F4524005D for ; Thu, 7 Jan 2021 07:10:25 -0500 (EST) From: Josh Dekker To: ffmpeg-devel@ffmpeg.org Date: Thu, 7 Jan 2021 13:10:17 +0100 Message-Id: <20210107121020.86179-2-josh@itanimul.li> X-Mailer: git-send-email 2.24.3 (Apple Git-128) In-Reply-To: <20210107121020.86179-1-josh@itanimul.li> References: <20210107121020.86179-1-josh@itanimul.li> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 1/4] lavc/aarch64: add HEVC add_residual NEON X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 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" Signed-off-by: Josh Dekker --- libavcodec/aarch64/Makefile | 2 + libavcodec/aarch64/hevcdsp_add_res_neon.S | 298 ++++++++++++++++++++++ libavcodec/aarch64/hevcdsp_init.c | 59 +++++ libavcodec/hevcdsp.c | 2 + libavcodec/hevcdsp.h | 1 + 5 files changed, 362 insertions(+) create mode 100644 libavcodec/aarch64/hevcdsp_add_res_neon.S create mode 100644 libavcodec/aarch64/hevcdsp_init.c diff --git a/libavcodec/aarch64/Makefile b/libavcodec/aarch64/Makefile index f6434e40da..4bdd554e7e 100644 --- a/libavcodec/aarch64/Makefile +++ b/libavcodec/aarch64/Makefile @@ -17,6 +17,7 @@ OBJS-$(CONFIG_VP8DSP) += aarch64/vp8dsp_init_aarch64.o OBJS-$(CONFIG_AAC_DECODER) += aarch64/aacpsdsp_init_aarch64.o \ aarch64/sbrdsp_init_aarch64.o OBJS-$(CONFIG_DCA_DECODER) += aarch64/synth_filter_init.o +OBJS-$(CONFIG_HEVC_DECODER) += aarch64/hevcdsp_init.o OBJS-$(CONFIG_OPUS_DECODER) += aarch64/opusdsp_init.o OBJS-$(CONFIG_RV40_DECODER) += aarch64/rv40dsp_init_aarch64.o OBJS-$(CONFIG_VC1DSP) += aarch64/vc1dsp_init_aarch64.o @@ -53,6 +54,7 @@ NEON-OBJS-$(CONFIG_VP8DSP) += aarch64/vp8dsp_neon.o # decoders/encoders NEON-OBJS-$(CONFIG_AAC_DECODER) += aarch64/aacpsdsp_neon.o NEON-OBJS-$(CONFIG_DCA_DECODER) += aarch64/synth_filter_neon.o +NEON-OBJS-$(CONFIG_HEVC_DECODER) += aarch64/hevcdsp_add_res_neon.o NEON-OBJS-$(CONFIG_OPUS_DECODER) += aarch64/opusdsp_neon.o NEON-OBJS-$(CONFIG_VORBIS_DECODER) += aarch64/vorbisdsp_neon.o NEON-OBJS-$(CONFIG_VP9_DECODER) += aarch64/vp9itxfm_16bpp_neon.o \ diff --git a/libavcodec/aarch64/hevcdsp_add_res_neon.S b/libavcodec/aarch64/hevcdsp_add_res_neon.S new file mode 100644 index 0000000000..4005366192 --- /dev/null +++ b/libavcodec/aarch64/hevcdsp_add_res_neon.S @@ -0,0 +1,298 @@ +/* -*-arm64-*- + * + * AArch64 NEON optimised add residual functions for HEVC decoding + * + * Copyright (c) 2020 Josh Dekker + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#include "libavutil/aarch64/asm.S" + +.macro clip10 in1, in2, c1, c2 + smax \in1, \in1, \c1 + smax \in2, \in2, \c1 + smin \in1, \in1, \c2 + smin \in2, \in2, \c2 +.endm + +function ff_hevc_add_residual_4x4_8_neon, export=1 + mov x3, x0 + ld1 {v0.S}[0], [x3], x2 + ld1 {v0.S}[1], [x3], x2 + ld1 {v1.S}[0], [x3], x2 + ld1 {v1.S}[1], [x3], x2 + ld1 { v2.8H-v3.8H}, [x1] + ushll v4.8H, v0.8B, #0 + ushll v5.8H, v1.8B, #0 + add v6.8H, v4.8H, v2.8H + add v7.8H, v5.8H, v3.8H + sqxtun v0.8B, v6.8H + sqxtun v1.8B, v7.8H + st1 {v0.S}[0], [x0], x2 + st1 {v0.S}[1], [x0], x2 + st1 {v1.S}[0], [x0], x2 + st1 {v1.S}[1], [x0], x2 + ret +endfunc + +function ff_hevc_add_residual_4x4_10_neon, export=1 + mov x3, x0 + movi v4.8H, #0 + mvni v5.8H, #0xFC, lsl #8 + ld1 {v0.D}[0], [x3], x2 + ld1 {v0.D}[1], [x3], x2 + ld1 {v1.D}[0], [x3], x2 + ld1 {v1.D}[1], [x3], x2 + ld1 { v2.8H-v3.8H}, [x1] + add v2.8H, v0.8H, v2.8H + add v3.8H, v1.8H, v3.8H + clip10 v2.8H, v3.8H, v4.8H, v5.8H + st1 {v2.D}[0], [x0], x2 + st1 {v2.D}[1], [x0], x2 + st1 {v3.D}[0], [x0], x2 + st1 {v3.D}[1], [x0], x2 + ret +endfunc + +function ff_hevc_add_residual_8x8_8_neon, export=1 + mov x3, x0 + ld1 {v0.8B}, [x3], x2 + ld1 {v1.8B}, [x3], x2 + ld1 {v2.8B}, [x3], x2 + ld1 {v3.8B}, [x3], x2 + ld1 {v4.8B}, [x3], x2 + ld1 {v5.8B}, [x3], x2 + ld1 {v6.8B}, [x3], x2 + ld1 {v7.8B}, [x3], x2 + ld1 { v16.8H-v19.8H}, [x1], #64 + ld1 { v20.8H-v23.8H}, [x1] + ushll v24.8H, v0.8B, #0 + ushll v25.8H, v1.8B, #0 + ushll v26.8H, v2.8B, #0 + ushll v27.8H, v3.8B, #0 + ushll v28.8H, v4.8B, #0 + ushll v29.8H, v5.8B, #0 + ushll v30.8H, v6.8B, #0 + ushll v31.8H, v7.8B, #0 + add v0.8H, v24.8H, v16.8H + add v1.8H, v25.8H, v17.8H + add v2.8H, v26.8H, v18.8H + add v3.8H, v27.8H, v19.8H + add v4.8H, v28.8H, v20.8H + add v5.8H, v29.8H, v21.8H + add v6.8H, v30.8H, v22.8H + add v7.8H, v31.8H, v23.8H + sqxtun v24.8B, v0.8H + sqxtun v25.8B, v1.8H + sqxtun v26.8B, v2.8H + sqxtun v27.8B, v3.8H + sqxtun v28.8B, v4.8H + sqxtun v29.8B, v5.8H + sqxtun v30.8B, v6.8H + sqxtun v31.8B, v7.8H + st1 {v24.8B}, [x0], x2 + st1 {v25.8B}, [x0], x2 + st1 {v26.8B}, [x0], x2 + st1 {v27.8B}, [x0], x2 + st1 {v28.8B}, [x0], x2 + st1 {v29.8B}, [x0], x2 + st1 {v30.8B}, [x0], x2 + st1 {v31.8B}, [x0], x2 + ret +endfunc + +function ff_hevc_add_residual_8x8_10_neon, export=1 + mov x3, x0 + movi v0.8H, #0 + mvni v1.8H, #0xFC, lsl #8 + ld1 {v24.8H}, [x3], x2 + ld1 {v25.8H}, [x3], x2 + ld1 {v26.8H}, [x3], x2 + ld1 {v27.8H}, [x3], x2 + ld1 {v28.8H}, [x3], x2 + ld1 {v29.8H}, [x3], x2 + ld1 {v30.8H}, [x3], x2 + ld1 {v31.8H}, [x3], x2 + ld1 {v16.8H-v19.8H}, [x1], #64 + ld1 {v20.8H-v23.8H}, [x1] + add v16.8H, v16.8H, v24.8H + add v17.8H, v17.8H, v25.8H + clip10 v16.8H, v17.8H, v0.8H, v1.8H + add v18.8H, v18.8H, v26.8H + add v19.8H, v19.8H, v27.8H + clip10 v18.8H, v19.8H, v0.8H, v1.8H + add v20.8H, v20.8H, v28.8H + add v21.8H, v21.8H, v29.8H + clip10 v20.8H, v21.8H, v0.8H, v1.8H + add v22.8H, v22.8H, v30.8H + add v23.8H, v23.8H, v31.8H + clip10 v22.8H, v23.8H, v0.8H, v1.8H + st1 {v16.8H}, [x0], x2 + st1 {v17.8H}, [x0], x2 + st1 {v18.8H}, [x0], x2 + st1 {v19.8H}, [x0], x2 + st1 {v20.8H}, [x0], x2 + st1 {v21.8H}, [x0], x2 + st1 {v22.8H}, [x0], x2 + st1 {v23.8H}, [x0], x2 + ret +endfunc + +function ff_hevc_add_residual_16x16_8_neon, export=1 + mov x3, x0 + mov x4, #4 +1: + subs x4, x4, #1 + ld1 { v0.8B- v1.8B}, [x3], x2 + ld1 { v2.8B- v3.8B}, [x3], x2 + ld1 { v4.8B- v5.8B}, [x3], x2 + ld1 { v6.8B- v7.8B}, [x3], x2 + ld1 {v16.8H-v19.8H}, [x1], #64 + ld1 {v20.8H-v23.8H}, [x1], #64 + ushll v24.8H, v0.8B, #0 + ushll v25.8H, v1.8B, #0 + ushll v26.8H, v2.8B, #0 + ushll v27.8H, v3.8B, #0 + ushll v28.8H, v4.8B, #0 + ushll v29.8H, v5.8B, #0 + ushll v30.8H, v6.8B, #0 + ushll v31.8H, v7.8B, #0 + add v0.8H, v24.8H, v16.8H + add v1.8H, v25.8H, v17.8H + add v2.8H, v26.8H, v18.8H + add v3.8H, v27.8H, v19.8H + add v4.8H, v28.8H, v20.8H + add v5.8H, v29.8H, v21.8H + add v6.8H, v30.8H, v22.8H + add v7.8H, v31.8H, v23.8H + sqxtun v24.8B, v0.8H + sqxtun v25.8B, v1.8H + sqxtun v26.8B, v2.8H + sqxtun v27.8B, v3.8H + sqxtun v28.8B, v4.8H + sqxtun v29.8B, v5.8H + sqxtun v30.8B, v6.8H + sqxtun v31.8B, v7.8H + st1 {v24.8B-v25.8B}, [x0], x2 + st1 {v26.8B-v27.8B}, [x0], x2 + st1 {v28.8B-v29.8B}, [x0], x2 + st1 {v30.8B-v31.8B}, [x0], x2 + b.ne 1b + ret +endfunc + +function ff_hevc_add_residual_16x16_10_neon, export=1 + mov x3, x0 + mov x4, #4 + movi v0.8H, #0 + mvni v1.8H, #0xFC, lsl #8 +1: + subs x4, x4, #1 + ld1 {v16.8H-v17.8H}, [x3], x2 + ld1 {v18.8H-v19.8H}, [x3], x2 + ld1 {v20.8H-v21.8H}, [x3], x2 + ld1 {v22.8H-v23.8H}, [x3], x2 + ld1 {v24.8H-v27.8H}, [x1], #64 + ld1 {v28.8H-v31.8H}, [x1], #64 + add v16.8H, v16.8H, v24.8H + add v17.8H, v17.8H, v25.8H + clip10 v16.8H, v17.8H, v0.8H, v1.8H + add v18.8H, v18.8H, v26.8H + add v19.8H, v19.8H, v27.8H + clip10 v18.8H, v19.8H, v0.8H, v1.8H + add v20.8H, v20.8H, v28.8H + add v21.8H, v21.8H, v29.8H + clip10 v20.8H, v21.8H, v0.8H, v1.8H + add v22.8H, v22.8H, v30.8H + add v23.8H, v23.8H, v31.8H + clip10 v22.8H, v23.8H, v0.8H, v1.8H + st1 {v16.8H-v17.8H}, [x0], x2 + st1 {v18.8H-v19.8H}, [x0], x2 + st1 {v20.8H-v21.8H}, [x0], x2 + st1 {v22.8H-v23.8H}, [x0], x2 + b.ne 1b + ret +endfunc + +function ff_hevc_add_residual_32x32_8_neon, export=1 + mov x3, x0 + mov x4, #16 +1: + subs x4, x4, #1 + ld1 { v0.8B- v3.8B}, [x3], x2 + ld1 { v4.8B- v7.8B}, [x3], x2 + ld1 {v16.8H-v19.8H}, [x1], #64 + ld1 {v20.8H-v23.8H}, [x1], #64 + ushll v24.8H, v0.8B, #0 + ushll v25.8H, v1.8B, #0 + ushll v26.8H, v2.8B, #0 + ushll v27.8H, v3.8B, #0 + ushll v28.8H, v4.8B, #0 + ushll v29.8H, v5.8B, #0 + ushll v30.8H, v6.8B, #0 + ushll v31.8H, v7.8B, #0 + add v0.8H, v24.8H, v16.8H + add v1.8H, v25.8H, v17.8H + add v2.8H, v26.8H, v18.8H + add v3.8H, v27.8H, v19.8H + add v4.8H, v28.8H, v20.8H + add v5.8H, v29.8H, v21.8H + add v6.8H, v30.8H, v22.8H + add v7.8H, v31.8H, v23.8H + sqxtun v24.8B, v0.8H + sqxtun v25.8B, v1.8H + sqxtun v26.8B, v2.8H + sqxtun v27.8B, v3.8H + sqxtun v28.8B, v4.8H + sqxtun v29.8B, v5.8H + sqxtun v30.8B, v6.8H + sqxtun v31.8B, v7.8H + st1 {v24.8B-v27.8B}, [x0], x2 + st1 {v28.8B-v31.8B}, [x0], x2 + b.ne 1b + ret +endfunc + +function ff_hevc_add_residual_32x32_10_neon, export=1 + mov x3, x0 + mov x4, #16 + movi v0.8H, #0 + mvni v1.8H, #0xFC, lsl #8 +1: + subs x4, x4, #1 + ld1 {v16.8H-v19.8H}, [x3], x2 + ld1 {v20.8H-v23.8H}, [x3], x2 + ld1 {v24.8H-v27.8H}, [x1], #64 + ld1 {v28.8H-v31.8H}, [x1], #64 + add v16.8H, v16.8H, v24.8H + add v17.8H, v17.8H, v25.8H + clip10 v16.8H, v17.8H, v0.8H, v1.8H + add v18.8H, v18.8H, v26.8H + add v19.8H, v19.8H, v27.8H + clip10 v18.8H, v19.8H, v0.8H, v1.8H + add v20.8H, v20.8H, v28.8H + add v21.8H, v21.8H, v29.8H + clip10 v20.8H, v21.8H, v0.8H, v1.8H + add v22.8H, v22.8H, v30.8H + add v23.8H, v23.8H, v31.8H + clip10 v22.8H, v23.8H, v0.8H, v1.8H + st1 {v16.8H-v19.8H}, [x0], x2 + st1 {v20.8H-v23.8H}, [x0], x2 + b.ne 1b + ret +endfunc diff --git a/libavcodec/aarch64/hevcdsp_init.c b/libavcodec/aarch64/hevcdsp_init.c new file mode 100644 index 0000000000..f0a617ab39 --- /dev/null +++ b/libavcodec/aarch64/hevcdsp_init.c @@ -0,0 +1,59 @@ +/* + * Copyright (c) 2014 Seppo Tomperi + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#include "libavutil/attributes.h" +#include "libavutil/aarch64/cpu.h" +#include "libavcodec/hevcdsp.h" +#include "libavcodec/avcodec.h" + +void ff_hevc_add_residual_4x4_8_neon(uint8_t *_dst, int16_t *coeffs, + ptrdiff_t stride); +void ff_hevc_add_residual_4x4_10_neon(uint8_t *_dst, int16_t *coeffs, + ptrdiff_t stride); +void ff_hevc_add_residual_8x8_8_neon(uint8_t *_dst, int16_t *coeffs, + ptrdiff_t stride); +void ff_hevc_add_residual_8x8_10_neon(uint8_t *_dst, int16_t *coeffs, + ptrdiff_t stride); +void ff_hevc_add_residual_16x16_8_neon(uint8_t *_dst, int16_t *coeffs, + ptrdiff_t stride); +void ff_hevc_add_residual_16x16_10_neon(uint8_t *_dst, int16_t *coeffs, + ptrdiff_t stride); +void ff_hevc_add_residual_32x32_8_neon(uint8_t *_dst, int16_t *coeffs, + ptrdiff_t stride); +void ff_hevc_add_residual_32x32_10_neon(uint8_t *_dst, int16_t *coeffs, + ptrdiff_t stride); + +av_cold void ff_hevc_dsp_init_aarch64(HEVCDSPContext *c, const int bit_depth) +{ + int cpu_flags = av_get_cpu_flags(); + if (have_neon(cpu_flags) && bit_depth == 8) { + c->add_residual[0] = ff_hevc_add_residual_4x4_8_neon; + c->add_residual[1] = ff_hevc_add_residual_8x8_8_neon; + c->add_residual[2] = ff_hevc_add_residual_16x16_8_neon; + c->add_residual[3] = ff_hevc_add_residual_32x32_8_neon; + } + + if (have_neon(cpu_flags) && bit_depth == 10) { + c->add_residual[0] = ff_hevc_add_residual_4x4_10_neon; + c->add_residual[1] = ff_hevc_add_residual_8x8_10_neon; + c->add_residual[2] = ff_hevc_add_residual_16x16_10_neon; + c->add_residual[3] = ff_hevc_add_residual_32x32_10_neon; + } +} diff --git a/libavcodec/hevcdsp.c b/libavcodec/hevcdsp.c index 957e40d5ff..fe272ac1ce 100644 --- a/libavcodec/hevcdsp.c +++ b/libavcodec/hevcdsp.c @@ -257,6 +257,8 @@ int i = 0; break; } + if (ARCH_AARCH64) + ff_hevc_dsp_init_aarch64(hevcdsp, bit_depth); if (ARCH_ARM) ff_hevc_dsp_init_arm(hevcdsp, bit_depth); if (ARCH_PPC) diff --git a/libavcodec/hevcdsp.h b/libavcodec/hevcdsp.h index c605a343d6..0e013a8328 100644 --- a/libavcodec/hevcdsp.h +++ b/libavcodec/hevcdsp.h @@ -129,6 +129,7 @@ void ff_hevc_dsp_init(HEVCDSPContext *hpc, int bit_depth); extern const int8_t ff_hevc_epel_filters[7][4]; extern const int8_t ff_hevc_qpel_filters[3][16]; +void ff_hevc_dsp_init_aarch64(HEVCDSPContext *c, const int bit_depth); void ff_hevc_dsp_init_arm(HEVCDSPContext *c, const int bit_depth); void ff_hevc_dsp_init_ppc(HEVCDSPContext *c, const int bit_depth); void ff_hevc_dsp_init_x86(HEVCDSPContext *c, const int bit_depth);