[{"id":19285,"web_url":"https://patchwork.libcamera.org/comment/19285/","msgid":"<78daafbe-290b-02af-1852-9752ffb49dfa@ideasonboard.com>","date":"2021-09-02T12:16:16","subject":"Re: [libcamera-devel] [PATCH 1/4] ipa: ipu3: Move the AWB stats\n\tstructures","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"On 02/09/2021 09:32, Jean-Michel Hautbois wrote:\n> The structure Ipu3AwbCell describes the AWB stats layout on the kernel\n> side. We will need it to be used by the AGC algorithm to be introduced\n> later, so let's make it visible from ipa::ipu3::algorithms and not only\n> for the AWB class.\n> \n> The IspStatsRegion will be needed by AGC too, so let's move it in the\n> same namespace too.\n> \n> Signed-off-by: Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>\n\nJust a code move, so no particular issues.\n\nReviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n\n> ---\n>  src/ipa/ipu3/algorithms/awb.h | 37 ++++++++++++++++++-----------------\n>  1 file changed, 19 insertions(+), 18 deletions(-)\n> \n> diff --git a/src/ipa/ipu3/algorithms/awb.h b/src/ipa/ipu3/algorithms/awb.h\n> index a16dd68d..cc848060 100644\n> --- a/src/ipa/ipu3/algorithms/awb.h\n> +++ b/src/ipa/ipu3/algorithms/awb.h\n> @@ -23,6 +23,24 @@ namespace ipa::ipu3::algorithms {\n>  static constexpr uint32_t kAwbStatsSizeX = 16;\n>  static constexpr uint32_t kAwbStatsSizeY = 12;\n>  \n> +/* \\todo Move the cell layout into intel-ipu3.h kernel header */\n> +struct Ipu3AwbCell {\n> +\tunsigned char greenRedAvg;\n> +\tunsigned char redAvg;\n> +\tunsigned char blueAvg;\n> +\tunsigned char greenBlueAvg;\n> +\tunsigned char satRatio;\n> +\tunsigned char padding[3];\n> +} __attribute__((packed));\n> +\n> +struct IspStatsRegion {\n> +\tunsigned int counted;\n> +\tunsigned int uncounted;\n> +\tunsigned long long rSum;\n> +\tunsigned long long gSum;\n> +\tunsigned long long bSum;\n> +};\n> +\n>  class Awb : public Algorithm\n>  {\n>  public:\n> @@ -32,16 +50,7 @@ public:\n>  \tvoid prepare(IPAContext &context, ipu3_uapi_params *params) override;\n>  \tvoid process(IPAContext &context, const ipu3_uapi_stats_3a *stats) override;\n>  \n> -\tstruct Ipu3AwbCell {\n> -\t\tunsigned char greenRedAvg;\n> -\t\tunsigned char redAvg;\n> -\t\tunsigned char blueAvg;\n> -\t\tunsigned char greenBlueAvg;\n> -\t\tunsigned char satRatio;\n> -\t\tunsigned char padding[3];\n> -\t} __attribute__((packed));\n> -\n> -\t/* \\todo Make these three structs available to all the ISPs ? */\n> +\t/* \\todo Make these structs available to all the ISPs ? */\n>  \tstruct RGB {\n>  \t\tRGB(double _R = 0, double _G = 0, double _B = 0)\n>  \t\t\t: R(_R), G(_G), B(_B)\n> @@ -55,14 +64,6 @@ public:\n>  \t\t}\n>  \t};\n>  \n> -\tstruct IspStatsRegion {\n> -\t\tunsigned int counted;\n> -\t\tunsigned int uncounted;\n> -\t\tunsigned long long rSum;\n> -\t\tunsigned long long gSum;\n> -\t\tunsigned long long bSum;\n> -\t};\n> -\n>  \tstruct AwbStatus {\n>  \t\tdouble temperatureK;\n>  \t\tdouble redGain;\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 95E10BD87D\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu,  2 Sep 2021 12:16:21 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id EE7A969166;\n\tThu,  2 Sep 2021 14:16:20 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 845D560255\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu,  2 Sep 2021 14:16:19 +0200 (CEST)","from [192.168.0.20]\n\t(cpc89244-aztw30-2-0-cust3082.18-1.cable.virginm.net [86.31.172.11])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 0C43C317;\n\tThu,  2 Sep 2021 14:16:19 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"jv3i4JyU\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1630584979;\n\tbh=4bYS8WFh1YhVi0U6BT1Uv/Vusy5XGVnLy4r5odMAF3g=;\n\th=Subject:To:References:From:Date:In-Reply-To:From;\n\tb=jv3i4JyU0A6L+6zdStadlirED+VBVnSTWCqE53x0qsdxaiFAykWNm6t38YtI1Qu0l\n\ti6toza9Vpb9RmYfExZ5xK6fPB1JHq5B0CbaoV/l9ORF0jHU+BEjLplP5FW1qpHb/nt\n\tevzUnBco791YXPWBWel+kiEfvIUY6K4JQU+mMOdM=","To":"Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>,\n\tlibcamera-devel@lists.libcamera.org","References":"<20210902083207.33976-1-jeanmichel.hautbois@ideasonboard.com>\n\t<20210902083207.33976-2-jeanmichel.hautbois@ideasonboard.com>","From":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Message-ID":"<78daafbe-290b-02af-1852-9752ffb49dfa@ideasonboard.com>","Date":"Thu, 2 Sep 2021 13:16:16 +0100","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101\n\tThunderbird/78.11.0","MIME-Version":"1.0","In-Reply-To":"<20210902083207.33976-2-jeanmichel.hautbois@ideasonboard.com>","Content-Type":"text/plain; charset=utf-8","Content-Language":"en-GB","Content-Transfer-Encoding":"7bit","Subject":"Re: [libcamera-devel] [PATCH 1/4] ipa: ipu3: Move the AWB stats\n\tstructures","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>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]