Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
From: "Martin Storsjö" <martin@martin.st>
To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org>
Subject: Re: [FFmpeg-devel] [PATCH v3 4/5] avcodec/ac3: Implement sum_square_butterfly_int32 for aarch64 NEON
Date: Thu, 4 Apr 2024 15:58:57 +0300 (EEST)
Message-ID: <d4af7d9a-ce5-b9e7-9acf-60d6f9766acc@martin.st> (raw)
In-Reply-To: <17305bcf-364b-4f60-8e60-633466da4918@geoffhill.org>

On Tue, 2 Apr 2024, Geoff Hill wrote:

> Signed-off-by: Geoff Hill <geoff@geoffhill.org>
> ---
> libavcodec/aarch64/ac3dsp_init_aarch64.c |  5 +++++
> libavcodec/aarch64/ac3dsp_neon.S         | 24 +++++++++++++++++++++
> tests/checkasm/ac3dsp.c                  | 27 ++++++++++++++++++++++++
> 3 files changed, 56 insertions(+)
>
> diff --git a/libavcodec/aarch64/ac3dsp_init_aarch64.c b/libavcodec/aarch64/ac3dsp_init_aarch64.c
> index 1bdc215b51..e95436c651 100644
> --- a/libavcodec/aarch64/ac3dsp_init_aarch64.c
> +++ b/libavcodec/aarch64/ac3dsp_init_aarch64.c
> @@ -28,6 +28,10 @@
> void ff_ac3_exponent_min_neon(uint8_t *exp, int num_reuse_blocks, int nb_coefs);
> void ff_ac3_extract_exponents_neon(uint8_t *exp, int32_t *coef, int nb_coefs);
> void ff_float_to_fixed24_neon(int32_t *dst, const float *src, size_t len);
> +void ff_ac3_sum_square_butterfly_int32_neon(int64_t sum[4],
> +                                            const int32_t *coef0,
> +                                            const int32_t *coef1,
> +                                            int len);
>
> av_cold void ff_ac3dsp_init_aarch64(AC3DSPContext *c)
> {
> @@ -37,4 +41,5 @@ av_cold void ff_ac3dsp_init_aarch64(AC3DSPContext *c)
>     c->ac3_exponent_min = ff_ac3_exponent_min_neon;
>     c->extract_exponents = ff_ac3_extract_exponents_neon;
>     c->float_to_fixed24 = ff_float_to_fixed24_neon;
> +    c->sum_square_butterfly_int32 = ff_ac3_sum_square_butterfly_int32_neon;
> }
> diff --git a/libavcodec/aarch64/ac3dsp_neon.S b/libavcodec/aarch64/ac3dsp_neon.S
> index b26f71a3f6..fa8fcf2e47 100644
> --- a/libavcodec/aarch64/ac3dsp_neon.S
> +++ b/libavcodec/aarch64/ac3dsp_neon.S
> @@ -64,3 +64,27 @@ function ff_float_to_fixed24_neon, export=1
>         b.ne        0b
>         ret
> endfunc
> +
> +function ff_ac3_sum_square_butterfly_int32_neon, export=1
> +        cbz         w3, 1f

The arm version of this patch doesn't have any corresponding check for 
whether this parameter is zero, and the checkasm test doesn't test that 
behaviour either. Is that never feasiable (and we could leave it out here) 
or should we test that and fix it in other assembly versions? In the 
latter case, it's of course ok to defer that to a separate later patch, 
not holding up this one.

// 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".

      reply	other threads:[~2024-04-04 12:59 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-03  6:43 Geoff Hill
2024-04-04 12:58 ` 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=d4af7d9a-ce5-b9e7-9acf-60d6f9766acc@martin.st \
    --to=martin@martin.st \
    --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