react-native-vision-camera-spoof-detector 1.1.23 → 1.1.25

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (200) hide show
  1. package/android/CMakeLists.txt +12 -0
  2. package/android/build.gradle +10 -9
  3. package/android/src/main/cpp/cpp-adapter.cpp +6 -3
  4. package/ios/HybridSpoofDetectorOutput.swift +112 -72
  5. package/package.json +1 -1
  6. package/android/src/main/cpp/CMakeLists.txt +0 -33
  7. package/android/src/main/cpp/FaceAntiSpoofJSI.cpp +0 -142
  8. package/android/src/main/cpp/FastYuvJni.cpp +0 -111
  9. package/android/src/main/cpp/fast_yuv.cpp +0 -342
  10. package/android/src/main/cpp/fast_yuv.h +0 -23
  11. package/android/src/main/cpp/libyuv/.clang-format +0 -6
  12. package/android/src/main/cpp/libyuv/.gn +0 -40
  13. package/android/src/main/cpp/libyuv/.vpython3 +0 -410
  14. package/android/src/main/cpp/libyuv/AUTHORS +0 -7
  15. package/android/src/main/cpp/libyuv/Android.bp +0 -202
  16. package/android/src/main/cpp/libyuv/Android.mk +0 -106
  17. package/android/src/main/cpp/libyuv/BUILD.gn +0 -490
  18. package/android/src/main/cpp/libyuv/CM_linux_packages.cmake +0 -70
  19. package/android/src/main/cpp/libyuv/CMakeLists.txt +0 -259
  20. package/android/src/main/cpp/libyuv/DEPS +0 -935
  21. package/android/src/main/cpp/libyuv/DIR_METADATA +0 -3
  22. package/android/src/main/cpp/libyuv/LICENSE +0 -29
  23. package/android/src/main/cpp/libyuv/OWNERS +0 -11
  24. package/android/src/main/cpp/libyuv/PATENTS +0 -24
  25. package/android/src/main/cpp/libyuv/PRESUBMIT.py +0 -65
  26. package/android/src/main/cpp/libyuv/README.chromium +0 -11
  27. package/android/src/main/cpp/libyuv/README.md +0 -19
  28. package/android/src/main/cpp/libyuv/build_overrides/build.gni +0 -60
  29. package/android/src/main/cpp/libyuv/build_overrides/gtest.gni +0 -19
  30. package/android/src/main/cpp/libyuv/build_overrides/partition_alloc.gni +0 -17
  31. package/android/src/main/cpp/libyuv/codereview.settings +0 -5
  32. package/android/src/main/cpp/libyuv/docs/deprecated_builds.md +0 -409
  33. package/android/src/main/cpp/libyuv/docs/environment_variables.md +0 -64
  34. package/android/src/main/cpp/libyuv/docs/feature_detection.md +0 -108
  35. package/android/src/main/cpp/libyuv/docs/filtering.md +0 -196
  36. package/android/src/main/cpp/libyuv/docs/formats.md +0 -208
  37. package/android/src/main/cpp/libyuv/docs/getting_started.md +0 -296
  38. package/android/src/main/cpp/libyuv/docs/rotation.md +0 -107
  39. package/android/src/main/cpp/libyuv/download_vs_toolchain.py +0 -29
  40. package/android/src/main/cpp/libyuv/include/libyuv/basic_types.h +0 -68
  41. package/android/src/main/cpp/libyuv/include/libyuv/compare.h +0 -111
  42. package/android/src/main/cpp/libyuv/include/libyuv/compare_row.h +0 -112
  43. package/android/src/main/cpp/libyuv/include/libyuv/convert.h +0 -1117
  44. package/android/src/main/cpp/libyuv/include/libyuv/convert_argb.h +0 -2335
  45. package/android/src/main/cpp/libyuv/include/libyuv/convert_from.h +0 -203
  46. package/android/src/main/cpp/libyuv/include/libyuv/convert_from_argb.h +0 -394
  47. package/android/src/main/cpp/libyuv/include/libyuv/cpu_id.h +0 -147
  48. package/android/src/main/cpp/libyuv/include/libyuv/cpu_support.h +0 -99
  49. package/android/src/main/cpp/libyuv/include/libyuv/loongson_intrinsics.h +0 -1949
  50. package/android/src/main/cpp/libyuv/include/libyuv/mjpeg_decoder.h +0 -195
  51. package/android/src/main/cpp/libyuv/include/libyuv/planar_functions.h +0 -1131
  52. package/android/src/main/cpp/libyuv/include/libyuv/rotate.h +0 -296
  53. package/android/src/main/cpp/libyuv/include/libyuv/rotate_argb.h +0 -37
  54. package/android/src/main/cpp/libyuv/include/libyuv/rotate_row.h +0 -265
  55. package/android/src/main/cpp/libyuv/include/libyuv/row.h +0 -6738
  56. package/android/src/main/cpp/libyuv/include/libyuv/row_sve.h +0 -2154
  57. package/android/src/main/cpp/libyuv/include/libyuv/scale.h +0 -336
  58. package/android/src/main/cpp/libyuv/include/libyuv/scale_argb.h +0 -76
  59. package/android/src/main/cpp/libyuv/include/libyuv/scale_rgb.h +0 -42
  60. package/android/src/main/cpp/libyuv/include/libyuv/scale_row.h +0 -1726
  61. package/android/src/main/cpp/libyuv/include/libyuv/scale_uv.h +0 -51
  62. package/android/src/main/cpp/libyuv/include/libyuv/version.h +0 -16
  63. package/android/src/main/cpp/libyuv/include/libyuv/video_common.h +0 -222
  64. package/android/src/main/cpp/libyuv/include/libyuv.h +0 -33
  65. package/android/src/main/cpp/libyuv/infra/config/OWNERS +0 -3
  66. package/android/src/main/cpp/libyuv/infra/config/PRESUBMIT.py +0 -17
  67. package/android/src/main/cpp/libyuv/infra/config/README.md +0 -2
  68. package/android/src/main/cpp/libyuv/infra/config/codereview.settings +0 -6
  69. package/android/src/main/cpp/libyuv/infra/config/commit-queue.cfg +0 -144
  70. package/android/src/main/cpp/libyuv/infra/config/cr-buildbucket.cfg +0 -1185
  71. package/android/src/main/cpp/libyuv/infra/config/luci-logdog.cfg +0 -9
  72. package/android/src/main/cpp/libyuv/infra/config/luci-milo.cfg +0 -246
  73. package/android/src/main/cpp/libyuv/infra/config/luci-scheduler.cfg +0 -385
  74. package/android/src/main/cpp/libyuv/infra/config/main.star +0 -402
  75. package/android/src/main/cpp/libyuv/infra/config/project.cfg +0 -16
  76. package/android/src/main/cpp/libyuv/infra/config/realms.cfg +0 -111
  77. package/android/src/main/cpp/libyuv/libyuv.gni +0 -34
  78. package/android/src/main/cpp/libyuv/libyuv.gyp +0 -149
  79. package/android/src/main/cpp/libyuv/libyuv.gypi +0 -87
  80. package/android/src/main/cpp/libyuv/linux.mk +0 -96
  81. package/android/src/main/cpp/libyuv/public.mk +0 -13
  82. package/android/src/main/cpp/libyuv/pylintrc +0 -49
  83. package/android/src/main/cpp/libyuv/riscv_script/prepare_toolchain_qemu.sh +0 -74
  84. package/android/src/main/cpp/libyuv/riscv_script/riscv-clang.cmake +0 -56
  85. package/android/src/main/cpp/libyuv/riscv_script/run_qemu.sh +0 -15
  86. package/android/src/main/cpp/libyuv/source/compare.cc +0 -435
  87. package/android/src/main/cpp/libyuv/source/compare_common.cc +0 -74
  88. package/android/src/main/cpp/libyuv/source/compare_gcc.cc +0 -362
  89. package/android/src/main/cpp/libyuv/source/compare_neon.cc +0 -96
  90. package/android/src/main/cpp/libyuv/source/compare_neon64.cc +0 -223
  91. package/android/src/main/cpp/libyuv/source/compare_win.cc +0 -241
  92. package/android/src/main/cpp/libyuv/source/convert.cc +0 -4746
  93. package/android/src/main/cpp/libyuv/source/convert_argb.cc +0 -9179
  94. package/android/src/main/cpp/libyuv/source/convert_from.cc +0 -866
  95. package/android/src/main/cpp/libyuv/source/convert_from_argb.cc +0 -3671
  96. package/android/src/main/cpp/libyuv/source/convert_jpeg.cc +0 -602
  97. package/android/src/main/cpp/libyuv/source/convert_to_argb.cc +0 -391
  98. package/android/src/main/cpp/libyuv/source/convert_to_i420.cc +0 -288
  99. package/android/src/main/cpp/libyuv/source/cpu_id.cc +0 -496
  100. package/android/src/main/cpp/libyuv/source/mjpeg_decoder.cc +0 -580
  101. package/android/src/main/cpp/libyuv/source/mjpeg_validate.cc +0 -71
  102. package/android/src/main/cpp/libyuv/source/planar_functions.cc +0 -5663
  103. package/android/src/main/cpp/libyuv/source/rotate.cc +0 -1241
  104. package/android/src/main/cpp/libyuv/source/rotate_any.cc +0 -76
  105. package/android/src/main/cpp/libyuv/source/rotate_argb.cc +0 -259
  106. package/android/src/main/cpp/libyuv/source/rotate_common.cc +0 -208
  107. package/android/src/main/cpp/libyuv/source/rotate_gcc.cc +0 -505
  108. package/android/src/main/cpp/libyuv/source/rotate_lsx.cc +0 -233
  109. package/android/src/main/cpp/libyuv/source/rotate_neon.cc +0 -219
  110. package/android/src/main/cpp/libyuv/source/rotate_neon64.cc +0 -273
  111. package/android/src/main/cpp/libyuv/source/rotate_sme.cc +0 -174
  112. package/android/src/main/cpp/libyuv/source/rotate_win.cc +0 -253
  113. package/android/src/main/cpp/libyuv/source/row_any.cc +0 -2519
  114. package/android/src/main/cpp/libyuv/source/row_common.cc +0 -4461
  115. package/android/src/main/cpp/libyuv/source/row_gcc.cc +0 -9570
  116. package/android/src/main/cpp/libyuv/source/row_lasx.cc +0 -2343
  117. package/android/src/main/cpp/libyuv/source/row_lsx.cc +0 -3030
  118. package/android/src/main/cpp/libyuv/source/row_neon.cc +0 -4026
  119. package/android/src/main/cpp/libyuv/source/row_neon64.cc +0 -5617
  120. package/android/src/main/cpp/libyuv/source/row_rvv.cc +0 -2599
  121. package/android/src/main/cpp/libyuv/source/row_sme.cc +0 -1183
  122. package/android/src/main/cpp/libyuv/source/row_sve.cc +0 -1088
  123. package/android/src/main/cpp/libyuv/source/row_win.cc +0 -6453
  124. package/android/src/main/cpp/libyuv/source/scale.cc +0 -2710
  125. package/android/src/main/cpp/libyuv/source/scale_any.cc +0 -991
  126. package/android/src/main/cpp/libyuv/source/scale_argb.cc +0 -1158
  127. package/android/src/main/cpp/libyuv/source/scale_common.cc +0 -1977
  128. package/android/src/main/cpp/libyuv/source/scale_gcc.cc +0 -2947
  129. package/android/src/main/cpp/libyuv/source/scale_lsx.cc +0 -739
  130. package/android/src/main/cpp/libyuv/source/scale_neon.cc +0 -1449
  131. package/android/src/main/cpp/libyuv/source/scale_neon64.cc +0 -1552
  132. package/android/src/main/cpp/libyuv/source/scale_rgb.cc +0 -82
  133. package/android/src/main/cpp/libyuv/source/scale_rvv.cc +0 -1971
  134. package/android/src/main/cpp/libyuv/source/scale_sme.cc +0 -555
  135. package/android/src/main/cpp/libyuv/source/scale_uv.cc +0 -1159
  136. package/android/src/main/cpp/libyuv/source/scale_win.cc +0 -1392
  137. package/android/src/main/cpp/libyuv/source/test.sh +0 -35
  138. package/android/src/main/cpp/libyuv/source/video_common.cc +0 -62
  139. package/android/src/main/cpp/libyuv/tools_libyuv/OWNERS +0 -4
  140. package/android/src/main/cpp/libyuv/tools_libyuv/autoroller/roll_deps.py +0 -931
  141. package/android/src/main/cpp/libyuv/tools_libyuv/autoroller/unittests/roll_deps_test.py +0 -164
  142. package/android/src/main/cpp/libyuv/tools_libyuv/autoroller/unittests/testdata/DEPS +0 -21
  143. package/android/src/main/cpp/libyuv/tools_libyuv/autoroller/unittests/testdata/DEPS.chromium.new +0 -13
  144. package/android/src/main/cpp/libyuv/tools_libyuv/autoroller/unittests/testdata/DEPS.chromium.old +0 -13
  145. package/android/src/main/cpp/libyuv/tools_libyuv/get_landmines.py +0 -38
  146. package/android/src/main/cpp/libyuv/tools_libyuv/msan/OWNERS +0 -3
  147. package/android/src/main/cpp/libyuv/tools_libyuv/msan/blacklist.txt +0 -9
  148. package/android/src/main/cpp/libyuv/tools_libyuv/ubsan/OWNERS +0 -3
  149. package/android/src/main/cpp/libyuv/tools_libyuv/ubsan/blacklist.txt +0 -15
  150. package/android/src/main/cpp/libyuv/tools_libyuv/ubsan/vptr_blacklist.txt +0 -25
  151. package/android/src/main/cpp/libyuv/unit_test/basictypes_test.cc +0 -43
  152. package/android/src/main/cpp/libyuv/unit_test/color_test.cc +0 -848
  153. package/android/src/main/cpp/libyuv/unit_test/compare_test.cc +0 -739
  154. package/android/src/main/cpp/libyuv/unit_test/convert_argb_test.cc +0 -2867
  155. package/android/src/main/cpp/libyuv/unit_test/convert_test.cc +0 -2133
  156. package/android/src/main/cpp/libyuv/unit_test/cpu_test.cc +0 -427
  157. package/android/src/main/cpp/libyuv/unit_test/cpu_thread_test.cc +0 -63
  158. package/android/src/main/cpp/libyuv/unit_test/math_test.cc +0 -160
  159. package/android/src/main/cpp/libyuv/unit_test/planar_test.cc +0 -4731
  160. package/android/src/main/cpp/libyuv/unit_test/rotate_argb_test.cc +0 -334
  161. package/android/src/main/cpp/libyuv/unit_test/rotate_test.cc +0 -962
  162. package/android/src/main/cpp/libyuv/unit_test/scale_argb_test.cc +0 -590
  163. package/android/src/main/cpp/libyuv/unit_test/scale_plane_test.cc +0 -465
  164. package/android/src/main/cpp/libyuv/unit_test/scale_rgb_test.cc +0 -280
  165. package/android/src/main/cpp/libyuv/unit_test/scale_test.cc +0 -1135
  166. package/android/src/main/cpp/libyuv/unit_test/scale_uv_test.cc +0 -249
  167. package/android/src/main/cpp/libyuv/unit_test/testdata/arm_v7.txt +0 -12
  168. package/android/src/main/cpp/libyuv/unit_test/testdata/mips.txt +0 -7
  169. package/android/src/main/cpp/libyuv/unit_test/testdata/mips_loongson2k.txt +0 -5
  170. package/android/src/main/cpp/libyuv/unit_test/testdata/mips_loongson3.txt +0 -10
  171. package/android/src/main/cpp/libyuv/unit_test/testdata/mips_loongson_mmi.txt +0 -7
  172. package/android/src/main/cpp/libyuv/unit_test/testdata/riscv64.txt +0 -4
  173. package/android/src/main/cpp/libyuv/unit_test/testdata/riscv64_rvv.txt +0 -4
  174. package/android/src/main/cpp/libyuv/unit_test/testdata/riscv64_rvv_zvfh.txt +0 -4
  175. package/android/src/main/cpp/libyuv/unit_test/testdata/tegra3.txt +0 -23
  176. package/android/src/main/cpp/libyuv/unit_test/testdata/test0.jpg +0 -0
  177. package/android/src/main/cpp/libyuv/unit_test/testdata/test1.jpg +0 -0
  178. package/android/src/main/cpp/libyuv/unit_test/testdata/test2.jpg +0 -0
  179. package/android/src/main/cpp/libyuv/unit_test/testdata/test3.jpg +0 -0
  180. package/android/src/main/cpp/libyuv/unit_test/testdata/test4.jpg +0 -0
  181. package/android/src/main/cpp/libyuv/unit_test/unit_test.cc +0 -581
  182. package/android/src/main/cpp/libyuv/unit_test/unit_test.h +0 -232
  183. package/android/src/main/cpp/libyuv/unit_test/video_common_test.cc +0 -112
  184. package/android/src/main/cpp/libyuv/util/Makefile +0 -9
  185. package/android/src/main/cpp/libyuv/util/color.cc +0 -120
  186. package/android/src/main/cpp/libyuv/util/compare.cc +0 -67
  187. package/android/src/main/cpp/libyuv/util/cpuid.c +0 -211
  188. package/android/src/main/cpp/libyuv/util/i444tonv12_eg.cc +0 -28
  189. package/android/src/main/cpp/libyuv/util/psnr.cc +0 -291
  190. package/android/src/main/cpp/libyuv/util/psnr.h +0 -47
  191. package/android/src/main/cpp/libyuv/util/psnr_main.cc +0 -620
  192. package/android/src/main/cpp/libyuv/util/ssim.cc +0 -364
  193. package/android/src/main/cpp/libyuv/util/ssim.h +0 -38
  194. package/android/src/main/cpp/libyuv/util/yuvconstants.c +0 -114
  195. package/android/src/main/cpp/libyuv/util/yuvconvert.cc +0 -367
  196. package/android/src/main/cpp/libyuv/winarm.mk +0 -47
  197. package/android/src/main/java/com/faceantispoof/ByteBufferPool.kt +0 -68
  198. package/android/src/main/java/com/faceantispoof/FastYuv.kt +0 -51
  199. package/android/src/main/java/com/faceantispoof/YuvToFloatArrayConverter.kt +0 -584
  200. package/android/src/main/java/com/faceantispoof/YuvToRgbConverter.kt +0 -73
@@ -1,147 +0,0 @@
1
- /*
2
- * Copyright 2011 The LibYuv Project Authors. All rights reserved.
3
- *
4
- * Use of this source code is governed by a BSD-style license
5
- * that can be found in the LICENSE file in the root of the source
6
- * tree. An additional intellectual property rights grant can be found
7
- * in the file PATENTS. All contributing project authors may
8
- * be found in the AUTHORS file in the root of the source tree.
9
- */
10
-
11
- #ifndef INCLUDE_LIBYUV_CPU_ID_H_
12
- #define INCLUDE_LIBYUV_CPU_ID_H_
13
-
14
- #include "libyuv/basic_types.h"
15
-
16
- #ifdef __cplusplus
17
- namespace libyuv {
18
- extern "C" {
19
- #endif
20
-
21
- // Internal flag to indicate cpuid requires initialization.
22
- static const int kCpuInitialized = 0x1;
23
-
24
- // These flags are only valid on Arm processors.
25
- static const int kCpuHasARM = 0x2;
26
- static const int kCpuHasNEON = 0x100;
27
- static const int kCpuHasNeonDotProd = 0x200;
28
- static const int kCpuHasNeonI8MM = 0x400;
29
- static const int kCpuHasSVE = 0x800;
30
- static const int kCpuHasSVE2 = 0x1000;
31
- static const int kCpuHasSME = 0x2000;
32
- static const int kCpuHasSME2 = 0x4000;
33
- static const int kCpuHasSVEF32MM = 0x8000;
34
-
35
- // These flags are only valid on RISCV processors.
36
- static const int kCpuHasRISCV = 0x4;
37
- static const int kCpuHasRVV = 0x100;
38
- static const int kCpuHasRVVZVFH = 0x200;
39
-
40
- // These flags are only valid on x86 processors.
41
- static const int kCpuHasX86 = 0x8;
42
- static const int kCpuHasSSE2 = 0x100;
43
- static const int kCpuHasSSSE3 = 0x200;
44
- static const int kCpuHasSSE41 = 0x400;
45
- static const int kCpuHasSSE42 = 0x800;
46
- static const int kCpuHasAVX = 0x1000;
47
- static const int kCpuHasAVX2 = 0x2000;
48
- static const int kCpuHasERMS = 0x4000;
49
- static const int kCpuHasFSMR = 0x8000;
50
- static const int kCpuHasFMA3 = 0x10000;
51
- static const int kCpuHasF16C = 0x20000;
52
- static const int kCpuHasAVX512BW = 0x40000;
53
- static const int kCpuHasAVX512VL = 0x80000;
54
- static const int kCpuHasAVX512VNNI = 0x100000;
55
- static const int kCpuHasAVX512VBMI = 0x200000;
56
- static const int kCpuHasAVX512VBMI2 = 0x400000;
57
- static const int kCpuHasAVX512VBITALG = 0x800000;
58
- static const int kCpuHasAVX10 = 0x1000000;
59
- static const int kCpuHasAVX10_2 = 0x2000000;
60
- static const int kCpuHasAVXVNNI = 0x4000000;
61
- static const int kCpuHasAVXVNNIINT8 = 0x8000000;
62
- static const int kCpuHasAMXINT8 = 0x10000000;
63
-
64
- // These flags are only valid on LOONGARCH processors.
65
- static const int kCpuHasLOONGARCH = 0x20;
66
- static const int kCpuHasLSX = 0x100;
67
- static const int kCpuHasLASX = 0x200;
68
-
69
- // Optional init function. TestCpuFlag does an auto-init.
70
- // Returns cpu_info flags.
71
- LIBYUV_API
72
- int InitCpuFlags(void);
73
-
74
- // Detect CPU has SSE2 etc.
75
- // Test_flag parameter should be one of kCpuHas constants above.
76
- // Returns non-zero if instruction set is detected
77
- static __inline int TestCpuFlag(int test_flag) {
78
- LIBYUV_API extern int cpu_info_;
79
- #ifdef __ATOMIC_RELAXED
80
- int cpu_info = __atomic_load_n(&cpu_info_, __ATOMIC_RELAXED);
81
- #else
82
- int cpu_info = cpu_info_;
83
- #endif
84
- return (!cpu_info ? InitCpuFlags() : cpu_info) & test_flag;
85
- }
86
-
87
- // Internal function for parsing /proc/cpuinfo.
88
- LIBYUV_API
89
- int ArmCpuCaps(const char* cpuinfo_name);
90
- LIBYUV_API
91
- int RiscvCpuCaps(const char* cpuinfo_name);
92
-
93
- #ifdef __linux__
94
- // On Linux, parse AArch64 features from getauxval(AT_HWCAP{,2}).
95
- LIBYUV_API
96
- int AArch64CpuCaps(unsigned long hwcap, unsigned long hwcap2);
97
- #else
98
- LIBYUV_API
99
- int AArch64CpuCaps();
100
- #endif
101
-
102
- // For testing, allow CPU flags to be disabled.
103
- // ie MaskCpuFlags(~kCpuHasSSSE3) to disable SSSE3.
104
- // MaskCpuFlags(-1) to enable all cpu specific optimizations.
105
- // MaskCpuFlags(1) to disable all cpu specific optimizations.
106
- // MaskCpuFlags(0) to reset state so next call will auto init.
107
- // Returns cpu_info flags.
108
- LIBYUV_API
109
- int MaskCpuFlags(int enable_flags);
110
-
111
- // Sets the CPU flags to |cpu_flags|, bypassing the detection code. |cpu_flags|
112
- // should be a valid combination of the kCpuHas constants above and include
113
- // kCpuInitialized. Use this method when running in a sandboxed process where
114
- // the detection code might fail (as it might access /proc/cpuinfo). In such
115
- // cases the cpu_info can be obtained from a non sandboxed process by calling
116
- // InitCpuFlags() and passed to the sandboxed process (via command line
117
- // parameters, IPC...) which can then call this method to initialize the CPU
118
- // flags.
119
- // Notes:
120
- // - when specifying 0 for |cpu_flags|, the auto initialization is enabled
121
- // again.
122
- // - enabling CPU features that are not supported by the CPU will result in
123
- // undefined behavior.
124
- // TODO(fbarchard): consider writing a helper function that translates from
125
- // other library CPU info to libyuv CPU info and add a .md doc that explains
126
- // CPU detection.
127
- static __inline void SetCpuFlags(int cpu_flags) {
128
- LIBYUV_API extern int cpu_info_;
129
- #ifdef __ATOMIC_RELAXED
130
- __atomic_store_n(&cpu_info_, cpu_flags, __ATOMIC_RELAXED);
131
- #else
132
- cpu_info_ = cpu_flags;
133
- #endif
134
- }
135
-
136
- // Low level cpuid for X86. Returns zeros on other CPUs.
137
- // eax is the info type that you want.
138
- // ecx is typically the cpu number, and should normally be zero.
139
- LIBYUV_API
140
- void CpuId(int info_eax, int info_ecx, int* cpu_info);
141
-
142
- #ifdef __cplusplus
143
- } // extern "C"
144
- } // namespace libyuv
145
- #endif
146
-
147
- #endif // INCLUDE_LIBYUV_CPU_ID_H_
@@ -1,99 +0,0 @@
1
- /*
2
- * Copyright 2024 The LibYuv Project Authors. All rights reserved.
3
- *
4
- * Use of this source code is governed by a BSD-style license
5
- * that can be found in the LICENSE file in the root of the source
6
- * tree. An additional intellectual property rights grant can be found
7
- * in the file PATENTS. All contributing project authors may
8
- * be found in the AUTHORS file in the root of the source tree.
9
- */
10
-
11
- #ifndef INCLUDE_LIBYUV_CPU_SUPPORT_H_
12
- #define INCLUDE_LIBYUV_CPU_SUPPORT_H_
13
-
14
- #ifdef __cplusplus
15
- namespace libyuv {
16
- extern "C" {
17
- #endif
18
-
19
- #if defined(__pnacl__) || defined(__CLR_VER) || \
20
- (defined(__native_client__) && defined(__x86_64__)) || \
21
- (defined(__i386__) && !defined(__SSE__) && !defined(__clang__))
22
- #define LIBYUV_DISABLE_X86
23
- #endif
24
-
25
- #if defined(__native_client__)
26
- #define LIBYUV_DISABLE_NEON
27
- #endif
28
-
29
- // MemorySanitizer does not support assembly code yet. http://crbug.com/344505
30
- #if defined(__has_feature)
31
- #if __has_feature(memory_sanitizer)
32
- #if !defined(LIBYUV_DISABLE_NEON)
33
- #define LIBYUV_DISABLE_NEON
34
- #endif
35
- #if !defined(LIBYUV_DISABLE_SME)
36
- #define LIBYUV_DISABLE_SME
37
- #endif
38
- #if !defined(LIBYUV_DISABLE_SVE)
39
- #define LIBYUV_DISABLE_SVE
40
- #endif
41
- #if !defined(LIBYUV_DISABLE_X86)
42
- #define LIBYUV_DISABLE_X86
43
- #endif
44
- #endif // __has_feature(memory_sanitizer)
45
- #endif // defined(__has_feature)
46
-
47
- // clang >= 3.5.0 required for Arm64.
48
- #if defined(__clang__) && defined(__aarch64__) && !defined(LIBYUV_DISABLE_NEON)
49
- #if (__clang_major__ < 3) || (__clang_major__ == 3 && (__clang_minor__ < 5))
50
- #define LIBYUV_DISABLE_NEON
51
- #endif // clang >= 3.5
52
- #endif // __clang__
53
-
54
- // GCC >= 4.7.0 required for AVX2.
55
- #if defined(__GNUC__) && !defined(LIBYUV_ENABLE_ROWWIN) && \
56
- (defined(__x86_64__) || defined(__i386__))
57
- #if (__GNUC__ > 4) || (__GNUC__ == 4 && (__GNUC_MINOR__ >= 7))
58
- #define GCC_HAS_AVX2 1
59
- #endif // GNUC >= 4.7
60
- #endif // __GNUC__
61
-
62
- // clang >= 3.4.0 required for AVX2.
63
- #if defined(__clang__) && !defined(LIBYUV_ENABLE_ROWWIN) && \
64
- (defined(__x86_64__) || defined(__i386__))
65
- #if (__clang_major__ > 3) || (__clang_major__ == 3 && (__clang_minor__ >= 4))
66
- #define CLANG_HAS_AVX2 1
67
- #endif // clang >= 3.4
68
- #endif // __clang__
69
-
70
- // clang >= 6.0.0 required for AVX512.
71
- #if defined(__clang__) && !defined(LIBYUV_ENABLE_ROWWIN) && \
72
- (defined(__x86_64__) || defined(__i386__))
73
- // clang in xcode follows a different versioning scheme.
74
- // TODO(fbarchard): fix xcode 9 ios b/789.
75
- #if (__clang_major__ >= 7) && !defined(__APPLE__)
76
- #define CLANG_HAS_AVX512 1
77
- #endif // clang >= 7
78
- #endif // __clang__
79
-
80
- // Visual C 2012 required for AVX2.
81
- #if defined(_M_IX86) && \
82
- (!defined(__clang__) || defined(LIBYUV_ENABLE_ROWWIN)) && \
83
- defined(_MSC_VER) && _MSC_VER >= 1700
84
- #define VISUALC_HAS_AVX2 1
85
- #endif // VisualStudio >= 2012
86
-
87
- // Clang 19 required for SME due to needing __arm_tpidr2_save from compiler-rt,
88
- // only enabled on Linux and Android (both define __linux__) for now.
89
- #if !defined(LIBYUV_DISABLE_SME) && defined(__aarch64__) && \
90
- defined(__linux__) && defined(__clang__) && (__clang_major__ >= 19)
91
- #define CLANG_HAS_SME 1
92
- #endif
93
-
94
- #ifdef __cplusplus
95
- } // extern "C"
96
- } // namespace libyuv
97
- #endif
98
-
99
- #endif // INCLUDE_LIBYUV_CPU_SUPPORT_H_