On Wed, 16 Jul 2025 22:06:28 +0200 Henrik Gramner via ffmpeg-devel <[email protected]> wrote: > On Wed, Jul 16, 2025 at 6:26 PM Niklas Haas <[email protected]> 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 > [email protected] > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > To unsubscribe, visit link above, or email > [email protected] with subject "unsubscribe". _______________________________________________ ffmpeg-devel mailing list [email protected] https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email [email protected] with subject "unsubscribe".
