[{"id":12653,"web_url":"https://patchwork.libcamera.org/comment/12653/","msgid":"<20200923090904.mwfiyszrrjr22er7@uno.localdomain>","date":"2020-09-23T09:09:04","subject":"Re: [libcamera-devel] [PATCH 2/6] libcamera: Initialise the\n\tSensorOutputSize property","submitter":{"id":3,"url":"https://patchwork.libcamera.org/api/people/3/","name":"Jacopo Mondi","email":"jacopo@jmondi.org"},"content":"Hi David,\n\nOn Tue, Sep 22, 2020 at 11:03:56AM +0100, David Plowman wrote:\n> Add a default initialisation according to the sensor resolution,\n> though it will need updating when the camera mode changes.\n>\n> Signed-off-by: David Plowman <david.plowman@raspberrypi.com>\n> ---\n>  src/libcamera/camera_sensor.cpp | 6 ++++++\n>  1 file changed, 6 insertions(+)\n>\n> diff --git a/src/libcamera/camera_sensor.cpp b/src/libcamera/camera_sensor.cpp\n> index d2679a4..c9a19b0 100644\n> --- a/src/libcamera/camera_sensor.cpp\n> +++ b/src/libcamera/camera_sensor.cpp\n> @@ -277,6 +277,12 @@ int CameraSensor::init()\n>  \t */\n>  \tresolution_ = sizes_.back();\n>\n> +\t/*\n> +\t * Set a default value for the SensorOutputSize, though it will have to\n> +\t * be updated when new camera modes are chosen.\n> +\t */\n> +\tproperties_.set(properties::SensorOutputSize, resolution_);\n> +\n\nThis doesn't actually reflect what's applied to the sensor, but I\nguess it does not make much sense to inspect the property before the\nCamera has been configured. This should probably be made more explicit\nin the property description. Something like:\n\nMaybe change the last two lines of the proposed description in 1/4\n\n  - SensorOutputSize:\n      type: Size\n      description: |\n        The size, in pixels, of the image being used to produce the\n        desired output streams. The image size might correspond to the\n        size of the frames produced by the image sensor but would also\n        take into account additional cropping (or even re-scaling)\n        performed by the CSI-2 receiver to adjust the sensor frame\n        size to conform to the output image sizes and aspect ratios.\n   -->  Note that this property changes with every newly selected\n        camera mode. It can be used to implement digital zoom.\n\nWith:\n        The property is meaningful only after the Camera has been\n        successfully configured and its value changes whenever a new\n        configuration is applied. It can be used to implement digital\n        zoom.\n\n        \\sa controls::ISPCrop\n\n        \\todo Move this property to CameraConfiguration once the\n        feature is made available\n\nOn this specific patch\nReviewed-by: Jacopo Mondi <jacopo@jmondi.org>\n\nThanks\n  j\n\n>  \treturn 0;\n>  }\n>\n> --\n> 2.20.1\n>\n> _______________________________________________\n> libcamera-devel mailing list\n> libcamera-devel@lists.libcamera.org\n> https://lists.libcamera.org/listinfo/libcamera-devel","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 A60A0C3B5C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 23 Sep 2020 09:05:13 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 1F7C862FDF;\n\tWed, 23 Sep 2020 11:05:13 +0200 (CEST)","from relay12.mail.gandi.net (relay12.mail.gandi.net\n\t[217.70.178.232])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 9B37760363\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 23 Sep 2020 11:05:11 +0200 (CEST)","from uno.localdomain (93-34-118-233.ip49.fastwebnet.it\n\t[93.34.118.233]) (Authenticated sender: jacopo@jmondi.org)\n\tby relay12.mail.gandi.net (Postfix) with ESMTPSA id E94F720000C;\n\tWed, 23 Sep 2020 09:05:10 +0000 (UTC)"],"Date":"Wed, 23 Sep 2020 11:09:04 +0200","From":"Jacopo Mondi <jacopo@jmondi.org>","To":"David Plowman <david.plowman@raspberrypi.com>","Message-ID":"<20200923090904.mwfiyszrrjr22er7@uno.localdomain>","References":"<20200922100400.30766-1-david.plowman@raspberrypi.com>\n\t<20200922100400.30766-3-david.plowman@raspberrypi.com>","MIME-Version":"1.0","Content-Disposition":"inline","In-Reply-To":"<20200922100400.30766-3-david.plowman@raspberrypi.com>","Subject":"Re: [libcamera-devel] [PATCH 2/6] libcamera: Initialise the\n\tSensorOutputSize property","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@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>"}}]