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 EA3984A21B for ; Mon, 25 Mar 2024 15:03:58 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 5003368D5AB; Mon, 25 Mar 2024 17:02:59 +0200 (EET) Received: from mail-lf1-f51.google.com (mail-lf1-f51.google.com [209.85.167.51]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id AF7E768D502 for ; Mon, 25 Mar 2024 17:02:52 +0200 (EET) Received: by mail-lf1-f51.google.com with SMTP id 2adb3069b0e04-513d4559fb4so5987227e87.3 for ; Mon, 25 Mar 2024 08:02:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=martin-st.20230601.gappssmtp.com; s=20230601; t=1711378972; x=1711983772; 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=qUK1xrNQFk01DkVBO0TY5mRudJlAS6qtgDMXhQkIxbM=; b=mHpvxXNOecFJ4VJ6n/behCZLWmpyE75kl7Gyh7AiYA7Hyv1YSPhfnYpFfYdlYzbU7d KXIq2nzWl7QOWCaVQ5/AH/jluDZffSiw8Y4h3/W2xXT/PWUi/TKtNmTaolax20A2odtA dnm2dK44RZ6mZsncthPDmK3BIWla+OdOQKKGzXaocLtyo8xoudSBjmhBdqWvdYKU3Sbp DKdWKhSghIB9ijSstVVgSFkcMO70hbhIhOplZjPXk+2m9CGNHVtrMsJTw3fwRwEkwUXp 0l55XwwAW8NkSmSpBpz4hHV5HpukRoT7yquhCgcHdlkHHYHmZxoK/XL+pA084NLEN6Io z5tA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711378972; x=1711983772; 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=qUK1xrNQFk01DkVBO0TY5mRudJlAS6qtgDMXhQkIxbM=; b=UmQSEzFYV+eOHvvrFzqycovkH9iPvjFRKadgZOHkRWk0zzFcWqe1QZ2g8cSYsICfqE 45DX1YZYxbsDEjHZHcXIpujMs5sw1kuBGeAaNO9YEk9zg/uC9gMwf28si94/F0wEBBAG tFYtlkB9e4gbyBItEIkwk2yPxkmEeYnY9G+JxNfgeMWLz1eC1Fm+VrubprTVBaHrEdYl lG9MSV+arKezoMgUtdSmV2GF8peiQ7W0dkye01cbNi5f3zN0FvXs1qcqgt3IF//eO72+ 6ORdlUw0ymlKZAV+RW3JRRDI5i0ua4EyO+X5Ky3sTBIUGmlwQWwUS92RZpc4c6Ie1Zib Qx8A== X-Gm-Message-State: AOJu0YzMmLbV8auSbhE1Eue/Fl/7Kiwwg/pmchb38NiOFJa3a3h1yB8q CKTpLFUqgVxJh9rQh3VXRkjBblJHWY5IUdFr/fBp+Uo9QQhWCwfcJdenYHS1DUiD/rhB+SHrKmB zumTJ X-Google-Smtp-Source: AGHT+IGfBNGhv0Clq7f5X30pqkUH+yORoPUGGLU24jaQ6IGWkew7w6Qu4s7+yQy5cMBCIkBMBBvQhA== X-Received: by 2002:a05:6512:4dc:b0:512:ac3a:7f27 with SMTP id w28-20020a05651204dc00b00512ac3a7f27mr4925493lfq.66.1711378972044; Mon, 25 Mar 2024 08:02:52 -0700 (PDT) Received: from localhost (host-114-191.parnet.fi. [77.234.114.191]) by smtp.gmail.com with ESMTPSA id g25-20020a0565123b9900b00515b071bc72sm178156lfv.75.2024.03.25.08.02.51 (version=TLS1 cipher=AES128-SHA bits=128/128); Mon, 25 Mar 2024 08:02:51 -0700 (PDT) From: =?UTF-8?q?Martin=20Storsj=C3=B6?= To: ffmpeg-devel@ffmpeg.org Date: Mon, 25 Mar 2024 17:02:32 +0200 Message-Id: <20240325150243.59058-11-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 10/21] aarch64: hevc: Produce epel_hv functions for both plain 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_hv4_8_c: 163.7 put_hevc_epel_hv4_8_neon: 52.5 put_hevc_epel_hv4_8_i8mm: 49.5 put_hevc_epel_hv6_8_c: 292.2 put_hevc_epel_hv6_8_neon: 97.7 put_hevc_epel_hv6_8_i8mm: 101.2 put_hevc_epel_hv8_8_c: 471.0 put_hevc_epel_hv8_8_neon: 106.7 put_hevc_epel_hv8_8_i8mm: 102.5 put_hevc_epel_hv12_8_c: 1030.2 put_hevc_epel_hv12_8_neon: 240.5 put_hevc_epel_hv12_8_i8mm: 215.0 put_hevc_epel_hv16_8_c: 1711.5 put_hevc_epel_hv16_8_neon: 340.2 put_hevc_epel_hv16_8_i8mm: 319.2 put_hevc_epel_hv24_8_c: 3670.0 put_hevc_epel_hv24_8_neon: 702.0 put_hevc_epel_hv24_8_i8mm: 666.5 put_hevc_epel_hv32_8_c: 6785.5 put_hevc_epel_hv32_8_neon: 1247.0 put_hevc_epel_hv32_8_i8mm: 1169.0 put_hevc_epel_hv48_8_c: 14689.7 put_hevc_epel_hv48_8_neon: 2665.2 put_hevc_epel_hv48_8_i8mm: 2740.0 put_hevc_epel_hv64_8_c: 25899.2 put_hevc_epel_hv64_8_neon: 4801.2 put_hevc_epel_hv64_8_i8mm: 4487.7 --- libavcodec/aarch64/hevcdsp_epel_neon.S | 58 +++++++++++++---------- libavcodec/aarch64/hevcdsp_init_aarch64.c | 6 +++ 2 files changed, 38 insertions(+), 26 deletions(-) diff --git a/libavcodec/aarch64/hevcdsp_epel_neon.S b/libavcodec/aarch64/hevcdsp_epel_neon.S index 2088630da1..024464723b 100644 --- a/libavcodec/aarch64/hevcdsp_epel_neon.S +++ b/libavcodec/aarch64/hevcdsp_epel_neon.S @@ -2298,10 +2298,8 @@ function hevc_put_hevc_epel_hv24_8_end_neon 2: ret endfunc -#if HAVE_I8MM -ENABLE_I8MM - -function ff_hevc_put_hevc_epel_hv4_8_neon_i8mm, export=1 +.macro epel_hv suffix +function ff_hevc_put_hevc_epel_hv4_8_\suffix, export=1 add w10, w3, #3 lsl x10, x10, #7 sub sp, sp, x10 // tmp_array @@ -2310,13 +2308,13 @@ function ff_hevc_put_hevc_epel_hv4_8_neon_i8mm, export=1 add x0, sp, #32 sub x1, x1, x2 add w3, w3, #3 - bl X(ff_hevc_put_hevc_epel_h4_8_neon_i8mm) + bl X(ff_hevc_put_hevc_epel_h4_8_\suffix) ldp x0, x3, [sp, #16] ldp x5, x30, [sp], #32 b hevc_put_hevc_epel_hv4_8_end_neon endfunc -function ff_hevc_put_hevc_epel_hv6_8_neon_i8mm, export=1 +function ff_hevc_put_hevc_epel_hv6_8_\suffix, export=1 add w10, w3, #3 lsl x10, x10, #7 sub sp, sp, x10 // tmp_array @@ -2325,13 +2323,13 @@ function ff_hevc_put_hevc_epel_hv6_8_neon_i8mm, export=1 add x0, sp, #32 sub x1, x1, x2 add w3, w3, #3 - bl X(ff_hevc_put_hevc_epel_h6_8_neon_i8mm) + bl X(ff_hevc_put_hevc_epel_h6_8_\suffix) ldp x0, x3, [sp, #16] ldp x5, x30, [sp], #32 b hevc_put_hevc_epel_hv6_8_end_neon endfunc -function ff_hevc_put_hevc_epel_hv8_8_neon_i8mm, export=1 +function ff_hevc_put_hevc_epel_hv8_8_\suffix, export=1 add w10, w3, #3 lsl x10, x10, #7 sub sp, sp, x10 // tmp_array @@ -2340,13 +2338,13 @@ function ff_hevc_put_hevc_epel_hv8_8_neon_i8mm, export=1 add x0, sp, #32 sub x1, x1, x2 add w3, w3, #3 - bl X(ff_hevc_put_hevc_epel_h8_8_neon_i8mm) + bl X(ff_hevc_put_hevc_epel_h8_8_\suffix) ldp x0, x3, [sp, #16] ldp x5, x30, [sp], #32 b hevc_put_hevc_epel_hv8_8_end_neon endfunc -function ff_hevc_put_hevc_epel_hv12_8_neon_i8mm, export=1 +function ff_hevc_put_hevc_epel_hv12_8_\suffix, export=1 add w10, w3, #3 lsl x10, x10, #7 sub sp, sp, x10 // tmp_array @@ -2355,13 +2353,13 @@ function ff_hevc_put_hevc_epel_hv12_8_neon_i8mm, export=1 add x0, sp, #32 sub x1, x1, x2 add w3, w3, #3 - bl X(ff_hevc_put_hevc_epel_h12_8_neon_i8mm) + bl X(ff_hevc_put_hevc_epel_h12_8_\suffix) ldp x0, x3, [sp, #16] ldp x5, x30, [sp], #32 b hevc_put_hevc_epel_hv12_8_end_neon endfunc -function ff_hevc_put_hevc_epel_hv16_8_neon_i8mm, export=1 +function ff_hevc_put_hevc_epel_hv16_8_\suffix, export=1 add w10, w3, #3 lsl x10, x10, #7 sub sp, sp, x10 // tmp_array @@ -2370,13 +2368,13 @@ function ff_hevc_put_hevc_epel_hv16_8_neon_i8mm, export=1 add x0, sp, #32 sub x1, x1, x2 add w3, w3, #3 - bl X(ff_hevc_put_hevc_epel_h16_8_neon_i8mm) + bl X(ff_hevc_put_hevc_epel_h16_8_\suffix) ldp x0, x3, [sp, #16] ldp x5, x30, [sp], #32 b hevc_put_hevc_epel_hv16_8_end_neon endfunc -function ff_hevc_put_hevc_epel_hv24_8_neon_i8mm, export=1 +function ff_hevc_put_hevc_epel_hv24_8_\suffix, export=1 add w10, w3, #3 lsl x10, x10, #7 sub sp, sp, x10 // tmp_array @@ -2385,79 +2383,87 @@ function ff_hevc_put_hevc_epel_hv24_8_neon_i8mm, export=1 add x0, sp, #32 sub x1, x1, x2 add w3, w3, #3 - bl X(ff_hevc_put_hevc_epel_h24_8_neon_i8mm) + bl X(ff_hevc_put_hevc_epel_h24_8_\suffix) ldp x0, x3, [sp, #16] ldp x5, x30, [sp], #32 b hevc_put_hevc_epel_hv24_8_end_neon endfunc -function ff_hevc_put_hevc_epel_hv32_8_neon_i8mm, export=1 +function ff_hevc_put_hevc_epel_hv32_8_\suffix, export=1 stp x4, x5, [sp, #-64]! stp x2, x3, [sp, #16] stp x0, x1, [sp, #32] str x30, [sp, #48] mov x6, #16 - bl X(ff_hevc_put_hevc_epel_hv16_8_neon_i8mm) + bl X(ff_hevc_put_hevc_epel_hv16_8_\suffix) ldp x0, x1, [sp, #32] ldp x2, x3, [sp, #16] ldp x4, x5, [sp], #48 add x0, x0, #32 add x1, x1, #16 mov x6, #16 - bl X(ff_hevc_put_hevc_epel_hv16_8_neon_i8mm) + bl X(ff_hevc_put_hevc_epel_hv16_8_\suffix) ldr x30, [sp], #16 ret endfunc -function ff_hevc_put_hevc_epel_hv48_8_neon_i8mm, export=1 +function ff_hevc_put_hevc_epel_hv48_8_\suffix, export=1 stp x4, x5, [sp, #-64]! stp x2, x3, [sp, #16] stp x0, x1, [sp, #32] str x30, [sp, #48] mov x6, #24 - bl X(ff_hevc_put_hevc_epel_hv24_8_neon_i8mm) + bl X(ff_hevc_put_hevc_epel_hv24_8_\suffix) ldp x0, x1, [sp, #32] ldp x2, x3, [sp, #16] ldp x4, x5, [sp], #48 add x0, x0, #48 add x1, x1, #24 mov x6, #24 - bl X(ff_hevc_put_hevc_epel_hv24_8_neon_i8mm) + bl X(ff_hevc_put_hevc_epel_hv24_8_\suffix) ldr x30, [sp], #16 ret endfunc -function ff_hevc_put_hevc_epel_hv64_8_neon_i8mm, export=1 +function ff_hevc_put_hevc_epel_hv64_8_\suffix, export=1 stp x4, x5, [sp, #-64]! stp x2, x3, [sp, #16] stp x0, x1, [sp, #32] str x30, [sp, #48] mov x6, #16 - bl X(ff_hevc_put_hevc_epel_hv16_8_neon_i8mm) + bl X(ff_hevc_put_hevc_epel_hv16_8_\suffix) ldp x4, x5, [sp] ldp x2, x3, [sp, #16] ldp x0, x1, [sp, #32] add x0, x0, #32 add x1, x1, #16 mov x6, #16 - bl X(ff_hevc_put_hevc_epel_hv16_8_neon_i8mm) + bl X(ff_hevc_put_hevc_epel_hv16_8_\suffix) ldp x4, x5, [sp] ldp x2, x3, [sp, #16] ldp x0, x1, [sp, #32] add x0, x0, #64 add x1, x1, #32 mov x6, #16 - bl X(ff_hevc_put_hevc_epel_hv16_8_neon_i8mm) + bl X(ff_hevc_put_hevc_epel_hv16_8_\suffix) ldp x0, x1, [sp, #32] ldp x2, x3, [sp, #16] ldp x4, x5, [sp], #48 add x0, x0, #96 add x1, x1, #48 mov x6, #16 - bl X(ff_hevc_put_hevc_epel_hv16_8_neon_i8mm) + bl X(ff_hevc_put_hevc_epel_hv16_8_\suffix) ldr x30, [sp], #16 ret endfunc +.endm + +epel_hv neon + +#if HAVE_I8MM +ENABLE_I8MM + +epel_hv neon_i8mm DISABLE_I8MM #endif diff --git a/libavcodec/aarch64/hevcdsp_init_aarch64.c b/libavcodec/aarch64/hevcdsp_init_aarch64.c index be24737c9c..87e321da71 100644 --- a/libavcodec/aarch64/hevcdsp_init_aarch64.c +++ b/libavcodec/aarch64/hevcdsp_init_aarch64.c @@ -227,6 +227,10 @@ NEON8_FNPROTO(epel_h, (int16_t *dst, const uint8_t *_src, ptrdiff_t _srcstride, int height, intptr_t mx, intptr_t my, int width),); +NEON8_FNPROTO(epel_hv, (int16_t *dst, + const uint8_t *src, ptrdiff_t srcstride, + int height, intptr_t mx, intptr_t my, int width), ); + NEON8_FNPROTO(epel_h, (int16_t *dst, const uint8_t *_src, ptrdiff_t _srcstride, int height, intptr_t mx, intptr_t my, int width), _i8mm); @@ -407,6 +411,8 @@ av_cold void ff_hevc_dsp_init_aarch64(HEVCDSPContext *c, const int bit_depth) NEON8_FNASSIGN_SHARED_32(c->put_hevc_epel, 0, 1, epel_h,); NEON8_FNASSIGN_SHARED_32(c->put_hevc_epel_uni_w, 0, 1, epel_uni_w_h,); + NEON8_FNASSIGN(c->put_hevc_epel, 1, 1, epel_hv,); + if (have_i8mm(cpu_flags)) { NEON8_FNASSIGN(c->put_hevc_epel, 0, 1, epel_h, _i8mm); NEON8_FNASSIGN(c->put_hevc_epel, 1, 1, epel_hv, _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".