mirror of https://github.com/HandBrake/HandBrake
libhb: do not use zscale if the CPU has got no AVX2
AVX optimizations were removed from zimg.
This commit is contained in:
parent
866dadac1b
commit
a49974ee35
|
|
@ -9,6 +9,7 @@
|
|||
|
||||
#include "handbrake/handbrake.h"
|
||||
#include "handbrake/hbffmpeg.h"
|
||||
#include "libavutil/cpu.h"
|
||||
|
||||
static int get_frame_type(int type)
|
||||
{
|
||||
|
|
@ -788,6 +789,13 @@ int hb_av_can_use_zscale(enum AVPixelFormat pix_fmt,
|
|||
}
|
||||
#endif
|
||||
|
||||
#if ARCH_X86_64 || ARCH_X86_32
|
||||
if ((av_get_cpu_flags() & AV_CPU_FLAG_AVX2) == 0)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
if ((in_width % 2) != 0 || (in_height % 2) != 0 ||
|
||||
(out_width % 2) != 0 || (out_height % 2) != 0)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue