-
-
Notifications
You must be signed in to change notification settings - Fork 525
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Android should always use NV21 image format #1116
Comments
Any idea about dev time? Cheers! |
I'm currently a bit stretched on some other work, but I can start implementing this fix at the end of this week. I don't expect this to take too long to implement, though. We'll have to specify that we use NV21 for the camera preview and drop the conversion to YUV entirely. I don't expect it to be much else, in terms of a fix. |
@navaronbracke Today we encountered this issue on a Galaxy A23 (we are using mobile_scanner 5.2.3). Could you let us know if your proposed fix is already included in the latest version? Thanks! |
The reported issue is for Samsung A23 devices. I do not yet have an update, although I want this fixed for v5.3.0 |
Also happening on a Samsung A54 5G Android 14. @navaronbracke thanks for the hard work! Do you have any ETA for the 5.3.0? |
@navaronbracke for me it's critical too, if you have a working version I can test it in the field, distributing a Beta App to affected users. |
I am currently looking into landing a fix for a different issue, but after that, fixing the NV21 formats bug is next on my list. |
@navaronbracke can you tell me if this fix is simple and how/where make it, I've the urgency to put it in place now, thanks :) |
I had another look at this issue and also had a look at what the CameraX always sends back So we will have to always convert I believe that this will require us to do the following:
Do bear in mind when starting your work, to start from the ios-vision branch, as that is the current beta for version 7.0.0 |
Hi, Thanks you @navaronbracke for the resume, can anyone know kotlin, have time to fix this ? Is a quite big issue for the module, that all Samsung phone can't use any apps with code bar detection ... |
@julfabre I would like to implement that fix, I’m waiting because I haven’t an affected phone in my hands. @navaronbracke, can the problem be simulated, forcing the weong camera output? |
I don't have a Samsung device at hand either. I'm not sure if you can force the wrong camera output. |
On Android, mobile_scanner currently has a bug, where it defaults to using YUV, instead of NV21.
Per the documentation in https://developer.android.com/reference/android/hardware/Camera.Parameters#setPreviewFormat(int)
the NV21 format is always supported. So we should always be using NV21 on Android.
Per the docs in https://developer.android.com/reference/android/graphics/ImageFormat#NV21 it seems that NV21 is the default format when no other format is requested.
The discussion in #698 also mentions that the affected device only supports NV21.
Supersedes #698 #1124 and #1077
The text was updated successfully, but these errors were encountered: