mirror of
https://gitee.com/openharmony/third_party_ffmpeg
synced 2024-11-24 03:39:45 +00:00
Merge commit '4d6ee0725553a43ba88d6f8327ebcf8f1c5ae8d4'
* commit '4d6ee0725553a43ba88d6f8327ebcf8f1c5ae8d4':
libavutil: x86: Add AVX2 capable CPU detection.
Conflicts:
libavutil/cpu.c
libavutil/cpu.h
libavutil/x86/cpu.c
See: 865b70bc5d
Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
commit
a665704402
@ -269,7 +269,7 @@ static const struct {
|
||||
{ AV_CPU_FLAG_3DNOW, "3dnow" },
|
||||
{ AV_CPU_FLAG_3DNOWEXT, "3dnowext" },
|
||||
{ AV_CPU_FLAG_CMOV, "cmov" },
|
||||
{ AV_CPU_FLAG_AVX2, "avx2" },
|
||||
{ AV_CPU_FLAG_AVX2, "avx2" },
|
||||
#endif
|
||||
{ 0 }
|
||||
};
|
||||
|
@ -52,7 +52,6 @@
|
||||
// #endif
|
||||
#define AV_CPU_FLAG_AVX2 0x8000 ///< AVX2 functions: requires OS support even if YMM registers aren't used
|
||||
|
||||
|
||||
#define AV_CPU_FLAG_ALTIVEC 0x0001 ///< standard
|
||||
|
||||
#define AV_CPU_FLAG_ARMV5TE (1 << 0)
|
||||
|
@ -134,13 +134,14 @@ int ff_get_cpu_flags_x86(void)
|
||||
if ((eax & 0x6) == 0x6)
|
||||
rval |= AV_CPU_FLAG_AVX;
|
||||
}
|
||||
if (HAVE_AVX2 && max_std_level >= 7)
|
||||
{
|
||||
#if HAVE_AVX2
|
||||
if (max_std_level >= 7) {
|
||||
cpuid(7, eax, ebx, ecx, edx);
|
||||
if (ebx&0x00000020)
|
||||
rval |= AV_CPU_FLAG_AVX2;
|
||||
/* TODO: BMI1/2 */
|
||||
}
|
||||
#endif /* HAVE_AVX2 */
|
||||
#endif /* HAVE_AVX */
|
||||
#endif /* HAVE_SSE */
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user