diff options
author | James Almer <jamrial@gmail.com> | 2017-09-14 16:51:26 -0300 |
---|---|---|
committer | Luca Barbato <lu_zero@gentoo.org> | 2017-10-09 11:48:24 +0200 |
commit | 3d828c9fd51aa8c348ff11241e212e5834b4f806 (patch) | |
tree | 071b5d9d1f81407d65ce696142113397c0cd9ba8 /libavutil/x86 | |
parent | ebfcce16ac44b83f6e815c70e91231bed9fcbc97 (diff) |
cpu: split flag checks per arch in av_cpu_max_align()
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
Diffstat (limited to 'libavutil/x86')
-rw-r--r-- | libavutil/x86/cpu.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/libavutil/x86/cpu.c b/libavutil/x86/cpu.c index 7c50fe38e2..fa50eeb9dd 100644 --- a/libavutil/x86/cpu.c +++ b/libavutil/x86/cpu.c @@ -233,3 +233,14 @@ int ff_get_cpu_flags_x86(void) return rval; } + +size_t ff_get_cpu_max_align_x86(void) +{ + int flags = av_get_cpu_flags(); + + if (flags & AV_CPU_FLAG_AVX) + return 32; + if (flags & AV_CPU_FLAG_SSE) + return 16; + return 8; +} |