Correct conversion of camera2 YUV_420_888 to JPEG

I know that the topic has already appeared several times, but none of the solutions actually works, starting from the answers suitable for the old camera API (where the YUV data comes in a neat byte []), through damaged images, to save JPEG everything in the green scale using RenderScript (which, incidentally, is the best I can do now).

What the Camera2Basic example looks like, it just sets the Type.Builder format to JPEG. The problem with this (as also discussed in several posts) is that it slows down the camera pipeline. YUV_420_888 is much faster.

So, did someone manage to perform the correct conversion YUV_420_888 β†’ JPEG?

+5
source share

All Articles