[x264-devel] x86: AVX-512 support

Henrik Gramner git at videolan.org
Mon May 22 00:02:51 CEST 2017

x264 | branch: master | Henrik Gramner <henrik at gramner.com> | Sat Mar 25 10:16:09 2017 +0100| [472ce3648aea3ddc16b7716eb114f4bcdb8fea8f] | committer: Henrik Gramner

x86: AVX-512 support

AVX-512 consists of a plethora of different extensions, but in order to keep
things a bit more manageable we group together the following extensions
under a single baseline cpu flag which should cover SKL-X and future CPUs:
 * AVX-512 Foundation (F)
 * AVX-512 Conflict Detection Instructions (CD)
 * AVX-512 Byte and Word Instructions (BW)
 * AVX-512 Doubleword and Quadword Instructions (DQ)
 * AVX-512 Vector Length Extensions (VL)

On x86-64 AVX-512 provides 16 additional vector registers, prefer using
those over existing ones since it allows us to avoid using `vzeroupper`
unless more than 16 vector registers are required. They also happen to
be volatile on Windows which means that we don't need to save and restore
existing xmm register contents unless more than 22 vector registers are

Also take the opportunity to drop X264_CPU_CMOV and X264_CPU_SLOW_CTZ while
we're breaking API by messing with the cpu flags since they weren't really
used for anything.

Big thanks to Intel for their support.

> http://git.videolan.org/gitweb.cgi/x264.git/?a=commit;h=472ce3648aea3ddc16b7716eb114f4bcdb8fea8f

 common/cpu.c          |  58 ++++++++----------
 common/cpu.h          |   4 +-
 common/osdep.h        |   8 ++-
 common/x86/cpu-a.asm  |  22 +++----
 common/x86/x86inc.asm | 167 ++++++++++++++++++++++++++++++++++++++++----------
 configure             |   5 +-
 encoder/encoder.c     |   5 --
 tools/checkasm.c      |  51 +++++----------
 x264.h                |  57 +++++++++--------
 9 files changed, 230 insertions(+), 147 deletions(-)

Diff:   http://git.videolan.org/gitweb.cgi/x264.git/?a=commitdiff;h=472ce3648aea3ddc16b7716eb114f4bcdb8fea8f

More information about the x264-devel mailing list