mirror of
https://github.com/Evolution-X/hardware_interfaces
synced 2026-02-01 16:50:18 +00:00
Camera: Allow maxDigitalZoom to be less than maxZoomRatio
For concurrent camera, we allow the maximum digital zoom to be smaller than the maximum zoom ratio. Adjust VTS test accordingly. Test: camera VTS test Bug: 151891611 Change-Id: I1d3813ed93faa83689dcb6a83490fae5581c602f
This commit is contained in:
@@ -6942,8 +6942,11 @@ void CameraHidlTest::verifyZoomCharacteristics(const camera_metadata_t* metadata
|
||||
|
||||
float minZoomRatio = entry.data.f[0];
|
||||
float maxZoomRatio = entry.data.f[1];
|
||||
if (maxDigitalZoom != maxZoomRatio) {
|
||||
ADD_FAILURE() << "Maximum zoom ratio is different than maximum digital zoom!";
|
||||
constexpr float FLOATING_POINT_THRESHOLD = 0.00001f;
|
||||
if (maxDigitalZoom > maxZoomRatio + FLOATING_POINT_THRESHOLD) {
|
||||
ADD_FAILURE() << "Maximum digital zoom " << maxDigitalZoom
|
||||
<< " is larger than maximum zoom ratio " << maxZoomRatio << " + threshold "
|
||||
<< FLOATING_POINT_THRESHOLD << "!";
|
||||
}
|
||||
if (minZoomRatio > maxZoomRatio) {
|
||||
ADD_FAILURE() << "Maximum zoom ratio is less than minimum zoom ratio!";
|
||||
|
||||
Reference in New Issue
Block a user