ipa: rkisp1: algorithms: agc: Check for correct stats type
Sometimes the ISP produces statistics only with a subset of statistic types being valid. It doesn't happen normally, but was observed in the wild. Check for the RKISP1_CIF_ISP_STAT_AUTOEXP bit to prevent using invalid or outdated data. As it doesn't happen regularly add an error message to get notified when it happens. Signed-off-by: Stefan Klug <stefan.klug@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Paul Elder <paul.elder@ideasonboard.com> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
This commit is contained in:
parent
c8d261608a
commit
0e0e32b189
1 changed files with 6 additions and 1 deletions
|
@ -402,6 +402,12 @@ void Agc::process(IPAContext &context, [[maybe_unused]] const uint32_t frame,
|
|||
fillMetadata(context, frameContext, metadata);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!(stats->meas_type & RKISP1_CIF_ISP_STAT_AUTOEXP)) {
|
||||
fillMetadata(context, frameContext, metadata);
|
||||
LOG(RkISP1Agc, Error) << "AUTOEXP data is missing in statistics";
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
* \todo Verify that the exposure and gain applied by the sensor for
|
||||
|
@ -412,7 +418,6 @@ void Agc::process(IPAContext &context, [[maybe_unused]] const uint32_t frame,
|
|||
*/
|
||||
|
||||
const rkisp1_cif_isp_stat *params = &stats->params;
|
||||
ASSERT(stats->meas_type & RKISP1_CIF_ISP_STAT_AUTOEXP);
|
||||
|
||||
/* The lower 4 bits are fractional and meant to be discarded. */
|
||||
Histogram hist({ params->hist.hist_bins, context.hw->numHistogramBins },
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue