aboutsummaryrefslogtreecommitdiffstats
path: root/src/libcamera
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2022-08-02 02:28:44 +0300
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2022-08-04 01:14:13 +0300
commit961a6cf7cac9b788cc285a58ae1b8a480f00b633 (patch)
treed46a8f90f6a3a1933d59a8032b2c85d6dcbed17c /src/libcamera
parent502ab9a146e037cc10e3315ced91a0bdfa385472 (diff)
pipeline: rkisp1: Move ControlInfoMap to IPA module
Currently the pipeline handler advertises controls handled by the IPA from a ControlInfoMap it manually constructs. This is wrong, as the IPA module is the component that knows what controls it supports. Fix this by moving the ControlInfoMap construction to the IPA module, and pass it to the pipeline handler as a return value from the IPA init() function. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Umang Jain <umang.jain@ideasonboard.com> Reviewed-by: Paul Elder <paul.elder@ideasonboard.com> Reviewed-by: Florian Sylvestre <fsylvestre@baylibre.com>
Diffstat (limited to 'src/libcamera')
-rw-r--r--src/libcamera/pipeline/rkisp1/rkisp1.cpp31
1 files changed, 2 insertions, 29 deletions
diff --git a/src/libcamera/pipeline/rkisp1/rkisp1.cpp b/src/libcamera/pipeline/rkisp1/rkisp1.cpp
index de687f4d..93287332 100644
--- a/src/libcamera/pipeline/rkisp1/rkisp1.cpp
+++ b/src/libcamera/pipeline/rkisp1/rkisp1.cpp
@@ -344,7 +344,8 @@ int RkISP1CameraData::loadIPA(unsigned int hwRevision)
ipaTuningFile = std::string(configFromEnv);
}
- int ret = ipa_->init({ ipaTuningFile, sensor_->model() }, hwRevision);
+ int ret = ipa_->init({ ipaTuningFile, sensor_->model() }, hwRevision,
+ &controlInfo_);
if (ret < 0) {
LOG(RkISP1, Error) << "IPA initialization failure";
return ret;
@@ -967,34 +968,6 @@ int PipelineHandlerRkISP1::createCamera(MediaEntity *sensor)
std::make_unique<RkISP1CameraData>(this, &mainPath_,
hasSelfPath_ ? &selfPath_ : nullptr);
- ControlInfoMap::Map ctrls;
- ctrls.emplace(std::piecewise_construct,
- std::forward_as_tuple(&controls::Sharpness),
- std::forward_as_tuple(0.0f, 10.0f, 1.0f));
-
- ctrls.emplace(std::piecewise_construct,
- std::forward_as_tuple(&controls::Brightness),
- std::forward_as_tuple(-1.0f, 0.993f));
-
- ctrls.emplace(std::piecewise_construct,
- std::forward_as_tuple(&controls::Contrast),
- std::forward_as_tuple(0.0f, 1.993f));
-
- ctrls.emplace(std::piecewise_construct,
- std::forward_as_tuple(&controls::Saturation),
- std::forward_as_tuple(0.0f, 1.993f));
-
- ctrls.emplace(std::piecewise_construct,
- std::forward_as_tuple(&controls::draft::NoiseReductionMode),
- std::forward_as_tuple(controls::draft::NoiseReductionModeValues));
-
- ctrls.emplace(std::piecewise_construct,
- std::forward_as_tuple(&controls::AeEnable),
- std::forward_as_tuple(false, true));
-
- data->controlInfo_ = ControlInfoMap(std::move(ctrls),
- controls::controls);
-
data->sensor_ = std::make_unique<CameraSensor>(sensor);
ret = data->sensor_->init();
if (ret)

Privacy Policy