ipa: libipa: Add frame context pointer in process()
Currently we have a single structure of IPAFrameContext but subsequently, we shall have a ring buffer (or similar) container to keep IPAFrameContext structures for each frame. It would be a hassle to query out the frame context required for process() (since they will reside in a ring buffer) by the IPA for each process. Hence, prepare the process() libipa template to accept a particular IPAFrameContext early on. As for this patch, we shall pass in the pointer as nullptr, so that the changes compile and keep working as-is. Signed-off-by: Umang Jain <umang.jain@ideasonboard.com> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org> Reviewed-by: Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
This commit is contained in:
parent
bab437df1f
commit
8b291bce82
18 changed files with 40 additions and 17 deletions
|
@ -280,7 +280,9 @@ double Agc::measureBrightness(const rkisp1_cif_isp_hist_stat *hist) const
|
|||
* Identify the current image brightness, and use that to estimate the optimal
|
||||
* new exposure and gain for the scene.
|
||||
*/
|
||||
void Agc::process(IPAContext &context, const rkisp1_stat_buffer *stats)
|
||||
void Agc::process(IPAContext &context,
|
||||
[[maybe_unused]] IPAFrameContext *frameContext,
|
||||
const rkisp1_stat_buffer *stats)
|
||||
{
|
||||
const rkisp1_cif_isp_stat *params = &stats->params;
|
||||
ASSERT(stats->meas_type & RKISP1_CIF_ISP_STAT_AUTOEXP);
|
||||
|
|
|
@ -29,7 +29,8 @@ public:
|
|||
|
||||
int configure(IPAContext &context, const IPACameraSensorInfo &configInfo) override;
|
||||
void prepare(IPAContext &context, rkisp1_params_cfg *params) override;
|
||||
void process(IPAContext &context, const rkisp1_stat_buffer *stats) override;
|
||||
void process(IPAContext &context, IPAFrameContext *frameContext,
|
||||
const rkisp1_stat_buffer *stats) override;
|
||||
|
||||
private:
|
||||
void computeExposure(IPAContext &Context, double yGain, double iqMeanGain);
|
||||
|
|
|
@ -19,7 +19,9 @@ namespace libcamera {
|
|||
|
||||
namespace ipa::rkisp1 {
|
||||
|
||||
using Algorithm = libcamera::ipa::Algorithm<IPAContext, IPACameraSensorInfo, rkisp1_params_cfg, rkisp1_stat_buffer>;
|
||||
using Algorithm = libcamera::ipa::Algorithm<IPAContext, IPAFrameContext,
|
||||
IPACameraSensorInfo, rkisp1_params_cfg,
|
||||
rkisp1_stat_buffer>;
|
||||
|
||||
} /* namespace ipa::rkisp1 */
|
||||
|
||||
|
|
|
@ -119,7 +119,9 @@ void Awb::prepare(IPAContext &context, rkisp1_params_cfg *params)
|
|||
/**
|
||||
* \copydoc libcamera::ipa::Algorithm::process
|
||||
*/
|
||||
void Awb::process([[maybe_unused]] IPAContext &context, const rkisp1_stat_buffer *stats)
|
||||
void Awb::process([[maybe_unused]] IPAContext &context,
|
||||
[[maybe_unused]] IPAFrameContext *frameCtx,
|
||||
const rkisp1_stat_buffer *stats)
|
||||
{
|
||||
const rkisp1_cif_isp_stat *params = &stats->params;
|
||||
const rkisp1_cif_isp_awb_stat *awb = ¶ms->awb;
|
||||
|
|
|
@ -23,7 +23,8 @@ public:
|
|||
|
||||
int configure(IPAContext &context, const IPACameraSensorInfo &configInfo) override;
|
||||
void prepare(IPAContext &context, rkisp1_params_cfg *params) override;
|
||||
void process(IPAContext &context, const rkisp1_stat_buffer *stats) override;
|
||||
void process(IPAContext &context, IPAFrameContext *frameCtx,
|
||||
const rkisp1_stat_buffer *stats) override;
|
||||
|
||||
private:
|
||||
uint32_t estimateCCT(double red, double green, double blue);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue