react-native-vision-camera-spoof-detector 1.0.5 → 1.0.7

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 (78) hide show
  1. package/android/.cxx/Debug/2a1it684/arm64-v8a/.ninja_deps +0 -0
  2. package/android/.cxx/Debug/2a1it684/arm64-v8a/.ninja_log +124 -62
  3. package/android/.cxx/Debug/2a1it684/arm64-v8a/CMakeFiles/CMakeOutput.log +22 -22
  4. package/android/.cxx/Debug/2a1it684/arm64-v8a/configure_fingerprint.bin +15 -15
  5. package/android/.cxx/Debug/2a1it684/armeabi-v7a/.cmake/api/v1/reply/{codemodel-v2-053850119b681f93cecc.json → codemodel-v2-52ac1d8b40b69596389b.json} +2 -2
  6. package/android/.cxx/Debug/2a1it684/armeabi-v7a/.cmake/api/v1/reply/{index-2025-11-18T18-09-57-0510.json → index-2025-11-25T14-14-30-0191.json} +2 -2
  7. package/android/.cxx/Debug/2a1it684/armeabi-v7a/.cmake/api/v1/reply/{target-yuv-Debug-a12ad49ff79080871bce.json → target-yuv-Debug-97f9e822dbd84a186d44.json} +2 -2
  8. package/android/.cxx/Debug/2a1it684/armeabi-v7a/.cmake/api/v1/reply/{target-yuv_shared-Debug-2b00e64621a56b8dd632.json → target-yuv_shared-Debug-3730d20e27c3481c06b2.json} +2 -2
  9. package/android/.cxx/Debug/2a1it684/armeabi-v7a/.ninja_deps +0 -0
  10. package/android/.cxx/Debug/2a1it684/armeabi-v7a/.ninja_log +117 -59
  11. package/android/.cxx/Debug/2a1it684/armeabi-v7a/CMakeFiles/CMakeOutput.log +20 -20
  12. package/android/.cxx/Debug/2a1it684/armeabi-v7a/configure_fingerprint.bin +15 -15
  13. package/android/.cxx/Debug/2a1it684/x86/.ninja_deps +0 -0
  14. package/android/.cxx/Debug/2a1it684/x86/.ninja_log +109 -55
  15. package/android/.cxx/Debug/2a1it684/x86/CMakeFiles/CMakeOutput.log +20 -20
  16. package/android/.cxx/Debug/2a1it684/x86/configure_fingerprint.bin +15 -15
  17. package/android/.cxx/Debug/2a1it684/x86_64/.ninja_deps +0 -0
  18. package/android/.cxx/Debug/2a1it684/x86_64/.ninja_log +109 -55
  19. package/android/.cxx/Debug/2a1it684/x86_64/CMakeFiles/CMakeOutput.log +20 -20
  20. package/android/.cxx/Debug/2a1it684/x86_64/configure_fingerprint.bin +15 -15
  21. package/android/build/.transforms/4ebf3dd0dca4f83fe1776360e21ded81/transformed/classes/classes_dex/classes.dex +0 -0
  22. package/android/build/.transforms/c0a07cd9442d741ad3cef3760159211f/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/faceantispoof/AntiSpoofingResult.dex +0 -0
  23. package/android/build/.transforms/c0a07cd9442d741ad3cef3760159211f/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/faceantispoof/FaceAntiSpoofFrameProcessor.dex +0 -0
  24. package/android/build/.transforms/c0a07cd9442d741ad3cef3760159211f/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/faceantispoof/FaceAntiSpoofingAdvanced$SpoofDetectionResult.dex +0 -0
  25. package/android/build/.transforms/c0a07cd9442d741ad3cef3760159211f/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/faceantispoof/FaceAntiSpoofingAdvanced.dex +0 -0
  26. package/android/build/.transforms/c0a07cd9442d741ad3cef3760159211f/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/faceantispoof/ImageFormatEncoder$ImageFormat.dex +0 -0
  27. package/android/build/.transforms/c0a07cd9442d741ad3cef3760159211f/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/faceantispoof/ImageFormatEncoder.dex +0 -0
  28. package/android/build/.transforms/c0a07cd9442d741ad3cef3760159211f/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/faceantispoof/YuvToFloatArrayConverter.dex +0 -0
  29. package/android/build/intermediates/compile_library_classes_jar/debug/bundleLibCompileToJarDebug/classes.jar +0 -0
  30. package/android/build/intermediates/cxx/Debug/2a1it684/logs/arm64-v8a/build_stdout_targets.txt +62 -1
  31. package/android/build/intermediates/cxx/Debug/2a1it684/logs/arm64-v8a/generate_cxx_metadata_456_timing.txt +9 -0
  32. package/android/build/intermediates/cxx/Debug/2a1it684/logs/armeabi-v7a/build_stdout_targets.txt +58 -1
  33. package/android/build/intermediates/cxx/Debug/2a1it684/logs/armeabi-v7a/{generate_cxx_metadata_1740_timing.txt → generate_cxx_metadata_455_timing.txt} +1 -1
  34. package/android/build/intermediates/cxx/Debug/2a1it684/logs/x86/build_stdout_targets.txt +54 -1
  35. package/android/build/intermediates/cxx/Debug/2a1it684/logs/{armeabi-v7a/generate_cxx_metadata_546_timing.txt → x86/generate_cxx_metadata_455_timing.txt} +1 -1
  36. package/android/build/intermediates/cxx/Debug/2a1it684/logs/x86_64/build_stdout_targets.txt +54 -1
  37. package/android/build/intermediates/cxx/Debug/2a1it684/logs/x86_64/generate_cxx_metadata_455_timing.txt +9 -0
  38. package/android/build/intermediates/incremental/debug/packageDebugResources/compile-file-map.properties +1 -1
  39. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/faceantispoof/AntiSpoofingResult.class +0 -0
  40. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/faceantispoof/FaceAntiSpoofFrameProcessor.class +0 -0
  41. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/faceantispoof/FaceAntiSpoofingAdvanced$SpoofDetectionResult.class +0 -0
  42. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/faceantispoof/FaceAntiSpoofingAdvanced.class +0 -0
  43. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/faceantispoof/ImageFormatEncoder$ImageFormat.class +0 -0
  44. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/faceantispoof/ImageFormatEncoder.class +0 -0
  45. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/faceantispoof/YuvToFloatArrayConverter.class +0 -0
  46. package/android/build/intermediates/runtime_library_classes_jar/debug/bundleLibRuntimeToJarDebug/classes.jar +0 -0
  47. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab +0 -0
  48. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.values.at +0 -0
  49. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab +0 -0
  50. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.keystream +0 -0
  51. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.keystream.len +0 -0
  52. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.len +0 -0
  53. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.values.at +0 -0
  54. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab_i +0 -0
  55. package/android/build/kotlin/compileDebugKotlin/cacheable/last-build.bin +0 -0
  56. package/android/build/kotlin/compileDebugKotlin/classpath-snapshot/shrunk-classpath-snapshot.bin +0 -0
  57. package/android/build/kotlin/compileDebugKotlin/local-state/build-history.bin +0 -0
  58. package/android/build/tmp/kotlin-classes/debug/com/faceantispoof/AntiSpoofingResult.class +0 -0
  59. package/android/build/tmp/kotlin-classes/debug/com/faceantispoof/FaceAntiSpoofFrameProcessor.class +0 -0
  60. package/android/build/tmp/kotlin-classes/debug/com/faceantispoof/FaceAntiSpoofingAdvanced$SpoofDetectionResult.class +0 -0
  61. package/android/build/tmp/kotlin-classes/debug/com/faceantispoof/FaceAntiSpoofingAdvanced.class +0 -0
  62. package/android/build/tmp/kotlin-classes/debug/com/faceantispoof/ImageFormatEncoder$ImageFormat.class +0 -0
  63. package/android/build/tmp/kotlin-classes/debug/com/faceantispoof/ImageFormatEncoder.class +0 -0
  64. package/android/build/tmp/kotlin-classes/debug/com/faceantispoof/YuvToFloatArrayConverter.class +0 -0
  65. package/android/src/main/java/com/faceantispoof/FaceAntiSpoofFrameProcessor.kt +26 -6
  66. package/android/src/main/java/com/faceantispoof/FaceAntiSpoofingAdvanced.kt +51 -20
  67. package/android/src/main/java/com/faceantispoof/ImageFormatEncoder.kt +217 -34
  68. package/android/src/main/java/com/faceantispoof/YuvToFloatArrayConverter.kt +103 -12
  69. package/package.json +1 -1
  70. package/android/build/intermediates/cxx/Debug/2a1it684/logs/arm64-v8a/generate_cxx_metadata_1740_timing.txt +0 -9
  71. package/android/build/intermediates/cxx/Debug/2a1it684/logs/arm64-v8a/generate_cxx_metadata_546_timing.txt +0 -10
  72. package/android/build/intermediates/cxx/Debug/2a1it684/logs/x86/generate_cxx_metadata_1740_timing.txt +0 -3
  73. package/android/build/intermediates/cxx/Debug/2a1it684/logs/x86/generate_cxx_metadata_548_timing.txt +0 -3
  74. package/android/build/intermediates/cxx/Debug/2a1it684/logs/x86_64/generate_cxx_metadata_1740_timing.txt +0 -9
  75. package/android/build/intermediates/cxx/Debug/2a1it684/logs/x86_64/generate_cxx_metadata_548_timing.txt +0 -9
  76. /package/android/.cxx/Debug/2a1it684/arm64-v8a/.cmake/api/v1/reply/{index-2025-11-24T15-42-26-0120.json → index-2025-11-25T14-48-56-0722.json} +0 -0
  77. /package/android/.cxx/Debug/2a1it684/x86/.cmake/api/v1/reply/{index-2025-11-18T18-10-04-0841.json → index-2025-11-25T14-14-37-0548.json} +0 -0
  78. /package/android/.cxx/Debug/2a1it684/x86_64/.cmake/api/v1/reply/{index-2025-11-24T15-42-27-0064.json → index-2025-11-25T14-49-17-0490.json} +0 -0
