[{"id":25740,"web_url":"https://patchwork.libcamera.org/comment/25740/","msgid":"<166792814038.896787.11699969508396775750@Monstersaurus>","date":"2022-11-08T17:22:20","subject":"Re: [libcamera-devel] [PATCH v5 0/7] Raspberry Pi AGC digital gain\n\tfixes","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"Quoting Laurent Pinchart via libcamera-devel (2022-11-08 16:55:48)\n> Hi Naush,\n> \n> On Tue, Nov 08, 2022 at 09:39:05AM +0000, Naushir Patuck via libcamera-devel wrote:\n> > Hi all,\n> > \n> > Any chance we could progress this one please.  Patches 3/4/6 need a second\n> > review.\n> \n> I'm catching up on patch review after my vacation, this is on my list.\n> The list is long though :-S\n> \n> > PS: patchwork.libcamera.org seems to be a bit unhappy for a few days now.\n> > Might need a reboot!\n> > \n\nArgh ... rebooting!\n--\nKieran\n\n\n> > \n> > On Mon, 31 Oct 2022 at 11:45, Naushir Patuck <naush@raspberrypi.com> wrote:\n> > \n> > > Hi,\n> > >\n> > > In version 7:\n> > >\n> > > - For patch 2/7, the cookie must be provided in push() and reset().\n> > > Updated the\n> > > rkisp1 and ipu3 pipeline handlers to provide frame numbers for the cookie\n> > > value.\n> > > - For patch 3/4, add a test for skipped/dropped frames and cookie handling.\n> > > - Updated patch 6/7 to use the request sequence number for the context\n> > > index\n> > > instead of using a separte sequence counter.\n> > >\n> > > Thanks,\n> > > Naush\n> > >\n> > > Naushir Patuck (7):\n> > >   delayed_controls: Template the ControlRingBuffer class\n> > >   delayed_controls: Add user cookie to DelayedControls\n> > >   tests: delayed_controls: Add cookie tests\n> > >   ipa: raspberrypi: Add RPiController::Metadata::mergeCopy\n> > >   ipa: raspberrypi: Use an array of RPiController::Metadata objects\n> > >   pipeline: ipa: raspberrypi: Use IPA cookies\n> > >   ipa: raspberrypi: agc: Fix digital gain calculation for manual mode\n> > >\n> > >  include/libcamera/internal/delayed_controls.h |  21 +--\n> > >  include/libcamera/ipa/raspberrypi.mojom       |   6 +-\n> > >  src/ipa/raspberrypi/controller/metadata.h     |  10 ++\n> > >  src/ipa/raspberrypi/controller/rpi/agc.cpp    |  10 +-\n> > >  src/ipa/raspberrypi/raspberrypi.cpp           | 104 +++++++++------\n> > >  src/libcamera/delayed_controls.cpp            |  22 ++--\n> > >  src/libcamera/pipeline/ipu3/ipu3.cpp          |   9 +-\n> > >  .../pipeline/raspberrypi/raspberrypi.cpp      |  18 ++-\n> > >  src/libcamera/pipeline/rkisp1/rkisp1.cpp      |   7 +-\n> > >  test/delayed_controls.cpp                     | 121 ++++++++++++++++--\n> > >  10 files changed, 240 insertions(+), 88 deletions(-)\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 BF483BE08B\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue,  8 Nov 2022 17:22:26 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id EDFC463083;\n\tTue,  8 Nov 2022 18:22:24 +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 9402F6303D\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue,  8 Nov 2022 18:22:23 +0100 (CET)","from pendragon.ideasonboard.com\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 1F43D4DA;\n\tTue,  8 Nov 2022 18:22:23 +0100 (CET)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1667928145;\n\tbh=knFofLYZWyFf853lK8aY2U2b/GlawDia2ysDZZwiZR8=;\n\th=In-Reply-To:References:To:Date:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=UXSJV9TtGqSafXEDKMMk5JxstkAHV95JM4HMiD61BSX17dkL1Swtsnm2HlX6pY8cs\n\tJ/+gafgT1rFgPgTDJej07OroPukVigdwnGNAZ7ng1Gy0I87QALdkIavmCpFdWfxcUq\n\tyv1YKoQUoAu+f0jP6RYx65TzMJVWDuFdAROXWKGa5JACYsDNd8FzcmgEp6H38FeRW7\n\t+L3yeRlErTJ+P0PVcIi6Gsi1QXJ98+ZWbp3HuJQwBbhUBdcZQV214kf0EFwXoQiRuI\n\tYQGWgG/3Vl/PlEGC/2j5vv7mitLWhz31tckHwtxLj7FGy0ocHqUaxa+Gnlma68T62d\n\tIqWbvhIalyRqw==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1667928143;\n\tbh=knFofLYZWyFf853lK8aY2U2b/GlawDia2ysDZZwiZR8=;\n\th=In-Reply-To:References:Subject:From:Cc:To:Date:From;\n\tb=LpesRHONokiqVtkUrKF3ysLFKpKpsQ/Y3F4+Hi7YpjL69HCbE1MMxF6luNmXkFEB1\n\t3p/K9gKQeFM3PzuwNHrzl+siB6iPnZMlfLJa/dTQ1Ff6KVK0tNmRc11R+n4s223U+2\n\tjo8lCZV9bynpdZrz893/Pr4AbD3/+yjEUqqgRoKo="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"LpesRHON\"; dkim-atps=neutral","Content-Type":"text/plain; charset=\"utf-8\"","MIME-Version":"1.0","Content-Transfer-Encoding":"quoted-printable","In-Reply-To":"<Y2qKFEUvLX8ob0Of@pendragon.ideasonboard.com>","References":"<20221031114522.14215-1-naush@raspberrypi.com>\n\t<CAEmqJPq58OOF_u1FmyBcBf8ZEG53MTVK7TdubbvTds3Aoov06w@mail.gmail.com>\n\t<Y2qKFEUvLX8ob0Of@pendragon.ideasonboard.com>","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>,\n\tLaurent Pinchart via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>, \n\tNaushir Patuck <naush@raspberrypi.com>","Date":"Tue, 08 Nov 2022 17:22:20 +0000","Message-ID":"<166792814038.896787.11699969508396775750@Monstersaurus>","User-Agent":"alot/0.10","Subject":"Re: [libcamera-devel] [PATCH v5 0/7] Raspberry Pi AGC digital gain\n\tfixes","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":"Kieran Bingham via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>","Reply-To":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":25781,"web_url":"https://patchwork.libcamera.org/comment/25781/","msgid":"<CAEmqJPoi0S5JAyF+6uhQVf3JYQ3n1zagdowRqitB68RFv-yvDQ@mail.gmail.com>","date":"2022-11-14T11:31:57","subject":"Re: [libcamera-devel] [PATCH v5 0/7] Raspberry Pi AGC digital gain\n\tfixes","submitter":{"id":34,"url":"https://patchwork.libcamera.org/api/people/34/","name":"Naushir Patuck","email":"naush@raspberrypi.com"},"content":"Hi,\n\nAll patches now have their review tags in this series.  Unless there are no\nother objections, it would be great if this could be merged.\n\nRegards,\nNaush\n\n\nOn Tue, 8 Nov 2022 at 09:39, Naushir Patuck <naush@raspberrypi.com> wrote:\n\n> Hi all,\n>\n> Any chance we could progress this one please.  Patches 3/4/6 need a second\n> review.\n>\n> Many thanks,\n> Naush\n>\n> PS: patchwork.libcamera.org seems to be a bit unhappy for a few days now.\n> Might need a reboot!\n>\n>\n> On Mon, 31 Oct 2022 at 11:45, Naushir Patuck <naush@raspberrypi.com>\n> wrote:\n>\n>> Hi,\n>>\n>> In version 7:\n>>\n>> - For patch 2/7, the cookie must be provided in push() and reset().\n>> Updated the\n>> rkisp1 and ipu3 pipeline handlers to provide frame numbers for the cookie\n>> value.\n>> - For patch 3/4, add a test for skipped/dropped frames and cookie\n>> handling.\n>> - Updated patch 6/7 to use the request sequence number for the context\n>> index\n>> instead of using a separte sequence counter.\n>>\n>> Thanks,\n>> Naush\n>>\n>> Naushir Patuck (7):\n>>   delayed_controls: Template the ControlRingBuffer class\n>>   delayed_controls: Add user cookie to DelayedControls\n>>   tests: delayed_controls: Add cookie tests\n>>   ipa: raspberrypi: Add RPiController::Metadata::mergeCopy\n>>   ipa: raspberrypi: Use an array of RPiController::Metadata objects\n>>   pipeline: ipa: raspberrypi: Use IPA cookies\n>>   ipa: raspberrypi: agc: Fix digital gain calculation for manual mode\n>>\n>>  include/libcamera/internal/delayed_controls.h |  21 +--\n>>  include/libcamera/ipa/raspberrypi.mojom       |   6 +-\n>>  src/ipa/raspberrypi/controller/metadata.h     |  10 ++\n>>  src/ipa/raspberrypi/controller/rpi/agc.cpp    |  10 +-\n>>  src/ipa/raspberrypi/raspberrypi.cpp           | 104 +++++++++------\n>>  src/libcamera/delayed_controls.cpp            |  22 ++--\n>>  src/libcamera/pipeline/ipu3/ipu3.cpp          |   9 +-\n>>  .../pipeline/raspberrypi/raspberrypi.cpp      |  18 ++-\n>>  src/libcamera/pipeline/rkisp1/rkisp1.cpp      |   7 +-\n>>  test/delayed_controls.cpp                     | 121 ++++++++++++++++--\n>>  10 files changed, 240 insertions(+), 88 deletions(-)\n>>\n>> --\n>> 2.25.1\n>>\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 186AABE08B\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 14 Nov 2022 11:32:16 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 1BE7063088;\n\tMon, 14 Nov 2022 12:32:15 +0100 (CET)","from mail-qv1-xf35.google.com (mail-qv1-xf35.google.com\n\t[IPv6:2607:f8b0:4864:20::f35])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 0556A61F3B\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 14 Nov 2022 12:32:13 +0100 (CET)","by mail-qv1-xf35.google.com with SMTP id x15so7588800qvp.1\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 14 Nov 2022 03:32:12 -0800 (PST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1668425535;\n\tbh=XBcsCrKWN4JjYCf5AHf3hhrNGVqhnxC13mxJtjtAyq8=;\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:\n\tFrom;\n\tb=l8Ec7OpGvkiCMLNHlDsASHU6sjVyLPhEg5iFZwxvfgI4E0ZesYvSc6AVRHSTiXiZj\n\tzDV8FHsIrlYhKjy99YYnNg1QxiHzMeO9TipQhlrLfiAq6Oj7lRmYLIqkgIcJZCMbfl\n\tmBJFmEYdpFHRGhpfeTCk8ZDD/42HIfa64Ub6yIzXtp99BcGYav/whGvyds8fUS83WN\n\tgBFKjNZUgQT+eFx9rlEtii5lwoQN/7ExmC2lwrghGx1gFD3rhS4fXwbFqtglU4tqal\n\t0Zt9T6KHa/Uta4461PsAXwxIHGiDWIwlBZiJn6dfseX+fXy0nKDHVvklwdnXtptm95\n\tYPgGHz/Ja+mxg==","v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=raspberrypi.com; s=google;\n\th=to:subject:message-id:date:from:in-reply-to:references:mime-version\n\t:from:to:cc:subject:date:message-id:reply-to;\n\tbh=3HBX/qrqqEdhKjvlb/vt5EQLT66+0zq+tJLDFiDQkBs=;\n\tb=dBO0taKmSVvmpkGEA1p8EQFCzYrk7QzVd4jQ1P8kOnZxe4hdyireNsxEm3v1SXo/7N\n\tmcP7CNh4H9zUAZvCQzDOskNf0RgIoi3j6nnQgcDzZ5sMA5wyKyn6GNoN78BCebhDTBKP\n\tgMsYXzyUwRhDLKUPeYJV7DXjePo/Pg3JfOUveomnCdghzxSO7/w8WT8nsjpPG2bd/7/a\n\tdRlJBXXMQOG2dt7+potjfuK5XPr65sLNBsdBlKd9UFL7CXYXQ1ipBrBG70W1Z++8eg2H\n\t0kGvoiE/KGzVsGFwYJg7ZBBcEUvdlseV4JU211zE6MpgaULQa0PT+nGZbKed27VqcBSJ\n\tQFIA=="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (2048-bit key; \n\tunprotected) header.d=raspberrypi.com\n\theader.i=@raspberrypi.com\n\theader.b=\"dBO0taKm\"; dkim-atps=neutral","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20210112;\n\th=to:subject:message-id:date:from:in-reply-to:references:mime-version\n\t:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to;\n\tbh=3HBX/qrqqEdhKjvlb/vt5EQLT66+0zq+tJLDFiDQkBs=;\n\tb=XBonpEOz9ULZ7uk2pk1e/phBTn3vjdPcdIZxVaVy57qNj/ppgQWR/qAoKZ3TcbLzy7\n\t+7E7USBZvSWJw+YPMHWG3NQuOU5v8V+9im6OZOT1746k0lIygSC0D/9qRWUh2KVPa2cN\n\tKoDMvZrCxapHvkoeDVstywlBaaOmslKDo7tHyDjwEGGGDh2PS1F22LzDvzdYHY8DkBuW\n\tFmoXak6hyt9wl10eXWXm3LVllSbNHNShTY9LKyWa/027ybd8Hva73WuRJd+l7df/sD4q\n\tl3vk47pDqScs172B2d2zMmtJPgNw4GTGxAKKeZwwL4ftUZ2yg02CK2fV8J4NGtWY7ZBr\n\tG2kA==","X-Gm-Message-State":"ANoB5pkOy6TuTeGsl6zy3SxhNFXp5DyzVzfnCZ8Ovdf/i1wyFeN/hhPJ\n\tcsSUTt2fHBAGCIo2uDT2k6ag09m2ExNay+/gTs+ddRw1lIc=","X-Google-Smtp-Source":"AA0mqf6qPhVzGqVJX8xOYAOguvtqaP9jix9N4a3shphb7wUB+V4SOi09XY5JaFBrdXggU4uTAk8LaunzraX+Vh6LWog=","X-Received":"by 2002:a05:6214:4243:b0:49c:699b:d5cf with SMTP id\n\tne3-20020a056214424300b0049c699bd5cfmr11825869qvb.126.1668425531547;\n\tMon, 14 Nov 2022 03:32:11 -0800 (PST)","MIME-Version":"1.0","References":"<20221031114522.14215-1-naush@raspberrypi.com>\n\t<CAEmqJPq58OOF_u1FmyBcBf8ZEG53MTVK7TdubbvTds3Aoov06w@mail.gmail.com>","In-Reply-To":"<CAEmqJPq58OOF_u1FmyBcBf8ZEG53MTVK7TdubbvTds3Aoov06w@mail.gmail.com>","Date":"Mon, 14 Nov 2022 11:31:57 +0000","Message-ID":"<CAEmqJPoi0S5JAyF+6uhQVf3JYQ3n1zagdowRqitB68RFv-yvDQ@mail.gmail.com>","To":"libcamera-devel@lists.libcamera.org","Content-Type":"multipart/alternative; boundary=\"0000000000002475a505ed6c9706\"","Subject":"Re: [libcamera-devel] [PATCH v5 0/7] Raspberry Pi AGC digital gain\n\tfixes","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>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":25784,"web_url":"https://patchwork.libcamera.org/comment/25784/","msgid":"<Y3JKIBGIGpXrXJQ2@pendragon.ideasonboard.com>","date":"2022-11-14T14:01:04","subject":"Re: [libcamera-devel] [PATCH v5 0/7] Raspberry Pi AGC digital gain\n\tfixes","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Naush,\n\nOn Mon, Nov 14, 2022 at 11:31:57AM +0000, Naushir Patuck via libcamera-devel wrote:\n> Hi,\n> \n> All patches now have their review tags in this series.  Unless there are no\n> other objections, it would be great if this could be merged.\n\nI still very much dislike the cookie in the delayed controls class. All\nother platforms are moving or will move to a frame context queue in the\nIPA module.\n\nIf you want to go this way, I'll likely fork the DelayedControls class,\nand move your implementation to the RPi pipeline handler. This will\nlikely mean a long term divergence in behaviour between Raspberry Pi and\nother platforms, which I don't think is a good idea.\n\n> On Tue, 8 Nov 2022 at 09:39, Naushir Patuck wrote:\n> \n> > Hi all,\n> >\n> > Any chance we could progress this one please.  Patches 3/4/6 need a second\n> > review.\n> >\n> > Many thanks,\n> > Naush\n> >\n> > PS: patchwork.libcamera.org seems to be a bit unhappy for a few days now.\n> > Might need a reboot!\n> >\n> >\n> > On Mon, 31 Oct 2022 at 11:45, Naushir Patuck <naush@raspberrypi.com>\n> > wrote:\n> >\n> >> Hi,\n> >>\n> >> In version 7:\n> >>\n> >> - For patch 2/7, the cookie must be provided in push() and reset(). Updated the\n> >> rkisp1 and ipu3 pipeline handlers to provide frame numbers for the cookie value.\n> >> - For patch 3/4, add a test for skipped/dropped frames and cookie handling.\n> >> - Updated patch 6/7 to use the request sequence number for the context index\n> >> instead of using a separte sequence counter.\n> >>\n> >> Thanks,\n> >> Naush\n> >>\n> >> Naushir Patuck (7):\n> >>   delayed_controls: Template the ControlRingBuffer class\n> >>   delayed_controls: Add user cookie to DelayedControls\n> >>   tests: delayed_controls: Add cookie tests\n> >>   ipa: raspberrypi: Add RPiController::Metadata::mergeCopy\n> >>   ipa: raspberrypi: Use an array of RPiController::Metadata objects\n> >>   pipeline: ipa: raspberrypi: Use IPA cookies\n> >>   ipa: raspberrypi: agc: Fix digital gain calculation for manual mode\n> >>\n> >>  include/libcamera/internal/delayed_controls.h |  21 +--\n> >>  include/libcamera/ipa/raspberrypi.mojom       |   6 +-\n> >>  src/ipa/raspberrypi/controller/metadata.h     |  10 ++\n> >>  src/ipa/raspberrypi/controller/rpi/agc.cpp    |  10 +-\n> >>  src/ipa/raspberrypi/raspberrypi.cpp           | 104 +++++++++------\n> >>  src/libcamera/delayed_controls.cpp            |  22 ++--\n> >>  src/libcamera/pipeline/ipu3/ipu3.cpp          |   9 +-\n> >>  .../pipeline/raspberrypi/raspberrypi.cpp      |  18 ++-\n> >>  src/libcamera/pipeline/rkisp1/rkisp1.cpp      |   7 +-\n> >>  test/delayed_controls.cpp                     | 121 ++++++++++++++++--\n> >>  10 files changed, 240 insertions(+), 88 deletions(-)","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 BA51FBE08B\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 14 Nov 2022 14:01:28 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 0980C63088;\n\tMon, 14 Nov 2022 15:01:28 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id B0ECD61F3B\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 14 Nov 2022 15:01:26 +0100 (CET)","from pendragon.ideasonboard.com (85-76-14-120-nat.elisa-mobile.fi\n\t[85.76.14.120])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 24DC1891;\n\tMon, 14 Nov 2022 15:01:23 +0100 (CET)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1668434488;\n\tbh=HfLeCIwW1Jfau6oQBxCZ58BfE1ssvaTfGEDd0pJ0kDY=;\n\th=Date:To:References:In-Reply-To:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=ve4/xC8miN/p46oJnVpNHGzd/3Z1qAFcxuMVPj4mPPrmrt7hsS0o5sgzoRWFvOuXh\n\tBBvc/8ZYT+GfA7XqrJMYVv3G8ZE3ueRlZYbN84hFDkWjRJoR1f5h0EyUQp1KPw42ZY\n\tpzhRuHF2KayyNVnSLPcQnoWnUrGrRp5hTOTZeQMGJ358BKlhMP3FyDju8hfD9a+9dl\n\t4/YryiOKm4lEVsolZqMYmlD2p0cPU/ZYCFDvY3HgnK7NzV8QcD3ydC6JAk8QcDmloq\n\tYCWA5WMiTb7TS3pcaI1Di5IzzkscUu6nDT/ejOg2RGSMjaen8/bsi5pOajW56z/KK6\n\tWKfBnyz+zDPCw==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1668434486;\n\tbh=HfLeCIwW1Jfau6oQBxCZ58BfE1ssvaTfGEDd0pJ0kDY=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=vm+x7lQM7YJllhWmyTnaljO2gJ+Rl42IOO7yxFFLg/S1StH+vc2S7FtGxg1ZuMjP5\n\tETj6AjFMqVdVCbruXSPO/HbgKa/jkLRQffMYzMBagILaiBao0YupUa+9BcVR9BWIPL\n\tbUJG/Oi6T8aWDlsGUXZMyKhGqHQoOPJdc9CpBmao="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"vm+x7lQM\"; dkim-atps=neutral","Date":"Mon, 14 Nov 2022 16:01:04 +0200","To":"Naushir Patuck <naush@raspberrypi.com>","Message-ID":"<Y3JKIBGIGpXrXJQ2@pendragon.ideasonboard.com>","References":"<20221031114522.14215-1-naush@raspberrypi.com>\n\t<CAEmqJPq58OOF_u1FmyBcBf8ZEG53MTVK7TdubbvTds3Aoov06w@mail.gmail.com>\n\t<CAEmqJPoi0S5JAyF+6uhQVf3JYQ3n1zagdowRqitB68RFv-yvDQ@mail.gmail.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<CAEmqJPoi0S5JAyF+6uhQVf3JYQ3n1zagdowRqitB68RFv-yvDQ@mail.gmail.com>","Subject":"Re: [libcamera-devel] [PATCH v5 0/7] Raspberry Pi AGC digital gain\n\tfixes","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":"Laurent Pinchart via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>","Reply-To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":25785,"web_url":"https://patchwork.libcamera.org/comment/25785/","msgid":"<CAEmqJPrUmM4G1J5+UpQhMa_DPbsrQV04EUqOK1EU+tXcFJ-TkA@mail.gmail.com>","date":"2022-11-14T14:17:04","subject":"Re: [libcamera-devel] [PATCH v5 0/7] Raspberry Pi AGC digital gain\n\tfixes","submitter":{"id":34,"url":"https://patchwork.libcamera.org/api/people/34/","name":"Naushir Patuck","email":"naush@raspberrypi.com"},"content":"Hi Laurent,\n\n\nOn Mon, 14 Nov 2022 at 14:01, Laurent Pinchart <\nlaurent.pinchart@ideasonboard.com> wrote:\n\n> Hi Naush,\n>\n> On Mon, Nov 14, 2022 at 11:31:57AM +0000, Naushir Patuck via\n> libcamera-devel wrote:\n> > Hi,\n> >\n> > All patches now have their review tags in this series.  Unless there are\n> no\n> > other objections, it would be great if this could be merged.\n>\n> I still very much dislike the cookie in the delayed controls class. All\n> other platforms are moving or will move to a frame context queue in the\n> IPA module.\n>\n> If you want to go this way, I'll likely fork the DelayedControls class,\n> and move your implementation to the RPi pipeline handler. This will\n> likely mean a long term divergence in behaviour between Raspberry Pi and\n> other platforms, which I don't think is a good idea.\n>\n\nI don't think we are ready to make the jump to frame context queues just\nyet,\nthere is just way too much code to refactor.\n\nI'll rework this series to fork DelayedControls in RPi namespace with the\ncookie\nchange, and we can consider what to do longer-term.\n\nRegards,\nNaush\n\n\n\n>\n> > On Tue, 8 Nov 2022 at 09:39, Naushir Patuck wrote:\n> >\n> > > Hi all,\n> > >\n> > > Any chance we could progress this one please.  Patches 3/4/6 need a\n> second\n> > > review.\n> > >\n> > > Many thanks,\n> > > Naush\n> > >\n> > > PS: patchwork.libcamera.org seems to be a bit unhappy for a few days\n> now.\n> > > Might need a reboot!\n> > >\n> > >\n> > > On Mon, 31 Oct 2022 at 11:45, Naushir Patuck <naush@raspberrypi.com>\n> > > wrote:\n> > >\n> > >> Hi,\n> > >>\n> > >> In version 7:\n> > >>\n> > >> - For patch 2/7, the cookie must be provided in push() and reset().\n> Updated the\n> > >> rkisp1 and ipu3 pipeline handlers to provide frame numbers for the\n> cookie value.\n> > >> - For patch 3/4, add a test for skipped/dropped frames and cookie\n> handling.\n> > >> - Updated patch 6/7 to use the request sequence number for the\n> context index\n> > >> instead of using a separte sequence counter.\n> > >>\n> > >> Thanks,\n> > >> Naush\n> > >>\n> > >> Naushir Patuck (7):\n> > >>   delayed_controls: Template the ControlRingBuffer class\n> > >>   delayed_controls: Add user cookie to DelayedControls\n> > >>   tests: delayed_controls: Add cookie tests\n> > >>   ipa: raspberrypi: Add RPiController::Metadata::mergeCopy\n> > >>   ipa: raspberrypi: Use an array of RPiController::Metadata objects\n> > >>   pipeline: ipa: raspberrypi: Use IPA cookies\n> > >>   ipa: raspberrypi: agc: Fix digital gain calculation for manual mode\n> > >>\n> > >>  include/libcamera/internal/delayed_controls.h |  21 +--\n> > >>  include/libcamera/ipa/raspberrypi.mojom       |   6 +-\n> > >>  src/ipa/raspberrypi/controller/metadata.h     |  10 ++\n> > >>  src/ipa/raspberrypi/controller/rpi/agc.cpp    |  10 +-\n> > >>  src/ipa/raspberrypi/raspberrypi.cpp           | 104 +++++++++------\n> > >>  src/libcamera/delayed_controls.cpp            |  22 ++--\n> > >>  src/libcamera/pipeline/ipu3/ipu3.cpp          |   9 +-\n> > >>  .../pipeline/raspberrypi/raspberrypi.cpp      |  18 ++-\n> > >>  src/libcamera/pipeline/rkisp1/rkisp1.cpp      |   7 +-\n> > >>  test/delayed_controls.cpp                     | 121\n> ++++++++++++++++--\n> > >>  10 files changed, 240 insertions(+), 88 deletions(-)\n>\n> --\n> Regards,\n>\n> Laurent Pinchart\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 A83ABBD16B\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 14 Nov 2022 14:17:22 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 09B216307F;\n\tMon, 14 Nov 2022 15:17:22 +0100 (CET)","from mail-qv1-xf29.google.com (mail-qv1-xf29.google.com\n\t[IPv6:2607:f8b0:4864:20::f29])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 1956C61F3B\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 14 Nov 2022 15:17:19 +0100 (CET)","by mail-qv1-xf29.google.com with SMTP id mi9so7806043qvb.8\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 14 Nov 2022 06:17:19 -0800 (PST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1668435442;\n\tbh=1eUPLmqKOPMRg0VB+LgOlNuZxQGelyeFHr/u3nT5Rjk=;\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=UG1P37gotTFVDLTe/mDDmSzYcXsxXBg2yTv8u8B1nA+WNdPV8hqE9f5Ybhlvk+CyA\n\trx5FJpZKJvGVzYwVeaahvHUbn+D70NUxFJYcJroGY3PGvVjU0aueSJZzloF0WxfcyK\n\tn93fkNBMNHtoN6pTzBP7o6CZT9yaygwTpgbsNLoFC8ey3P6e9I2n3U6SpDSaCfWxMr\n\tGVpGT1lA+J9v7ZaM435RURimqMvV8X9JhdSPdefZ7z0slnQaRpiPAeFxR6p7P28qAn\n\t4IicdfkyFpLBSdwUROd/aZVZ0StUVzvp/6FFlpSRU0wwSaqu9dj9tIyVheGQf7DFDZ\n\t8OhBwGNtKR5qw==","v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=raspberrypi.com; s=google;\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=YK3nVZ/3E+GQulySd0JryEYhPdlsZWDCBFx/8oZ0QJA=;\n\tb=H38w2+MWk29S7rhbN9/TtNRBliSrhoGkizDvb3mXgBx3XS4UCVuZ17Z+wMaUQlh05x\n\tvreuNZo6EEQN5BiVyTB5+3E9HUBWpB121yBS6ugyhj6H2mwsfXZJgDF1tpL7AN/MjRAi\n\t51baUgsxIlwxyer7W6kf0j7Tq5YdwZvLWnKaybbRejIgyxVodaylBTQMl2QCN7EOW5VJ\n\ts9z4J2mgIFSBvCqjxU92m6kaDgKc2NfMnv9ScZVIgdyPuT4qVSxKfDQ4tY6cABC4nh4r\n\t3hYfbb4TDHpPDJL2WXdnsuyNDQSwbAmAY5Z9cQR+AdJunoF+7BpEcqsR47EfM62V8/ww\n\tKSGw=="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (2048-bit key; \n\tunprotected) header.d=raspberrypi.com\n\theader.i=@raspberrypi.com\n\theader.b=\"H38w2+MW\"; dkim-atps=neutral","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20210112;\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=YK3nVZ/3E+GQulySd0JryEYhPdlsZWDCBFx/8oZ0QJA=;\n\tb=ypMQxEIHbaHehd6dXQVyUI/LNt+aH70+5hoK2YioXnqCt6OeDnkQK7mG/T+t0wQHc4\n\t8Ul4/1VvUgZS1krVFk3Dj2s5Hk+cLTuNveuBg04LH/h7WBeS4Y8LbnRzeJydxmG7rDoE\n\t1ODUbnjDn+j46xZp4Cw2DcLSi7oXpZvORoLAL+BapYlKuQfKYQ+UxkImFlOEdmba4SsD\n\tZ/D6J/ZyWHR2e4Z1pJTUq86ki3+pduEVuQYY7PeByMOiKIQwkha5QfwyJcvZ3dpqJ1N9\n\tzCuLVlv8GrbhB6j3LVe8yiLfio3oFKBypY+nWPT3WgA8atCmfBxMQXTuQd8+O/TQoXFI\n\thWyA==","X-Gm-Message-State":"ANoB5pnyy1Ys3r5ljVygNHQd77LI9SR3iZoGM+1ZqvFuG/IQJaxKXuz0\n\tDQOmJe3AnX4i7ukOPzYe7+osAqTXY73cUC59UbAcxC9FEow=","X-Google-Smtp-Source":"AA0mqf4+TPsIr0n4KftqVt5aG7UfN9IfOsAqHpEn5Rb5XkAwYnY1mXBcFYihbaKk/4zRPVcsITr1iu95DAYX0MR7JxY=","X-Received":"by 2002:a05:6214:4243:b0:49c:699b:d5cf with SMTP id\n\tne3-20020a056214424300b0049c699bd5cfmr12431932qvb.126.1668435438818;\n\tMon, 14 Nov 2022 06:17:18 -0800 (PST)","MIME-Version":"1.0","References":"<20221031114522.14215-1-naush@raspberrypi.com>\n\t<CAEmqJPq58OOF_u1FmyBcBf8ZEG53MTVK7TdubbvTds3Aoov06w@mail.gmail.com>\n\t<CAEmqJPoi0S5JAyF+6uhQVf3JYQ3n1zagdowRqitB68RFv-yvDQ@mail.gmail.com>\n\t<Y3JKIBGIGpXrXJQ2@pendragon.ideasonboard.com>","In-Reply-To":"<Y3JKIBGIGpXrXJQ2@pendragon.ideasonboard.com>","Date":"Mon, 14 Nov 2022 14:17:04 +0000","Message-ID":"<CAEmqJPrUmM4G1J5+UpQhMa_DPbsrQV04EUqOK1EU+tXcFJ-TkA@mail.gmail.com>","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Content-Type":"multipart/alternative; boundary=\"000000000000a96c7205ed6ee585\"","Subject":"Re: [libcamera-devel] [PATCH v5 0/7] Raspberry Pi AGC digital gain\n\tfixes","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>"}},{"id":25786,"web_url":"https://patchwork.libcamera.org/comment/25786/","msgid":"<Y3JUcRkVZLQEuUNP@pendragon.ideasonboard.com>","date":"2022-11-14T14:45:05","subject":"Re: [libcamera-devel] [PATCH v5 0/7] Raspberry Pi AGC digital gain\n\tfixes","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Naush,\n\nOn Mon, Nov 14, 2022 at 02:17:04PM +0000, Naushir Patuck wrote:\n> On Mon, 14 Nov 2022 at 14:01, Laurent Pinchart wrote:\n> > On Mon, Nov 14, 2022 at 11:31:57AM +0000, Naushir Patuck via\n> > libcamera-devel wrote:\n> > > Hi,\n> > >\n> > > All patches now have their review tags in this series.  Unless there are no\n> > > other objections, it would be great if this could be merged.\n> >\n> > I still very much dislike the cookie in the delayed controls class. All\n> > other platforms are moving or will move to a frame context queue in the\n> > IPA module.\n> >\n> > If you want to go this way, I'll likely fork the DelayedControls class,\n> > and move your implementation to the RPi pipeline handler. This will\n> > likely mean a long term divergence in behaviour between Raspberry Pi and\n> > other platforms, which I don't think is a good idea.\n> \n> I don't think we are ready to make the jump to frame context queues just yet,\n> there is just way too much code to refactor.\n> \n> I'll rework this series to fork DelayedControls in RPi namespace with the cookie\n> change, and we can consider what to do longer-term.\n\nNo no, I'm sorry if I didn't express my concern correctly, you don't\nhave to fork it. I wanted to inform you I may fork it on top.\n\nWhat concerns me more than code forks is divergences in behaviour. This\nof course only makes sense once the PFC behaviour will be well-defined,\nand I don't want to block this fix until PFC is complete. I however\ndon't really see why your digital gain needs can't be handled with a\nqueue of frame contexts on the IPA side.\n\n> > > On Tue, 8 Nov 2022 at 09:39, Naushir Patuck wrote:\n> > >\n> > > > Hi all,\n> > > >\n> > > > Any chance we could progress this one please.  Patches 3/4/6 need a second\n> > > > review.\n> > > >\n> > > > Many thanks,\n> > > > Naush\n> > > >\n> > > > PS: patchwork.libcamera.org seems to be a bit unhappy for a few days\n> > now.\n> > > > Might need a reboot!\n> > > >\n> > > >\n> > > > On Mon, 31 Oct 2022 at 11:45, Naushir Patuck <naush@raspberrypi.com>\n> > > > wrote:\n> > > >\n> > > >> Hi,\n> > > >>\n> > > >> In version 7:\n> > > >>\n> > > >> - For patch 2/7, the cookie must be provided in push() and reset().\n> > Updated the\n> > > >> rkisp1 and ipu3 pipeline handlers to provide frame numbers for the\n> > cookie value.\n> > > >> - For patch 3/4, add a test for skipped/dropped frames and cookie\n> > handling.\n> > > >> - Updated patch 6/7 to use the request sequence number for the\n> > context index\n> > > >> instead of using a separte sequence counter.\n> > > >>\n> > > >> Thanks,\n> > > >> Naush\n> > > >>\n> > > >> Naushir Patuck (7):\n> > > >>   delayed_controls: Template the ControlRingBuffer class\n> > > >>   delayed_controls: Add user cookie to DelayedControls\n> > > >>   tests: delayed_controls: Add cookie tests\n> > > >>   ipa: raspberrypi: Add RPiController::Metadata::mergeCopy\n> > > >>   ipa: raspberrypi: Use an array of RPiController::Metadata objects\n> > > >>   pipeline: ipa: raspberrypi: Use IPA cookies\n> > > >>   ipa: raspberrypi: agc: Fix digital gain calculation for manual mode\n> > > >>\n> > > >>  include/libcamera/internal/delayed_controls.h |  21 +--\n> > > >>  include/libcamera/ipa/raspberrypi.mojom       |   6 +-\n> > > >>  src/ipa/raspberrypi/controller/metadata.h     |  10 ++\n> > > >>  src/ipa/raspberrypi/controller/rpi/agc.cpp    |  10 +-\n> > > >>  src/ipa/raspberrypi/raspberrypi.cpp           | 104 +++++++++------\n> > > >>  src/libcamera/delayed_controls.cpp            |  22 ++--\n> > > >>  src/libcamera/pipeline/ipu3/ipu3.cpp          |   9 +-\n> > > >>  .../pipeline/raspberrypi/raspberrypi.cpp      |  18 ++-\n> > > >>  src/libcamera/pipeline/rkisp1/rkisp1.cpp      |   7 +-\n> > > >>  test/delayed_controls.cpp                     | 121\n> > ++++++++++++++++--\n> > > >>  10 files changed, 240 insertions(+), 88 deletions(-)","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 3FFA0BD16B\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 14 Nov 2022 14:45:27 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 93E3163088;\n\tMon, 14 Nov 2022 15:45:26 +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 B2D1761F3B\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 14 Nov 2022 15:45:25 +0100 (CET)","from pendragon.ideasonboard.com (unknown [46.183.103.8])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 9994C891;\n\tMon, 14 Nov 2022 15:45:23 +0100 (CET)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1668437126;\n\tbh=CG5nGbHpwIRNNaW9cMOCG/Zx8VZc0MV1HKIC8Os4trQ=;\n\th=Date:To:References:In-Reply-To:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=RbRubOfnv/epaQAv8G+yLD7Qd60Kvx5B1mJZcDkgZQYiQX2QO1gU6RqH9fFV6cLTM\n\t1kM+jsMDzUa0wfFfdIMnNRE7JsRjcfg9ZEp4lKaqYS3fuXtWSr+23UwqiQMIvtd8ba\n\tlTxickuj4URTctNjuwTyYLHc58/uA78EoYwDJiAAw0Q5qrP0qt8I+/bMWt30tOKVYX\n\tzeKfG3nJPSgnpUdLsLP2G3EgjcgmrCv1+II0NAiOEu1fPvE6DihtDl75X97ptykjn7\n\t/HMkltHpxkuItzuxc6kLE5sD95FIklJdbTJTeJuUinCptd9c+EPrW9nljcS4Sk9MZI\n\tiTR/oERuWD9sA==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1668437125;\n\tbh=CG5nGbHpwIRNNaW9cMOCG/Zx8VZc0MV1HKIC8Os4trQ=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=JPeXRi6nvxIyEHLjad1py35014uSqIds8JkMnFSmoi1iIUQqOdPQAbysK7L3siKOw\n\tfz/WcVqR8FS6/xCDHyiBH4hhlrAo0kv9frkLy0q9ZxEInqOzr+gcluxffMmhjqsI+s\n\tsF9TmQgVyInOj5+ZkUzjuXg4xUNn85t1YJz1XQno="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"JPeXRi6n\"; dkim-atps=neutral","Date":"Mon, 14 Nov 2022 16:45:05 +0200","To":"Naushir Patuck <naush@raspberrypi.com>","Message-ID":"<Y3JUcRkVZLQEuUNP@pendragon.ideasonboard.com>","References":"<20221031114522.14215-1-naush@raspberrypi.com>\n\t<CAEmqJPq58OOF_u1FmyBcBf8ZEG53MTVK7TdubbvTds3Aoov06w@mail.gmail.com>\n\t<CAEmqJPoi0S5JAyF+6uhQVf3JYQ3n1zagdowRqitB68RFv-yvDQ@mail.gmail.com>\n\t<Y3JKIBGIGpXrXJQ2@pendragon.ideasonboard.com>\n\t<CAEmqJPrUmM4G1J5+UpQhMa_DPbsrQV04EUqOK1EU+tXcFJ-TkA@mail.gmail.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<CAEmqJPrUmM4G1J5+UpQhMa_DPbsrQV04EUqOK1EU+tXcFJ-TkA@mail.gmail.com>","Subject":"Re: [libcamera-devel] [PATCH v5 0/7] Raspberry Pi AGC digital gain\n\tfixes","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":"Laurent Pinchart via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>","Reply-To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":25787,"web_url":"https://patchwork.libcamera.org/comment/25787/","msgid":"<CAEmqJPqzUkd_zLDrkF5ivPvY9fqXE7GStJ7-d47cRGQKYyLAaw@mail.gmail.com>","date":"2022-11-14T15:05:48","subject":"Re: [libcamera-devel] [PATCH v5 0/7] Raspberry Pi AGC digital gain\n\tfixes","submitter":{"id":34,"url":"https://patchwork.libcamera.org/api/people/34/","name":"Naushir Patuck","email":"naush@raspberrypi.com"},"content":"Hi Laurent,\n\nOn Mon, 14 Nov 2022 at 14:45, Laurent Pinchart <\nlaurent.pinchart@ideasonboard.com> wrote:\n\n> Hi Naush,\n>\n> On Mon, Nov 14, 2022 at 02:17:04PM +0000, Naushir Patuck wrote:\n> > On Mon, 14 Nov 2022 at 14:01, Laurent Pinchart wrote:\n> > > On Mon, Nov 14, 2022 at 11:31:57AM +0000, Naushir Patuck via\n> > > libcamera-devel wrote:\n> > > > Hi,\n> > > >\n> > > > All patches now have their review tags in this series.  Unless there\n> are no\n> > > > other objections, it would be great if this could be merged.\n> > >\n> > > I still very much dislike the cookie in the delayed controls class. All\n> > > other platforms are moving or will move to a frame context queue in the\n> > > IPA module.\n> > >\n> > > If you want to go this way, I'll likely fork the DelayedControls class,\n> > > and move your implementation to the RPi pipeline handler. This will\n> > > likely mean a long term divergence in behaviour between Raspberry Pi\n> and\n> > > other platforms, which I don't think is a good idea.\n> >\n> > I don't think we are ready to make the jump to frame context queues just\n> yet,\n> > there is just way too much code to refactor.\n> >\n> > I'll rework this series to fork DelayedControls in RPi namespace with\n> the cookie\n> > change, and we can consider what to do longer-term.\n>\n> No no, I'm sorry if I didn't express my concern correctly, you don't\n> have to fork it. I wanted to inform you I may fork it on top.\n>\n\nI'm happy to do the fork as part of this series - it's not much extra work\nreally, and will keep the cookie API change out of the core implementation.\n\n\n> What concerns me more than code forks is divergences in behaviour. This\n> of course only makes sense once the PFC behaviour will be well-defined,\n> and I don't want to block this fix until PFC is complete. I however\n> don't really see why your digital gain needs can't be handled with a\n> queue of frame contexts on the IPA side.\n>\n\nI did originally look at the FC queue behavior to see if it could be used to\nsolve our digital gain bug, but could not directly use it.  This fix relies\non\nproviding the AGC with the state when it sent the shutter/gain changes, i.e.\naccounting for the maximum sensor delay + any frame dropping handling.  I\ndidn't\nsee any handling of this type in the FC queue - of course, none of the users\nof the class actually needed this functionality so no surprise. Hope that\nmakes\nsense?\n\nRegards,\nNaush\n\n\n>\n> > > > On Tue, 8 Nov 2022 at 09:39, Naushir Patuck wrote:\n> > > >\n> > > > > Hi all,\n> > > > >\n> > > > > Any chance we could progress this one please.  Patches 3/4/6 need\n> a second\n> > > > > review.\n> > > > >\n> > > > > Many thanks,\n> > > > > Naush\n> > > > >\n> > > > > PS: patchwork.libcamera.org seems to be a bit unhappy for a few\n> days\n> > > now.\n> > > > > Might need a reboot!\n> > > > >\n> > > > >\n> > > > > On Mon, 31 Oct 2022 at 11:45, Naushir Patuck <\n> naush@raspberrypi.com>\n> > > > > wrote:\n> > > > >\n> > > > >> Hi,\n> > > > >>\n> > > > >> In version 7:\n> > > > >>\n> > > > >> - For patch 2/7, the cookie must be provided in push() and\n> reset().\n> > > Updated the\n> > > > >> rkisp1 and ipu3 pipeline handlers to provide frame numbers for the\n> > > cookie value.\n> > > > >> - For patch 3/4, add a test for skipped/dropped frames and cookie\n> > > handling.\n> > > > >> - Updated patch 6/7 to use the request sequence number for the\n> > > context index\n> > > > >> instead of using a separte sequence counter.\n> > > > >>\n> > > > >> Thanks,\n> > > > >> Naush\n> > > > >>\n> > > > >> Naushir Patuck (7):\n> > > > >>   delayed_controls: Template the ControlRingBuffer class\n> > > > >>   delayed_controls: Add user cookie to DelayedControls\n> > > > >>   tests: delayed_controls: Add cookie tests\n> > > > >>   ipa: raspberrypi: Add RPiController::Metadata::mergeCopy\n> > > > >>   ipa: raspberrypi: Use an array of RPiController::Metadata\n> objects\n> > > > >>   pipeline: ipa: raspberrypi: Use IPA cookies\n> > > > >>   ipa: raspberrypi: agc: Fix digital gain calculation for manual\n> mode\n> > > > >>\n> > > > >>  include/libcamera/internal/delayed_controls.h |  21 +--\n> > > > >>  include/libcamera/ipa/raspberrypi.mojom       |   6 +-\n> > > > >>  src/ipa/raspberrypi/controller/metadata.h     |  10 ++\n> > > > >>  src/ipa/raspberrypi/controller/rpi/agc.cpp    |  10 +-\n> > > > >>  src/ipa/raspberrypi/raspberrypi.cpp           | 104\n> +++++++++------\n> > > > >>  src/libcamera/delayed_controls.cpp            |  22 ++--\n> > > > >>  src/libcamera/pipeline/ipu3/ipu3.cpp          |   9 +-\n> > > > >>  .../pipeline/raspberrypi/raspberrypi.cpp      |  18 ++-\n> > > > >>  src/libcamera/pipeline/rkisp1/rkisp1.cpp      |   7 +-\n> > > > >>  test/delayed_controls.cpp                     | 121\n> > > ++++++++++++++++--\n> > > > >>  10 files changed, 240 insertions(+), 88 deletions(-)\n>\n> --\n> Regards,\n>\n> Laurent Pinchart\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 6FC88BE08B\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 14 Nov 2022 15:06:06 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id B4A2963088;\n\tMon, 14 Nov 2022 16:06:05 +0100 (CET)","from mail-qt1-x829.google.com (mail-qt1-x829.google.com\n\t[IPv6:2607:f8b0:4864:20::829])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 4348961F3B\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 14 Nov 2022 16:06:04 +0100 (CET)","by mail-qt1-x829.google.com with SMTP id l2so6886394qtq.11\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 14 Nov 2022 07:06:04 -0800 (PST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1668438365;\n\tbh=BkAd74lZgkB8nr/IDM53R0RfncEWWG2N2cEHTxPIV0k=;\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=zX48bnnod9CrdXsLhU4oVU80W6SuG0LwpG5jiFVLCAMhcZ2EYpY3Ww+OfGjARIob/\n\t+CwxEnv54pjnMhKI2DI2RFGvXaaqNfK7RVabIbXGwGbIdHeUBSr7flt2xEoGwtPzAC\n\tRWI8DqD+ER6Nb0GlyROGNgLPXmrqBFMIL2K/YqeNjeze0uadCf0/HaodwDUln9e56L\n\tHxIsPfbTi7IOkZh1B78BMoTpOsp+HU2/abbUOFN6lrG0oEQE0geyvSy+yiF3+Tpmfo\n\ty6++eLKmqy1p49t5bLwcDnSZeqAM5w+NOEN8JlsDexKHX2/Auo9QAdYbO1naFO3K1m\n\tM3YfKgtqU+T6Q==","v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=raspberrypi.com; s=google;\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=wB0BFoZHETpJ1713n0PGWT20SfTTTE75BLhyi4A3+Ec=;\n\tb=LUaEyiIASPgk77X0lC3NUIlU4XJdi3AGCEH1id0hfkC2FiD/ZTnaRPkCjGLNhyF2f/\n\tpP3qguDVITEmLRQSTDdI1fnhp7nDdqiGCMQdV+KAdoV8MTHtN5RycKDnBLoGOKRQ0nyn\n\tRC0ktPbjhbK+WZxHeiMRc6XtKlwOljBteqcoTEKDDCkClJrawkl+V4SkJiNPWHp1KT2v\n\t4SEZnCYXPMghwEOsOVLErAo49zUnq/I9maUPFEmcRIUxtrm10eZrkXZclW65ZkxVLwSM\n\t/kRDawdAaEAG50CoXOvmR7vWL51j0in2rSWd/BKOIwcY3k+WHw5ozBBATSNE0PNqucJ2\n\tDGYg=="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (2048-bit key; \n\tunprotected) header.d=raspberrypi.com\n\theader.i=@raspberrypi.com\n\theader.b=\"LUaEyiIA\"; dkim-atps=neutral","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20210112;\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=wB0BFoZHETpJ1713n0PGWT20SfTTTE75BLhyi4A3+Ec=;\n\tb=jqSETcF4BOuvngjCa57uCp+r7eKaBVb6hPfyJP188m7Kj/KhGD5OcbgYuBFGIrtpJo\n\tPljf/GmTXYawT7Ki0PSIz7qfISElFF3JXI6nDdMGTFPS+E0cx4Q3AzXBPsxXn+ZeVMjm\n\t3NN9Chs96lG2TD9H0eFqgZA5Da4Ru0f9e2yXYWxrabFTuaHlTjrutKJc2wlo7ljSD21n\n\tdsrTW06PGxmT1kQj3oP5jYlRarF+NxiHjO8crpM02oyqUgMhkTy9vyfUgepyef4X3hqZ\n\ttlgvCq43feJ2gWFPP3U1aYlcazLt7CJLCfFiJv/Ndl+E7InYuXaYjIGNAtiG+omOxs1R\n\tZF0A==","X-Gm-Message-State":"ANoB5pkmxfv7mpUqIil6YVNpmXmmwp0uexO6qr3IetKZIceikUqNv1b5\n\t+D9Y+H8du7xcGGHuodM1hryTWRr9wxaoMMA8FVT2NQ==","X-Google-Smtp-Source":"AA0mqf4iVIVS8RZF1dGWjRUD2xm6NsWQt0jgSRUN7kJJEwTwvg/1RAzou2ti+azaQiJApX3wOA91GlD0L++J4bDUbFw=","X-Received":"by 2002:a05:622a:1ba7:b0:3a5:6822:1a42 with SMTP id\n\tbp39-20020a05622a1ba700b003a568221a42mr12947953qtb.174.1668438362542;\n\tMon, 14 Nov 2022 07:06:02 -0800 (PST)","MIME-Version":"1.0","References":"<20221031114522.14215-1-naush@raspberrypi.com>\n\t<CAEmqJPq58OOF_u1FmyBcBf8ZEG53MTVK7TdubbvTds3Aoov06w@mail.gmail.com>\n\t<CAEmqJPoi0S5JAyF+6uhQVf3JYQ3n1zagdowRqitB68RFv-yvDQ@mail.gmail.com>\n\t<Y3JKIBGIGpXrXJQ2@pendragon.ideasonboard.com>\n\t<CAEmqJPrUmM4G1J5+UpQhMa_DPbsrQV04EUqOK1EU+tXcFJ-TkA@mail.gmail.com>\n\t<Y3JUcRkVZLQEuUNP@pendragon.ideasonboard.com>","In-Reply-To":"<Y3JUcRkVZLQEuUNP@pendragon.ideasonboard.com>","Date":"Mon, 14 Nov 2022 15:05:48 +0000","Message-ID":"<CAEmqJPqzUkd_zLDrkF5ivPvY9fqXE7GStJ7-d47cRGQKYyLAaw@mail.gmail.com>","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Content-Type":"multipart/alternative; boundary=\"000000000000ede7f905ed6f9331\"","Subject":"Re: [libcamera-devel] [PATCH v5 0/7] Raspberry Pi AGC digital gain\n\tfixes","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>"}}]