mirror of
https://git.libcamera.org/libcamera/libcamera.git
synced 2025-07-13 07:19:45 +03:00
ipa: rkisp1: Pass parameters buffer size to pipeline handler
The ISP parameters buffer currently has a fixed payload size, which is hardcoded in the pipeline handler. To prepare for support of the extensible parameters format that has a variable payload size, pass the size from the IPA module to the pipeline handler explicitly. Keep the size hardcoded to sizeof(struct rkisp1_params_cfg) for now, this will be udpated later. Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com> Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
This commit is contained in:
parent
db15711692
commit
e70cda4238
3 changed files with 5 additions and 6 deletions
|
@ -37,7 +37,7 @@ interface IPARkISP1Interface {
|
||||||
};
|
};
|
||||||
|
|
||||||
interface IPARkISP1EventInterface {
|
interface IPARkISP1EventInterface {
|
||||||
paramsBufferReady(uint32 frame);
|
paramsBufferReady(uint32 frame, uint32 bytesused);
|
||||||
setSensorControls(uint32 frame, libcamera.ControlList sensorControls);
|
setSensorControls(uint32 frame, libcamera.ControlList sensorControls);
|
||||||
metadataReady(uint32 frame, libcamera.ControlList metadata);
|
metadataReady(uint32 frame, libcamera.ControlList metadata);
|
||||||
};
|
};
|
||||||
|
|
|
@ -332,7 +332,7 @@ void IPARkISP1::fillParamsBuffer(const uint32_t frame, const uint32_t bufferId)
|
||||||
for (auto const &algo : algorithms())
|
for (auto const &algo : algorithms())
|
||||||
algo->prepare(context_, frame, frameContext, params);
|
algo->prepare(context_, frame, frameContext, params);
|
||||||
|
|
||||||
paramsBufferReady.emit(frame);
|
paramsBufferReady.emit(frame, sizeof(*params));
|
||||||
}
|
}
|
||||||
|
|
||||||
void IPARkISP1::processStatsBuffer(const uint32_t frame, const uint32_t bufferId,
|
void IPARkISP1::processStatsBuffer(const uint32_t frame, const uint32_t bufferId,
|
||||||
|
|
|
@ -110,7 +110,7 @@ public:
|
||||||
std::unique_ptr<ipa::rkisp1::IPAProxyRkISP1> ipa_;
|
std::unique_ptr<ipa::rkisp1::IPAProxyRkISP1> ipa_;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void paramFilled(unsigned int frame);
|
void paramFilled(unsigned int frame, unsigned int bytesused);
|
||||||
void setSensorControls(unsigned int frame,
|
void setSensorControls(unsigned int frame,
|
||||||
const ControlList &sensorControls);
|
const ControlList &sensorControls);
|
||||||
|
|
||||||
|
@ -374,15 +374,14 @@ int RkISP1CameraData::loadIPA(unsigned int hwRevision)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void RkISP1CameraData::paramFilled(unsigned int frame)
|
void RkISP1CameraData::paramFilled(unsigned int frame, unsigned int bytesused)
|
||||||
{
|
{
|
||||||
PipelineHandlerRkISP1 *pipe = RkISP1CameraData::pipe();
|
PipelineHandlerRkISP1 *pipe = RkISP1CameraData::pipe();
|
||||||
RkISP1FrameInfo *info = frameInfo_.find(frame);
|
RkISP1FrameInfo *info = frameInfo_.find(frame);
|
||||||
if (!info)
|
if (!info)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
info->paramBuffer->_d()->metadata().planes()[0].bytesused =
|
info->paramBuffer->_d()->metadata().planes()[0].bytesused = bytesused;
|
||||||
sizeof(struct rkisp1_params_cfg);
|
|
||||||
pipe->param_->queueBuffer(info->paramBuffer);
|
pipe->param_->queueBuffer(info->paramBuffer);
|
||||||
pipe->stat_->queueBuffer(info->statBuffer);
|
pipe->stat_->queueBuffer(info->statBuffer);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue