diff options
author | Anton Khirnov <anton@khirnov.net> | 2017-02-08 09:32:17 +0100 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2017-02-11 11:37:45 +0100 |
commit | e6bff23f1e11aefb16a2b5d6ee72bf7469c5a66e (patch) | |
tree | a5093654857657901adc9792b40a93a974e5be50 /libavutil/cpu.h | |
parent | 5c8a5765dc5f4e29afb85b95be393c30f45412a8 (diff) |
cpu: add a function for querying maximum required data alignment
Diffstat (limited to 'libavutil/cpu.h')
-rw-r--r-- | libavutil/cpu.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/libavutil/cpu.h b/libavutil/cpu.h index c205ee16f6..4dcde27dbe 100644 --- a/libavutil/cpu.h +++ b/libavutil/cpu.h @@ -21,6 +21,8 @@ #ifndef AVUTIL_CPU_H #define AVUTIL_CPU_H +#include <stddef.h> + #include "version.h" #define AV_CPU_FLAG_FORCE 0x80000000 /* force usage of selected flags (OR) */ @@ -88,4 +90,15 @@ int av_parse_cpu_flags(const char *s); */ int av_cpu_count(void); +/** + * Get the maximum data alignment that may be required by Libav. + * + * Note that this is affected by the build configuration and the CPU flags mask, + * so e.g. if the CPU supports AVX, but libavutil has been built with + * --disable-avx or the AV_CPU_FLAG_AVX flag has been disabled through + * av_set_cpu_flags_mask(), then this function will behave as if AVX is not + * present. + */ +size_t av_cpu_max_align(void); + #endif /* AVUTIL_CPU_H */ |