[libcamera-devel] [RFC PATCH 4/5] libcamera: pipeline: ipu3: Report available test pattern modes
Hirokazu Honda
hiroh at chromium.org
Fri Apr 9 06:32:07 CEST 2021
Add available test pattern modes to controls.
Signed-off-by: Hirokazu Honda <hiroh at chromium.org>
---
src/libcamera/pipeline/ipu3/ipu3.cpp | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/src/libcamera/pipeline/ipu3/ipu3.cpp b/src/libcamera/pipeline/ipu3/ipu3.cpp
index 519cad4f..c6ca87a7 100644
--- a/src/libcamera/pipeline/ipu3/ipu3.cpp
+++ b/src/libcamera/pipeline/ipu3/ipu3.cpp
@@ -995,6 +995,16 @@ int PipelineHandlerIPU3::initControls(IPU3CameraData *data)
controls[&controls::ScalerCrop] = ControlInfo(minCrop, maxCrop, maxCrop);
+ const std::vector<int32_t> &availableTestPatternModes =
+ sensor->availableTestPatternModes();
+ if (!availableTestPatternModes.empty()) {
+ std::vector<ControlValue> controlValues;
+ for (int32_t value : availableTestPatternModes)
+ controlValues.emplace_back(value);
+ controls[&controls::draft::SensorTestPatternMode] =
+ ControlInfo(controlValues);
+ }
+
data->controlInfo_ = std::move(controls);
return 0;
--
2.31.1.295.g9ea45b61b8-goog
More information about the libcamera-devel
mailing list