From 0fdd7cdc0eab249e0f0615fad1034231c09987dd Mon Sep 17 00:00:00 2001 From: Emilian Peev Date: Tue, 26 Jun 2018 09:17:33 +0100 Subject: [PATCH] Camera: Allow 3% ISO tolerance during ISO burst VTS The advertised ISO ranges may not be entirely supported on some devices. Expect a 3% tolerance when comparing the applied results versus the expected ISO value. Bug: 80025874 Test: run vts --skip-all-system-status-check --skip-preconditions --primary-abi-only --module VtsHalCameraProviderV2_4Target -l INFO Change-Id: Ibd2758e48a0924e81877e35dd27433669274fdb3 --- .../2.4/vts/functional/VtsHalCameraProviderV2_4TargetTest.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/camera/provider/2.4/vts/functional/VtsHalCameraProviderV2_4TargetTest.cpp b/camera/provider/2.4/vts/functional/VtsHalCameraProviderV2_4TargetTest.cpp index 95c7167c3b..f8022ae9e9 100644 --- a/camera/provider/2.4/vts/functional/VtsHalCameraProviderV2_4TargetTest.cpp +++ b/camera/provider/2.4/vts/functional/VtsHalCameraProviderV2_4TargetTest.cpp @@ -3643,6 +3643,7 @@ TEST_F(CameraHidlTest, processCaptureRequestBurstISO) { static_cast(PixelFormat::IMPLEMENTATION_DEFINED)}; uint64_t bufferId = 1; uint32_t frameNumber = 1; + float isoTol = .03f; ::android::hardware::hidl_vec settings; for (const auto& name : cameraDeviceNames) { @@ -3772,7 +3773,8 @@ TEST_F(CameraHidlTest, processCaptureRequestBurstISO) { ASSERT_TRUE(inflightReqs[i].collectedResult.exists(ANDROID_SENSOR_SENSITIVITY)); camera_metadata_entry_t isoResult = inflightReqs[i].collectedResult.find( ANDROID_SENSOR_SENSITIVITY); - ASSERT_TRUE(isoResult.data.i32[0] == isoValues[i]); + ASSERT_TRUE(std::abs(isoResult.data.i32[0] - isoValues[i]) <= + std::round(isoValues[i]*isoTol)); } ret = session->close();