Skip to content
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

Fix yuv to nv21 #1

Merged
merged 2 commits into from
Feb 5, 2021
Merged

Conversation

jameswestgate
Copy link

@jameswestgate jameswestgate commented Feb 4, 2021

Fixes on issue with yuv conversion found on Pixel5, and improves performance of BarcodeReader.

@Denrage
Copy link
Owner

Denrage commented Feb 4, 2021

Appreciate the effort for that change! I actually tried that implementation before but it didn't work in the beginning for me bc i had a problem at another place, so i used the much simpler version bc that worked for my testing devices. Still don't know why exactly it only fails on specific devices and what actually fails there.
Did you test your implementation with other devices or only with the Pixel5?

@jameswestgate
Copy link
Author

Still don't know why exactly it only fails on specific devices and what actually fails there.

Reading https://stackoverflow.com/questions/52726002/camera2-captured-picture-conversion-from-yuv-420-888-to-nv21, it seems that is an incomplete implementation. You can see in the new implementation that it tries to use that route for performance reasons if it can.

@jameswestgate
Copy link
Author

Did you test your implementation with other devices or only with the Pixel5?

I also tested on my Samsung Galaxy S9 running Android 9.

@Denrage Denrage merged commit 80653d2 into Denrage:android-camera2 Feb 5, 2021
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.

2 participants