[PATCH v2 12/25] libtuning: lsc: rkisp1: Clip lsc values to valid range
Stefan Klug
stefan.klug at ideasonboard.com
Fri Jun 28 12:47:05 CEST 2024
Based on the input images, the lsc values could exceed the range allowed
by the rkisp1.
Signed-off-by: Stefan Klug <stefan.klug at ideasonboard.com>
---
utils/tuning/libtuning/modules/lsc/rkisp1.py | 1 +
1 file changed, 1 insertion(+)
diff --git a/utils/tuning/libtuning/modules/lsc/rkisp1.py b/utils/tuning/libtuning/modules/lsc/rkisp1.py
index 20406e436a6a..074f3b272dbf 100644
--- a/utils/tuning/libtuning/modules/lsc/rkisp1.py
+++ b/utils/tuning/libtuning/modules/lsc/rkisp1.py
@@ -81,6 +81,7 @@ class LSCRkISP1(LSC):
for lis in [list_cr, list_cgr, list_cgb, list_cb]:
table = np.mean(lis[indices], axis=0)
table = output_map_func((1, 3.999), (1024, 4095), table)
+ table = np.clip(table, 1024, 4095)
table = np.round(table).astype('int32').tolist()
tables.append(table)
--
2.43.0
More information about the libcamera-devel
mailing list