summaryrefslogtreecommitdiff
path: root/libavutil
diff options
context:
space:
mode:
authorJames Almer <jamrial@gmail.com>2016-02-07 00:04:59 -0300
committerJames Almer <jamrial@gmail.com>2016-02-07 16:39:21 -0300
commitbe22bd32fe433588f26aad40db971e0154d7f904 (patch)
tree3e84b532d588a1417f800a76a9d50e2c59f0473b /libavutil
parentba618bde7f1362b4f9456ab40303f1d79d91cccf (diff)
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>
Diffstat (limited to 'libavutil')
-rw-r--r--libavutil/x86/cpu.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/libavutil/x86/cpu.c b/libavutil/x86/cpu.c
index f57d72d0a7..bb63daac3d 100644
--- a/libavutil/x86/cpu.c
+++ b/libavutil/x86/cpu.c
@@ -182,13 +182,11 @@ int ff_get_cpu_flags_x86(void)
/* Similar to the above but for AVX functions on AMD processors.
This is necessary only for functions using YMM registers on Bulldozer
- based CPUs as they lack 256-bits execution units. SSE/AVX functions
- using XMM registers are always faster on them.
+ and Jaguar based CPUs as they lack 256-bits execution units. SSE/AVX
+ 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
- used unless explicitly disabled by checking AV_CPU_FLAG_AVXSLOW.
- TODO: Confirm if Excavator is affected or not by this once it's
- released, and update the check if necessary. Same for btver2. */
- if (family == 0x15 && (rval & AV_CPU_FLAG_AVX))
+ used unless explicitly disabled by checking AV_CPU_FLAG_AVXSLOW. */
+ if ((family == 0x15 || family == 0x16) && (rval & AV_CPU_FLAG_AVX))
rval |= AV_CPU_FLAG_AVXSLOW;
}