From patchwork Thu Aug 4 14:12:26 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Sylvestre X-Patchwork-Id: 16968 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 9B945C3272 for ; Thu, 4 Aug 2022 14:12:36 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 410CB6332F; Thu, 4 Aug 2022 16:12:36 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1659622356; bh=Z8enGdwh8QvFKXJjbPxTGArPxMbzZaH3mArrLRmY19o=; 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=llaRRLlrIqJqjfWnwk5HfD8TnmKQ4dpqgvFGusqTkIgKlDKp7jwVC3wb+hx8hdFFd HXFFVrHZqM52FZNNIly98ssQV7x2KU8gk/4GK7o333Q15Kwtqtd6aKrLNw1JJSdhXo yxghqIAC2jk5UNSs419cBgpQJN7Snxda9fVJJdBydn4zmmPu2f4kwyD23/uDXNm9+A /JPE8T1k8WZYd+zwcgifWMAx+mQ5xdW+1sYd1F9RXacoKl3oEY4kL0skMdJRmazGm8 Sr392KaYFWSEVexta0SYCwteKih7/S+O39XSsKrFIZuVa6q0TDVANirhs/uCSXy60r udJq0uOGALsjA== Received: from mail-wr1-x436.google.com (mail-wr1-x436.google.com [IPv6:2a00:1450:4864:20::436]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 9342B6330D for ; Thu, 4 Aug 2022 16:12:34 +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="5x2zuZd9"; dkim-atps=neutral Received: by mail-wr1-x436.google.com with SMTP id bv3so11510724wrb.5 for ; Thu, 04 Aug 2022 07:12:34 -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:in-reply-to:references :mime-version:content-transfer-encoding; bh=KiE3kzDMQPEGN7jLQ2xZUp7u49vuV8YvBM6aut3iZoc=; b=5x2zuZd9UR2edOcY9LlULZ5Wk72YCBo5UEAw0jzUWxNn1FSA5itSUd8Z3HJGhQVoTg egzzK6Xkmnxd5XQmBbgeklja+ryVIPGrCCsb70gK53cd9jQbpGnz9x+Vpj5KkaWxqltI 4DF8BPSCc1MGPtN6QNVX3NDDjqIit3pPv2EblXdVGzr1m1WJkwH2FcaGJHgms5D1PcRR xaPDIcNzy12eDW/0EDA9mO1gorbl5MJGTNlqQczZMPUtMoi5hGBj5Xfyev0GPtaINWCg J9XcIwN3kGa78WGorUBQfxKXKx42WGUIHXRVzGY/shyLwU67KA+daQUJvy3Gp8KewXFV 2p3g== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=KiE3kzDMQPEGN7jLQ2xZUp7u49vuV8YvBM6aut3iZoc=; b=DvgJag+Z7ReKSCzJn/ONSG2fngqXz12QP/tRxwWuAiCqkOFJcjYUwFGiQXO/wH71pv VxU/1xBDAjJ0HpyEP43l6FVTboRT9vrZ0+ikUSLeVsDRpBvcU2wZzNLkDxFV0Idbfm0S LgswzqfNNOtOGTbpajg98/ikcbwCtfcdJW2BRWo6m6bWcWaA7caIeV1h90coe374YvZb rJqPcYDpaPfxVUGc8GollTQ7Hx2968ZuQL9wcan0JiZoYuNaaEmSrtaLcZ0BKzsYBtfZ 68THcYUU2mkyH3pu+Mhuav2YtfCeaky3BZrNRj8CpN4AIvAkjAxz0Z/sDDLEwV3UwRd/ 4K/Q== X-Gm-Message-State: ACgBeo1EvuJ887mV/i9+Ae6XdD45ZQtE96PUnxtZ4sjyIbEFjYbtYNT/ wOu6+QJRXVLHraIu7qRSH7Sc55hFbKTIIzoP X-Google-Smtp-Source: AA6agR5kzn0IjP9Vdoo1SIby8+4QGxgOjalBKzVCWBUyRDF/Kt/KiO7ElWDr5sy5XW18DAw6oUxi2Q== X-Received: by 2002:adf:ce0e:0:b0:220:7eed:3ce3 with SMTP id p14-20020adfce0e000000b002207eed3ce3mr1523835wrn.148.1659622353904; Thu, 04 Aug 2022 07:12:33 -0700 (PDT) Received: from BL087.. ([2a01:e34:eea9:e630:d073:c231:2c43:c9cf]) by smtp.gmail.com with ESMTPSA id i5-20020a05600c2d8500b003a325bd8517sm1616948wmg.5.2022.08.04.07.12.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Aug 2022 07:12:32 -0700 (PDT) To: libcamera-devel@lists.libcamera.org Date: Thu, 4 Aug 2022 16:12:26 +0200 Message-Id: <20220804141228.417211-2-fsylvestre@baylibre.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220804141228.417211-1-fsylvestre@baylibre.com> References: <20220804141228.417211-1-fsylvestre@baylibre.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 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..d833b8c7 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 AWB is enabled */ /** 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 {