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/output: Implement neon intrinsics for yuv2planeX_10_c_template()
Date: Mon, 26 May 2025 12:05:35 +0300 (EEST)
Message-ID: <edb696c-c228-79d1-a50-1d623eef4b96@martin.st> (raw)
In-Reply-To: <MA0P287MB1158903867B74EADCF10A9C2D699A@MA0P287MB1158.INDP287.PROD.OUTLOOK.COM>

On Thu, 22 May 2025, Harshitha Sarangu Suresh wrote:

> This optimization provides 5x improvement for the module. The boost in performance was calculated by adding C timers inside the C function and the optimized neon intrinsic function.
>
>
> From 904144c2db9e5e72d56360c4c2eb38d426852901 Mon Sep 17 00:00:00 2001
> From: Harshitha Suresh <harshitha@multicorewareinc.com>
> Date: Thu, 22 May 2025 10:23:55 +0530
> Subject: [PATCH] swscale/output: Implement neon intrinsics for
> yuv2planeX_10_c_template()
>
> ---
> libswscale/output.c | 76 ++++++++++++++++++++++++++++++++++++++++++++-
> 1 file changed, 75 insertions(+), 1 deletion(-)
>
> diff --git a/libswscale/output.c b/libswscale/output.c
> index c37649e7ce..345df5ce59 100644
> --- a/libswscale/output.c
> +++ b/libswscale/output.c
> @@ -22,7 +22,9 @@
> #include <stddef.h>
> #include <stdint.h>
> #include <string.h>
> -
> +#if defined (__aarch64__)
> +#include <arm_neon.h>
> +#endif
> #include "libavutil/attributes.h"
> #include "libavutil/avutil.h"
> #include "libavutil/avassert.h"
> @@ -337,6 +339,77 @@ yuv2plane1_10_c_template(const int16_t *src, uint16_t *dest, int dstW,
>     }
> }
>
> +
> +#if defined (__aarch64__) && !defined(__APPLE__)

Why is Apple excluded here?

In any case; this is not the right way to add arch specific optimizations.

1. We don't add unconditional cases in the main arch independent code. We 
add them with runtime detection in arch specific files, see 
libswscale/aarch64/*. In the case of aarch64 and neon, things are easier 
as this extension is available in the compiler baseline and doesn't, 
strictly, need runtime detection, but nevertheless, the code should be 
arranged that way.

2. We don't use intrinsics for aarch64, we use standalone assembly files.

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

      parent reply	other threads:[~2025-05-26  9:05 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-22 13:57 Harshitha Sarangu Suresh
2025-05-26  8:40 ` Harshitha Sarangu Suresh
2025-05-26  9:05 ` 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=edb696c-c228-79d1-a50-1d623eef4b96@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