[{"id":33195,"web_url":"https://patchwork.libcamera.org/comment/33195/","msgid":"<20250127070935.GH17899@pendragon.ideasonboard.com>","date":"2025-01-27T07:09:35","subject":"Re: [PATCH v3 5/6] ipa: simple: Report contrast in metadata","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"On Mon, Jan 13, 2025 at 02:34:04PM +0100, Milan Zamazal wrote:\n> Provide the requested contrast value, if any, in the metadata to add to\n> the completed requests.\n> \n> Signed-off-by: Milan Zamazal <mzamazal@redhat.com>\n> ---\n>  src/ipa/simple/algorithms/lut.cpp | 11 +++++++++++\n>  src/ipa/simple/algorithms/lut.h   |  5 +++++\n>  2 files changed, 16 insertions(+)\n> \n> diff --git a/src/ipa/simple/algorithms/lut.cpp b/src/ipa/simple/algorithms/lut.cpp\n> index 0ba2391f..31208bfe 100644\n> --- a/src/ipa/simple/algorithms/lut.cpp\n> +++ b/src/ipa/simple/algorithms/lut.cpp\n> @@ -116,6 +116,17 @@ void Lut::prepare(IPAContext &context,\n>  \t}\n>  }\n>  \n> +void Lut::process(IPAContext &context,\n> +\t\t  [[maybe_unused]] const uint32_t frame,\n> +\t\t  [[maybe_unused]] IPAFrameContext &frameContext,\n> +\t\t  [[maybe_unused]] const SwIspStats *stats,\n> +\t\t  ControlList &metadata)\n> +{\n> +\tconst auto contrast = context.activeState.knobs.contrast;\n\nDon't copy.\n\n> +\tif (contrast)\n> +\t\tmetadata.set(controls::Contrast, contrast.value());\n\nThis will not report the right value for the frame, but given that it's\nnot worse than the other patches,\n\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\n> +}\n> +\n>  REGISTER_IPA_ALGORITHM(Lut, \"Lut\")\n>  \n>  } /* namespace ipa::soft::algorithms */\n> diff --git a/src/ipa/simple/algorithms/lut.h b/src/ipa/simple/algorithms/lut.h\n> index 889f864b..ab4e1094 100644\n> --- a/src/ipa/simple/algorithms/lut.h\n> +++ b/src/ipa/simple/algorithms/lut.h\n> @@ -30,6 +30,11 @@ public:\n>  \t\t     const uint32_t frame,\n>  \t\t     IPAFrameContext &frameContext,\n>  \t\t     DebayerParams *params) override;\n> +\tvoid process(IPAContext &context,\n> +\t\t     const uint32_t frame,\n> +\t\t     IPAFrameContext &frameContext,\n> +\t\t     const SwIspStats *stats,\n> +\t\t     ControlList &metadata) override;\n>  \n>  private:\n>  \tvoid updateGammaTable(IPAContext &context);","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 40BE3BEFBE\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 27 Jan 2025 07:09:48 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 68D886855E;\n\tMon, 27 Jan 2025 08:09:47 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 0DC6368557\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 27 Jan 2025 08:09:46 +0100 (CET)","from pendragon.ideasonboard.com (81-175-209-231.bb.dnainternet.fi\n\t[81.175.209.231])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 949E578D;\n\tMon, 27 Jan 2025 08:08:39 +0100 (CET)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"DoiTbVj1\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1737961719;\n\tbh=K7jrQvILNbIWBKFCy+ofSBCw+Q5Tfym1W/o9NQZpkHc=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=DoiTbVj1bdn1QZ5LTl9kHOhrJhbQ/j2YAhXo4VKqgaY6G0iLe3jlfUWEM4Suha34l\n\tK1qrZ+NbEMe8aGLame79IdebvBmcUkBMkBGHg+m2mAVz1thX4CE48L2lTizgUxMttY\n\ti1T0Vubp0owBFsnSzo2Hox6AhElOrvZ4QTNk/E1g=","Date":"Mon, 27 Jan 2025 09:09:35 +0200","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Milan Zamazal <mzamazal@redhat.com>","Cc":"libcamera-devel@lists.libcamera.org, Kieran Bingham\n\t<kieran.bingham@ideasonboard.com>, =?utf-8?q?Barnab=C3=A1s_P=C5=91cze?=\n\t<pobrn@protonmail.com>","Subject":"Re: [PATCH v3 5/6] ipa: simple: Report contrast in metadata","Message-ID":"<20250127070935.GH17899@pendragon.ideasonboard.com>","References":"<20250113133405.12167-1-mzamazal@redhat.com>\n\t<20250113133405.12167-6-mzamazal@redhat.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20250113133405.12167-6-mzamazal@redhat.com>","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>"}},{"id":33215,"web_url":"https://patchwork.libcamera.org/comment/33215/","msgid":"<173800305134.1773152.1127430240582071812@ping.linuxembedded.co.uk>","date":"2025-01-27T18:37:31","subject":"Re: [PATCH v3 5/6] ipa: simple: Report contrast in metadata","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"Quoting Laurent Pinchart (2025-01-27 07:09:35)\n> On Mon, Jan 13, 2025 at 02:34:04PM +0100, Milan Zamazal wrote:\n> > Provide the requested contrast value, if any, in the metadata to add to\n> > the completed requests.\n> > \n> > Signed-off-by: Milan Zamazal <mzamazal@redhat.com>\n> > ---\n> >  src/ipa/simple/algorithms/lut.cpp | 11 +++++++++++\n> >  src/ipa/simple/algorithms/lut.h   |  5 +++++\n> >  2 files changed, 16 insertions(+)\n> > \n> > diff --git a/src/ipa/simple/algorithms/lut.cpp b/src/ipa/simple/algorithms/lut.cpp\n> > index 0ba2391f..31208bfe 100644\n> > --- a/src/ipa/simple/algorithms/lut.cpp\n> > +++ b/src/ipa/simple/algorithms/lut.cpp\n> > @@ -116,6 +116,17 @@ void Lut::prepare(IPAContext &context,\n> >       }\n> >  }\n> >  \n> > +void Lut::process(IPAContext &context,\n> > +               [[maybe_unused]] const uint32_t frame,\n> > +               [[maybe_unused]] IPAFrameContext &frameContext,\n> > +               [[maybe_unused]] const SwIspStats *stats,\n> > +               ControlList &metadata)\n> > +{\n> > +     const auto contrast = context.activeState.knobs.contrast;\n> \n> Don't copy.\n> \n> > +     if (contrast)\n> > +             metadata.set(controls::Contrast, contrast.value());\n> \n> This will not report the right value for the frame, but given that it's\n> not worse than the other patches,\n> \n> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\nBut we /have/ a frame context to store the actual contrast value applied\non the frame during prepare() ... so this should be done correctly, not\nreading the active state, but the frameContext.\n\n\n\n> \n> > +}\n> > +\n> >  REGISTER_IPA_ALGORITHM(Lut, \"Lut\")\n> >  \n> >  } /* namespace ipa::soft::algorithms */\n> > diff --git a/src/ipa/simple/algorithms/lut.h b/src/ipa/simple/algorithms/lut.h\n> > index 889f864b..ab4e1094 100644\n> > --- a/src/ipa/simple/algorithms/lut.h\n> > +++ b/src/ipa/simple/algorithms/lut.h\n> > @@ -30,6 +30,11 @@ public:\n> >                    const uint32_t frame,\n> >                    IPAFrameContext &frameContext,\n> >                    DebayerParams *params) override;\n> > +     void process(IPAContext &context,\n> > +                  const uint32_t frame,\n> > +                  IPAFrameContext &frameContext,\n> > +                  const SwIspStats *stats,\n> > +                  ControlList &metadata) override;\n> >  \n> >  private:\n> >       void updateGammaTable(IPAContext &context);\n> \n> -- \n> Regards,\n> \n> Laurent Pinchart","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 09433BDCC1\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 27 Jan 2025 18:37:37 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 6290668560;\n\tMon, 27 Jan 2025 19:37:36 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id E3DCD68557\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 27 Jan 2025 19:37:33 +0100 (CET)","from pendragon.ideasonboard.com\n\t(cpc89244-aztw30-2-0-cust6594.18-1.cable.virginm.net [86.31.185.195])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 4A48018D;\n\tMon, 27 Jan 2025 19:36:27 +0100 (CET)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"SGs2yRlo\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1738002987;\n\tbh=d7NFjWW9U9ymSPkd8plUoEB4TXXZaBnSC1VmPiMGRgE=;\n\th=In-Reply-To:References:Subject:From:Cc:To:Date:From;\n\tb=SGs2yRloYR14Ov5UyJSZojhfD0b87GPMeeYgcYvueEgsZVntelYrJpuFmsLp0lnxl\n\tzlIwpR6ARHEHsLo6ndCFPeUWvUu9quAHOV/JDNp6YbEhB20C936/SyY9mVGW7y0gPt\n\trvpkf6E1Utjbefa95lzKaAC7FkHcHy8XmupM/e+I=","Content-Type":"text/plain; charset=\"utf-8\"","MIME-Version":"1.0","Content-Transfer-Encoding":"quoted-printable","In-Reply-To":"<20250127070935.GH17899@pendragon.ideasonboard.com>","References":"<20250113133405.12167-1-mzamazal@redhat.com>\n\t<20250113133405.12167-6-mzamazal@redhat.com>\n\t<20250127070935.GH17899@pendragon.ideasonboard.com>","Subject":"Re: [PATCH v3 5/6] ipa: simple: Report contrast in metadata","From":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org, =?utf-8?b?QmFybmFiw6FzIFDFkWN6?=\n\t=?utf-8?q?e?= <pobrn@protonmail.com>","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>,\n\tMilan Zamazal <mzamazal@redhat.com>","Date":"Mon, 27 Jan 2025 18:37:31 +0000","Message-ID":"<173800305134.1773152.1127430240582071812@ping.linuxembedded.co.uk>","User-Agent":"alot/0.10","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>"}},{"id":33216,"web_url":"https://patchwork.libcamera.org/comment/33216/","msgid":"<20250127191413.GA13628@pendragon.ideasonboard.com>","date":"2025-01-27T19:14:13","subject":"Re: [PATCH v3 5/6] ipa: simple: Report contrast in metadata","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"On Mon, Jan 27, 2025 at 06:37:31PM +0000, Kieran Bingham wrote:\n> Quoting Laurent Pinchart (2025-01-27 07:09:35)\n> > On Mon, Jan 13, 2025 at 02:34:04PM +0100, Milan Zamazal wrote:\n> > > Provide the requested contrast value, if any, in the metadata to add to\n> > > the completed requests.\n> > > \n> > > Signed-off-by: Milan Zamazal <mzamazal@redhat.com>\n> > > ---\n> > >  src/ipa/simple/algorithms/lut.cpp | 11 +++++++++++\n> > >  src/ipa/simple/algorithms/lut.h   |  5 +++++\n> > >  2 files changed, 16 insertions(+)\n> > > \n> > > diff --git a/src/ipa/simple/algorithms/lut.cpp b/src/ipa/simple/algorithms/lut.cpp\n> > > index 0ba2391f..31208bfe 100644\n> > > --- a/src/ipa/simple/algorithms/lut.cpp\n> > > +++ b/src/ipa/simple/algorithms/lut.cpp\n> > > @@ -116,6 +116,17 @@ void Lut::prepare(IPAContext &context,\n> > >       }\n> > >  }\n> > >  \n> > > +void Lut::process(IPAContext &context,\n> > > +               [[maybe_unused]] const uint32_t frame,\n> > > +               [[maybe_unused]] IPAFrameContext &frameContext,\n> > > +               [[maybe_unused]] const SwIspStats *stats,\n> > > +               ControlList &metadata)\n> > > +{\n> > > +     const auto contrast = context.activeState.knobs.contrast;\n> > \n> > Don't copy.\n> > \n> > > +     if (contrast)\n> > > +             metadata.set(controls::Contrast, contrast.value());\n> > \n> > This will not report the right value for the frame, but given that it's\n> > not worse than the other patches,\n> > \n> > Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n> \n> But we /have/ a frame context to store the actual contrast value applied\n> on the frame during prepare() ... so this should be done correctly, not\n> reading the active state, but the frameContext.\n\nI think it can wait until we solve the synchronization issue on rkisp1.\nI then expect we'll apply the same solution to other IPA modules.\n\n> > > +}\n> > > +\n> > >  REGISTER_IPA_ALGORITHM(Lut, \"Lut\")\n> > >  \n> > >  } /* namespace ipa::soft::algorithms */\n> > > diff --git a/src/ipa/simple/algorithms/lut.h b/src/ipa/simple/algorithms/lut.h\n> > > index 889f864b..ab4e1094 100644\n> > > --- a/src/ipa/simple/algorithms/lut.h\n> > > +++ b/src/ipa/simple/algorithms/lut.h\n> > > @@ -30,6 +30,11 @@ public:\n> > >                    const uint32_t frame,\n> > >                    IPAFrameContext &frameContext,\n> > >                    DebayerParams *params) override;\n> > > +     void process(IPAContext &context,\n> > > +                  const uint32_t frame,\n> > > +                  IPAFrameContext &frameContext,\n> > > +                  const SwIspStats *stats,\n> > > +                  ControlList &metadata) override;\n> > >  \n> > >  private:\n> > >       void updateGammaTable(IPAContext &context);","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 BB519BDC71\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 27 Jan 2025 19:14:26 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id DC7E46855D;\n\tMon, 27 Jan 2025 20:14:25 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id A2B1668549\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 27 Jan 2025 20:14:24 +0100 (CET)","from pendragon.ideasonboard.com (81-175-209-231.bb.dnainternet.fi\n\t[81.175.209.231])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id CBD6A18D;\n\tMon, 27 Jan 2025 20:13:17 +0100 (CET)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"ZAVSDL+c\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1738005198;\n\tbh=iJ65gdAzcvqfIxR+Gzjr82Oq1ZUY4jJfVkRTLwBvFeE=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=ZAVSDL+cXNOF/27bvrWBlb3iUiCFjxbWxqYS39Nr+xaxQX+EGYinr9Owi3vNHnB1n\n\t9tU5pxveIOjq3lTfpfiYyQr5NMhZj/MJ5/gWnne5AjuMEu9qr86BiIGt7mquH0x848\n\tz1exnBTS2B2WKm6M8nLUcfKWGdUiZoLRC13N+oow=","Date":"Mon, 27 Jan 2025 21:14:13 +0200","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Cc":"Milan Zamazal <mzamazal@redhat.com>, libcamera-devel@lists.libcamera.org,\n\t=?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= <pobrn@protonmail.com>","Subject":"Re: [PATCH v3 5/6] ipa: simple: Report contrast in metadata","Message-ID":"<20250127191413.GA13628@pendragon.ideasonboard.com>","References":"<20250113133405.12167-1-mzamazal@redhat.com>\n\t<20250113133405.12167-6-mzamazal@redhat.com>\n\t<20250127070935.GH17899@pendragon.ideasonboard.com>\n\t<173800305134.1773152.1127430240582071812@ping.linuxembedded.co.uk>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<173800305134.1773152.1127430240582071812@ping.linuxembedded.co.uk>","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>"}},{"id":33236,"web_url":"https://patchwork.libcamera.org/comment/33236/","msgid":"<85bjvoh94z.fsf@mzamazal-thinkpadp1gen3.tpbc.csb>","date":"2025-01-30T10:46:20","subject":"Re: [PATCH v3 5/6] ipa: simple: Report contrast in metadata","submitter":{"id":177,"url":"https://patchwork.libcamera.org/api/people/177/","name":"Milan Zamazal","email":"mzamazal@redhat.com"},"content":"Laurent Pinchart <laurent.pinchart@ideasonboard.com> writes:\n\n> On Mon, Jan 27, 2025 at 06:37:31PM +0000, Kieran Bingham wrote:\n>> Quoting Laurent Pinchart (2025-01-27 07:09:35)\n>> > On Mon, Jan 13, 2025 at 02:34:04PM +0100, Milan Zamazal wrote:\n>\n>> > > Provide the requested contrast value, if any, in the metadata to add to\n>> > > the completed requests.\n>> > > \n>> > > Signed-off-by: Milan Zamazal <mzamazal@redhat.com>\n>> > > ---\n>> > >  src/ipa/simple/algorithms/lut.cpp | 11 +++++++++++\n>> > >  src/ipa/simple/algorithms/lut.h   |  5 +++++\n>> > >  2 files changed, 16 insertions(+)\n>> > > \n>> > > diff --git a/src/ipa/simple/algorithms/lut.cpp b/src/ipa/simple/algorithms/lut.cpp\n>> > > index 0ba2391f..31208bfe 100644\n>> > > --- a/src/ipa/simple/algorithms/lut.cpp\n>> > > +++ b/src/ipa/simple/algorithms/lut.cpp\n>> > > @@ -116,6 +116,17 @@ void Lut::prepare(IPAContext &context,\n>> > >       }\n>> > >  }\n>> > >  \n>> > > +void Lut::process(IPAContext &context,\n>> > > +               [[maybe_unused]] const uint32_t frame,\n>> > > +               [[maybe_unused]] IPAFrameContext &frameContext,\n>> > > +               [[maybe_unused]] const SwIspStats *stats,\n>> > > +               ControlList &metadata)\n>> > > +{\n>> > > +     const auto contrast = context.activeState.knobs.contrast;\n>> > \n>> > Don't copy.\n>> > \n>> > > +     if (contrast)\n>> > > +             metadata.set(controls::Contrast, contrast.value());\n>> > \n>> > This will not report the right value for the frame, but given that it's\n>> > not worse than the other patches,\n>> > \n>> > Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n>> \n>> But we /have/ a frame context to store the actual contrast value applied\n>> on the frame during prepare() ... so this should be done correctly, not\n>> reading the active state, but the frameContext.\n>\n> I think it can wait until we solve the synchronization issue on rkisp1.\n> I then expect we'll apply the same solution to other IPA modules.\n\nWell, it's easy to use the frame context and have a bit less incorrect\nstuff around, I'll do it in v4.\n\n>> > > +}\n>> > > +\n>> > >  REGISTER_IPA_ALGORITHM(Lut, \"Lut\")\n>> > >  \n>> > >  } /* namespace ipa::soft::algorithms */\n>> > > diff --git a/src/ipa/simple/algorithms/lut.h b/src/ipa/simple/algorithms/lut.h\n>> > > index 889f864b..ab4e1094 100644\n>> > > --- a/src/ipa/simple/algorithms/lut.h\n>> > > +++ b/src/ipa/simple/algorithms/lut.h\n>> > > @@ -30,6 +30,11 @@ public:\n>> > >                    const uint32_t frame,\n>> > >                    IPAFrameContext &frameContext,\n>> > >                    DebayerParams *params) override;\n>> > > +     void process(IPAContext &context,\n>> > > +                  const uint32_t frame,\n>> > > +                  IPAFrameContext &frameContext,\n>> > > +                  const SwIspStats *stats,\n>> > > +                  ControlList &metadata) override;\n>> > >  \n>> > >  private:\n>> > >       void updateGammaTable(IPAContext &context);","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 84552BD808\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 30 Jan 2025 10:46:29 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 32B6468568;\n\tThu, 30 Jan 2025 11:46:29 +0100 (CET)","from us-smtp-delivery-124.mimecast.com\n\t(us-smtp-delivery-124.mimecast.com [170.10.133.124])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id A0B8D68560\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 30 Jan 2025 11:46:26 +0100 (CET)","from mail-ej1-f71.google.com (mail-ej1-f71.google.com\n\t[209.85.218.71]) by relay.mimecast.com with ESMTP with STARTTLS\n\t(version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id\n\tus-mta-544-9BAnbDJ4MrWILxkO2L79Xg-1; Thu, 30 Jan 2025 05:46:23 -0500","by mail-ej1-f71.google.com with SMTP id\n\ta640c23a62f3a-ab6efc55241so14117666b.2\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 30 Jan 2025 02:46:23 -0800 (PST)","from mzamazal-thinkpadp1gen3.tpbc.csb\n\t(ip-77-48-47-2.net.vodafone.cz. [77.48.47.2])\n\tby smtp.gmail.com with ESMTPSA id\n\ta640c23a62f3a-ab6e4a0252dsm99564766b.116.2025.01.30.02.46.21\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tThu, 30 Jan 2025 02:46:21 -0800 (PST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=redhat.com header.i=@redhat.com\n\theader.b=\"O65X8QTA\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n\ts=mimecast20190719; t=1738233985;\n\th=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n\tto:to:cc:cc:mime-version:mime-version:content-type:content-type:\n\tin-reply-to:in-reply-to:references:references;\n\tbh=Z+AY1NEUuPwJSkvZPSZ8YA/4vnFWO5ER+1ZQJh90fLU=;\n\tb=O65X8QTAL3O1fKDMjY39GL++RZx/k46mS+1DzBQRgvp22E+pyRxdXFrIeERtk80N54Reee\n\tjL2QM6eB5dTKseULzmduTZY6s4a8hTy+myhuPRvlh1/1wY6SSEk7mDZLrf0fkZFWZ669JD\n\t0DosxzXDzVFxNxxvI8SDHTE7dA199qI=","X-MC-Unique":"9BAnbDJ4MrWILxkO2L79Xg-1","X-Mimecast-MFC-AGG-ID":"9BAnbDJ4MrWILxkO2L79Xg","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1738233982; x=1738838782;\n\th=mime-version:user-agent:message-id:date:references:in-reply-to\n\t:subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date\n\t:message-id:reply-to;\n\tbh=Z+AY1NEUuPwJSkvZPSZ8YA/4vnFWO5ER+1ZQJh90fLU=;\n\tb=TIq9EPe9gw4hV0vkBtHsNyoBkNMSEy93K2zH17WepVFfMlyPwUgKZbr/rOo9aZI+Zo\n\t+KWu7wHvxAnhqtSl9JvYG05STD/OQ4P5jdYrynH34g72tVxOOPrrSPiNlIpzYc/xXOjL\n\tJu8+mmJ9ETpFoMxn2jf6+TkJDmjg9G08lQSF3h3fgXSfMn9YGUlhDQTJnW1/aghbwdvn\n\tF4HZOWNGhol68Cr4QV81JYuGXUNeF+IK05AEeiOmd8X1NAaVcPKTP/EbSh2dK/liGNMc\n\t/HXthdqYLAzw1Sc4b2TWVeWr/W6bNU/ndL8kN1pWMHoer2MW3gi+0dCNtjULWv3b4Bup\n\td8Xg==","X-Forwarded-Encrypted":"i=1;\n\tAJvYcCWwuIL+j+mBz0N3F0dpYXz+BiKUG1fhh2W8Uyhqisg6aMwpHVWFAV7FdbYwpw+U43QvPwwyq1hJIed0lCFAYfU=@lists.libcamera.org","X-Gm-Message-State":"AOJu0Yyze6VcBXJQUxT/jFo2mDVOjpBKuVi0/0EhZvljiYWh0hTueTf+\n\tnpL4vVGnQWLXHaHdYHkmhCGXtPSEBSFYyCYHOZpuZcEEb/szdwyjmK/K0zdPTbDExKsT4/4IAql\n\txmAcDTz+IwOeJw5D8/3ieXbTuOLGRQX7AzoWWirNq2yRRBGvvK5JqKel53+gGSi0QU575kQs=","X-Gm-Gg":"ASbGnctwnyrxH8329+PyRRL0K+A4keCeZNEmh4o2HRC4d9nBJvfIUuu23eWw2QhGj6W\n\tqfb+YkiRjfakib5k3IaYhYvIKZpjOvTg9CoDM+iVACGgSoaVrJLUYMyhCHHQC+8p6TkGvxGwFCy\n\t6CKYUsWIbaQSbq8FomZ2slT3PkSZW2DpWcQhK5CNFDVKqGEK2/qxOyc94RPht+DYE3NlUXU0uU1\n\tJnI/2Fls0L6xVMCIjSFj8VQpSgZICYvV/HzlFqqLUGEpvCMRa+V/T3agqoUdi5xuvsvU1RbPwXY\n\tosms94pT8h3dn81YXU+ABnA4eqK3Ru0pqS0oESpBe7uLSN2tkaknr7PD6A==","X-Received":["by 2002:a17:907:2cc5:b0:aaf:74d6:6467 with SMTP id\n\ta640c23a62f3a-ab6cfe11f0cmr711458166b.42.1738233982444; \n\tThu, 30 Jan 2025 02:46:22 -0800 (PST)","by 2002:a17:907:2cc5:b0:aaf:74d6:6467 with SMTP id\n\ta640c23a62f3a-ab6cfe11f0cmr711456166b.42.1738233982006; \n\tThu, 30 Jan 2025 02:46:22 -0800 (PST)"],"X-Google-Smtp-Source":"AGHT+IEmgbBcomFC6rQ7hIkvomPbbMHrNOugrNVrpOXzfQ9FnQeRSqxr610R0V8DaidjPUCi8ckuBQ==","From":"Milan Zamazal <mzamazal@redhat.com>","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Cc":"Kieran Bingham <kieran.bingham@ideasonboard.com>,\n\tlibcamera-devel@lists.libcamera.org, =?utf-8?b?QmFybmFiw6FzIFDFkWN6?=\n\t=?utf-8?q?e?=  <pobrn@protonmail.com>","Subject":"Re: [PATCH v3 5/6] ipa: simple: Report contrast in metadata","In-Reply-To":"<20250127191413.GA13628@pendragon.ideasonboard.com> (Laurent\n\tPinchart's message of \"Mon, 27 Jan 2025 21:14:13 +0200\")","References":"<20250113133405.12167-1-mzamazal@redhat.com>\n\t<20250113133405.12167-6-mzamazal@redhat.com>\n\t<20250127070935.GH17899@pendragon.ideasonboard.com>\n\t<173800305134.1773152.1127430240582071812@ping.linuxembedded.co.uk>\n\t<20250127191413.GA13628@pendragon.ideasonboard.com>","Date":"Thu, 30 Jan 2025 11:46:20 +0100","Message-ID":"<85bjvoh94z.fsf@mzamazal-thinkpadp1gen3.tpbc.csb>","User-Agent":"Gnus/5.13 (Gnus v5.13)","MIME-Version":"1.0","X-Mimecast-Spam-Score":"0","X-Mimecast-MFC-PROC-ID":"8HGPKfsyCUsdpDkIdjXakG7BK35Z5x9CjIBjDsq0BhU_1738233982","X-Mimecast-Originator":"redhat.com","Content-Type":"text/plain","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>"}}]