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>
This commit is contained in:
parent
a043e55110
commit
14f6a87917
1 changed files with 2 additions and 1 deletions
|
@ -80,7 +80,8 @@ class LSCRkISP1(LSC):
|
||||||
tables = []
|
tables = []
|
||||||
for lis in [list_cr, list_cgr, list_cgb, list_cb]:
|
for lis in [list_cr, list_cgr, list_cgb, list_cb]:
|
||||||
table = np.mean(lis[indices], axis=0)
|
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()
|
table = np.round(table).astype('int32').tolist()
|
||||||
tables.append(table)
|
tables.append(table)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue