You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-10 06:10:52 +02:00
x86/cpu: set avxslow cpuflag on btver2 CPUs
They are also slow when using 256 bit wide registers Reviewed-by: Hendrik Leppkes <h.leppkes@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
@@ -182,13 +182,11 @@ int ff_get_cpu_flags_x86(void)
|
|||||||
|
|
||||||
/* Similar to the above but for AVX functions on AMD processors.
|
/* Similar to the above but for AVX functions on AMD processors.
|
||||||
This is necessary only for functions using YMM registers on Bulldozer
|
This is necessary only for functions using YMM registers on Bulldozer
|
||||||
based CPUs as they lack 256-bits execution units. SSE/AVX functions
|
and Jaguar based CPUs as they lack 256-bits execution units. SSE/AVX
|
||||||
using XMM registers are always faster on them.
|
functions using XMM registers are always faster on them.
|
||||||
AV_CPU_FLAG_AVX and AV_CPU_FLAG_AVXSLOW are both set so that AVX is
|
AV_CPU_FLAG_AVX and AV_CPU_FLAG_AVXSLOW are both set so that AVX is
|
||||||
used unless explicitly disabled by checking AV_CPU_FLAG_AVXSLOW.
|
used unless explicitly disabled by checking AV_CPU_FLAG_AVXSLOW. */
|
||||||
TODO: Confirm if Excavator is affected or not by this once it's
|
if ((family == 0x15 || family == 0x16) && (rval & AV_CPU_FLAG_AVX))
|
||||||
released, and update the check if necessary. Same for btver2. */
|
|
||||||
if (family == 0x15 && (rval & AV_CPU_FLAG_AVX))
|
|
||||||
rval |= AV_CPU_FLAG_AVXSLOW;
|
rval |= AV_CPU_FLAG_AVXSLOW;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user