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 v2 5/5] aarch64: Add Windows runtime detection of the dotprod instructions
Date: Tue, 6 Jun 2023 12:32:33 +0300 (EEST)
Message-ID: <9f20ae29-6ff3-3fc7-8386-4717ab22b815@martin.st> (raw)
In-Reply-To: <CABWgkXKNgCkWmH-ZCwQVAVDvBNizmFWJH=Vq8Rw+7GC+zf9anA@mail.gmail.com>

On Mon, 5 Jun 2023, James Zern wrote:

> On Tue, May 30, 2023 at 5:31 AM Martin Storsjö <martin@martin.st> wrote:
>>
>> For Windows, there's no publicly defined constant for checking for
>> the i8mm extension yet.
>> ---
>>  libavutil/aarch64/cpu.c | 10 ++++++++++
>>  1 file changed, 10 insertions(+)
>>
>> diff --git a/libavutil/aarch64/cpu.c b/libavutil/aarch64/cpu.c
>> index ffb00f6dd2..4b97530240 100644
>> --- a/libavutil/aarch64/cpu.c
>> +++ b/libavutil/aarch64/cpu.c
>> @@ -94,6 +94,16 @@ static int detect_flags(void)
>>      return flags;
>>  }
>>
>> +#elif defined(_WIN32)
>> +#include <windows.h>
>> +
>> +static int detect_flags(void)
>> +{
>> +    int flags = 0;
>> +    if (IsProcessorFeaturePresent(PF_ARM_V82_DP_INSTRUCTIONS_AVAILABLE))
>
> I think this requires a recent Windows SDK, is compatibility a concern?

Good catch, thanks! Yes, this requires a fairly recent SDK; it's been 
added to mingw-w64 in 2021, and in the MS WinSDK since 10.0.22000.0. So 
this would indeed have failed in my own fate config with an older MSVC...

It's easy to wrap this up in an #ifdef though, since the identifier is a 
define (both in mingw-w64 and WinSDK).

Other than that, this code is only used for aarch64, so the target 
audience is much smaller than generic windows code, but nevertheless, 
let's not break older toolchains if we don't need to.

I'll amend the patch locally with an ifdef before pushing.

// 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-06-06  9:32 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-30 12:30 [FFmpeg-devel] [PATCH v2 1/5] configure: aarch64: Support assembling the dotprod and i8mm arch extensions Martin Storsjö
2023-05-30 12:30 ` [FFmpeg-devel] [PATCH v2 2/5] aarch64: Add cpu flags for the dotprod and i8mm extensions Martin Storsjö
2023-05-30 12:30 ` [FFmpeg-devel] [PATCH v2 3/5] aarch64: Add Linux runtime cpu feature detection using getauxval(AT_HWCAP) Martin Storsjö
2023-05-31 16:54   ` Rémi Denis-Courmont
2023-05-31 19:37     ` Martin Storsjö
2023-05-30 12:30 ` [FFmpeg-devel] [PATCH v2 4/5] aarch64: Add Apple runtime detection of dotprod and i8mm using sysctl Martin Storsjö
2023-05-30 12:30 ` [FFmpeg-devel] [PATCH v2 5/5] aarch64: Add Windows runtime detection of the dotprod instructions Martin Storsjö
2023-06-03 20:51   ` Martin Storsjö
2023-06-05 17:36   ` James Zern
2023-06-06  9:32     ` Martin Storsjö [this message]
2023-06-06 10:25 ` [FFmpeg-devel] [PATCH v2 1/5] configure: aarch64: Support assembling the dotprod and i8mm arch extensions Martin Storsjö

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=9f20ae29-6ff3-3fc7-8386-4717ab22b815@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