From: "Martin Storsjö" <martin@martin.st>
To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org>
Cc: Logan Lyu <Logan.Lyu@myais.com.cn>
Subject: Re: [FFmpeg-devel] [PATCH 3/5] lavc/aarch64: new optimization for 8-bit hevc_epel_uni_w_v
Date: Mon, 12 Jun 2023 11:09:06 +0300 (EEST)
Message-ID: <8d881143-3f72-3aee-375-9254f993ee25@martin.st> (raw)
In-Reply-To: <20230604041756.5196-3-Logan.Lyu@myais.com.cn>
On Sun, 4 Jun 2023, Logan.Lyu@myais.com.cn wrote:
> From: Logan Lyu <Logan.Lyu@myais.com.cn>
>
> Signed-off-by: Logan Lyu <Logan.Lyu@myais.com.cn>
> ---
> libavcodec/aarch64/hevcdsp_epel_neon.S | 504 ++++++++++++++++++++++
> libavcodec/aarch64/hevcdsp_init_aarch64.c | 6 +
> 2 files changed, 510 insertions(+)
>
> diff --git a/libavcodec/aarch64/hevcdsp_epel_neon.S b/libavcodec/aarch64/hevcdsp_epel_neon.S
> index fe494dd843..4841f49dab 100644
> --- a/libavcodec/aarch64/hevcdsp_epel_neon.S
> +++ b/libavcodec/aarch64/hevcdsp_epel_neon.S
> +function ff_hevc_put_hevc_epel_uni_w_v48_8_neon, export=1
> + stp q8, q9, [sp, #-32]
> + stp q10, q11, [sp, #-64]
This backs up values on the stack without decrementing the stack pointer,
i.e. storing it in the red zone. Whether this is supported depends on the
platform ABI. Linux and macOS have a 128 byte red zone on aarch64, while
Windows only has 16 bytes. So for portability, don't rely on a red zone at
all.
I.e., here please decrement the stack pointer like in a previous patch:
stp q8, q9, [sp, #-64]!
stp q10, q11, [sp, #32]
And inversely when restoring it.
> + EPEL_UNI_W_V_HEADER
> +
> + ld1 {v16.16b, v17.16b, v18.16b}, [x2], x3
> + ld1 {v19.16b, v20.16b, v21.16b}, [x2], x3
> + ld1 {v22.16b, v23.16b, v24.16b}, [x2], x3
> +1:
> + ld1 {v25.16b, v26.16b, v27.16b}, [x2], x3
> +
> + EPEL_UNI_W_V16_CALC v4, v6, v16, v19, v22, v25, v8, v9, v10, v11
> + EPEL_UNI_W_V16_CALC v5, v7, v17, v20, v23, v26, v8, v9, v10, v11
> + EPEL_UNI_W_V16_CALC v6, v7, v18, v21, v24, v27, v8, v9, v10, v11
> + st1 {v4.16b, v5.16b, v6.16b}, [x0], x1
> + subs w4, w4, #1
> + b.eq 2f
> + ld1 {v16.16b, v17.16b, v18.16b}, [x2], x3
> + EPEL_UNI_W_V16_CALC v4, v6, v19, v22, v25, v16, v8, v9, v10, v11
> + EPEL_UNI_W_V16_CALC v5, v7, v20, v23, v26, v17, v8, v9, v10, v11
> + EPEL_UNI_W_V16_CALC v6, v7, v21, v24, v27, v18, v8, v9, v10, v11
> + st1 {v4.16b, v5.16b, v6.16b}, [x0], x1
> + subs w4, w4, #1
> + b.eq 2f
> + ld1 {v19.16b, v20.16b, v21.16b}, [x2], x3
> + EPEL_UNI_W_V16_CALC v4, v6, v22, v25, v16, v19, v8, v9, v10, v11
> + EPEL_UNI_W_V16_CALC v5, v7, v23, v26, v17, v20, v8, v9, v10, v11
> + EPEL_UNI_W_V16_CALC v6, v7, v24, v27, v18, v21, v8, v9, v10, v11
> + st1 {v4.16b, v5.16b, v6.16b}, [x0], x1
> + subs w4, w4, #1
> + b.eq 2f
> + ld1 {v22.16b, v23.16b, v24.16b}, [x2], x3
> + EPEL_UNI_W_V16_CALC v4, v6, v25, v16, v19, v22, v8, v9, v10, v11
> + EPEL_UNI_W_V16_CALC v5, v7, v26, v17, v20, v23, v8, v9, v10, v11
> + EPEL_UNI_W_V16_CALC v6, v7, v27, v18, v21, v24, v8, v9, v10, v11
> + st1 {v4.16b, v5.16b, v6.16b}, [x0], x1
> + subs w4, w4, #1
> + b.hi 1b
> +2:
> + ldp q8, q9, [sp, #-32]
> + ldp q10, q11, [sp, #-64]
> + ret
> +endfunc
> +
> +function ff_hevc_put_hevc_epel_uni_w_v64_8_neon, export=1
> + stp q8, q9, [sp, #-32]
> + stp q10, q11, [sp, #-64]
> + stp q12, q13, [sp, #-96]
> + stp q14, q15, [sp, #-128]
Same thing here.
// Martin
_______________________________________________
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".
next prev parent reply other threads:[~2023-06-12 8:09 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-04 4:17 [FFmpeg-devel] [PATCH 1/5] lavc/aarch64: new optimization for 8-bit hevc_pel_uni_pixels Logan.Lyu
2023-06-04 4:17 ` [FFmpeg-devel] [PATCH 2/5] lavc/aarch64: new optimization for 8-bit hevc_epel_uni_w_h Logan.Lyu
2023-06-12 7:59 ` Martin Storsjö
2023-06-18 8:21 ` Logan.Lyu
2023-06-04 4:17 ` [FFmpeg-devel] [PATCH 3/5] lavc/aarch64: new optimization for 8-bit hevc_epel_uni_w_v Logan.Lyu
2023-06-12 8:09 ` Martin Storsjö [this message]
2023-06-12 9:08 ` Martin Storsjö
2023-06-18 8:22 ` Logan.Lyu
2023-07-01 21:21 ` Martin Storsjö
2023-06-04 4:17 ` [FFmpeg-devel] [PATCH 4/5] lavc/aarch64: new optimization for 8-bit hevc_epel_h Logan.Lyu
2023-06-12 8:12 ` Martin Storsjö
2023-06-18 8:23 ` Logan.Lyu
2023-06-18 8:26 ` Logan.Lyu
2023-06-04 4:17 ` [FFmpeg-devel] [PATCH 5/5] lavc/aarch64: new optimization for 8-bit hevc_epel_uni_w_hv Logan.Lyu
2023-06-12 8:19 ` Martin Storsjö
2023-06-18 8:25 ` Logan.Lyu
2023-07-01 21:28 ` Martin Storsjö
2023-07-13 14:54 ` Logan.Lyu
2023-07-14 9:28 ` Martin Storsjö
2023-06-12 7:47 ` [FFmpeg-devel] [PATCH 1/5] lavc/aarch64: new optimization for 8-bit hevc_pel_uni_pixels Martin Storsjö
2023-06-18 8:29 ` Logan.Lyu
2023-07-01 21:16 ` Martin Storsjö
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8d881143-3f72-3aee-375-9254f993ee25@martin.st \
--to=martin@martin.st \
--cc=Logan.Lyu@myais.com.cn \
--cc=ffmpeg-devel@ffmpeg.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
This inbox may be cloned and mirrored by anyone:
git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
ffmpegdev@gitmailbox.com
public-inbox-index ffmpegdev
Example config snippet for mirrors.
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git