diff options
author | Jiaxun Yang <jiaxun.yang@flygoat.com> | 2020-07-18 23:35:39 +0800 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2020-07-23 17:21:58 +0200 |
commit | e387fcd01cb84d9493f3b96158addd2a85f086c6 (patch) | |
tree | 069646752e201a2b21d44740ef0dc19238d39689 /libavutil/cpu.h | |
parent | d5380f068d8c28ab3d2ffcea445a2a8072c30503 (diff) |
libavutil: Detect MMI and MSA flags for MIPS
Add MMI & MSA runtime detection for MIPS.
Basically there are two code pathes. For systems that
natively support CPUCFG instruction or kernel emulated
that instruction, we'll sense this feature from HWCAP and
report the flags according to values grab from CPUCFG. For
systems that have no CPUCFG (or not export it in HWCAP),
we'll parse /proc/cpuinfo instead.
Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
Reviewed-by: Shiyou Yin <yinshiyou-hf@loongson.cn>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavutil/cpu.h')
-rw-r--r-- | libavutil/cpu.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libavutil/cpu.h b/libavutil/cpu.h index 8bb9eb606b..83099dd969 100644 --- a/libavutil/cpu.h +++ b/libavutil/cpu.h @@ -71,6 +71,9 @@ #define AV_CPU_FLAG_VFP_VM (1 << 7) ///< VFPv2 vector mode, deprecated in ARMv7-A and unavailable in various CPUs implementations #define AV_CPU_FLAG_SETEND (1 <<16) +#define AV_CPU_FLAG_MMI (1 << 0) +#define AV_CPU_FLAG_MSA (1 << 1) + /** * Return the flags which specify extensions supported by the CPU. * The returned value is affected by av_force_cpu_flags() if that was used |