From patchwork Wed Jul 20 15:42:17 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Sylvestre X-Patchwork-Id: 16705 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 15FF6BD1F1 for ; Wed, 20 Jul 2022 15:42:29 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 5A1E763312; Wed, 20 Jul 2022 17:42:28 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1658331748; bh=qtCR4fgutxccqwIsfq4nl6NDYqXX3zCFLq+8sO/unZU=; h=To:Date:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=f3Zf8AnHatHpw6pJybww6TRwCFhpCk9h3jw/YPX3mF1WAzI/Vd9bLEWzCz/Uu9EOu lcxUC8LbcXT93KbcaxsOP9He/upyQu1OR8T0H7eIlPEI8lfjtiARE3U5v0070XeJh2 jsjwnt19GEH1CuXhmYQTpBFiOEWIJbSfUE+0uW8RFc7YGXF5ufmqV/HspACy3hwB0h aBGWUmSmHCP7dhBi98YM12HiXz75AR55i3nzE/vR6sZfIOd1f/ewenklFKtpusKOrI kBn+ehAvVzP4HV1p4PgU2rh0POy+vbgKrQqFMyxRf+bhxwTQAj+IFDAno4YOkN70uw ywOj+h2VUKEeA== Received: from mail-wr1-x42a.google.com (mail-wr1-x42a.google.com [IPv6:2a00:1450:4864:20::42a]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 44E9760489 for ; Wed, 20 Jul 2022 17:42:27 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (2048-bit key; unprotected) header.d=baylibre-com.20210112.gappssmtp.com header.i=@baylibre-com.20210112.gappssmtp.com header.b="i2aN8Jiy"; dkim-atps=neutral Received: by mail-wr1-x42a.google.com with SMTP id d16so26664993wrv.10 for ; Wed, 20 Jul 2022 08:42:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=8Pi9b/7lnrM5Jcv9Vdd1FVHOzK4WW9TjsGmb/gamr+4=; b=i2aN8JiyPBYNijNSAlXjiBaiu5VArhayqeJ1YUw5NU2PWubAqZLWhSySaMlbKZAK3I eSz3bXvioYtoQU5N6AlUFtdIFYNcC2xZLKQkCB5VPw9LeCCdVwF5L+MpiarywnWPrmEN 4TgPluuJumBH0jKURc70X1Y4nmr4Tjco3KK/0KbGvSXHvgKrSo7qD7Vcpy/NhYHpVy38 K8hLxqVVbhAwot0pZGklozY+/pZr2/bONBpyJfwEQXRzVbsBSDmag5kEj1rnP2eQ0Htt BR/I9BY2422soM7M/kxt1ZaxTGQXXaCmm2UcNYp8HzcW8Sz6V5VB51cBCUq5BXLMdTDz zfiQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=8Pi9b/7lnrM5Jcv9Vdd1FVHOzK4WW9TjsGmb/gamr+4=; b=WodPpzTkod94E03veRhmI2410TuBYSN6Uz00S3kRGBy9ags8QfwDoRHA71pEryE4U+ cIRjVYUGOsfpAUmAsgw4roKerBFpZCyqSUa7h5znDIkZJtk+mpv+N5dVhRLXgcUcw9Xw 477xlvY9aNqJXJi5d9dflfhq2XSYQ+5oBdxUkD4BbJrW4X5fpE21/awxEz6b0FoHdKVg HWg2CJWN8CQ0p6C7fzlE1kPAx2TbgILnuvV2UGfDwuUX3RZltKE1uRVMDokBQFKc5VGJ 9usfLZrQt3pHywzmdcmcx9wHT6KxaM/+h5+tV6VLfiX0JBSadOxyI5/4/drKgNx9vUk4 6uiQ== X-Gm-Message-State: AJIora96iUJbC+aR3DvC+8kDKX1WjRnNLRdrBu16RVGxp/LK0jATX59a /QU7qpMEJhbXlMB/elrUk28AvWfJcl6RT3zA X-Google-Smtp-Source: AGRyM1vGUeMIyYTbis0lOGvlze0HVjLrqJfD0m6xM35qRmxnTvi56YwuzyZpuc8p7EtMHYrNNbAtwQ== X-Received: by 2002:adf:cd05:0:b0:21d:df26:8db with SMTP id w5-20020adfcd05000000b0021ddf2608dbmr19957823wrm.220.1658331746578; Wed, 20 Jul 2022 08:42:26 -0700 (PDT) Received: from BL087.. ([2a01:e34:eea9:e630:516d:f303:6345:b768]) by smtp.gmail.com with ESMTPSA id d2-20020adffbc2000000b0021e489ec78bsm2159294wrs.21.2022.07.20.08.42.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Jul 2022 08:42:25 -0700 (PDT) To: libcamera-devel@lists.libcamera.org Date: Wed, 20 Jul 2022 17:42:17 +0200 Message-Id: <20220720154221.50937-1-fsylvestre@baylibre.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v2 0/4] Add Demosaicing and Color Processing control for rkisp1 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: Florian Sylvestre via libcamera-devel From: Florian Sylvestre Reply-To: Florian Sylvestre Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" Hello, This patch series adds support for two rkisp1 algorithms: - Demosaicing algorithm (patch 3/4) - Color Processing algorithm (patch 4/4) Demosaicing algorithm is in charge of denoising and sharpness control. ColorProcessing algorithm is in charge of brightness, contrast and saturation control. Demosaicing and ColorProcessing algorithm are currently configurable from the application by user controls. So I add support for transfering user controls respectively in the algorithm class (patch 1/4) and in the IPARkISP1 (patch 2/4). This version addresses all the feedback made on the first version except for the use of a frameContext associated with the targeted frame (the frameContext used is the one of the current frame, as it's not currently supported for rkisp). Florian Sylvestre (4): ipa: libipa: algorithm: Add queueRequest() to the Algorithm class ipa: rkisp1: Transfer queueRequest() call to each algorithm ipa: rkisp1: Add support of Demosaicing control ipa: rkisp1: Add support of ColorProcessing control src/ipa/libipa/algorithm.cpp | 16 ++ src/ipa/libipa/algorithm.h | 8 + src/ipa/rkisp1/algorithms/cproc.cpp | 94 +++++++++++ src/ipa/rkisp1/algorithms/cproc.h | 30 ++++ src/ipa/rkisp1/algorithms/demosaicing.cpp | 197 ++++++++++++++++++++++ src/ipa/rkisp1/algorithms/demosaicing.h | 30 ++++ src/ipa/rkisp1/algorithms/meson.build | 2 + src/ipa/rkisp1/data/ov5640.yaml | 2 + src/ipa/rkisp1/ipa_context.h | 13 ++ src/ipa/rkisp1/rkisp1.cpp | 8 +- src/libcamera/pipeline/rkisp1/rkisp1.cpp | 20 +++ 11 files changed, 417 insertions(+), 3 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/demosaicing.cpp create mode 100644 src/ipa/rkisp1/algorithms/demosaicing.h