diff options
author | Stefan Klug <stefan.klug@ideasonboard.com> | 2024-06-11 14:30:40 +0200 |
---|---|---|
committer | Stefan Klug <stefan.klug@ideasonboard.com> | 2024-07-05 22:38:17 +0200 |
commit | 14f6a87917f1e2572be8ec7a1101bc3abba62cdc (patch) | |
tree | 2b45cc2f89a496b49668737a031e2b2516cb2e9e /utils/tuning/libtuning/modules | |
parent | a043e55110423a02aea8851263b1f3e5bb1728d8 (diff) |
libtuning: lsc: rkisp1: Clip lsc values to valid range
Based on the input images, the lsc values could exceed the range allowed
by the rkisp1. As we are now clipping the values, we can simplify the
value mapping.
Signed-off-by: Stefan Klug <stefan.klug@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
Diffstat (limited to 'utils/tuning/libtuning/modules')
-rw-r--r-- | utils/tuning/libtuning/modules/lsc/rkisp1.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/utils/tuning/libtuning/modules/lsc/rkisp1.py b/utils/tuning/libtuning/modules/lsc/rkisp1.py index 20406e43..57004104 100644 --- a/utils/tuning/libtuning/modules/lsc/rkisp1.py +++ b/utils/tuning/libtuning/modules/lsc/rkisp1.py @@ -80,7 +80,8 @@ class LSCRkISP1(LSC): tables = [] 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 = output_map_func((1, 4), (1024, 4096), table) + table = np.clip(table, 1024, 4095) table = np.round(table).astype('int32').tolist() tables.append(table) |