Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
bug
When switching to RAW Mode, we set
mCaptureSize
field usingcomputeCaptureSize()
, this one relies on theSet<Size>
ofsupportedPictureSizes
, picking the biggest, that's the problem: some manufacturer like in Redmi Note 8 Pro, returns as RAW_SENSOR sizes:But 9280x6944 it's a lie, since the maximum sensor pixel array is 4640x3472px . So while for JPEG it's not crashing because they might use some kinda of interpolation to upsample, for RAW it will since the only capture size allowed is the one set in
SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE
( orSENSOR_INFO_PIXEL_ARRAY_SIZE
if the first is null )Enclosed dump of Camera2 API in Redmi Note 8 Pro
camera2info-Redmi_Redmi_Note_8_Pro.txt
To Reproduce
Steps to reproduce the behavior, possibly in the demo app:
#2
, camera stopjava.lang.AssertionError: Height and width of image buffer did not match height and width of either the preCorrectionActiveArraySize or the pixelArraySize.
Expected behavior
Switch to dng mode and capture in raw