react-native-vision-camera-spoof-detector 1.0.2 → 1.0.4

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 (165) hide show
  1. package/android/.cxx/Debug/2a1it684/arm64-v8a/.cmake/api/v1/reply/{codemodel-v2-6c7de80461af72f456a3.json → codemodel-v2-390962e2784a6a84fa3e.json} +2 -2
  2. package/android/.cxx/Debug/2a1it684/arm64-v8a/.cmake/api/v1/reply/{index-2025-11-18T17-52-03-0810.json → index-2025-11-24T13-21-59-0659.json} +2 -2
  3. package/android/.cxx/Debug/2a1it684/arm64-v8a/.cmake/api/v1/reply/{target-yuv-Debug-32bc4eddd343848e1c25.json → target-yuv-Debug-1e27b8a2bdcddd47b87d.json} +4 -4
  4. package/android/.cxx/Debug/2a1it684/arm64-v8a/.cmake/api/v1/reply/{target-yuv_shared-Debug-75ea769bf76a12914d29.json → target-yuv_shared-Debug-ac9194487d1fc1268a87.json} +4 -4
  5. package/android/.cxx/Debug/2a1it684/arm64-v8a/.ninja_deps +0 -0
  6. package/android/.cxx/Debug/2a1it684/arm64-v8a/.ninja_log +125 -63
  7. package/android/.cxx/Debug/2a1it684/arm64-v8a/CMakeFiles/CMakeOutput.log +22 -22
  8. package/android/.cxx/Debug/2a1it684/arm64-v8a/configure_fingerprint.bin +15 -15
  9. package/android/.cxx/Debug/2a1it684/armeabi-v7a/.cmake/api/v1/reply/{codemodel-v2-52ac1d8b40b69596389b.json → codemodel-v2-053850119b681f93cecc.json} +2 -2
  10. package/android/.cxx/Debug/2a1it684/armeabi-v7a/.cmake/api/v1/reply/{index-2025-11-18T16-28-36-0058.json → index-2025-11-18T18-09-57-0510.json} +2 -2
  11. package/android/.cxx/Debug/2a1it684/armeabi-v7a/.cmake/api/v1/reply/{target-yuv-Debug-97f9e822dbd84a186d44.json → target-yuv-Debug-a12ad49ff79080871bce.json} +2 -2
  12. package/android/.cxx/Debug/2a1it684/armeabi-v7a/.cmake/api/v1/reply/{target-yuv_shared-Debug-3730d20e27c3481c06b2.json → target-yuv_shared-Debug-2b00e64621a56b8dd632.json} +2 -2
  13. package/android/.cxx/Debug/2a1it684/armeabi-v7a/.ninja_deps +0 -0
  14. package/android/.cxx/Debug/2a1it684/armeabi-v7a/.ninja_log +119 -117
  15. package/android/.cxx/Debug/2a1it684/armeabi-v7a/CMakeFiles/CMakeOutput.log +20 -20
  16. package/android/.cxx/Debug/2a1it684/armeabi-v7a/configure_fingerprint.bin +15 -15
  17. package/android/.cxx/Debug/2a1it684/x86/.ninja_deps +0 -0
  18. package/android/.cxx/Debug/2a1it684/x86/.ninja_log +111 -109
  19. package/android/.cxx/Debug/2a1it684/x86/CMakeFiles/CMakeOutput.log +20 -20
  20. package/android/.cxx/Debug/2a1it684/x86/configure_fingerprint.bin +15 -15
  21. package/android/.cxx/Debug/2a1it684/x86_64/.ninja_deps +0 -0
  22. package/android/.cxx/Debug/2a1it684/x86_64/.ninja_log +109 -55
  23. package/android/.cxx/Debug/2a1it684/x86_64/CMakeFiles/CMakeOutput.log +20 -20
  24. package/android/.cxx/Debug/2a1it684/x86_64/configure_fingerprint.bin +15 -15
  25. package/android/build/.transforms/4ebf3dd0dca4f83fe1776360e21ded81/transformed/classes/classes_dex/classes.dex +0 -0
  26. package/android/build/.transforms/c0a07cd9442d741ad3cef3760159211f/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/faceantispoof/AntiSpoofingResult.dex +0 -0
  27. package/android/build/.transforms/c0a07cd9442d741ad3cef3760159211f/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/faceantispoof/ByteBufferPool$Companion.dex +0 -0
  28. package/android/build/.transforms/c0a07cd9442d741ad3cef3760159211f/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/faceantispoof/ByteBufferPool.dex +0 -0
  29. package/android/build/.transforms/c0a07cd9442d741ad3cef3760159211f/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/faceantispoof/FaceAntiSpoofFrameProcessor.dex +0 -0
  30. package/android/build/.transforms/c0a07cd9442d741ad3cef3760159211f/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/faceantispoof/FaceAntiSpoofingAdvanced$Companion.dex +0 -0
  31. package/android/build/.transforms/c0a07cd9442d741ad3cef3760159211f/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/faceantispoof/FaceAntiSpoofingAdvanced$EnvironmentAssessment.dex +0 -0
  32. package/android/build/.transforms/c0a07cd9442d741ad3cef3760159211f/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/faceantispoof/FaceAntiSpoofingAdvanced$SpoofDetectionResult.dex +0 -0
  33. package/android/build/.transforms/c0a07cd9442d741ad3cef3760159211f/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/faceantispoof/FaceAntiSpoofingAdvanced.dex +0 -0
  34. package/android/build/.transforms/c0a07cd9442d741ad3cef3760159211f/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/faceantispoof/ImageFormatEncoder$ImageFormat.dex +0 -0
  35. package/android/build/.transforms/c0a07cd9442d741ad3cef3760159211f/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/faceantispoof/ImageFormatEncoder$WhenMappings.dex +0 -0
  36. package/android/build/.transforms/c0a07cd9442d741ad3cef3760159211f/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/faceantispoof/ImageFormatEncoder.dex +0 -0
  37. package/android/build/.transforms/c0a07cd9442d741ad3cef3760159211f/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/faceantispoof/JpegEncoder$Companion.dex +0 -0
  38. package/android/build/.transforms/c0a07cd9442d741ad3cef3760159211f/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/faceantispoof/JpegEncoder.dex +0 -0
  39. package/android/build/.transforms/c0a07cd9442d741ad3cef3760159211f/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/faceantispoof/YuvToFloatArrayConverter.dex +0 -0
  40. package/android/build/intermediates/compile_library_classes_jar/debug/bundleLibCompileToJarDebug/classes.jar +0 -0
  41. package/android/build/intermediates/cxx/Debug/2a1it684/logs/arm64-v8a/build_stdout_targets.txt +62 -1
  42. package/android/build/intermediates/cxx/Debug/2a1it684/logs/arm64-v8a/generate_cxx_metadata_2655_timing.txt +9 -0
  43. package/android/build/intermediates/cxx/Debug/2a1it684/logs/armeabi-v7a/build_stdout_targets.txt +58 -1
  44. package/android/build/intermediates/cxx/Debug/2a1it684/logs/armeabi-v7a/{generate_cxx_metadata_2399_timing.txt → generate_cxx_metadata_2653_timing.txt} +1 -1
  45. package/android/build/intermediates/cxx/Debug/2a1it684/logs/x86/build_stdout_targets.txt +54 -1
  46. package/android/build/intermediates/cxx/Debug/2a1it684/logs/{armeabi-v7a/generate_cxx_metadata_2616_timing.txt → x86/generate_cxx_metadata_2653_timing.txt} +1 -1
  47. package/android/build/intermediates/cxx/Debug/2a1it684/logs/x86_64/build_stdout_targets.txt +54 -1
  48. package/android/build/intermediates/cxx/Debug/2a1it684/logs/x86_64/generate_cxx_metadata_2653_timing.txt +9 -0
  49. package/android/build/intermediates/incremental/debug/packageDebugResources/compile-file-map.properties +1 -1
  50. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/faceantispoof/AntiSpoofingResult.class +0 -0
  51. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/faceantispoof/ByteBufferPool$Companion.class +0 -0
  52. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/faceantispoof/ByteBufferPool.class +0 -0
  53. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/faceantispoof/FaceAntiSpoofFrameProcessor.class +0 -0
  54. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/faceantispoof/FaceAntiSpoofingAdvanced$Companion.class +0 -0
  55. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/faceantispoof/FaceAntiSpoofingAdvanced$EnvironmentAssessment.class +0 -0
  56. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/faceantispoof/FaceAntiSpoofingAdvanced$SpoofDetectionResult.class +0 -0
  57. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/faceantispoof/FaceAntiSpoofingAdvanced.class +0 -0
  58. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/faceantispoof/ImageFormatEncoder$ImageFormat.class +0 -0
  59. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/faceantispoof/ImageFormatEncoder$WhenMappings.class +0 -0
  60. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/faceantispoof/ImageFormatEncoder.class +0 -0
  61. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/faceantispoof/JpegEncoder$Companion.class +0 -0
  62. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/faceantispoof/JpegEncoder.class +0 -0
  63. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/faceantispoof/YuvToFloatArrayConverter.class +0 -0
  64. package/android/build/intermediates/runtime_library_classes_jar/debug/bundleLibRuntimeToJarDebug/classes.jar +0 -0
  65. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab +0 -0
  66. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.keystream +0 -0
  67. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.keystream.len +0 -0
  68. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.len +0 -0
  69. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.values.at +0 -0
  70. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab_i +0 -0
  71. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab +0 -0
  72. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.keystream +0 -0
  73. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.keystream.len +0 -0
  74. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.len +0 -0
  75. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.values.at +0 -0
  76. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab_i +0 -0
  77. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab +0 -0
  78. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.keystream +0 -0
  79. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.keystream.len +0 -0
  80. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.len +0 -0
  81. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.values.at +0 -0
  82. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab_i +0 -0
  83. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab +0 -0
  84. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab.values.at +0 -0
  85. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab +0 -0
  86. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.keystream +0 -0
  87. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.keystream.len +0 -0
  88. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.len +0 -0
  89. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.values.at +0 -0
  90. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab_i +0 -0
  91. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab +0 -0
  92. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.keystream +0 -0
  93. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.keystream.len +0 -0
  94. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.len +0 -0
  95. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.values.at +0 -0
  96. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab_i +0 -0
  97. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab +0 -0
  98. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.keystream +0 -0
  99. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.keystream.len +0 -0
  100. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.len +0 -0
  101. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.values.at +0 -0
  102. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab_i +0 -0
  103. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab +0 -0
  104. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.keystream +0 -0
  105. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.keystream.len +0 -0
  106. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.len +0 -0
  107. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.values.at +0 -0
  108. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab_i +0 -0
  109. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab +0 -0
  110. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.keystream +0 -0
  111. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.keystream.len +0 -0
  112. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.len +0 -0
  113. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.values.at +0 -0
  114. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab_i +0 -0
  115. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/counters.tab +1 -1
  116. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab +0 -0
  117. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.keystream +0 -0
  118. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.keystream.len +0 -0
  119. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.len +0 -0
  120. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.values.at +0 -0
  121. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab_i +0 -0
  122. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab +0 -0
  123. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.keystream +0 -0
  124. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.keystream.len +0 -0
  125. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.len +0 -0
  126. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.values.at +0 -0
  127. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab_i +0 -0
  128. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab +0 -0
  129. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.keystream +0 -0
  130. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.keystream.len +0 -0
  131. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.len +0 -0
  132. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.values.at +0 -0
  133. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab_i +0 -0
  134. package/android/build/kotlin/compileDebugKotlin/cacheable/last-build.bin +0 -0
  135. package/android/build/kotlin/compileDebugKotlin/classpath-snapshot/shrunk-classpath-snapshot.bin +0 -0
  136. package/android/build/kotlin/compileDebugKotlin/local-state/build-history.bin +0 -0
  137. package/android/build/tmp/kotlin-classes/debug/com/faceantispoof/AntiSpoofingResult.class +0 -0
  138. package/android/build/tmp/kotlin-classes/debug/com/faceantispoof/ByteBufferPool$Companion.class +0 -0
  139. package/android/build/tmp/kotlin-classes/debug/com/faceantispoof/ByteBufferPool.class +0 -0
  140. package/android/build/tmp/kotlin-classes/debug/com/faceantispoof/FaceAntiSpoofFrameProcessor.class +0 -0
  141. package/android/build/tmp/kotlin-classes/debug/com/faceantispoof/FaceAntiSpoofingAdvanced$Companion.class +0 -0
  142. package/android/build/tmp/kotlin-classes/debug/com/faceantispoof/FaceAntiSpoofingAdvanced$EnvironmentAssessment.class +0 -0
  143. package/android/build/tmp/kotlin-classes/debug/com/faceantispoof/FaceAntiSpoofingAdvanced$SpoofDetectionResult.class +0 -0
  144. package/android/build/tmp/kotlin-classes/debug/com/faceantispoof/FaceAntiSpoofingAdvanced.class +0 -0
  145. package/android/build/tmp/kotlin-classes/debug/com/faceantispoof/ImageFormatEncoder$ImageFormat.class +0 -0
  146. package/android/build/tmp/kotlin-classes/debug/com/faceantispoof/ImageFormatEncoder$WhenMappings.class +0 -0
  147. package/android/build/tmp/kotlin-classes/debug/com/faceantispoof/ImageFormatEncoder.class +0 -0
  148. package/android/build/tmp/kotlin-classes/debug/com/faceantispoof/JpegEncoder$Companion.class +0 -0
  149. package/android/build/tmp/kotlin-classes/debug/com/faceantispoof/JpegEncoder.class +0 -0
  150. package/android/build/tmp/kotlin-classes/debug/com/faceantispoof/YuvToFloatArrayConverter.class +0 -0
  151. package/android/src/main/java/com/faceantispoof/ByteBufferPool.kt +68 -0
  152. package/android/src/main/java/com/faceantispoof/FaceAntiSpoofFrameProcessor.kt +6 -1
  153. package/android/src/main/java/com/faceantispoof/FaceAntiSpoofingAdvanced.kt +194 -8
  154. package/android/src/main/java/com/faceantispoof/ImageFormatEncoder.kt +247 -0
  155. package/android/src/main/java/com/faceantispoof/JpegEncoder.kt +204 -0
  156. package/android/src/main/java/com/faceantispoof/YuvToFloatArrayConverter.kt +62 -0
  157. package/package.json +3 -3
  158. package/android/build/intermediates/cxx/Debug/2a1it684/logs/arm64-v8a/generate_cxx_metadata_2398_timing.txt +0 -9
  159. package/android/build/intermediates/cxx/Debug/2a1it684/logs/arm64-v8a/generate_cxx_metadata_2614_timing.txt +0 -9
  160. package/android/build/intermediates/cxx/Debug/2a1it684/logs/x86/generate_cxx_metadata_2399_timing.txt +0 -3
  161. package/android/build/intermediates/cxx/Debug/2a1it684/logs/x86/generate_cxx_metadata_2616_timing.txt +0 -3
  162. package/android/build/intermediates/cxx/Debug/2a1it684/logs/x86_64/generate_cxx_metadata_2399_timing.txt +0 -9
  163. package/android/build/intermediates/cxx/Debug/2a1it684/logs/x86_64/generate_cxx_metadata_2616_timing.txt +0 -9
  164. /package/android/.cxx/Debug/2a1it684/x86/.cmake/api/v1/reply/{index-2025-11-18T16-28-43-0678.json → index-2025-11-18T18-10-04-0841.json} +0 -0
  165. /package/android/.cxx/Debug/2a1it684/x86_64/.cmake/api/v1/reply/{index-2025-11-18T17-52-04-0655.json → index-2025-11-24T13-22-20-0304.json} +0 -0
@@ -0,0 +1,204 @@
1
+ package com.faceantispoof
2
+
3
+ import android.graphics.Bitmap
4
+ import android.graphics.Bitmap.CompressFormat
5
+ import android.util.Base64
6
+ import android.util.Log
7
+ import java.io.ByteArrayOutputStream
8
+
9
+ /**
10
+ * High-performance JPEG encoder for RGB data.
11
+ * Converts RGB data to JPEG and encodes as Base64 for network transmission.
12
+ */
13
+ class JpegEncoder {
14
+
15
+ companion object {
16
+ private const val TAG = "JpegEncoder"
17
+ private const val DEFAULT_JPEG_QUALITY = 85
18
+
19
+ /**
20
+ * Convert RGB byte array to JPEG and return as Base64 string.
21
+ * Optimized for high-speed encoding without intermediate Bitmap copies.
22
+ *
23
+ * @param rgbData RGB data as byte array (format: RGBRGBRGB...)
24
+ * @param width Image width
25
+ * @param height Image height
26
+ * @param quality JPEG quality (0-100), default 85
27
+ * @return Base64 encoded JPEG string, or null if encoding fails
28
+ */
29
+ fun rgbToJpegBase64(
30
+ rgbData: ByteArray,
31
+ width: Int,
32
+ height: Int,
33
+ quality: Int = DEFAULT_JPEG_QUALITY
34
+ ): String? {
35
+ return try {
36
+ val jpegBytes = rgbToJpeg(rgbData, width, height, quality) ?: return null
37
+ Base64.encodeToString(jpegBytes, Base64.NO_WRAP)
38
+ } catch (e: Exception) {
39
+ Log.e(TAG, "Failed to encode RGB to JPEG Base64", e)
40
+ null
41
+ }
42
+ }
43
+
44
+ /**
45
+ * Convert RGB float array (normalized 0-1) to JPEG and return as Base64 string.
46
+ * Each pixel is stored as 3 floats (R, G, B).
47
+ *
48
+ * @param rgbFloats RGB data as float array (normalized to 0-1)
49
+ * @param width Image width
50
+ * @param height Image height
51
+ * @param quality JPEG quality (0-100), default 85
52
+ * @return Base64 encoded JPEG string, or null if encoding fails
53
+ */
54
+ fun rgbFloatToJpegBase64(
55
+ rgbFloats: FloatArray,
56
+ width: Int,
57
+ height: Int,
58
+ quality: Int = DEFAULT_JPEG_QUALITY
59
+ ): String? {
60
+ return try {
61
+ // Convert float array to byte array
62
+ val rgbBytes = convertFloatArrayToRgbBytes(rgbFloats, width, height)
63
+ rgbToJpegBase64(rgbBytes, width, height, quality)
64
+ } catch (e: Exception) {
65
+ Log.e(TAG, "Failed to encode RGB float array to JPEG Base64", e)
66
+ null
67
+ }
68
+ }
69
+
70
+ /**
71
+ * Convert RGB byte array to JPEG bytes.
72
+ *
73
+ * @param rgbData RGB data as byte array
74
+ * @param width Image width
75
+ * @param height Image height
76
+ * @param quality JPEG quality (0-100)
77
+ * @return JPEG encoded byte array, or null if encoding fails
78
+ */
79
+ fun rgbToJpeg(
80
+ rgbData: ByteArray,
81
+ width: Int,
82
+ height: Int,
83
+ quality: Int = DEFAULT_JPEG_QUALITY
84
+ ): ByteArray? {
85
+ return try {
86
+ // Create bitmap from RGB data
87
+ val bitmap = createBitmapFromRgb(rgbData, width, height)
88
+ val jpegBytes = compressBitmapToJpeg(bitmap, quality)
89
+ bitmap.recycle()
90
+ jpegBytes
91
+ } catch (e: Exception) {
92
+ Log.e(TAG, "Failed to encode RGB to JPEG", e)
93
+ null
94
+ }
95
+ }
96
+
97
+ /**
98
+ * Compress bitmap to JPEG bytes.
99
+ */
100
+ private fun compressBitmapToJpeg(bitmap: Bitmap, quality: Int): ByteArray {
101
+ val stream = ByteArrayOutputStream()
102
+ bitmap.compress(CompressFormat.JPEG, quality.coerceIn(0, 100), stream)
103
+ return stream.toByteArray()
104
+ }
105
+
106
+ /**
107
+ * Create Bitmap from RGB byte array.
108
+ * Assumes RGB format: RGBRGBRGB...
109
+ */
110
+ private fun createBitmapFromRgb(rgbData: ByteArray, width: Int, height: Int): Bitmap {
111
+ val pixels = IntArray(width * height)
112
+ var rgbIndex = 0
113
+
114
+ for (i in pixels.indices) {
115
+ val r = rgbData[rgbIndex++].toInt() and 0xFF
116
+ val g = rgbData[rgbIndex++].toInt() and 0xFF
117
+ val b = rgbData[rgbIndex++].toInt() and 0xFF
118
+ pixels[i] = (0xFF shl 24) or (r shl 16) or (g shl 8) or b
119
+ }
120
+
121
+ return Bitmap.createBitmap(pixels, width, height, Bitmap.Config.ARGB_8888)
122
+ }
123
+
124
+ /**
125
+ * Convert float array (normalized 0-1) to RGB byte array (0-255).
126
+ */
127
+ private fun convertFloatArrayToRgbBytes(rgbFloats: FloatArray, width: Int, height: Int): ByteArray {
128
+ val rgbBytes = ByteArray(width * height * 3)
129
+ var byteIndex = 0
130
+
131
+ for (i in rgbFloats.indices step 3) {
132
+ rgbBytes[byteIndex++] = (rgbFloats[i] * 255f).toInt().coerceIn(0, 255).toByte()
133
+ rgbBytes[byteIndex++] = (rgbFloats[i + 1] * 255f).toInt().coerceIn(0, 255).toByte()
134
+ rgbBytes[byteIndex++] = (rgbFloats[i + 2] * 255f).toInt().coerceIn(0, 255).toByte()
135
+ }
136
+
137
+ return rgbBytes
138
+ }
139
+
140
+ /**
141
+ * Fast JPEG encoding with minimal memory footprint.
142
+ * Directly processes YUV data to JPEG without intermediate RGB conversion.
143
+ * Note: For best performance, use this when you have NV21/I420 data directly.
144
+ */
145
+ fun directYuvToJpegBase64(
146
+ nv21Data: ByteArray,
147
+ width: Int,
148
+ height: Int,
149
+ quality: Int = DEFAULT_JPEG_QUALITY
150
+ ): String? {
151
+ return try {
152
+ // This is a placeholder for direct YUV to JPEG conversion
153
+ // In production, you might use libjpeg-turbo or native code
154
+ // For now, convert to RGB first then to JPEG
155
+ val rgbBytes = ByteArray(width * height * 3)
156
+ nv21ToRgbDirect(nv21Data, width, height, rgbBytes)
157
+ rgbToJpegBase64(rgbBytes, width, height, quality)
158
+ } catch (e: Exception) {
159
+ Log.e(TAG, "Failed to encode NV21 to JPEG Base64", e)
160
+ null
161
+ }
162
+ }
163
+
164
+ /**
165
+ * Direct NV21 to RGB conversion (minimal overhead).
166
+ */
167
+ private fun nv21ToRgbDirect(nv21: ByteArray, width: Int, height: Int, rgbOut: ByteArray) {
168
+ val ySize = width * height
169
+ var rgbIndex = 0
170
+
171
+ for (y in 0 until height) {
172
+ val yRowOffset = y * width
173
+ for (x in 0 until width) {
174
+ val yVal = nv21[yRowOffset + x].toInt() and 0xFF
175
+ val uvIndex = ySize + (y / 2) * width + (x / 2) * 2
176
+ val vVal = nv21[uvIndex].toInt() and 0xFF
177
+ val uVal = nv21[uvIndex + 1].toInt() and 0xFF
178
+
179
+ val yf = yVal.toFloat()
180
+ val uf = uVal - 128f
181
+ val vf = vVal - 128f
182
+
183
+ val r = (yf + 1.402f * vf).coerceIn(0f, 255f).toInt().toByte()
184
+ val g = (yf - 0.34414f * uf - 0.71414f * vf).coerceIn(0f, 255f).toInt().toByte()
185
+ val b = (yf + 1.772f * uf).coerceIn(0f, 255f).toInt().toByte()
186
+
187
+ rgbOut[rgbIndex++] = r
188
+ rgbOut[rgbIndex++] = g
189
+ rgbOut[rgbIndex++] = b
190
+ }
191
+ }
192
+ }
193
+
194
+ /**
195
+ * Get compressed file size estimate for JPEG.
196
+ */
197
+ fun estimateJpegSize(width: Int, height: Int, quality: Int): Int {
198
+ // Rough estimate: RGB uncompressed size * quality factor
199
+ val uncompressedSize = width * height * 3
200
+ val qualityFactor = 100.0 / (100 + (100 - quality))
201
+ return (uncompressedSize * qualityFactor).toInt()
202
+ }
203
+ }
204
+ }
@@ -195,4 +195,66 @@ class YuvToFloatArrayConverter {
195
195
 
196
196
  return output
197
197
  }
198
+
199
+ /**
200
+ * Convert NV21 directly to RGB byte array without float conversion.
201
+ * Optimized for JPEG encoding (where RGB bytes are needed directly).
202
+ * Output format: RGBRGBRGB... (no alpha channel)
203
+ *
204
+ * @param nv21 NV21 encoded YUV data
205
+ * @param width Original frame width
206
+ * @param height Original frame height
207
+ * @param targetWidth Target output width (for resizing)
208
+ * @param targetHeight Target output height (for resizing)
209
+ * @param outputRgbBytes Pre-allocated byte array, or null to allocate new
210
+ * @return Byte array of size [targetHeight * targetWidth * 3] with RGB bytes
211
+ */
212
+ fun nv21ToRgbByteArray(
213
+ nv21: ByteArray,
214
+ width: Int,
215
+ height: Int,
216
+ targetWidth: Int = width,
217
+ targetHeight: Int = height,
218
+ outputRgbBytes: ByteArray? = null
219
+ ): ByteArray {
220
+ val outputSize = targetWidth * targetHeight * 3
221
+ val output = outputRgbBytes?.takeIf { it.size >= outputSize } ?: ByteArray(outputSize)
222
+
223
+ val ySize = width * height
224
+ val uvPixelStride = 2
225
+
226
+ var outIdx = 0
227
+
228
+ for (targetY in 0 until targetHeight) {
229
+ val srcY = (targetY * height) / targetHeight
230
+ val srcRowOffset = srcY * width
231
+
232
+ for (targetX in 0 until targetWidth) {
233
+ val srcX = (targetX * width) / targetWidth
234
+
235
+ // Get Y component
236
+ val yVal = nv21[srcRowOffset + srcX].toInt() and 0xFF
237
+
238
+ // Get U and V components (NV21 layout: UV interleaved in second half)
239
+ val uvIndex = ySize + (srcY / 2) * width + (srcX / 2) * uvPixelStride
240
+ val vVal = nv21[uvIndex].toInt() and 0xFF
241
+ val uVal = nv21[uvIndex + 1].toInt() and 0xFF
242
+
243
+ // YUV to RGB conversion
244
+ val yf = yVal.toFloat()
245
+ val uf = uVal - 128f
246
+ val vf = vVal - 128f
247
+
248
+ val r = (yf + 1.402f * vf).coerceIn(0f, 255f).toInt().toByte()
249
+ val g = (yf - 0.34414f * uf - 0.71414f * vf).coerceIn(0f, 255f).toInt().toByte()
250
+ val b = (yf + 1.772f * uf).coerceIn(0f, 255f).toInt().toByte()
251
+
252
+ output[outIdx++] = r
253
+ output[outIdx++] = g
254
+ output[outIdx++] = b
255
+ }
256
+ }
257
+
258
+ return output
259
+ }
198
260
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-vision-camera-spoof-detector",
3
- "version": "1.0.2",
3
+ "version": "1.0.4",
4
4
  "description": "High-performance face anti-spoofing and liveness detection module for React Native Vision Camera. Uses TensorFlow Lite with GPU acceleration and optimized YUV processing.",
