[vlc-devel] [vlc-commits] packetizer/startcode_helper: enhance with AVX2
Rémi Denis-Courmont
remi at remlab.net
Sat Mar 9 19:09:17 CET 2019
Le torstaina 7. maaliskuuta 2019, 20.40.19 EET Francois Cartegnie a écrit :
> Le 07/03/2019 à 19:57, Konstantin Pavlov a écrit :
> > Hello,
> >
> > On Thu, Mar 07, 2019 at 07:15:46AM +0200, Remi Denis-Courmont wrote:
> >> And this patchset seems to crash the buildbot.
> >
> > It's now fixed with d5ec278bde522d5a26d598702506239c9b522d17.
> >
> > However I don't understand how it's supposed to work if e.g. Debian builds
> > on AVX-enabled hosts and then a user launches the built binary on a
> > contemporary Celeron or Pentium machine, which doesnt have AVX due to
> > marketing reasons.
>
> vlc_cpu.h and code branching
Exactly. However checking vlc_CPU() every time is probably slower than using
plain C.
So I think that optimization should only be used when AVX2 is supported by
compiler target , i.e. __AVX2__ is defined.
--
Rémi Denis-Courmont
http://www.remlab.net/
More information about the vlc-devel
mailing list