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

yuv2buf for processing ImageReader output #405

Merged
merged 1 commit into from
Aug 5, 2021
Merged

Conversation

gordinmitya
Copy link
Contributor

Sorry, I unintentionally closed #336 and had to close #404 because of google-cla bot. So here is updated version of them.

Part discussion of this code is in issue #277.
Documentation about approach, unit-tests, performance benchmarks + demo application are here https://github.com/gordinmitya/yuv2buf. This code is tested in several apps in production with both: Camera2 output and MediaCodec outputs.

I compared performance of previous and new code on my Mi 9t pro (Snapdragon 855): old 3.5-4.0ms, new 2.6-3.0ms.
Modified CameraActivity.kt was used for comparison.

Will be happy to answer questions, if any!

@ggfan
Copy link
Contributor

ggfan commented Aug 2, 2021

cool. a separate note, if you have not filled the CameraX 1.0 survey yet, may you fill it here: https://forms.gle/DarkBYwWFmDzdtLr8? It would be a good one to Camera(X) team: make sure to state your suggestions! Thanks!

@ggfan
Copy link
Contributor

ggfan commented Aug 3, 2021

Confirmed for the performance gain in Pixel3 devices with images 640x480: about 30% improvement. Performance is import. A couple of things to do, I think:

  • Add some more detailed comment for YuvToRgbConvert() in your version or keep the original warning there (feel free to change but keep the warning might be good)
  • Convert the file to Kotlin
  • CameraX dependency: need to decide, punt it for now.

could you help for them? thx

@ggfan
Copy link
Contributor

ggfan commented Aug 5, 2021

@gordinmitya merging this one now, then I will get help internally to convert it to kotlin then plug it into samples (right now it is in the lib module, not used). thank you for the PR.

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