ipa: rkisp1: agc: Fix histogram construction
This histogram reported by the rkisp1 hardware is 20 bits, where the upper 16 bits are meaningful integer data and the lower 4 bits are fractional and meant to be discarded. Remove these 4 bits when construction the histogram. Signed-off-by: Paul Elder <paul.elder@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Daniel Scally <dan.scally@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
This commit is contained in:
parent
299e5278bd
commit
f1522e94df
1 changed files with 3 additions and 1 deletions
|
@ -277,7 +277,9 @@ 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);
|
||||
|
||||
Histogram hist({ params->hist.hist_bins, context.hw->numHistogramBins });
|
||||
/* The lower 4 bits are fractional and meant to be discarded. */
|
||||
Histogram hist({ params->hist.hist_bins, context.hw->numHistogramBins },
|
||||
[](uint32_t x) { return x >> 4; });
|
||||
expMeans_ = { params->ae.exp_mean, context.hw->numAeCells };
|
||||
|
||||
/*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue