From fe40b621b7c3540e5f95f3e6c5d4cb795f221e09 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 Merged-In: Ibd2758e48a0924e81877e35dd27433669274fdb3 Change-Id: Ibd2758e48a0924e81877e35dd27433669274fdb3 (cherry picked from commit 0fdd7cdc0eab249e0f0615fad1034231c09987dd) --- .../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 c6c00d264e..439333d9ca 100644 --- a/camera/provider/2.4/vts/functional/VtsHalCameraProviderV2_4TargetTest.cpp +++ b/camera/provider/2.4/vts/functional/VtsHalCameraProviderV2_4TargetTest.cpp @@ -3649,6 +3649,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) { @@ -3778,7 +3779,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();