1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

avutil: add alignment needed for AVX-512

This commit is contained in:
James Darnley 2017-10-26 19:51:37 +02:00 committed by James Darnley
parent 4783a01c11
commit e2218ed8ce
2 changed files with 3 additions and 1 deletions

View File

@ -61,7 +61,7 @@ void free(void *ptr);
#include "mem_internal.h" #include "mem_internal.h"
#define ALIGN (HAVE_AVX ? 32 : 16) #define ALIGN (HAVE_AVX512 ? 64 : (HAVE_AVX ? 32 : 16))
/* NOTE: if you want to override these functions with your own /* NOTE: if you want to override these functions with your own
* implementations (not recommended) you have to link libav* as * implementations (not recommended) you have to link libav* as

View File

@ -246,6 +246,8 @@ size_t ff_get_cpu_max_align_x86(void)
{ {
int flags = av_get_cpu_flags(); int flags = av_get_cpu_flags();
if (flags & AV_CPU_FLAG_AVX512)
return 64;
if (flags & (AV_CPU_FLAG_AVX2 | if (flags & (AV_CPU_FLAG_AVX2 |
AV_CPU_FLAG_AVX | AV_CPU_FLAG_AVX |
AV_CPU_FLAG_XOP | AV_CPU_FLAG_XOP |