libtuning: modules: Add initial CCM module

Implement a minimal ccm calibration module. For now it doesn't take the
results from lsc into account and supports rkisp1 only.

Signed-off-by: Paul Elder <paul.elder@ideasonboard.com>
Signed-off-by: Stefan Klug <stefan.klug@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Daniel Scally <dan.scally@ideasonboard.com>
This commit is contained in:
Paul Elder 2024-05-30 04:42:50 +09:00 committed by Stefan Klug
parent 64d4e596a4
commit 721b976928
4 changed files with 78 additions and 1 deletions

View file

@ -0,0 +1,28 @@
# SPDX-License-Identifier: GPL-2.0-or-later
#
# Copyright (C) 2024, Paul Elder <paul.elder@ideasonboard.com>
# Copyright (C) 2024, Ideas on Board
#
# Ccm module for tuning rkisp1
from .ccm import CCM
class CCMRkISP1(CCM):
hr_name = 'Crosstalk Correction (RkISP1)'
out_name = 'Ccm'
def __init__(self, **kwargs):
super().__init__(**kwargs)
# We don't need anything from the config file.
def validate_config(self, config: dict) -> bool:
return True
def process(self, config: dict, images: list, outputs: dict) -> dict:
output = {}
ccms = self.do_calibration(images)
output['ccms'] = ccms
return output