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: Add support for YUV_420_888 Image format. #732

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

panmari
Copy link
Contributor

@panmari panmari commented Jan 14, 2025

Casting the bytes to a type directly is not possible, thus allocating a new texture is necessary (and costly).

But on the bright side, we avoid the conversion inside the camera plugin [0].

[0] https://github.com/flutter/packages/blob/d1fd6232ec33cd5a25aa762e605c494afced812f/packages/camera/camera_android/android/src/main/java/io/flutter/plugins/camera/media/ImageStreamReaderUtils.java#L35

Casting the bytes to a type directly is not possible, thus allocating
a new texture is necessary (and costly).

But on the bright side, we avoid the conversion inside the camera
plugin [0].

[0] https://github.com/flutter/packages/blob/d1fd6232ec33cd5a25aa762e605c494afced812f/packages/camera/camera_android/android/src/main/java/io/flutter/plugins/camera/media/ImageStreamReaderUtils.java#L35
@panmari
Copy link
Contributor Author

panmari commented Jan 14, 2025

There's still the open issue of cleaning up the texture. I'd appreciate some feedback on how to change the API accordingly. I don't think there's a way around that.

@panmari panmari changed the title Add support for YUV_420_888 Image format. fix: Add support for YUV_420_888 Image format. Jan 14, 2025
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.

1 participant