Skip to content

Fix yuv to nv21#1

Merged
Denrage merged 2 commits intoDenrage:android-camera2from
jameswestgate:android-camera2
Feb 5, 2021
Merged

Fix yuv to nv21#1
Denrage merged 2 commits intoDenrage:android-camera2from
jameswestgate:android-camera2

Conversation

@jameswestgate
Copy link
Copy Markdown

@jameswestgate jameswestgate commented Feb 4, 2021

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

@Denrage
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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