Martin Schulze
unread,Feb 11, 2021, 3:49:31 AM2/11/21Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Android CameraX Discussion Group, Eino-Ville Talvala, Android CameraX Discussion Group, re.le...@gmail.com, charco...@google.com, Scott Nien, Martin Schulze
> This does not provide max resolution image but for now it offers a quick and easy workaround for getting YUV image.
Unfortunately, this does not work for us. We need at least around 2000 pixels on the shorter side for our usecase which is pushing against the limits of what some devices can do.
> I'm actually somewhat surprised that worked, and it may be a fix that only applies to some subset of devices. Renderscript generally actually asks for YUV under the hood as well, but it's probably somewhat device-specific.
I was surprised too. It was an accidental fix. However, having a working solution with Camera2 makes it much more painful to loose again with CameraX.
I must admit, that I only guessed at what might be the underlying cause, since we previously simply had a YUV ImageReader and that would fail. So I just assumed that it would not be using a YUV reader.
Just in case it matters: we only use Renderscript for conversion to a RGBA buffer which is then consumed via C++ code. So we'd be okay with lossless RGBA output too.
> But either way, a full-resolution PRIV is just as unsupported in general as full-resolution YUV on the more limited camera devices.
I guess we could live with only supporting hardware level "full" and above.
However, our device database shows many devices where android.scaler.mandatoryStreamCombinations says it supports YUV (FHD) +YUV (Full Resolution) capture, even on some limited devices like the A10 or A51.
Others don't report android.scaler.mandatoryStreamCombinations but may work too.
Each additional device that works is a plus for us.
> But I'm glad you found a path that works for you, on that particular device.
Well, the workaround does not work on CameraX but we'd really like to profit from the simplified code. The A50 is especially problematic: due to its big market share, we cannot ignore this device.
It seems the whole Galaxy A series show the same problem and improvement on Camera2.
We looked into workarounds with CameraX, e.g. getting a full resolution image for analysis.
However, even if the device would support that, we cannot request more than full HD through CameraX. We'd be okay with only ~2-5FPS on the analysis stream.
In the end we want to support as many devices as possible, so we'd really like to be able to go to full resolution wherever available.