[libcamera-devel,4/5] utils: ipu3: display green disparity params
diff mbox series

Message ID 20220630101702.45781-5-jeanmichel.hautbois@ideasonboard.com
State New
Headers show
Series
  • [libcamera-devel,1/5] utils: ipu3: Introduce a parameters dump tool
Related show

Commit Message

Jean-Michel Hautbois June 30, 2022, 10:17 a.m. UTC
Display the shading gain coeff of red, green, blue and black. Those are
used to calculate threshold given a pixel’s color value and its
coordinates in the image.
---
 utils/ipu3/ipu3-dump-params.c | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

Patch
diff mbox series

diff --git a/utils/ipu3/ipu3-dump-params.c b/utils/ipu3/ipu3-dump-params.c
index 257f2205..e34a7e53 100644
--- a/utils/ipu3/ipu3-dump-params.c
+++ b/utils/ipu3/ipu3-dump-params.c
@@ -60,6 +60,21 @@  static void displayBNR(struct ipu3_uapi_params *params)
 		bnr.thr_ctrl_shd.gb, bnr.thr_ctrl_shd.b);
 }
 
+static void displayGD(struct ipu3_uapi_bnr_static_config_green_disparity *gd)
+{
+	printf("red: %u, green: %u, blue: %u, black: %u\n",
+		gd->gd_red,
+		gd->gd_green,
+		gd->gd_blue,
+		gd->gd_black);
+
+	printf("shading: %u, support: %u, clip: %u, central weight: %u\n",
+		gd->gd_shading,
+		gd->gd_support,
+		gd->gd_clip,
+		gd->gd_central_weight);
+}
+
 int main(int argc, char *argv[])
 {
 	int in_fd;
@@ -98,6 +113,11 @@  start:
 		displayGrid(&params.acc_param.awb_fr.grid_cfg, "awb_fr");
 	}
 
+	if (params.use.acc_green_disparity) {
+		printf("\n**** Green disparity parameters ****\n");
+		displayGD(&params.acc_param.green_disparity);
+	}
+
 	close(in_fd);
 
 	return ret ? 1 : 0;