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 4D1AE4A21E for ; Mon, 25 Mar 2024 15:04:29 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 194BA68D5E2; Mon, 25 Mar 2024 17:03:04 +0200 (EET) Received: from mail-lf1-f53.google.com (mail-lf1-f53.google.com [209.85.167.53]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id CEFD768D53E for ; Mon, 25 Mar 2024 17:02:54 +0200 (EET) Received: by mail-lf1-f53.google.com with SMTP id 2adb3069b0e04-515a81928a1so2218670e87.3 for ; Mon, 25 Mar 2024 08:02:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=martin-st.20230601.gappssmtp.com; s=20230601; t=1711378974; x=1711983774; darn=ffmpeg.org; 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=OQ57nMlKqPDOgMkCpmRRJYHPshFMVnxK4oI60w4opw4=; b=OZDhbnkvw+2jLisgWkZATvhFup4zEJ2o0vOu0r+eyQbLegPzhZhKxkuIb46JdJWfMr YXHLAmZLKFoGGtK49A5Smg8iDJJRftVnTT04jStytLSQOYSz1viHyWqAr0ev+a439fL7 gY7xatOc4r6sDKuV8uszYfyHZ1uISKMSH/JzvSEttkQNfX8H7+pWV5v0+BfowUwvlkBQ g4XV1mBOBN6UYci/Pr1SMkg1fUkuh1+1R3vHHcvJ/C9Cyb9O+JgelltUn7+JGDgAFplm rGiQKB4IGFeZ1coryXiTRrj7xDzBPNJdt/mdZkJO3Y9R6ajhBobp9nK/K1HQhACJDMp2 sfkw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711378974; x=1711983774; 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=OQ57nMlKqPDOgMkCpmRRJYHPshFMVnxK4oI60w4opw4=; b=E1xXjJ5NhmjqzhsqNKf1otenhg9XEj8Y31GwbIeUpmhRCc3R/GUAqNv7lyJVOLHcxe bVswnXKtKYO5ysWMzpw/EybAKF3GlzHCh1dPuCmAmHiYabJgZQ5OwzTPMUXuPzOwHYaV O+zww7xs4TAN4Te2SJD7UFYSzx+FWvBlQediwdpSZ7e6UnnxTz82BXo4BwYtAb35szL7 etePrdJcBJZhw6K3jADKPpcCzxjH6/c0c0/up0H3VJX86EZmvMLfBIa0ivj24DQZW4JU GfuCNMAjGYhLWQrdeGDb8OLyj016wPw68k/Vh3Zpr5PcfUh+86m8CAfP6SVgp4cPQbyq CEdA== X-Gm-Message-State: AOJu0YwYeLNC165977Agwx3MWqghOVJii4e0srmkpTginO2BYlrOYvLh +7HTwmcuKO4KUTlfFIiCXZGC5HSn5dgMrzZTyG0CWm3+sBQHTEiwOb0k441aqilzqV5wNLgp8i3 +S+C9 X-Google-Smtp-Source: AGHT+IEa1ReH94Twlj2WLCZNrFKDn9lw+p26kY0Iuon9qiNsBcqocwvcqoLWgN+DKcFq7LT5VQj5ZA== X-Received: by 2002:a19:e04b:0:b0:513:cf77:48c5 with SMTP id g11-20020a19e04b000000b00513cf7748c5mr5629991lfj.38.1711378973843; Mon, 25 Mar 2024 08:02:53 -0700 (PDT) Received: from localhost (host-114-191.parnet.fi. [77.234.114.191]) by smtp.gmail.com with ESMTPSA id a20-20020ac25214000000b005128cf5b323sm1102156lfl.251.2024.03.25.08.02.53 (version=TLS1 cipher=AES128-SHA bits=128/128); Mon, 25 Mar 2024 08:02:53 -0700 (PDT) From: =?UTF-8?q?Martin=20Storsj=C3=B6?= To: ffmpeg-devel@ffmpeg.org Date: Mon, 25 Mar 2024 17:02:34 +0200 Message-Id: <20240325150243.59058-13-martin@martin.st> X-Mailer: git-send-email 2.39.3 (Apple Git-146) In-Reply-To: <20240325150243.59058-1-martin@martin.st> References: <20240325150243.59058-1-martin@martin.st> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 12/21] aarch64: hevc: Produce epel_uni_w_hv functions for both neon and i8mm 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: Logan Lyu , "J . Dekker" 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: AWS Graviton 3: put_hevc_epel_uni_w_hv4_8_c: 191.2 put_hevc_epel_uni_w_hv4_8_neon: 87.7 put_hevc_epel_uni_w_hv4_8_i8mm: 83.2 put_hevc_epel_uni_w_hv6_8_c: 349.5 put_hevc_epel_uni_w_hv6_8_neon: 153.0 put_hevc_epel_uni_w_hv6_8_i8mm: 148.5 put_hevc_epel_uni_w_hv8_8_c: 581.2 put_hevc_epel_uni_w_hv8_8_neon: 166.7 put_hevc_epel_uni_w_hv8_8_i8mm: 163.5 put_hevc_epel_uni_w_hv12_8_c: 1230.0 put_hevc_epel_uni_w_hv12_8_neon: 387.7 put_hevc_epel_uni_w_hv12_8_i8mm: 370.2 put_hevc_epel_uni_w_hv16_8_c: 2003.2 put_hevc_epel_uni_w_hv16_8_neon: 501.5 put_hevc_epel_uni_w_hv16_8_i8mm: 490.2 put_hevc_epel_uni_w_hv24_8_c: 4448.7 put_hevc_epel_uni_w_hv24_8_neon: 1092.2 put_hevc_epel_uni_w_hv24_8_i8mm: 1069.7 put_hevc_epel_uni_w_hv32_8_c: 7817.2 put_hevc_epel_uni_w_hv32_8_neon: 1916.2 put_hevc_epel_uni_w_hv32_8_i8mm: 1829.5 put_hevc_epel_uni_w_hv48_8_c: 16728.2 put_hevc_epel_uni_w_hv48_8_neon: 4263.7 put_hevc_epel_uni_w_hv48_8_i8mm: 4342.7 put_hevc_epel_uni_w_hv64_8_c: 29563.2 put_hevc_epel_uni_w_hv64_8_neon: 7474.2 put_hevc_epel_uni_w_hv64_8_i8mm: 7128.5 --- libavcodec/aarch64/hevcdsp_epel_neon.S | 55 ++++++++++++----------- libavcodec/aarch64/hevcdsp_init_aarch64.c | 6 +++ 2 files changed, 36 insertions(+), 25 deletions(-) diff --git a/libavcodec/aarch64/hevcdsp_epel_neon.S b/libavcodec/aarch64/hevcdsp_epel_neon.S index 876db9d449..d0c6205e1c 100644 --- a/libavcodec/aarch64/hevcdsp_epel_neon.S +++ b/libavcodec/aarch64/hevcdsp_epel_neon.S @@ -3573,10 +3573,8 @@ function hevc_put_hevc_epel_uni_w_hv24_8_end_neon ret endfunc -#if HAVE_I8MM -ENABLE_I8MM - -function ff_hevc_put_hevc_epel_uni_w_hv4_8_neon_i8mm, export=1 +.macro epel_uni_w_hv suffix +function ff_hevc_put_hevc_epel_uni_w_hv4_8_\suffix, export=1 epel_uni_w_hv_start sxtw x4, w4 @@ -3591,14 +3589,14 @@ function ff_hevc_put_hevc_epel_uni_w_hv4_8_neon_i8mm, export=1 mov x2, x3 add x3, x4, #3 mov x4, x5 - bl X(ff_hevc_put_hevc_epel_h4_8_neon_i8mm) + bl X(ff_hevc_put_hevc_epel_h4_8_\suffix) ldp x4, x6, [sp, #16] ldp x0, x1, [sp, #32] ldr x30, [sp], #48 b hevc_put_hevc_epel_uni_w_hv4_8_end_neon endfunc -function ff_hevc_put_hevc_epel_uni_w_hv6_8_neon_i8mm, export=1 +function ff_hevc_put_hevc_epel_uni_w_hv6_8_\suffix, export=1 epel_uni_w_hv_start sxtw x4, w4 @@ -3613,14 +3611,14 @@ function ff_hevc_put_hevc_epel_uni_w_hv6_8_neon_i8mm, export=1 mov x2, x3 add x3, x4, #3 mov x4, x5 - bl X(ff_hevc_put_hevc_epel_h6_8_neon_i8mm) + bl X(ff_hevc_put_hevc_epel_h6_8_\suffix) ldp x4, x6, [sp, #16] ldp x0, x1, [sp, #32] ldr x30, [sp], #48 b hevc_put_hevc_epel_uni_w_hv6_8_end_neon endfunc -function ff_hevc_put_hevc_epel_uni_w_hv8_8_neon_i8mm, export=1 +function ff_hevc_put_hevc_epel_uni_w_hv8_8_\suffix, export=1 epel_uni_w_hv_start sxtw x4, w4 @@ -3635,14 +3633,14 @@ function ff_hevc_put_hevc_epel_uni_w_hv8_8_neon_i8mm, export=1 mov x2, x3 add x3, x4, #3 mov x4, x5 - bl X(ff_hevc_put_hevc_epel_h8_8_neon_i8mm) + bl X(ff_hevc_put_hevc_epel_h8_8_\suffix) ldp x4, x6, [sp, #16] ldp x0, x1, [sp, #32] ldr x30, [sp], #48 b hevc_put_hevc_epel_uni_w_hv8_8_end_neon endfunc -function ff_hevc_put_hevc_epel_uni_w_hv12_8_neon_i8mm, export=1 +function ff_hevc_put_hevc_epel_uni_w_hv12_8_\suffix, export=1 epel_uni_w_hv_start sxtw x4, w4 @@ -3657,14 +3655,14 @@ function ff_hevc_put_hevc_epel_uni_w_hv12_8_neon_i8mm, export=1 mov x2, x3 add x3, x4, #3 mov x4, x5 - bl X(ff_hevc_put_hevc_epel_h12_8_neon_i8mm) + bl X(ff_hevc_put_hevc_epel_h12_8_\suffix) ldp x4, x6, [sp, #16] ldp x0, x1, [sp, #32] ldr x30, [sp], #48 b hevc_put_hevc_epel_uni_w_hv12_8_end_neon endfunc -function ff_hevc_put_hevc_epel_uni_w_hv16_8_neon_i8mm, export=1 +function ff_hevc_put_hevc_epel_uni_w_hv16_8_\suffix, export=1 epel_uni_w_hv_start sxtw x4, w4 @@ -3679,14 +3677,14 @@ function ff_hevc_put_hevc_epel_uni_w_hv16_8_neon_i8mm, export=1 mov x2, x3 add x3, x4, #3 mov x4, x5 - bl X(ff_hevc_put_hevc_epel_h16_8_neon_i8mm) + bl X(ff_hevc_put_hevc_epel_h16_8_\suffix) ldp x4, x6, [sp, #16] ldp x0, x1, [sp, #32] ldr x30, [sp], #48 b hevc_put_hevc_epel_uni_w_hv16_8_end_neon endfunc -function ff_hevc_put_hevc_epel_uni_w_hv24_8_neon_i8mm, export=1 +function ff_hevc_put_hevc_epel_uni_w_hv24_8_\suffix, export=1 epel_uni_w_hv_start sxtw x4, w4 @@ -3701,14 +3699,14 @@ function ff_hevc_put_hevc_epel_uni_w_hv24_8_neon_i8mm, export=1 mov x2, x3 add x3, x4, #3 mov x4, x5 - bl X(ff_hevc_put_hevc_epel_h24_8_neon_i8mm) + bl X(ff_hevc_put_hevc_epel_h24_8_\suffix) ldp x4, x6, [sp, #16] ldp x0, x1, [sp, #32] ldr x30, [sp], #48 b hevc_put_hevc_epel_uni_w_hv24_8_end_neon endfunc -function ff_hevc_put_hevc_epel_uni_w_hv32_8_neon_i8mm, export=1 +function ff_hevc_put_hevc_epel_uni_w_hv32_8_\suffix, export=1 ldp x15, x16, [sp] mov x17, #16 stp x15, x16, [sp, #-96]! @@ -3718,7 +3716,7 @@ function ff_hevc_put_hevc_epel_uni_w_hv32_8_neon_i8mm, export=1 stp x5, x6, [sp, #64] stp x17, x7, [sp, #80] - bl X(ff_hevc_put_hevc_epel_uni_w_hv16_8_neon_i8mm) + bl X(ff_hevc_put_hevc_epel_uni_w_hv16_8_\suffix) ldp x0, x30, [sp, #16] ldp x1, x2, [sp, #32] ldp x3, x4, [sp, #48] @@ -3730,13 +3728,13 @@ function ff_hevc_put_hevc_epel_uni_w_hv32_8_neon_i8mm, export=1 mov x17, #16 stp x15, x16, [sp, #-32]! stp x17, x30, [sp, #16] - bl X(ff_hevc_put_hevc_epel_uni_w_hv16_8_neon_i8mm) + bl X(ff_hevc_put_hevc_epel_uni_w_hv16_8_\suffix) ldp x17, x30, [sp, #16] ldp x15, x16, [sp], #32 ret endfunc -function ff_hevc_put_hevc_epel_uni_w_hv48_8_neon_i8mm, export=1 +function ff_hevc_put_hevc_epel_uni_w_hv48_8_\suffix, export=1 ldp x15, x16, [sp] mov x17, #24 stp x15, x16, [sp, #-96]! @@ -3745,7 +3743,7 @@ function ff_hevc_put_hevc_epel_uni_w_hv48_8_neon_i8mm, export=1 stp x3, x4, [sp, #48] stp x5, x6, [sp, #64] stp x17, x7, [sp, #80] - bl X(ff_hevc_put_hevc_epel_uni_w_hv24_8_neon_i8mm) + bl X(ff_hevc_put_hevc_epel_uni_w_hv24_8_\suffix) ldp x0, x30, [sp, #16] ldp x1, x2, [sp, #32] ldp x3, x4, [sp, #48] @@ -3757,13 +3755,13 @@ function ff_hevc_put_hevc_epel_uni_w_hv48_8_neon_i8mm, export=1 mov x17, #24 stp x15, x16, [sp, #-32]! stp x17, x30, [sp, #16] - bl X(ff_hevc_put_hevc_epel_uni_w_hv24_8_neon_i8mm) + bl X(ff_hevc_put_hevc_epel_uni_w_hv24_8_\suffix) ldp x17, x30, [sp, #16] ldp x15, x16, [sp], #32 ret endfunc -function ff_hevc_put_hevc_epel_uni_w_hv64_8_neon_i8mm, export=1 +function ff_hevc_put_hevc_epel_uni_w_hv64_8_\suffix, export=1 ldp x15, x16, [sp] mov x17, #32 stp x15, x16, [sp, #-96]! @@ -3773,7 +3771,7 @@ function ff_hevc_put_hevc_epel_uni_w_hv64_8_neon_i8mm, export=1 stp x5, x6, [sp, #64] stp x17, x7, [sp, #80] - bl X(ff_hevc_put_hevc_epel_uni_w_hv32_8_neon_i8mm) + bl X(ff_hevc_put_hevc_epel_uni_w_hv32_8_\suffix) ldp x0, x30, [sp, #16] ldp x1, x2, [sp, #32] ldp x3, x4, [sp, #48] @@ -3785,16 +3783,23 @@ function ff_hevc_put_hevc_epel_uni_w_hv64_8_neon_i8mm, export=1 mov x17, #32 stp x15, x16, [sp, #-32]! stp x17, x30, [sp, #16] - bl X(ff_hevc_put_hevc_epel_uni_w_hv32_8_neon_i8mm) + bl X(ff_hevc_put_hevc_epel_uni_w_hv32_8_\suffix) ldp x17, x30, [sp, #16] ldp x15, x16, [sp], #32 ret endfunc +.endm + +epel_uni_w_hv neon + +#if HAVE_I8MM +ENABLE_I8MM + +epel_uni_w_hv neon_i8mm DISABLE_I8MM #endif - function hevc_put_hevc_epel_bi_hv4_8_end_neon load_epel_filterh x7, x6 mov x10, #(MAX_PB_SIZE * 2) diff --git a/libavcodec/aarch64/hevcdsp_init_aarch64.c b/libavcodec/aarch64/hevcdsp_init_aarch64.c index 447ae80bfb..948103aa09 100644 --- a/libavcodec/aarch64/hevcdsp_init_aarch64.c +++ b/libavcodec/aarch64/hevcdsp_init_aarch64.c @@ -278,6 +278,11 @@ NEON8_FNPROTO(qpel_uni_w_h, (uint8_t *_dst, ptrdiff_t _dststride, int height, int denom, int wx, int ox, intptr_t mx, intptr_t my, int width), _i8mm); +NEON8_FNPROTO(epel_uni_w_hv, (uint8_t *_dst, ptrdiff_t _dststride, + const uint8_t *_src, ptrdiff_t _srcstride, + int height, int denom, int wx, int ox, + intptr_t mx, intptr_t my, int width),); + NEON8_FNPROTO(epel_uni_w_hv, (uint8_t *_dst, ptrdiff_t _dststride, const uint8_t *_src, ptrdiff_t _srcstride, int height, int denom, int wx, int ox, @@ -417,6 +422,7 @@ av_cold void ff_hevc_dsp_init_aarch64(HEVCDSPContext *c, const int bit_depth) NEON8_FNASSIGN(c->put_hevc_epel, 1, 1, epel_hv,); NEON8_FNASSIGN(c->put_hevc_epel_uni, 1, 1, epel_uni_hv,); + NEON8_FNASSIGN(c->put_hevc_epel_uni_w, 1, 1, epel_uni_w_hv,); if (have_i8mm(cpu_flags)) { NEON8_FNASSIGN(c->put_hevc_epel, 0, 1, epel_h, _i8mm); -- 2.39.3 (Apple Git-146) _______________________________________________ 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".