mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-26 02:17:34 +09:00
Issue #2101 - Part 3: Update libyuv
Updated to version 1861, git revision 88b050f337cc0ca2a51800fe7bf4737222c87344 from https://chromium.googlesource.com/libyuv/libyuv/
This commit is contained in:
parent
42f3296899
commit
a4d1f57b9e
222 changed files with 111006 additions and 37106 deletions
|
|
@ -12,20 +12,25 @@
|
|||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#define INCLUDE_LIBYUV_COMPARE_H_
|
||||
#include "libyuv.h"
|
||||
#include "./psnr.h"
|
||||
#include "./ssim.h"
|
||||
#include "libyuv/cpu_id.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
using namespace libyuv;
|
||||
#endif
|
||||
|
||||
int main(int argc, const char* argv[]) {
|
||||
int cpu_flags = TestCpuFlag(-1);
|
||||
int has_arm = TestCpuFlag(kCpuHasARM);
|
||||
int has_mips = TestCpuFlag(kCpuHasMIPS);
|
||||
int has_x86 = TestCpuFlag(kCpuHasX86);
|
||||
int has_loongarch = TestCpuFlag(kCpuHasLOONGARCH);
|
||||
(void)argc;
|
||||
(void)argv;
|
||||
|
||||
#if defined(__i386__) || defined(__x86_64__) || \
|
||||
defined(_M_IX86) || defined(_M_X64)
|
||||
if (has_x86) {
|
||||
uint32 family, model, cpu_info[4];
|
||||
int family, model, cpu_info[4];
|
||||
// Vendor ID:
|
||||
// AuthenticAMD AMD processor
|
||||
// CentaurHauls Centaur processor
|
||||
|
|
@ -61,13 +66,20 @@ int main(int argc, const char* argv[]) {
|
|||
printf("Has ARM %x\n", has_arm);
|
||||
printf("Has MIPS %x\n", has_mips);
|
||||
printf("Has X86 %x\n", has_x86);
|
||||
printf("Has LOONGARCH %x\n", has_loongarch);
|
||||
if (has_arm) {
|
||||
int has_neon = TestCpuFlag(kCpuHasNEON);
|
||||
printf("Has NEON %x\n", has_neon);
|
||||
}
|
||||
if (has_mips) {
|
||||
int has_dspr2 = TestCpuFlag(kCpuHasDSPR2);
|
||||
printf("Has DSPR2 %x\n", has_dspr2);
|
||||
int has_msa = TestCpuFlag(kCpuHasMSA);
|
||||
printf("Has MSA %x\n", has_msa);
|
||||
}
|
||||
if (has_loongarch) {
|
||||
int has_lsx = TestCpuFlag(kCpuHasLSX);
|
||||
printf("Has LSX %x\n", has_lsx);
|
||||
int has_lasx = TestCpuFlag(kCpuHasLASX);
|
||||
printf("Has LASX %x\n", has_lasx);
|
||||
}
|
||||
if (has_x86) {
|
||||
int has_sse2 = TestCpuFlag(kCpuHasSSE2);
|
||||
|
|
@ -76,18 +88,34 @@ int main(int argc, const char* argv[]) {
|
|||
int has_sse42 = TestCpuFlag(kCpuHasSSE42);
|
||||
int has_avx = TestCpuFlag(kCpuHasAVX);
|
||||
int has_avx2 = TestCpuFlag(kCpuHasAVX2);
|
||||
int has_avx3 = TestCpuFlag(kCpuHasAVX3);
|
||||
int has_erms = TestCpuFlag(kCpuHasERMS);
|
||||
int has_fma3 = TestCpuFlag(kCpuHasFMA3);
|
||||
int has_f16c = TestCpuFlag(kCpuHasF16C);
|
||||
int has_gfni = TestCpuFlag(kCpuHasGFNI);
|
||||
int has_avx512bw = TestCpuFlag(kCpuHasAVX512BW);
|
||||
int has_avx512vl = TestCpuFlag(kCpuHasAVX512VL);
|
||||
int has_avx512vnni = TestCpuFlag(kCpuHasAVX512VNNI);
|
||||
int has_avx512vbmi = TestCpuFlag(kCpuHasAVX512VBMI);
|
||||
int has_avx512vbmi2 = TestCpuFlag(kCpuHasAVX512VBMI2);
|
||||
int has_avx512vbitalg = TestCpuFlag(kCpuHasAVX512VBITALG);
|
||||
int has_avx512vpopcntdq = TestCpuFlag(kCpuHasAVX512VPOPCNTDQ);
|
||||
printf("Has SSE2 %x\n", has_sse2);
|
||||
printf("Has SSSE3 %x\n", has_ssse3);
|
||||
printf("Has SSE4.1 %x\n", has_sse41);
|
||||
printf("Has SSE4.2 %x\n", has_sse42);
|
||||
printf("Has AVX %x\n", has_avx);
|
||||
printf("Has AVX2 %x\n", has_avx2);
|
||||
printf("Has AVX3 %x\n", has_avx3);
|
||||
printf("Has ERMS %x\n", has_erms);
|
||||
printf("Has FMA3 %x\n", has_fma3);
|
||||
printf("Has F16C %x\n", has_f16c);
|
||||
printf("Has GFNI %x\n", has_gfni);
|
||||
printf("Has AVX512BW %x\n", has_avx512bw);
|
||||
printf("Has AVX512VL %x\n", has_avx512vl);
|
||||
printf("Has AVX512VNNI %x\n", has_avx512vnni);
|
||||
printf("Has AVX512VBMI %x\n", has_avx512vbmi);
|
||||
printf("Has AVX512VBMI2 %x\n", has_avx512vbmi2);
|
||||
printf("Has AVX512VBITALG %x\n", has_avx512vbitalg);
|
||||
printf("Has AVX512VPOPCNTDQ %x\n", has_avx512vpopcntdq);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue