From: James Almer <jamrial@gmail.com> To: ffmpeg-devel@ffmpeg.org Subject: Re: [FFmpeg-devel] [PATCH v2 3/3] avfilter/vf_colordetect: add x86 SIMD implementation Date: Wed, 16 Jul 2025 17:25:12 -0300 Message-ID: <3e86076b-ca1f-47bc-afef-55f9f91ab9c6@gmail.com> (raw) In-Reply-To: <20250716162536.394049-4-ffmpeg@haasn.xyz> [-- Attachment #1.1.1: Type: text/plain, Size: 1051 bytes --] On 7/16/2025 1:24 PM, Niklas Haas wrote: > +cglobal detect_alpha%1_%3, 6, 7, 6, color, color_stride, alpha, alpha_stride, width, height, x > + pxor m0, m0 > + add colorq, widthq > + add alphaq, widthq > + neg widthq > +%ifidn %3, limited > +%if ARCH_X86_64 > + movq xm3, r6mp ; p > + movq xm4, r7mp ; q > + movq xm5, r8mp ; k They are int arguments, so no point using movq. > +%else > + movd xm3, r6mp ; p > + movd xm4, r7mp ; q > + movd xm5, r8mp ; k > +%endif > + vpbroadcast%2 m3, xm3 > + vpbroadcast%2 m4, xm4 > + vpbroadcast%2 m5, xm5 > +%endif > +.lineloop: > + mov xq, widthq > + .loop: > + %ifidn %3, full > + movu m1, [colorq + xq] > + movu m2, [alphaq + xq] > + pmaxu%1 m1, m2 > + %else > + pmovzx%1%2 m1, [colorq + xq] > + pmovzx%1%2 m2, [alphaq + xq] > + pmull%2 m1, m3 > + pmull%2 m2, m4 pmulld is painfully slow, so try to instead use pmaddwd. It should be doable because the input are words. [-- Attachment #1.2: OpenPGP digital signature --] [-- Type: application/pgp-signature, Size: 495 bytes --] [-- Attachment #2: Type: text/plain, Size: 251 bytes --] _______________________________________________ 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".
next prev parent reply other threads:[~2025-07-16 20:25 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 2025-07-16 20:25 ` James Almer [this message] 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=3e86076b-ca1f-47bc-afef-55f9f91ab9c6@gmail.com \ --to=jamrial@gmail.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