mirror of
https://git.libcamera.org/libcamera/libcamera.git
synced 2025-07-25 17:45:06 +03:00
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>
This commit is contained in:
parent
883334135b
commit
8a2fb73337
1 changed files with 16 additions and 12 deletions
|
@ -28,7 +28,9 @@ namespace libcamera {
|
||||||
|
|
||||||
LOG_DEFINE_CATEGORY(IPARkISP1)
|
LOG_DEFINE_CATEGORY(IPARkISP1)
|
||||||
|
|
||||||
class IPARkISP1 : public ipa::rkisp1::IPARkISP1Interface
|
namespace ipa::rkisp1 {
|
||||||
|
|
||||||
|
class IPARkISP1 : public IPARkISP1Interface
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
int init(unsigned int hwRevision) override;
|
int init(unsigned int hwRevision) override;
|
||||||
|
@ -40,7 +42,7 @@ public:
|
||||||
const std::map<uint32_t, ControlInfoMap> &entityControls) override;
|
const std::map<uint32_t, ControlInfoMap> &entityControls) override;
|
||||||
void mapBuffers(const std::vector<IPABuffer> &buffers) override;
|
void mapBuffers(const std::vector<IPABuffer> &buffers) override;
|
||||||
void unmapBuffers(const std::vector<unsigned int> &ids) 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:
|
private:
|
||||||
void queueRequest(unsigned int frame, rkisp1_params_cfg *params,
|
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) {
|
switch (event.op) {
|
||||||
case ipa::rkisp1::EventSignalStatBuffer: {
|
case EventSignalStatBuffer: {
|
||||||
unsigned int frame = event.frame;
|
unsigned int frame = event.frame;
|
||||||
unsigned int bufferId = event.bufferId;
|
unsigned int bufferId = event.bufferId;
|
||||||
|
|
||||||
|
@ -184,7 +186,7 @@ void IPARkISP1::processEvent(const ipa::rkisp1::RkISP1Event &event)
|
||||||
updateStatistics(frame, stats);
|
updateStatistics(frame, stats);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case ipa::rkisp1::EventQueueRequest: {
|
case EventQueueRequest: {
|
||||||
unsigned int frame = event.frame;
|
unsigned int frame = event.frame;
|
||||||
unsigned int bufferId = event.bufferId;
|
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;
|
params->module_en_update = RKISP1_CIF_ISP_MODULE_AEC;
|
||||||
}
|
}
|
||||||
|
|
||||||
ipa::rkisp1::RkISP1Action op;
|
RkISP1Action op;
|
||||||
op.op = ipa::rkisp1::ActionParamFilled;
|
op.op = ActionParamFilled;
|
||||||
|
|
||||||
queueFrameAction.emit(frame, op);
|
queueFrameAction.emit(frame, op);
|
||||||
}
|
}
|
||||||
|
@ -268,8 +270,8 @@ void IPARkISP1::updateStatistics(unsigned int frame,
|
||||||
|
|
||||||
void IPARkISP1::setControls(unsigned int frame)
|
void IPARkISP1::setControls(unsigned int frame)
|
||||||
{
|
{
|
||||||
ipa::rkisp1::RkISP1Action op;
|
RkISP1Action op;
|
||||||
op.op = ipa::rkisp1::ActionV4L2Set;
|
op.op = ActionV4L2Set;
|
||||||
|
|
||||||
ControlList ctrls(ctrls_);
|
ControlList ctrls(ctrls_);
|
||||||
ctrls.set(V4L2_CID_EXPOSURE, static_cast<int32_t>(exposure_));
|
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)
|
if (aeState)
|
||||||
ctrls.set(controls::AeLocked, aeState == 2);
|
ctrls.set(controls::AeLocked, aeState == 2);
|
||||||
|
|
||||||
ipa::rkisp1::RkISP1Action op;
|
RkISP1Action op;
|
||||||
op.op = ipa::rkisp1::ActionMetadata;
|
op.op = ActionMetadata;
|
||||||
op.controls = ctrls;
|
op.controls = ctrls;
|
||||||
|
|
||||||
queueFrameAction.emit(frame, op);
|
queueFrameAction.emit(frame, op);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
} /* namespace ipa::rkisp1 */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* External IPA module interface
|
* External IPA module interface
|
||||||
*/
|
*/
|
||||||
|
@ -307,7 +311,7 @@ const struct IPAModuleInfo ipaModuleInfo = {
|
||||||
|
|
||||||
IPAInterface *ipaCreate()
|
IPAInterface *ipaCreate()
|
||||||
{
|
{
|
||||||
return new IPARkISP1();
|
return new ipa::rkisp1::IPARkISP1();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue