summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>2021-09-22 23:55:50 +0200
committerJean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>2021-10-06 15:27:22 +0200
commit65e7d11f6c7e6137636f33afad018d2f6f94a864 (patch)
tree00085f707d7e1a462e6bcc2c808683b36fbd56c4
parente7860ce80894bfadfad9e398db691bbcecfdbb1c (diff)
ipa: ipu3: Change the limits of the AWB stats
Until now, the limits used to calculate the grid based on the Bayer Down Scaler configuration where taken from the kernel documentation [0]. While testing and understanding the format of the ImgU statistics, it appears that the ones defined in CrOS [1] are the correct ones. Use those. [0] https://www.kernel.org/doc/html/latest/userspace-api/media/v4l/pixfmt-meta-intel-ipu3.html?highlight=v4l2_meta_fmt_ipu3_params#intel-ipu3-imgu-uapi-data-types [1] https://chromium.googlesource.com/chromiumos/platform/arc-camera/+/refs/heads/master/hal/intel/include/ia_imaging/awb_public.h Signed-off-by: Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
-rw-r--r--src/ipa/ipu3/ipu3.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/ipa/ipu3/ipu3.cpp b/src/ipa/ipu3/ipu3.cpp
index ac98a86b..b3ac96ed 100644
--- a/src/ipa/ipu3/ipu3.cpp
+++ b/src/ipa/ipu3/ipu3.cpp
@@ -136,8 +136,8 @@
* <linux/intel-ipu3.h> struct ipu3_uapi_gamma_corr_lut for further details.
*/
-static constexpr uint32_t kMaxCellWidthPerSet = 160;
-static constexpr uint32_t kMaxCellHeightPerSet = 56;
+static constexpr uint32_t kMaxCellWidthPerSet = 80;
+static constexpr uint32_t kMaxCellHeightPerSet = 60;
namespace libcamera {
@@ -300,11 +300,11 @@ void IPAIPU3::calculateBdsGrid(const Size &bdsOutputSize)
/* Set the BDS output size in the IPAConfiguration structure */
context_.configuration.grid.bdsOutputSize = bdsOutputSize;
- for (uint32_t widthShift = 3; widthShift <= 7; ++widthShift) {
+ for (uint32_t widthShift = 3; widthShift <= 6; ++widthShift) {
uint32_t width = std::min(kMaxCellWidthPerSet,
bdsOutputSize.width >> widthShift);
width = width << widthShift;
- for (uint32_t heightShift = 3; heightShift <= 7; ++heightShift) {
+ for (uint32_t heightShift = 3; heightShift <= 6; ++heightShift) {
int32_t height = std::min(kMaxCellHeightPerSet,
bdsOutputSize.height >> heightShift);
height = height << heightShift;