[{"id":16140,"web_url":"https://patchwork.libcamera.org/comment/16140/","msgid":"<CAHW6GYJt658SEJ62SKrPVFZwL+CJoaagfMgyN1ihabQ9giAeLw@mail.gmail.com>","date":"2021-04-07T09:13:13","subject":"Re: [libcamera-devel] [PATCH 0/2] Raspberry Pi: handle sensors more\n\tflexibly","submitter":{"id":42,"url":"https://patchwork.libcamera.org/api/people/42/","name":"David Plowman","email":"david.plowman@raspberrypi.com"},"content":"Hi everyone\n\nI was wondering if I might give this little pair of changes a teeny\nnudge, don't think there's been any feedback as yet...\n\nThanks!\n\nDavid\n\n\nOn Wed, 24 Mar 2021 at 11:44, David Plowman\n<david.plowman@raspberrypi.com> wrote:\n>\n> Hi everyone\n>\n> Here are a couple more patches aimed at allowing us to deal more\n> flexibly with \"interesting\" sensors.\n>\n> The first patch simply makes the CamHelper's exposure-related methods\n> virtual. This gives greater flexibility on how we deal with sensors\n> where different modes have different signal levels. Differences\n> between modes can be accounted for with the gain methods (already\n> virtual), in the exposure (with this change), or via a combination of\n> the two.\n>\n> Note that another solution to this involves fiddling around with the\n> AGC. It would have to know that modes can have different \"base signal\n> levels\", and account for the difference. I'm still in several minds\n> about whether I want to do this, so this change gives us options in\n> the meantime, and doesn't preclude messing with the AGC later if we\n> wish.\n>\n> The second commit takes the view that if sensors seem to be asking for\n> the red/blue colour gains, then we should tell them. I guess there's a\n> risk that some sensors might seem to want these numbers, but we find\n> that we don't want to tell them. If that happens maybe the CamHelper\n> would have to tell us what to do, but this approach seems reasonable\n> to me at this point.\n>\n> I also apply a fixed 256x multiplier to the colour gains before\n> passing them to the control. I don't think V4L2 docs mandate any\n> particular scale here? Maybe there's an argument for another\n> CamHelper function \"ColourGainCode\", or something like that.\n>\n> Thoughts and suggestions welcome as always. Thanks!\n>\n> David\n>\n> David Plowman (2):\n>   ipa: raspberrypi: Make CamHelper exposure methods virtual\n>   ipa: raspberrypi: Update sensor's RED/BLUE balance controls when\n>     present\n>\n>  src/ipa/raspberrypi/cam_helper.hpp              |  4 ++--\n>  src/ipa/raspberrypi/raspberrypi.cpp             | 17 ++++++++++++++---\n>  .../pipeline/raspberrypi/raspberrypi.cpp        |  9 +++++++++\n>  3 files changed, 25 insertions(+), 5 deletions(-)\n>\n> --\n> 2.20.1\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 45261BD224\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed,  7 Apr 2021 09:13:29 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id B170D687A2;\n\tWed,  7 Apr 2021 11:13:28 +0200 (CEST)","from mail-oi1-x22c.google.com (mail-oi1-x22c.google.com\n\t[IPv6:2607:f8b0:4864:20::22c])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id F405868795\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed,  7 Apr 2021 11:13:26 +0200 (CEST)","by mail-oi1-x22c.google.com with SMTP id i81so18070497oif.6\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 07 Apr 2021 02:13:26 -0700 (PDT)"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=raspberrypi.com header.i=@raspberrypi.com\n\theader.b=\"awZTKzZV\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=raspberrypi.com; s=google;\n\th=mime-version:references:in-reply-to:from:date:message-id:subject:to;\n\tbh=jYWVkiEyrov+o+fNmCbTcrpmR74SvBk5hR9gitxWGDI=;\n\tb=awZTKzZVMYDQMVDTWQLFEBD/NLleoPamlfjmr+VLTh6Nhmh5QO4wwuNMEI0nkMB/wM\n\tJPkJ++JESdZRXKMJHVJcuwOicaMINxz2nsb9/TNLNAq4QJyrLz9OyjmPDgFnXevI1IJq\n\ttBcpi+T+bPUnv/mACqHUEAw72Pg/7HF4Q+aKsoTJHNhubYu9K27Ba1H7M0RYzpSRT23f\n\tSBAPPoCK6+PTnmaqLVO5lXFLofyAJ3DdVMcJUTgbNmW/+eYiOOYIsEtFAmi6Low9AbRk\n\t4zBeC6Iqcda8lY3xAxp2+HFwBSISrXNoS0OhgDTeyD2y4YRsuCq/pII+ARjPFk6Zai4A\n\t8kCg==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:mime-version:references:in-reply-to:from:date\n\t:message-id:subject:to;\n\tbh=jYWVkiEyrov+o+fNmCbTcrpmR74SvBk5hR9gitxWGDI=;\n\tb=ggBYNQLhOCMui0/b+YbjtVc7cFtjUrfFbL3wse4xUMAnC4DUkL+W90KQiPrQzrcysU\n\tXsCU8z/VYJve7eLOiJ6aW8GPtpmxT2KF0R65JZ1lJ+zY6wdG/jiaAPr+a9MMUSvhtFAo\n\tSHobgsQCuCsPW3rL9gVLfyL2F4vBcDjXw6vSQXQIwEH1AZYwdZ4f8FMAni3/6o9By3KG\n\tFL6TyIwdFJtbXklI2qOCO+b89poskhnAnPQW0nEgloa9qRMw9iXrCwIip/4wt6clz+oV\n\t9nwI5aTHtzJ/paaai0F60ohb9f0keZO0gS1ZaMZIs7bndeka+7OoZ9qyBFXO+Kkc2/wh\n\tSDpw==","X-Gm-Message-State":"AOAM530lPo3wM8YYCs7bg0JA/bTu/Y1svjwt68OJDsAIxDs6dm84rP61\n\tVq5V+btndqlZDJ03rTZLnA+F7q6eoE1A7y2HMWyhScLKt+E=","X-Google-Smtp-Source":"ABdhPJznDNeeuPOni+hcblllaRbzOi+TwP0xkTH172rJmyORocYjUziId16vr6S91apUSOzM3nAI8hcxdOq6ZNqCF+k=","X-Received":"by 2002:aca:4a87:: with SMTP id\n\tx129mr1571582oia.107.1617786805591; \n\tWed, 07 Apr 2021 02:13:25 -0700 (PDT)","MIME-Version":"1.0","References":"<20210324114415.19866-1-david.plowman@raspberrypi.com>","In-Reply-To":"<20210324114415.19866-1-david.plowman@raspberrypi.com>","From":"David Plowman <david.plowman@raspberrypi.com>","Date":"Wed, 7 Apr 2021 10:13:13 +0100","Message-ID":"<CAHW6GYJt658SEJ62SKrPVFZwL+CJoaagfMgyN1ihabQ9giAeLw@mail.gmail.com>","To":"libcamera devel <libcamera-devel@lists.libcamera.org>","Subject":"Re: [libcamera-devel] [PATCH 0/2] Raspberry Pi: handle sensors more\n\tflexibly","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>","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"7bit","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":16141,"web_url":"https://patchwork.libcamera.org/comment/16141/","msgid":"<YG14tbvC0zOJqAem@pendragon.ideasonboard.com>","date":"2021-04-07T09:17:41","subject":"Re: [libcamera-devel] [PATCH 0/2] Raspberry Pi: handle sensors more\n\tflexibly","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi David,\n\nOn Wed, Apr 07, 2021 at 10:13:13AM +0100, David Plowman wrote:\n> Hi everyone\n> \n> I was wondering if I might give this little pair of changes a teeny\n> nudge, don't think there's been any feedback as yet...\n\nEaster got a bit in the way, with its overdoses of chocolate (as I get\nolder I'm strangely more tempted to cook the easter bunny instead). I'll\nget back to reviewing your pending series.\n\n> On Wed, 24 Mar 2021 at 11:44, David Plowman wrote:\n> >\n> > Hi everyone\n> >\n> > Here are a couple more patches aimed at allowing us to deal more\n> > flexibly with \"interesting\" sensors.\n> >\n> > The first patch simply makes the CamHelper's exposure-related methods\n> > virtual. This gives greater flexibility on how we deal with sensors\n> > where different modes have different signal levels. Differences\n> > between modes can be accounted for with the gain methods (already\n> > virtual), in the exposure (with this change), or via a combination of\n> > the two.\n> >\n> > Note that another solution to this involves fiddling around with the\n> > AGC. It would have to know that modes can have different \"base signal\n> > levels\", and account for the difference. I'm still in several minds\n> > about whether I want to do this, so this change gives us options in\n> > the meantime, and doesn't preclude messing with the AGC later if we\n> > wish.\n> >\n> > The second commit takes the view that if sensors seem to be asking for\n> > the red/blue colour gains, then we should tell them. I guess there's a\n> > risk that some sensors might seem to want these numbers, but we find\n> > that we don't want to tell them. If that happens maybe the CamHelper\n> > would have to tell us what to do, but this approach seems reasonable\n> > to me at this point.\n> >\n> > I also apply a fixed 256x multiplier to the colour gains before\n> > passing them to the control. I don't think V4L2 docs mandate any\n> > particular scale here? Maybe there's an argument for another\n> > CamHelper function \"ColourGainCode\", or something like that.\n> >\n> > Thoughts and suggestions welcome as always. Thanks!\n> >\n> > David\n> >\n> > David Plowman (2):\n> >   ipa: raspberrypi: Make CamHelper exposure methods virtual\n> >   ipa: raspberrypi: Update sensor's RED/BLUE balance controls when\n> >     present\n> >\n> >  src/ipa/raspberrypi/cam_helper.hpp              |  4 ++--\n> >  src/ipa/raspberrypi/raspberrypi.cpp             | 17 ++++++++++++++---\n> >  .../pipeline/raspberrypi/raspberrypi.cpp        |  9 +++++++++\n> >  3 files changed, 25 insertions(+), 5 deletions(-)\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 0FD34BD1F6\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed,  7 Apr 2021 09:18:28 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 7A657687D5;\n\tWed,  7 Apr 2021 11:18:27 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id CDD3368795\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed,  7 Apr 2021 11:18:26 +0200 (CEST)","from pendragon.ideasonboard.com (62-78-145-57.bb.dnainternet.fi\n\t[62.78.145.57])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 603AC88F;\n\tWed,  7 Apr 2021 11:18:26 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"ZCRiMuph\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1617787106;\n\tbh=4kYKxsl8V3Vwlqu3kMzlODFZ52k7QTznYM1UAaEYtqg=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=ZCRiMuphuOtg2ScNgqQVzMG8U3WqWJc4pNCMDBIRCx7OC4b0QCsB+XM4IK+1AMkLI\n\tklB63VUxSd6vX1+RrhuVJoHqzJZBZU1tYpuzWm9rkeJW3tw+Sjvi3rAUrKhURrXRVi\n\tfYqgjXP7mfyVYagdr9xR3IvTwXmMvyzYQBTXVKzo=","Date":"Wed, 7 Apr 2021 12:17:41 +0300","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"David Plowman <david.plowman@raspberrypi.com>","Message-ID":"<YG14tbvC0zOJqAem@pendragon.ideasonboard.com>","References":"<20210324114415.19866-1-david.plowman@raspberrypi.com>\n\t<CAHW6GYJt658SEJ62SKrPVFZwL+CJoaagfMgyN1ihabQ9giAeLw@mail.gmail.com>","MIME-Version":"1.0","Content-Disposition":"inline","In-Reply-To":"<CAHW6GYJt658SEJ62SKrPVFZwL+CJoaagfMgyN1ihabQ9giAeLw@mail.gmail.com>","Subject":"Re: [libcamera-devel] [PATCH 0/2] Raspberry Pi: handle sensors more\n\tflexibly","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>","Cc":"libcamera devel <libcamera-devel@lists.libcamera.org>","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"7bit","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]