@@ -1,2 +1,63 @@
1
1
  ninja: Entering directory `C:\Users\jesco\Documents\Reactnative\myapp\node_modules\react-native-vision-camera-spoof-detector\android\.cxx\Debug\2a1it684\arm64-v8a'
2
- ninja: no work to do.
2
+ [1/62] Building CXX object libyuv/CMakeFiles/yuv_common_objects.dir/source/compare_common.cc.o
3
+ [2/62] Building CXX object libyuv/CMakeFiles/yuv_common_objects.dir/source/compare_win.cc.o
4
+ [3/62] Building CXX object CMakeFiles/fastyuv.dir/FastYuvJni.cpp.o
5
+ [4/62] Building CXX object libyuv/CMakeFiles/yuv_common_objects.dir/source/compare.cc.o
6
+ [5/62] Building CXX object libyuv/CMakeFiles/yuv_common_objects.dir/source/compare_gcc.cc.o
7
+ [6/62] Building CXX object libyuv/CMakeFiles/yuv_common_objects.dir/source/convert.cc.o
8
+ [7/62] Building CXX object libyuv/CMakeFiles/yuv_common_objects.dir/source/convert_from.cc.o
9
+ [8/62] Building CXX object libyuv/CMakeFiles/yuv_common_objects.dir/source/convert_argb.cc.o
10
+ [9/62] Building CXX object libyuv/CMakeFiles/yuv_common_objects.dir/source/convert_from_argb.cc.o
11
+ [10/62] Building CXX object libyuv/CMakeFiles/yuv_common_objects.dir/source/convert_to_i420.cc.o
12
+ [11/62] Building CXX object libyuv/CMakeFiles/yuv_common_objects.dir/source/convert_jpeg.cc.o
13
+ [12/62] Building CXX object libyuv/CMakeFiles/yuv_common_objects.dir/source/mjpeg_decoder.cc.o
14
+ [13/62] Building CXX object libyuv/CMakeFiles/yuv_common_objects.dir/source/convert_to_argb.cc.o
15
+ [14/62] Building CXX object libyuv/CMakeFiles/yuv_common_objects.dir/source/cpu_id.cc.o
16
+ [15/62] Building CXX object libyuv/CMakeFiles/yuv_common_objects.dir/source/mjpeg_validate.cc.o
17
+ [16/62] Building CXX object libyuv/CMakeFiles/yuv_common_objects.dir/source/planar_functions.cc.o
18
+ [17/62] Building CXX object libyuv/CMakeFiles/yuv_common_objects.dir/source/rotate_common.cc.o
19
+ [18/62] Building CXX object libyuv/CMakeFiles/yuv_common_objects.dir/source/rotate.cc.o
20
+ [19/62] Building CXX object libyuv/CMakeFiles/yuv_common_objects.dir/source/rotate_any.cc.o
21
+ [20/62] Building CXX object libyuv/CMakeFiles/yuv_common_objects.dir/source/rotate_lsx.cc.o
22
+ [21/62] Building CXX object libyuv/CMakeFiles/yuv_common_objects.dir/source/rotate_win.cc.o
23
+ [22/62] Building CXX object CMakeFiles/faceantispoof.dir/FaceAntiSpoofJSI.cpp.o
24
+ [23/62] Building CXX object libyuv/CMakeFiles/yuv_common_objects.dir/source/rotate_argb.cc.o
25
+ [24/62] Building CXX object libyuv/CMakeFiles/yuv_common_objects.dir/source/row_gcc.cc.o
26
+ [25/62] Building CXX object libyuv/CMakeFiles/yuv_common_objects.dir/source/row_lasx.cc.o
27
+ [26/62] Building CXX object libyuv/CMakeFiles/yuv_common_objects.dir/source/rotate_gcc.cc.o
28
+ [27/62] Building CXX object CMakeFiles/fastyuv.dir/fast_yuv.cpp.o
29
+ [28/62] Building CXX object libyuv/CMakeFiles/yuv_common_objects.dir/source/row_lsx.cc.o
30
+ [29/62] Building CXX object libyuv/CMakeFiles/yuv_common_objects.dir/source/scale_any.cc.o
31
+ [30/62] Building CXX object libyuv/CMakeFiles/yuv_common_objects.dir/source/scale_gcc.cc.o
32
+ [31/62] Building CXX object libyuv/CMakeFiles/yuv_common_objects.dir/source/row_common.cc.o
33
+ [32/62] Building CXX object libyuv/CMakeFiles/yuv_common_objects.dir/source/scale_argb.cc.o
34
+ [33/62] Building CXX object CMakeFiles/faceantispoof.dir/c9fdc8b0d027394fa06b64ba7ac7706f/react-native/ReactCommon/jsi/jsi/jsi.cpp.o
35
+ [34/62] Building CXX object libyuv/CMakeFiles/yuv_common_objects.dir/source/row_win.cc.o
36
+ [35/62] Building CXX object libyuv/CMakeFiles/yuv_common_objects.dir/source/row_rvv.cc.o
37
+ [36/62] Building CXX object libyuv/CMakeFiles/yuv_common_objects.dir/source/row_any.cc.o
38
+ [37/62] Building CXX object libyuv/CMakeFiles/yuv_common_objects.dir/source/scale_lsx.cc.o
39
+ [38/62] Building CXX object libyuv/CMakeFiles/yuv_common_objects.dir/source/scale.cc.o
40
+ [39/62] Building CXX object libyuv/CMakeFiles/yuv_common_objects.dir/source/video_common.cc.o
41
+ [40/62] Building CXX object libyuv/CMakeFiles/yuv_common_objects.dir/source/scale_common.cc.o
42
+ [41/62] Building CXX object libyuv/CMakeFiles/yuv_common_objects.dir/source/scale_win.cc.o
43
+ [42/62] Building CXX object libyuv/CMakeFiles/yuv_neon64.dir/source/rotate_neon64.cc.o
44
+ [43/62] Building CXX object libyuv/CMakeFiles/yuv_neon64.dir/source/compare_neon64.cc.o
45
+ [44/62] Building CXX object libyuv/CMakeFiles/yuv_common_objects.dir/source/scale_rvv.cc.o
46
+ [45/62] Building CXX object libyuv/CMakeFiles/yuv_common_objects.dir/source/scale_uv.cc.o
47
+ [46/62] Building CXX object libyuv/CMakeFiles/yuv_common_objects.dir/source/scale_rgb.cc.o
48
+ [47/62] Building CXX object libyuv/CMakeFiles/yuv_sme.dir/source/row_sme.cc.o
49
+ [48/62] Building CXX object libyuv/CMakeFiles/yuv_neon64.dir/source/scale_neon64.cc.o
50
+ [49/62] Building CXX object libyuv/CMakeFiles/yuv_neon64.dir/source/row_neon64.cc.o
51
+ [50/62] Building CXX object libyuv/CMakeFiles/yuv_sme.dir/source/rotate_sme.cc.o
52
+ [51/62] Linking CXX shared library C:\Users\jesco\Documents\Reactnative\myapp\node_modules\react-native-vision-camera-spoof-detector\android\build\intermediates\cxx\Debug\2a1it684\obj\arm64-v8a\libfaceantispoof.so
53
+ [52/62] Building CXX object libyuv/CMakeFiles/yuv_sme.dir/source/scale_sme.cc.o
54
+ [53/62] Building CXX object libyuv/CMakeFiles/yuv_sve.dir/source/row_sve.cc.o
55
+ [54/62] Building CXX object libyuv/CMakeFiles/yuvconvert.dir/util/yuvconvert.cc.o
56
+ [55/62] Building C object libyuv/CMakeFiles/yuvconstants.dir/util/yuvconstants.c.o
57
+ [56/62] Building C object libyuv/CMakeFiles/cpuid.dir/util/cpuid.c.o
58
+ [57/62] Linking CXX shared library C:\Users\jesco\Documents\Reactnative\myapp\node_modules\react-native-vision-camera-spoof-detector\android\build\intermediates\cxx\Debug\2a1it684\obj\arm64-v8a\libyuv.so
59
+ [58/62] Linking CXX static library libyuv\libyuv.a
60
+ [59/62] Linking CXX shared library C:\Users\jesco\Documents\Reactnative\myapp\node_modules\react-native-vision-camera-spoof-detector\android\build\intermediates\cxx\Debug\2a1it684\obj\arm64-v8a\libfastyuv.so
61
+ [60/62] Linking CXX executable C:\Users\jesco\Documents\Reactnative\myapp\node_modules\react-native-vision-camera-spoof-detector\android\build\intermediates\cxx\Debug\2a1it684\obj\arm64-v8a\cpuid
62
+ [61/62] Linking CXX executable C:\Users\jesco\Documents\Reactnative\myapp\node_modules\react-native-vision-camera-spoof-detector\android\build\intermediates\cxx\Debug\2a1it684\obj\arm64-v8a\yuvconvert
63
+ [62/62] Linking CXX executable C:\Users\jesco\Documents\Reactnative\myapp\node_modules\react-native-vision-camera-spoof-detector\android\build\intermediates\cxx\Debug\2a1it684\obj\arm64-v8a\yuvconstants
@@ -0,0 +1,9 @@
1
+ # C/C++ build system timings
2
+ generate_cxx_metadata
3
+ execute-generate-process
4
+ exec-configure 718ms
5
+ [gap of 21ms]
6
+ execute-generate-process completed in 741ms
7
+ [gap of 17ms]
8
+ generate_cxx_metadata completed in 767ms
9
+
@@ -1,2 +1,59 @@
1
1
  ninja: Entering directory `C:\Users\jesco\Documents\Reactnative\myapp\node_modules\react-native-vision-camera-spoof-detector\android\.cxx\Debug\2a1it684\armeabi-v7a'
2
- ninja: no work to do.
2
+ [1/58] Building CXX object libyuv/CMakeFiles/yuv_common_objects.dir/source/compare_gcc.cc.o
3
+ [2/58] Building CXX object CMakeFiles/fastyuv.dir/FastYuvJni.cpp.o
4
+ [3/58] Building CXX object libyuv/CMakeFiles/yuv_common_objects.dir/source/compare_common.cc.o
5
+ [4/58] Building CXX object libyuv/CMakeFiles/yuv_common_objects.dir/source/compare_win.cc.o
6
+ [5/58] Building CXX object libyuv/CMakeFiles/yuv_common_objects.dir/source/compare.cc.o
7
+ [6/58] Building CXX object libyuv/CMakeFiles/yuv_common_objects.dir/source/convert.cc.o
8
+ [7/58] Building CXX object libyuv/CMakeFiles/yuv_common_objects.dir/source/convert_from_argb.cc.o
9
+ [8/58] Building CXX object libyuv/CMakeFiles/yuv_common_objects.dir/source/convert_from.cc.o
10
+ [9/58] Building CXX object libyuv/CMakeFiles/yuv_common_objects.dir/source/convert_jpeg.cc.o
11
+ [10/58] Building CXX object libyuv/CMakeFiles/yuv_common_objects.dir/source/convert_argb.cc.o
12
+ [11/58] Building CXX object libyuv/CMakeFiles/yuv_common_objects.dir/source/convert_to_i420.cc.o
13
+ [12/58] Building CXX object libyuv/CMakeFiles/yuv_common_objects.dir/source/rotate_gcc.cc.o
14
+ [13/58] Building CXX object libyuv/CMakeFiles/yuv_common_objects.dir/source/mjpeg_decoder.cc.o
15
+ [14/58] Building CXX object libyuv/CMakeFiles/yuv_common_objects.dir/source/convert_to_argb.cc.o
16
+ [15/58] Building CXX object libyuv/CMakeFiles/yuv_common_objects.dir/source/cpu_id.cc.o
17
+ [16/58] Building CXX object libyuv/CMakeFiles/yuv_common_objects.dir/source/rotate_any.cc.o
18
+ [17/58] Building CXX object libyuv/CMakeFiles/yuv_common_objects.dir/source/rotate.cc.o
19
+ [18/58] Building CXX object libyuv/CMakeFiles/yuv_common_objects.dir/source/planar_functions.cc.o
20
+ [19/58] Building CXX object CMakeFiles/faceantispoof.dir/FaceAntiSpoofJSI.cpp.o
21
+ [20/58] Building CXX object libyuv/CMakeFiles/yuv_common_objects.dir/source/rotate_common.cc.o
22
+ [21/58] Building CXX object libyuv/CMakeFiles/yuv_common_objects.dir/source/rotate_argb.cc.o
23
+ [22/58] Building CXX object libyuv/CMakeFiles/yuv_common_objects.dir/source/mjpeg_validate.cc.o
24
+ [23/58] Building CXX object CMakeFiles/fastyuv.dir/fast_yuv.cpp.o
25
+ [24/58] Building CXX object libyuv/CMakeFiles/yuv_common_objects.dir/source/row_gcc.cc.o
26
+ [25/58] Building CXX object CMakeFiles/faceantispoof.dir/c9fdc8b0d027394fa06b64ba7ac7706f/react-native/ReactCommon/jsi/jsi/jsi.cpp.o
27
+ [26/58] Building CXX object libyuv/CMakeFiles/yuv_common_objects.dir/source/rotate_lsx.cc.o
28
+ [27/58] Building CXX object libyuv/CMakeFiles/yuv_common_objects.dir/source/rotate_win.cc.o
29
+ [28/58] Building CXX object libyuv/CMakeFiles/yuv_common_objects.dir/source/row_lasx.cc.o
30
+ [29/58] Building CXX object libyuv/CMakeFiles/yuv_common_objects.dir/source/row_any.cc.o
31
+ [30/58] Building CXX object libyuv/CMakeFiles/yuv_common_objects.dir/source/scale_any.cc.o
32
+ [31/58] Building CXX object libyuv/CMakeFiles/yuv_common_objects.dir/source/scale_argb.cc.o
33
+ [32/58] Building CXX object libyuv/CMakeFiles/yuv_common_objects.dir/source/row_common.cc.o
34
+ [33/58] Building CXX object libyuv/CMakeFiles/yuv_common_objects.dir/source/row_lsx.cc.o
35
+ [34/58] Building CXX object libyuv/CMakeFiles/yuv_common_objects.dir/source/row_win.cc.o
36
+ [35/58] Linking CXX shared library C:\Users\jesco\Documents\Reactnative\myapp\node_modules\react-native-vision-camera-spoof-detector\android\build\intermediates\cxx\Debug\2a1it684\obj\armeabi-v7a\libfaceantispoof.so
37
+ [36/58] Building CXX object libyuv/CMakeFiles/yuv_common_objects.dir/source/row_rvv.cc.o
38
+ [37/58] Building CXX object libyuv/CMakeFiles/yuv_common_objects.dir/source/scale_lsx.cc.o
39
+ [38/58] Building CXX object libyuv/CMakeFiles/yuv_common_objects.dir/source/scale_rvv.cc.o
40
+ [39/58] Building CXX object libyuv/CMakeFiles/yuv_common_objects.dir/source/scale_gcc.cc.o
41
+ [40/58] Building CXX object libyuv/CMakeFiles/yuv_common_objects.dir/source/scale_rgb.cc.o
42
+ [41/58] Building CXX object libyuv/CMakeFiles/yuv_common_objects.dir/source/scale_uv.cc.o
43
+ [42/58] Building CXX object libyuv/CMakeFiles/yuv_common_objects.dir/source/video_common.cc.o
44
+ [43/58] Building CXX object libyuv/CMakeFiles/yuv_common_objects.dir/source/scale_win.cc.o
45
+ [44/58] Building CXX object libyuv/CMakeFiles/yuv_neon.dir/source/rotate_neon.cc.o
46
+ [45/58] Building CXX object libyuv/CMakeFiles/yuv_common_objects.dir/source/scale.cc.o
47
+ [46/58] Building CXX object libyuv/CMakeFiles/yuv_common_objects.dir/source/scale_common.cc.o
48
+ [47/58] Building CXX object libyuv/CMakeFiles/yuv_neon.dir/source/compare_neon.cc.o
49
+ [48/58] Building C object libyuv/CMakeFiles/cpuid.dir/util/cpuid.c.o
50
+ [49/58] Building C object libyuv/CMakeFiles/yuvconstants.dir/util/yuvconstants.c.o
51
+ [50/58] Building CXX object libyuv/CMakeFiles/yuvconvert.dir/util/yuvconvert.cc.o
52
+ [51/58] Building CXX object libyuv/CMakeFiles/yuv_neon.dir/source/scale_neon.cc.o
53
+ [52/58] Building CXX object libyuv/CMakeFiles/yuv_neon.dir/source/row_neon.cc.o
54
+ [53/58] Linking CXX shared library C:\Users\jesco\Documents\Reactnative\myapp\node_modules\react-native-vision-camera-spoof-detector\android\build\intermediates\cxx\Debug\2a1it684\obj\armeabi-v7a\libyuv.so
55
+ [54/58] Linking CXX static library libyuv\libyuv.a
56
+ [55/58] Linking CXX executable C:\Users\jesco\Documents\Reactnative\myapp\node_modules\react-native-vision-camera-spoof-detector\android\build\intermediates\cxx\Debug\2a1it684\obj\armeabi-v7a\cpuid
57
+ [56/58] Linking CXX executable C:\Users\jesco\Documents\Reactnative\myapp\node_modules\react-native-vision-camera-spoof-detector\android\build\intermediates\cxx\Debug\2a1it684\obj\armeabi-v7a\yuvconvert
58
+ [57/58] Linking CXX executable C:\Users\jesco\Documents\Reactnative\myapp\node_modules\react-native-vision-camera-spoof-detector\android\build\intermediates\cxx\Debug\2a1it684\obj\armeabi-v7a\yuvconstants
59
+ [58/58] Linking CXX shared library C:\Users\jesco\Documents\Reactnative\myapp\node_modules\react-native-vision-camera-spoof-detector\android\build\intermediates\cxx\Debug\2a1it684\obj\armeabi-v7a\libfastyuv.so
@@ -1,3 +1,3 @@
1
1
  # C/C++ build system timings
