[{"id":28257,"web_url":"https://patchwork.libcamera.org/comment/28257/","msgid":"<CAEmqJPreoM_L3LstepPa-JB5wVZaVJwo+=UOpJjAbc87B2G6-w@mail.gmail.com>","date":"2023-12-06T12:43:07","subject":"Re: [libcamera-devel] [PATCH 0/2] IPA initial values for Raspberry\n\tPi","submitter":{"id":34,"url":"https://patchwork.libcamera.org/api/people/34/","name":"Naushir Patuck","email":"naush@raspberrypi.com"},"content":"Hi David,\n\nOn Wed, 6 Dec 2023 at 10:38, David Plowman via libcamera-devel\n<libcamera-devel@lists.libcamera.org> wrote:\n>\n> Hi\n>\n> Just a quick word to explain these patches seeing as no one is using\n> them (yet).\n>\n> They're going to be used on the PiSP (Pi 5) platform where we have a\n> particular problem in needing to program up the statistics blocks\n> which are part of the Camera Front End. We have to do this before we\n> start the camera, so there has been no chance to process any frames\n> and discover suitable colour gains and black levels.\n>\n> Therefore these methods provide a way for the Pi 5 pipeline handler to\n> apply sensible default values, so that the statistics for the first\n> few frames (before those algorithms have actually run) are usable. The\n> only values that we really need are black levels and plausible colour\n> gains for this sensor.\n\nI was just talking with Nick about this yesterday!\n\nWith this change, I wonder if we should remove the use of\n\"black_level.status\" that gets added to the metadata per-frame?  Or do\nwe want to keep the possibility of adapting black-level in the future?\n\nNaush\n\n>\n> Thanks!\n> David\n>\n> David Plowman (2):\n>   ipa: rpi: black_level: Add an initialValues method\n>   ipa: rpi: awb: Add an initialValues method\n>\n>  src/ipa/rpi/controller/awb_algorithm.h        |  1 +\n>  .../rpi/controller/black_level_algorithm.h    | 23 +++++++++++++++++++\n>  src/ipa/rpi/controller/rpi/awb.cpp            |  6 +++++\n>  src/ipa/rpi/controller/rpi/awb.h              |  1 +\n>  src/ipa/rpi/controller/rpi/black_level.cpp    | 10 +++++++-\n>  src/ipa/rpi/controller/rpi/black_level.h      |  6 +++--\n>  6 files changed, 44 insertions(+), 3 deletions(-)\n>  create mode 100644 src/ipa/rpi/controller/black_level_algorithm.h\n>\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 5D67FC322E\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed,  6 Dec 2023 12:43:36 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 7AD04629CE;\n\tWed,  6 Dec 2023 13:43:35 +0100 (CET)","from mail-yw1-x112e.google.com (mail-yw1-x112e.google.com\n\t[IPv6:2607:f8b0:4864:20::112e])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 1134D61D9E\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed,  6 Dec 2023 13:43:34 +0100 (CET)","by mail-yw1-x112e.google.com with SMTP id\n\t00721157ae682-5d747dbf81eso41977327b3.1\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 06 Dec 2023 04:43:33 -0800 (PST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1701866615;\n\tbh=i6fjO7kC91G8wLhf5w7UFGdJ+HHjy1x4RXZNDJETaRI=;\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=P4lL4asSqd5OeCcZ6vWG6k8XUgF2exwG0RVxDJsvpH/GkH3KOpUmbf0cz7+3oK1y3\n\t5X60eacXwIf92F+gvN90euZkh8EgmRtASMM0zW5mTvgjaawXgTH/jFY5hjVpBgVeST\n\tZoNiMwhqKLzRaQD8jaM+KDxWHW8verBV/GeiSea/THbCnvX6QmbIlZP2IUv2tERP5h\n\tsFAPYLjCxX9QmYkepY3XTtcyc29CMqP9+8ee+EkiFQQL+RmzCUdTB4J6vHZ3JZ/LS/\n\tZ4AJDOEr/3Ott6zN+qE7KtL+mBFYeG9fvDUgtylBGKmKIfmRpeBeBVD+HBZUzbaO2D\n\tH8e3iPtCm/jZA==","v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=raspberrypi.com; s=google; t=1701866612; x=1702471412;\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=CNwSx5xcpKNvywnkIMu9BrlFBPcbGMskr6j2gEN1j2Q=;\n\tb=U2OAjr92anOJwnZRIN27hXoUJAZWd6dlsjSkZNgVzHp+CrhfQOl/KDw4yH8gwoxVy8\n\tTp6K0aIlcPhUcd5/RlZmY+V1yOJjlLELsNFrpBQIGXxx9CR55kmbqyHEgi9ZVeiZrT11\n\tOw7k6vJLLVUr1/IfMQMaNt6b7okhAxVbg5R/y+KenuP4qwHFeQLkYh3gkN/rJiLSp1d4\n\tyahwAnBe6mOLbnybpmcWtJ6lhl08m4R+eQ8vdlP6OVKgz62xJjniMECiQKGWC6pd0g8x\n\tD1pKcK2VEB+JFJmrD0AqzeDKEmfryZp/uGTdE6xWavXR7Ega/7nEcKH/64LDULX4hwan\n\tzMRA=="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (2048-bit key; \n\tunprotected) header.d=raspberrypi.com\n\theader.i=@raspberrypi.com\n\theader.b=\"U2OAjr92\"; dkim-atps=neutral","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1701866612; x=1702471412;\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=CNwSx5xcpKNvywnkIMu9BrlFBPcbGMskr6j2gEN1j2Q=;\n\tb=NT5iIncD9/Rg+XeYDEQyz6k2QNNavFCtcOUwfcdX2SHPBUQNBDA0BhrRddsk+fmGip\n\tDzfsN5HYUxtifxY1RbInZDVRhLNqd8MrN6ozPZvcpNX4IEG+8vry5NkAuDeOWxc886Q7\n\tmoC+uWSrNae/rhHuoFfMPdo6E+sPR9eU/6xvvtia60EXi6zCoo5DDAuoKUpFKme/ovAe\n\t3UBxMsNSe25cboRN552PLMA1riae/tFNtuImLgrS5CZSdvOh3qYL6eqitkWfq16fB5Dz\n\trCsXi+bYhLgSq8z3QmnVtQuJm0/OWZ5VvK+Lnyb4ku18xCJy3plE9JPkXyhC8GX8WsPN\n\tFKBQ==","X-Gm-Message-State":"AOJu0YyFZZhWYrH101L0OTtkGRUXcm5PbBVsRmobOkWvVkq/LX8il8+w\n\tJ12JijiW71xXx2GTfPkJ/TB+J7RnWB2NJ7/VfLGGqA==","X-Google-Smtp-Source":"AGHT+IGdiq+u5QIVAxfZTslyC5STz+LmnH1vnOxXxKZdsW55qpi3KLW5fTJZhCKa3LtkBWtUXph6meOyezuBHJ7z1bA=","X-Received":"by 2002:a81:c944:0:b0:5d7:545e:3bdd with SMTP id\n\tc4-20020a81c944000000b005d7545e3bddmr657220ywl.3.1701866612630;\n\tWed, 06 Dec 2023 04:43:32 -0800 (PST)","MIME-Version":"1.0","References":"<20231206103839.16607-1-david.plowman@raspberrypi.com>","In-Reply-To":"<20231206103839.16607-1-david.plowman@raspberrypi.com>","Date":"Wed, 6 Dec 2023 12:43:07 +0000","Message-ID":"<CAEmqJPreoM_L3LstepPa-JB5wVZaVJwo+=UOpJjAbc87B2G6-w@mail.gmail.com>","To":"David Plowman <david.plowman@raspberrypi.com>","Content-Type":"text/plain; charset=\"UTF-8\"","Subject":"Re: [libcamera-devel] [PATCH 0/2] IPA initial values for Raspberry\n\tPi","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":28258,"web_url":"https://patchwork.libcamera.org/comment/28258/","msgid":"<CAHW6GYJejJe1ErEUabVL3oyVz-Ccm3k0w_rW6EydaJTMQG0smQ@mail.gmail.com>","date":"2023-12-06T13:58:35","subject":"Re: [libcamera-devel] [PATCH 0/2] IPA initial values for Raspberry\n\tPi","submitter":{"id":42,"url":"https://patchwork.libcamera.org/api/people/42/","name":"David Plowman","email":"david.plowman@raspberrypi.com"},"content":"Hi Naush\n\nI think I'd like to keep it - it's not unknown for it to get tweaked\nslightly with analogue gain or exposure values (though I know we\nmostly try to avoid micro-managing stuff like that).\n\nThe biggest change I will be adding to the PiSP PH is to program up\nthe FE black levels correctly in the default config. Currently this is\ncompletely uninitialised, so the first couple of frames come out with\ncompletely garbage AGC statistics!\n\nDavid\n\nOn Wed, 6 Dec 2023 at 12:43, Naushir Patuck <naush@raspberrypi.com> wrote:\n>\n> Hi David,\n>\n> On Wed, 6 Dec 2023 at 10:38, David Plowman via libcamera-devel\n> <libcamera-devel@lists.libcamera.org> wrote:\n> >\n> > Hi\n> >\n> > Just a quick word to explain these patches seeing as no one is using\n> > them (yet).\n> >\n> > They're going to be used on the PiSP (Pi 5) platform where we have a\n> > particular problem in needing to program up the statistics blocks\n> > which are part of the Camera Front End. We have to do this before we\n> > start the camera, so there has been no chance to process any frames\n> > and discover suitable colour gains and black levels.\n> >\n> > Therefore these methods provide a way for the Pi 5 pipeline handler to\n> > apply sensible default values, so that the statistics for the first\n> > few frames (before those algorithms have actually run) are usable. The\n> > only values that we really need are black levels and plausible colour\n> > gains for this sensor.\n>\n> I was just talking with Nick about this yesterday!\n>\n> With this change, I wonder if we should remove the use of\n> \"black_level.status\" that gets added to the metadata per-frame?  Or do\n> we want to keep the possibility of adapting black-level in the future?\n>\n> Naush\n>\n> >\n> > Thanks!\n> > David\n> >\n> > David Plowman (2):\n> >   ipa: rpi: black_level: Add an initialValues method\n> >   ipa: rpi: awb: Add an initialValues method\n> >\n> >  src/ipa/rpi/controller/awb_algorithm.h        |  1 +\n> >  .../rpi/controller/black_level_algorithm.h    | 23 +++++++++++++++++++\n> >  src/ipa/rpi/controller/rpi/awb.cpp            |  6 +++++\n> >  src/ipa/rpi/controller/rpi/awb.h              |  1 +\n> >  src/ipa/rpi/controller/rpi/black_level.cpp    | 10 +++++++-\n> >  src/ipa/rpi/controller/rpi/black_level.h      |  6 +++--\n> >  6 files changed, 44 insertions(+), 3 deletions(-)\n> >  create mode 100644 src/ipa/rpi/controller/black_level_algorithm.h\n> >\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 546FFC31E9\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed,  6 Dec 2023 13:58:50 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 8790F62B2E;\n\tWed,  6 Dec 2023 14:58:49 +0100 (CET)","from mail-yb1-xb32.google.com (mail-yb1-xb32.google.com\n\t[IPv6:2607:f8b0:4864:20::b32])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 320B1629CE\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed,  6 Dec 2023 14:58:48 +0100 (CET)","by mail-yb1-xb32.google.com with SMTP id\n\t3f1490d57ef6-da819902678so4894117276.1\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 06 Dec 2023 05:58:48 -0800 (PST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1701871129;\n\tbh=iMWb5MdoKqdkB4Kq7RZTSd4Kx8uPxwkxas6NwdwdxlI=;\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=aS0NdWlPlghg1TsJ/MSsKQoBmyC3ScKfjeGZ2rlGV77MDvfd2H6p8RvVfHlLgkxzX\n\tZ1+bVJZFd0vp3xUD8DGlzqlBkDI9++P44aOTByIkhqpJpX5jPqVzw7xqK4iVVt623z\n\t68UTuXMczq1EWyWaI079L/2tjnW0S4cEwZ5i3D6MeZwM67+UsAQ1P1rkFicgztiRTz\n\tt4sMgSCm+Smuwtj13ULkI+nBrY9qbyovtRw0bluhalaqMWxufvYdcq52r8zk609TtZ\n\tdkwHNcIr3GOrp7tbFNYkobbKXcRTyU1iMJd2FY6Hn5xpYWlgmoUlsXfhGQxPIqT1Ug\n\tgYWPZ+5Dk/MLQ==","v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=raspberrypi.com; s=google; t=1701871127; x=1702475927;\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=VE1u1V3RX1L0ge20vSql8bbsCI2ElcSRuPFetXnR3rY=;\n\tb=orHYTE76P5FreOR4hZnqYzKPXXJmdVoE1s8EZDLysxsL8nyxfo/IwG0xXLgWxYGSeA\n\tgsdE1z2CWFr0PEHkEVDJoUKDMuzC6BQO6g6wrxXSRk4+t6F8C8NCy/xwH5xE0QPwCuFf\n\t0GbfYHDk07dcM7xPHSOEdPXbxVV/gCtSlPToreJZC4dIAMGookSj/sl5RFn+0jsFWJW0\n\tfTSpvN7XXZ+cgvFmX9j6qUSOGCV/W+oqlYbhcyBDVp2iM6KXyGTT7GSm79EWtoRFl/Xa\n\tR2uqXGPViwHHJDOrWmoZSS1Zcfp/qW/zCiZIWYnXtShnx/XTbc1nN266Pn+h49BlI9CO\n\t4VXg=="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (2048-bit key; \n\tunprotected) header.d=raspberrypi.com\n\theader.i=@raspberrypi.com\n\theader.b=\"orHYTE76\"; dkim-atps=neutral","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1701871127; x=1702475927;\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=VE1u1V3RX1L0ge20vSql8bbsCI2ElcSRuPFetXnR3rY=;\n\tb=cRWiPjIaGEdqhtZwziB5dwQkzWf/JBW/Yp3TZtBOEd5W8dWldnXH21dcp7+z/2SD/B\n\ts9gsRDPlQNbAHXPz3KRYhDtE5QNLaJCyRq/lggoH/0nCiTtYrszT4D9WhYPU29fy+BIW\n\tjjurkK4XVrOg+LdEBuVV8cj4s+2cdoCLJFz/HJhU0s7h046Jbc1G3OfDfisb/BHclpXm\n\tqcMYZVYqHq9lLICBv2RNT0Z/xaXMGfDACCIVT/S9G/1imWKfOLjsM/dWvY/DKggHyXgk\n\t6apHI8iD6c+2k4wQQny5fIX8VT828qTOBwCaRju+O7xX5KAA06MU+L6do3Yc0EWqyF+P\n\ttOdQ==","X-Gm-Message-State":"AOJu0YwraX5ob1y2Lj09nDIWAKScvtj/oio+yBV4yLRxDswUuvq7lkCg\n\tGb8Uiex53OyCiHDLGPlZfFkyMWOf4lOt1HpNuMMJzojIJo/YtfNA","X-Google-Smtp-Source":"AGHT+IET0GSdzV7arBASLzvmViqlzfOtgIsIun371WsGAV09ObFT6fOwCNW+NODWTkUatMpJIzDUKTlGCutZ+Y8oXb4=","X-Received":"by 2002:a25:ec04:0:b0:db7:dacf:2f03 with SMTP id\n\tj4-20020a25ec04000000b00db7dacf2f03mr742584ybh.74.1701871126925;\n\tWed, 06 Dec 2023 05:58:46 -0800 (PST)","MIME-Version":"1.0","References":"<20231206103839.16607-1-david.plowman@raspberrypi.com>\n\t<CAEmqJPreoM_L3LstepPa-JB5wVZaVJwo+=UOpJjAbc87B2G6-w@mail.gmail.com>","In-Reply-To":"<CAEmqJPreoM_L3LstepPa-JB5wVZaVJwo+=UOpJjAbc87B2G6-w@mail.gmail.com>","Date":"Wed, 6 Dec 2023 13:58:35 +0000","Message-ID":"<CAHW6GYJejJe1ErEUabVL3oyVz-Ccm3k0w_rW6EydaJTMQG0smQ@mail.gmail.com>","To":"Naushir Patuck <naush@raspberrypi.com>","Content-Type":"text/plain; charset=\"UTF-8\"","Subject":"Re: [libcamera-devel] [PATCH 0/2] IPA initial values for Raspberry\n\tPi","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":"David Plowman via libcamera-devel <libcamera-devel@lists.libcamera.org>","Reply-To":"David Plowman <david.plowman@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>"}}]