From d1fe6fd1c0930d88da90f23f6d5fdb6ceaf6b0a9 Mon Sep 17 00:00:00 2001 From: Henrik Gramner Date: Mon, 15 May 2017 00:18:36 +0200 Subject: [PATCH] x86: Only enable AVX-512 in 8-bit mode --- encoder/encoder.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/encoder/encoder.c b/encoder/encoder.c index 4b7dcdac..7c2fe80f 100644 --- a/encoder/encoder.c +++ b/encoder/encoder.c @@ -1526,6 +1526,12 @@ x264_t *x264_encoder_open( x264_param_t *param ) x264_rdo_init(); /* init CPU functions */ +#if (ARCH_X86 || ARCH_X86_64) && HIGH_BIT_DEPTH + /* FIXME: Only 8-bit has been optimized for AVX-512 so far. The few AVX-512 functions + * enabled in high bit-depth are insignificant and just causes potential issues with + * unnecessary thermal throttling and whatnot, so keep it disabled for now. */ + h->param.cpu &= ~X264_CPU_AVX512; +#endif x264_predict_16x16_init( h->param.cpu, h->predict_16x16 ); x264_predict_8x8c_init( h->param.cpu, h->predict_8x8c ); x264_predict_8x16c_init( h->param.cpu, h->predict_8x16c ); -- 2.49.0