[{"id":14646,"web_url":"https://patchwork.libcamera.org/comment/14646/","msgid":"<67cc41fe-40df-3838-0270-1027e620c4c7@ideasonboard.com>","date":"2021-01-21T12:42:13","subject":"Re: [libcamera-devel] [PATCH 1/4] raspberrypi: Add the correct\n\tinteger const postfix for FrameDurations","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"Hi Naush,\n\nOn 21/01/2021 11:58, Naushir Patuck wrote:\n> At startup, ControlInfoMap::generateIdmap() threw a log message warning\n> that the controls::FrameDurations had a type mismatch based on the\n> min/max values provided in libcamera::RPi::Controls initialiser.\n> \n> Fix this warning by adding and explicit int64_t postfix to the const\n> values for min and max.\n> \n> Signed-off-by: Naushir Patuck <naush@raspberrypi.com>\n> ---\n>  include/libcamera/ipa/raspberrypi.h | 2 +-\n>  1 file changed, 1 insertion(+), 1 deletion(-)\n> \n> diff --git a/include/libcamera/ipa/raspberrypi.h b/include/libcamera/ipa/raspberrypi.h\n> index 1de36039cee0..8e704d922ce6 100644\n> --- a/include/libcamera/ipa/raspberrypi.h\n> +++ b/include/libcamera/ipa/raspberrypi.h\n> @@ -65,7 +65,7 @@ static const ControlInfoMap Controls = {\n>  \t{ &controls::Sharpness, ControlInfo(0.0f, 16.0f, 1.0f) },\n>  \t{ &controls::ColourCorrectionMatrix, ControlInfo(-16.0f, 16.0f) },\n>  \t{ &controls::ScalerCrop, ControlInfo(Rectangle{}, Rectangle(65535, 65535, 65535, 65535), Rectangle{}) },\n> -\t{ &controls::FrameDurations, ControlInfo(1000, 1000000000) },\n> +\t{ &controls::FrameDurations, ControlInfo(INT64_C(1000), INT64_C(1000000000)) },\n\nIs this casting a boost-ism?\n\n\n\n>  };\n>  \n>  } /* namespace RPi */\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 7BD16BD808\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 21 Jan 2021 12:42:19 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id E2A74681E8;\n\tThu, 21 Jan 2021 13:42:18 +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 BF542681DE\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 21 Jan 2021 13:42:17 +0100 (CET)","from [192.168.0.20]\n\t(cpc89244-aztw30-2-0-cust3082.18-1.cable.virginm.net [86.31.172.11])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 4049050E;\n\tThu, 21 Jan 2021 13:42:17 +0100 (CET)"],"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=\"EEmx/T6u\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1611232937;\n\tbh=KvHqEkzmUgtZeScII1OAlrvxwyIvI+OB/3hi27Gq9Yw=;\n\th=Reply-To:Subject:To:References:From:Date:In-Reply-To:From;\n\tb=EEmx/T6uTXt4L9BcQ5nB7+14ULJU7AQC3HM71mdjnj7JEa80dPSHPVxxkh0R19s5u\n\tNi8+5Z4gBVMmhwyWTjiVNZ6lSBm89g5c1itMYkxKlOQVT7jcIMCgTLQ9jzosIw6iaU\n\tHa6iGK7B83Y9ou6io2G4nbGNLQba5r022YLYzMXc=","To":"Naushir Patuck <naush@raspberrypi.com>,\n\tlibcamera-devel@lists.libcamera.org","References":"<20210121115849.682130-1-naush@raspberrypi.com>\n\t<20210121115849.682130-2-naush@raspberrypi.com>","From":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Autocrypt":"addr=kieran.bingham@ideasonboard.com; keydata=\n\tmQINBFYE/WYBEACs1PwjMD9rgCu1hlIiUA1AXR4rv2v+BCLUq//vrX5S5bjzxKAryRf0uHat\n\tV/zwz6hiDrZuHUACDB7X8OaQcwhLaVlq6byfoBr25+hbZG7G3+5EUl9cQ7dQEdvNj6V6y/SC\n\trRanWfelwQThCHckbobWiQJfK9n7rYNcPMq9B8e9F020LFH7Kj6YmO95ewJGgLm+idg1Kb3C\n\tpotzWkXc1xmPzcQ1fvQMOfMwdS+4SNw4rY9f07Xb2K99rjMwZVDgESKIzhsDB5GY465sCsiQ\n\tcSAZRxqE49RTBq2+EQsbrQpIc8XiffAB8qexh5/QPzCmR4kJgCGeHIXBtgRj+nIkCJPZvZtf\n\tKr2EAbc6tgg6DkAEHJb+1okosV09+0+TXywYvtEop/WUOWQ+zo+Y/OBd+8Ptgt1pDRyOBzL8\n\tRXa8ZqRf0Mwg75D+dKntZeJHzPRJyrlfQokngAAs4PaFt6UfS+ypMAF37T6CeDArQC41V3ko\n\tlPn1yMsVD0p+6i3DPvA/GPIksDC4owjnzVX9kM8Zc5Cx+XoAN0w5Eqo4t6qEVbuettxx55gq\n\t8K8FieAjgjMSxngo/HST8TpFeqI5nVeq0/lqtBRQKumuIqDg+Bkr4L1V/PSB6XgQcOdhtd36\n\tOe9X9dXB8YSNt7VjOcO7BTmFn/Z8r92mSAfHXpb07YJWJosQOQARAQABtDBLaWVyYW4gQmlu\n\tZ2hhbSA8a2llcmFuLmJpbmdoYW1AaWRlYXNvbmJvYXJkLmNvbT6JAlcEEwEKAEECGwMFCwkI\n\tBwIGFQgJCgsCBBYCAwECHgECF4ACGQEWIQSQLdeYP70o/eNy1HqhHkZyEKRh/QUCXWTtygUJ\n\tCyJXZAAKCRChHkZyEKRh/f8dEACTDsbLN2nioNZMwyLuQRUAFcXNolDX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DLmLzBFavQfvonSfbitgXwCG3vS+9HEwAjU30Bar1PEOmIbiAoMzuKeRm2LVpmq4\n\tWZw01QYHU/GUV/zHJSFk","Organization":"Ideas on Board","Message-ID":"<67cc41fe-40df-3838-0270-1027e620c4c7@ideasonboard.com>","Date":"Thu, 21 Jan 2021 12:42:13 +0000","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101\n\tThunderbird/68.10.0","MIME-Version":"1.0","In-Reply-To":"<20210121115849.682130-2-naush@raspberrypi.com>","Content-Language":"en-GB","Subject":"Re: [libcamera-devel] [PATCH 1/4] raspberrypi: Add the correct\n\tinteger const postfix for FrameDurations","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>","Reply-To":"kieran.bingham@ideasonboard.com","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":14647,"web_url":"https://patchwork.libcamera.org/comment/14647/","msgid":"<CAEmqJPrD-CCMzC5mEbnRzbeOKboQxEai_b7ttm266j=N-bcJig@mail.gmail.com>","date":"2021-01-21T12:45:17","subject":"Re: [libcamera-devel] [PATCH 1/4] raspberrypi: Add the correct\n\tinteger const postfix for FrameDurations","submitter":{"id":34,"url":"https://patchwork.libcamera.org/api/people/34/","name":"Naushir Patuck","email":"naush@raspberrypi.com"},"content":"Hi Kieran,\n\nOn Thu, 21 Jan 2021, 12:42 pm Kieran Bingham, <\nkieran.bingham@ideasonboard.com> wrote:\n\n> Hi Naush,\n>\n> On 21/01/2021 11:58, Naushir Patuck wrote:\n> > At startup, ControlInfoMap::generateIdmap() threw a log message warning\n> > that the controls::FrameDurations had a type mismatch based on the\n> > min/max values provided in libcamera::RPi::Controls initialiser.\n> >\n> > Fix this warning by adding and explicit int64_t postfix to the const\n> > values for min and max.\n> >\n> > Signed-off-by: Naushir Patuck <naush@raspberrypi.com>\n> > ---\n> >  include/libcamera/ipa/raspberrypi.h | 2 +-\n> >  1 file changed, 1 insertion(+), 1 deletion(-)\n> >\n> > diff --git a/include/libcamera/ipa/raspberrypi.h\n> b/include/libcamera/ipa/raspberrypi.h\n> > index 1de36039cee0..8e704d922ce6 100644\n> > --- a/include/libcamera/ipa/raspberrypi.h\n> > +++ b/include/libcamera/ipa/raspberrypi.h\n> > @@ -65,7 +65,7 @@ static const ControlInfoMap Controls = {\n> >       { &controls::Sharpness, ControlInfo(0.0f, 16.0f, 1.0f) },\n> >       { &controls::ColourCorrectionMatrix, ControlInfo(-16.0f, 16.0f) },\n> >       { &controls::ScalerCrop, ControlInfo(Rectangle{}, Rectangle(65535,\n> 65535, 65535, 65535), Rectangle{}) },\n> > -     { &controls::FrameDurations, ControlInfo(1000, 1000000000) },\n> > +     { &controls::FrameDurations, ControlInfo(INT64_C(1000),\n> INT64_C(1000000000)) },\n>\n> Is this casting a boost-ism?\n>\n\nI thought it was part of stdint, but admittedly never checked to confirm.\nWill do so in a bit.\n\nRegards,\nNaush\n\n\n>\n>\n> >  };\n> >\n> >  } /* namespace RPi */\n> >\n>\n> --\n> Regards\n> --\n> Kieran\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 751BDBD808\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 21 Jan 2021 12:45:31 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 40F89681EF;\n\tThu, 21 Jan 2021 13:45:31 +0100 (CET)","from mail-lf1-x12f.google.com (mail-lf1-x12f.google.com\n\t[IPv6:2a00:1450:4864:20::12f])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id B4CD0681E7\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 21 Jan 2021 13:45:29 +0100 (CET)","by mail-lf1-x12f.google.com with SMTP id m22so2313621lfg.5\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 21 Jan 2021 04:45:29 -0800 (PST)"],"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=\"Is/vZ6Zl\"; 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\t:cc; bh=yspnvRLIlduuoiKPo7Leegw3WaUGOfOB6cBw4TfSBRc=;\n\tb=Is/vZ6ZlYffxUakdQDFagg0a/HtGXh0O3iUrQUg9PTqbfUeDr4JKApDXe9h9kltebK\n\tdYZLXdqKozfvYBL3M60w2AZiKfrR6aIY53WFAX210YIsdkoyiEQM1OgxK76tNMvQLEmU\n\t2ijQMG4EOMAp7arFQAd7jL0pxrJvMMAC9r161HbD7t8FKVCv5Rlpr8zEZWEplJmJEcGl\n\tcD80Ltl04ckr80vujVF5cJ3vGjpnsynvplwp1OJ8Z5/73OrRit9rCFMPz2kBKeQTP/hG\n\tL2w528qnPhGGB8wL2BgskaDpEzHEX2UQntj1Q3rSMLxgoqxb83WEMx38xQUBHN5TesjP\n\tfBBw==","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:cc;\n\tbh=yspnvRLIlduuoiKPo7Leegw3WaUGOfOB6cBw4TfSBRc=;\n\tb=sF9+dbA+ZcHActgoZd3ejz6PK8SLx//PVYI8k2vqLNdpifKMg2if0hyiN9F5TDbugV\n\tyZZXLXdOIhxdZwG5Bmzl63ToZGYrZXH64JKjZrJFjOzQFW2XVPjXEDUAZW/0dR9sB6to\n\t/T/V4kJVctN6/qifYopURC2vVRj3TP0jjN2chdcv/vLuRdnh78gYJQTUliW1El40A4Dp\n\tojWMB119bkr7e/8MujNEX4FoQJNgbrdkq1lJ/2LSzrRBpBdDEiqP8L2rsGd+zU7eHgA2\n\tj9TAEC/62rA6aP2OR2dVHjY47XMKQNZ5uW410pm9JFdKNnAIEic3bS5K3BBJPIb/aww3\n\t2KuQ==","X-Gm-Message-State":"AOAM5311xaWgKqKFumwChcaMtteJBUo0xH7pqFQ0dZzZ0vtljZqZJVAp\n\tcjmSG6cMe8KeTVoRG53BK9WwCcHMKOclKMXp/3HXcA==","X-Google-Smtp-Source":"ABdhPJwnx+gpNEbi2CYBedcvI7//UCHqe2JP2CHEr3kbFeBDLaRALcEe3/l7qJ4XAHqO12U98sGOuddzkz8QYZbBtqk=","X-Received":"by 2002:ac2:4daa:: with SMTP id\n\th10mr6379717lfe.617.1611233129013; \n\tThu, 21 Jan 2021 04:45:29 -0800 (PST)","MIME-Version":"1.0","References":"<20210121115849.682130-1-naush@raspberrypi.com>\n\t<20210121115849.682130-2-naush@raspberrypi.com>\n\t<67cc41fe-40df-3838-0270-1027e620c4c7@ideasonboard.com>","In-Reply-To":"<67cc41fe-40df-3838-0270-1027e620c4c7@ideasonboard.com>","From":"Naushir Patuck <naush@raspberrypi.com>","Date":"Thu, 21 Jan 2021 12:45:17 +0000","Message-ID":"<CAEmqJPrD-CCMzC5mEbnRzbeOKboQxEai_b7ttm266j=N-bcJig@mail.gmail.com>","To":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Subject":"Re: [libcamera-devel] [PATCH 1/4] raspberrypi: Add the correct\n\tinteger const postfix for FrameDurations","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":"multipart/mixed;\n\tboundary=\"===============6314332505138890021==\"","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":14649,"web_url":"https://patchwork.libcamera.org/comment/14649/","msgid":"<YAl48e/MB9rzmRs1@pendragon.ideasonboard.com>","date":"2021-01-21T12:52:01","subject":"Re: [libcamera-devel] [PATCH 1/4] raspberrypi: Add the correct\n\tinteger const postfix for FrameDurations","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"On Thu, Jan 21, 2021 at 12:45:17PM +0000, Naushir Patuck wrote:\n> On Thu, 21 Jan 2021, 12:42 pm Kieran Bingham, wrote:\n> > On 21/01/2021 11:58, Naushir Patuck wrote:\n> > > At startup, ControlInfoMap::generateIdmap() threw a log message warning\n> > > that the controls::FrameDurations had a type mismatch based on the\n> > > min/max values provided in libcamera::RPi::Controls initialiser.\n> > >\n> > > Fix this warning by adding and explicit int64_t postfix to the const\n> > > values for min and max.\n> > >\n> > > Signed-off-by: Naushir Patuck <naush@raspberrypi.com>\n> > > ---\n> > >  include/libcamera/ipa/raspberrypi.h | 2 +-\n> > >  1 file changed, 1 insertion(+), 1 deletion(-)\n> > >\n> > > diff --git a/include/libcamera/ipa/raspberrypi.h b/include/libcamera/ipa/raspberrypi.h\n> > > index 1de36039cee0..8e704d922ce6 100644\n> > > --- a/include/libcamera/ipa/raspberrypi.h\n> > > +++ b/include/libcamera/ipa/raspberrypi.h\n> > > @@ -65,7 +65,7 @@ static const ControlInfoMap Controls = {\n> > >       { &controls::Sharpness, ControlInfo(0.0f, 16.0f, 1.0f) },\n> > >       { &controls::ColourCorrectionMatrix, ControlInfo(-16.0f, 16.0f) },\n> > >       { &controls::ScalerCrop, ControlInfo(Rectangle{}, Rectangle(65535, 65535, 65535, 65535), Rectangle{}) },\n> > > -     { &controls::FrameDurations, ControlInfo(1000, 1000000000) },\n> > > +     { &controls::FrameDurations, ControlInfo(INT64_C(1000), INT64_C(1000000000)) },\n> >\n> > Is this casting a boost-ism?\n> \n> I thought it was part of stdint, but admittedly never checked to confirm.\n> Will do so in a bit.\n\nIt seems standard (and I've just learnt about it :-)). An alternative\ncould be\n\n\t{ &controls::FrameDurations, ControlInfo(1000LL, 1000000000LL) },\n\nIt however seems that we should improve creation of the ControlInfoMap\nto make these casts automatic. An exercise left to the reader :-) For\nnow we can have a simple fix. Please include stdint.h if you want to use\nINT64_C, or use LL instead.\n\nWith this fixed,\n\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\n> > >  };\n> > >\n> > >  } /* namespace RPi */","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 E763DC0F2A\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 21 Jan 2021 12:52:20 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 7AC84681F4;\n\tThu, 21 Jan 2021 13:52:20 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 74DB6681EC\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 21 Jan 2021 13:52:19 +0100 (CET)","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 DEACB50E;\n\tThu, 21 Jan 2021 13:52:18 +0100 (CET)"],"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=\"IHoIBLtl\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1611233539;\n\tbh=vvg7MJM6+qMqo7Tf+SbSU89d/rg4a+1vWHHTcK8Vesk=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=IHoIBLtlzVwsQ08rlYu5/xZO0iSPhpLBjDb9ZGuI3FIpEoqjnjyFPw1ZDc/xpW09C\n\tiXO57MxukNV4BuuWGT/K+cGH64mFqAtjcmc/q0+3QnlIpKoV98W33ys0DulHTdwFoo\n\tgBfJdhoKhJje/54nPZU9hvl79VYzHlMwRaTC051w=","Date":"Thu, 21 Jan 2021 14:52:01 +0200","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Naushir Patuck <naush@raspberrypi.com>","Message-ID":"<YAl48e/MB9rzmRs1@pendragon.ideasonboard.com>","References":"<20210121115849.682130-1-naush@raspberrypi.com>\n\t<20210121115849.682130-2-naush@raspberrypi.com>\n\t<67cc41fe-40df-3838-0270-1027e620c4c7@ideasonboard.com>\n\t<CAEmqJPrD-CCMzC5mEbnRzbeOKboQxEai_b7ttm266j=N-bcJig@mail.gmail.com>","MIME-Version":"1.0","Content-Disposition":"inline","In-Reply-To":"<CAEmqJPrD-CCMzC5mEbnRzbeOKboQxEai_b7ttm266j=N-bcJig@mail.gmail.com>","Subject":"Re: [libcamera-devel] [PATCH 1/4] raspberrypi: Add the correct\n\tinteger const postfix for FrameDurations","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>"}},{"id":14650,"web_url":"https://patchwork.libcamera.org/comment/14650/","msgid":"<541e1f74-4df5-1352-21c4-244267d4e5f5@ideasonboard.com>","date":"2021-01-21T12:57:59","subject":"Re: [libcamera-devel] [PATCH 1/4] raspberrypi: Add the correct\n\tinteger const postfix for FrameDurations","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"On 21/01/2021 12:52, Laurent Pinchart wrote:\n> On Thu, Jan 21, 2021 at 12:45:17PM +0000, Naushir Patuck wrote:\n>> On Thu, 21 Jan 2021, 12:42 pm Kieran Bingham, wrote:\n>>> On 21/01/2021 11:58, Naushir Patuck wrote:\n>>>> At startup, ControlInfoMap::generateIdmap() threw a log message warning\n>>>> that the controls::FrameDurations had a type mismatch based on the\n>>>> min/max values provided in libcamera::RPi::Controls initialiser.\n>>>>\n>>>> Fix this warning by adding and explicit int64_t postfix to the const\n>>>> values for min and max.\n>>>>\n>>>> Signed-off-by: Naushir Patuck <naush@raspberrypi.com>\n>>>> ---\n>>>>  include/libcamera/ipa/raspberrypi.h | 2 +-\n>>>>  1 file changed, 1 insertion(+), 1 deletion(-)\n>>>>\n>>>> diff --git a/include/libcamera/ipa/raspberrypi.h b/include/libcamera/ipa/raspberrypi.h\n>>>> index 1de36039cee0..8e704d922ce6 100644\n>>>> --- a/include/libcamera/ipa/raspberrypi.h\n>>>> +++ b/include/libcamera/ipa/raspberrypi.h\n>>>> @@ -65,7 +65,7 @@ static const ControlInfoMap Controls = {\n>>>>       { &controls::Sharpness, ControlInfo(0.0f, 16.0f, 1.0f) },\n>>>>       { &controls::ColourCorrectionMatrix, ControlInfo(-16.0f, 16.0f) },\n>>>>       { &controls::ScalerCrop, ControlInfo(Rectangle{}, Rectangle(65535, 65535, 65535, 65535), Rectangle{}) },\n>>>> -     { &controls::FrameDurations, ControlInfo(1000, 1000000000) },\n>>>> +     { &controls::FrameDurations, ControlInfo(INT64_C(1000), INT64_C(1000000000)) },\n>>>\n>>> Is this casting a boost-ism?\n>>\n>> I thought it was part of stdint, but admittedly never checked to confirm.\n>> Will do so in a bit.\n> \n> It seems standard (and I've just learnt about it :-)). An alternative\n> could be\n> \n> \t{ &controls::FrameDurations, ControlInfo(1000LL, 1000000000LL) },\n> \n> It however seems that we should improve creation of the ControlInfoMap\n> to make these casts automatic. An exercise left to the reader :-) For\n> now we can have a simple fix. Please include stdint.h if you want to use\n> INT64_C, or use LL instead.\n> \n> With this fixed,\n> \n> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\nI'm surprised that it generates a warning putting a long into a long\nlong, but I can see that it's a type mismatch indeed.\n\nPersonally, the LL style would be more what I'm used to (hence not\nknowing about the INT64_C()) But either way:\n\nWith that and an \"ipa:\" prefix in the subject to match the other patches:\n\nReviewed-by: Kieran Bingham <kieran.bingham@ideaasonboard.com>\n\n\n\n> \n>>>>  };\n>>>>\n>>>>  } /* namespace RPi */\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 BD6C1BD808\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 21 Jan 2021 12:58:04 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 47F22681F6;\n\tThu, 21 Jan 2021 13:58:04 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 25970681EC\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 21 Jan 2021 13:58:03 +0100 (CET)","from [192.168.0.20]\n\t(cpc89244-aztw30-2-0-cust3082.18-1.cable.virginm.net [86.31.172.11])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 914A350E;\n\tThu, 21 Jan 2021 13:58:02 +0100 (CET)"],"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=\"bH2bukp5\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1611233882;\n\tbh=lxIKbqQSL7xLUmnWwfFJOhUBAXy++juJW3xtk+Gg9IE=;\n\th=Reply-To:Subject:To:Cc:References:From:Date:In-Reply-To:From;\n\tb=bH2bukp5T0XjUojPBOzBGNH+Wp6wPjhmawU0IdPpq8X44VihhWwk3eSrpZCLW4XcB\n\t+6fjVo0aqtKZjtD/KbBdfgwcjqZpYcG0GS9ikay3BBsaVglWiZEgs9mXXo32LQc9lc\n\tdsaL/QKf1LJMsKXiHJN0DzmO+lZ8Dx7eNlM+e53k=","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>,\n\tNaushir Patuck <naush@raspberrypi.com>","References":"<20210121115849.682130-1-naush@raspberrypi.com>\n\t<20210121115849.682130-2-naush@raspberrypi.com>\n\t<67cc41fe-40df-3838-0270-1027e620c4c7@ideasonboard.com>\n\t<CAEmqJPrD-CCMzC5mEbnRzbeOKboQxEai_b7ttm266j=N-bcJig@mail.gmail.com>\n\t<YAl48e/MB9rzmRs1@pendragon.ideasonboard.com>","From":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Autocrypt":"addr=kieran.bingham@ideasonboard.com; keydata=\n\tmQINBFYE/WYBEACs1PwjMD9rgCu1hlIiUA1AXR4rv2v+BCLUq//vrX5S5bjzxKAryRf0uHat\n\tV/zwz6hiDrZuHUACDB7X8OaQcwhLaVlq6byfoBr25+hbZG7G3+5EUl9cQ7dQEdvNj6V6y/SC\n\trRanWfelwQThCHckbobWiQJfK9n7rYNcPMq9B8e9F020LFH7Kj6YmO95ewJGgLm+idg1Kb3C\n\tpotzWkXc1xmPzcQ1fvQMOfMwdS+4SNw4rY9f07Xb2K99rjMwZVDgESKIzhsDB5GY465sCsiQ\n\tcSAZRxqE49RTBq2+EQsbrQpIc8XiffAB8qexh5/QPzCmR4kJgCGeHIXBtgRj+nIkCJPZvZtf\n\tKr2EAbc6tgg6DkAEHJb+1okosV09+0+TXywYvtEop/WUOWQ+zo+Y/OBd+8Ptgt1pDRyOBzL8\n\tRXa8ZqRf0Mwg75D+d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Lb8OFs85kuSvFdgqZwgxA1vl4TFhNz\n\tPZ79NAmXLackAx3sOVFhk4WQaKRshCB7cSl+RIng5S/ThOBlwNlcKG7j7W2MC06BlTbdEkUp\n\tECzuuRBv8wX4OQl+hbWbB/VKIx5HKlLu1eypen/5lNVzSqMMIYkkZcjV2SWQyUGxSwq0O/sx\n\tS0A8/atCHUXOboUsn54qdxrVDaK+6jIAuo8JiRWctP16KjzUM7MO0/+4zllM8EY57rXrj48j\n\tsbEYX0YQnzaj+jO6kJtoZsIaYR7rMMq9aUAjyiaEZpmP1qF/2sYenDx0Fg2BSlLvLvXM0vU8\n\tpQk3kgDu7kb/7PRYrZvBsr21EIQoIjXbZxDz/o7z95frkP71EaICttZ6k9q5oxxA5WC6sTXc\n\tMW8zs8avFNuA9VpXt0YupJd2ijtZy2mpZNG02fFVXhIn4G807G7+9mhuC4XG5rKlBBUXTvPU\n\tAfYnB4JBDLmLzBFavQfvonSfbitgXwCG3vS+9HEwAjU30Bar1PEOmIbiAoMzuKeRm2LVpmq4\n\tWZw01QYHU/GUV/zHJSFk","Organization":"Ideas on Board","Message-ID":"<541e1f74-4df5-1352-21c4-244267d4e5f5@ideasonboard.com>","Date":"Thu, 21 Jan 2021 12:57:59 +0000","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101\n\tThunderbird/68.10.0","MIME-Version":"1.0","In-Reply-To":"<YAl48e/MB9rzmRs1@pendragon.ideasonboard.com>","Content-Language":"en-GB","Subject":"Re: [libcamera-devel] [PATCH 1/4] raspberrypi: Add the correct\n\tinteger const postfix for FrameDurations","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>","Reply-To":"kieran.bingham@ideasonboard.com","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>"}},{"id":14659,"web_url":"https://patchwork.libcamera.org/comment/14659/","msgid":"<CAEmqJPowagqU9oBSso0DRZB7Ddy5r9NmhVTounPMdYS_gEkfkg@mail.gmail.com>","date":"2021-01-21T16:11:36","subject":"Re: [libcamera-devel] [PATCH 1/4] raspberrypi: Add the correct\n\tinteger const postfix for FrameDurations","submitter":{"id":34,"url":"https://patchwork.libcamera.org/api/people/34/","name":"Naushir Patuck","email":"naush@raspberrypi.com"},"content":"Hi Kieran,\n\nThank you both for your review feedback.\n\nOn Thu, 21 Jan 2021 at 12:58, Kieran Bingham <\nkieran.bingham@ideasonboard.com> wrote:\n\n> On 21/01/2021 12:52, Laurent Pinchart wrote:\n> > On Thu, Jan 21, 2021 at 12:45:17PM +0000, Naushir Patuck wrote:\n> >> On Thu, 21 Jan 2021, 12:42 pm Kieran Bingham, wrote:\n> >>> On 21/01/2021 11:58, Naushir Patuck wrote:\n> >>>> At startup, ControlInfoMap::generateIdmap() threw a log message\n> warning\n> >>>> that the controls::FrameDurations had a type mismatch based on the\n> >>>> min/max values provided in libcamera::RPi::Controls initialiser.\n> >>>>\n> >>>> Fix this warning by adding and explicit int64_t postfix to the const\n> >>>> values for min and max.\n> >>>>\n> >>>> Signed-off-by: Naushir Patuck <naush@raspberrypi.com>\n> >>>> ---\n> >>>>  include/libcamera/ipa/raspberrypi.h | 2 +-\n> >>>>  1 file changed, 1 insertion(+), 1 deletion(-)\n> >>>>\n> >>>> diff --git a/include/libcamera/ipa/raspberrypi.h\n> b/include/libcamera/ipa/raspberrypi.h\n> >>>> index 1de36039cee0..8e704d922ce6 100644\n> >>>> --- a/include/libcamera/ipa/raspberrypi.h\n> >>>> +++ b/include/libcamera/ipa/raspberrypi.h\n> >>>> @@ -65,7 +65,7 @@ static const ControlInfoMap Controls = {\n> >>>>       { &controls::Sharpness, ControlInfo(0.0f, 16.0f, 1.0f) },\n> >>>>       { &controls::ColourCorrectionMatrix, ControlInfo(-16.0f, 16.0f)\n> },\n> >>>>       { &controls::ScalerCrop, ControlInfo(Rectangle{},\n> Rectangle(65535, 65535, 65535, 65535), Rectangle{}) },\n> >>>> -     { &controls::FrameDurations, ControlInfo(1000, 1000000000) },\n> >>>> +     { &controls::FrameDurations, ControlInfo(INT64_C(1000),\n> INT64_C(1000000000)) },\n> >>>\n> >>> Is this casting a boost-ism?\n> >>\n> >> I thought it was part of stdint, but admittedly never checked to\n> confirm.\n> >> Will do so in a bit.\n> >\n> > It seems standard (and I've just learnt about it :-)). An alternative\n> > could be\n> >\n> >       { &controls::FrameDurations, ControlInfo(1000LL, 1000000000LL) },\n> >\n> > It however seems that we should improve creation of the ControlInfoMap\n> > to make these casts automatic. An exercise left to the reader :-) For\n> > now we can have a simple fix. Please include stdint.h if you want to use\n> > INT64_C, or use LL instead.\n>\n\nI knew this would come up :-)\n\nMy original implementation did use LL (I did not know about INT64_C\neither).  However, by using \"LL\" i get a curious compile error:\n\nIn file included from\n../src/libcamera/pipeline/raspberrypi/raspberrypi.cpp:20:\n../include/libcamera/ipa/raspberrypi.h:68:63: error: no matching function\nfor call to ‘libcamera::ControlInfo::ControlInfo(long long int, long long\nint)’\n   68 |  { &controls::FrameDurations, ControlInfo(1000LL, 1000000000LL) },\n\nThe compilation fails in gcc version 9.30 and 10.2.0 and clang version 10\non my Linux machine.  Curiously, I just tried it on my Raspberry Pi and it\ncompiles fine with gcc v 8.30.\n\nThis is why I originally switched to INT64_C which works everywhere.  It\nslipped my mind, and I did not get a chance to investigate further.  I can\nonly assume from this result that INT64_C macro uses the L postfix, which\ndoes compile fine.  Anyone have any ideas as to what is going on?\n\nRegards,\nNaush\n\n>\n> > With this fixed,\n> >\n> > Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n>\n> I'm surprised that it generates a warning putting a long into a long\n> long, but I can see that it's a type mismatch indeed.\n>\n> Personally, the LL style would be more what I'm used to (hence not\n> knowing about the INT64_C()) But either way:\n>\n> With that and an \"ipa:\" prefix in the subject to match the other patches:\n>\n> Reviewed-by: Kieran Bingham <kieran.bingham@ideaasonboard.com>\n>\n>\n>\n> >\n> >>>>  };\n> >>>>\n> >>>>  } /* namespace RPi */\n> >\n>\n> --\n> Regards\n> --\n> Kieran\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 25CE9C0F2A\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 21 Jan 2021 16:11:56 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 94A7968207;\n\tThu, 21 Jan 2021 17:11:55 +0100 (CET)","from mail-lj1-x22e.google.com (mail-lj1-x22e.google.com\n\t[IPv6:2a00:1450:4864:20::22e])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id DF23B681E9\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 21 Jan 2021 17:11:53 +0100 (CET)","by mail-lj1-x22e.google.com with SMTP id n11so3105886lji.5\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 21 Jan 2021 08:11:53 -0800 (PST)"],"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=\"LrcvdRgy\"; 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\t:cc; bh=1j/1cq7lNdke2zvIjRaVGhapOyn3zdrVCRkkvpNUpw4=;\n\tb=LrcvdRgyKhnCb5qx5Boj1InwIFNapZnr2nBlPIG0llraQs0Bh5YOVj8w3l5frtS+FL\n\tPJwyrUPA3CYqxvJ91FwOd00EH3OE5S0zYkL6R8x9vyokRRgJq9hsa+O9iceqXV8nUjoF\n\tWXG0DYslY3AhXtfTBTY4+/S4DNjtP3lCIDcNVk+MMeRBVqOV51TeuNTIFjnnUyx7gpIK\n\tQN+DW7m4SmEaZVcSw7ZDzu+6ba994bkwt5buuCutI9e2SmfjVWanw8kD3Zf2R5yIUBm+\n\tPDL2R+dZdezIQAb9DBHuBFLmUesz+madFp+/PhelmqWAuYiSihsZVaGEfFOdN7rzyDjP\n\tYDCQ==","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:cc;\n\tbh=1j/1cq7lNdke2zvIjRaVGhapOyn3zdrVCRkkvpNUpw4=;\n\tb=GWtAYqgpQQwvmJsMMXuxUYcwhiC1DX4Mor5c8/BADhfOjB7WwAC9RE9XDD/PGo1iPp\n\tkrTKYHkUfmAxdj9l8pOzdLfz96OaU2C7jmvhAt2vURRM+wpTESL1OBLrj/0BB//+52Bo\n\tWTAv6D7px4RTY2mvFz85GDps9qgnNo+ahT8ZBmuZTxh9X3Vdo0zA4APWOzhJnh04X1xi\n\txpGJu6RAsFStQuSOHzkCseXzsSc8PwL3gtQspYhcp0ymPW/D62h1IpPvw3Wy9125r6MO\n\tLYvx3VuQUcqK9dUSkQCPwXjbw1AqWvl76eG4uTkLBg+Yy3NmYzz5z8us6HuvwDoisWhs\n\tlJMw==","X-Gm-Message-State":"AOAM53343N6I+02qra935Wx4pO8D4hUNey+KQQ94j+ssdAvvKgFM/FVb\n\tXRoo0/Q8Lp8MxXgw4DeoI/uBjqYZO8iuI154SaJ0P/v1u8DfEg==","X-Google-Smtp-Source":"ABdhPJzhHJOmvxG+mgVyMHi11nVfpgvshUpuP5muX6TBlZy07saP4Y26DhiKLGlDF3Yr8RNZmGDD366scmqLguaB5D8=","X-Received":"by 2002:a05:651c:544:: with SMTP id\n\tq4mr15937ljp.253.1611245513054; \n\tThu, 21 Jan 2021 08:11:53 -0800 (PST)","MIME-Version":"1.0","References":"<20210121115849.682130-1-naush@raspberrypi.com>\n\t<20210121115849.682130-2-naush@raspberrypi.com>\n\t<67cc41fe-40df-3838-0270-1027e620c4c7@ideasonboard.com>\n\t<CAEmqJPrD-CCMzC5mEbnRzbeOKboQxEai_b7ttm266j=N-bcJig@mail.gmail.com>\n\t<YAl48e/MB9rzmRs1@pendragon.ideasonboard.com>\n\t<541e1f74-4df5-1352-21c4-244267d4e5f5@ideasonboard.com>","In-Reply-To":"<541e1f74-4df5-1352-21c4-244267d4e5f5@ideasonboard.com>","From":"Naushir Patuck <naush@raspberrypi.com>","Date":"Thu, 21 Jan 2021 16:11:36 +0000","Message-ID":"<CAEmqJPowagqU9oBSso0DRZB7Ddy5r9NmhVTounPMdYS_gEkfkg@mail.gmail.com>","To":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Subject":"Re: [libcamera-devel] [PATCH 1/4] raspberrypi: Add the correct\n\tinteger const postfix for FrameDurations","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":"multipart/mixed;\n\tboundary=\"===============6191966919938174906==\"","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":14717,"web_url":"https://patchwork.libcamera.org/comment/14717/","msgid":"<265e370e-c71d-74c7-8215-f6fc4b3cf066@ideasonboard.com>","date":"2021-01-22T15:08:45","subject":"Re: [libcamera-devel] [PATCH 1/4] raspberrypi: Add the correct\n\tinteger const postfix for FrameDurations","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"Hi Naush,\n\nOn 21/01/2021 16:11, Naushir Patuck wrote:\n> Hi Kieran,\n> \n> Thank you both for your review feedback.\n> \n> On Thu, 21 Jan 2021 at 12:58, Kieran Bingham\n> <kieran.bingham@ideasonboard.com\n> <mailto:kieran.bingham@ideasonboard.com>> wrote:\n> \n>     On 21/01/2021 12:52, Laurent Pinchart wrote:\n>     > On Thu, Jan 21, 2021 at 12:45:17PM +0000, Naushir Patuck wrote:\n>     >> On Thu, 21 Jan 2021, 12:42 pm Kieran Bingham, wrote:\n>     >>> On 21/01/2021 11:58, Naushir Patuck wrote:\n>     >>>> At startup, ControlInfoMap::generateIdmap() threw a log message\n>     warning\n>     >>>> that the controls::FrameDurations had a type mismatch based on the\n>     >>>> min/max values provided in libcamera::RPi::Controls initialiser.\n>     >>>>\n>     >>>> Fix this warning by adding and explicit int64_t postfix to the\n>     const\n>     >>>> values for min and max.\n>     >>>>\n>     >>>> Signed-off-by: Naushir Patuck <naush@raspberrypi.com\n>     <mailto:naush@raspberrypi.com>>\n>     >>>> ---\n>     >>>>  include/libcamera/ipa/raspberrypi.h | 2 +-\n>     >>>>  1 file changed, 1 insertion(+), 1 deletion(-)\n>     >>>>\n>     >>>> diff --git a/include/libcamera/ipa/raspberrypi.h\n>     b/include/libcamera/ipa/raspberrypi.h\n>     >>>> index 1de36039cee0..8e704d922ce6 100644\n>     >>>> --- a/include/libcamera/ipa/raspberrypi.h\n>     >>>> +++ b/include/libcamera/ipa/raspberrypi.h\n>     >>>> @@ -65,7 +65,7 @@ static const ControlInfoMap Controls = {\n>     >>>>       { &controls::Sharpness, ControlInfo(0.0f, 16.0f, 1.0f) },\n>     >>>>       { &controls::ColourCorrectionMatrix, ControlInfo(-16.0f,\n>     16.0f) },\n>     >>>>       { &controls::ScalerCrop, ControlInfo(Rectangle{},\n>     Rectangle(65535, 65535, 65535, 65535), Rectangle{}) },\n>     >>>> -     { &controls::FrameDurations, ControlInfo(1000, 1000000000) },\n>     >>>> +     { &controls::FrameDurations, ControlInfo(INT64_C(1000),\n>     INT64_C(1000000000)) },\n>     >>>\n>     >>> Is this casting a boost-ism?\n>     >>\n>     >> I thought it was part of stdint, but admittedly never checked to\n>     confirm.\n>     >> Will do so in a bit.\n>     >\n>     > It seems standard (and I've just learnt about it :-)). An alternative\n>     > could be\n>     >\n>     >       { &controls::FrameDurations, ControlInfo(1000LL,\n>     1000000000LL) },\n>     >\n>     > It however seems that we should improve creation of the ControlInfoMap\n>     > to make these casts automatic. An exercise left to the reader :-) For\n>     > now we can have a simple fix. Please include stdint.h if you want\n>     to use\n>     > INT64_C, or use LL instead.\n> \n> \n> I knew this would come up :-)\n> \n> My original implementation did use LL (I did not know about INT64_C\n> either).  However, by using \"LL\" i get a curious compile error:\n> \n> In file included from\n> ../src/libcamera/pipeline/raspberrypi/raspberrypi.cpp:20:\n> ../include/libcamera/ipa/raspberrypi.h:68:63: error: no matching\n> function for call to ‘libcamera::ControlInfo::ControlInfo(long long int,\n> long long int)’\n>    68 |  { &controls::FrameDurations, ControlInfo(1000LL, 1000000000LL) },\n> \n> The compilation fails in gcc version 9.30 and 10.2.0 and clang version\n> 10 on my Linux machine.  Curiously, I just tried it on my Raspberry Pi\n> and it compiles fine with gcc v 8.30.  \n> \n> This is why I originally switched to INT64_C which works everywhere.  It\n> slipped my mind, and I did not get a chance to investigate further.  I\n> can only assume from this result that INT64_C macro uses the L postfix,\n> which does compile fine.  Anyone have any ideas as to what is going on?\n\nOh isn't C/C++ wonderful.\n\nI only raised the INT64_C() as it stood out as something I'd not seen\nbefore. If it's part of stdint.h and works I wouldn't object to using that.\n\n--\nKieran\n\n\n> Regards,\n> Naush\n> \n>     >\n>     > With this fixed,\n>     >\n>     > Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com\n>     <mailto:laurent.pinchart@ideasonboard.com>>\n> \n>     I'm surprised that it generates a warning putting a long into a long\n>     long, but I can see that it's a type mismatch indeed.\n> \n>     Personally, the LL style would be more what I'm used to (hence not\n>     knowing about the INT64_C()) But either way:\n> \n>     With that and an \"ipa:\" prefix in the subject to match the other\n>     patches:\n> \n>     Reviewed-by: Kieran Bingham <kieran.bingham@ideaasonboard.com\n>     <mailto:kieran.bingham@ideaasonboard.com>>\n> \n> \n> \n>     >\n>     >>>>  };\n>     >>>>\n>     >>>>  } /* namespace RPi */\n>     >\n> \n>     -- \n>     Regards\n>     --\n>     Kieran\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 7BBA9BD808\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 22 Jan 2021 15:08:50 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 4A7F968274;\n\tFri, 22 Jan 2021 16:08:50 +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 A3B1E68274\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 22 Jan 2021 16:08:48 +0100 (CET)","from [192.168.0.20]\n\t(cpc89244-aztw30-2-0-cust3082.18-1.cable.virginm.net [86.31.172.11])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 2DFC14FD;\n\tFri, 22 Jan 2021 16:08:48 +0100 (CET)"],"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=\"AYFPbrDk\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1611328128;\n\tbh=zMNFisecsS+zKaS883G7WExFxwV9G+dyMGBYocPhEt8=;\n\th=Reply-To:Subject:To:Cc:References:From:Date:In-Reply-To:From;\n\tb=AYFPbrDkv6Y8XuRS8b1Xh+JB8rQVe3YmBBcFA2/Qj+9qL66GutM1CgQco7cSTrCnU\n\tBymZeXYhNnVlC9/N9440MSLARewKRCcVF4pwOFvHL64+auobzvKH+pivjX6DHewRLZ\n\t1qw0fQ+ptbCiZPj3lAlTef2oaG5aEfPk4cgC/HGY=","To":"Naushir Patuck <naush@raspberrypi.com>","References":"<20210121115849.682130-1-naush@raspberrypi.com>\n\t<20210121115849.682130-2-naush@raspberrypi.com>\n\t<67cc41fe-40df-3838-0270-1027e620c4c7@ideasonboard.com>\n\t<CAEmqJPrD-CCMzC5mEbnRzbeOKboQxEai_b7ttm266j=N-bcJig@mail.gmail.com>\n\t<YAl48e/MB9rzmRs1@pendragon.ideasonboard.com>\n\t<541e1f74-4df5-1352-21c4-244267d4e5f5@ideasonboard.com>\n\t<CAEmqJPowagqU9oBSso0DRZB7Ddy5r9NmhVTounPMdYS_gEkfkg@mail.gmail.com>","From":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Autocrypt":"addr=kieran.bingham@ideasonboard.com; keydata=\n\tmQINBFYE/WYBEACs1PwjMD9rgCu1hlIiUA1AXR4rv2v+BCLUq//vrX5S5bjzxKAryRf0uHat\n\tV/zwz6hiDrZuHUACDB7X8OaQcwhLaVlq6byfoBr25+hbZG7G3+5EUl9cQ7dQEdvNj6V6y/SC\n\trRanWfelwQThCHckbobWiQJfK9n7rYNcPMq9B8e9F020LFH7Kj6YmO95ewJGgLm+idg1Kb3C\n\tpotzWkXc1xmPzcQ1fvQMOfMwdS+4SNw4rY9f07Xb2K99rjMwZVDgESKIzhsDB5GY465sCsiQ\n\tcSAZRxqE49RTBq2+EQsbrQpIc8XiffAB8qexh5/QPzCmR4kJgCGeHIXBtgRj+nIkCJPZvZtf\n\tKr2EAbc6tgg6DkAEHJb+1okosV09+0+TXywYvtEop/WUOWQ+zo+Y/OBd+8Ptgt1pDRyOBzL8\n\tRXa8ZqRf0Mwg75D+dKntZeJHzPRJyrlfQokngAAs4PaFt6UfS+ypMAF37T6CeDArQC41V3ko\n\tlPn1yMsVD0p+6i3DPvA/GPIksDC4owjnzVX9kM8Zc5Cx+XoAN0w5Eqo4t6qEVbuettxx55gq\n\t8K8FieAjgjMSxngo/HST8TpFeqI5nVeq0/lqtBRQKumuIqDg+Bkr4L1V/PSB6XgQcOdhtd36\n\tOe9X9dXB8YSNt7VjOcO7BTmFn/Z8r92mSAfHXpb07YJWJosQOQARAQABtDBLaWVyYW4gQmlu\n\tZ2hhbSA8a2llcmFuLmJpbmdoYW1AaWRlYXNvbmJvYXJkLmNvbT6JAlcEEwEKAEECGwMFCwkI\n\tBwIGFQgJCgsCBBYCAwECHgECF4ACGQEWIQSQLdeYP70o/eNy1HqhHkZyEKRh/QUCXWTtygUJ\n\tCyJXZAAKCRChHkZyEKRh/f8dEACTDsbLN2nioNZMwyLuQRUAFc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nB4JBDLmLzBFavQfvonSfbitgXwCG3vS+9HEwAjU30Bar1PEOmIbiAoMzuKeRm2LVpmq4\n\tWZw01QYHU/GUV/zHJSFk","Organization":"Ideas on Board","Message-ID":"<265e370e-c71d-74c7-8215-f6fc4b3cf066@ideasonboard.com>","Date":"Fri, 22 Jan 2021 15:08:45 +0000","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101\n\tThunderbird/68.10.0","MIME-Version":"1.0","In-Reply-To":"<CAEmqJPowagqU9oBSso0DRZB7Ddy5r9NmhVTounPMdYS_gEkfkg@mail.gmail.com>","Content-Language":"en-GB","Subject":"Re: [libcamera-devel] [PATCH 1/4] raspberrypi: Add the correct\n\tinteger const postfix for FrameDurations","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>","Reply-To":"kieran.bingham@ideasonboard.com","Cc":"libcamera devel <libcamera-devel@lists.libcamera.org>","Content-Type":"text/plain; charset=\"utf-8\"","Content-Transfer-Encoding":"base64","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":14733,"web_url":"https://patchwork.libcamera.org/comment/14733/","msgid":"<YAxVba14I85mMzII@pendragon.ideasonboard.com>","date":"2021-01-23T16:57:17","subject":"Re: [libcamera-devel] [PATCH 1/4] raspberrypi: Add the correct\n\tinteger const postfix for FrameDurations","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Naush,\n\nOn Thu, Jan 21, 2021 at 04:11:36PM +0000, Naushir Patuck wrote:\n> On Thu, 21 Jan 2021 at 12:58, Kieran Bingham wrote:\n> > On 21/01/2021 12:52, Laurent Pinchart wrote:\n> > > On Thu, Jan 21, 2021 at 12:45:17PM +0000, Naushir Patuck wrote:\n> > >> On Thu, 21 Jan 2021, 12:42 pm Kieran Bingham, wrote:\n> > >>> On 21/01/2021 11:58, Naushir Patuck wrote:\n> > >>>> At startup, ControlInfoMap::generateIdmap() threw a log message warning\n> > >>>> that the controls::FrameDurations had a type mismatch based on the\n> > >>>> min/max values provided in libcamera::RPi::Controls initialiser.\n> > >>>>\n> > >>>> Fix this warning by adding and explicit int64_t postfix to the const\n> > >>>> values for min and max.\n> > >>>>\n> > >>>> Signed-off-by: Naushir Patuck <naush@raspberrypi.com>\n> > >>>> ---\n> > >>>>  include/libcamera/ipa/raspberrypi.h | 2 +-\n> > >>>>  1 file changed, 1 insertion(+), 1 deletion(-)\n> > >>>>\n> > >>>> diff --git a/include/libcamera/ipa/raspberrypi.h b/include/libcamera/ipa/raspberrypi.h\n> > >>>> index 1de36039cee0..8e704d922ce6 100644\n> > >>>> --- a/include/libcamera/ipa/raspberrypi.h\n> > >>>> +++ b/include/libcamera/ipa/raspberrypi.h\n> > >>>> @@ -65,7 +65,7 @@ static const ControlInfoMap Controls = {\n> > >>>>       { &controls::Sharpness, ControlInfo(0.0f, 16.0f, 1.0f) },\n> > >>>>       { &controls::ColourCorrectionMatrix, ControlInfo(-16.0f, 16.0f) },\n> > >>>>       { &controls::ScalerCrop, ControlInfo(Rectangle{}, Rectangle(65535, 65535, 65535, 65535), Rectangle{}) },\n> > >>>> -     { &controls::FrameDurations, ControlInfo(1000, 1000000000) },\n> > >>>> +     { &controls::FrameDurations, ControlInfo(INT64_C(1000), INT64_C(1000000000)) },\n> > >>>\n> > >>> Is this casting a boost-ism?\n> > >>\n> > >> I thought it was part of stdint, but admittedly never checked to confirm.\n> > >> Will do so in a bit.\n> > >\n> > > It seems standard (and I've just learnt about it :-)). An alternative\n> > > could be\n> > >\n> > >       { &controls::FrameDurations, ControlInfo(1000LL, 1000000000LL) },\n> > >\n> > > It however seems that we should improve creation of the ControlInfoMap\n> > > to make these casts automatic. An exercise left to the reader :-) For\n> > > now we can have a simple fix. Please include stdint.h if you want to use\n> > > INT64_C, or use LL instead.\n> \n> I knew this would come up :-)\n> \n> My original implementation did use LL (I did not know about INT64_C\n> either).  However, by using \"LL\" i get a curious compile error:\n> \n> In file included from\n> ../src/libcamera/pipeline/raspberrypi/raspberrypi.cpp:20:\n> ../include/libcamera/ipa/raspberrypi.h:68:63: error: no matching function\n> for call to ‘libcamera::ControlInfo::ControlInfo(long long int, long long\n> int)’\n>    68 |  { &controls::FrameDurations, ControlInfo(1000LL, 1000000000LL) },\n> \n> The compilation fails in gcc version 9.30 and 10.2.0 and clang version 10\n> on my Linux machine.  Curiously, I just tried it on my Raspberry Pi and it\n> compiles fine with gcc v 8.30.\n\nAs RPi is a 32-bit platform, int64_t maps to long long, so the LL suffix\nmatches. On a 64-bit platform, int64_t maps to long, so LL isn't the\nsame type (even if the two types are equivalent).\n\n> This is why I originally switched to INT64_C which works everywhere.  It\n> slipped my mind, and I did not get a chance to investigate further.  I can\n> only assume from this result that INT64_C macro uses the L postfix, which\n> does compile fine.  Anyone have any ideas as to what is going on?\n\nINT64_C is the right way to go. You only need to include stdint.h.\n\n> > > With this fixed,\n> > >\n> > > Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n> >\n> > I'm surprised that it generates a warning putting a long into a long\n> > long, but I can see that it's a type mismatch indeed.\n> >\n> > Personally, the LL style would be more what I'm used to (hence not\n> > knowing about the INT64_C()) But either way:\n> >\n> > With that and an \"ipa:\" prefix in the subject to match the other patches:\n> >\n> > Reviewed-by: Kieran Bingham <kieran.bingham@ideaasonboard.com>\n> >\n> > >>>>  };\n> > >>>>\n> > >>>>  } /* namespace RPi */","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 4A9EEC0F2B\n\tfor <parsemail@patchwork.libcamera.org>;\n\tSat, 23 Jan 2021 16:57:39 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id BB52E68297;\n\tSat, 23 Jan 2021 17:57:38 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 8DC24681DC\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSat, 23 Jan 2021 17:57:37 +0100 (CET)","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 E91AA4FB;\n\tSat, 23 Jan 2021 17:57:36 +0100 (CET)"],"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=\"IlhZaA6t\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1611421057;\n\tbh=G+Hm5k3mueRo9I+bULZq34Q8AzLqSk1l9kaICv/xK2s=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=IlhZaA6tL0U2dTToRyQ2xtvNJxh+uqIvpbhccjHbxqCVtRQSlC8yEGojUajU2kOns\n\tpvr9Cp7dEUyOdvBLUqUOZbJ2Vdy9kn2KFH/p4imveJiX36IYsOJaYORGigI0YezQIq\n\tn53pbcmTcSTUiAyqHEfJDIB1xasM/oeIGdFfhlnc=","Date":"Sat, 23 Jan 2021 18:57:17 +0200","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Naushir Patuck <naush@raspberrypi.com>","Message-ID":"<YAxVba14I85mMzII@pendragon.ideasonboard.com>","References":"<20210121115849.682130-1-naush@raspberrypi.com>\n\t<20210121115849.682130-2-naush@raspberrypi.com>\n\t<67cc41fe-40df-3838-0270-1027e620c4c7@ideasonboard.com>\n\t<CAEmqJPrD-CCMzC5mEbnRzbeOKboQxEai_b7ttm266j=N-bcJig@mail.gmail.com>\n\t<YAl48e/MB9rzmRs1@pendragon.ideasonboard.com>\n\t<541e1f74-4df5-1352-21c4-244267d4e5f5@ideasonboard.com>\n\t<CAEmqJPowagqU9oBSso0DRZB7Ddy5r9NmhVTounPMdYS_gEkfkg@mail.gmail.com>","MIME-Version":"1.0","Content-Disposition":"inline","In-Reply-To":"<CAEmqJPowagqU9oBSso0DRZB7Ddy5r9NmhVTounPMdYS_gEkfkg@mail.gmail.com>","Subject":"Re: [libcamera-devel] [PATCH 1/4] raspberrypi: Add the correct\n\tinteger const postfix for FrameDurations","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=\"utf-8\"","Content-Transfer-Encoding":"base64","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]