mirror of
https://github.com/Evolution-X/hardware_interfaces
synced 2026-02-01 05:49:27 +00:00
Camera VTS: Test only CROPPED_RAW use case for RAW_SENSOR streams
There are no mandatory stream combinations for RAW_SENSOR streams that do not involve the CROPPED_RAW stream use case. So we don't need to test stream non CROPPED_RAW stream use cases with the RAW_SENSOR format, since we don't have a definite answer to whether they will be supported or not. Bug: 317773720 Test: Camera VTS on cf Test: Vendor testing Change-Id: I0870e90ae68a5e35196f0ba0afaa6b8bf7fbfbd8 Signed-off-by: Jayant Chowdhary <jchowdhary@google.com>
This commit is contained in:
@@ -2394,18 +2394,20 @@ void CameraAidlTest::configureStreamUseCaseInternal(const AvailableStream &thres
|
||||
ASSERT_NE(0u, outputPreviewStreams.size());
|
||||
|
||||
// Combine valid and invalid stream use cases
|
||||
std::vector<int64_t> useCases(kMandatoryUseCases);
|
||||
useCases.push_back(ANDROID_SCALER_AVAILABLE_STREAM_USE_CASES_CROPPED_RAW + 1);
|
||||
std::vector<int64_t> testedUseCases;
|
||||
testedUseCases.push_back(ANDROID_SCALER_AVAILABLE_STREAM_USE_CASES_CROPPED_RAW + 1);
|
||||
|
||||
std::vector<int64_t> supportedUseCases;
|
||||
if (threshold.format == static_cast<int32_t>(PixelFormat::RAW16)) {
|
||||
// If the format is RAW16, supported use case is only CROPPED_RAW.
|
||||
// All others are unsupported for this format.
|
||||
useCases.push_back(ANDROID_SCALER_AVAILABLE_STREAM_USE_CASES_CROPPED_RAW);
|
||||
testedUseCases.push_back(ANDROID_SCALER_AVAILABLE_STREAM_USE_CASES_CROPPED_RAW);
|
||||
supportedUseCases.push_back(ANDROID_SCALER_AVAILABLE_STREAM_USE_CASES_CROPPED_RAW);
|
||||
supportedUseCases.push_back(ANDROID_SCALER_AVAILABLE_STREAM_USE_CASES_DEFAULT);
|
||||
} else {
|
||||
camera_metadata_ro_entry entry;
|
||||
testedUseCases.insert(testedUseCases.end(), kMandatoryUseCases.begin(),
|
||||
kMandatoryUseCases.end());
|
||||
auto retcode = find_camera_metadata_ro_entry(
|
||||
staticMeta, ANDROID_SCALER_AVAILABLE_STREAM_USE_CASES, &entry);
|
||||
if ((0 == retcode) && (entry.count > 0)) {
|
||||
@@ -2446,7 +2448,7 @@ void CameraAidlTest::configureStreamUseCaseInternal(const AvailableStream &thres
|
||||
ASSERT_TRUE(ret.isOk());
|
||||
config.sessionParams = req;
|
||||
|
||||
for (int64_t useCase : useCases) {
|
||||
for (int64_t useCase : testedUseCases) {
|
||||
bool useCaseSupported = std::find(supportedUseCases.begin(), supportedUseCases.end(),
|
||||
useCase) != supportedUseCases.end();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user