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>
Cc: Dash Santosh Sathyanarayanan <dash.sathyanarayanan@multicorewareinc.com>
Subject: Re: [FFmpeg-devel] [PATCH] swscale/aarch64/output: Implement neon assembly for yuv2nv12cX_c()
Date: Mon, 2 Jun 2025 10:52:59 +0300 (EEST)
Message-ID: <7ebeaff9-856f-1b4f-d9db-48d79ad9e3b@martin.st> (raw)
In-Reply-To: <PN2P287MB11658545ACDE2C3F246E5568D662A@PN2P287MB1165.INDP287.PROD.OUTLOOK.COM>

On Mon, 2 Jun 2025, Harshitha Sarangu Suresh wrote:

> From 7260822a578130a713c1455cca6cdd06f1540db8 Mon Sep 17 00:00:00 2001
> From: Harshitha Suresh <harshitha@multicorewareinc.com>
> Date: Mon, 19 May 2025 22:37:20 +0530
> Subject: [PATCH] swscale/aarch64/output: Implement neon assembly for yuv2nv12cX_c()
>
> yuv2nv12cX_2_512_accurate_c:                          3508.8 ( 1.00x)
> yuv2nv12cX_2_512_accurate_neon:                        369.2 ( 9.50x)
> yuv2nv12cX_2_512_approximate_c:                       3499.0 ( 1.00x)
> yuv2nv12cX_2_512_approximate_neon:                     370.2 ( 9.45x)
> yuv2nv12cX_4_512_accurate_c:                          4683.0 ( 1.00x)
> yuv2nv12cX_4_512_accurate_neon:                        568.8 ( 8.23x)
> yuv2nv12cX_4_512_approximate_c:                       4682.6 ( 1.00x)
> yuv2nv12cX_4_512_approximate_neon:                     569.9 ( 8.22x)
> yuv2nv12cX_8_512_accurate_c:                          7243.0 ( 1.00x)
> yuv2nv12cX_8_512_accurate_neon:                        937.6 ( 7.72x)
> yuv2nv12cX_8_512_approximate_c:                       7235.9 ( 1.00x)
> yuv2nv12cX_8_512_approximate_neon:                     938.3 ( 7.71x)
> yuv2nv12cX_16_512_accurate_c:                        13749.7 ( 1.00x)
> yuv2nv12cX_16_512_accurate_neon:                      1708.1 ( 8.05x)
> yuv2nv12cX_16_512_approximate_c:                     13750.0 ( 1.00x)
> yuv2nv12cX_16_512_approximate_neon:                   1708.6 ( 8.05x)
> ---
> libswscale/aarch64/output.S  | 308 +++++++++++++++++++++++++++++++++++
> libswscale/aarch64/swscale.c |  18 ++
> 2 files changed, 326 insertions(+)
>
> diff --git a/libswscale/aarch64/output.S b/libswscale/aarch64/output.S
> index 190c438870..8eb89e8b54 100644
> --- a/libswscale/aarch64/output.S
> +++ b/libswscale/aarch64/output.S
> @@ -226,3 +226,311 @@ function ff_yuv2plane1_8_neon, export=1
>         b.gt            2b                              // loop until width consumed
>         ret
> endfunc
> +
> +// void ff_yuv2nv12cX_neon(enum AVPixelFormat dstFormat, const uint8_t *chrDither,
> +//                         const int16_t *chrFilter, int chrFilterSize,
> +//                         const int16_t **chrUSrc, const int16_t **chrVSrc,
> +//                         uint8_t *dest, int chrDstW)
> +
> +function ff_yuv2nv12cX_notswapped_neon, export=1
> +    // x0 - dstFormat (unused)
> +    // x1 - uint8_t *chrDither
> +    // x2 - int16_t *chrFilter
> +    // x3 - int chrFilterSize
> +    // x4 - int16_t **chrUSrc
> +    // x5 - int16_t **chrVSrc
> +    // x6 - uint8_t *dest
> +    // x7 - int chrDstW
> +
> +    // Load dither pattern and compute U and V dither vectors
> +    ld1     {v0.8b}, [x1]               // chrDither[0..7]
> +    ext     v1.8b, v0.8b, v0.8b, #3      // Rotate for V: (i+3)&7

Please adhere to the indentation of the existing code, don't make up your 
own.

This patchset causes a lot of fate tests to fail, and causes ffmpeg to 
crash in a number of tests while running fate. Please fix that.

In order to test the assembly in all relevant configurations before 
submitting, I have made a setup of github actions, which anybody can use. 
This also includes indentation checks for the assembly.

If you make a copy of my branch at 
https://github.com/mstorsjo/ffmpeg/commits/gha-aarch64, add your own 
changes on top, and push to a repo on github, it will run the tests in all 
the configurations.

// 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:[~2025-06-02  7:53 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-02  4:36 Harshitha Sarangu Suresh
2025-06-02  7:52 ` Martin Storsjö [this message]
2025-06-06  6:52 Harshitha Sarangu Suresh
2025-06-06  7:07 ` Martin Storsjö
2025-06-06  9:08   ` Harshitha Sarangu Suresh

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=7ebeaff9-856f-1b4f-d9db-48d79ad9e3b@martin.st \
    --to=martin@martin.st \
    --cc=dash.sathyanarayanan@multicorewareinc.com \
    --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