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: Jean-Baptiste Kempf <jb@videolan.org>
Subject: Re: [FFmpeg-devel] [PATCH] lavc/aarch64: new optimization for 8-bit hevc_pel_uni_w_pixels, qpel_uni_w_h, qpel_uni_w_v, qpel_uni_w_hv and qpel_h
Date: Thu, 4 May 2023 11:49:59 +0300 (EEST)
Message-ID: <3e19c1bc-3af7-c9b0-337c-7350d72d52fb@martin.st> (raw)
In-Reply-To: <aa404d01-1882-579b-4ae0-ccc7eb61bd11@myais.com.cn>

On Wed, 3 May 2023, myais wrote:

> Hello,
>
> - I splited this patch, Do I need to resubmit or just attach them as 
> attachments? (I attached those patches.  If I need to resummit, please let me 
> know.)

The attached form here is fine with me.

I didn't review it in detail yet, but I think it roughly looks ok, but 
there's a few issues.

The "fate-hevc" tests as part of our testsuite fails with these patches 
applied - please test that and make sure it passes.

The assembly fails to build with MSVC, with errors like these:

libavcodec\aarch64\hevcdsp_qpel_neon.o.asm(2278) 
: error A2173: syntax error in expression
         add     x2, x2, x3, lsl 1

The immediate constant 1 here should be prefixed with #, the same thing 
goes in a lot of other places in the same file.

If compiling only patch 1, it fails to build due to a mismatched #endif in 
the c file.

The second patch adds code that git flags as "No newline at end of file"; 
please don't do that, please make sure your editor saves the file as usual 
with a trailing newline.

The patches have some cases of trailing whitespace, please make sure you 
don't have time.

In the second patch, you're inconsistently using "#if 
__ARM_FEATURE_DOTPROD" and "#if defined(__ARM_FEATURE_DOTPROD)".

Dot product is a new feature we haven't taken advantage of on aarch64 
before. None of my toolchains/environments have this enabled by default. 
It would be good if you'd provide examples of where you're testing it and 
how you configure the build to enable it.

Because right now, most of this assembly runs untested unless building in 
a specific configuration that explicitly enables that extension.

For such features, we generally would want to always compile/assemble the 
feature (as long as the toolchain supports assembling it, with some extra 
flag), and use runtime checks for detecting whether the cpu feature is 
supported. But I guess adding support for that is a bigger separate 
project, and this approach with build time ifdefs if the toolchain 
mandates support for it, is tolerable for now.

If there's not a huge benefit from the dot product instructions, maybe it 
would be best to just not use them, so the whole wide audience can benefit 
from the optimizations?

// 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:[~2023-05-04  8:50 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-30  8:57 myais
2023-05-02 12:32 ` Jean-Baptiste Kempf
2023-05-03  2:14   ` myais
2023-05-04  8:49     ` Martin Storsjö [this message]
2023-05-05 15:27       ` myais
2023-05-07  4:52         ` myais
2023-05-26  8:34           ` Martin Storsjö
2023-05-27  8:34             ` myais
2023-05-27 20:24               ` Martin Storsjö
2023-05-28  3:23             ` Logan.Lyu
     [not found]               ` <647df87f-b98e-4c18-9c94-f5cff44d11f0@app.fastmail.com>
2023-05-28  6:26                 ` Logan.Lyu
2023-06-01 11:23                   ` Martin Storsjö
2023-06-02 12:47                     ` Logan.Lyu
2023-06-03 20:50                       ` Martin Storsjö
     [not found]           ` <d2d28c13-3b51-11e0-452b-9fc6ceb973d3@myais.com.cn>
     [not found]             ` <973b066-585b-2610-66b1-6f533a1f7bb@martin.st>
     [not found]               ` <ea6241be-d2fe-ea39-65ed-ec88c239f142@myais.com.cn>
     [not found]                 ` <a7c0fd97-a996-a70-b7e3-3c9c1d07860@martin.st>
     [not found]                   ` <fd6505e7-7d08-b79c-44c4-524107e21178@myais.com.cn>
     [not found]                     ` <579b3020-b044-6f54-a321-40b552edebf4@martin.st>
2023-05-27  8:03                       ` myais

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=3e19c1bc-3af7-c9b0-337c-7350d72d52fb@martin.st \
    --to=martin@martin.st \
    --cc=ffmpeg-devel@ffmpeg.org \
    --cc=jb@videolan.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