Skip to content

Performance & Android 15+ Compatibility

Latest

Choose a tag to compare

@ltrudu ltrudu released this 05 Dec 15:39
· 5 commits to master since this release

Version 1.36 - ⚡ Performance & Android 15+ Compatibility

Ultra-fast native grayscale image processing with NDK/JNI and Android 15+ 16KB page size support.

Native NDK Grayscale Optimization:

Ultra-Fast Y-Plane Extraction: Native C++ implementation extracts grayscale directly from YUV Y-plane

  • No Color Conversion Required: Y-plane IS grayscale - just copy it directly (no YUV→RGB math)
  • Single Plane Processing: Only reads Y-plane, skips U/V planes entirely
  • Direct Bitmap Writing: Native code writes directly to Android Bitmap using AndroidBitmap_lockPixels()
  • Automatic Fallback: Java implementation fallback when native library is unavailable

Performance Benefits:

  • ~3-5x faster than full YUV to RGB conversion
  • Minimal CPU usage - simple memory copy instead of color math
  • Only 1 plane processed instead of 3
  • ~3 operations per pixel instead of ~15

📱 Android 15+ 16KB Page Size Support:

Future-Proof Compatibility: Native library built with 16KB page size alignment

  • -Wl,-z,max-page-size=16384: Linker flag ensures compatibility with Android 15+ devices using 16KB memory pages
  • Seamless Operation: Works on both traditional 4KB and new 16KB page size devices
  • No Runtime Configuration Required: Compatibility is built into the native library

💡 Benefits:

Maximum Performance: Grayscale extraction is the fastest possible approach for capture zone cropping

Android 15+ Ready: Application is prepared for upcoming Android devices with 16KB page sizes

Battery Efficiency: Minimal CPU usage extends battery life during extended scanning sessions

SDK Compatible: Zebra AI Vision SDK fully supports grayscale bitmap input