2
- generate_cxx_metadata 14ms
2
+ generate_cxx_metadata 18ms
3
3
 
@@ -1,2 +1,55 @@
1
1
  ninja: Entering directory `C:\Users\jesco\Documents\Reactnative\myapp\node_modules\react-native-vision-camera-spoof-detector\android\.cxx\Debug\2a1it684\x86'
2
- ninja: no work to do.
2
+ [1/54] Building CXX object CMakeFiles/fastyuv.dir/FastYuvJni.cpp.o
3
+ [2/54] Building CXX object libyuv/CMakeFiles/yuv_common_objects.dir/source/compare_win.cc.o
4
+ [3/54] Building CXX object libyuv/CMakeFiles/yuv_common_objects.dir/source/compare.cc.o
5
+ [4/54] Building CXX object libyuv/CMakeFiles/yuv_common_objects.dir/source/compare_common.cc.o
6
+ [5/54] Building CXX object libyuv/CMakeFiles/yuv_common_objects.dir/source/compare_gcc.cc.o
7
+ [6/54] Building CXX object libyuv/CMakeFiles/yuv_common_objects.dir/source/convert_from_argb.cc.o
8
+ [7/54] Building CXX object libyuv/CMakeFiles/yuv_common_objects.dir/source/convert.cc.o
9
+ [8/54] Building CXX object libyuv/CMakeFiles/yuv_common_objects.dir/source/convert_jpeg.cc.o
10
+ [9/54] Building CXX object libyuv/CMakeFiles/yuv_common_objects.dir/source/convert_argb.cc.o
11
+ [10/54] Building CXX object libyuv/CMakeFiles/yuv_common_objects.dir/source/convert_to_argb.cc.o
12
+ [11/54] Building CXX object libyuv/CMakeFiles/yuv_common_objects.dir/source/convert_from.cc.o
13
+ [12/54] Building CXX object libyuv/CMakeFiles/yuv_common_objects.dir/source/convert_to_i420.cc.o
14
+ [13/54] Building CXX object libyuv/CMakeFiles/yuv_common_objects.dir/source/cpu_id.cc.o
15
+ [14/54] Building CXX object libyuv/CMakeFiles/yuv_common_objects.dir/source/mjpeg_decoder.cc.o
16
+ [15/54] Building CXX object libyuv/CMakeFiles/yuv_common_objects.dir/source/rotate_argb.cc.o
17
+ [16/54] Building CXX object libyuv/CMakeFiles/yuv_common_objects.dir/source/rotate_common.cc.o
18
+ [17/54] Building CXX object libyuv/CMakeFiles/yuv_common_objects.dir/source/rotate_any.cc.o
19
+ [18/54] Building CXX object libyuv/CMakeFiles/yuv_common_objects.dir/source/planar_functions.cc.o
20
+ [19/54] Building CXX object libyuv/CMakeFiles/yuv_common_objects.dir/source/mjpeg_validate.cc.o
21
+ [20/54] Building CXX object libyuv/CMakeFiles/yuv_common_objects.dir/source/rotate.cc.o
22
+ [21/54] Building CXX object libyuv/CMakeFiles/yuv_common_objects.dir/source/rotate_gcc.cc.o
23
+ [22/54] Building CXX object CMakeFiles/faceantispoof.dir/FaceAntiSpoofJSI.cpp.o
24
+ [23/54] Building CXX object CMakeFiles/fastyuv.dir/fast_yuv.cpp.o
25
+ [24/54] Building CXX object libyuv/CMakeFiles/yuv_common_objects.dir/source/row_lasx.cc.o
26
+ [25/54] Building CXX object libyuv/CMakeFiles/yuv_common_objects.dir/source/rotate_win.cc.o
27
+ [26/54] Building CXX object libyuv/CMakeFiles/yuv_common_objects.dir/source/rotate_lsx.cc.o
28
+ [27/54] Building CXX object CMakeFiles/faceantispoof.dir/1fd92fd52f3344b086030960e73e78e3/node_modules/react-native/ReactCommon/jsi/jsi/jsi.cpp.o
29
+ [28/54] Building CXX object libyuv/CMakeFiles/yuv_common_objects.dir/source/scale_any.cc.o
30
+ [29/54] Building CXX object libyuv/CMakeFiles/yuv_common_objects.dir/source/row_common.cc.o
31
+ [30/54] Building CXX object libyuv/CMakeFiles/yuv_common_objects.dir/source/row_gcc.cc.o
32
+ [31/54] Building CXX object libyuv/CMakeFiles/yuv_common_objects.dir/source/row_win.cc.o
33
+ [32/54] Building CXX object libyuv/CMakeFiles/yuv_common_objects.dir/source/row_lsx.cc.o
34
+ [33/54] Linking CXX shared library C:\Users\jesco\Documents\Reactnative\myapp\node_modules\react-native-vision-camera-spoof-detector\android\build\intermediates\cxx\Debug\2a1it684\obj\x86\libfaceantispoof.so
35
+ [34/54] Building CXX object libyuv/CMakeFiles/yuv_common_objects.dir/source/row_any.cc.o
36
+ [35/54] Building CXX object libyuv/CMakeFiles/yuv_common_objects.dir/source/row_rvv.cc.o
37
+ [36/54] Building CXX object libyuv/CMakeFiles/yuv_common_objects.dir/source/scale_argb.cc.o
38
+ [37/54] Building CXX object libyuv/CMakeFiles/yuv_common_objects.dir/source/scale_lsx.cc.o
39
+ [38/54] Building CXX object libyuv/CMakeFiles/yuv_common_objects.dir/source/scale.cc.o
40
+ [39/54] Building CXX object libyuv/CMakeFiles/yuv_common_objects.dir/source/scale_rgb.cc.o
41
+ [40/54] Building CXX object libyuv/CMakeFiles/yuv_common_objects.dir/source/scale_win.cc.o
42
+ [41/54] Building CXX object libyuv/CMakeFiles/yuv_common_objects.dir/source/scale_rvv.cc.o
43
+ [42/54] Building CXX object libyuv/CMakeFiles/yuv_common_objects.dir/source/scale_common.cc.o
44
+ [43/54] Building CXX object libyuv/CMakeFiles/yuv_common_objects.dir/source/video_common.cc.o
45
+ [44/54] Building C object libyuv/CMakeFiles/cpuid.dir/util/cpuid.c.o
46
+ [45/54] Building C object libyuv/CMakeFiles/yuvconstants.dir/util/yuvconstants.c.o
47
+ [46/54] Building CXX object libyuv/CMakeFiles/yuv_common_objects.dir/source/scale_gcc.cc.o
48
+ [47/54] Building CXX object libyuv/CMakeFiles/yuv_common_objects.dir/source/scale_uv.cc.o
49
+ [48/54] Building CXX object libyuv/CMakeFiles/yuvconvert.dir/util/yuvconvert.cc.o
50
+ [49/54] Linking CXX static library libyuv\libyuv.a
51
+ [50/54] Linking CXX shared library C:\Users\jesco\Documents\Reactnative\myapp\node_modules\react-native-vision-camera-spoof-detector\android\build\intermediates\cxx\Debug\2a1it684\obj\x86\libyuv.so
52
+ [51/54] Linking CXX executable C:\Users\jesco\Documents\Reactnative\myapp\node_modules\react-native-vision-camera-spoof-detector\android\build\intermediates\cxx\Debug\2a1it684\obj\x86\cpuid
53
+ [52/54] Linking CXX executable C:\Users\jesco\Documents\Reactnative\myapp\node_modules\react-native-vision-camera-spoof-detector\android\build\intermediates\cxx\Debug\2a1it684\obj\x86\yuvconstants
54
+ [53/54] Linking CXX executable C:\Users\jesco\Documents\Reactnative\myapp\node_modules\react-native-vision-camera-spoof-detector\android\build\intermediates\cxx\Debug\2a1it684\obj\x86\yuvconvert
55
+ [54/54] Linking CXX shared library C:\Users\jesco\Documents\Reactnative\myapp\node_modules\react-native-vision-camera-spoof-detector\android\build\intermediates\cxx\Debug\2a1it684\obj\x86\libfastyuv.so
@@ -1,3 +1,3 @@
1
1
  # C/C++ build system timings
2
- generate_cxx_metadata 34ms
2
+ generate_cxx_metadata 20ms
3
3
 
@@ -1,2 +1,55 @@
1
1
  ninja: Entering directory `C:\Users\jesco\Documents\Reactnative\myapp\node_modules\react-native-vision-camera-spoof-detector\android\.cxx\Debug\2a1it684\x86_64'