5
5
  "homepage": "https://github.com/jescon-tech/react-native-vision-camera-spoof-detector",
6
6
  "repository": {
@@ -10,10 +10,10 @@
10
10
  "bugs": {
11
11
  "url": "https://github.com/jescon-tech/react-native-vision-camera-spoof-detector/issues"
12
12
  },
13
- "license": "MIT",
13
+ "license": "JESCON TECHNOLOGIES PVT LTD",
14
14
  "author": {
15
15
  "name": "PRAFULDAS M M",
16
- "company": "JESCON TECHNOLOGIES PVT LTD",
16
+ "company": "JESCON TECHNOLOGIES PVT LTD THRISSUR,KERALA,INDIA",
17
17
  "email": "jescontechnologies@gmail.com"
18
18
  },
19
19
  "main": "index.js",
@@ -1,9 +0,0 @@
1
- # C/C++ build system timings
2
- generate_cxx_metadata
3
- execute-generate-process
4
- exec-configure 690ms
5
- [gap of 22ms]
6
- execute-generate-process completed in 713ms
7
- [gap of 22ms]
8
- generate_cxx_metadata completed in 741ms
9
-
@@ -1,9 +0,0 @@
1
- # C/C++ build system timings
2
- generate_cxx_metadata
3
- execute-generate-process
4
- exec-configure 603ms
5
- [gap of 22ms]
6
- execute-generate-process completed in 625ms
7
- [gap of 18ms]
8
- generate_cxx_metadata completed in 649ms
9
-
@@ -1,3 +0,0 @@
1
- # C/C++ build system timings
2
- generate_cxx_metadata 17ms
3
-
@@ -1,3 +0,0 @@
1
- # C/C++ build system timings
2
- generate_cxx_metadata 19ms
3
-
@@ -1,9 +0,0 @@
1
- # C/C++ build system timings
2
- generate_cxx_metadata
3
- execute-generate-process
4
- exec-configure 537ms
5
- [gap of 20ms]
6
- execute-generate-process completed in 558ms
7
- [gap of 21ms]
8
- generate_cxx_metadata completed in 588ms
9
-
@@ -1,9 +0,0 @@
1
- # C/C++ build system timings
2
- generate_cxx_metadata
3
- execute-generate-process
4
- exec-configure 463ms
5
- [gap of 22ms]
6
- execute-generate-process completed in 487ms
7
- [gap of 17ms]
8
- generate_cxx_metadata completed in 510ms
9
-