ipa: libipa: Pass a reference instead of pointer to Algorithm::process()

Frame contexts will become the core component of IPA modules, always
available to functions of the algorithms. To indicate and prepare for
this, turn the frame context pointer passed to Algorithm::process() into
a reference.

The RkISP1 IPA module doesn't use frame contexts yet, so pass a dummy
context for now.

While at it, drop an unneeded [[maybe_unused]] from Agc::process() and
add a missing parameter documentation for the frameContext argument to
Awb::process().

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
This commit is contained in:
Laurent Pinchart 2022-07-21 13:13:04 +01:00
parent 024d16b7db
commit 2101af47e4
15 changed files with 23 additions and 19 deletions

View file

@ -275,13 +275,14 @@ double Agc::measureBrightness(const rkisp1_cif_isp_hist_stat *hist) const
/**
* \brief Process RkISP1 statistics, and run AGC operations
* \param[in] context The shared IPA context
* \param[in] frameContext The current frame context
* \param[in] stats The RKISP1 statistics and ISP results
*
* Identify the current image brightness, and use that to estimate the optimal
* new exposure and gain for the scene.
*/
void Agc::process(IPAContext &context,
[[maybe_unused]] IPAFrameContext *frameContext,
[[maybe_unused]] IPAFrameContext &frameContext,
const rkisp1_stat_buffer *stats)
{
const rkisp1_cif_isp_stat *params = &stats->params;

View file

@ -27,7 +27,7 @@ public:
int configure(IPAContext &context, const IPACameraSensorInfo &configInfo) override;
void prepare(IPAContext &context, rkisp1_params_cfg *params) override;
void process(IPAContext &context, IPAFrameContext *frameContext,
void process(IPAContext &context, IPAFrameContext &frameContext,
const rkisp1_stat_buffer *stats) override;
private:

View file

@ -152,7 +152,7 @@ void Awb::queueRequest(IPAContext &context,
* \copydoc libcamera::ipa::Algorithm::process
*/
void Awb::process([[maybe_unused]] IPAContext &context,
[[maybe_unused]] IPAFrameContext *frameCtx,
[[maybe_unused]] IPAFrameContext &frameCtx,
const rkisp1_stat_buffer *stats)
{
const rkisp1_cif_isp_stat *params = &stats->params;

View file

@ -23,7 +23,7 @@ public:
void prepare(IPAContext &context, rkisp1_params_cfg *params) override;
void queueRequest(IPAContext &context, const uint32_t frame,
const ControlList &controls) override;
void process(IPAContext &context, IPAFrameContext *frameCtx,
void process(IPAContext &context, IPAFrameContext &frameCtx,
const rkisp1_stat_buffer *stats) override;
private: