diff options
author | Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com> | 2021-04-23 08:32:23 +0200 |
---|---|---|
committer | Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com> | 2021-04-26 10:24:11 +0200 |
commit | 8a2fb73337ffe562a25b4dd9cbdf2e78046da9f3 (patch) | |
tree | 02ffe35a6518b46c3f91703e5e029cd1a929d088 /src | |
parent | 883334135bb2e84b9ba9daec5a4b844b92ead897 (diff) |
ipa: rkisp1: Move the IPA to the ipa::rkisp1 namespace
Simplify name-spacing of the RKISP1 components by placing it in the
ipa::rkisp1 namespace directly.
Signed-off-by: Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/ipa/rkisp1/rkisp1.cpp | 28 |
1 files changed, 16 insertions, 12 deletions
diff --git a/src/ipa/rkisp1/rkisp1.cpp b/src/ipa/rkisp1/rkisp1.cpp index 8a57b080..6d45673c 100644 --- a/src/ipa/rkisp1/rkisp1.cpp +++ b/src/ipa/rkisp1/rkisp1.cpp @@ -28,7 +28,9 @@ namespace libcamera { LOG_DEFINE_CATEGORY(IPARkISP1) -class IPARkISP1 : public ipa::rkisp1::IPARkISP1Interface +namespace ipa::rkisp1 { + +class IPARkISP1 : public IPARkISP1Interface { public: int init(unsigned int hwRevision) override; @@ -40,7 +42,7 @@ public: const std::map<uint32_t, ControlInfoMap> &entityControls) override; void mapBuffers(const std::vector<IPABuffer> &buffers) override; void unmapBuffers(const std::vector<unsigned int> &ids) override; - void processEvent(const ipa::rkisp1::RkISP1Event &event) override; + void processEvent(const RkISP1Event &event) override; private: void queueRequest(unsigned int frame, rkisp1_params_cfg *params, @@ -171,10 +173,10 @@ void IPARkISP1::unmapBuffers(const std::vector<unsigned int> &ids) } } -void IPARkISP1::processEvent(const ipa::rkisp1::RkISP1Event &event) +void IPARkISP1::processEvent(const RkISP1Event &event) { switch (event.op) { - case ipa::rkisp1::EventSignalStatBuffer: { + case EventSignalStatBuffer: { unsigned int frame = event.frame; unsigned int bufferId = event.bufferId; @@ -184,7 +186,7 @@ void IPARkISP1::processEvent(const ipa::rkisp1::RkISP1Event &event) updateStatistics(frame, stats); break; } - case ipa::rkisp1::EventQueueRequest: { + case EventQueueRequest: { unsigned int frame = event.frame; unsigned int bufferId = event.bufferId; @@ -215,8 +217,8 @@ void IPARkISP1::queueRequest(unsigned int frame, rkisp1_params_cfg *params, params->module_en_update = RKISP1_CIF_ISP_MODULE_AEC; } - ipa::rkisp1::RkISP1Action op; - op.op = ipa::rkisp1::ActionParamFilled; + RkISP1Action op; + op.op = ActionParamFilled; queueFrameAction.emit(frame, op); } @@ -268,8 +270,8 @@ void IPARkISP1::updateStatistics(unsigned int frame, void IPARkISP1::setControls(unsigned int frame) { - ipa::rkisp1::RkISP1Action op; - op.op = ipa::rkisp1::ActionV4L2Set; + RkISP1Action op; + op.op = ActionV4L2Set; ControlList ctrls(ctrls_); ctrls.set(V4L2_CID_EXPOSURE, static_cast<int32_t>(exposure_)); @@ -286,13 +288,15 @@ void IPARkISP1::metadataReady(unsigned int frame, unsigned int aeState) if (aeState) ctrls.set(controls::AeLocked, aeState == 2); - ipa::rkisp1::RkISP1Action op; - op.op = ipa::rkisp1::ActionMetadata; + RkISP1Action op; + op.op = ActionMetadata; op.controls = ctrls; queueFrameAction.emit(frame, op); } +} /* namespace ipa::rkisp1 */ + /* * External IPA module interface */ @@ -307,7 +311,7 @@ const struct IPAModuleInfo ipaModuleInfo = { IPAInterface *ipaCreate() { - return new IPARkISP1(); + return new ipa::rkisp1::IPARkISP1(); } } |