Merge "Camera VTS: Test only CROPPED_RAW use case for RAW_SENSOR streams" into android14-tests-dev am: e51dca227c am: 0449e5495b

Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2944865

Change-Id: Idea608057cd3b80e846deb21bf0dbbe081e56f9a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Jayant Chowdhary 2024-02-05 19:31:26 +00:00 committed by Automerger Merge Worker
commit 73871f98bb

View file

@ -2202,18 +2202,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)) {
@ -2254,7 +2256,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();