From patchwork Fri Aug 5 12:40:25 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Sylvestre X-Patchwork-Id: 16972 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 1B2F7BE173 for ; Fri, 5 Aug 2022 12:40:35 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 9ECD863330; Fri, 5 Aug 2022 14:40:34 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1659703234; bh=jA1/7M/RCBjreSLkpxhny7j2mPWk69IyCShtV2DVL3A=; h=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=1XCi0lzyFHf7x8H5AUMy6UxrPK7R0wBa/j9NZLqYAKwAIV/V/mrwyYlSt043iWU6+ kBKoy5scODh0AHarIiLoS1HdrpoyjZMlDNTPCZ1pehAKAriAlJ9EU2KAX4rA0lcwc0 ABrq0PeWUBEtyGLaOvg/pleaHFh14c1ljN3DdKxPYPW9TKh3mYdKrZjOJF2VDerFhF 9rA0jnKOWBRRuUsnnA4IJws78N3mEQgWAVsgBE0ON2f9w+eF1lGLqWOBy3GBkXm0K6 Gf2STPjbHVtnYaWGsh4UyRBUGx3QaRTP41iU+UCQy4c2C0z6F49jIdMqkTmwr5qgjv qiG4t2HxveGPA== Received: from mail-wm1-x32b.google.com (mail-wm1-x32b.google.com [IPv6:2a00:1450:4864:20::32b]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 4ADD263313 for ; Fri, 5 Aug 2022 14:40:32 +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="hM1x823g"; dkim-atps=neutral Received: by mail-wm1-x32b.google.com with SMTP id n185so1361189wmn.4 for ; Fri, 05 Aug 2022 05:40:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc; bh=CYikZf9gDAhn+XN0urxGrNKw7RUkr01ALRPdrjmuwMs=; b=hM1x823gxTdPx3ligq7XY5tbwkKcMZDEajKec2qr/cJ2K5KXXMnI+qZZQtMiDq+Qc4 sRZX/Z/uOccAH6DHbNlQ//JZwyeq0Do9WY+J4EuDhjz7fLYEl9bCqhH6aNzcKDKST7s3 pBarNhtmkP/F4Ay6ze0+ZZ+fPxb+6MTDhwiHLs/NIPpBdZNPGjRJKRHx2rZhLPdVuQE9 a/rX1okL1csVibF1n+/pIJd4OfKpZpPEr8/Tn+oEJO4X4YP74hY4ed5feKn43guIghJC eOSgsSYNsw0q2OsEHaVQ1eWDUpaWKU+XJMeORJ+vJ86qSoKjpmeqtBiUUbt10kzbytk7 V3SA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc; bh=CYikZf9gDAhn+XN0urxGrNKw7RUkr01ALRPdrjmuwMs=; b=h0ZTNx++LwIPwFrPnesEdEQEknulvwIx7Cs5bq05iNXMhjA6sVBMfU6HRaWNG+sJJZ rQsgg+94IdDxE5ttx9xv6C+WHt2khm+poDD1Cc3XskF9U5KlQ3fHPYo/ea0AuxyxcxD4 0zCK3Ht9Zx86DzQDT8T6F3IeefDUxPy5fYza6mlRndPgVusbmA4c4i1Xg/xVbZjn5VeN SD/Dn9agqFoZ4G5LLa2d4JP75bATJXHjsPuzmjB2t1sfGRqKpixHAC34pHXj71oTZU6Z DoF1KbeiiUhAM1fP9BUHLnwoxADomlA2+opVP+CyeLrlpKaS+SrEfIiUhFeaGz754jgy 7B5A== X-Gm-Message-State: ACgBeo0irz/AjfSkZw9y5u1/t0B6wnc0CQSMCf634/l1unr+2eTDTklM Kzw8/qNrNN7s44W66WGVEUnu8r25Z8OtNs7r X-Google-Smtp-Source: AA6agR7drcaVXTgMRQ/Bln4lAcP0UpARPl00GdS5Nzs/V3dwzIaYSPySbyi73IuvB1Vax5yTvram9Q== X-Received: by 2002:a05:600c:5120:b0:3a3:2ae4:fb20 with SMTP id o32-20020a05600c512000b003a32ae4fb20mr4454951wms.81.1659703231600; Fri, 05 Aug 2022 05:40:31 -0700 (PDT) Received: from BL087.. ([2a01:e34:eea9:e630:997d:fb84:b99a:cc47]) by smtp.gmail.com with ESMTPSA id w13-20020adff9cd000000b0021db7b0162esm3869206wrr.105.2022.08.05.05.40.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Aug 2022 05:40:31 -0700 (PDT) To: libcamera-devel@lists.libcamera.org Date: Fri, 5 Aug 2022 14:40:25 +0200 Message-Id: <20220805124027.530212-2-fsylvestre@baylibre.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220805124027.530212-1-fsylvestre@baylibre.com> References: <20220805124027.530212-1-fsylvestre@baylibre.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v2 1/3] ipa: rkisp1: Add enable field for AWB algorithm in IPA context 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" Add an enable variable in the awb struct in IPASessionConfiguration which indicates if the awb algorithm has been configured. This will allow other algorithms to retrieve this information. Signed-off-by: Florian Sylvestre Reviewed-by: Laurent Pinchart --- src/ipa/rkisp1/algorithms/awb.cpp | 2 ++ src/ipa/rkisp1/ipa_context.cpp | 3 +++ src/ipa/rkisp1/ipa_context.h | 1 + 3 files changed, 6 insertions(+) diff --git a/src/ipa/rkisp1/algorithms/awb.cpp b/src/ipa/rkisp1/algorithms/awb.cpp index 9f00364d..d1328f01 100644 --- a/src/ipa/rkisp1/algorithms/awb.cpp +++ b/src/ipa/rkisp1/algorithms/awb.cpp @@ -48,6 +48,8 @@ int Awb::configure(IPAContext &context, context.configuration.awb.measureWindow.h_size = 3 * configInfo.outputSize.width / 4; context.configuration.awb.measureWindow.v_size = 3 * configInfo.outputSize.height / 4; + context.configuration.awb.enabled = true; + return 0; } diff --git a/src/ipa/rkisp1/ipa_context.cpp b/src/ipa/rkisp1/ipa_context.cpp index ef8bb8e9..23a63f8c 100644 --- a/src/ipa/rkisp1/ipa_context.cpp +++ b/src/ipa/rkisp1/ipa_context.cpp @@ -87,6 +87,9 @@ namespace libcamera::ipa::rkisp1 { * * \var IPASessionConfiguration::awb.measureWindow * \brief AWB measure window + * + * \var IPASessionConfiguration::awb.enabled + * \brief Indicates if the AWB hardware is enabled to apply colour gains */ /** diff --git a/src/ipa/rkisp1/ipa_context.h b/src/ipa/rkisp1/ipa_context.h index 2bdb6a81..7f7b3e4d 100644 --- a/src/ipa/rkisp1/ipa_context.h +++ b/src/ipa/rkisp1/ipa_context.h @@ -29,6 +29,7 @@ struct IPASessionConfiguration { struct { struct rkisp1_cif_isp_window measureWindow; + bool enabled; } awb; struct {