From patchwork Wed Jul 27 22:21:40 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 16848 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id 91256BE173 for ; Wed, 27 Jul 2022 22:21:54 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id D451A6330E; Thu, 28 Jul 2022 00:21:53 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1658960513; bh=KoWKmuclHfejlGDMPrOI4la/ACRT+k8qp7zSHPqRClk=; h=To:Date:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=pFH0mc6ysaWRyzWUg4uMXydse8f/WLUizprrocg1uFy+ItL7JPCltTToFMeNDZaVx X1qFsd/dEQ3tvdD7aXbsp4DIdOByXZn6cD4brTpKoPqpdxlEJfYpBDcylYC9NTyMOn pyVohd7Yb6oCUV7LxMPiiLrR0cw+ir/CCI5Sj+A6TDMCRsz1dgD80A03gHb6T3hqub V0juNR1Rc1qw+o8KkxpFgcdaK9TshomV1CULy1NDolxAdZmoNmP71byPrOZDhYMHyw dR5YdFE9rQYa3WeY4scwDUBcpXY0T/+aqmyrph/EZOHZyMezGlBH17kY9PtNS+RKsf P+Hdys3lkB51g== Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 2AD7E60487 for ; Thu, 28 Jul 2022 00:21:52 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="ARdQPxhX"; dkim-atps=neutral Received: from pendragon.ideasonboard.com (62-78-145-57.bb.dnainternet.fi [62.78.145.57]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 892F16D4; Thu, 28 Jul 2022 00:21:51 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1658960511; bh=KoWKmuclHfejlGDMPrOI4la/ACRT+k8qp7zSHPqRClk=; h=From:To:Cc:Subject:Date:From; b=ARdQPxhXYVFhn2Dh5cqWbhJFO7qRdx6kC88NWm2HPJOpxdzd7yphN4iv1Ho0xuksg nKgfH5zpkoBnnVDfIgYML/zzV+qbnmYDXDrYASmn9/YNxSfea05+xQdfFhkVxThQFG Psyx0xy96uxqdffOgT+mBLUWKPlVP4ELi6mAVX7A= To: libcamera-devel@lists.libcamera.org Date: Thu, 28 Jul 2022 01:21:40 +0300 Message-Id: <20220727222149.30627-1-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v5 0/9] ipa: rkisp1: Add GSL, LSC, DPCC, Filter and CProc algorithms X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Laurent Pinchart via libcamera-devel From: Laurent Pinchart Reply-To: Laurent Pinchart Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" Hello, This patch series combines the series "[PATCH v4 0/2] Add Filter and Color Processing control for rkisp1" and "[PATCH v4 0/5] Add GSL, LSC and DPCC tuning support for rkisp1" previously posted by Florian (very conveniently both numbered v4, making this a clear v5). The v4's were mostly fine, with just minor changes needed in "[PATCH v4 2/2] ipa: rkisp1: Add support of ColorProcessing control" that could have been handled when applying. However, the independently developed "[PATCH v7 01/14] libcamera: yaml_parser: Replace ok flag to get() with std::optional" conflicts, and I would like to merge it first. v5 is thus a rebase. Patch 1/9 is new and adds a new variables to the utils namespace to facilitate usage of std::optional when it stores complex types. Patch 2/9 is the YAML parser enhancement mentioned above that caused the v5, and patch 3/9 is Florian's YamlObject::getList() implementation rebased on 2/9 and ported to use std::optional. After that, patches 4/9 to 9/9 are from Florian. Beside the rebase, the only change is the minor replacement of float values with integers in 9/9. I have left "[RFC PATCH] ipa: rkisp1: dpcc: Generalize YAML parsing" out of the series as it still needs to be reviewed. The patch can be merged later on top (if we decide not to drop it). As patch 1/9 is new, it lacks a Reviewed-by tag which thus blocks the rest of the series. Reviews would thus be appreciated :-) See patch 5/9 and 6/9 for example usages of utils::defopt. Florian Sylvestre (7): libcamera: yaml_parser: Add getList() function include: linux: Update rkisp1 kernel header for DPCC configuration ipa: rkisp1: Add support of Gamma Sensor Linearization control ipa: rkisp1: Add support of Lens Shading Correction control ipa: rkisp1: Add support of Defect Pixel Cluster Correction control ipa: rkisp1: Add support of Filter control ipa: rkisp1: Add support of ColorProcessing control Laurent Pinchart (2): libcamera: base: utils: Provide defopt to simplify std::optional::value_or() usage libcamera: yaml_parser: Replace ok flag to get() with std::optional include/libcamera/base/utils.h | 14 ++ include/libcamera/internal/yaml_parser.h | 25 ++- include/linux/rkisp1-config.h | 77 +++++-- src/ipa/rkisp1/algorithms/cproc.cpp | 97 +++++++++ src/ipa/rkisp1/algorithms/cproc.h | 30 +++ src/ipa/rkisp1/algorithms/dpcc.cpp | 254 +++++++++++++++++++++++ src/ipa/rkisp1/algorithms/dpcc.h | 31 +++ src/ipa/rkisp1/algorithms/filter.cpp | 201 ++++++++++++++++++ src/ipa/rkisp1/algorithms/filter.h | 30 +++ src/ipa/rkisp1/algorithms/gsl.cpp | 149 +++++++++++++ src/ipa/rkisp1/algorithms/gsl.h | 34 +++ src/ipa/rkisp1/algorithms/lsc.cpp | 178 ++++++++++++++++ src/ipa/rkisp1/algorithms/lsc.h | 38 ++++ src/ipa/rkisp1/algorithms/meson.build | 5 + src/ipa/rkisp1/data/ov5640.yaml | 147 +++++++++++++ src/ipa/rkisp1/ipa_context.cpp | 34 +++ src/ipa/rkisp1/ipa_context.h | 14 ++ src/ipa/rkisp1/rkisp1.cpp | 1 + src/libcamera/base/utils.cpp | 21 ++ src/libcamera/pipeline/rkisp1/rkisp1.cpp | 20 ++ src/libcamera/yaml_parser.cpp | 197 ++++++++++-------- test/utils.cpp | 54 +++++ test/yaml-parser.cpp | 77 +++---- 23 files changed, 1587 insertions(+), 141 deletions(-) create mode 100644 src/ipa/rkisp1/algorithms/cproc.cpp create mode 100644 src/ipa/rkisp1/algorithms/cproc.h create mode 100644 src/ipa/rkisp1/algorithms/dpcc.cpp create mode 100644 src/ipa/rkisp1/algorithms/dpcc.h create mode 100644 src/ipa/rkisp1/algorithms/filter.cpp create mode 100644 src/ipa/rkisp1/algorithms/filter.h create mode 100644 src/ipa/rkisp1/algorithms/gsl.cpp create mode 100644 src/ipa/rkisp1/algorithms/gsl.h create mode 100644 src/ipa/rkisp1/algorithms/lsc.cpp create mode 100644 src/ipa/rkisp1/algorithms/lsc.h base-commit: 22ffeae04de2e7ce6b2476a35233c790beafb67f