Commit Graph

39 Commits

Author SHA1 Message Date
Treehugger Robot
8125e862c3 Merge "Camera VTS: Verify high speed video configurations" into main am: 607f7e7ff7 am: 68d44aa5e2
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2585399

Change-Id: Ia6aa1f2395bbcf7778ea5c6820cf778168df1296
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-18 09:03:03 +00:00
Treehugger Robot
68d44aa5e2 Merge "Camera VTS: Verify high speed video configurations" into main am: 607f7e7ff7
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2585399

Change-Id: Ib20ae0eb0bc7466acb39e7eb0409fde8641f6070
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-18 08:04:22 +00:00
Kwangkyu Park
4b7fd45612 Camera VTS: Verify high speed video configurations
Verify high speed video configurations based on the tag definition.

Bug: 274392420
Test: Ran on cuttlefish
Change-Id: Ie64415cc8694d8f4da59a01f6051bc847ae30fa7
2023-09-15 14:10:09 +09:00
Emilian Peev
bd4cdc6a9a Camera VTS: Wait for camera provider to become active
Use "AServiceManager_waitForService" instead of
"AServiceManager_getService" to wait for any camera
providers that might be using the lazy mechanism and
are not running all the time.

Bug: 297965980
Test: atest VtsAidlHalCameraProvider_TargetTest

Change-Id: I6374dc768cd1068885668f927f902dcee44a7a42
2023-09-05 18:18:49 +00:00
Austin Borger
263e362091 Camera VTS: Properly initialize Stream in various places
useCase and colorSpace are not explicitly initialized. colorSpace must
be explicitly initialized to UNSPECIFIED, as its default value is not
zero. Without initialization, the HAL will receive incorrect Stream
data.

Bug: 287305593
Test: Ran full VTS test on Cuttlefish / OEM testing.
Change-Id: I6a29600b5dc06ebdc61b38e0585204fe52d590c2
2023-06-29 00:49:17 +00:00
Shuzhen Wang
e1dcc40ec3 Camera: VTS: Fix fence fd double close am: 3ad137edbb am: 2603479470 am: 7c4bb95a18 am: 36f18e9327
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2539830

Change-Id: Ifa023065ee2380dd87c898275fcd0d1cf261fcf5
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-04-18 01:43:17 +00:00
Shuzhen Wang
3ad137edbb Camera: VTS: Fix fence fd double close
Fence fd is closed when processCaptureResult returns. In order to
wait for the release fence *after* processCaptureResult returns,
the fence fd needs to be duped.

Test: Vendor testing
Bug: 241281568
Change-Id: Ib74f9bb141802713b476a2ef48a2252125a7915d
2023-04-17 05:02:05 +00:00
Treehugger Robot
8c242dcfac Merge "Camera: VTS: Wait for release fence before consuming buffers" into android13-tests-dev am: 1c8377c24c am: c3b6c6c691 am: 35bd55b0d7
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2520900

Change-Id: I5a993cbe326db709d496cdadfabf18b774353c5c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-04-05 18:46:48 +00:00
Treehugger Robot
1c8377c24c Merge "Camera: VTS: Wait for release fence before consuming buffers" into android13-tests-dev 2023-04-05 17:10:33 +00:00
Shuzhen Wang
d1c14328fd Camera: Fix VTS failure for depth only camera am: 72f97643fb am: e5489ab299 am: 1dc71caa85
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2523160

Change-Id: I325c9fe2fdd0423bd7d5f219406521df8e208c60
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-04-05 03:19:56 +00:00
Shuzhen Wang
72f97643fb Camera: Fix VTS failure for depth only camera
If the device is depth-only, use threshold with Y16 format rather than
IMPLEMENTATION_DEFINED.

This fixes the regression introduced by the fix for b/265984260.

Bug: 276957901
Test: atest VtsAidlHalCameraProvider_TargetTest
Change-Id: If9023f1ed17bb761abbb9be36e567264f8bf0689
2023-04-04 20:57:27 +00:00
Shuzhen Wang
0f56c56709 Camera: VTS: Wait for release fence before consuming buffers
The camera HAL may signal release fence after processCaptureResult.
If the VTS test waits for the release fence in the context of the
capture result, there is possibility of deadlock.

Rather, we should wait for the releaseFence in a different thread
context to really emulate the real application behavior.

Test: atest VtsAidlHalCameraProvider_TargetTest
Bug: 241281568
Change-Id: Id1d92e901aae1cab084846d252ef090fcda182d7
2023-04-04 16:45:28 +00:00
TreeHugger Robot
90c8cd9a3b Merge "Camera: VTS: Fail test if availableSettingsOverride is empty" into udc-dev 2023-04-04 04:57:36 +00:00
Shuzhen Wang
49cb038af1 Camera: VTS: Fail test if availableSettingsOverride is empty
If availableSettingsOverride key is in CameraCharacteristics, it must
contains at least OFF.

Test: atest VtsAidlHalCameraProvider_TargetTest
Bug: 272546819
Change-Id: If6fb7275fc1191947dc120c9873274f4a1883720
2023-03-31 15:44:40 -07:00
Austin Borger
5e80374926 Camera VTS: Fix processColorSpaceRequests.
Changes were made to process10BitDynamicRangeRequest and the way frames
are numbered. This needs to be carried over to
processColorSpaceRequests.

Bug: 275007341
Test: Ran process10BitColorSpaceRequest / process8BitColorSpaceRequest
Change-Id: Ia0eb2fd71aff1bfc8398c85c68e1b9575a1cc058
2023-03-24 18:29:39 -07:00
Austin Borger
7dd74a94c2 Merge "Camera VTS: Updated ColorSpaceNamed and color space tests." into udc-dev 2023-03-22 20:04:15 +00:00
Austin Borger
54b2236b22 Camera VTS: Updated ColorSpaceNamed and color space tests.
BT2020_HLG and BT2020_PQ were adding since the ColorSpaceProfiles tests
were checked in. Add those to the ColorSpaceNamed enum.

Also remove unsupported color spaces from the list of 8-bit color spaces
to test, and change BT2020 to BT2020_HLG.

Test: Ran on Pixel 7.
Bug: 274789672
Change-Id: I9625a1f05017ccdcb383cdf8fd13084688acc79f
2023-03-22 11:30:11 -07:00
Austin Borger
0918fc865a Camera VTS: Add test validating stream configuration metadata
Vendor static metadata entries related to the stream configuration tags
like min frame duration, stall duration could include duplicate or
invalid data. Check that this is not the case.

Initially, this test only has impact for 10-bit HDR devices. More checks
will be added in the future.

Bug: 269165407
Test: Ran test on Pixel 7.
Change-Id: I2ad820c1ba4753508fa1f61b31b51739358099ea
2023-03-22 11:05:14 -07:00
Shuzhen Wang
3b3183fd79 Merge "Camera VTS: Override RotateAndCrop metadata" into android13-tests-dev am: 74a4696d56 am: f5dbd4869e am: 1d07d585e9
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2450127

Change-Id: I0caccb6f505b9c914e01fa95a063fe6990eebb6e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-02-22 22:10:30 +00:00
Michelle Ho
388d4ffb3b Camera VTS: Override RotateAndCrop metadata
Per camera metadata definition, ROTATE_AND_CROP_AUTO will never be sent
to the HAL, as camera service takes reponsibility of translating AUTO to
specific rotation value. So for VTS tests, we should always override
the metadata in CaptureRequest.

Bug: 270052579
Test: Run VtsAidlHalCameraProvider_TargetTest
Change-Id: I96f4992e145da25c463b0b406aa2a371af30f41f
2023-02-22 10:19:13 +00:00
Treehugger Robot
36b6fd6600 Merge "Camera VTS: Remove unnecessary test of Y16 depth format" into android13-tests-dev am: ca60e0b71f am: 6f48e8b475 am: da32855363
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2402628

Change-Id: I5095b3a4d6bfd5e4105faff7656d90a81c4a82e6
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-02-09 02:49:40 +00:00
Treehugger Robot
ca60e0b71f Merge "Camera VTS: Remove unnecessary test of Y16 depth format" into android13-tests-dev 2023-02-09 00:44:15 +00:00
Shuzhen Wang
cd3c483ab0 Camera VTS: Remove unnecessary test of Y16 depth format
getAvailableOutputStreams() shouldn't unconditionally add Y16 stream
configurations. Instead, if the threshold being passed in is valid,
getAvailableOutputStreams() should use the threshold's format
instead.

Test: Run VTS on pixel; vendor testing.
Bug: 265984260
Change-Id: I3c8119c6032141bb6e2f95f060f014a13340d16b
2023-02-08 21:56:51 +00:00
Treehugger Robot
6d6cda075b Merge "Camera VTS: Fix AIDL status typo" into android13-tests-dev am: 1c4170754f am: 98a65f23f0 am: 4761bc032e am: 8c763402a9
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2397737

Change-Id: If5172b4f0158995e349163049369b2fa065690bf
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-01-25 04:55:54 +00:00
Emilian Peev
7195938fe2 Camera VTS: Fix AIDL status typo
"physicalCameraDeviceStatusChange" returns a default
ScopedAStatus that will not include a valid AStatus instance.
This will result in binder instabilities once the status
is being parceled.
Return "ScopedAStatus::ok" instead.

Bug: 253993253
Test: adb shell VtsAidlHalCameraProvider_TargetTest
Change-Id: I219f608a04aaec0631e3de58a7e0d47a30294e52
2023-01-20 13:57:17 -08:00
Jayant Chowdhary
de1909e865 Camera: Add metadata support for cropped RAW streams.
Bug: 247524520

Test: Camera CTS
Test: Camera VTS

Change-Id: Ie50359aca3fbbd6088e2e1525cca85c7d5eb0ad0
Signed-off-by: Jayant Chowdhary <jchowdhary@google.com>
2022-12-09 23:44:41 +00:00
Shuzhen Wang
4dd6a516a6 Camera: Add new camera metadata for settings override frame number
Add a frame number field in HAL capture result metadata to indicate
the frame number of newer request overriding this capture.

This is needed so that ZoomRatioMapper can look up the newer request's
zoom ratio.

Also add VTS test for transition between OFF and ZOOM.

Test: Camera VTS on cuttlefish
Bug: 239822823
Change-Id: I7439950cdb9f346bf36c4cc872fd7865eb9cf669
2022-11-17 00:42:57 +00:00
Bharatt Kukreja
ab80f9f5a0 Camera: Add settings override API
The new API can be used to speed up certain controls (such as
zoom) with capture request.

Auto-generated file from changes in metadata_definitions.xml

Bug: 239822823
Test: Successful build
Change-Id: I73faf396e8e050b4fda19c013a1542cc03b9af08
2022-10-25 02:52:47 +00:00
Austin Borger
3ab0c3acf5 Merge "Create API for reporting color space support to Camera2 framework consumers." 2022-10-24 17:25:11 +00:00
Austin Borger
4728fc48cc Create API for reporting color space support to Camera2 framework consumers.
Test: Ran CtsCameraTestCases.
Test: Ran VtsAidlHalCameraProvider_TargetTest.
Test: Created app to test display P3 camera, switching between color spaces
Bug: 238359088
Change-Id: I382dea5d13582817959001246240141e83d8172d
2022-10-21 11:01:18 -07:00
kongchenrui
7549241c15 Fix the problem that the data field of Entry in the verifyLogicalOrUltraHighResCameraMetadata function is empty
The reason for this problem is: local variables are used when saving
PhysicalCameraCharacteristics. When its life cycle ends, physChars will
be released. Since Entry uses a pointer, data will be null. So physChars
should be defined outside else to ensure that physChars is not released
during use

