libcamera/utils/tuning/raspberrypi/alsc.py
Paul Elder 4af9f81802 utils: tuning: Add alsc-only libtuning raspberrypi tuning script
Add a tuning script for raspberrypi for alsc only, that uses libtuning.
Since there will also be a tuning script for raspberrypi that has more
modules, put the libtuning alsc module definition in a separate file so
that it can be reused later.

Signed-off-by: Paul Elder <paul.elder@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2022-11-25 15:38:13 +09:00

19 lines
861 B
Python

# SPDX-License-Identifier: GPL-2.0-or-later
#
# Copyright (C) 2022, Paul Elder <paul.elder@ideasonboard.com>
#
# alsc.py - ALSC module instance for Raspberry Pi tuning scripts
import libtuning as lt
from libtuning.modules.lsc import ALSCRaspberryPi
ALSC = \
ALSCRaspberryPi(do_color=lt.Param('do_alsc_colour', lt.Param.Mode.Optional, True),
luminance_strength=lt.Param('luminance_strength', lt.Param.Mode.Optional, 0.5),
debug=[lt.Debug.Plot],
sector_shape=(16, 12),
sector_x_gradient=lt.gradient.Linear(lt.Remainder.DistributeFront),
sector_y_gradient=lt.gradient.Linear(lt.Remainder.DistributeFront),
sector_average_function=lt.average.Mean(),
smoothing_function=lt.smoothing.MedianBlur(3),
)