Skip to content

Commit

Permalink
Camera: Avoid roundBufferDimensionsNearest for AIDE2 YUV streams
Browse files Browse the repository at this point in the history
- AIDE2 is vendor enhanced feature which needs special resolutions
  for full and downscaled YUV streams.Those resolutions are not
  populated in static capabilities. So avoid roundBufferDimensionsNearest
  for YUV streams in privileged client case.

CRs-Fixed: 3012886

Change-Id: Ia1d134edd1fac2ffd454137aa2a4aa5b9d40c7a7
Signed-off-by: Pranav Vashi <[email protected]>
  • Loading branch information
Pavan Kumar Mc authored and Claymore1297 committed Mar 16, 2022
1 parent 0919c44 commit 30fa442
Showing 1 changed file with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,18 @@ bool SessionConfigurationUtils::roundBufferDimensionNearest(int32_t width, int32
}
}

// Avoid roundBufferDimensionsNearest for privileged client YUV streams to meet the AIDE2
// requirement. AIDE2 is vendor enhanced feature which requires special resolutions and
// those are not populated in static capabilities.
if (isPriviledgedClient == true && format == HAL_PIXEL_FORMAT_YCbCr_420_888) {
ALOGI("Bypass roundBufferDimensionNearest for privilegedClient YUV streams "
"width %d height %d",
width, height);

bestWidth = width;
bestHeight = height;
}

if (bestWidth == -1) {
// Return false if no configurations for this format were listed
return false;
Expand Down

0 comments on commit 30fa442

Please sign in to comment.