From 13fb8a7a82120705d756299581f1452d0260ad14 Mon Sep 17 00:00:00 2001 From: Changyeon Jo Date: Mon, 8 Nov 2021 08:12:33 -0800 Subject: [PATCH] Update VtsHalEvsV1_*TargetTest - Removes a requirement of the landscape aspect ratio of the captured frames because the Extended View System now allows the video streams in any aspect ratio - Increases the maximum latency of the video stream start request from 500 ms to 1 second to accommodate the camera system design with the additional processing units outside of the head unit - Reduces a number of additional buffers to allocate from 6 to 2 in CameraStreamBuffering test, to be consistent with comments Bug: 204835095 Test: atest VtsHalEvsV1_0TargetTest and atest VtsHalEvsV1_1TargetTest Change-Id: Id41bde10964b650f78e76d4f97a4588367f7c7fc (cherry picked from commit 7bc98ce6edb1f2ffd79af981c02e0e4ab61ff68a) --- .../evs/1.0/vts/functional/VtsHalEvsV1_0TargetTest.cpp | 9 ++------- .../evs/1.1/vts/functional/VtsHalEvsV1_1TargetTest.cpp | 7 +------ 2 files changed, 3 insertions(+), 13 deletions(-) diff --git a/automotive/evs/1.0/vts/functional/VtsHalEvsV1_0TargetTest.cpp b/automotive/evs/1.0/vts/functional/VtsHalEvsV1_0TargetTest.cpp index ad607d8087..9c72acdf8f 100644 --- a/automotive/evs/1.0/vts/functional/VtsHalEvsV1_0TargetTest.cpp +++ b/automotive/evs/1.0/vts/functional/VtsHalEvsV1_0TargetTest.cpp @@ -18,7 +18,7 @@ // These values are called out in the EVS design doc (as of Mar 8, 2017) -static const int kMaxStreamStartMilliseconds = 500; +static const int kMaxStreamStartMilliseconds = 1000; static const int kMinimumFramesPerSecond = 10; static const int kSecondsToMilliseconds = 1000; @@ -332,11 +332,6 @@ TEST_P(EvsHidlTest, CameraStreamPerformance) { printf("Measured time to first frame %0.2f ms\n", timeToFirstFrame * kNanoToMilliseconds); ALOGI("Measured time to first frame %0.2f ms", timeToFirstFrame * kNanoToMilliseconds); - // Check aspect ratio - unsigned width = 0, height = 0; - frameHandler->getFrameDimension(&width, &height); - EXPECT_GE(width, height); - // Wait a bit, then ensure we get at least the required minimum number of frames sleep(5); nsecs_t end = systemTime(SYSTEM_TIME_MONOTONIC); @@ -370,7 +365,7 @@ TEST_P(EvsHidlTest, CameraStreamBuffering) { ALOGI("Starting CameraStreamBuffering test"); // Arbitrary constant (should be > 1 and not too big) - static const unsigned int kBuffersToHold = 6; + static const unsigned int kBuffersToHold = 2; // Get the camera list loadCameraList(); diff --git a/automotive/evs/1.1/vts/functional/VtsHalEvsV1_1TargetTest.cpp b/automotive/evs/1.1/vts/functional/VtsHalEvsV1_1TargetTest.cpp index 8cc18822f2..33234afe55 100644 --- a/automotive/evs/1.1/vts/functional/VtsHalEvsV1_1TargetTest.cpp +++ b/automotive/evs/1.1/vts/functional/VtsHalEvsV1_1TargetTest.cpp @@ -472,11 +472,6 @@ TEST_P(EvsHidlTest, CameraStreamPerformance) { << std::scientific << timeToFirstFrame * kNanoToMilliseconds << " ms."; - // Check aspect ratio - unsigned width = 0, height = 0; - frameHandler->getFrameDimension(&width, &height); - EXPECT_GE(width, height); - // Wait a bit, then ensure we get at least the required minimum number of frames sleep(5); nsecs_t end = systemTime(SYSTEM_TIME_MONOTONIC); @@ -514,7 +509,7 @@ TEST_P(EvsHidlTest, CameraStreamBuffering) { LOG(INFO) << "Starting CameraStreamBuffering test"; // Arbitrary constant (should be > 1 and not too big) - static const unsigned int kBuffersToHold = 6; + static const unsigned int kBuffersToHold = 2; // Get the camera list loadCameraList();