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: "Swinney, Jonathan" <jswinney@amazon.com>
Cc: "Pop, Sebastian" <spop@amazon.com>,
	"ffmpeg-devel@ffmpeg.org" <ffmpeg-devel@ffmpeg.org>
Subject: Re: [FFmpeg-devel] [PATCH 1/2] swscale/aarch64: add hscale specializations
Date: Wed, 20 Apr 2022 11:44:24 +0300 (EEST)
Message-ID: <8d635a8-835c-ffaa-e2d9-e7a39e9cec4e@martin.st> (raw)
In-Reply-To: <57a72619-3ae3-3740-6959-fe1479713315@martin.st>

On Sun, 17 Apr 2022, Martin Storsjö wrote:

> On Fri, 15 Apr 2022, Swinney, Jonathan wrote:
>
>> This patch adds specializations for hscale for filterSize == 4 and 8 and
>> converts the existing implementation for the X8 version. For the old code, 
>> now
>> used for the X8 version, it improves the efficiency of the final summations 
>> by
>> reducing 11 instructions to 7.
>> 
>> ff_hscale8to15_8_neon is mostly unchanged from the original except for a 
>> few
>> changes.
>> - The loads for the filter data were consolidated into a single 64 byte ld1
>>   instruction.
>
> Couldn't you do this optimization on the existing function too?

Sorry, now I realized why this optimization only can be done if you 
operate on a specific known filter width.

>> - The final summations were improved.
>> - The inner loop on filterSize was completely removed
>
> I presume that this is the only differing factor which affects whether it's 
> worthwhile to keep a separate width=8 function or not. At least from the 
> checkasm benchmark numbers, the difference is notable but not huge (on the 
> range of 4-10%, while the summation improvements gain even more).
>
> Given a fully optimized function that has an inner loop (which is only taken 
> once for the width=8 case), is the separate function without an inner loop 
> really necessary?

With the ideal version of the final summation in both functions, the 
separate filtersize=8 function is 11-19% faster than the generic 
multiple-of-8 function (on Cortex A53 and A72 - on A73 the both versions 
are essentially equally fast), so there's probably good reason to go with 
the separate version.

Thus, disregard the review comments above.

// 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:[~2022-04-20  8:44 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-15 21:36 Swinney, Jonathan
2022-04-16 21:22 ` Martin Storsjö
2022-04-20  8:44   ` 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=8d635a8-835c-ffaa-e2d9-e7a39e9cec4e@martin.st \
    --to=martin@martin.st \
    --cc=ffmpeg-devel@ffmpeg.org \
    --cc=jswinney@amazon.com \
    --cc=spop@amazon.com \
    /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