From: "Martin Storsjö" <martin@martin.st>
To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org>
Cc: jdek@itanimul.li
Subject: Re: [FFmpeg-devel] [PATCH 1/6] lavc/aarch64: new optimization for 8-bit hevc_pel_bi_pixels
Date: Fri, 1 Dec 2023 20:09:07 +0200 (EET)
Message-ID: <a87046ca-b432-8493-372a-bc88fd2493b8@martin.st> (raw)
In-Reply-To: <01e3c77f-56a3-4191-9637-df9999df694c@myais.com.cn>
On Sat, 18 Nov 2023, Logan.Lyu wrote:
> diff --git a/libavcodec/aarch64/hevcdsp_epel_neon.S
> b/libavcodec/aarch64/hevcdsp_epel_neon.S
> index 708b903b00..74165273d7 100644
> --- a/libavcodec/aarch64/hevcdsp_epel_neon.S
> +++ b/libavcodec/aarch64/hevcdsp_epel_neon.S
> @@ -244,6 +244,185 @@ function ff_hevc_put_hevc_pel_pixels64_8_neon, export=1
> endfunc
> +function ff_hevc_put_hevc_pel_bi_pixels4_8_neon, export=1
> + mov x10, #(MAX_PB_SIZE * 2)
> +1: ld1 {v0.s}[0], [x2], x3 // src
> + ushll v16.8h, v0.8b, #6
> + ld1 {v20.4h}, [x4], x10 // src2
> + sqadd v16.8h, v16.8h, v20.8h
> + sqrshrun v0.8b, v16.8h, #7
> + st1 {v0.s}[0], [x0], x1
> + subs w5, w5, #1
> + b.ne 1b
In many of these functions, the "subs" instruction could be scheduled
better, either after the ld1, or between sqrshrun and st1. It probably
doesn't matter much, but if you have access to an in-order core, you might
gain a cycle per iteration here.
> diff --git a/libavcodec/aarch64/hevcdsp_init_aarch64.c
> b/libavcodec/aarch64/hevcdsp_init_aarch64.c
> index c51488275c..cf171023e7 100644
> --- a/libavcodec/aarch64/hevcdsp_init_aarch64.c
> +++ b/libavcodec/aarch64/hevcdsp_init_aarch64.c
> @@ -156,8 +156,12 @@ NEON8_FNPROTO(pel_pixels, (int16_t *dst,
> const uint8_t *src, ptrdiff_t srcstride,
> int height, intptr_t mx, intptr_t my, int width),);
> -NEON8_FNPROTO(epel_v, (int16_t *dst,
> - const uint8_t *src, ptrdiff_t srcstride,
> +NEON8_FNPROTO(pel_bi_pixels, (uint8_t *dst, ptrdiff_t dststride,
> + const uint8_t *_src, ptrdiff_t _srcstride, const int16_t *src2,
> + int height, intptr_t mx, intptr_t my, int width),);
> +
> +NEON8_FNPROTO(epel_v, (uint8_t *dst, ptrdiff_t dststride,
> + const uint8_t *_src, ptrdiff_t _srcstride, const int16_t *src2,
Here, you're breaking the interface of the existing prototypes for epel_v.
Depending on compiler, this either causes warnings, or with modern Clang,
errors. Please pay attention to potential warnings in the file you edit,
when authoring a new patch.
// 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".
prev parent reply other threads:[~2023-12-01 18:09 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-18 2:06 Logan.Lyu
2023-11-19 20:42 ` Michael Niedermayer
2023-11-22 12:30 ` Logan.Lyu
2023-11-22 12:36 ` Martin Storsjö via ffmpeg-devel
2023-11-24 12:19 ` Logan.Lyu
2023-11-24 12:30 ` Martin Storsjö
2023-12-01 19:29 ` Martin Storsjö
2023-12-01 18:09 ` Martin Storsjö [this message]
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=a87046ca-b432-8493-372a-bc88fd2493b8@martin.st \
--to=martin@martin.st \
--cc=ffmpeg-devel@ffmpeg.org \
--cc=jdek@itanimul.li \
/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