[{"id":28274,"web_url":"https://patchwork.libcamera.org/comment/28274/","msgid":"<CAEmqJPqbMDatF8jBx75NBXxK9J_YiHXV=Jiis_D6nmxvb4pUhg@mail.gmail.com>","date":"2023-12-07T10:45:13","subject":"Re: [libcamera-devel] [PATCH 2/2] ipa: rpi: awb: Add an\n\tinitialValues method","submitter":{"id":34,"url":"https://patchwork.libcamera.org/api/people/34/","name":"Naushir Patuck","email":"naush@raspberrypi.com"},"content":"Hi David,\n\nThank you for this work.\n\nOn Wed, 6 Dec 2023 at 10:38, David Plowman via libcamera-devel\n<libcamera-devel@lists.libcamera.org> wrote:\n>\n> This allows the IPA to get reasonable default colour gains before AWB\n> has run. This is particularly important on the PiSP platform where\n> these numbers are helpful in programming the Front End statistics\n> block in advance.\n>\n> Signed-off-by: David Plowman <david.plowman@raspberrypi.com>\n\nReviewed-by: Naushir Patuck <naush@raspberrypi.com>\n\n> ---\n>  src/ipa/rpi/controller/awb_algorithm.h | 1 +\n>  src/ipa/rpi/controller/rpi/awb.cpp     | 6 ++++++\n>  src/ipa/rpi/controller/rpi/awb.h       | 1 +\n>  3 files changed, 8 insertions(+)\n>\n> diff --git a/src/ipa/rpi/controller/awb_algorithm.h b/src/ipa/rpi/controller/awb_algorithm.h\n> index 8462c4db..6009bdac 100644\n> --- a/src/ipa/rpi/controller/awb_algorithm.h\n> +++ b/src/ipa/rpi/controller/awb_algorithm.h\n> @@ -16,6 +16,7 @@ public:\n>         AwbAlgorithm(Controller *controller) : Algorithm(controller) {}\n>         /* An AWB algorithm must provide the following: */\n>         virtual unsigned int getConvergenceFrames() const = 0;\n> +       virtual void initialValues(double &gainR, double &gainB) = 0;\n>         virtual void setMode(std::string const &modeName) = 0;\n>         virtual void setManualGains(double manualR, double manualB) = 0;\n>         virtual void enableAuto() = 0;\n> diff --git a/src/ipa/rpi/controller/rpi/awb.cpp b/src/ipa/rpi/controller/rpi/awb.cpp\n> index 5ae0c2fa..dde5785a 100644\n> --- a/src/ipa/rpi/controller/rpi/awb.cpp\n> +++ b/src/ipa/rpi/controller/rpi/awb.cpp\n> @@ -220,6 +220,12 @@ void Awb::initialise()\n>         asyncResults_ = syncResults_;\n>  }\n>\n> +void Awb::initialValues(double &gainR, double &gainB)\n> +{\n> +       gainR = syncResults_.gainR;\n> +       gainB = syncResults_.gainB;\n> +}\n> +\n>  void Awb::disableAuto()\n>  {\n>         /* Freeze the most recent values, and treat them as manual gains */\n> diff --git a/src/ipa/rpi/controller/rpi/awb.h b/src/ipa/rpi/controller/rpi/awb.h\n> index e7d49cd8..cde6a62f 100644\n> --- a/src/ipa/rpi/controller/rpi/awb.h\n> +++ b/src/ipa/rpi/controller/rpi/awb.h\n> @@ -95,6 +95,7 @@ public:\n>         void initialise() override;\n>         int read(const libcamera::YamlObject &params) override;\n>         unsigned int getConvergenceFrames() const override;\n> +       void initialValues(double &gainR, double &gainB) override;\n>         void setMode(std::string const &name) override;\n>         void setManualGains(double manualR, double manualB) override;\n>         void enableAuto() override;\n> --\n> 2.39.2\n>","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 16DDCC322E\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu,  7 Dec 2023 10:45:51 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id D34F0629E3;\n\tThu,  7 Dec 2023 11:45:50 +0100 (CET)","from mail-yb1-xb2e.google.com (mail-yb1-xb2e.google.com\n\t[IPv6:2607:f8b0:4864:20::b2e])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 7264D629CC\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu,  7 Dec 2023 11:45:49 +0100 (CET)","by mail-yb1-xb2e.google.com with SMTP id\n\t3f1490d57ef6-dbc1efc23f7so807249276.2\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 07 Dec 2023 02:45:49 -0800 (PST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1701945950;\n\tbh=bWhRIN58kMUAvkCKEg5jJPrFNnD+PrvS2PcxwwB/I+U=;\n\th=References:In-Reply-To:Date:To:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=ORIVPh19sGEyv33Cbik08sjfKHDS4UmLY1o6q+eBXYZRJZEd54Ag1TCtkxhfj42x2\n\tKRQ89p/kavF0J9MgQmRVOuAnLl0JkJAU4i43JiStZD3bGR2UGbKlXg2id4utvFhxW+\n\tgXZeZzPSBcgdPDqjKpdurR2f2firX/p8iy2Bns+C8S64xS0es7FOabovPmLASlX7bo\n\tNkvjAN6Uw9oQFXMQLHZ7cixeXBdIUy033/Qg6K0XriSmV9W+4HEQNX1oGxumMexI6k\n\t8Ik2THGwtLEM1jMgFVsEGr1Zg4UCGEnPcvdEZiovhTPOUvnMmYGtZHZUVdN3tuEBHK\n\tbibyra9CK6/0g==","v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=raspberrypi.com; s=google; t=1701945948; x=1702550748;\n\tdarn=lists.libcamera.org; \n\th=cc:to:subject:message-id:date:from:in-reply-to:references\n\t:mime-version:from:to:cc:subject:date:message-id:reply-to;\n\tbh=QitieQPcadOuVjZo78pF0/52GJR0b2qm1QdOIIX08w4=;\n\tb=JyVxt3b+pRiUpM/bHsLVozs1UDmJ+oqpqQDhZE4HWvYYtJoK7YsUOk23jcZuZ2tunB\n\tSv/zQAwPPIzjKTdlR0IUDQW7sz3L2UWow1bh0eNjcZBzRBagAyPnwuQHNDCE1L/+Sl1q\n\tsJFMiYz/jy9D2yOrBgk9mLCiyUfURXiKUB+kmIB6mE6i6Yy0NPl0l7k6nwqoGk6U03SH\n\twITwSFbkUWDUrw+ohrqDsRLYO5qhk8Af5tRsvvwcujjKv61q5Y3J6C0xZzxX9Eu/GsY2\n\tLCTdmxAYDLhYANEXGEu8dsqj+k4svWb4mAOnQgQXzKDwcajnlun8M2glfkY1R9G77wN8\n\tAOxA=="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (2048-bit key; \n\tunprotected) header.d=raspberrypi.com\n\theader.i=@raspberrypi.com\n\theader.b=\"JyVxt3b+\"; dkim-atps=neutral","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1701945948; x=1702550748;\n\th=cc:to:subject:message-id:date:from:in-reply-to:references\n\t:mime-version:x-gm-message-state:from:to:cc:subject:date:message-id\n\t:reply-to;\n\tbh=QitieQPcadOuVjZo78pF0/52GJR0b2qm1QdOIIX08w4=;\n\tb=H4QexXcZxdouiopi9JoB9g1RIx33KHb/NdBOVMjpdJ4YbKMgbmKtJGhoESNIWBAYcw\n\ttrxEXPVT/Yccoq1zjT18wvKJxvJAod7KfGaJp0cmn8eQw16N+4HOG6rhuo8EtuiSBcl5\n\tzdCTW6MRCRC4/+bmcpvfgcAitsZcDvs5l6qhUNvuWJpGqLNl6ol0qPhZfA2Ty6gV1+AE\n\twyFoyboPkJiQ0g79x96p7/z15pqPRzx8R0nkfwucU2bv3ouELQGovwBJMbPiTBevUT3O\n\t29SHx2RNeMf+VVPu7jM5ZE6m+3DEedKMHhYvGHTvS6vEUt2Bxb9Lg6zYPQPjvecleQJ7\n\tbPHg==","X-Gm-Message-State":"AOJu0YyEalwcowMwvrVPnfi/i7KtWZi+97xpdJAwGcEy/KAhKtXvkfpJ\n\tX3nmJVtKxpN9WkSyco1f3pEQj2567h6XTdePHKc9swTG6ZmdB/8aJ4M=","X-Google-Smtp-Source":"AGHT+IESCMZnd9Havf/j0D7jJKWKca2wqKXYs+JEeCl6vTZhB3+w1Dtv3gVLQ1O5qXDn4fta/pPPnRdkHNZ01ci8DH0=","X-Received":"by 2002:a25:9246:0:b0:db7:dad0:76d2 with SMTP id\n\te6-20020a259246000000b00db7dad076d2mr1941361ybo.110.1701945948269;\n\tThu, 07 Dec 2023 02:45:48 -0800 (PST)","MIME-Version":"1.0","References":"<20231206103839.16607-1-david.plowman@raspberrypi.com>\n\t<20231206103839.16607-3-david.plowman@raspberrypi.com>","In-Reply-To":"<20231206103839.16607-3-david.plowman@raspberrypi.com>","Date":"Thu, 7 Dec 2023 10:45:13 +0000","Message-ID":"<CAEmqJPqbMDatF8jBx75NBXxK9J_YiHXV=Jiis_D6nmxvb4pUhg@mail.gmail.com>","To":"David Plowman <david.plowman@raspberrypi.com>","Content-Type":"text/plain; charset=\"UTF-8\"","Subject":"Re: [libcamera-devel] [PATCH 2/2] ipa: rpi: awb: Add an\n\tinitialValues method","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","From":"Naushir Patuck via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>","Reply-To":"Naushir Patuck <naush@raspberrypi.com>","Cc":"libcamera-devel@lists.libcamera.org","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]