Bug: 248221707
Test: VtsHalCameraProviderV2_4TargetTest
Test: VtsAidlHalCameraProvider_TargetTest
Signed-off-by: kongchenrui <kongchenrui@xiaomi.com>
Change-Id: I4c05e695d255f210f310f8ce78ec2fa71a42cee9
2022-09-28 20:35:55 +00:00
Emilian Peev
dda1eb771c Camera: Import gralloc buffers before metadata queries
Raw buffer handles do not support metadata queries and need
to be imported first.
Additionally map the result buffer ids to the inflight
buffers and queue the maximum amount of inflight buffers
as advertised by Hal. Since we will be streaming a set
of buffers, use an appropriate preview size.

Bug: 237576060
Test: adb shell
/data/nativetest64/VtsAidlHalCameraProvider_TargetTest/VtsAidlHalCameraProvider_TargetTest
--gtest_filter=PerInstance/CameraAidlTest.process10BitDynamicRangeRequest/0_android_hardware_camera_provider_ICameraProvider_internal_0

Change-Id: Id854c2a8d1588a151240d1b32197dbace7e1a057
2022-07-28 16:40:35 -07:00
Avichal Rakesh
9f352766a9 Camera VTS: remove duplicate function in anonymous namespace
The anonymous namespace in camera_aidl_test.cpp contained a buggy
implementation of `matchDeviceName` can was being called into by a few
tests. This CL removes the buggy implementation and fixes the faulty
calls to call into the correct function.

Bug: 233252432
Bug: 233221359
Test: atest VtsAidlHalCameraProvider_TargetTest
Change-Id: Icfe9bbc75e38d4d23bdcf64a048120708045b639
2022-05-24 21:07:53 +00:00
Shuzhen Wang
f68d60d4af Merge "Camera: Increase bit depth of stream use case to 64" into tm-dev 2022-03-14 22:16:36 +00:00
Shuzhen Wang
36efa7161a Camera: Increase bit depth of stream use case to 64
Test: Camera CTS
Bug: 223387965
Change-Id: I23a4324602ed37cf38c7a1a34dade615c4adb72b
2022-03-09 22:57:40 +00:00
Avichal Rakesh
fbcf7ea514 Camera: Misc VTS test fixes
This CL fixes two tests:
* `systemCameraTest`: Fix incorrect vector initialization. The test was
  accidentally using the size constructor instead of initialization list
  constructor.
* `processMultiCaptureRequestPreview`: Allow unsupported stream configs.
  The test assumed that all stream combinations from physical cameras
  that back a LogicalMultiCamera were supported. This led to false
  test failures. This CL allows the test to exit early if the HAL
  reports that a stream combination is not supported.

Bug: 222648486
Test: `test VtsAidlHalCameraProvider_TargetTest` pass on failing devices
Change-Id: I009cc2f4b8b94a26b813883cdc1403ae0eb5c477
2022-03-09 21:55:24 +00:00
Avichal Rakesh
d3503a349f camera: Fix AIDL VTS test
The default value of a Stream's `dynamicRangeProfile` field is invalid,
which means the caller needs to set it to a sensible default with each
call. This CL updates the Stream creation in VTS test to use
`ANDROID_REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP_STANDARD`
wherever a Stream object was being created with implicit default.

Bug: 210912368
Test: Existing VTS tests now pass on Cuttlefish
Change-Id: Iaae2f6dfde852fc9c076a6029854ccdf8f68d39a
2022-02-25 06:30:27 +00:00
Avichal Rakesh
51aa86c095 camera: Fix build errors due to CLs interleaving.
ag/16982347 and ag/16988237 were submitted around the same time, but
can cause build failure when put together. This CL fixes the
compilation issues and a few other other warnings.

Fix: 221154052
Test: Existing
Change-Id: Ia865e3bfc6cd77e7eff1efa5729d6db0d58c279d
2022-02-24 05:48:14 +00:00
Avichal Rakesh
362242f73c Camera: Migrate VTS tests to AIDL
This CL migrates the existing camera VTS tests to AIDL

Bug: 210912368
Test: Migrated all HIDL tests to AIDL
Change-Id: I4da6d38105d96908684a754da73699486295da8b
2022-02-23 23:44:01 +00:00