[{"id":27609,"web_url":"https://patchwork.libcamera.org/comment/27609/","msgid":"<CAHW6GYJU=WO4e5QNb623s0O=mu+Jwrgk9CggWmJhS722x4Azjg@mail.gmail.com>","date":"2023-07-25T13:03:54","subject":"Re: [libcamera-devel] [PATCH 1/2] py: gen-py-controls: Remove\n\tSceneFlicker workaround","submitter":{"id":42,"url":"https://patchwork.libcamera.org/api/people/42/","name":"David Plowman","email":"david.plowman@raspberrypi.com"},"content":"Hi Kieran\n\nThanks for the patch.\n\nOn Tue, 25 Jul 2023 at 13:56, Kieran Bingham\n<kieran.bingham@ideasonboard.com> wrote:\n>\n> The python bindings layer has to parse the libcamera controls to ensure\n> that they are converted to suitable names for the python layer.\n>\n> Part of this strips out common prefixes from control names, however the\n> SceneFlicker control would end up using an illegal name if processed in\n> the same way as the other controls.\n>\n> The SceneFlicker control has now been removed as part of the\n> introduction of the AeFlickerMode and AeFlickerPeriod controls.\n>\n> Remove the workaround in the python layer.\n>\n> Fixes: 6fdbf3f38c31 (\"libcamera: controls: Add controls for AEC/AGC flicker avoidance\")\n> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n> ---\n>  src/py/libcamera/gen-py-controls.py | 3 ---\n>  1 file changed, 3 deletions(-)\n>\n> diff --git a/src/py/libcamera/gen-py-controls.py b/src/py/libcamera/gen-py-controls.py\n> index 99f3bbcf5b80..9948c41e42b1 100755\n> --- a/src/py/libcamera/gen-py-controls.py\n> +++ b/src/py/libcamera/gen-py-controls.py\n> @@ -48,9 +48,6 @@ def generate_py(controls, mode):\n>              # Adjustments for controls\n>              if name == 'LensShadingMapMode':\n>                  prefix = 'LensShadingMapMode'\n> -            elif name == 'SceneFlicker':\n> -                # If we strip the prefix, we would get '50Hz', which is illegal name\n> -                prefix = ''\n\nThe two single quotes look weirdly like a single double quote in a\nproportional font...!\n\nReviewed-by: David Plowman <david.plowman@raspberrypi.com>\n\nThanks!\nDavid\n\n>              else:\n>                  prefix = find_common_prefix([e['name'] for e in enum])\n>          else:\n> --\n> 2.34.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 E477DBDB13\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 25 Jul 2023 13:04:08 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 3320E628BD;\n\tTue, 25 Jul 2023 15:04:08 +0200 (CEST)","from mail-oi1-x22f.google.com (mail-oi1-x22f.google.com\n\t[IPv6:2607:f8b0:4864:20::22f])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id B138E61E26\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 25 Jul 2023 15:04:06 +0200 (CEST)","by mail-oi1-x22f.google.com with SMTP id\n\t5614622812f47-3a5ac84718dso2127217b6e.0\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 25 Jul 2023 06:04:06 -0700 (PDT)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1690290248;\n\tbh=5JKrIuFDI/CiiVx83KkzeABw/dDo5YUADT0Z+dNlyaA=;\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=FdapcnIGUiG44j/xy4+GCmwEpjINkF2Fsv8O2CHQ/4xtjRmLeqD+NSx9dwtKkpv6I\n\tVDiHLsXfYGQSa0CYmscpLeiQacF10vMHhZZdyomz+ne6TBIFSqdxHi7JUw33llwD6y\n\tVm8Ophv2UoHiiPoeNJzO8mbsw/XPorUmdCRI9S4hkQ11IL/yNHA+aKW5b6N6PkYBTX\n\tldjLM5mhdFcp/lx0NmAvakJhQQTugUlMsnDFcl1MeinjNB2ggT5FCDboOXZZP9RziD\n\tIcATvZS4o/e2i63wZHdfXBnAY0iEhWtgzvhvgWFhroXQbI4ux0J0ZJXB/Nd8RGE+cl\n\tDTkTJpt6oPcdw==","v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=raspberrypi.com; s=google; t=1690290245; x=1690895045;\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=pyZ3zZPU9SpIZonsgqnX1fL+0p2DXeLTt+c59mGgKQE=;\n\tb=Zl2XOIw+/zpG+Hfq70sONW6C5HDhHVmlcEhxIBuHEMp/q//kK7QaGppX+Qul/9Rgf+\n\tRLR/kK2FVrElcQanXWimP1x5oW19kFSyLdPBdE+wEdF+rUCO13U33owMsqRpkenv2F4w\n\taECtu+Ce292wOjSiKP5r5WNZpSmyakZwSxIscEGtxcl2Uq+Ww9CRdaOEXXiXXcg04eCT\n\tu6FfJXphOtVV50aY+Z8sjdQbNVVxDSqGbJwfwZRljNPH640QweDQAns3ysxF8awvhA1a\n\tKCrjfb+/6wcfg1jO3dtlIaH1UJ846gnyVh8wEkxRScDfsQQp68Mwl5jIgaJOOkefV3AB\n\t4eOw=="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (2048-bit key; \n\tunprotected) header.d=raspberrypi.com\n\theader.i=@raspberrypi.com\n\theader.b=\"Zl2XOIw+\"; dkim-atps=neutral","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20221208; t=1690290245; x=1690895045;\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=pyZ3zZPU9SpIZonsgqnX1fL+0p2DXeLTt+c59mGgKQE=;\n\tb=hrwvVHD446vjLNmSXpjOt+JCxqcXFv0JTv+xwVFVxrkbeCk8taJusin9wIPArVnRcd\n\t66VwMijoXQfO1hlLcEtP94LEQC6CprVeWKZoeo1uaaGMSJ2yvzL1fJCvLCktkUpjuZYv\n\tNFPaKkYiPwE2J9CanVY0AK8sFNud/cN0feFgSvhzAQZcF/xIm6v17D9Pt9W5tTeomvll\n\tg0dUYCHmkkq5I6nIs9HQhDADvNmjfAhKs9TmfGo5naJeND04yMyjec3bWXa2C7pG8JbC\n\tZ9KmFx5l3ipb9hj5YJ7pKc9ztBfacJpUT45UZ11/PtInOqMl2M0zeQNLslSmn/8aPLsN\n\tUXhw==","X-Gm-Message-State":"ABy/qLZxO3L+8I6tkrBdURd1Kc/a04qupwjYM+VTuo5MiuHUWUIdM2IX\n\tKMxBMqduJZs9vNMqV07ZNg8+MUndMYx5PgSE4gPoiA==","X-Google-Smtp-Source":"APBJJlFiRHLfVc76GewA13NFcf6CwcQAfYkDNAR/NqzCySBcgDMTWHcMsKG2crS24aaPbU7JMy33B3+436NYLaRuzf4=","X-Received":"by 2002:a05:6808:2023:b0:3a1:df16:2eed with SMTP id\n\tq35-20020a056808202300b003a1df162eedmr16101462oiw.30.1690290245469;\n\tTue, 25 Jul 2023 06:04:05 -0700 (PDT)","MIME-Version":"1.0","References":"<20230725125641.1557350-1-kieran.bingham@ideasonboard.com>\n\t<20230725125641.1557350-2-kieran.bingham@ideasonboard.com>","In-Reply-To":"<20230725125641.1557350-2-kieran.bingham@ideasonboard.com>","Date":"Tue, 25 Jul 2023 14:03:54 +0100","Message-ID":"<CAHW6GYJU=WO4e5QNb623s0O=mu+Jwrgk9CggWmJhS722x4Azjg@mail.gmail.com>","To":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Content-Type":"text/plain; charset=\"UTF-8\"","Subject":"Re: [libcamera-devel] [PATCH 1/2] py: gen-py-controls: Remove\n\tSceneFlicker workaround","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 <libcamera-devel@lists.libcamera.org>,\n\tVedant Paranjape <vedantparanjape160201@gmail.com>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":27611,"web_url":"https://patchwork.libcamera.org/comment/27611/","msgid":"<20230725132843.GF21640@pendragon.ideasonboard.com>","date":"2023-07-25T13:28:43","subject":"Re: [libcamera-devel] [PATCH 1/2] py: gen-py-controls: Remove\n\tSceneFlicker workaround","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Kieran,\n\nThank you for the patch.\n\nOn Tue, Jul 25, 2023 at 01:56:40PM +0100, Kieran Bingham via libcamera-devel wrote:\n> The python bindings layer has to parse the libcamera controls to ensure\n> that they are converted to suitable names for the python layer.\n> \n> Part of this strips out common prefixes from control names, however the\n> SceneFlicker control would end up using an illegal name if processed in\n> the same way as the other controls.\n> \n> The SceneFlicker control has now been removed as part of the\n> introduction of the AeFlickerMode and AeFlickerPeriod controls.\n> \n> Remove the workaround in the python layer.\n> \n> Fixes: 6fdbf3f38c31 (\"libcamera: controls: Add controls for AEC/AGC flicker avoidance\")\n> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\n> ---\n>  src/py/libcamera/gen-py-controls.py | 3 ---\n>  1 file changed, 3 deletions(-)\n> \n> diff --git a/src/py/libcamera/gen-py-controls.py b/src/py/libcamera/gen-py-controls.py\n> index 99f3bbcf5b80..9948c41e42b1 100755\n> --- a/src/py/libcamera/gen-py-controls.py\n> +++ b/src/py/libcamera/gen-py-controls.py\n> @@ -48,9 +48,6 @@ def generate_py(controls, mode):\n>              # Adjustments for controls\n>              if name == 'LensShadingMapMode':\n>                  prefix = 'LensShadingMapMode'\n> -            elif name == 'SceneFlicker':\n> -                # If we strip the prefix, we would get '50Hz', which is illegal name\n> -                prefix = ''\n>              else:\n>                  prefix = find_common_prefix([e['name'] for e in enum])\n>          else:","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 A4FE6BDB13\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 25 Jul 2023 13:28:37 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id F08B5628C0;\n\tTue, 25 Jul 2023 15:28:36 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 15ED261E26\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 25 Jul 2023 15:28:36 +0200 (CEST)","from pendragon.ideasonboard.com (213-243-189-158.bb.dnainternet.fi\n\t[213.243.189.158])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 7D7D2558;\n\tTue, 25 Jul 2023 15:27:37 +0200 (CEST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1690291717;\n\tbh=qUAbATHydQQRZPD/bJ5IgrdU1zoZnA4FQ6n4r3l2h0I=;\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=nBW3ohEyz+YsV5w8wnmaAZxtovhTzuGK3I6f9DZhYSutPQIURpVZfWKTktt9+WHnr\n\tNr2umoDcx3NV59/rRxuGsyBTTfYzwmRzgen7POkfxj+qYQ1yunD9aH4VfJMqiGJoum\n\t5OvmYxHk18WEFiORvZD+eZCWW/MjAQ8FXxhAcbEBGikrSSzu+zOyJoQpJDY7iZYjNB\n\tCQdDjPYdW5XMAyTLSInPvLET7wEoK2h2fucC9eWtPTUwdFNm2u0Ly2K49xcvJd8mwV\n\tsBTWRXXnVMKmF5XWPB2/pgZhTy6u+i5QVftiUx2SdAx/dgFQn6Kz1o+b/u7GiR0nfN\n\ts97ORSg6HHw0Q==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1690291657;\n\tbh=qUAbATHydQQRZPD/bJ5IgrdU1zoZnA4FQ6n4r3l2h0I=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=ijk7xTvauwBnBgirK6/5t7oANGR/bTkFeLnRpPyWGnd9hheuPMS9vna4zCkelPQQd\n\tJjc9G9DP5sggbQWKUo7qp2/cFFKVYf6cWfy8Kb6Zum9hYrY/3isnlu8bZmVUamqT+9\n\tC21lakQ4KwqYfwRYSAc115PC8LTY2sAa4xMad3t8="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"ijk7xTva\"; dkim-atps=neutral","Date":"Tue, 25 Jul 2023 16:28:43 +0300","To":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Message-ID":"<20230725132843.GF21640@pendragon.ideasonboard.com>","References":"<20230725125641.1557350-1-kieran.bingham@ideasonboard.com>\n\t<20230725125641.1557350-2-kieran.bingham@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20230725125641.1557350-2-kieran.bingham@ideasonboard.com>","Subject":"Re: [libcamera-devel] [PATCH 1/2] py: gen-py-controls: Remove\n\tSceneFlicker workaround","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 <libcamera-devel@lists.libcamera.org>,\n\tVedant Paranjape <vedantparanjape160201@gmail.com>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]