Message ID | 20220809144704.61682-2-dse@thaumatec.com |
---|---|
State | New |
Headers | show |
Series |
|
Related | show |
Hi Daniel, Thank you for the patch. On Tue, Aug 09, 2022 at 04:47:02PM +0200, Daniel Semkowicz via libcamera-devel wrote: > As additional controls will be added to the IPA (like lens), we want to > have more specific names for each ControlInfoMap. > > Signed-off-by: Daniel Semkowicz <dse@thaumatec.com> > Reviewed-by: Jacopo Mondi <jacopo@jmondi.org> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> > --- > src/ipa/rkisp1/rkisp1.cpp | 14 +++++++------- > 1 file changed, 7 insertions(+), 7 deletions(-) > > diff --git a/src/ipa/rkisp1/rkisp1.cpp b/src/ipa/rkisp1/rkisp1.cpp > index 17d42d38..ee484845 100644 > --- a/src/ipa/rkisp1/rkisp1.cpp > +++ b/src/ipa/rkisp1/rkisp1.cpp > @@ -69,7 +69,7 @@ private: > std::map<unsigned int, FrameBuffer> buffers_; > std::map<unsigned int, MappedFrameBuffer> mappedBuffers_; > > - ControlInfoMap ctrls_; > + ControlInfoMap sensorCtrls_; > > /* Camera sensor controls. */ > bool autoExposure_; > @@ -199,16 +199,16 @@ int IPARkISP1::configure([[maybe_unused]] const IPACameraSensorInfo &info, > if (entityControls.empty()) > return -EINVAL; > > - ctrls_ = entityControls.at(0); > + sensorCtrls_ = entityControls.at(0); > > - const auto itExp = ctrls_.find(V4L2_CID_EXPOSURE); > - if (itExp == ctrls_.end()) { > + const auto itExp = sensorCtrls_.find(V4L2_CID_EXPOSURE); > + if (itExp == sensorCtrls_.end()) { > LOG(IPARkISP1, Error) << "Can't find exposure control"; > return -EINVAL; > } > > - const auto itGain = ctrls_.find(V4L2_CID_ANALOGUE_GAIN); > - if (itGain == ctrls_.end()) { > + const auto itGain = sensorCtrls_.find(V4L2_CID_ANALOGUE_GAIN); > + if (itGain == sensorCtrls_.end()) { > LOG(IPARkISP1, Error) << "Can't find gain control"; > return -EINVAL; > } > @@ -336,7 +336,7 @@ void IPARkISP1::setControls(unsigned int frame) > uint32_t exposure = context_.frameContext.agc.exposure; > uint32_t gain = camHelper_->gainCode(context_.frameContext.agc.gain); > > - ControlList ctrls(ctrls_); > + ControlList ctrls(sensorCtrls_); > ctrls.set(V4L2_CID_EXPOSURE, static_cast<int32_t>(exposure)); > ctrls.set(V4L2_CID_ANALOGUE_GAIN, static_cast<int32_t>(gain)); >
Quoting Daniel Semkowicz via libcamera-devel (2022-08-09 15:47:02) > As additional controls will be added to the IPA (like lens), we want to > have more specific names for each ControlInfoMap. > > Signed-off-by: Daniel Semkowicz <dse@thaumatec.com> > Reviewed-by: Jacopo Mondi <jacopo@jmondi.org> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> > --- > src/ipa/rkisp1/rkisp1.cpp | 14 +++++++------- > 1 file changed, 7 insertions(+), 7 deletions(-) > > diff --git a/src/ipa/rkisp1/rkisp1.cpp b/src/ipa/rkisp1/rkisp1.cpp > index 17d42d38..ee484845 100644 > --- a/src/ipa/rkisp1/rkisp1.cpp > +++ b/src/ipa/rkisp1/rkisp1.cpp > @@ -69,7 +69,7 @@ private: > std::map<unsigned int, FrameBuffer> buffers_; > std::map<unsigned int, MappedFrameBuffer> mappedBuffers_; > > - ControlInfoMap ctrls_; > + ControlInfoMap sensorCtrls_; > > /* Camera sensor controls. */ > bool autoExposure_; > @@ -199,16 +199,16 @@ int IPARkISP1::configure([[maybe_unused]] const IPACameraSensorInfo &info, > if (entityControls.empty()) > return -EINVAL; > > - ctrls_ = entityControls.at(0); > + sensorCtrls_ = entityControls.at(0); > > - const auto itExp = ctrls_.find(V4L2_CID_EXPOSURE); > - if (itExp == ctrls_.end()) { > + const auto itExp = sensorCtrls_.find(V4L2_CID_EXPOSURE); > + if (itExp == sensorCtrls_.end()) { > LOG(IPARkISP1, Error) << "Can't find exposure control"; > return -EINVAL; > } > > - const auto itGain = ctrls_.find(V4L2_CID_ANALOGUE_GAIN); > - if (itGain == ctrls_.end()) { > + const auto itGain = sensorCtrls_.find(V4L2_CID_ANALOGUE_GAIN); > + if (itGain == sensorCtrls_.end()) { > LOG(IPARkISP1, Error) << "Can't find gain control"; > return -EINVAL; > } > @@ -336,7 +336,7 @@ void IPARkISP1::setControls(unsigned int frame) > uint32_t exposure = context_.frameContext.agc.exposure; > uint32_t gain = camHelper_->gainCode(context_.frameContext.agc.gain); > > - ControlList ctrls(ctrls_); > + ControlList ctrls(sensorCtrls_); > ctrls.set(V4L2_CID_EXPOSURE, static_cast<int32_t>(exposure)); > ctrls.set(V4L2_CID_ANALOGUE_GAIN, static_cast<int32_t>(gain)); > > -- > 2.34.1 >
diff --git a/src/ipa/rkisp1/rkisp1.cpp b/src/ipa/rkisp1/rkisp1.cpp index 17d42d38..ee484845 100644 --- a/src/ipa/rkisp1/rkisp1.cpp +++ b/src/ipa/rkisp1/rkisp1.cpp @@ -69,7 +69,7 @@ private: std::map<unsigned int, FrameBuffer> buffers_; std::map<unsigned int, MappedFrameBuffer> mappedBuffers_; - ControlInfoMap ctrls_; + ControlInfoMap sensorCtrls_; /* Camera sensor controls. */ bool autoExposure_; @@ -199,16 +199,16 @@ int IPARkISP1::configure([[maybe_unused]] const IPACameraSensorInfo &info, if (entityControls.empty()) return -EINVAL; - ctrls_ = entityControls.at(0); + sensorCtrls_ = entityControls.at(0); - const auto itExp = ctrls_.find(V4L2_CID_EXPOSURE); - if (itExp == ctrls_.end()) { + const auto itExp = sensorCtrls_.find(V4L2_CID_EXPOSURE); + if (itExp == sensorCtrls_.end()) { LOG(IPARkISP1, Error) << "Can't find exposure control"; return -EINVAL; } - const auto itGain = ctrls_.find(V4L2_CID_ANALOGUE_GAIN); - if (itGain == ctrls_.end()) { + const auto itGain = sensorCtrls_.find(V4L2_CID_ANALOGUE_GAIN); + if (itGain == sensorCtrls_.end()) { LOG(IPARkISP1, Error) << "Can't find gain control"; return -EINVAL; } @@ -336,7 +336,7 @@ void IPARkISP1::setControls(unsigned int frame) uint32_t exposure = context_.frameContext.agc.exposure; uint32_t gain = camHelper_->gainCode(context_.frameContext.agc.gain); - ControlList ctrls(ctrls_); + ControlList ctrls(sensorCtrls_); ctrls.set(V4L2_CID_EXPOSURE, static_cast<int32_t>(exposure)); ctrls.set(V4L2_CID_ANALOGUE_GAIN, static_cast<int32_t>(gain));