2
- ninja: no work to do.
2
+ [1/54] Building CXX object libyuv/CMakeFiles/yuv_common_objects.dir/source/compare_common.cc.o
3
+ [2/54] Building CXX object CMakeFiles/fastyuv.dir/FastYuvJni.cpp.o
4
+ [3/54] Building CXX object libyuv/CMakeFiles/yuv_common_objects.dir/source/compare.cc.o
5
+ [4/54] Building CXX object libyuv/CMakeFiles/yuv_common_objects.dir/source/convert.cc.o
6
+ [5/54] Building CXX object libyuv/CMakeFiles/yuv_common_objects.dir/source/compare_gcc.cc.o
7
+ [6/54] Building CXX object libyuv/CMakeFiles/yuv_common_objects.dir/source/convert_argb.cc.o
8
+ [7/54] Building CXX object libyuv/CMakeFiles/yuv_common_objects.dir/source/compare_win.cc.o
9
+ [8/54] Building CXX object libyuv/CMakeFiles/yuv_common_objects.dir/source/convert_jpeg.cc.o
10
+ [9/54] Building CXX object libyuv/CMakeFiles/yuv_common_objects.dir/source/convert_from.cc.o
11
+ [10/54] Building CXX object libyuv/CMakeFiles/yuv_common_objects.dir/source/convert_from_argb.cc.o
12
+ [11/54] Building CXX object libyuv/CMakeFiles/yuv_common_objects.dir/source/convert_to_argb.cc.o
13
+ [12/54] Building CXX object libyuv/CMakeFiles/yuv_common_objects.dir/source/convert_to_i420.cc.o
14
+ [13/54] Building CXX object libyuv/CMakeFiles/yuv_common_objects.dir/source/cpu_id.cc.o
15
+ [14/54] Building CXX object libyuv/CMakeFiles/yuv_common_objects.dir/source/mjpeg_decoder.cc.o
16
+ [15/54] Building CXX object libyuv/CMakeFiles/yuv_common_objects.dir/source/mjpeg_validate.cc.o
17
+ [16/54] Building CXX object libyuv/CMakeFiles/yuv_common_objects.dir/source/planar_functions.cc.o
18
+ [17/54] Building CXX object libyuv/CMakeFiles/yuv_common_objects.dir/source/rotate_any.cc.o
19
+ [18/54] Building CXX object libyuv/CMakeFiles/yuv_common_objects.dir/source/rotate_common.cc.o
20
+ [19/54] Building CXX object libyuv/CMakeFiles/yuv_common_objects.dir/source/rotate_gcc.cc.o
21
+ [20/54] Building CXX object libyuv/CMakeFiles/yuv_common_objects.dir/source/rotate.cc.o
22
+ [21/54] Building CXX object libyuv/CMakeFiles/yuv_common_objects.dir/source/rotate_argb.cc.o
23
+ [22/54] Building CXX object CMakeFiles/fastyuv.dir/fast_yuv.cpp.o
24
+ [23/54] Building CXX object libyuv/CMakeFiles/yuv_common_objects.dir/source/row_lasx.cc.o
25
+ [24/54] Building CXX object CMakeFiles/faceantispoof.dir/FaceAntiSpoofJSI.cpp.o
26
+ [25/54] Building CXX object libyuv/CMakeFiles/yuv_common_objects.dir/source/rotate_lsx.cc.o
27
+ [26/54] Building CXX object libyuv/CMakeFiles/yuv_common_objects.dir/source/rotate_win.cc.o
28
+ [27/54] Building CXX object CMakeFiles/faceantispoof.dir/c9fdc8b0d027394fa06b64ba7ac7706f/react-native/ReactCommon/jsi/jsi/jsi.cpp.o
29
+ [28/54] Building CXX object libyuv/CMakeFiles/yuv_common_objects.dir/source/row_lsx.cc.o
30
+ [29/54] Building CXX object libyuv/CMakeFiles/yuv_common_objects.dir/source/row_common.cc.o
31
+ [30/54] Building CXX object libyuv/CMakeFiles/yuv_common_objects.dir/source/row_rvv.cc.o
32
+ [31/54] Building CXX object libyuv/CMakeFiles/yuv_common_objects.dir/source/scale_gcc.cc.o
33
+ [32/54] Building CXX object libyuv/CMakeFiles/yuv_common_objects.dir/source/row_any.cc.o
34
+ [33/54] Building CXX object libyuv/CMakeFiles/yuv_common_objects.dir/source/row_gcc.cc.o
35
+ [34/54] Building CXX object libyuv/CMakeFiles/yuv_common_objects.dir/source/scale.cc.o
36
+ [35/54] Building CXX object libyuv/CMakeFiles/yuv_common_objects.dir/source/scale_any.cc.o
37
+ [36/54] Building CXX object libyuv/CMakeFiles/yuv_common_objects.dir/source/scale_lsx.cc.o
38
+ [37/54] Building CXX object libyuv/CMakeFiles/yuv_common_objects.dir/source/scale_argb.cc.o
39
+ [38/54] Linking CXX shared library C:\Users\jesco\Documents\Reactnative\myapp\node_modules\react-native-vision-camera-spoof-detector\android\build\intermediates\cxx\Debug\2a1it684\obj\x86_64\libfaceantispoof.so
40
+ [39/54] Building CXX object libyuv/CMakeFiles/yuv_common_objects.dir/source/row_win.cc.o
41
+ [40/54] Building CXX object libyuv/CMakeFiles/yuv_common_objects.dir/source/scale_rgb.cc.o
42
+ [41/54] Building CXX object libyuv/CMakeFiles/yuv_common_objects.dir/source/video_common.cc.o
43
+ [42/54] Building CXX object libyuv/CMakeFiles/yuv_common_objects.dir/source/scale_rvv.cc.o
44
+ [43/54] Building CXX object libyuv/CMakeFiles/yuv_common_objects.dir/source/scale_win.cc.o
45
+ [44/54] Building C object libyuv/CMakeFiles/yuvconstants.dir/util/yuvconstants.c.o
46
+ [45/54] Building CXX object libyuv/CMakeFiles/yuv_common_objects.dir/source/scale_common.cc.o
47
+ [46/54] Building C object libyuv/CMakeFiles/cpuid.dir/util/cpuid.c.o
48
+ [47/54] Building CXX object libyuv/CMakeFiles/yuv_common_objects.dir/source/scale_uv.cc.o
49
+ [48/54] Building CXX object libyuv/CMakeFiles/yuvconvert.dir/util/yuvconvert.cc.o
50
+ [49/54] Linking CXX static library libyuv\libyuv.a
51
+ [50/54] Linking CXX shared library C:\Users\jesco\Documents\Reactnative\myapp\node_modules\react-native-vision-camera-spoof-detector\android\build\intermediates\cxx\Debug\2a1it684\obj\x86_64\libyuv.so
52
+ [51/54] Linking CXX executable C:\Users\jesco\Documents\Reactnative\myapp\node_modules\react-native-vision-camera-spoof-detector\android\build\intermediates\cxx\Debug\2a1it684\obj\x86_64\yuvconvert
53
+ [52/54] Linking CXX executable C:\Users\jesco\Documents\Reactnative\myapp\node_modules\react-native-vision-camera-spoof-detector\android\build\intermediates\cxx\Debug\2a1it684\obj\x86_64\cpuid
54
+ [53/54] Linking CXX executable C:\Users\jesco\Documents\Reactnative\myapp\node_modules\react-native-vision-camera-spoof-detector\android\build\intermediates\cxx\Debug\2a1it684\obj\x86_64\yuvconstants
55
+ [54/54] Linking CXX shared library C:\Users\jesco\Documents\Reactnative\myapp\node_modules\react-native-vision-camera-spoof-detector\android\build\intermediates\cxx\Debug\2a1it684\obj\x86_64\libfastyuv.so
@@ -0,0 +1,9 @@
1
+ # C/C++ build system timings
2
+ generate_cxx_metadata
3
+ execute-generate-process
4
+ exec-configure 486ms
5
+ [gap of 23ms]
6
+ execute-generate-process completed in 511ms
7
+ [gap of 20ms]
8
+ generate_cxx_metadata completed in 541ms
9
+
@@ -1 +1 @@
1
- #Mon Nov 24 20:05:17 IST 2025
1
+ #Tue Nov 25 20:14:46 IST 2025
@@ -72,14 +72,29 @@ class FaceAntiSpoofFrameProcessor : FrameProcessorPlugin() {
72
72
  // Extract YUV data immediately while the frame is still valid
73
73
  val image = frame.getImage() ?: throw Exception("Frame image is null")
74
74
  val planes = image.planes
75
+
76
+ if (planes == null) {
77
+ throw Exception("Frame planes are null")
78
+ }
75
79
 
76
80
  if (planes.size < 3) {
77
81
  throw Exception("Invalid frame planes: expected 3, got ${planes.size}")
78
82
  }
79
83
 
80
- val yBuffer = planes[0].buffer
81
- val uBuffer = planes[1].buffer
82
- val vBuffer = planes[2].buffer
84
+ val yBuffer = planes[0]?.buffer ?: throw Exception("Y buffer is null")
85
+ val uBuffer = planes[1]?.buffer ?: throw Exception("U buffer is null")
86
+ val vBuffer = planes[2]?.buffer ?: throw Exception("V buffer is null")
87
+
88
+ // Ensure buffers are accessible
89
+ if (!yBuffer.isDirect && !yBuffer.hasArray()) {
90
+ throw Exception("Y buffer is not accessible")
91
+ }
92
+ if (!uBuffer.isDirect && !uBuffer.hasArray()) {
93
+ throw Exception("U buffer is not accessible")
94
+ }
95
+ if (!vBuffer.isDirect && !vBuffer.hasArray()) {
96
+ throw Exception("V buffer is not accessible")
97
+ }
83
98
 
84
99
  yBuffer.rewind()
85
100
  uBuffer.rewind()
@@ -95,9 +110,13 @@ class FaceAntiSpoofFrameProcessor : FrameProcessorPlugin() {
95
110
 
96
111
  nv21 = ByteArray(ySize + uSize + vSize)
97
112
 
98
- yBuffer.get(nv21, 0, ySize)
99
- vBuffer.get(nv21, ySize, vSize)
100
- uBuffer.get(nv21, ySize + vSize, uSize)
113
+ try {
114
+ yBuffer.get(nv21, 0, ySize)
115
+ vBuffer.get(nv21, ySize, vSize)
116
+ uBuffer.get(nv21, ySize + vSize, uSize)
117
+ } catch (e: Exception) {
118
+ throw Exception("Error copying YUV buffers: ${e.message}", e)
119
+ }
101
120
 
102
121
  width = frame.getWidth()
103
122
  height = frame.getHeight()
@@ -134,6 +153,7 @@ class FaceAntiSpoofFrameProcessor : FrameProcessorPlugin() {
134
153
  "combinedScore" to result.combinedScore.toDouble(),
135
154
  "recognitionImageBase64" to result.recognitionImageBase64,
136
155
  // Image format metadata
156
+ // NOTE: Image is in BGR format (OpenCV compatible), encoded as Base64 JPEG
137
157
  "imageFormat" to result.imageFormat,
138
158
  "imageResolution" to result.imageResolution,
139
159
  "imageQuality" to result.imageQuality
@@ -321,33 +321,49 @@ class FaceAntiSpoofingAdvanced(private val assetManager: AssetManager) {
321
321
  throw IllegalArgumentException("NV21 buffer size mismatch: expected $expectedSize, got ${nv21.size}")
322
322
  }
323
323
 
324
+ if (!isInitialized || interpreter == null) {
325
+ throw Exception("Interpreter not initialized")
326
+ }
327
+
324
328
  if (rgbFloatBuffer == null || rgbFloatBuffer!!.size < INPUT_IMAGE_SIZE * INPUT_IMAGE_SIZE * 3) {
325
329
  rgbFloatBuffer = FloatArray(INPUT_IMAGE_SIZE * INPUT_IMAGE_SIZE * 3)
326
330
  }
327
- val rgbFloats = yuvConverter.nv21ToRgbFloatArray(
328
- nv21, width, height,
329
- INPUT_IMAGE_SIZE, INPUT_IMAGE_SIZE,
330
- rgbFloatBuffer
331
- )
331
+
332
+ val rgbFloats = try {
333
+ yuvConverter.nv21ToRgbFloatArray(
334
+ nv21, width, height,
335
+ INPUT_IMAGE_SIZE, INPUT_IMAGE_SIZE,
336
+ rgbFloatBuffer
337
+ )
338
+ } catch (e: Exception) {
339
+ Log.e(TAG, "Error in YUV conversion: ${e.message}", e)
340
+ throw e
341
+ }
332
342
 
333
343
  if (rgbFloats == null || rgbFloats.isEmpty()) {
334
344
  throw Exception("RGB conversion returned empty array")
335
345
  }
336
346
 
337
- inputBuffer.rewind()
338
- for (i in 0 until (INPUT_IMAGE_SIZE * INPUT_IMAGE_SIZE * 3)) {
339
- inputBuffer.putFloat(rgbFloats[i])
340
- }
341
- inputBuffer.rewind()
342
-
343
- if (interpreter == null) {
344
- throw Exception("Interpreter is null")
347
+ try {
348
+ inputBuffer.rewind()
349
+ for (i in 0 until (INPUT_IMAGE_SIZE * INPUT_IMAGE_SIZE * 3)) {
350
+ inputBuffer.putFloat(rgbFloats[i])
351
+ }
352
+ inputBuffer.rewind()
353
+ } catch (e: Exception) {
354
+ Log.e(TAG, "Error writing to input buffer: ${e.message}", e)
355
+ throw e
345
356
  }
346
357
 
347
358
  outputs[outputIndex0] = clssPred
348
359
  outputs[outputIndex1] = leafNodeMask
349
360
 
350
- interpreter!!.runForMultipleInputsOutputs(arrayOf<Any>(inputBuffer), outputs)
361
+ try {
362
+ interpreter!!.runForMultipleInputsOutputs(arrayOf<Any>(inputBuffer), outputs)
363
+ } catch (e: Exception) {
364
+ Log.e(TAG, "Error running interpreter: ${e.message}", e)
365
+ throw e
366
+ }
351
367
 
352
368
  val rawScore = leafScore1(clssPred, leafNodeMask)
353
369
 
@@ -396,6 +412,7 @@ class FaceAntiSpoofingAdvanced(private val assetManager: AssetManager) {
396
412
  Log.d(TAG, "YUV to RGB conversion completed in ${convertTime}ms. RGB data: ${convertedRgb.size} bytes")
397
413
 
398
414
  // Encode RGB to target format (JPEG, PNG, or BMP) and Base64
415
+ // NOTE: ImageFormatEncoder.rgbToBase64() automatically converts RGB→BGR for OpenCV compatibility
399
416
  val startEncode = System.currentTimeMillis()
400
417
  val format = when (outputImageFormat) {
401
418
  "PNG" -> ImageFormatEncoder.ImageFormat.PNG
@@ -414,16 +431,16 @@ class FaceAntiSpoofingAdvanced(private val assetManager: AssetManager) {
414
431
 
415
432
  if (base64Result != null) {
416
433
  Log.d(TAG, "$outputImageFormat encoding completed in ${encodeTime}ms. Base64 size: ${base64Result.length} bytes")
417
- Log.d(TAG, "✅ Generated ${outputImageResolution}×${outputImageResolution} $outputImageFormat Base64 for recognition API (total: ${convertTime + encodeTime}ms)")
434
+ Log.d(TAG, "✅ Generated ${outputImageResolution}×${outputImageResolution} $outputImageFormat Base64 for recognition API in BGR format (total: ${convertTime + encodeTime}ms)")
418
435
  val estSize = estimateImageSize()
419
- Log.d(TAG, "Format: $outputImageFormat, Quality: $outputImageQuality, Estimated: ${estSize / 1024}KB")
436
+ Log.d(TAG, "Format: $outputImageFormat (BGR), Quality: $outputImageQuality, Estimated: ${estSize / 1024}KB")
420
437
  } else {
421
- Log.w(TAG, "⚠️ ImageFormatEncoder returned null")
438
+ Log.w(TAG, "⚠️ ImageFormatEncoder returned null for BGR conversion")
422
439
  }
423
440
 
424
441
  base64Result
425
442
  } catch (e: Exception) {
426
- Log.e(TAG, "❌ Error generating ${outputImageResolution}×${outputImageResolution} $outputImageFormat Base64: ${e.message}", e)
443
+ Log.e(TAG, "❌ Error generating ${outputImageResolution}×${outputImageResolution} $outputImageFormat Base64 (BGR format): ${e.message}", e)
427
444
  e.printStackTrace()
428
445
  null
429
446
  }
@@ -454,9 +471,23 @@ class FaceAntiSpoofingAdvanced(private val assetManager: AssetManager) {
454
471
  }
455
472
 
456
473
  private fun leafScore1(clssPred: Array<FloatArray>, leafNodeMask: Array<FloatArray>): Float {
474
+ if (clssPred.isEmpty() || clssPred[0].isEmpty()) {
475
+ Log.e(TAG, "clssPred array is empty or null")
476
+ return 0f
477
+ }
478
+ if (leafNodeMask.isEmpty() || leafNodeMask[0].isEmpty()) {
479
+ Log.e(TAG, "leafNodeMask array is empty or null")
480
+ return 0f
481
+ }
482
+
457
483
  var score = 0f
458
- for (i in 0 until 8) {
459
- score += abs(clssPred[0][i]) * leafNodeMask[0][i]
484
+ val minSize = minOf(clssPred[0].size, leafNodeMask[0].size, 8)
485
+ for (i in 0 until minSize) {
486
+ try {
487
+ score += abs(clssPred[0][i]) * leafNodeMask[0][i]
488
+ } catch (e: Exception) {
489
+ Log.e(TAG, "Error computing leaf score at index $i: ${e.message}", e)
490
+ }
460
491
  }
461
492
  return score
462
493
  }