Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fe40b621 authored by Emilian Peev's avatar Emilian Peev Committed by Keun Soo Yim
Browse files

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 0fdd7cdc)
parent e7300721
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -3649,6 +3649,7 @@ TEST_F(CameraHidlTest, processCaptureRequestBurstISO) {
                                        static_cast<int32_t>(PixelFormat::IMPLEMENTATION_DEFINED)};
    uint64_t bufferId = 1;
    uint32_t frameNumber = 1;
    float isoTol = .03f;
    ::android::hardware::hidl_vec<uint8_t> 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();