Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
From: Niklas Haas <ffmpeg@haasn.xyz>
To: Henrik Gramner via ffmpeg-devel <ffmpeg-devel@ffmpeg.org>,
	FFmpeg development discussions and patches
	<ffmpeg-devel@ffmpeg.org>
Cc: Henrik Gramner <henrik@gramner.com>
Subject: Re: [FFmpeg-devel] [PATCH v2 3/3] avfilter/vf_colordetect: add x86 SIMD implementation
Date: Thu, 17 Jul 2025 11:37:55 +0200
Message-ID: <20250717113755.GB6276@haasn.xyz> (raw)
In-Reply-To: <CAFGUN0pVZC7oBAqXZJ=kVN=YCFyLXcx8DVtECqVGxt+U1b1+uw@mail.gmail.com>

On Wed, 16 Jul 2025 22:06:28 +0200 Henrik Gramner via ffmpeg-devel <ffmpeg-devel@ffmpeg.org> wrote:
> On Wed, Jul 16, 2025 at 6:26 PM Niklas Haas <ffmpeg@haasn.xyz> wrote:
> > +cglobal detect_range%1, 6, 7, 5, data, stride, width, height, mpeg_min, mpeg_max, x
> > +    movd xm0, mpeg_mind
> > +    movd xm1, mpeg_maxd
> > +    vpbroadcast%1 m0, xm0
> > +    vpbroadcast%1 m1, xm1
>
> You could perhaps also do something like the following to shave off a
> few instructions:
>
> cglobal detect_range%1, 4, 7, 5, data, stride, width, height,
> mpeg_min, mpeg_max, x
> %if UNIX64 && notcpuflag(avx512)
>     movd xm0, mpeg_mind
>     movd xm1, mpeg_maxd
>     vpbroadcast%1 m0, xm0
>     vpbroadcast%1 m1, xm1
> %else
>     vpbroadcast%1 m0, mpeg_minm
>     vpbroadcast%1 m0, mpeg_maxm
> %endif

Broadcasting directly from an address works on AVX2 as well, no? Why the
conditional here?

> _______________________________________________
> 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".
_______________________________________________
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-07-17  9:38 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-16 16:24 [FFmpeg-devel] [PATCH v2 0/3] avfilter: add vf_colordetect filter Niklas Haas
2025-07-16 16:24 ` [FFmpeg-devel] [PATCH v2 1/3] avfilter/vf_colordetect: add new color range detection filter Niklas Haas
2025-07-16 16:24 ` [FFmpeg-devel] [PATCH v2 2/3] tests/checkasm: add check for vf_colordetect Niklas Haas
2025-07-16 22:48   ` James Almer
2025-07-16 16:24 ` [FFmpeg-devel] [PATCH v2 3/3] avfilter/vf_colordetect: add x86 SIMD implementation Niklas Haas
2025-07-16 20:06   ` Henrik Gramner via ffmpeg-devel
2025-07-17  9:37     ` Niklas Haas [this message]
2025-07-16 20:25   ` James Almer
2025-07-16 21:49     ` Niklas Haas
2025-07-16 22:21       ` James Almer
2025-07-17  9:41     ` Niklas Haas

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=20250717113755.GB6276@haasn.xyz \
    --to=ffmpeg@haasn.xyz \
    --cc=ffmpeg-devel@ffmpeg.org \
    --cc=henrik@gramner.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