Skip to content

Conversation

@juliansteenbakker
Copy link
Owner

Since camera2 1.5.0, the analysis input can be NV21. This means we can directly convert the image to bitmap, and remove the deprecated renderscript API.

Fixes #1142

Can be merged after #1530

@codecov-commenter
Copy link

codecov-commenter commented Sep 23, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 38.35%. Comparing base (3d8565f) to head (0bbb29e).

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #1533   +/-   ##
========================================
  Coverage    38.35%   38.35%           
========================================
  Files           42       42           
  Lines          996      996           
========================================
  Hits           382      382           
  Misses         614      614           
Flag Coverage Δ
unittests 38.35% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@juliansteenbakker
Copy link
Owner Author

@navaronbracke i seem to be getting some weird artifacts in the returnImage. Can you maybe check if you're having the same issue? Maybe it's something related to my test device.

@navaronbracke
Copy link
Collaborator

I'll check on this branch

@juliansteenbakker juliansteenbakker marked this pull request as ready for review October 22, 2025 21:38
@juliansteenbakker
Copy link
Owner Author

@navaronbracke I've updated the format back to yuv, and used the built in toBitmap function, which seems to be working fine. I've moved analysis to a different thread, and added coroutines for the bitmap functions to prevent the main ui thread from blocking.

I think it's ready to merge, and would be a nice update since it removes all deprecated renderscript api's

Copy link
Collaborator

@navaronbracke navaronbracke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! This needs a changelog update, too?

@juliansteenbakker juliansteenbakker merged commit 250bea4 into develop Oct 23, 2025
7 checks passed
@juliansteenbakker juliansteenbakker deleted the fix/nv21-update branch October 23, 2025 13:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Deprecated RenderScript APIs in Mobile Scanner Plugin

3 participants