[{"id":27797,"web_url":"https://patchwork.libcamera.org/comment/27797/","msgid":"<20230915160615.GB933@pendragon.ideasonboard.com>","date":"2023-09-15T16:06:15","subject":"Re: [libcamera-devel] [PATCH v3 02/12] libcamera: camera: Introduce\n\tSensorConfiguration","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Jacopo,\n\nThank you for the patch.\n\nOn Fri, Sep 15, 2023 at 03:06:40PM +0200, Jacopo Mondi via libcamera-devel wrote:\n> Introduce SensorConfiguration in the libcamera API.\n> \n> The SensorConfiguration is part of the CameraConfiguration class\n> and allows applications to control the sensor settings.\n> \n> Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>\n> Reviewed-by: Naushir Patuck <naush@raspberrypi.com>\n> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n> ---\n>  include/libcamera/camera.h |  43 +++++++++\n>  src/libcamera/camera.cpp   | 185 +++++++++++++++++++++++++++++++++++++\n>  2 files changed, 228 insertions(+)\n> \n> diff --git a/include/libcamera/camera.h b/include/libcamera/camera.h\n> index 004bc89455f5..b2aa8d467feb 100644\n> --- a/include/libcamera/camera.h\n> +++ b/include/libcamera/camera.h\n> @@ -19,6 +19,7 @@\n>  #include <libcamera/base/signal.h>\n>  \n>  #include <libcamera/controls.h>\n> +#include <libcamera/geometry.h>\n>  #include <libcamera/request.h>\n>  #include <libcamera/stream.h>\n>  #include <libcamera/transform.h>\n> @@ -30,6 +31,47 @@ class FrameBufferAllocator;\n>  class PipelineHandler;\n>  class Request;\n>  \n> +class SensorConfiguration\n> +{\n> +public:\n> +\tunsigned int bitDepth = 0;\n> +\n> +\tRectangle analogCrop;\n> +\n> +\tstruct {\n> +\t\tunsigned int binX = 1;\n> +\t\tunsigned int binY = 1;\n> +\t} binning;\n> +\n> +\tstruct {\n> +\t\tunsigned int xOddInc = 1;\n> +\t\tunsigned int xEvenInc = 1;\n> +\t\tunsigned int yOddInc = 1;\n> +\t\tunsigned int yEvenInc = 1;\n\nWhat's the reason for exposing the odd and even increments separately,\ninstead of a skipping factor ?\n\n> +\t} skipping;\n> +\n> +\tSize outputSize;\n> +\n> +\tbool valid() const\n> +\t{\n> +\t\treturn validate() != Invalid;\n> +\t}\n> +\n> +\texplicit operator bool() const\n> +\t{\n> +\t\treturn validate() == Populated;\n> +\t}\n> +\n> +private:\n> +\tenum Status {\n> +\t\tUnpopulated,\n> +\t\tPopulated,\n> +\t\tInvalid,\n> +\t};\n> +\n> +\tStatus validate() const;\n> +};\n> +\n>  class CameraConfiguration\n>  {\n>  public:\n> @@ -66,6 +108,7 @@ public:\n>  \tbool empty() const;\n>  \tstd::size_t size() const;\n>  \n> +\tSensorConfiguration sensorConfig;\n>  \tTransform transform;\n>  \n>  protected:\n> diff --git a/src/libcamera/camera.cpp b/src/libcamera/camera.cpp\n> index 0eecee766f00..f497a35c90fb 100644\n> --- a/src/libcamera/camera.cpp\n> +++ b/src/libcamera/camera.cpp\n> @@ -97,6 +97,21 @@\n>   * implemented in the above order at the hardware level. The libcamera pipeline\n>   * handlers translate the pipeline model to the real hardware configuration.\n>   *\n> + * \\subsection camera-sensor-mode Camera Sensor Model\n\ns/-mode/-model/\n\n> + *\n> + * libcamera allows applications to control the configuration of the camera\n> + * sensor, particularly it allows to control the frame geometry and frame\n> + * delivery rate of the sensor.\n\ns/delivery //\n\nI'd like to make it clear that this is optional:\n\n * By default, libcamera configures the camera sensor automatically based on the\n * configuration of the streams. Applications may instead specify a manual\n * configuration for the camera sensor. This allows precise control of the frame\n * geometry and frame rate delivered by the sensor.\n\n> + *\n> + * The camera sensor configuration applies to all streams produced by a camera\n> + * from the same image source.\n\nThis paragraph should go to CameraConfiguration::sensorConfig below.\n\n> + *\n> + * More details about the camera sensor model implemented by libcamera are\n> + * available in the libcamera camera-sensor-model documentation page.\n> + *\n> + * The sensor configuration is specified by applications by populating the\n> + * CameraConfiguration::sensorConfig class member.\n\nDrop this paragraph, it doesn't belong to the camera model introduction\n(none of the other sections here go into the level of details).\n\n> + *\n>   * \\subsection digital-zoom Digital Zoom\n>   *\n>   * Digital zoom is implemented as a combination of the cropping and scaling\n> @@ -111,6 +126,166 @@ namespace libcamera {\n>  \n>  LOG_DECLARE_CATEGORY(Camera)\n>  \n> +/**\n> + * \\class SensorConfiguration\n> + * \\brief Camera sensor configuration\n> + *\n> + * The SensorConfiguration class collects parameters to control the operations\n> + * of the camera sensor, accordingly to the abstract camera sensor model\n\ns/according/accordingly/\n\n> + * implemented by libcamera.\n> + *\n> + * \\todo Applications shall fully populate all fields of the\n> + * CameraConfiguration::sensorConfig class members before validating the\n> + * CameraConfiguration. If the SensorConfiguration is not fully populated, or if\n> + * any of its parameters cannot be applied to the sensor in use, the\n> + * CameraConfiguration validation process will fail and return\n> + * CameraConfiguration::Status::Invalid.\n> + *\n> + * Applications that populate the SensorConfiguration class members are\n> + * expected to be highly-specialized applications that know what sensor\n> + * they are operating with and what parameters are valid for the sensor in use.\n> + *\n> + * A detailed description of the abstract camera sensor model implemented by\n> + * libcamera and the description of its configuration parameters is available\n> + * in the libcamera documentation camera-sensor-model file.\n> + */\n> +\n> +/**\n> + * \\enum SensorConfiguration::Status\n> + * \\brief The sensor configuration validation status\n> + */\n> +\n> +/**\n> + * \\var SensorConfiguration::bitDepth\n> + * \\brief The sensor image format bit depth\n> + *\n> + * The number of bits (resolution) used to represent a pixel sample.\n> + */\n> +\n> +/**\n> + * \\var SensorConfiguration::analogCrop\n> + * \\brief The analog crop rectangle\n> + *\n> + * The selected portion of the active pixel array used to produce the image\n> + * frame.\n> + */\n> +\n> +/**\n> + * \\var SensorConfiguration::binning\n> + * \\brief Sensor binning configuration\n> + *\n> + * Refer to the camera-sensor-model documentation for an accurate description\n> + * of the binning operations. Disabled by default.\n> + */\n> +\n> +/**\n> + * \\var SensorConfiguration::binX\n> + * \\brief Horizontal binning factor\n> + *\n> + * The horizontal binning factor. Default to 1.\n> + */\n> +\n> +/**\n> + * \\var SensorConfiguration::binY\n> + * \\brief Vertical binning factor\n> + *\n> + * The vertical binning factor. Default to 1.\n> + */\n> +\n> +/**\n> + * \\var SensorConfiguration::skipping\n> + * \\brief The sensor skipping configuration\n> + *\n> + * Refer to the camera-sensor-model documentation for an accurate description\n> + * of the skipping operations.\n> + *\n> + * If no skipping is performed, all the structure fields should be\n> + * set to 1. Disabled by default.\n> + */\n> +\n> +/**\n> + * \\var SensorConfiguration::xOddInc\n> + * \\brief Horizontal increment for odd rows. Default to 1.\n> + */\n> +\n> +/**\n> + * \\var SensorConfiguration::xEvenInc\n> + * \\brief Horizontal increment for even rows. Default to 1.\n> + */\n> +\n> +/**\n> + * \\var SensorConfiguration::yOddInc\n> + * \\brief Vertical increment for odd columns. Default to 1.\n> + */\n> +\n> +/**\n> + * \\var SensorConfiguration::yEvenInc\n> + * \\brief Vertical increment for even columns. Default to 1.\n> + */\n> +\n> +/**\n> + * \\var SensorConfiguration::outputSize\n> + * \\brief The frame output (visible) size\n> + *\n> + * The size of the data frame as received by the host processor.\n> + */\n> +\n> +/**\n> + * \\fn SensorConfiguration::valid() const\n> + * \\brief Validate the SensorConfiguration\n> + *\n> + * Validate the sensor configuration.\n> + *\n> + * \\todo A sensor configuration is valid (or well-formed) if it's either\n> + * completely un-populated or fully populated. For now allow applications to\n> + * populate the bitDepth and the outputSize only.\n\nAs I've mentioned before (so it shouldn't come as a surprise), I think\nthis is a hack (and I think we agree :-)). I'm OK with it in the very\nshort term, but with IMX519 support that should arrive soon, we'll need\nto do better. The IMX519 will likely be supported by the ccs kernel\ndriver, which isn't mode-based. Configuring the sensor solely through\nthe output resolution won't work. I plan to rework the CameraSensor\nclass to support ccs-based sensors, and as part of that work, I will\nmost likely address this todo item and probably require applications to\nselect a full sensor configuration.\n\nThis doesn't require any immediate change. I've CC'ed David and Naush as\nRPi is the first user of this API, and I don't want changes in the near\nfuture to come as a surprise.\n\n> + *\n> + * \\return True if the SensorConfiguration is either fully populated or\n> + * un-populated, false otherwise\n> + */\n> +\n> +/**\n> + * \\fn SensorConfiguration::operator bool() const\n> + * \\brief Test if a SensorConfiguration is fully populated\n> + * \\return True if the SensorConfiguration is fully populated\n> + */\n> +\n> +/**\n> + * \\brief Validate the sensor configuration\n> + *\n> + * \\todo A sensor configuration is valid (or well-formed) if it's either\n> + * completely un-populated or fully populated. For now allow applications to\n> + * populate the bitDepth and the outputSize only.\n> + *\n> + * \\return The sensor configuration status\n> + * \\retval Unpopulated The sensor configuration is fully unpopulated\n> + * \\retval Populated The sensor configuration is fully populated\n> + * \\retval Invalid The sensor configuration is invalid (not fully populated\n> + * and not fully unpopulated)\n> + */\n> +SensorConfiguration::Status SensorConfiguration::validate() const\n> +{\n> +\tif (bitDepth && binning.binX && binning.binY &&\n> +\t    skipping.xOddInc && skipping.yOddInc &&\n> +\t    skipping.xEvenInc && skipping.yEvenInc &&\n> +\t    !outputSize.isNull())\n> +\t\treturn Populated;\n> +\n> +\t/*\n> +\t * By default the binning and skipping factors are initialized to 1, but\n> +\t * a zero-initialized SensorConfiguration is considered unpopulated\n> +\t * as well.\n> +\t */\n> +\tif (!bitDepth &&\n> +\t    binning.binX <= 1 && binning.binY <= 1 &&\n> +\t    skipping.xOddInc <= 1 && skipping.yOddInc <= 1 &&\n> +\t    skipping.xEvenInc <= 1 && skipping.yEvenInc <= 1 &&\n> +\t    outputSize.isNull())\n> +\t\treturn Unpopulated;\n> +\n> +\treturn Invalid;\n> +}\n> +\n>  /**\n>   * \\class CameraConfiguration\n>   * \\brief Hold configuration for streams of the camera\n> @@ -391,6 +566,16 @@ CameraConfiguration::Status CameraConfiguration::validateColorSpaces(ColorSpaceF\n>  \treturn status;\n>  }\n>  \n> +/**\n> + * \\var CameraConfiguration::sensorConfig\n> + * \\brief The camera sensor configuration\n> + *\n> + * The sensorConfig field allows control of the configuration of the camera\n> + * sensor. Refer to the camera-sensor-model documentation and to the\n> + * SensorConfiguration class documentation for details about the sensor\n> + * configuration process.\n> + */\n> +\n>  /**\n>   * \\var CameraConfiguration::transform\n>   * \\brief User-specified transform to be applied to the image","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 8D161BE080\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 15 Sep 2023 16:06:03 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id E01A462918;\n\tFri, 15 Sep 2023 18:06:02 +0200 (CEST)","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 5ED58628EC\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 15 Sep 2023 18:06:01 +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 AA89AB1;\n\tFri, 15 Sep 2023 18:04:27 +0200 (CEST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1694793962;\n\tbh=D19KdydpcrppxDPqye2JJpGI92/aVUUjGPqVO0aqGOw=;\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=ZAw9aED8ULqjYM09ZbEF+qQEXVghosJjRvGIcJA1i4vSuFnvCmlsbCEQfeC4yQm9b\n\tcM/XpnQ+QHB69+ba2otVFTi76w7ygJZJnGNeJiIOIrAvgRwWpRhEx5SqzzE4X4XHHH\n\twKTz7vJye0GtGJcLX3xaD/a7bUpVbxA8SypztAVPlSNc1YyE5Wv+yXiHJzDt6qAZ1F\n\t4K90HSOJrWJ9j5EwOPr4vcLAzWBBa0xZZqmX8lBCfHKhAsu7tTTwbtLxEMIietYYK1\n\tgjD4mUyyocfuE3oHom1QUm14jrQtMvTQiSSPv8ciXYBbBruP6TUtZc7phLQRqSBsWM\n\tvvFMpv2cWuGBA==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1694793867;\n\tbh=D19KdydpcrppxDPqye2JJpGI92/aVUUjGPqVO0aqGOw=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=maCnGZRgduS5OMI4x5ncrkENadiw8bLz0nmXpMyqixdw/kdIId0o8nmqfMOp6CCr4\n\tsMsDTkENyvtuZt3cga5iAFK/7DypJTM6pqpD2psH3z4Ia8gNpIh1nZXI4lmgCJFcOf\n\tsEV9bLA2JDPTZRfgp+SuunuDfECT8SVUBRzoej0U="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"maCnGZRg\"; dkim-atps=neutral","Date":"Fri, 15 Sep 2023 19:06:15 +0300","To":"Jacopo Mondi <jacopo.mondi@ideasonboard.com>","Message-ID":"<20230915160615.GB933@pendragon.ideasonboard.com>","References":"<20230915130650.35691-1-jacopo.mondi@ideasonboard.com>\n\t<20230915130650.35691-3-jacopo.mondi@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20230915130650.35691-3-jacopo.mondi@ideasonboard.com>","Subject":"Re: [libcamera-devel] [PATCH v3 02/12] libcamera: camera: Introduce\n\tSensorConfiguration","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@lists.libcamera.org","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":27798,"web_url":"https://patchwork.libcamera.org/comment/27798/","msgid":"<20230915162109.GD933@pendragon.ideasonboard.com>","date":"2023-09-15T16:21:09","subject":"Re: [libcamera-devel] [PATCH v3 02/12] libcamera: camera: Introduce\n\tSensorConfiguration","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Another small comment.\nG\nOn Fri, Sep 15, 2023 at 07:06:15PM +0300, Laurent Pinchart via libcamera-devel wrote:\n> On Fri, Sep 15, 2023 at 03:06:40PM +0200, Jacopo Mondi via libcamera-devel wrote:\n> > Introduce SensorConfiguration in the libcamera API.\n> > \n> > The SensorConfiguration is part of the CameraConfiguration class\n> > and allows applications to control the sensor settings.\n> > \n> > Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>\n> > Reviewed-by: Naushir Patuck <naush@raspberrypi.com>\n> > Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n> > ---\n> >  include/libcamera/camera.h |  43 +++++++++\n> >  src/libcamera/camera.cpp   | 185 +++++++++++++++++++++++++++++++++++++\n> >  2 files changed, 228 insertions(+)\n> > \n> > diff --git a/include/libcamera/camera.h b/include/libcamera/camera.h\n> > index 004bc89455f5..b2aa8d467feb 100644\n> > --- a/include/libcamera/camera.h\n> > +++ b/include/libcamera/camera.h\n> > @@ -19,6 +19,7 @@\n> >  #include <libcamera/base/signal.h>\n> >  \n> >  #include <libcamera/controls.h>\n> > +#include <libcamera/geometry.h>\n> >  #include <libcamera/request.h>\n> >  #include <libcamera/stream.h>\n> >  #include <libcamera/transform.h>\n> > @@ -30,6 +31,47 @@ class FrameBufferAllocator;\n> >  class PipelineHandler;\n> >  class Request;\n> >  \n> > +class SensorConfiguration\n> > +{\n> > +public:\n> > +\tunsigned int bitDepth = 0;\n> > +\n> > +\tRectangle analogCrop;\n> > +\n> > +\tstruct {\n> > +\t\tunsigned int binX = 1;\n> > +\t\tunsigned int binY = 1;\n> > +\t} binning;\n> > +\n> > +\tstruct {\n> > +\t\tunsigned int xOddInc = 1;\n> > +\t\tunsigned int xEvenInc = 1;\n> > +\t\tunsigned int yOddInc = 1;\n> > +\t\tunsigned int yEvenInc = 1;\n> \n> What's the reason for exposing the odd and even increments separately,\n> instead of a skipping factor ?\n> \n> > +\t} skipping;\n> > +\n> > +\tSize outputSize;\n> > +\n> > +\tbool valid() const\n> > +\t{\n> > +\t\treturn validate() != Invalid;\n> > +\t}\n> > +\n> > +\texplicit operator bool() const\n> > +\t{\n> > +\t\treturn validate() == Populated;\n> > +\t}\n> > +\n> > +private:\n> > +\tenum Status {\n> > +\t\tUnpopulated,\n> > +\t\tPopulated,\n> > +\t\tInvalid,\n> > +\t};\n> > +\n> > +\tStatus validate() const;\n> > +};\n> > +\n> >  class CameraConfiguration\n> >  {\n> >  public:\n> > @@ -66,6 +108,7 @@ public:\n> >  \tbool empty() const;\n> >  \tstd::size_t size() const;\n> >  \n> > +\tSensorConfiguration sensorConfig;\n> >  \tTransform transform;\n> >  \n> >  protected:\n> > diff --git a/src/libcamera/camera.cpp b/src/libcamera/camera.cpp\n> > index 0eecee766f00..f497a35c90fb 100644\n> > --- a/src/libcamera/camera.cpp\n> > +++ b/src/libcamera/camera.cpp\n> > @@ -97,6 +97,21 @@\n> >   * implemented in the above order at the hardware level. The libcamera pipeline\n> >   * handlers translate the pipeline model to the real hardware configuration.\n> >   *\n> > + * \\subsection camera-sensor-mode Camera Sensor Model\n> \n> s/-mode/-model/\n> \n> > + *\n> > + * libcamera allows applications to control the configuration of the camera\n> > + * sensor, particularly it allows to control the frame geometry and frame\n> > + * delivery rate of the sensor.\n> \n> s/delivery //\n> \n> I'd like to make it clear that this is optional:\n> \n>  * By default, libcamera configures the camera sensor automatically based on the\n>  * configuration of the streams. Applications may instead specify a manual\n>  * configuration for the camera sensor. This allows precise control of the frame\n>  * geometry and frame rate delivered by the sensor.\n> \n> > + *\n> > + * The camera sensor configuration applies to all streams produced by a camera\n> > + * from the same image source.\n> \n> This paragraph should go to CameraConfiguration::sensorConfig below.\n> \n> > + *\n> > + * More details about the camera sensor model implemented by libcamera are\n> > + * available in the libcamera camera-sensor-model documentation page.\n> > + *\n> > + * The sensor configuration is specified by applications by populating the\n> > + * CameraConfiguration::sensorConfig class member.\n> \n> Drop this paragraph, it doesn't belong to the camera model introduction\n> (none of the other sections here go into the level of details).\n> \n> > + *\n> >   * \\subsection digital-zoom Digital Zoom\n> >   *\n> >   * Digital zoom is implemented as a combination of the cropping and scaling\n> > @@ -111,6 +126,166 @@ namespace libcamera {\n> >  \n> >  LOG_DECLARE_CATEGORY(Camera)\n> >  \n> > +/**\n> > + * \\class SensorConfiguration\n> > + * \\brief Camera sensor configuration\n> > + *\n> > + * The SensorConfiguration class collects parameters to control the operations\n> > + * of the camera sensor, accordingly to the abstract camera sensor model\n> \n> s/according/accordingly/\n> \n> > + * implemented by libcamera.\n> > + *\n> > + * \\todo Applications shall fully populate all fields of the\n> > + * CameraConfiguration::sensorConfig class members before validating the\n> > + * CameraConfiguration. If the SensorConfiguration is not fully populated, or if\n> > + * any of its parameters cannot be applied to the sensor in use, the\n> > + * CameraConfiguration validation process will fail and return\n> > + * CameraConfiguration::Status::Invalid.\n> > + *\n> > + * Applications that populate the SensorConfiguration class members are\n> > + * expected to be highly-specialized applications that know what sensor\n> > + * they are operating with and what parameters are valid for the sensor in use.\n> > + *\n> > + * A detailed description of the abstract camera sensor model implemented by\n> > + * libcamera and the description of its configuration parameters is available\n> > + * in the libcamera documentation camera-sensor-model file.\n> > + */\n> > +\n> > +/**\n> > + * \\enum SensorConfiguration::Status\n> > + * \\brief The sensor configuration validation status\n> > + */\n> > +\n> > +/**\n> > + * \\var SensorConfiguration::bitDepth\n> > + * \\brief The sensor image format bit depth\n> > + *\n> > + * The number of bits (resolution) used to represent a pixel sample.\n> > + */\n> > +\n> > +/**\n> > + * \\var SensorConfiguration::analogCrop\n> > + * \\brief The analog crop rectangle\n> > + *\n> > + * The selected portion of the active pixel array used to produce the image\n> > + * frame.\n> > + */\n> > +\n> > +/**\n> > + * \\var SensorConfiguration::binning\n> > + * \\brief Sensor binning configuration\n> > + *\n> > + * Refer to the camera-sensor-model documentation for an accurate description\n> > + * of the binning operations. Disabled by default.\n> > + */\n> > +\n> > +/**\n> > + * \\var SensorConfiguration::binX\n> > + * \\brief Horizontal binning factor\n> > + *\n> > + * The horizontal binning factor. Default to 1.\n> > + */\n> > +\n> > +/**\n> > + * \\var SensorConfiguration::binY\n> > + * \\brief Vertical binning factor\n> > + *\n> > + * The vertical binning factor. Default to 1.\n> > + */\n> > +\n> > +/**\n> > + * \\var SensorConfiguration::skipping\n> > + * \\brief The sensor skipping configuration\n> > + *\n> > + * Refer to the camera-sensor-model documentation for an accurate description\n> > + * of the skipping operations.\n> > + *\n> > + * If no skipping is performed, all the structure fields should be\n> > + * set to 1. Disabled by default.\n> > + */\n> > +\n> > +/**\n> > + * \\var SensorConfiguration::xOddInc\n> > + * \\brief Horizontal increment for odd rows. Default to 1.\n> > + */\n> > +\n> > +/**\n> > + * \\var SensorConfiguration::xEvenInc\n> > + * \\brief Horizontal increment for even rows. Default to 1.\n> > + */\n> > +\n> > +/**\n> > + * \\var SensorConfiguration::yOddInc\n> > + * \\brief Vertical increment for odd columns. Default to 1.\n> > + */\n> > +\n> > +/**\n> > + * \\var SensorConfiguration::yEvenInc\n> > + * \\brief Vertical increment for even columns. Default to 1.\n> > + */\n> > +\n> > +/**\n> > + * \\var SensorConfiguration::outputSize\n> > + * \\brief The frame output (visible) size\n> > + *\n> > + * The size of the data frame as received by the host processor.\n> > + */\n> > +\n> > +/**\n> > + * \\fn SensorConfiguration::valid() const\n> > + * \\brief Validate the SensorConfiguration\n> > + *\n> > + * Validate the sensor configuration.\n> > + *\n> > + * \\todo A sensor configuration is valid (or well-formed) if it's either\n> > + * completely un-populated or fully populated. For now allow applications to\n> > + * populate the bitDepth and the outputSize only.\n> \n> As I've mentioned before (so it shouldn't come as a surprise), I think\n> this is a hack (and I think we agree :-)). I'm OK with it in the very\n> short term, but with IMX519 support that should arrive soon, we'll need\n> to do better. The IMX519 will likely be supported by the ccs kernel\n> driver, which isn't mode-based. Configuring the sensor solely through\n> the output resolution won't work. I plan to rework the CameraSensor\n> class to support ccs-based sensors, and as part of that work, I will\n> most likely address this todo item and probably require applications to\n> select a full sensor configuration.\n> \n> This doesn't require any immediate change. I've CC'ed David and Naush as\n> RPi is the first user of this API, and I don't want changes in the near\n> future to come as a surprise.\n> \n> > + *\n> > + * \\return True if the SensorConfiguration is either fully populated or\n> > + * un-populated, false otherwise\n> > + */\n> > +\n> > +/**\n> > + * \\fn SensorConfiguration::operator bool() const\n\nWould this be better turned into a function with an explicit name (such\nas populated()) instead of a conversion operator ? Writing\n\n\tif (config)\n\t\t...\n\ndoesn't make it immediately clear to the reader what is being tested.\n\n> > + * \\brief Test if a SensorConfiguration is fully populated\n> > + * \\return True if the SensorConfiguration is fully populated\n> > + */\n> > +\n> > +/**\n> > + * \\brief Validate the sensor configuration\n> > + *\n> > + * \\todo A sensor configuration is valid (or well-formed) if it's either\n> > + * completely un-populated or fully populated. For now allow applications to\n> > + * populate the bitDepth and the outputSize only.\n> > + *\n> > + * \\return The sensor configuration status\n> > + * \\retval Unpopulated The sensor configuration is fully unpopulated\n> > + * \\retval Populated The sensor configuration is fully populated\n> > + * \\retval Invalid The sensor configuration is invalid (not fully populated\n> > + * and not fully unpopulated)\n> > + */\n> > +SensorConfiguration::Status SensorConfiguration::validate() const\n> > +{\n> > +\tif (bitDepth && binning.binX && binning.binY &&\n> > +\t    skipping.xOddInc && skipping.yOddInc &&\n> > +\t    skipping.xEvenInc && skipping.yEvenInc &&\n> > +\t    !outputSize.isNull())\n> > +\t\treturn Populated;\n> > +\n> > +\t/*\n> > +\t * By default the binning and skipping factors are initialized to 1, but\n> > +\t * a zero-initialized SensorConfiguration is considered unpopulated\n> > +\t * as well.\n> > +\t */\n> > +\tif (!bitDepth &&\n> > +\t    binning.binX <= 1 && binning.binY <= 1 &&\n> > +\t    skipping.xOddInc <= 1 && skipping.yOddInc <= 1 &&\n> > +\t    skipping.xEvenInc <= 1 && skipping.yEvenInc <= 1 &&\n> > +\t    outputSize.isNull())\n> > +\t\treturn Unpopulated;\n> > +\n> > +\treturn Invalid;\n> > +}\n> > +\n> >  /**\n> >   * \\class CameraConfiguration\n> >   * \\brief Hold configuration for streams of the camera\n> > @@ -391,6 +566,16 @@ CameraConfiguration::Status CameraConfiguration::validateColorSpaces(ColorSpaceF\n> >  \treturn status;\n> >  }\n> >  \n> > +/**\n> > + * \\var CameraConfiguration::sensorConfig\n> > + * \\brief The camera sensor configuration\n> > + *\n> > + * The sensorConfig field allows control of the configuration of the camera\n> > + * sensor. Refer to the camera-sensor-model documentation and to the\n> > + * SensorConfiguration class documentation for details about the sensor\n> > + * configuration process.\n> > + */\n> > +\n> >  /**\n> >   * \\var CameraConfiguration::transform\n> >   * \\brief User-specified transform to be applied to the image","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 21A70BD160\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 15 Sep 2023 16:20:58 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 7A24362911;\n\tFri, 15 Sep 2023 18:20:57 +0200 (CEST)","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 84DDE628EC\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 15 Sep 2023 18:20:55 +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 C1081B1;\n\tFri, 15 Sep 2023 18:19:21 +0200 (CEST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1694794857;\n\tbh=hZnR1psz4XmYD2RG7yMjdGUmIjMD4pT+EcdbWfx2Cuc=;\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:\n\tFrom;\n\tb=2gTtDpiWFGsUc47TWRdh4YsFKp+IIaR3FhZEV29d3XC+R1DmcgrxiY14lm57zs0o+\n\tdRcOG0a+Hp3EqmIX+kB5yJ4GpyyeXRKlQbgySo4eVqg50NyogNdRdMoNExnc0Wozp4\n\thdFL0bcBnJ3GvPUgHxW77RHoKL3wSXx6J52ajMsot2IckA1riw8P0KDZ+zIfWKyNx2\n\tU/P+IDrKnePWgyLkM5KmJDnxYYLikYgtTOL8RoQsHVac5wuDvnLA5VI9OZcj84c12a\n\tUlB2siiqwJ3vAkTZ1MtvQb/Ma+U+y5MUNobIYtZxNMpOOPDO26PimCrCme4rmf0+/4\n\tLbmNd04P3IB+A==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1694794762;\n\tbh=hZnR1psz4XmYD2RG7yMjdGUmIjMD4pT+EcdbWfx2Cuc=;\n\th=Date:From:To:Subject:References:In-Reply-To:From;\n\tb=uHjgzc5hvr7d4IbRMdaI3azgPl7HiHcSqcp6wjOwiF1OO00qN1heOrCjL0vYxglP6\n\tZOd/Faemq85/mxVrsxF7Qp3RCYN/6XlhL20meXrAqEcF+N2wBQBt5iSdcX07xe+GZb\n\tFR4I+VF7qu0GX4QH6hVJPoB3twR34HOnW8JEkAlE="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"uHjgzc5h\"; dkim-atps=neutral","Date":"Fri, 15 Sep 2023 19:21:09 +0300","To":"Jacopo Mondi <jacopo.mondi@ideasonboard.com>,\n\tlibcamera-devel@lists.libcamera.org","Message-ID":"<20230915162109.GD933@pendragon.ideasonboard.com>","References":"<20230915130650.35691-1-jacopo.mondi@ideasonboard.com>\n\t<20230915130650.35691-3-jacopo.mondi@ideasonboard.com>\n\t<20230915160615.GB933@pendragon.ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20230915160615.GB933@pendragon.ideasonboard.com>","Subject":"Re: [libcamera-devel] [PATCH v3 02/12] libcamera: camera: Introduce\n\tSensorConfiguration","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>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":27799,"web_url":"https://patchwork.libcamera.org/comment/27799/","msgid":"<lbyb6t7jv42mo336in4vz6dss3wpjaugk3drild4p7grofqpbn@2l7wvqcct3se>","date":"2023-09-16T10:15:26","subject":"Re: [libcamera-devel] [PATCH v3 02/12] libcamera: camera: Introduce\n\tSensorConfiguration","submitter":{"id":143,"url":"https://patchwork.libcamera.org/api/people/143/","name":"Jacopo Mondi","email":"jacopo.mondi@ideasonboard.com"},"content":"Hi Laurent\n\nOn Fri, Sep 15, 2023 at 07:06:15PM +0300, Laurent Pinchart via libcamera-devel wrote:\n> Hi Jacopo,\n>\n> Thank you for the patch.\n>\n> On Fri, Sep 15, 2023 at 03:06:40PM +0200, Jacopo Mondi via libcamera-devel wrote:\n> > Introduce SensorConfiguration in the libcamera API.\n> >\n> > The SensorConfiguration is part of the CameraConfiguration class\n> > and allows applications to control the sensor settings.\n> >\n> > Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>\n> > Reviewed-by: Naushir Patuck <naush@raspberrypi.com>\n> > Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n> > ---\n> >  include/libcamera/camera.h |  43 +++++++++\n> >  src/libcamera/camera.cpp   | 185 +++++++++++++++++++++++++++++++++++++\n> >  2 files changed, 228 insertions(+)\n> >\n> > diff --git a/include/libcamera/camera.h b/include/libcamera/camera.h\n> > index 004bc89455f5..b2aa8d467feb 100644\n> > --- a/include/libcamera/camera.h\n> > +++ b/include/libcamera/camera.h\n> > @@ -19,6 +19,7 @@\n> >  #include <libcamera/base/signal.h>\n> >\n> >  #include <libcamera/controls.h>\n> > +#include <libcamera/geometry.h>\n> >  #include <libcamera/request.h>\n> >  #include <libcamera/stream.h>\n> >  #include <libcamera/transform.h>\n> > @@ -30,6 +31,47 @@ class FrameBufferAllocator;\n> >  class PipelineHandler;\n> >  class Request;\n> >\n> > +class SensorConfiguration\n> > +{\n> > +public:\n> > +\tunsigned int bitDepth = 0;\n> > +\n> > +\tRectangle analogCrop;\n> > +\n> > +\tstruct {\n> > +\t\tunsigned int binX = 1;\n> > +\t\tunsigned int binY = 1;\n> > +\t} binning;\n> > +\n> > +\tstruct {\n> > +\t\tunsigned int xOddInc = 1;\n> > +\t\tunsigned int xEvenInc = 1;\n> > +\t\tunsigned int yOddInc = 1;\n> > +\t\tunsigned int yEvenInc = 1;\n>\n> What's the reason for exposing the odd and even increments separately,\n> instead of a skipping factor ?\n>\n\nCCS expresses the two skipping factors separately. I agree there are\nnot many meaningful ways this two parameters can be combined, but if\none knows how a sensor work it might be more natural expressing them\nin this way instead of simply saying x_skip = 2 ( == x_odd_inc=3,\nx_even_inc=2)\n\n> > +\t} skipping;\n> > +\n> > +\tSize outputSize;\n> > +\n> > +\tbool valid() const\n> > +\t{\n> > +\t\treturn validate() != Invalid;\n> > +\t}\n> > +\n> > +\texplicit operator bool() const\n> > +\t{\n> > +\t\treturn validate() == Populated;\n> > +\t}\n> > +\n> > +private:\n> > +\tenum Status {\n> > +\t\tUnpopulated,\n> > +\t\tPopulated,\n> > +\t\tInvalid,\n> > +\t};\n> > +\n> > +\tStatus validate() const;\n> > +};\n> > +\n> >  class CameraConfiguration\n> >  {\n> >  public:\n> > @@ -66,6 +108,7 @@ public:\n> >  \tbool empty() const;\n> >  \tstd::size_t size() const;\n> >\n> > +\tSensorConfiguration sensorConfig;\n> >  \tTransform transform;\n> >\n> >  protected:\n> > diff --git a/src/libcamera/camera.cpp b/src/libcamera/camera.cpp\n> > index 0eecee766f00..f497a35c90fb 100644\n> > --- a/src/libcamera/camera.cpp\n> > +++ b/src/libcamera/camera.cpp\n> > @@ -97,6 +97,21 @@\n> >   * implemented in the above order at the hardware level. The libcamera pipeline\n> >   * handlers translate the pipeline model to the real hardware configuration.\n> >   *\n> > + * \\subsection camera-sensor-mode Camera Sensor Model\n>\n> s/-mode/-model/\n>\n> > + *\n> > + * libcamera allows applications to control the configuration of the camera\n> > + * sensor, particularly it allows to control the frame geometry and frame\n> > + * delivery rate of the sensor.\n>\n> s/delivery //\n>\n> I'd like to make it clear that this is optional:\n>\n>  * By default, libcamera configures the camera sensor automatically based on the\n>  * configuration of the streams. Applications may instead specify a manual\n>  * configuration for the camera sensor. This allows precise control of the frame\n>  * geometry and frame rate delivered by the sensor.\n>\n> > + *\n> > + * The camera sensor configuration applies to all streams produced by a camera\n> > + * from the same image source.\n>\n> This paragraph should go to CameraConfiguration::sensorConfig below.\n>\n> > + *\n> > + * More details about the camera sensor model implemented by libcamera are\n> > + * available in the libcamera camera-sensor-model documentation page.\n> > + *\n> > + * The sensor configuration is specified by applications by populating the\n> > + * CameraConfiguration::sensorConfig class member.\n>\n> Drop this paragraph, it doesn't belong to the camera model introduction\n> (none of the other sections here go into the level of details).\n>\n> > + *\n> >   * \\subsection digital-zoom Digital Zoom\n> >   *\n> >   * Digital zoom is implemented as a combination of the cropping and scaling\n> > @@ -111,6 +126,166 @@ namespace libcamera {\n> >\n> >  LOG_DECLARE_CATEGORY(Camera)\n> >\n> > +/**\n> > + * \\class SensorConfiguration\n> > + * \\brief Camera sensor configuration\n> > + *\n> > + * The SensorConfiguration class collects parameters to control the operations\n> > + * of the camera sensor, accordingly to the abstract camera sensor model\n>\n> s/according/accordingly/\n\nIsn't this the case already ? Or did you mean the other way around ?\n\n>\n> > + * implemented by libcamera.\n> > + *\n> > + * \\todo Applications shall fully populate all fields of the\n> > + * CameraConfiguration::sensorConfig class members before validating the\n> > + * CameraConfiguration. If the SensorConfiguration is not fully populated, or if\n> > + * any of its parameters cannot be applied to the sensor in use, the\n> > + * CameraConfiguration validation process will fail and return\n> > + * CameraConfiguration::Status::Invalid.\n> > + *\n> > + * Applications that populate the SensorConfiguration class members are\n> > + * expected to be highly-specialized applications that know what sensor\n> > + * they are operating with and what parameters are valid for the sensor in use.\n> > + *\n> > + * A detailed description of the abstract camera sensor model implemented by\n> > + * libcamera and the description of its configuration parameters is available\n> > + * in the libcamera documentation camera-sensor-model file.\n> > + */\n> > +\n> > +/**\n> > + * \\enum SensorConfiguration::Status\n> > + * \\brief The sensor configuration validation status\n> > + */\n> > +\n> > +/**\n> > + * \\var SensorConfiguration::bitDepth\n> > + * \\brief The sensor image format bit depth\n> > + *\n> > + * The number of bits (resolution) used to represent a pixel sample.\n> > + */\n> > +\n> > +/**\n> > + * \\var SensorConfiguration::analogCrop\n> > + * \\brief The analog crop rectangle\n> > + *\n> > + * The selected portion of the active pixel array used to produce the image\n> > + * frame.\n> > + */\n> > +\n> > +/**\n> > + * \\var SensorConfiguration::binning\n> > + * \\brief Sensor binning configuration\n> > + *\n> > + * Refer to the camera-sensor-model documentation for an accurate description\n> > + * of the binning operations. Disabled by default.\n> > + */\n> > +\n> > +/**\n> > + * \\var SensorConfiguration::binX\n> > + * \\brief Horizontal binning factor\n> > + *\n> > + * The horizontal binning factor. Default to 1.\n> > + */\n> > +\n> > +/**\n> > + * \\var SensorConfiguration::binY\n> > + * \\brief Vertical binning factor\n> > + *\n> > + * The vertical binning factor. Default to 1.\n> > + */\n> > +\n> > +/**\n> > + * \\var SensorConfiguration::skipping\n> > + * \\brief The sensor skipping configuration\n> > + *\n> > + * Refer to the camera-sensor-model documentation for an accurate description\n> > + * of the skipping operations.\n> > + *\n> > + * If no skipping is performed, all the structure fields should be\n> > + * set to 1. Disabled by default.\n> > + */\n> > +\n> > +/**\n> > + * \\var SensorConfiguration::xOddInc\n> > + * \\brief Horizontal increment for odd rows. Default to 1.\n> > + */\n> > +\n> > +/**\n> > + * \\var SensorConfiguration::xEvenInc\n> > + * \\brief Horizontal increment for even rows. Default to 1.\n> > + */\n> > +\n> > +/**\n> > + * \\var SensorConfiguration::yOddInc\n> > + * \\brief Vertical increment for odd columns. Default to 1.\n> > + */\n> > +\n> > +/**\n> > + * \\var SensorConfiguration::yEvenInc\n> > + * \\brief Vertical increment for even columns. Default to 1.\n> > + */\n> > +\n> > +/**\n> > + * \\var SensorConfiguration::outputSize\n> > + * \\brief The frame output (visible) size\n> > + *\n> > + * The size of the data frame as received by the host processor.\n> > + */\n> > +\n> > +/**\n> > + * \\fn SensorConfiguration::valid() const\n> > + * \\brief Validate the SensorConfiguration\n> > + *\n> > + * Validate the sensor configuration.\n> > + *\n> > + * \\todo A sensor configuration is valid (or well-formed) if it's either\n> > + * completely un-populated or fully populated. For now allow applications to\n> > + * populate the bitDepth and the outputSize only.\n>\n> As I've mentioned before (so it shouldn't come as a surprise), I think\n> this is a hack (and I think we agree :-)). I'm OK with it in the very\n> short term, but with IMX519 support that should arrive soon, we'll need\n> to do better. The IMX519 will likely be supported by the ccs kernel\n> driver, which isn't mode-based. Configuring the sensor solely through\n> the output resolution won't work. I plan to rework the CameraSensor\n> class to support ccs-based sensors, and as part of that work, I will\n> most likely address this todo item and probably require applications to\n> select a full sensor configuration.\n>\n> This doesn't require any immediate change. I've CC'ed David and Naush as\n> RPi is the first user of this API, and I don't want changes in the near\n> future to come as a surprise.\n>\n> > + *\n> > + * \\return True if the SensorConfiguration is either fully populated or\n> > + * un-populated, false otherwise\n> > + */\n> > +\n> > +/**\n> > + * \\fn SensorConfiguration::operator bool() const\n> > + * \\brief Test if a SensorConfiguration is fully populated\n> > + * \\return True if the SensorConfiguration is fully populated\n> > + */\n> > +\n> > +/**\n> > + * \\brief Validate the sensor configuration\n> > + *\n> > + * \\todo A sensor configuration is valid (or well-formed) if it's either\n> > + * completely un-populated or fully populated. For now allow applications to\n> > + * populate the bitDepth and the outputSize only.\n> > + *\n> > + * \\return The sensor configuration status\n> > + * \\retval Unpopulated The sensor configuration is fully unpopulated\n> > + * \\retval Populated The sensor configuration is fully populated\n> > + * \\retval Invalid The sensor configuration is invalid (not fully populated\n> > + * and not fully unpopulated)\n> > + */\n> > +SensorConfiguration::Status SensorConfiguration::validate() const\n> > +{\n> > +\tif (bitDepth && binning.binX && binning.binY &&\n> > +\t    skipping.xOddInc && skipping.yOddInc &&\n> > +\t    skipping.xEvenInc && skipping.yEvenInc &&\n> > +\t    !outputSize.isNull())\n> > +\t\treturn Populated;\n> > +\n> > +\t/*\n> > +\t * By default the binning and skipping factors are initialized to 1, but\n> > +\t * a zero-initialized SensorConfiguration is considered unpopulated\n> > +\t * as well.\n> > +\t */\n> > +\tif (!bitDepth &&\n> > +\t    binning.binX <= 1 && binning.binY <= 1 &&\n> > +\t    skipping.xOddInc <= 1 && skipping.yOddInc <= 1 &&\n> > +\t    skipping.xEvenInc <= 1 && skipping.yEvenInc <= 1 &&\n> > +\t    outputSize.isNull())\n> > +\t\treturn Unpopulated;\n> > +\n> > +\treturn Invalid;\n> > +}\n> > +\n> >  /**\n> >   * \\class CameraConfiguration\n> >   * \\brief Hold configuration for streams of the camera\n> > @@ -391,6 +566,16 @@ CameraConfiguration::Status CameraConfiguration::validateColorSpaces(ColorSpaceF\n> >  \treturn status;\n> >  }\n> >\n> > +/**\n> > + * \\var CameraConfiguration::sensorConfig\n> > + * \\brief The camera sensor configuration\n> > + *\n> > + * The sensorConfig field allows control of the configuration of the camera\n> > + * sensor. Refer to the camera-sensor-model documentation and to the\n> > + * SensorConfiguration class documentation for details about the sensor\n> > + * configuration process.\n> > + */\n> > +\n> >  /**\n> >   * \\var CameraConfiguration::transform\n> >   * \\brief User-specified transform to be applied to the image\n>\n> --\n> Regards,\n>\n> Laurent Pinchart","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 07577BE080\n\tfor <parsemail@patchwork.libcamera.org>;\n\tSat, 16 Sep 2023 10:15:32 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 550DD62918;\n\tSat, 16 Sep 2023 12:15:31 +0200 (CEST)","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 AC1C4628E9\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSat, 16 Sep 2023 12:15:29 +0200 (CEST)","from ideasonboard.com (93-61-96-190.ip145.fastwebnet.it\n\t[93.61.96.190])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 7113F1288;\n\tSat, 16 Sep 2023 12:13:55 +0200 (CEST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1694859331;\n\tbh=izJa9zFBy+5zr91l8SBleNBqTbK4/y4K5YTuEkpz+TE=;\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=VxznTjzXNmJrN9JvpeemA0w32G8wGUN7QbqdWuJKrBCk8GlgBNNWSsIMjM5SOf5Dz\n\tQrl3JL3Ob28T2tZGiEItBr+9ND5iJ/lC+pDVJbeuvdMWkmbiZPxPyGY58L3yUVoMVA\n\tWdEyV7TyxgnV1+2s9D0wifefOTqtFmPbO2fPSg/epqV4xk6GFOPuVfu9HUXmyUuoT0\n\tp7JQNHLZ3bPdcuSphVuu+HlTQ13XpLBBZR7hAblQ29O3Zel2gyT3AS1bQfekLVhMzj\n\t8o7AEEwEDylW6wr8pdWPh67aQBd+OOoFcNx9kPKD1+shUUkXnYHXyXzR1u2MKUrbnJ\n\t2yLfvtYbi66+w==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1694859235;\n\tbh=izJa9zFBy+5zr91l8SBleNBqTbK4/y4K5YTuEkpz+TE=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=W8eCvcR9dUYJyXcEEPB+u5pN4CG0c1cw+D3rc2RGKfTw33tDAZzaigwabCYO32ThW\n\t9qDTcjE5sJ+BD5vYy0zg//h3mFCGFCsRrmDepoNvVdUYZpwkvRdDqOzJgZaCuuHOEA\n\ta8/i0e5O6uDNZx3OgEvNxswpyIQFYMpJVvzX7+Es="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"W8eCvcR9\"; dkim-atps=neutral","Date":"Sat, 16 Sep 2023 12:15:26 +0200","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Message-ID":"<lbyb6t7jv42mo336in4vz6dss3wpjaugk3drild4p7grofqpbn@2l7wvqcct3se>","References":"<20230915130650.35691-1-jacopo.mondi@ideasonboard.com>\n\t<20230915130650.35691-3-jacopo.mondi@ideasonboard.com>\n\t<20230915160615.GB933@pendragon.ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20230915160615.GB933@pendragon.ideasonboard.com>","Subject":"Re: [libcamera-devel] [PATCH v3 02/12] libcamera: camera: Introduce\n\tSensorConfiguration","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":"Jacopo Mondi via libcamera-devel <libcamera-devel@lists.libcamera.org>","Reply-To":"Jacopo Mondi <jacopo.mondi@ideasonboard.com>","Cc":"Jacopo Mondi <jacopo.mondi@ideasonboard.com>,\n\tlibcamera-devel@lists.libcamera.org","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":27805,"web_url":"https://patchwork.libcamera.org/comment/27805/","msgid":"<20230917154555.GB20834@pendragon.ideasonboard.com>","date":"2023-09-17T15:45:55","subject":"Re: [libcamera-devel] [PATCH v3 02/12] libcamera: camera: Introduce\n\tSensorConfiguration","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Jacopo,\n\nOn Sat, Sep 16, 2023 at 12:15:26PM +0200, Jacopo Mondi wrote:\n> On Fri, Sep 15, 2023 at 07:06:15PM +0300, Laurent Pinchart via libcamera-devel wrote:\n> > On Fri, Sep 15, 2023 at 03:06:40PM +0200, Jacopo Mondi via libcamera-devel wrote:\n> > > Introduce SensorConfiguration in the libcamera API.\n> > >\n> > > The SensorConfiguration is part of the CameraConfiguration class\n> > > and allows applications to control the sensor settings.\n> > >\n> > > Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>\n> > > Reviewed-by: Naushir Patuck <naush@raspberrypi.com>\n> > > Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n> > > ---\n> > >  include/libcamera/camera.h |  43 +++++++++\n> > >  src/libcamera/camera.cpp   | 185 +++++++++++++++++++++++++++++++++++++\n> > >  2 files changed, 228 insertions(+)\n> > >\n> > > diff --git a/include/libcamera/camera.h b/include/libcamera/camera.h\n> > > index 004bc89455f5..b2aa8d467feb 100644\n> > > --- a/include/libcamera/camera.h\n> > > +++ b/include/libcamera/camera.h\n> > > @@ -19,6 +19,7 @@\n> > >  #include <libcamera/base/signal.h>\n> > >\n> > >  #include <libcamera/controls.h>\n> > > +#include <libcamera/geometry.h>\n> > >  #include <libcamera/request.h>\n> > >  #include <libcamera/stream.h>\n> > >  #include <libcamera/transform.h>\n> > > @@ -30,6 +31,47 @@ class FrameBufferAllocator;\n> > >  class PipelineHandler;\n> > >  class Request;\n> > >\n> > > +class SensorConfiguration\n> > > +{\n> > > +public:\n> > > +\tunsigned int bitDepth = 0;\n> > > +\n> > > +\tRectangle analogCrop;\n> > > +\n> > > +\tstruct {\n> > > +\t\tunsigned int binX = 1;\n> > > +\t\tunsigned int binY = 1;\n> > > +\t} binning;\n> > > +\n> > > +\tstruct {\n> > > +\t\tunsigned int xOddInc = 1;\n> > > +\t\tunsigned int xEvenInc = 1;\n> > > +\t\tunsigned int yOddInc = 1;\n> > > +\t\tunsigned int yEvenInc = 1;\n> >\n> > What's the reason for exposing the odd and even increments separately,\n> > instead of a skipping factor ?\n> \n> CCS expresses the two skipping factors separately. I agree there are\n> not many meaningful ways this two parameters can be combined, but if\n> one knows how a sensor work it might be more natural expressing them\n> in this way instead of simply saying x_skip = 2 ( == x_odd_inc=3,\n> x_even_inc=2)\n\nLots of sensors that support configuring skipping do no expose separate\nodd and even skipping increments. That's why I think a simpler parameter\nwould be better.\n\nSakari, do you have an opinion on this ? Are there reasonable use cases\nfor controlling the odd and even increments separately in a way that\ncouldn't be expressed by a single skipping factor (for each direction) ?\n\n> > > +\t} skipping;\n> > > +\n> > > +\tSize outputSize;\n> > > +\n> > > +\tbool valid() const\n> > > +\t{\n> > > +\t\treturn validate() != Invalid;\n> > > +\t}\n> > > +\n> > > +\texplicit operator bool() const\n> > > +\t{\n> > > +\t\treturn validate() == Populated;\n> > > +\t}\n> > > +\n> > > +private:\n> > > +\tenum Status {\n> > > +\t\tUnpopulated,\n> > > +\t\tPopulated,\n> > > +\t\tInvalid,\n> > > +\t};\n> > > +\n> > > +\tStatus validate() const;\n> > > +};\n> > > +\n> > >  class CameraConfiguration\n> > >  {\n> > >  public:\n> > > @@ -66,6 +108,7 @@ public:\n> > >  \tbool empty() const;\n> > >  \tstd::size_t size() const;\n> > >\n> > > +\tSensorConfiguration sensorConfig;\n> > >  \tTransform transform;\n> > >\n> > >  protected:\n> > > diff --git a/src/libcamera/camera.cpp b/src/libcamera/camera.cpp\n> > > index 0eecee766f00..f497a35c90fb 100644\n> > > --- a/src/libcamera/camera.cpp\n> > > +++ b/src/libcamera/camera.cpp\n> > > @@ -97,6 +97,21 @@\n> > >   * implemented in the above order at the hardware level. The libcamera pipeline\n> > >   * handlers translate the pipeline model to the real hardware configuration.\n> > >   *\n> > > + * \\subsection camera-sensor-mode Camera Sensor Model\n> >\n> > s/-mode/-model/\n> >\n> > > + *\n> > > + * libcamera allows applications to control the configuration of the camera\n> > > + * sensor, particularly it allows to control the frame geometry and frame\n> > > + * delivery rate of the sensor.\n> >\n> > s/delivery //\n> >\n> > I'd like to make it clear that this is optional:\n> >\n> >  * By default, libcamera configures the camera sensor automatically based on the\n> >  * configuration of the streams. Applications may instead specify a manual\n> >  * configuration for the camera sensor. This allows precise control of the frame\n> >  * geometry and frame rate delivered by the sensor.\n> >\n> > > + *\n> > > + * The camera sensor configuration applies to all streams produced by a camera\n> > > + * from the same image source.\n> >\n> > This paragraph should go to CameraConfiguration::sensorConfig below.\n> >\n> > > + *\n> > > + * More details about the camera sensor model implemented by libcamera are\n> > > + * available in the libcamera camera-sensor-model documentation page.\n> > > + *\n> > > + * The sensor configuration is specified by applications by populating the\n> > > + * CameraConfiguration::sensorConfig class member.\n> >\n> > Drop this paragraph, it doesn't belong to the camera model introduction\n> > (none of the other sections here go into the level of details).\n> >\n> > > + *\n> > >   * \\subsection digital-zoom Digital Zoom\n> > >   *\n> > >   * Digital zoom is implemented as a combination of the cropping and scaling\n> > > @@ -111,6 +126,166 @@ namespace libcamera {\n> > >\n> > >  LOG_DECLARE_CATEGORY(Camera)\n> > >\n> > > +/**\n> > > + * \\class SensorConfiguration\n> > > + * \\brief Camera sensor configuration\n> > > + *\n> > > + * The SensorConfiguration class collects parameters to control the operations\n> > > + * of the camera sensor, accordingly to the abstract camera sensor model\n> >\n> > s/according/accordingly/\n> \n> Isn't this the case already ? Or did you mean the other way around ?\n\nOops, yes, I meant the other way around.\n\n> > > + * implemented by libcamera.\n> > > + *\n> > > + * \\todo Applications shall fully populate all fields of the\n> > > + * CameraConfiguration::sensorConfig class members before validating the\n> > > + * CameraConfiguration. If the SensorConfiguration is not fully populated, or if\n> > > + * any of its parameters cannot be applied to the sensor in use, the\n> > > + * CameraConfiguration validation process will fail and return\n> > > + * CameraConfiguration::Status::Invalid.\n> > > + *\n> > > + * Applications that populate the SensorConfiguration class members are\n> > > + * expected to be highly-specialized applications that know what sensor\n> > > + * they are operating with and what parameters are valid for the sensor in use.\n> > > + *\n> > > + * A detailed description of the abstract camera sensor model implemented by\n> > > + * libcamera and the description of its configuration parameters is available\n> > > + * in the libcamera documentation camera-sensor-model file.\n> > > + */\n> > > +\n> > > +/**\n> > > + * \\enum SensorConfiguration::Status\n> > > + * \\brief The sensor configuration validation status\n> > > + */\n> > > +\n> > > +/**\n> > > + * \\var SensorConfiguration::bitDepth\n> > > + * \\brief The sensor image format bit depth\n> > > + *\n> > > + * The number of bits (resolution) used to represent a pixel sample.\n> > > + */\n> > > +\n> > > +/**\n> > > + * \\var SensorConfiguration::analogCrop\n> > > + * \\brief The analog crop rectangle\n> > > + *\n> > > + * The selected portion of the active pixel array used to produce the image\n> > > + * frame.\n> > > + */\n> > > +\n> > > +/**\n> > > + * \\var SensorConfiguration::binning\n> > > + * \\brief Sensor binning configuration\n> > > + *\n> > > + * Refer to the camera-sensor-model documentation for an accurate description\n> > > + * of the binning operations. Disabled by default.\n> > > + */\n> > > +\n> > > +/**\n> > > + * \\var SensorConfiguration::binX\n> > > + * \\brief Horizontal binning factor\n> > > + *\n> > > + * The horizontal binning factor. Default to 1.\n> > > + */\n> > > +\n> > > +/**\n> > > + * \\var SensorConfiguration::binY\n> > > + * \\brief Vertical binning factor\n> > > + *\n> > > + * The vertical binning factor. Default to 1.\n> > > + */\n> > > +\n> > > +/**\n> > > + * \\var SensorConfiguration::skipping\n> > > + * \\brief The sensor skipping configuration\n> > > + *\n> > > + * Refer to the camera-sensor-model documentation for an accurate description\n> > > + * of the skipping operations.\n> > > + *\n> > > + * If no skipping is performed, all the structure fields should be\n> > > + * set to 1. Disabled by default.\n> > > + */\n> > > +\n> > > +/**\n> > > + * \\var SensorConfiguration::xOddInc\n> > > + * \\brief Horizontal increment for odd rows. Default to 1.\n> > > + */\n> > > +\n> > > +/**\n> > > + * \\var SensorConfiguration::xEvenInc\n> > > + * \\brief Horizontal increment for even rows. Default to 1.\n> > > + */\n> > > +\n> > > +/**\n> > > + * \\var SensorConfiguration::yOddInc\n> > > + * \\brief Vertical increment for odd columns. Default to 1.\n> > > + */\n> > > +\n> > > +/**\n> > > + * \\var SensorConfiguration::yEvenInc\n> > > + * \\brief Vertical increment for even columns. Default to 1.\n> > > + */\n> > > +\n> > > +/**\n> > > + * \\var SensorConfiguration::outputSize\n> > > + * \\brief The frame output (visible) size\n> > > + *\n> > > + * The size of the data frame as received by the host processor.\n> > > + */\n> > > +\n> > > +/**\n> > > + * \\fn SensorConfiguration::valid() const\n> > > + * \\brief Validate the SensorConfiguration\n> > > + *\n> > > + * Validate the sensor configuration.\n> > > + *\n> > > + * \\todo A sensor configuration is valid (or well-formed) if it's either\n> > > + * completely un-populated or fully populated. For now allow applications to\n> > > + * populate the bitDepth and the outputSize only.\n> >\n> > As I've mentioned before (so it shouldn't come as a surprise), I think\n> > this is a hack (and I think we agree :-)). I'm OK with it in the very\n> > short term, but with IMX519 support that should arrive soon, we'll need\n> > to do better. The IMX519 will likely be supported by the ccs kernel\n> > driver, which isn't mode-based. Configuring the sensor solely through\n> > the output resolution won't work. I plan to rework the CameraSensor\n> > class to support ccs-based sensors, and as part of that work, I will\n> > most likely address this todo item and probably require applications to\n> > select a full sensor configuration.\n> >\n> > This doesn't require any immediate change. I've CC'ed David and Naush as\n> > RPi is the first user of this API, and I don't want changes in the near\n> > future to come as a surprise.\n> >\n> > > + *\n> > > + * \\return True if the SensorConfiguration is either fully populated or\n> > > + * un-populated, false otherwise\n> > > + */\n> > > +\n> > > +/**\n> > > + * \\fn SensorConfiguration::operator bool() const\n> > > + * \\brief Test if a SensorConfiguration is fully populated\n> > > + * \\return True if the SensorConfiguration is fully populated\n> > > + */\n> > > +\n> > > +/**\n> > > + * \\brief Validate the sensor configuration\n> > > + *\n> > > + * \\todo A sensor configuration is valid (or well-formed) if it's either\n> > > + * completely un-populated or fully populated. For now allow applications to\n> > > + * populate the bitDepth and the outputSize only.\n> > > + *\n> > > + * \\return The sensor configuration status\n> > > + * \\retval Unpopulated The sensor configuration is fully unpopulated\n> > > + * \\retval Populated The sensor configuration is fully populated\n> > > + * \\retval Invalid The sensor configuration is invalid (not fully populated\n> > > + * and not fully unpopulated)\n> > > + */\n> > > +SensorConfiguration::Status SensorConfiguration::validate() const\n> > > +{\n> > > +\tif (bitDepth && binning.binX && binning.binY &&\n> > > +\t    skipping.xOddInc && skipping.yOddInc &&\n> > > +\t    skipping.xEvenInc && skipping.yEvenInc &&\n> > > +\t    !outputSize.isNull())\n> > > +\t\treturn Populated;\n> > > +\n> > > +\t/*\n> > > +\t * By default the binning and skipping factors are initialized to 1, but\n> > > +\t * a zero-initialized SensorConfiguration is considered unpopulated\n> > > +\t * as well.\n> > > +\t */\n> > > +\tif (!bitDepth &&\n> > > +\t    binning.binX <= 1 && binning.binY <= 1 &&\n> > > +\t    skipping.xOddInc <= 1 && skipping.yOddInc <= 1 &&\n> > > +\t    skipping.xEvenInc <= 1 && skipping.yEvenInc <= 1 &&\n> > > +\t    outputSize.isNull())\n> > > +\t\treturn Unpopulated;\n> > > +\n> > > +\treturn Invalid;\n> > > +}\n> > > +\n> > >  /**\n> > >   * \\class CameraConfiguration\n> > >   * \\brief Hold configuration for streams of the camera\n> > > @@ -391,6 +566,16 @@ CameraConfiguration::Status CameraConfiguration::validateColorSpaces(ColorSpaceF\n> > >  \treturn status;\n> > >  }\n> > >\n> > > +/**\n> > > + * \\var CameraConfiguration::sensorConfig\n> > > + * \\brief The camera sensor configuration\n> > > + *\n> > > + * The sensorConfig field allows control of the configuration of the camera\n> > > + * sensor. Refer to the camera-sensor-model documentation and to the\n> > > + * SensorConfiguration class documentation for details about the sensor\n> > > + * configuration process.\n> > > + */\n> > > +\n> > >  /**\n> > >   * \\var CameraConfiguration::transform\n> > >   * \\brief User-specified transform to be applied to the image","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 08460BD160\n\tfor <parsemail@patchwork.libcamera.org>;\n\tSun, 17 Sep 2023 15:45:44 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 490886293A;\n\tSun, 17 Sep 2023 17:45:43 +0200 (CEST)","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 3EB7862931\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSun, 17 Sep 2023 17:45:42 +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 2708C128D;\n\tSun, 17 Sep 2023 17:44:07 +0200 (CEST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1694965543;\n\tbh=eF1dextfcanV189LEfmhnAJghDrqFdXfX2w8pDwFo08=;\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=yh7qaZpSv71wfkyuZG2xWRWOnqW0RxEBjYq/bj/GIDnM8ExHMRXY+i8YXh5BIQBYY\n\t39tTVtokBerqkAPzflcPqiwOe+BcRqgC8gHso50E9q/6judrQEjQ2AtrYeBHdCs1VA\n\tElqvOU8liD8YZTu0gPR43RMMH1o2vp9PRfn1lPgCNsbcgksNZrALo/pFEaiq81dTok\n\tQsmWeC0rW0ygfmxrR6ddzzPsAYiTS9e9LZmo9QMmETvPnbbW50c0NLoK7EVw1YTsd3\n\tMwj3dW/VVzct8U9EveWOl+UtzS2BEysmsPiAvPEcyLTnhZxpW9w/uXeu0Y4PZfs63e\n\tMywLpbhN5cz9w==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1694965447;\n\tbh=eF1dextfcanV189LEfmhnAJghDrqFdXfX2w8pDwFo08=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=oYBmtiHK1WYqrbrUSEHrJ3PQtok5jyBHnIsdImJONJpycsuoW5Qp52CuchzBL86nB\n\t8KMlV7KcgZWgaeMo/GNaI/2eY1TFZWuSuujayOEWLKdN1IC30VsFNNDwwrCBPeQts2\n\tfUmUxavEeCjfRsQqsiOpU9YNYfsPlcH1bTBA3UaU="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"oYBmtiHK\"; dkim-atps=neutral","Date":"Sun, 17 Sep 2023 18:45:55 +0300","To":"Jacopo Mondi <jacopo.mondi@ideasonboard.com>","Message-ID":"<20230917154555.GB20834@pendragon.ideasonboard.com>","References":"<20230915130650.35691-1-jacopo.mondi@ideasonboard.com>\n\t<20230915130650.35691-3-jacopo.mondi@ideasonboard.com>\n\t<20230915160615.GB933@pendragon.ideasonboard.com>\n\t<lbyb6t7jv42mo336in4vz6dss3wpjaugk3drild4p7grofqpbn@2l7wvqcct3se>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<lbyb6t7jv42mo336in4vz6dss3wpjaugk3drild4p7grofqpbn@2l7wvqcct3se>","Subject":"Re: [libcamera-devel] [PATCH v3 02/12] libcamera: camera: Introduce\n\tSensorConfiguration","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@lists.libcamera.org, Sakari Ailus <sakari.ailus@iki.fi>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":32083,"web_url":"https://patchwork.libcamera.org/comment/32083/","msgid":"<ZzCYFLW812U2VMnx@valkosipuli.retiisi.eu>","date":"2024-11-10T11:25:08","subject":"Re: [libcamera-devel] [PATCH v3 02/12] libcamera: camera: Introduce\n\tSensorConfiguration","submitter":{"id":32,"url":"https://patchwork.libcamera.org/api/people/32/","name":"Sakari Ailus","email":"sakari.ailus@iki.fi"},"content":"Hi Laurent, Jacopo,\n\nSorry for the late reply.\n\nOn Sun, Sep 17, 2023 at 06:45:55PM +0300, Laurent Pinchart wrote:\n> > > > +\t\tunsigned int xOddInc = 1;\n> > > > +\t\tunsigned int xEvenInc = 1;\n> > > > +\t\tunsigned int yOddInc = 1;\n> > > > +\t\tunsigned int yEvenInc = 1;\n> > >\n> > > What's the reason for exposing the odd and even increments separately,\n> > > instead of a skipping factor ?\n> > \n> > CCS expresses the two skipping factors separately. I agree there are\n> > not many meaningful ways this two parameters can be combined, but if\n> > one knows how a sensor work it might be more natural expressing them\n> > in this way instead of simply saying x_skip = 2 ( == x_odd_inc=3,\n> > x_even_inc=2)\n> \n> Lots of sensors that support configuring skipping do no expose separate\n> odd and even skipping increments. That's why I think a simpler parameter\n> would be better.\n> \n> Sakari, do you have an opinion on this ? Are there reasonable use cases\n> for controlling the odd and even increments separately in a way that\n> couldn't be expressed by a single skipping factor (for each direction) ?\n\nSkipping (sub-sampling) is generally independent horizontally and\nvertically, binning is not. On some sensors reasonable output sizes may be\nimpelemented a combination of the two.","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 612B1BF415\n\tfor <parsemail@patchwork.libcamera.org>;\n\tSun, 10 Nov 2024 11:25:15 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 8A9BF657B8;\n\tSun, 10 Nov 2024 12:25:14 +0100 (CET)","from meesny.iki.fi (meesny.iki.fi [195.140.195.201])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id A2A5965498\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSun, 10 Nov 2024 12:25:12 +0100 (CET)","from hillosipuli.retiisi.eu\n\t(2a00-1190-d1dd-0-c641-1eff-feae-163c.v6.cust.suomicom.net\n\t[IPv6:2a00:1190:d1dd:0:c641:1eff:feae:163c])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\tkey-exchange X25519 server-signature RSA-PSS (2048 bits)\n\tserver-digest SHA256)\n\t(No client certificate requested) (Authenticated sender: sailus)\n\tby meesny.iki.fi (Postfix) with ESMTPSA id 4XmVhk3LGWzyVV;\n\tSun, 10 Nov 2024 13:25:10 +0200 (EET)","from valkosipuli.retiisi.eu (valkosipuli.localdomain [192.168.4.2])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\tkey-exchange ECDHE (prime256v1) server-signature RSA-PSS (4096 bits)\n\tserver-digest SHA256) (No client certificate requested)\n\tby hillosipuli.retiisi.eu (Postfix) with ESMTPS id 9C58A634C22;\n\tSun, 10 Nov 2024 13:25:08 +0200 (EET)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=iki.fi header.i=@iki.fi header.b=\"pKDjvN/+\";\n\tdkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=iki.fi; s=meesny;\n\tt=1731237910;\n\th=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n\tto:to:cc:cc:mime-version:mime-version:content-type:content-type:\n\tin-reply-to:in-reply-to:references:references;\n\tbh=1Ttp8M0+txtiaRHo+XIpQIZAU58NND8nMLmaYiOkgik=;\n\tb=pKDjvN/+FPLDuFQ+nA4UYNlisGtGZUznmJ278EYAC48yBpmsRq2C/SlmY4d7Io8Vj/njy8\n\th+2kqSP6R6we9vyfKI21sYqeAhY8KNZrjGAM3hcdIlYoVZ2ZrDhTd3mmBPtQYy9r7zYCO5\n\tZEfYlg/5mJBcCmDRUqeJ/agAbXyXM4c=","ARC-Seal":"i=1; s=meesny; d=iki.fi; t=1731237910; a=rsa-sha256; cv=none;\n\tb=lw3KW6PQfpv1PdoIAQZPS1/PDGTNWpdn/n221mmW9cAKssrDPmK8Jes1+ALDXCywgu10gQ\n\tcAODaxeCb4LcMKq4qcVKR/Vj16vQfBiLePIYp9/2LZG3t5TkfYYSLoIyWHhOBkP9ztggaj\n\tTlwvMVGidKIgj/y1PjhFIgc56NFMCC8=","ARC-Authentication-Results":"i=1; ORIGINATING;\n\tauth=pass smtp.auth=sailus smtp.mailfrom=sakari.ailus@iki.fi","ARC-Message-Signature":"i=1; a=rsa-sha256; c=relaxed/relaxed; d=iki.fi;\n\ts=meesny; t=1731237910;\n\th=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n\tto:to:cc:cc:mime-version:mime-version:content-type:content-type:\n\tin-reply-to:in-reply-to:references:references;\n\tbh=1Ttp8M0+txtiaRHo+XIpQIZAU58NND8nMLmaYiOkgik=;\n\tb=WNUzuENPERvl9fISFUDSFOfvEoESr3guiNS6F37jgx5fFQPlbKF5N+bAMjFoYQmo/hTnqj\n\t4AgIvRllcC3kz1kgJDcbka2HVz3DPgLFZdxGb7QPM4d+yFZkASkB4THJPa6HzeYpmEsbF9\n\tRdgSn81elfSjzcl1nTeUFqmdkYLCl5A=","Date":"Sun, 10 Nov 2024 11:25:08 +0000","From":"Sakari Ailus <sakari.ailus@iki.fi>","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Cc":"Jacopo Mondi <jacopo.mondi@ideasonboard.com>,\n\tlibcamera-devel@lists.libcamera.org","Subject":"Re: [libcamera-devel] [PATCH v3 02/12] libcamera: camera: Introduce\n\tSensorConfiguration","Message-ID":"<ZzCYFLW812U2VMnx@valkosipuli.retiisi.eu>","References":"<20230915130650.35691-1-jacopo.mondi@ideasonboard.com>\n\t<20230915130650.35691-3-jacopo.mondi@ideasonboard.com>\n\t<20230915160615.GB933@pendragon.ideasonboard.com>\n\t<lbyb6t7jv42mo336in4vz6dss3wpjaugk3drild4p7grofqpbn@2l7wvqcct3se>\n\t<20230917154555.GB20834@pendragon.ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=us-ascii","Content-Disposition":"inline","In-Reply-To":"<20230917154555.GB20834@pendragon.ideasonboard.com>","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>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":32084,"web_url":"https://patchwork.libcamera.org/comment/32084/","msgid":"<20241110190503.GF6002@pendragon.ideasonboard.com>","date":"2024-11-10T19:05:03","subject":"Re: [libcamera-devel] [PATCH v3 02/12] libcamera: camera: Introduce\n\tSensorConfiguration","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"On Sun, Nov 10, 2024 at 11:25:08AM +0000, Sakari Ailus wrote:\n> Hi Laurent, Jacopo,\n> \n> Sorry for the late reply.\n> \n> On Sun, Sep 17, 2023 at 06:45:55PM +0300, Laurent Pinchart wrote:\n> > > > > +\t\tunsigned int xOddInc = 1;\n> > > > > +\t\tunsigned int xEvenInc = 1;\n> > > > > +\t\tunsigned int yOddInc = 1;\n> > > > > +\t\tunsigned int yEvenInc = 1;\n> > > >\n> > > > What's the reason for exposing the odd and even increments separately,\n> > > > instead of a skipping factor ?\n> > > \n> > > CCS expresses the two skipping factors separately. I agree there are\n> > > not many meaningful ways this two parameters can be combined, but if\n> > > one knows how a sensor work it might be more natural expressing them\n> > > in this way instead of simply saying x_skip = 2 ( == x_odd_inc=3,\n> > > x_even_inc=2)\n> > \n> > Lots of sensors that support configuring skipping do no expose separate\n> > odd and even skipping increments. That's why I think a simpler parameter\n> > would be better.\n> > \n> > Sakari, do you have an opinion on this ? Are there reasonable use cases\n> > for controlling the odd and even increments separately in a way that\n> > couldn't be expressed by a single skipping factor (for each direction) ?\n> \n> Skipping (sub-sampling) is generally independent horizontally and\n> vertically, binning is not. On some sensors reasonable output sizes may be\n> impelemented a combination of the two.\n\nThere's no disagreement that horizontal and vertical factors need to be\nexpressed independently. The question was about independent even and odd\nincrements.","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 07711BE173\n\tfor <parsemail@patchwork.libcamera.org>;\n\tSun, 10 Nov 2024 19:05:13 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 32B4E657B8;\n\tSun, 10 Nov 2024 20:05:12 +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 5B0556540C\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSun, 10 Nov 2024 20:05:11 +0100 (CET)","from pendragon.ideasonboard.com (81-175-209-231.bb.dnainternet.fi\n\t[81.175.209.231])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id BD3487E4;\n\tSun, 10 Nov 2024 20:04:59 +0100 (CET)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"M+rTe4MQ\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1731265500;\n\tbh=hUIB/z6INBErfSN99xTD/CQ4K3H/vU32iiv9q5nT2NM=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=M+rTe4MQxphzjJOjiclEgHjtNvT7zaHNvwVcp7pg15qoLkUb12mHXdDdYSZDQDipW\n\tZbw7+beFDPVu3OtWqliB/pCZzq4uL7efk6GeDKq6AuXVfk41kGh0EhZuSE8UQ+A8cs\n\trswHBgk9h9ZRi7j9sXVlMdtLLTqoN/hZmgNqrc0g=","Date":"Sun, 10 Nov 2024 21:05:03 +0200","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Sakari Ailus <sakari.ailus@iki.fi>","Cc":"Jacopo Mondi <jacopo.mondi@ideasonboard.com>,\n\tlibcamera-devel@lists.libcamera.org","Subject":"Re: [libcamera-devel] [PATCH v3 02/12] libcamera: camera: Introduce\n\tSensorConfiguration","Message-ID":"<20241110190503.GF6002@pendragon.ideasonboard.com>","References":"<20230915130650.35691-1-jacopo.mondi@ideasonboard.com>\n\t<20230915130650.35691-3-jacopo.mondi@ideasonboard.com>\n\t<20230915160615.GB933@pendragon.ideasonboard.com>\n\t<lbyb6t7jv42mo336in4vz6dss3wpjaugk3drild4p7grofqpbn@2l7wvqcct3se>\n\t<20230917154555.GB20834@pendragon.ideasonboard.com>\n\t<ZzCYFLW812U2VMnx@valkosipuli.retiisi.eu>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<ZzCYFLW812U2VMnx@valkosipuli.retiisi.eu>","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>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":32086,"web_url":"https://patchwork.libcamera.org/comment/32086/","msgid":"<ZzG6gyFvm6Tdj_92@valkosipuli.retiisi.eu>","date":"2024-11-11T08:04:19","subject":"Re: [libcamera-devel] [PATCH v3 02/12] libcamera: camera: Introduce\n\tSensorConfiguration","submitter":{"id":32,"url":"https://patchwork.libcamera.org/api/people/32/","name":"Sakari Ailus","email":"sakari.ailus@iki.fi"},"content":"Hi Laurent,\n\nOn Sun, Nov 10, 2024 at 09:05:03PM +0200, Laurent Pinchart wrote:\n> On Sun, Nov 10, 2024 at 11:25:08AM +0000, Sakari Ailus wrote:\n> > Hi Laurent, Jacopo,\n> > \n> > Sorry for the late reply.\n> > \n> > On Sun, Sep 17, 2023 at 06:45:55PM +0300, Laurent Pinchart wrote:\n> > > > > > +\t\tunsigned int xOddInc = 1;\n> > > > > > +\t\tunsigned int xEvenInc = 1;\n> > > > > > +\t\tunsigned int yOddInc = 1;\n> > > > > > +\t\tunsigned int yEvenInc = 1;\n> > > > >\n> > > > > What's the reason for exposing the odd and even increments separately,\n> > > > > instead of a skipping factor ?\n> > > > \n> > > > CCS expresses the two skipping factors separately. I agree there are\n> > > > not many meaningful ways this two parameters can be combined, but if\n> > > > one knows how a sensor work it might be more natural expressing them\n> > > > in this way instead of simply saying x_skip = 2 ( == x_odd_inc=3,\n> > > > x_even_inc=2)\n> > > \n> > > Lots of sensors that support configuring skipping do no expose separate\n> > > odd and even skipping increments. That's why I think a simpler parameter\n> > > would be better.\n> > > \n> > > Sakari, do you have an opinion on this ? Are there reasonable use cases\n> > > for controlling the odd and even increments separately in a way that\n> > > couldn't be expressed by a single skipping factor (for each direction) ?\n> > \n> > Skipping (sub-sampling) is generally independent horizontally and\n> > vertically, binning is not. On some sensors reasonable output sizes may be\n> > impelemented a combination of the two.\n> \n> There's no disagreement that horizontal and vertical factors need to be\n> expressed independently. The question was about independent even and odd\n> increments.\n\nThat's what I meant.\n\nCCS separates odd and even increments but in practice the odd increment\nshould always be 1. I guess we could add support for these as well. I'd be\ninclined to support sub-sampling using controls, separately for each\ndirection.","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 1EB92BE173\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 11 Nov 2024 08:04:26 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id EF614657B9;\n\tMon, 11 Nov 2024 09:04:24 +0100 (CET)","from lahtoruutu.iki.fi (lahtoruutu.iki.fi [185.185.170.37])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 500F965486\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 11 Nov 2024 09:04:23 +0100 (CET)","from hillosipuli.retiisi.eu\n\t(2a00-1190-d1dd-0-c641-1eff-feae-163c.v6.cust.suomicom.net\n\t[IPv6:2a00:1190:d1dd:0:c641:1eff:feae:163c])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\tkey-exchange X25519 server-signature RSA-PSS (2048 bits)\n\tserver-digest SHA256)\n\t(No client certificate requested) (Authenticated sender: sailus)\n\tby lahtoruutu.iki.fi (Postfix) with ESMTPSA id 4Xn2BX3rfpz49PvR;\n\tMon, 11 Nov 2024 10:04:20 +0200 (EET)","from valkosipuli.retiisi.eu (valkosipuli.localdomain [192.168.4.2])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\tkey-exchange ECDHE (prime256v1) server-signature RSA-PSS (4096 bits)\n\tserver-digest SHA256) (No client certificate requested)\n\tby hillosipuli.retiisi.eu (Postfix) with ESMTPS id EFF0D634C94;\n\tMon, 11 Nov 2024 10:04:19 +0200 (EET)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (2048-bit key;\n\tunprotected) header.d=iki.fi header.i=@iki.fi header.b=\"UQitPpvr\";\n\tdkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=iki.fi; s=lahtoruutu;\n\tt=1731312261;\n\th=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n\tto:to:cc:cc:mime-version:mime-version:content-type:content-type:\n\tin-reply-to:in-reply-to:references:references;\n\tbh=ZOB32tdUJHRzsUJdeRYIwgKt4WOal+oDtc3oNmlv9UE=;\n\tb=UQitPpvrRKm0sxS5vh0BiL57iczSlqbAD2mN21sEFMtNR7DMU7nFV5wMgh/w9N5QQUFzRV\n\tqn3AHjmaTJXbburMYzqNnhpVBVJFMUep4oTCWWoNkK+moPk1H3mTJ98K9kg0RifLIcde0B\n\tFq+mYkbYkJjf/Jkpf8qnuB9hHMjDshVCI2gYM0I8SmFGRWlnPzEP2yHZjU/TDTm4Iz+dgU\n\tjJf7WkPYpHbXE9zlW7oe4arFstuMR1KIMnIJ9w2LZz0eVKeR0ieLsrsyjSiwBd0mGgj3WN\n\tIfnGKBTjNjnHYkFcVmwK22qnTdfUuSSgdz+cW2CEtZ3bl9vWkVFSJhw+/j+/YQ==","ARC-Message-Signature":"i=1; a=rsa-sha256; c=relaxed/relaxed; d=iki.fi;\n\ts=lahtoruutu; t=1731312261;\n\th=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n\tto:to:cc:cc:mime-version:mime-version:content-type:content-type:\n\tin-reply-to:in-reply-to:references:references;\n\tbh=ZOB32tdUJHRzsUJdeRYIwgKt4WOal+oDtc3oNmlv9UE=;\n\tb=N9IcPAbHPXzmO5Wq+YtNiQcLIaG5ZN3PTYRMYJtbLxKZJkt1R9RHCj79AeSyU8PLLvqsfD\n\txpVG+T2udcbqvqT8P/j9fzVRbeStJT0ydzoqGZ6oze/i7U8bpmh4x3vyb2pIrAeND7uLe4\n\tqh0pgrFeSA5fNvEORdfdakhGCF4UqG9t0Dkrm/UO4EfjmgmGq4crZ24u4mxd14kpyobiKq\n\t9Gjs1IgKx4VSs0tdG76JyiH59JkDH8mUklFZtT/wYefwwOZDOHgvCrDSfTXzlV3aGsr62u\n\tFDLA2JBeYeOa3g74VTnMbXNn63OHR9p1uz48shCaNzPsXSoHo8bTSuYqgmvrmA==","ARC-Seal":"i=1; s=lahtoruutu; d=iki.fi; t=1731312261; a=rsa-sha256; cv=none; \n\tb=O8VgPgMPFYBFARecGOzHbPXNE+OZxdTIJQ1BtobLW3wktVEh9K4a5HQmPDaU9w3pJ8/XS+\n\towjcWtLf6N0Hh0e8swAEsCaJSeC00x8GHlsrPNfiWS0Zne71mdokudSNdS4xl4ccwdOiZX\n\t+u9DUmiSxzBSsfSZIi0zgD86Ph9fMkIMtKxDg/H+DA1SDpbynFdXLhxSuIHaBhAl2Wq6/R\n\tqx4Pi9dfN0UgtFkr9QdoxEu0pH1BHbcqv2nnNX0Bd2/vsrFXM7Ctwgzu51+GoCRkOIZKEf\n\tr5/ulBYO5MlxQidxuo+K498wBI/sDQnVVmUpZOMmRKs9H5w8ak8OVZbhtfOLAw==","ARC-Authentication-Results":"i=1; ORIGINATING;\n\tauth=pass smtp.auth=sailus smtp.mailfrom=sakari.ailus@iki.fi","Date":"Mon, 11 Nov 2024 08:04:19 +0000","From":"Sakari Ailus <sakari.ailus@iki.fi>","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Cc":"Jacopo Mondi <jacopo.mondi@ideasonboard.com>,\n\tlibcamera-devel@lists.libcamera.org","Subject":"Re: [libcamera-devel] [PATCH v3 02/12] libcamera: camera: Introduce\n\tSensorConfiguration","Message-ID":"<ZzG6gyFvm6Tdj_92@valkosipuli.retiisi.eu>","References":"<20230915130650.35691-1-jacopo.mondi@ideasonboard.com>\n\t<20230915130650.35691-3-jacopo.mondi@ideasonboard.com>\n\t<20230915160615.GB933@pendragon.ideasonboard.com>\n\t<lbyb6t7jv42mo336in4vz6dss3wpjaugk3drild4p7grofqpbn@2l7wvqcct3se>\n\t<20230917154555.GB20834@pendragon.ideasonboard.com>\n\t<ZzCYFLW812U2VMnx@valkosipuli.retiisi.eu>\n\t<20241110190503.GF6002@pendragon.ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=us-ascii","Content-Disposition":"inline","In-Reply-To":"<20241110190503.GF6002@pendragon.ideasonboard.com>","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>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":32088,"web_url":"https://patchwork.libcamera.org/comment/32088/","msgid":"<20241111081230.GI6002@pendragon.ideasonboard.com>","date":"2024-11-11T08:12:30","subject":"Re: [libcamera-devel] [PATCH v3 02/12] libcamera: camera: Introduce\n\tSensorConfiguration","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"On Mon, Nov 11, 2024 at 08:04:19AM +0000, Sakari Ailus wrote:\n> On Sun, Nov 10, 2024 at 09:05:03PM +0200, Laurent Pinchart wrote:\n> > On Sun, Nov 10, 2024 at 11:25:08AM +0000, Sakari Ailus wrote:\n> > > On Sun, Sep 17, 2023 at 06:45:55PM +0300, Laurent Pinchart wrote:\n> > > > > > > +\t\tunsigned int xOddInc = 1;\n> > > > > > > +\t\tunsigned int xEvenInc = 1;\n> > > > > > > +\t\tunsigned int yOddInc = 1;\n> > > > > > > +\t\tunsigned int yEvenInc = 1;\n> > > > > >\n> > > > > > What's the reason for exposing the odd and even increments separately,\n> > > > > > instead of a skipping factor ?\n> > > > > \n> > > > > CCS expresses the two skipping factors separately. I agree there are\n> > > > > not many meaningful ways this two parameters can be combined, but if\n> > > > > one knows how a sensor work it might be more natural expressing them\n> > > > > in this way instead of simply saying x_skip = 2 ( == x_odd_inc=3,\n> > > > > x_even_inc=2)\n> > > > \n> > > > Lots of sensors that support configuring skipping do no expose separate\n> > > > odd and even skipping increments. That's why I think a simpler parameter\n> > > > would be better.\n> > > > \n> > > > Sakari, do you have an opinion on this ? Are there reasonable use cases\n> > > > for controlling the odd and even increments separately in a way that\n> > > > couldn't be expressed by a single skipping factor (for each direction) ?\n> > > \n> > > Skipping (sub-sampling) is generally independent horizontally and\n> > > vertically, binning is not. On some sensors reasonable output sizes may be\n> > > impelemented a combination of the two.\n> > \n> > There's no disagreement that horizontal and vertical factors need to be\n> > expressed independently. The question was about independent even and odd\n> > increments.\n> \n> That's what I meant.\n> \n> CCS separates odd and even increments but in practice the odd increment\n> should always be 1. I guess we could add support for these as well.\n\nI'm not asking to add support for exposing the odd and even increments\nto userspace. Quite the opposite, I was proposing combining them into a\nsingle factor in the API that libcamera exposes to applications. The\nfeedback I would like is whether or not there is a real need for\napplications to configure the increments separately. If so, why ?\n\n> I'd be\n> inclined to support sub-sampling using controls, separately for each\n> direction. \n\nIs this still related to the odd and even increments, or a separate\ntopic ? If still related, could you please explain more clearly what you\nmean ?","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 59DEABF415\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 11 Nov 2024 08:12:39 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 7CA79657BE;\n\tMon, 11 Nov 2024 09:12: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 6E599657B4\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 11 Nov 2024 09:12:37 +0100 (CET)","from pendragon.ideasonboard.com (81-175-209-231.bb.dnainternet.fi\n\t[81.175.209.231])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 88211788;\n\tMon, 11 Nov 2024 09:12:25 +0100 (CET)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"H076GGjN\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1731312745;\n\tbh=eI9+OcW4blsYQF0+9nMtsesouF596MeKTDTjHzFRbS8=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=H076GGjNjzovSR67L6FoPhQtXvPx5ikHrQH1QmAROb89UWdMI+sm/m7TcB1nbbH6K\n\tWt8FX+glCoI7CZ8U4jIsOLwrWPcrrE+CuIjXt6eZVd1J0tDLvZ4kpABzCSdsv1zhQz\n\tZpx8bH6WglHYqZteja072dPNtJlhros7gzXtvStU=","Date":"Mon, 11 Nov 2024 10:12:30 +0200","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Sakari Ailus <sakari.ailus@iki.fi>","Cc":"Jacopo Mondi <jacopo.mondi@ideasonboard.com>,\n\tlibcamera-devel@lists.libcamera.org","Subject":"Re: [libcamera-devel] [PATCH v3 02/12] libcamera: camera: Introduce\n\tSensorConfiguration","Message-ID":"<20241111081230.GI6002@pendragon.ideasonboard.com>","References":"<20230915130650.35691-1-jacopo.mondi@ideasonboard.com>\n\t<20230915130650.35691-3-jacopo.mondi@ideasonboard.com>\n\t<20230915160615.GB933@pendragon.ideasonboard.com>\n\t<lbyb6t7jv42mo336in4vz6dss3wpjaugk3drild4p7grofqpbn@2l7wvqcct3se>\n\t<20230917154555.GB20834@pendragon.ideasonboard.com>\n\t<ZzCYFLW812U2VMnx@valkosipuli.retiisi.eu>\n\t<20241110190503.GF6002@pendragon.ideasonboard.com>\n\t<ZzG6gyFvm6Tdj_92@valkosipuli.retiisi.eu>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<ZzG6gyFvm6Tdj_92@valkosipuli.retiisi.eu>","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>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":32089,"web_url":"https://patchwork.libcamera.org/comment/32089/","msgid":"<ZzHBrQRZgjnetDhp@valkosipuli.retiisi.eu>","date":"2024-11-11T08:34:53","subject":"Re: [libcamera-devel] [PATCH v3 02/12] libcamera: camera: Introduce\n\tSensorConfiguration","submitter":{"id":32,"url":"https://patchwork.libcamera.org/api/people/32/","name":"Sakari Ailus","email":"sakari.ailus@iki.fi"},"content":"On Mon, Nov 11, 2024 at 10:12:30AM +0200, Laurent Pinchart wrote:\n> On Mon, Nov 11, 2024 at 08:04:19AM +0000, Sakari Ailus wrote:\n> > On Sun, Nov 10, 2024 at 09:05:03PM +0200, Laurent Pinchart wrote:\n> > > On Sun, Nov 10, 2024 at 11:25:08AM +0000, Sakari Ailus wrote:\n> > > > On Sun, Sep 17, 2023 at 06:45:55PM +0300, Laurent Pinchart wrote:\n> > > > > > > > +\t\tunsigned int xOddInc = 1;\n> > > > > > > > +\t\tunsigned int xEvenInc = 1;\n> > > > > > > > +\t\tunsigned int yOddInc = 1;\n> > > > > > > > +\t\tunsigned int yEvenInc = 1;\n> > > > > > >\n> > > > > > > What's the reason for exposing the odd and even increments separately,\n> > > > > > > instead of a skipping factor ?\n> > > > > > \n> > > > > > CCS expresses the two skipping factors separately. I agree there are\n> > > > > > not many meaningful ways this two parameters can be combined, but if\n> > > > > > one knows how a sensor work it might be more natural expressing them\n> > > > > > in this way instead of simply saying x_skip = 2 ( == x_odd_inc=3,\n> > > > > > x_even_inc=2)\n> > > > > \n> > > > > Lots of sensors that support configuring skipping do no expose separate\n> > > > > odd and even skipping increments. That's why I think a simpler parameter\n> > > > > would be better.\n> > > > > \n> > > > > Sakari, do you have an opinion on this ? Are there reasonable use cases\n> > > > > for controlling the odd and even increments separately in a way that\n> > > > > couldn't be expressed by a single skipping factor (for each direction) ?\n> > > > \n> > > > Skipping (sub-sampling) is generally independent horizontally and\n> > > > vertically, binning is not. On some sensors reasonable output sizes may be\n> > > > impelemented a combination of the two.\n> > > \n> > > There's no disagreement that horizontal and vertical factors need to be\n> > > expressed independently. The question was about independent even and odd\n> > > increments.\n> > \n> > That's what I meant.\n> > \n> > CCS separates odd and even increments but in practice the odd increment\n> > should always be 1. I guess we could add support for these as well.\n> \n> I'm not asking to add support for exposing the odd and even increments\n> to userspace. Quite the opposite, I was proposing combining them into a\n> single factor in the API that libcamera exposes to applications. The\n> feedback I would like is whether or not there is a real need for\n> applications to configure the increments separately. If so, why ?\n\nThe limits for horizontal and vertical sub-sampling are not connected in\nhardware. Beyond that, as I noted above, some reasonable output sizes are\nachieved as combination of sub-sampling and binning on some sensors.\nTherefore I don't think you can combine the two, at least without limiting\nwhat can be supported, which is why I think horizontal and vertical\nsub-sampling need to remain separate.\n\n> \n> > I'd be\n> > inclined to support sub-sampling using controls, separately for each\n> > direction. \n> \n> Is this still related to the odd and even increments, or a separate\n> topic ? If still related, could you please explain more clearly what you\n> mean ?\n\nWhat's required for sub-sampling, i.e. odd increments. The even increments\ncould be added later on.\n\nIn fact, even increments appear to be useful on monochrome sensors.\n\nI'll add this to the next version of the sensor interface patches.","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 BDE8ABE173\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 11 Nov 2024 08:34:57 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id F3AB1657C2;\n\tMon, 11 Nov 2024 09:34:56 +0100 (CET)","from lahtoruutu.iki.fi (lahtoruutu.iki.fi [185.185.170.37])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 30E8160355\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 11 Nov 2024 09:34:56 +0100 (CET)","from hillosipuli.retiisi.eu\n\t(2a00-1190-d1dd-0-c641-1eff-feae-163c.v6.cust.suomicom.net\n\t[IPv6:2a00:1190:d1dd:0:c641:1eff:feae:163c])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\tkey-exchange X25519 server-signature RSA-PSS (2048 bits)\n\tserver-digest SHA256)\n\t(No client certificate requested) (Authenticated sender: sailus)\n\tby lahtoruutu.iki.fi (Postfix) with ESMTPSA id 4Xn2sq1Nywz49QDh;\n\tMon, 11 Nov 2024 10:34:54 +0200 (EET)","from valkosipuli.retiisi.eu (valkosipuli.localdomain [192.168.4.2])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\tkey-exchange ECDHE (prime256v1) server-signature RSA-PSS (4096 bits)\n\tserver-digest SHA256) (No client certificate requested)\n\tby hillosipuli.retiisi.eu (Postfix) with ESMTPS id CF288634C22;\n\tMon, 11 Nov 2024 10:34:53 +0200 (EET)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (2048-bit key;\n\tunprotected) header.d=iki.fi header.i=@iki.fi header.b=\"Rn7BSs/4\";\n\tdkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=iki.fi; s=lahtoruutu;\n\tt=1731314095;\n\th=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n\tto:to:cc:cc:mime-version:mime-version:content-type:content-type:\n\tin-reply-to:in-reply-to:references:references;\n\tbh=U+2FsXkB6TsjdRelUMRVxsryb+MlLxRmiGUtMbGMBrI=;\n\tb=Rn7BSs/4uhd6nYBYbBnr/Vfsx1NJsBrkBG6hLHnAlUPAvalip0TABM8ZKpQ+AQMo72578B\n\tOUGearTaNHIftGtSyGDR2WgSuYbOVnn2B6rbp4KbkV/sjyvy5FGhDVzypce25xHTGC//6E\n\tlq6966MafH2v7OlAAUgClMY/np6QsPfTvvvwivbaJfj2HzjL3Gf1dbXHOoXau6KwgoTtw+\n\tSdXa926fi1gAnDOtcgmWvsceHzUsqWlEd43lVD26HCrk3G+Hm2TvYrTVXN67e9UViEAHZp\n\tg/YP4YcRxs+gf6Da6AC93Y7/n2oDrvFPk2K/kKEMshGkfkUgZ9Q2vtLmhviMug==","ARC-Message-Signature":"i=1; a=rsa-sha256; c=relaxed/relaxed; d=iki.fi;\n\ts=lahtoruutu; t=1731314095;\n\th=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n\tto:to:cc:cc:mime-version:mime-version:content-type:content-type:\n\tin-reply-to:in-reply-to:references:references;\n\tbh=U+2FsXkB6TsjdRelUMRVxsryb+MlLxRmiGUtMbGMBrI=;\n\tb=m69S5dzDUHw6ZXSWiPC+8WNOWn1QzVRc7AHsKpIHZuWy5ccA590zQLERYl49qxnX4PyY8U\n\tn5UVdERRhQ8gZuO6beKg1IerBUyIaAB/YD7OMveIQNPkRTTi8OwnWpOj4PO/qjNQb0YlJ8\n\t+gX9BDKtN11iFA7Zr470cA/ZOOe2e39tBq9m7DuQhH0STtA3r9f1tzY8WbliBHDJXNUOS5\n\tcwLvA0qGtmHSnmxtiWWkvJIyzkOBIQc3G+K6Vh8UAXmH21RQ/SfOZbyJQZ/HR870TKc7Mv\n\tuZ/8W9+G74PERLZM1Uuq5ATQ0VLAvPR25iJM2YAj42UsLUIKoTmGjaA1RSuoEQ==","ARC-Seal":"i=1; s=lahtoruutu; d=iki.fi; t=1731314095; a=rsa-sha256; cv=none; \n\tb=WOCH2kNUCaNJFgFow4ODSD6cvxs6eql3Bmpaj8HrOPujN8UgNIS5LIlk/wLSBCG1XzOrAi\n\t6nI62JuJ2fsXp1u8v0tCEzDcXLOuru8dTd6NPWqxbW1Rf99An3Rd70Xi8lsO3sf/45Std2\n\tmofUu/067Gm97DYls9j7O2x9t79dP8Ugvo/Zr5ceJWAxnpZ477Dm4+HEd7WvXf2OzuQsDm\n\tIqpADk3l42WXiLJ17KDO90O3cGRLqU9HNl6vR10e5sPFCEnZkApht7n7yc9Q2Le/7WFn+X\n\txwIdbXAtyPE2lhCuSJLKzPbY4fbab5sN4pFIwgkR6Xbeo5TugfAODuxQhNWIjA==","ARC-Authentication-Results":"i=1; ORIGINATING;\n\tauth=pass smtp.auth=sailus smtp.mailfrom=sakari.ailus@iki.fi","Date":"Mon, 11 Nov 2024 08:34:53 +0000","From":"Sakari Ailus <sakari.ailus@iki.fi>","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Cc":"Jacopo Mondi <jacopo.mondi@ideasonboard.com>,\n\tlibcamera-devel@lists.libcamera.org","Subject":"Re: [libcamera-devel] [PATCH v3 02/12] libcamera: camera: Introduce\n\tSensorConfiguration","Message-ID":"<ZzHBrQRZgjnetDhp@valkosipuli.retiisi.eu>","References":"<20230915130650.35691-1-jacopo.mondi@ideasonboard.com>\n\t<20230915130650.35691-3-jacopo.mondi@ideasonboard.com>\n\t<20230915160615.GB933@pendragon.ideasonboard.com>\n\t<lbyb6t7jv42mo336in4vz6dss3wpjaugk3drild4p7grofqpbn@2l7wvqcct3se>\n\t<20230917154555.GB20834@pendragon.ideasonboard.com>\n\t<ZzCYFLW812U2VMnx@valkosipuli.retiisi.eu>\n\t<20241110190503.GF6002@pendragon.ideasonboard.com>\n\t<ZzG6gyFvm6Tdj_92@valkosipuli.retiisi.eu>\n\t<20241111081230.GI6002@pendragon.ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=us-ascii","Content-Disposition":"inline","In-Reply-To":"<20241111081230.GI6002@pendragon.ideasonboard.com>","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>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":32090,"web_url":"https://patchwork.libcamera.org/comment/32090/","msgid":"<20241111085755.GA1546@pendragon.ideasonboard.com>","date":"2024-11-11T08:57:55","subject":"Re: [libcamera-devel] [PATCH v3 02/12] libcamera: camera: Introduce\n\tSensorConfiguration","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"On Mon, Nov 11, 2024 at 08:34:53AM +0000, Sakari Ailus wrote:\n> On Mon, Nov 11, 2024 at 10:12:30AM +0200, Laurent Pinchart wrote:\n> > On Mon, Nov 11, 2024 at 08:04:19AM +0000, Sakari Ailus wrote:\n> > > On Sun, Nov 10, 2024 at 09:05:03PM +0200, Laurent Pinchart wrote:\n> > > > On Sun, Nov 10, 2024 at 11:25:08AM +0000, Sakari Ailus wrote:\n> > > > > On Sun, Sep 17, 2023 at 06:45:55PM +0300, Laurent Pinchart wrote:\n> > > > > > > > > +\t\tunsigned int xOddInc = 1;\n> > > > > > > > > +\t\tunsigned int xEvenInc = 1;\n> > > > > > > > > +\t\tunsigned int yOddInc = 1;\n> > > > > > > > > +\t\tunsigned int yEvenInc = 1;\n> > > > > > > >\n> > > > > > > > What's the reason for exposing the odd and even increments separately,\n> > > > > > > > instead of a skipping factor ?\n> > > > > > > \n> > > > > > > CCS expresses the two skipping factors separately. I agree there are\n> > > > > > > not many meaningful ways this two parameters can be combined, but if\n> > > > > > > one knows how a sensor work it might be more natural expressing them\n> > > > > > > in this way instead of simply saying x_skip = 2 ( == x_odd_inc=3,\n> > > > > > > x_even_inc=2)\n> > > > > > \n> > > > > > Lots of sensors that support configuring skipping do no expose separate\n> > > > > > odd and even skipping increments. That's why I think a simpler parameter\n> > > > > > would be better.\n> > > > > > \n> > > > > > Sakari, do you have an opinion on this ? Are there reasonable use cases\n> > > > > > for controlling the odd and even increments separately in a way that\n> > > > > > couldn't be expressed by a single skipping factor (for each direction) ?\n> > > > > \n> > > > > Skipping (sub-sampling) is generally independent horizontally and\n> > > > > vertically, binning is not. On some sensors reasonable output sizes may be\n> > > > > impelemented a combination of the two.\n> > > > \n> > > > There's no disagreement that horizontal and vertical factors need to be\n> > > > expressed independently. The question was about independent even and odd\n> > > > increments.\n> > > \n> > > That's what I meant.\n> > > \n> > > CCS separates odd and even increments but in practice the odd increment\n> > > should always be 1. I guess we could add support for these as well.\n> > \n> > I'm not asking to add support for exposing the odd and even increments\n> > to userspace. Quite the opposite, I was proposing combining them into a\n> > single factor in the API that libcamera exposes to applications. The\n> > feedback I would like is whether or not there is a real need for\n> > applications to configure the increments separately. If so, why ?\n> \n> The limits for horizontal and vertical sub-sampling are not connected in\n> hardware. Beyond that, as I noted above, some reasonable output sizes are\n> achieved as combination of sub-sampling and binning on some sensors.\n> Therefore I don't think you can combine the two, at least without limiting\n> what can be supported, which is why I think horizontal and vertical\n> sub-sampling need to remain separate.\n\n... I don't think we understand each other.\n\nThe odd and even increments exist both horizontally and vertically.\nQuoting myself from a previous e-mail,\n\n> > > > There's no disagreement that horizontal and vertical factors need to be\n> > > > expressed independently. The question was about independent even and odd\n> > > > increments.\n\n\n> > > I'd be\n> > > inclined to support sub-sampling using controls, separately for each\n> > > direction. \n> > \n> > Is this still related to the odd and even increments, or a separate\n> > topic ? If still related, could you please explain more clearly what you\n> > mean ?\n> \n> What's required for sub-sampling, i.e. odd increments. The even increments\n> could be added later on.\n\nAren't both odd and even increments related to subsampling ?\n\n> In fact, even increments appear to be useful on monochrome sensors.\n> \n> I'll add this to the next version of the sensor interface patches.","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 35CA7BF415\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 11 Nov 2024 08:58:06 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 1ED04657C3;\n\tMon, 11 Nov 2024 09:58:05 +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 26D2C60355\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 11 Nov 2024 09:58:03 +0100 (CET)","from pendragon.ideasonboard.com (81-175-209-231.bb.dnainternet.fi\n\t[81.175.209.231])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 49B43788;\n\tMon, 11 Nov 2024 09:57:51 +0100 (CET)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"T5ljdwjd\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1731315471;\n\tbh=7hhxf0Nw+WiSn5tS/DgISmDSvoCJaqbcF13MmeX1r/c=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=T5ljdwjdXtPKqT/8x3Sd4NftJZ1j1mgW0rkeMELk91YgpyjT3Kk20L9BfLYxTPLgU\n\t3yoP/PZ4ztktVmR0NG1PkqCNB3oqVS10fh+qq05TkM28HJME+vxyedBVVQp5cxg4PV\n\t0TzaGqZUtZBzYN4slKpLBDHJBt0522Oz1bRjC2P4=","Date":"Mon, 11 Nov 2024 10:57:55 +0200","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Sakari Ailus <sakari.ailus@iki.fi>","Cc":"Jacopo Mondi <jacopo.mondi@ideasonboard.com>,\n\tlibcamera-devel@lists.libcamera.org","Subject":"Re: [libcamera-devel] [PATCH v3 02/12] libcamera: camera: Introduce\n\tSensorConfiguration","Message-ID":"<20241111085755.GA1546@pendragon.ideasonboard.com>","References":"<20230915130650.35691-1-jacopo.mondi@ideasonboard.com>\n\t<20230915130650.35691-3-jacopo.mondi@ideasonboard.com>\n\t<20230915160615.GB933@pendragon.ideasonboard.com>\n\t<lbyb6t7jv42mo336in4vz6dss3wpjaugk3drild4p7grofqpbn@2l7wvqcct3se>\n\t<20230917154555.GB20834@pendragon.ideasonboard.com>\n\t<ZzCYFLW812U2VMnx@valkosipuli.retiisi.eu>\n\t<20241110190503.GF6002@pendragon.ideasonboard.com>\n\t<ZzG6gyFvm6Tdj_92@valkosipuli.retiisi.eu>\n\t<20241111081230.GI6002@pendragon.ideasonboard.com>\n\t<ZzHBrQRZgjnetDhp@valkosipuli.retiisi.eu>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<ZzHBrQRZgjnetDhp@valkosipuli.retiisi.eu>","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>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":32092,"web_url":"https://patchwork.libcamera.org/comment/32092/","msgid":"<ZzHIgyp_iuMHDrVV@valkosipuli.retiisi.eu>","date":"2024-11-11T09:04:03","subject":"Re: [libcamera-devel] [PATCH v3 02/12] libcamera: camera: Introduce\n\tSensorConfiguration","submitter":{"id":32,"url":"https://patchwork.libcamera.org/api/people/32/","name":"Sakari Ailus","email":"sakari.ailus@iki.fi"},"content":"On Mon, Nov 11, 2024 at 10:57:55AM +0200, Laurent Pinchart wrote:\n> On Mon, Nov 11, 2024 at 08:34:53AM +0000, Sakari Ailus wrote:\n> > On Mon, Nov 11, 2024 at 10:12:30AM +0200, Laurent Pinchart wrote:\n> > > On Mon, Nov 11, 2024 at 08:04:19AM +0000, Sakari Ailus wrote:\n> > > > On Sun, Nov 10, 2024 at 09:05:03PM +0200, Laurent Pinchart wrote:\n> > > > > On Sun, Nov 10, 2024 at 11:25:08AM +0000, Sakari Ailus wrote:\n> > > > > > On Sun, Sep 17, 2023 at 06:45:55PM +0300, Laurent Pinchart wrote:\n> > > > > > > > > > +\t\tunsigned int xOddInc = 1;\n> > > > > > > > > > +\t\tunsigned int xEvenInc = 1;\n> > > > > > > > > > +\t\tunsigned int yOddInc = 1;\n> > > > > > > > > > +\t\tunsigned int yEvenInc = 1;\n> > > > > > > > >\n> > > > > > > > > What's the reason for exposing the odd and even increments separately,\n> > > > > > > > > instead of a skipping factor ?\n> > > > > > > > \n> > > > > > > > CCS expresses the two skipping factors separately. I agree there are\n> > > > > > > > not many meaningful ways this two parameters can be combined, but if\n> > > > > > > > one knows how a sensor work it might be more natural expressing them\n> > > > > > > > in this way instead of simply saying x_skip = 2 ( == x_odd_inc=3,\n> > > > > > > > x_even_inc=2)\n> > > > > > > \n> > > > > > > Lots of sensors that support configuring skipping do no expose separate\n> > > > > > > odd and even skipping increments. That's why I think a simpler parameter\n> > > > > > > would be better.\n> > > > > > > \n> > > > > > > Sakari, do you have an opinion on this ? Are there reasonable use cases\n> > > > > > > for controlling the odd and even increments separately in a way that\n> > > > > > > couldn't be expressed by a single skipping factor (for each direction) ?\n> > > > > > \n> > > > > > Skipping (sub-sampling) is generally independent horizontally and\n> > > > > > vertically, binning is not. On some sensors reasonable output sizes may be\n> > > > > > impelemented a combination of the two.\n> > > > > \n> > > > > There's no disagreement that horizontal and vertical factors need to be\n> > > > > expressed independently. The question was about independent even and odd\n> > > > > increments.\n> > > > \n> > > > That's what I meant.\n> > > > \n> > > > CCS separates odd and even increments but in practice the odd increment\n> > > > should always be 1. I guess we could add support for these as well.\n> > > \n> > > I'm not asking to add support for exposing the odd and even increments\n> > > to userspace. Quite the opposite, I was proposing combining them into a\n> > > single factor in the API that libcamera exposes to applications. The\n> > > feedback I would like is whether or not there is a real need for\n> > > applications to configure the increments separately. If so, why ?\n> > \n> > The limits for horizontal and vertical sub-sampling are not connected in\n> > hardware. Beyond that, as I noted above, some reasonable output sizes are\n> > achieved as combination of sub-sampling and binning on some sensors.\n> > Therefore I don't think you can combine the two, at least without limiting\n> > what can be supported, which is why I think horizontal and vertical\n> > sub-sampling need to remain separate.\n> \n> ... I don't think we understand each other.\n> \n> The odd and even increments exist both horizontally and vertically.\n> Quoting myself from a previous e-mail,\n> \n> > > > > There's no disagreement that horizontal and vertical factors need to be\n> > > > > expressed independently. The question was about independent even and odd\n> > > > > increments.\n\nAh, right. As noted above, the even increment is almost always 1. In\npractice this could have other values on monochrome sensors. We could\nexpose both (via controls) right from the begininning, I think that makes\nsense.\n\n> \n> \n> > > > I'd be\n> > > > inclined to support sub-sampling using controls, separately for each\n> > > > direction. \n> > > \n> > > Is this still related to the odd and even increments, or a separate\n> > > topic ? If still related, could you please explain more clearly what you\n> > > mean ?\n> > \n> > What's required for sub-sampling, i.e. odd increments. The even increments\n> > could be added later on.\n> \n> Aren't both odd and even increments related to subsampling ?\n\nYes.\n\n> \n> > In fact, even increments appear to be useful on monochrome sensors.\n> > \n> > I'll add this to the next version of the sensor interface patches.","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 0B194BF415\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 11 Nov 2024 09:04:06 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 96B23657C6;\n\tMon, 11 Nov 2024 10:04:06 +0100 (CET)","from meesny.iki.fi (meesny.iki.fi [IPv6:2001:67c:2b0:1c1::201])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 0BC7760355\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 11 Nov 2024 10:04:05 +0100 (CET)","from hillosipuli.retiisi.eu\n\t(2a00-1190-d1dd-0-c641-1eff-feae-163c.v6.cust.suomicom.net\n\t[IPv6:2a00:1190:d1dd:0:c641:1eff:feae:163c])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\tkey-exchange X25519 server-signature RSA-PSS (2048 bits)\n\tserver-digest SHA256)\n\t(No client certificate requested) (Authenticated sender: sailus)\n\tby meesny.iki.fi (Postfix) with ESMTPSA id 4Xn3WS0W8XzyQw;\n\tMon, 11 Nov 2024 11:04:03 +0200 (EET)","from valkosipuli.retiisi.eu (valkosipuli.localdomain [192.168.4.2])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\tkey-exchange ECDHE (prime256v1) server-signature RSA-PSS (4096 bits)\n\tserver-digest SHA256) (No client certificate requested)\n\tby hillosipuli.retiisi.eu (Postfix) with ESMTPS id AB7AE634C22;\n\tMon, 11 Nov 2024 11:04:03 +0200 (EET)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=iki.fi header.i=@iki.fi header.b=\"XsdEyhJj\";\n\tdkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=iki.fi; s=meesny;\n\tt=1731315844;\n\th=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n\tto:to:cc:cc:mime-version:mime-version:content-type:content-type:\n\tin-reply-to:in-reply-to:references:references;\n\tbh=44bdTwF3wjfyA6RMORyWxBVUQiPoUMz/xEvLqKO3Eqs=;\n\tb=XsdEyhJjJoNokmWZ103fJtFRPeZutu3u07ZfnROHef6BJ5zYOIJXLb6jVtkazwA3whZSQh\n\tZR4mWlWS9WLmEwRIw714LMyJNJst33clHtLo+EwdUbECjLa6tgVXlfMGxcFxQe4VSbWm6t\n\t+cU/8KDxKm+Jsq/NBS+twubC7SPLlrs=","ARC-Message-Signature":"i=1; a=rsa-sha256; c=relaxed/relaxed; d=iki.fi;\n\ts=meesny; t=1731315844;\n\th=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n\tto:to:cc:cc:mime-version:mime-version:content-type:content-type:\n\tin-reply-to:in-reply-to:references:references;\n\tbh=44bdTwF3wjfyA6RMORyWxBVUQiPoUMz/xEvLqKO3Eqs=;\n\tb=WqqscBMsAXb6AE8GpKMOE5b8gLqM1G+nzyt3PW252kH7W/8jwhsXG6lhGR/7NQnP0caZyI\n\t0B8vYpfEkwA+d77vPwF16AcSjea/b4DRv2T5LN8yEpKsb2gBaLnkbA6KGyZVQZIQ3mrLU4\n\t2Q6gdyVffIk6AtIb0ZcMRmP0qhKgVww=","ARC-Seal":"i=1; s=meesny; d=iki.fi; t=1731315844; a=rsa-sha256; cv=none;\n\tb=WG/1zTjV8+Rd1VfqEythqkS99B8k8rm5/Uphu6OV2jsT6HinNj7FIWJi3oJtpa6vtvVlLO\n\tmotQDVkMsJ0DIeXq83iPJSuO/aXmu3WXsPweyXugbP5UR4h3Jqgh5Io/zdaK5G71gmn0aw\n\tHYqBmLHDUVLlSNq3qIWj7xdVxxWSTvk=","ARC-Authentication-Results":"i=1; ORIGINATING;\n\tauth=pass smtp.auth=sailus smtp.mailfrom=sakari.ailus@iki.fi","Date":"Mon, 11 Nov 2024 09:04:03 +0000","From":"Sakari Ailus <sakari.ailus@iki.fi>","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Cc":"Jacopo Mondi <jacopo.mondi@ideasonboard.com>,\n\tlibcamera-devel@lists.libcamera.org","Subject":"Re: [libcamera-devel] [PATCH v3 02/12] libcamera: camera: Introduce\n\tSensorConfiguration","Message-ID":"<ZzHIgyp_iuMHDrVV@valkosipuli.retiisi.eu>","References":"<20230915130650.35691-3-jacopo.mondi@ideasonboard.com>\n\t<20230915160615.GB933@pendragon.ideasonboard.com>\n\t<lbyb6t7jv42mo336in4vz6dss3wpjaugk3drild4p7grofqpbn@2l7wvqcct3se>\n\t<20230917154555.GB20834@pendragon.ideasonboard.com>\n\t<ZzCYFLW812U2VMnx@valkosipuli.retiisi.eu>\n\t<20241110190503.GF6002@pendragon.ideasonboard.com>\n\t<ZzG6gyFvm6Tdj_92@valkosipuli.retiisi.eu>\n\t<20241111081230.GI6002@pendragon.ideasonboard.com>\n\t<ZzHBrQRZgjnetDhp@valkosipuli.retiisi.eu>\n\t<20241111085755.GA1546@pendragon.ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=us-ascii","Content-Disposition":"inline","In-Reply-To":"<20241111085755.GA1546@pendragon.ideasonboard.com>","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>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":32093,"web_url":"https://patchwork.libcamera.org/comment/32093/","msgid":"<20241111092702.GB1546@pendragon.ideasonboard.com>","date":"2024-11-11T09:27:02","subject":"Re: [libcamera-devel] [PATCH v3 02/12] libcamera: camera: Introduce\n\tSensorConfiguration","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"On Mon, Nov 11, 2024 at 09:04:03AM +0000, Sakari Ailus wrote:\n> On Mon, Nov 11, 2024 at 10:57:55AM +0200, Laurent Pinchart wrote:\n> > On Mon, Nov 11, 2024 at 08:34:53AM +0000, Sakari Ailus wrote:\n> > > On Mon, Nov 11, 2024 at 10:12:30AM +0200, Laurent Pinchart wrote:\n> > > > On Mon, Nov 11, 2024 at 08:04:19AM +0000, Sakari Ailus wrote:\n> > > > > On Sun, Nov 10, 2024 at 09:05:03PM +0200, Laurent Pinchart wrote:\n> > > > > > On Sun, Nov 10, 2024 at 11:25:08AM +0000, Sakari Ailus wrote:\n> > > > > > > On Sun, Sep 17, 2023 at 06:45:55PM +0300, Laurent Pinchart wrote:\n> > > > > > > > > > > +\t\tunsigned int xOddInc = 1;\n> > > > > > > > > > > +\t\tunsigned int xEvenInc = 1;\n> > > > > > > > > > > +\t\tunsigned int yOddInc = 1;\n> > > > > > > > > > > +\t\tunsigned int yEvenInc = 1;\n> > > > > > > > > >\n> > > > > > > > > > What's the reason for exposing the odd and even increments separately,\n> > > > > > > > > > instead of a skipping factor ?\n> > > > > > > > > \n> > > > > > > > > CCS expresses the two skipping factors separately. I agree there are\n> > > > > > > > > not many meaningful ways this two parameters can be combined, but if\n> > > > > > > > > one knows how a sensor work it might be more natural expressing them\n> > > > > > > > > in this way instead of simply saying x_skip = 2 ( == x_odd_inc=3,\n> > > > > > > > > x_even_inc=2)\n> > > > > > > > \n> > > > > > > > Lots of sensors that support configuring skipping do no expose separate\n> > > > > > > > odd and even skipping increments. That's why I think a simpler parameter\n> > > > > > > > would be better.\n> > > > > > > > \n> > > > > > > > Sakari, do you have an opinion on this ? Are there reasonable use cases\n> > > > > > > > for controlling the odd and even increments separately in a way that\n> > > > > > > > couldn't be expressed by a single skipping factor (for each direction) ?\n> > > > > > > \n> > > > > > > Skipping (sub-sampling) is generally independent horizontally and\n> > > > > > > vertically, binning is not. On some sensors reasonable output sizes may be\n> > > > > > > impelemented a combination of the two.\n> > > > > > \n> > > > > > There's no disagreement that horizontal and vertical factors need to be\n> > > > > > expressed independently. The question was about independent even and odd\n> > > > > > increments.\n> > > > > \n> > > > > That's what I meant.\n> > > > > \n> > > > > CCS separates odd and even increments but in practice the odd increment\n> > > > > should always be 1. I guess we could add support for these as well.\n> > > > \n> > > > I'm not asking to add support for exposing the odd and even increments\n> > > > to userspace. Quite the opposite, I was proposing combining them into a\n> > > > single factor in the API that libcamera exposes to applications. The\n> > > > feedback I would like is whether or not there is a real need for\n> > > > applications to configure the increments separately. If so, why ?\n> > > \n> > > The limits for horizontal and vertical sub-sampling are not connected in\n> > > hardware. Beyond that, as I noted above, some reasonable output sizes are\n> > > achieved as combination of sub-sampling and binning on some sensors.\n> > > Therefore I don't think you can combine the two, at least without limiting\n> > > what can be supported, which is why I think horizontal and vertical\n> > > sub-sampling need to remain separate.\n> > \n> > ... I don't think we understand each other.\n> > \n> > The odd and even increments exist both horizontally and vertically.\n> > Quoting myself from a previous e-mail,\n> > \n> > > > > > There's no disagreement that horizontal and vertical factors need to be\n> > > > > > expressed independently. The question was about independent even and odd\n> > > > > > increments.\n> \n> Ah, right. As noted above, the even increment is almost always 1. In\n> practice this could have other values on monochrome sensors. We could\n> expose both (via controls) right from the begininning, I think that makes\n> sense.\n\nWhat's the use case ?\n\n> > > > > I'd be\n> > > > > inclined to support sub-sampling using controls, separately for each\n> > > > > direction. \n> > > > \n> > > > Is this still related to the odd and even increments, or a separate\n> > > > topic ? If still related, could you please explain more clearly what you\n> > > > mean ?\n> > > \n> > > What's required for sub-sampling, i.e. odd increments. The even increments\n> > > could be added later on.\n> > \n> > Aren't both odd and even increments related to subsampling ?\n> \n> Yes.\n> \n> > > In fact, even increments appear to be useful on monochrome sensors.\n> > > \n> > > I'll add this to the next version of the sensor interface patches.","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 EAC83BE173\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 11 Nov 2024 09:27:12 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id C23E7657C6;\n\tMon, 11 Nov 2024 10:27:11 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id DEED760355\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 11 Nov 2024 10:27:09 +0100 (CET)","from pendragon.ideasonboard.com (81-175-209-231.bb.dnainternet.fi\n\t[81.175.209.231])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id C188F6AF;\n\tMon, 11 Nov 2024 10:26:57 +0100 (CET)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"opc83RCz\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1731317218;\n\tbh=H6WwFH9bvIwxKsMXwPat4PacZQaKtYqwdwT+BKHcuPA=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=opc83RCzC+tnMnqdnvkOdg7a2ARMWvLsruv4ymrkdfVRC2Lx3TtoqZJpiJuteMy2w\n\ts/S8xc/CMgM6ZzXfH/thBa/UPi3V4O5Z5/so9Q89soXeSKJ5EEtyTDwvatpzYd8VrJ\n\t344IcPZmzJj9tvE54k83/P0WzG7LaLMf43iBZAfw=","Date":"Mon, 11 Nov 2024 11:27:02 +0200","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Sakari Ailus <sakari.ailus@iki.fi>","Cc":"Jacopo Mondi <jacopo.mondi@ideasonboard.com>,\n\tlibcamera-devel@lists.libcamera.org","Subject":"Re: [libcamera-devel] [PATCH v3 02/12] libcamera: camera: Introduce\n\tSensorConfiguration","Message-ID":"<20241111092702.GB1546@pendragon.ideasonboard.com>","References":"<20230915160615.GB933@pendragon.ideasonboard.com>\n\t<lbyb6t7jv42mo336in4vz6dss3wpjaugk3drild4p7grofqpbn@2l7wvqcct3se>\n\t<20230917154555.GB20834@pendragon.ideasonboard.com>\n\t<ZzCYFLW812U2VMnx@valkosipuli.retiisi.eu>\n\t<20241110190503.GF6002@pendragon.ideasonboard.com>\n\t<ZzG6gyFvm6Tdj_92@valkosipuli.retiisi.eu>\n\t<20241111081230.GI6002@pendragon.ideasonboard.com>\n\t<ZzHBrQRZgjnetDhp@valkosipuli.retiisi.eu>\n\t<20241111085755.GA1546@pendragon.ideasonboard.com>\n\t<ZzHIgyp_iuMHDrVV@valkosipuli.retiisi.eu>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<ZzHIgyp_iuMHDrVV@valkosipuli.retiisi.eu>","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>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":32097,"web_url":"https://patchwork.libcamera.org/comment/32097/","msgid":"<ZzHShjTSjIr5VXPR@valkosipuli.retiisi.eu>","date":"2024-11-11T09:46:46","subject":"Re: [libcamera-devel] [PATCH v3 02/12] libcamera: camera: Introduce\n\tSensorConfiguration","submitter":{"id":32,"url":"https://patchwork.libcamera.org/api/people/32/","name":"Sakari Ailus","email":"sakari.ailus@iki.fi"},"content":"On Mon, Nov 11, 2024 at 11:27:02AM +0200, Laurent Pinchart wrote:\n> On Mon, Nov 11, 2024 at 09:04:03AM +0000, Sakari Ailus wrote:\n> > On Mon, Nov 11, 2024 at 10:57:55AM +0200, Laurent Pinchart wrote:\n> > > On Mon, Nov 11, 2024 at 08:34:53AM +0000, Sakari Ailus wrote:\n> > > > On Mon, Nov 11, 2024 at 10:12:30AM +0200, Laurent Pinchart wrote:\n> > > > > On Mon, Nov 11, 2024 at 08:04:19AM +0000, Sakari Ailus wrote:\n> > > > > > On Sun, Nov 10, 2024 at 09:05:03PM +0200, Laurent Pinchart wrote:\n> > > > > > > On Sun, Nov 10, 2024 at 11:25:08AM +0000, Sakari Ailus wrote:\n> > > > > > > > On Sun, Sep 17, 2023 at 06:45:55PM +0300, Laurent Pinchart wrote:\n> > > > > > > > > > > > +\t\tunsigned int xOddInc = 1;\n> > > > > > > > > > > > +\t\tunsigned int xEvenInc = 1;\n> > > > > > > > > > > > +\t\tunsigned int yOddInc = 1;\n> > > > > > > > > > > > +\t\tunsigned int yEvenInc = 1;\n> > > > > > > > > > >\n> > > > > > > > > > > What's the reason for exposing the odd and even increments separately,\n> > > > > > > > > > > instead of a skipping factor ?\n> > > > > > > > > > \n> > > > > > > > > > CCS expresses the two skipping factors separately. I agree there are\n> > > > > > > > > > not many meaningful ways this two parameters can be combined, but if\n> > > > > > > > > > one knows how a sensor work it might be more natural expressing them\n> > > > > > > > > > in this way instead of simply saying x_skip = 2 ( == x_odd_inc=3,\n> > > > > > > > > > x_even_inc=2)\n> > > > > > > > > \n> > > > > > > > > Lots of sensors that support configuring skipping do no expose separate\n> > > > > > > > > odd and even skipping increments. That's why I think a simpler parameter\n> > > > > > > > > would be better.\n> > > > > > > > > \n> > > > > > > > > Sakari, do you have an opinion on this ? Are there reasonable use cases\n> > > > > > > > > for controlling the odd and even increments separately in a way that\n> > > > > > > > > couldn't be expressed by a single skipping factor (for each direction) ?\n> > > > > > > > \n> > > > > > > > Skipping (sub-sampling) is generally independent horizontally and\n> > > > > > > > vertically, binning is not. On some sensors reasonable output sizes may be\n> > > > > > > > impelemented a combination of the two.\n> > > > > > > \n> > > > > > > There's no disagreement that horizontal and vertical factors need to be\n> > > > > > > expressed independently. The question was about independent even and odd\n> > > > > > > increments.\n> > > > > > \n> > > > > > That's what I meant.\n> > > > > > \n> > > > > > CCS separates odd and even increments but in practice the odd increment\n> > > > > > should always be 1. I guess we could add support for these as well.\n> > > > > \n> > > > > I'm not asking to add support for exposing the odd and even increments\n> > > > > to userspace. Quite the opposite, I was proposing combining them into a\n> > > > > single factor in the API that libcamera exposes to applications. The\n> > > > > feedback I would like is whether or not there is a real need for\n> > > > > applications to configure the increments separately. If so, why ?\n> > > > \n> > > > The limits for horizontal and vertical sub-sampling are not connected in\n> > > > hardware. Beyond that, as I noted above, some reasonable output sizes are\n> > > > achieved as combination of sub-sampling and binning on some sensors.\n> > > > Therefore I don't think you can combine the two, at least without limiting\n> > > > what can be supported, which is why I think horizontal and vertical\n> > > > sub-sampling need to remain separate.\n> > > \n> > > ... I don't think we understand each other.\n> > > \n> > > The odd and even increments exist both horizontally and vertically.\n> > > Quoting myself from a previous e-mail,\n> > > \n> > > > > > > There's no disagreement that horizontal and vertical factors need to be\n> > > > > > > expressed independently. The question was about independent even and odd\n> > > > > > > increments.\n> > \n> > Ah, right. As noted above, the even increment is almost always 1. In\n> > practice this could have other values on monochrome sensors. We could\n> > expose both (via controls) right from the begininning, I think that makes\n> > sense.\n> \n> What's the use case ?\n\nTo do sub-sampling on monochrome sensors that require even values (and the\nsame values for odd and even increments). There are different options in\nhow this can be implemented, see table 78 (page 145) and the examples on\npage 148 in CCS 1.1 spec.","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 70446C32CE\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 11 Nov 2024 09:46:50 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 37F20657C9;\n\tMon, 11 Nov 2024 10:46:49 +0100 (CET)","from lahtoruutu.iki.fi (lahtoruutu.iki.fi [185.185.170.37])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id DF4B160355\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 11 Nov 2024 10:46:47 +0100 (CET)","from hillosipuli.retiisi.eu\n\t(2a00-1190-d1dd-0-c641-1eff-feae-163c.v6.cust.suomicom.net\n\t[IPv6:2a00:1190:d1dd:0:c641:1eff:feae:163c])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\tkey-exchange X25519 server-signature RSA-PSS (2048 bits)\n\tserver-digest SHA256)\n\t(No client certificate requested) (Authenticated sender: sailus)\n\tby lahtoruutu.iki.fi (Postfix) with ESMTPSA id 4Xn4Sl20wQz49Ptk;\n\tMon, 11 Nov 2024 11:46:47 +0200 (EET)","from valkosipuli.retiisi.eu (valkosipuli.localdomain [192.168.4.2])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\tkey-exchange ECDHE (prime256v1) server-signature RSA-PSS (4096 bits)\n\tserver-digest SHA256) (No client certificate requested)\n\tby hillosipuli.retiisi.eu (Postfix) with ESMTPS id DB6D0634C22;\n\tMon, 11 Nov 2024 11:46:46 +0200 (EET)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (2048-bit key;\n\tunprotected) header.d=iki.fi header.i=@iki.fi header.b=\"Vda8EgJe\";\n\tdkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=iki.fi; s=lahtoruutu;\n\tt=1731318407;\n\th=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n\tto:to:cc:cc:mime-version:mime-version:content-type:content-type:\n\tin-reply-to:in-reply-to:references:references;\n\tbh=j6P9Zvlc2B0esg6tJER0DWcPgzrRXHmLzcbKQQBJaNg=;\n\tb=Vda8EgJeC7d00jdtbX5S4QsajMCw9Q5Bfi1OxYkTeqYXPmLJO62yHkvYCxde4ZjxCApdgb\n\tfdcyiqWU98DnCzp3BUrSfXnoRW8omY6OT+yCGqDvmnoIP2jElyUGcJ7MCgCI1JBJ7hItRn\n\tM4LW1gjaImZr1RZU8/zB6JnwAb/qg6pqh0drgtoWvJtGqPRLEim22fjMlxTsklzKvKDwE2\n\t2s5yJGSZ84reC8whNzUMaDdj4xVBOswd1LYp9fuyVVRjhomzXn3nUDdefTB3LqMxe7amxB\n\tRTyd/BPz7YZSIWtiP6/VtOqxGiCberkUiKwjcYw3frvShb8/kedCfEb6rh4SiQ==","ARC-Message-Signature":"i=1; a=rsa-sha256; c=relaxed/relaxed; d=iki.fi;\n\ts=lahtoruutu; t=1731318407;\n\th=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n\tto:to:cc:cc:mime-version:mime-version:content-type:content-type:\n\tin-reply-to:in-reply-to:references:references;\n\tbh=j6P9Zvlc2B0esg6tJER0DWcPgzrRXHmLzcbKQQBJaNg=;\n\tb=sSl/B22wXbPollRJpS/B50GCEOKq0uFW+bSicECJs1cdfB9wdSJ9AdtUoFToqp1FqUlnKI\n\tkqsEavol+CtaZobRfFVplLW+PLMJOaW6nRsG4RPC+jSUbwfEHHjVcNWIL/rYdHX11Ah1Ua\n\to8WFU2J0ETyJvi3WdfsL5rNiamyszol3Qp7yktbPPj7XHgkvKlXdkrtbXxA0ZyvhPFHFQa\n\tGD/6cze5UpO4ADmQEfMdlGGAFrsvm0t9qrBF5JR98VuxVFlSfAGXl2Bt7WVLlV29m5SQFe\n\tFnmiaVWwa/clPJTcUp6kT44osbVEa+chhZ5YFT3KRJYJyi6bBuzbr7vdS1O+tQ==","ARC-Seal":"i=1; s=lahtoruutu; d=iki.fi; t=1731318407; a=rsa-sha256; cv=none; \n\tb=RA5iiIgsmlONaVu4/x7tCUS5s/j4e9MGYKtAPKDuX5CimH02Z2Y6lns+wKJAa7tqL/IqaW\n\tW2Rg8WOlv+k4HkK78773q+VOZ0Gtg8I9qYOJUK3dEltdWFATrSj0WAaXoJlZZCDr7cWs9/\n\tnCTZxngpjfY+GtVo6x2zHgVc+EVcVHbclGVsmirQ/Qn4+m1w0WW3ezwfvvlSFIPYQJHCHD\n\t4qFJFzpQ2rtZAoutk4Ol6vWzxYSws2vnzXZqj63m8alN+efXkKPucMikUgHQ5bmZMEY10S\n\tl5srKtFDltc4KLq9Pxg9l1jANVnZ/e6qYEdg0QMsRrJ5xylwmCmgYMZjPDcMPA==","ARC-Authentication-Results":"i=1; ORIGINATING;\n\tauth=pass smtp.auth=sailus smtp.mailfrom=sakari.ailus@iki.fi","Date":"Mon, 11 Nov 2024 09:46:46 +0000","From":"Sakari Ailus <sakari.ailus@iki.fi>","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Cc":"Jacopo Mondi <jacopo.mondi@ideasonboard.com>,\n\tlibcamera-devel@lists.libcamera.org","Subject":"Re: [libcamera-devel] [PATCH v3 02/12] libcamera: camera: Introduce\n\tSensorConfiguration","Message-ID":"<ZzHShjTSjIr5VXPR@valkosipuli.retiisi.eu>","References":"<lbyb6t7jv42mo336in4vz6dss3wpjaugk3drild4p7grofqpbn@2l7wvqcct3se>\n\t<20230917154555.GB20834@pendragon.ideasonboard.com>\n\t<ZzCYFLW812U2VMnx@valkosipuli.retiisi.eu>\n\t<20241110190503.GF6002@pendragon.ideasonboard.com>\n\t<ZzG6gyFvm6Tdj_92@valkosipuli.retiisi.eu>\n\t<20241111081230.GI6002@pendragon.ideasonboard.com>\n\t<ZzHBrQRZgjnetDhp@valkosipuli.retiisi.eu>\n\t<20241111085755.GA1546@pendragon.ideasonboard.com>\n\t<ZzHIgyp_iuMHDrVV@valkosipuli.retiisi.eu>\n\t<20241111092702.GB1546@pendragon.ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=us-ascii","Content-Disposition":"inline","In-Reply-To":"<20241111092702.GB1546@pendragon.ideasonboard.com>","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>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":32098,"web_url":"https://patchwork.libcamera.org/comment/32098/","msgid":"<20241111095950.GC7767@pendragon.ideasonboard.com>","date":"2024-11-11T09:59:50","subject":"Re: [libcamera-devel] [PATCH v3 02/12] libcamera: camera: Introduce\n\tSensorConfiguration","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"On Mon, Nov 11, 2024 at 09:46:46AM +0000, Sakari Ailus wrote:\n> On Mon, Nov 11, 2024 at 11:27:02AM +0200, Laurent Pinchart wrote:\n> > On Mon, Nov 11, 2024 at 09:04:03AM +0000, Sakari Ailus wrote:\n> > > On Mon, Nov 11, 2024 at 10:57:55AM +0200, Laurent Pinchart wrote:\n> > > > On Mon, Nov 11, 2024 at 08:34:53AM +0000, Sakari Ailus wrote:\n> > > > > On Mon, Nov 11, 2024 at 10:12:30AM +0200, Laurent Pinchart wrote:\n> > > > > > On Mon, Nov 11, 2024 at 08:04:19AM +0000, Sakari Ailus wrote:\n> > > > > > > On Sun, Nov 10, 2024 at 09:05:03PM +0200, Laurent Pinchart wrote:\n> > > > > > > > On Sun, Nov 10, 2024 at 11:25:08AM +0000, Sakari Ailus wrote:\n> > > > > > > > > On Sun, Sep 17, 2023 at 06:45:55PM +0300, Laurent Pinchart wrote:\n> > > > > > > > > > > > > +\t\tunsigned int xOddInc = 1;\n> > > > > > > > > > > > > +\t\tunsigned int xEvenInc = 1;\n> > > > > > > > > > > > > +\t\tunsigned int yOddInc = 1;\n> > > > > > > > > > > > > +\t\tunsigned int yEvenInc = 1;\n> > > > > > > > > > > >\n> > > > > > > > > > > > What's the reason for exposing the odd and even increments separately,\n> > > > > > > > > > > > instead of a skipping factor ?\n> > > > > > > > > > > \n> > > > > > > > > > > CCS expresses the two skipping factors separately. I agree there are\n> > > > > > > > > > > not many meaningful ways this two parameters can be combined, but if\n> > > > > > > > > > > one knows how a sensor work it might be more natural expressing them\n> > > > > > > > > > > in this way instead of simply saying x_skip = 2 ( == x_odd_inc=3,\n> > > > > > > > > > > x_even_inc=2)\n> > > > > > > > > > \n> > > > > > > > > > Lots of sensors that support configuring skipping do no expose separate\n> > > > > > > > > > odd and even skipping increments. That's why I think a simpler parameter\n> > > > > > > > > > would be better.\n> > > > > > > > > > \n> > > > > > > > > > Sakari, do you have an opinion on this ? Are there reasonable use cases\n> > > > > > > > > > for controlling the odd and even increments separately in a way that\n> > > > > > > > > > couldn't be expressed by a single skipping factor (for each direction) ?\n> > > > > > > > > \n> > > > > > > > > Skipping (sub-sampling) is generally independent horizontally and\n> > > > > > > > > vertically, binning is not. On some sensors reasonable output sizes may be\n> > > > > > > > > impelemented a combination of the two.\n> > > > > > > > \n> > > > > > > > There's no disagreement that horizontal and vertical factors need to be\n> > > > > > > > expressed independently. The question was about independent even and odd\n> > > > > > > > increments.\n> > > > > > > \n> > > > > > > That's what I meant.\n> > > > > > > \n> > > > > > > CCS separates odd and even increments but in practice the odd increment\n> > > > > > > should always be 1. I guess we could add support for these as well.\n> > > > > > \n> > > > > > I'm not asking to add support for exposing the odd and even increments\n> > > > > > to userspace. Quite the opposite, I was proposing combining them into a\n> > > > > > single factor in the API that libcamera exposes to applications. The\n> > > > > > feedback I would like is whether or not there is a real need for\n> > > > > > applications to configure the increments separately. If so, why ?\n> > > > > \n> > > > > The limits for horizontal and vertical sub-sampling are not connected in\n> > > > > hardware. Beyond that, as I noted above, some reasonable output sizes are\n> > > > > achieved as combination of sub-sampling and binning on some sensors.\n> > > > > Therefore I don't think you can combine the two, at least without limiting\n> > > > > what can be supported, which is why I think horizontal and vertical\n> > > > > sub-sampling need to remain separate.\n> > > > \n> > > > ... I don't think we understand each other.\n> > > > \n> > > > The odd and even increments exist both horizontally and vertically.\n> > > > Quoting myself from a previous e-mail,\n> > > > \n> > > > > > > > There's no disagreement that horizontal and vertical factors need to be\n> > > > > > > > expressed independently. The question was about independent even and odd\n> > > > > > > > increments.\n> > > \n> > > Ah, right. As noted above, the even increment is almost always 1. In\n> > > practice this could have other values on monochrome sensors. We could\n> > > expose both (via controls) right from the begininning, I think that makes\n> > > sense.\n> > \n> > What's the use case ?\n> \n> To do sub-sampling on monochrome sensors that require even values (and the\n> same values for odd and even increments). There are different options in\n> how this can be implemented, see table 78 (page 145) and the examples on\n> page 148 in CCS 1.1 spec.\n\nDoes this have to be exposed to userspace, or can appropriate even and\nodd increments be computed by the kernel ?","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 1C1CBBF415\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 11 Nov 2024 10:00:01 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 36370657C9;\n\tMon, 11 Nov 2024 11:00:00 +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 2547C60355\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 11 Nov 2024 10:59:59 +0100 (CET)","from pendragon.ideasonboard.com (81-175-209-231.bb.dnainternet.fi\n\t[81.175.209.231])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 38B216AF;\n\tMon, 11 Nov 2024 10:59:47 +0100 (CET)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"LhyDSM36\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1731319187;\n\tbh=vjVV6EH/w7Om8ZDUo2zsISGAUqCNxhj3l0EyLXfDom0=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=LhyDSM36jfwFH2FphKh353hHYAEjDalNmu+08L91nFXvtDzLnyhSy3RDu3aW5aYEA\n\tAq5fllI/CcY7fj4J5EPGJaJi6EQnjDHzvd6C9rrVs36SjNwNlFs3mQDrG2xS1/L8V/\n\tVwxczYI3Hc7lsahGlqD1Fw6bmAJjNDZsp38TSpkE=","Date":"Mon, 11 Nov 2024 11:59:50 +0200","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Sakari Ailus <sakari.ailus@iki.fi>","Cc":"Jacopo Mondi <jacopo.mondi@ideasonboard.com>,\n\tlibcamera-devel@lists.libcamera.org","Subject":"Re: [libcamera-devel] [PATCH v3 02/12] libcamera: camera: Introduce\n\tSensorConfiguration","Message-ID":"<20241111095950.GC7767@pendragon.ideasonboard.com>","References":"<20230917154555.GB20834@pendragon.ideasonboard.com>\n\t<ZzCYFLW812U2VMnx@valkosipuli.retiisi.eu>\n\t<20241110190503.GF6002@pendragon.ideasonboard.com>\n\t<ZzG6gyFvm6Tdj_92@valkosipuli.retiisi.eu>\n\t<20241111081230.GI6002@pendragon.ideasonboard.com>\n\t<ZzHBrQRZgjnetDhp@valkosipuli.retiisi.eu>\n\t<20241111085755.GA1546@pendragon.ideasonboard.com>\n\t<ZzHIgyp_iuMHDrVV@valkosipuli.retiisi.eu>\n\t<20241111092702.GB1546@pendragon.ideasonboard.com>\n\t<ZzHShjTSjIr5VXPR@valkosipuli.retiisi.eu>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<ZzHShjTSjIr5VXPR@valkosipuli.retiisi.eu>","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>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":32099,"web_url":"https://patchwork.libcamera.org/comment/32099/","msgid":"<ZzHXFmXAhTBC8s-y@valkosipuli.retiisi.eu>","date":"2024-11-11T10:06:14","subject":"Re: [libcamera-devel] [PATCH v3 02/12] libcamera: camera: Introduce\n\tSensorConfiguration","submitter":{"id":32,"url":"https://patchwork.libcamera.org/api/people/32/","name":"Sakari Ailus","email":"sakari.ailus@iki.fi"},"content":"On Mon, Nov 11, 2024 at 11:59:50AM +0200, Laurent Pinchart wrote:\n> On Mon, Nov 11, 2024 at 09:46:46AM +0000, Sakari Ailus wrote:\n> > On Mon, Nov 11, 2024 at 11:27:02AM +0200, Laurent Pinchart wrote:\n> > > On Mon, Nov 11, 2024 at 09:04:03AM +0000, Sakari Ailus wrote:\n> > > > On Mon, Nov 11, 2024 at 10:57:55AM +0200, Laurent Pinchart wrote:\n> > > > > On Mon, Nov 11, 2024 at 08:34:53AM +0000, Sakari Ailus wrote:\n> > > > > > On Mon, Nov 11, 2024 at 10:12:30AM +0200, Laurent Pinchart wrote:\n> > > > > > > On Mon, Nov 11, 2024 at 08:04:19AM +0000, Sakari Ailus wrote:\n> > > > > > > > On Sun, Nov 10, 2024 at 09:05:03PM +0200, Laurent Pinchart wrote:\n> > > > > > > > > On Sun, Nov 10, 2024 at 11:25:08AM +0000, Sakari Ailus wrote:\n> > > > > > > > > > On Sun, Sep 17, 2023 at 06:45:55PM +0300, Laurent Pinchart wrote:\n> > > > > > > > > > > > > > +\t\tunsigned int xOddInc = 1;\n> > > > > > > > > > > > > > +\t\tunsigned int xEvenInc = 1;\n> > > > > > > > > > > > > > +\t\tunsigned int yOddInc = 1;\n> > > > > > > > > > > > > > +\t\tunsigned int yEvenInc = 1;\n> > > > > > > > > > > > >\n> > > > > > > > > > > > > What's the reason for exposing the odd and even increments separately,\n> > > > > > > > > > > > > instead of a skipping factor ?\n> > > > > > > > > > > > \n> > > > > > > > > > > > CCS expresses the two skipping factors separately. I agree there are\n> > > > > > > > > > > > not many meaningful ways this two parameters can be combined, but if\n> > > > > > > > > > > > one knows how a sensor work it might be more natural expressing them\n> > > > > > > > > > > > in this way instead of simply saying x_skip = 2 ( == x_odd_inc=3,\n> > > > > > > > > > > > x_even_inc=2)\n> > > > > > > > > > > \n> > > > > > > > > > > Lots of sensors that support configuring skipping do no expose separate\n> > > > > > > > > > > odd and even skipping increments. That's why I think a simpler parameter\n> > > > > > > > > > > would be better.\n> > > > > > > > > > > \n> > > > > > > > > > > Sakari, do you have an opinion on this ? Are there reasonable use cases\n> > > > > > > > > > > for controlling the odd and even increments separately in a way that\n> > > > > > > > > > > couldn't be expressed by a single skipping factor (for each direction) ?\n> > > > > > > > > > \n> > > > > > > > > > Skipping (sub-sampling) is generally independent horizontally and\n> > > > > > > > > > vertically, binning is not. On some sensors reasonable output sizes may be\n> > > > > > > > > > impelemented a combination of the two.\n> > > > > > > > > \n> > > > > > > > > There's no disagreement that horizontal and vertical factors need to be\n> > > > > > > > > expressed independently. The question was about independent even and odd\n> > > > > > > > > increments.\n> > > > > > > > \n> > > > > > > > That's what I meant.\n> > > > > > > > \n> > > > > > > > CCS separates odd and even increments but in practice the odd increment\n> > > > > > > > should always be 1. I guess we could add support for these as well.\n> > > > > > > \n> > > > > > > I'm not asking to add support for exposing the odd and even increments\n> > > > > > > to userspace. Quite the opposite, I was proposing combining them into a\n> > > > > > > single factor in the API that libcamera exposes to applications. The\n> > > > > > > feedback I would like is whether or not there is a real need for\n> > > > > > > applications to configure the increments separately. If so, why ?\n> > > > > > \n> > > > > > The limits for horizontal and vertical sub-sampling are not connected in\n> > > > > > hardware. Beyond that, as I noted above, some reasonable output sizes are\n> > > > > > achieved as combination of sub-sampling and binning on some sensors.\n> > > > > > Therefore I don't think you can combine the two, at least without limiting\n> > > > > > what can be supported, which is why I think horizontal and vertical\n> > > > > > sub-sampling need to remain separate.\n> > > > > \n> > > > > ... I don't think we understand each other.\n> > > > > \n> > > > > The odd and even increments exist both horizontally and vertically.\n> > > > > Quoting myself from a previous e-mail,\n> > > > > \n> > > > > > > > > There's no disagreement that horizontal and vertical factors need to be\n> > > > > > > > > expressed independently. The question was about independent even and odd\n> > > > > > > > > increments.\n> > > > \n> > > > Ah, right. As noted above, the even increment is almost always 1. In\n> > > > practice this could have other values on monochrome sensors. We could\n> > > > expose both (via controls) right from the begininning, I think that makes\n> > > > sense.\n> > > \n> > > What's the use case ?\n> > \n> > To do sub-sampling on monochrome sensors that require even values (and the\n> > same values for odd and even increments). There are different options in\n> > how this can be implemented, see table 78 (page 145) and the examples on\n> > page 148 in CCS 1.1 spec.\n> \n> Does this have to be exposed to userspace, or can appropriate even and\n> odd increments be computed by the kernel ?\n\nIt would seem like that they could, but if the API e.g. CCS provides is\nmore expressive than what we provide towards the user space, there could be\nsituations where there are more options with different image quality\nrelated properties. I'm not sure if we'll ever see that, though -- right\nnow that's not the case at least.\n\nI guess we could do with ratios for now, and if something else is needed,\nthen add support for that.","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 39F72BE173\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 11 Nov 2024 10:06:18 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 78F16657CF;\n\tMon, 11 Nov 2024 11:06:17 +0100 (CET)","from meesny.iki.fi (meesny.iki.fi [IPv6:2001:67c:2b0:1c1::201])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id C0682657C5\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 11 Nov 2024 11:06:15 +0100 (CET)","from hillosipuli.retiisi.eu\n\t(2a00-1190-d1dd-0-c641-1eff-feae-163c.v6.cust.suomicom.net\n\t[IPv6:2a00:1190:d1dd:0:c641:1eff:feae:163c])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\tkey-exchange X25519 server-signature RSA-PSS (2048 bits)\n\tserver-digest SHA256)\n\t(No client certificate requested) (Authenticated sender: sailus)\n\tby meesny.iki.fi (Postfix) with ESMTPSA id 4Xn4vB5bQyzyvn;\n\tMon, 11 Nov 2024 12:06:14 +0200 (EET)","from valkosipuli.retiisi.eu (valkosipuli.localdomain [192.168.4.2])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\tkey-exchange ECDHE (prime256v1) server-signature RSA-PSS (4096 bits)\n\tserver-digest SHA256) (No client certificate requested)\n\tby hillosipuli.retiisi.eu (Postfix) with ESMTPS id 70C0E634C22;\n\tMon, 11 Nov 2024 12:06:14 +0200 (EET)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=iki.fi header.i=@iki.fi header.b=\"jRt9nQ8a\";\n\tdkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=iki.fi; s=meesny;\n\tt=1731319574;\n\th=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n\tto:to:cc:cc:mime-version:mime-version:content-type:content-type:\n\tin-reply-to:in-reply-to:references:references;\n\tbh=MwxIieSMHnjZawbD21ZQNhzQifdMyLvWV5Zi1v3dQyI=;\n\tb=jRt9nQ8asnzf4jN4Z/vD//KsioP0TgwFxlpDw/6ooVIY9bV0KNUNvdYuhpK09RcKnE4xrX\n\tOIaqwdiC53IYBFiQdmm4LX3pQGTHp08RWM3UOEFgE0i4rafRCQ6Msx9dTc1S3/f9ZsKN43\n\tnDaI28544CAT0pM5qPL5PMoDN3cuIEM=","ARC-Message-Signature":"i=1; a=rsa-sha256; c=relaxed/relaxed; d=iki.fi;\n\ts=meesny; t=1731319574;\n\th=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n\tto:to:cc:cc:mime-version:mime-version:content-type:content-type:\n\tin-reply-to:in-reply-to:references:references;\n\tbh=MwxIieSMHnjZawbD21ZQNhzQifdMyLvWV5Zi1v3dQyI=;\n\tb=y1Fc5dI2Mz16Tmxz6ZlHkY53K7R1oo5IESs7EqovOKzOuRPlj9GIuqlCFECBZQpX1AJ59w\n\t3A7nbR/qjlFTwgaMp+wWSDzGlOG0wJgt+LKxdpwnIP5GKGrRy/G4f76JJ6MXP1hiH/nsWM\n\t1Ht+eCI08KgtmXqhjhO8bMntjw6xYaA=","ARC-Seal":"i=1; s=meesny; d=iki.fi; t=1731319574; a=rsa-sha256; cv=none;\n\tb=DRqEEjuskS3ayqY5IY3nr6m+n9YQLR1v4gAuCkLWvIqm4+fkwsHgAmCfkAfZYV0N6xx572\n\tEdEIGsiX4cVCzPGYD2RqwGcXUCFUiPCN0DhTOBh03FqlwBSt3ea3ipoyMk8PpMWvT9e5ce\n\tAUyr1weqDqsxWbSIwRAgbQaLrPZjKyA=","ARC-Authentication-Results":"i=1; ORIGINATING;\n\tauth=pass smtp.auth=sailus smtp.mailfrom=sakari.ailus@iki.fi","Date":"Mon, 11 Nov 2024 10:06:14 +0000","From":"Sakari Ailus <sakari.ailus@iki.fi>","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Cc":"Jacopo Mondi <jacopo.mondi@ideasonboard.com>,\n\tlibcamera-devel@lists.libcamera.org","Subject":"Re: [libcamera-devel] [PATCH v3 02/12] libcamera: camera: Introduce\n\tSensorConfiguration","Message-ID":"<ZzHXFmXAhTBC8s-y@valkosipuli.retiisi.eu>","References":"<ZzCYFLW812U2VMnx@valkosipuli.retiisi.eu>\n\t<20241110190503.GF6002@pendragon.ideasonboard.com>\n\t<ZzG6gyFvm6Tdj_92@valkosipuli.retiisi.eu>\n\t<20241111081230.GI6002@pendragon.ideasonboard.com>\n\t<ZzHBrQRZgjnetDhp@valkosipuli.retiisi.eu>\n\t<20241111085755.GA1546@pendragon.ideasonboard.com>\n\t<ZzHIgyp_iuMHDrVV@valkosipuli.retiisi.eu>\n\t<20241111092702.GB1546@pendragon.ideasonboard.com>\n\t<ZzHShjTSjIr5VXPR@valkosipuli.retiisi.eu>\n\t<20241111095950.GC7767@pendragon.ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=us-ascii","Content-Disposition":"inline","In-Reply-To":"<20241111095950.GC7767@pendragon.ideasonboard.com>","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>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":32109,"web_url":"https://patchwork.libcamera.org/comment/32109/","msgid":"<20241112062738.GC21062@pendragon.ideasonboard.com>","date":"2024-11-12T06:27:38","subject":"Re: [libcamera-devel] [PATCH v3 02/12] libcamera: camera: Introduce\n\tSensorConfiguration","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"On Mon, Nov 11, 2024 at 10:06:14AM +0000, Sakari Ailus wrote:\n> On Mon, Nov 11, 2024 at 11:59:50AM +0200, Laurent Pinchart wrote:\n> > On Mon, Nov 11, 2024 at 09:46:46AM +0000, Sakari Ailus wrote:\n> > > On Mon, Nov 11, 2024 at 11:27:02AM +0200, Laurent Pinchart wrote:\n> > > > On Mon, Nov 11, 2024 at 09:04:03AM +0000, Sakari Ailus wrote:\n> > > > > On Mon, Nov 11, 2024 at 10:57:55AM +0200, Laurent Pinchart wrote:\n> > > > > > On Mon, Nov 11, 2024 at 08:34:53AM +0000, Sakari Ailus wrote:\n> > > > > > > On Mon, Nov 11, 2024 at 10:12:30AM +0200, Laurent Pinchart wrote:\n> > > > > > > > On Mon, Nov 11, 2024 at 08:04:19AM +0000, Sakari Ailus wrote:\n> > > > > > > > > On Sun, Nov 10, 2024 at 09:05:03PM +0200, Laurent Pinchart wrote:\n> > > > > > > > > > On Sun, Nov 10, 2024 at 11:25:08AM +0000, Sakari Ailus wrote:\n> > > > > > > > > > > On Sun, Sep 17, 2023 at 06:45:55PM +0300, Laurent Pinchart wrote:\n> > > > > > > > > > > > > > > +\t\tunsigned int xOddInc = 1;\n> > > > > > > > > > > > > > > +\t\tunsigned int xEvenInc = 1;\n> > > > > > > > > > > > > > > +\t\tunsigned int yOddInc = 1;\n> > > > > > > > > > > > > > > +\t\tunsigned int yEvenInc = 1;\n> > > > > > > > > > > > > >\n> > > > > > > > > > > > > > What's the reason for exposing the odd and even increments separately,\n> > > > > > > > > > > > > > instead of a skipping factor ?\n> > > > > > > > > > > > > \n> > > > > > > > > > > > > CCS expresses the two skipping factors separately. I agree there are\n> > > > > > > > > > > > > not many meaningful ways this two parameters can be combined, but if\n> > > > > > > > > > > > > one knows how a sensor work it might be more natural expressing them\n> > > > > > > > > > > > > in this way instead of simply saying x_skip = 2 ( == x_odd_inc=3,\n> > > > > > > > > > > > > x_even_inc=2)\n> > > > > > > > > > > > \n> > > > > > > > > > > > Lots of sensors that support configuring skipping do no expose separate\n> > > > > > > > > > > > odd and even skipping increments. That's why I think a simpler parameter\n> > > > > > > > > > > > would be better.\n> > > > > > > > > > > > \n> > > > > > > > > > > > Sakari, do you have an opinion on this ? Are there reasonable use cases\n> > > > > > > > > > > > for controlling the odd and even increments separately in a way that\n> > > > > > > > > > > > couldn't be expressed by a single skipping factor (for each direction) ?\n> > > > > > > > > > > \n> > > > > > > > > > > Skipping (sub-sampling) is generally independent horizontally and\n> > > > > > > > > > > vertically, binning is not. On some sensors reasonable output sizes may be\n> > > > > > > > > > > impelemented a combination of the two.\n> > > > > > > > > > \n> > > > > > > > > > There's no disagreement that horizontal and vertical factors need to be\n> > > > > > > > > > expressed independently. The question was about independent even and odd\n> > > > > > > > > > increments.\n> > > > > > > > > \n> > > > > > > > > That's what I meant.\n> > > > > > > > > \n> > > > > > > > > CCS separates odd and even increments but in practice the odd increment\n> > > > > > > > > should always be 1. I guess we could add support for these as well.\n> > > > > > > > \n> > > > > > > > I'm not asking to add support for exposing the odd and even increments\n> > > > > > > > to userspace. Quite the opposite, I was proposing combining them into a\n> > > > > > > > single factor in the API that libcamera exposes to applications. The\n> > > > > > > > feedback I would like is whether or not there is a real need for\n> > > > > > > > applications to configure the increments separately. If so, why ?\n> > > > > > > \n> > > > > > > The limits for horizontal and vertical sub-sampling are not connected in\n> > > > > > > hardware. Beyond that, as I noted above, some reasonable output sizes are\n> > > > > > > achieved as combination of sub-sampling and binning on some sensors.\n> > > > > > > Therefore I don't think you can combine the two, at least without limiting\n> > > > > > > what can be supported, which is why I think horizontal and vertical\n> > > > > > > sub-sampling need to remain separate.\n> > > > > > \n> > > > > > ... I don't think we understand each other.\n> > > > > > \n> > > > > > The odd and even increments exist both horizontally and vertically.\n> > > > > > Quoting myself from a previous e-mail,\n> > > > > > \n> > > > > > > > > > There's no disagreement that horizontal and vertical factors need to be\n> > > > > > > > > > expressed independently. The question was about independent even and odd\n> > > > > > > > > > increments.\n> > > > > \n> > > > > Ah, right. As noted above, the even increment is almost always 1. In\n> > > > > practice this could have other values on monochrome sensors. We could\n> > > > > expose both (via controls) right from the begininning, I think that makes\n> > > > > sense.\n> > > > \n> > > > What's the use case ?\n> > > \n> > > To do sub-sampling on monochrome sensors that require even values (and the\n> > > same values for odd and even increments). There are different options in\n> > > how this can be implemented, see table 78 (page 145) and the examples on\n> > > page 148 in CCS 1.1 spec.\n> > \n> > Does this have to be exposed to userspace, or can appropriate even and\n> > odd increments be computed by the kernel ?\n> \n> It would seem like that they could, but if the API e.g. CCS provides is\n> more expressive than what we provide towards the user space, there could be\n> situations where there are more options with different image quality\n> related properties. I'm not sure if we'll ever see that, though -- right\n> now that's not the case at least.\n\nI'm not denying it can't happen, but I'd like to better understand the\nneeds. If we decide to expose separate odd and even increments to\nuserspace, we also need to explain to userspace how those need to be\ncomputed.\n\nMy understanding of the odd/even increments is that they are meant to\nmake the sub-sampling configuration of the sensor independent from the\nCFA pattern. Is there more to it ?\n\n> I guess we could do with ratios for now, and if something else is needed,\n> then add support for that.","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 F2726C324C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 12 Nov 2024 06:27:49 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 3A235657DF;\n\tTue, 12 Nov 2024 07:27:49 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id A02A0618BE\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 12 Nov 2024 07:27:47 +0100 (CET)","from pendragon.ideasonboard.com (81-175-209-231.bb.dnainternet.fi\n\t[81.175.209.231])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id D79836AF;\n\tTue, 12 Nov 2024 07:27:34 +0100 (CET)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"MNq2pGh3\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1731392855;\n\tbh=9ok70FldEkWazRGiCU9XELjhtTWwP4g/clWF+Unrf50=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=MNq2pGh3+hpJiM4ZXlyP40NjWXGG/KLMtOrFsEj2E0KDQZYzo3bDoyuYGYCxNylqD\n\tB8sasWUciuBT5ga5Kj1zyiAk6Met2u9P0eHg0rGBUOVMo0pO61ykAfpYWcryGE6nsQ\n\tyiAUjwjaBcaMN/CEpqI8ujexPUed7fM/heox0YhI=","Date":"Tue, 12 Nov 2024 08:27:38 +0200","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Sakari Ailus <sakari.ailus@iki.fi>","Cc":"Jacopo Mondi <jacopo.mondi@ideasonboard.com>,\n\tlibcamera-devel@lists.libcamera.org","Subject":"Re: [libcamera-devel] [PATCH v3 02/12] libcamera: camera: Introduce\n\tSensorConfiguration","Message-ID":"<20241112062738.GC21062@pendragon.ideasonboard.com>","References":"<20241110190503.GF6002@pendragon.ideasonboard.com>\n\t<ZzG6gyFvm6Tdj_92@valkosipuli.retiisi.eu>\n\t<20241111081230.GI6002@pendragon.ideasonboard.com>\n\t<ZzHBrQRZgjnetDhp@valkosipuli.retiisi.eu>\n\t<20241111085755.GA1546@pendragon.ideasonboard.com>\n\t<ZzHIgyp_iuMHDrVV@valkosipuli.retiisi.eu>\n\t<20241111092702.GB1546@pendragon.ideasonboard.com>\n\t<ZzHShjTSjIr5VXPR@valkosipuli.retiisi.eu>\n\t<20241111095950.GC7767@pendragon.ideasonboard.com>\n\t<ZzHXFmXAhTBC8s-y@valkosipuli.retiisi.eu>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<ZzHXFmXAhTBC8s-y@valkosipuli.retiisi.eu>","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>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":32261,"web_url":"https://patchwork.libcamera.org/comment/32261/","msgid":"<ZzxgG7kWMGPvIq4f@valkosipuli.retiisi.eu>","date":"2024-11-19T09:53:31","subject":"Re: [libcamera-devel] [PATCH v3 02/12] libcamera: camera: Introduce\n\tSensorConfiguration","submitter":{"id":32,"url":"https://patchwork.libcamera.org/api/people/32/","name":"Sakari Ailus","email":"sakari.ailus@iki.fi"},"content":"Hi Laurent,\n\nOn Tue, Nov 12, 2024 at 08:27:38AM +0200, Laurent Pinchart wrote:\n> On Mon, Nov 11, 2024 at 10:06:14AM +0000, Sakari Ailus wrote:\n> > On Mon, Nov 11, 2024 at 11:59:50AM +0200, Laurent Pinchart wrote:\n> > > On Mon, Nov 11, 2024 at 09:46:46AM +0000, Sakari Ailus wrote:\n> > > > On Mon, Nov 11, 2024 at 11:27:02AM +0200, Laurent Pinchart wrote:\n> > > > > On Mon, Nov 11, 2024 at 09:04:03AM +0000, Sakari Ailus wrote:\n> > > > > > On Mon, Nov 11, 2024 at 10:57:55AM +0200, Laurent Pinchart wrote:\n> > > > > > > On Mon, Nov 11, 2024 at 08:34:53AM +0000, Sakari Ailus wrote:\n> > > > > > > > On Mon, Nov 11, 2024 at 10:12:30AM +0200, Laurent Pinchart wrote:\n> > > > > > > > > On Mon, Nov 11, 2024 at 08:04:19AM +0000, Sakari Ailus wrote:\n> > > > > > > > > > On Sun, Nov 10, 2024 at 09:05:03PM +0200, Laurent Pinchart wrote:\n> > > > > > > > > > > On Sun, Nov 10, 2024 at 11:25:08AM +0000, Sakari Ailus wrote:\n> > > > > > > > > > > > On Sun, Sep 17, 2023 at 06:45:55PM +0300, Laurent Pinchart wrote:\n> > > > > > > > > > > > > > > > +\t\tunsigned int xOddInc = 1;\n> > > > > > > > > > > > > > > > +\t\tunsigned int xEvenInc = 1;\n> > > > > > > > > > > > > > > > +\t\tunsigned int yOddInc = 1;\n> > > > > > > > > > > > > > > > +\t\tunsigned int yEvenInc = 1;\n> > > > > > > > > > > > > > >\n> > > > > > > > > > > > > > > What's the reason for exposing the odd and even increments separately,\n> > > > > > > > > > > > > > > instead of a skipping factor ?\n> > > > > > > > > > > > > > \n> > > > > > > > > > > > > > CCS expresses the two skipping factors separately. I agree there are\n> > > > > > > > > > > > > > not many meaningful ways this two parameters can be combined, but if\n> > > > > > > > > > > > > > one knows how a sensor work it might be more natural expressing them\n> > > > > > > > > > > > > > in this way instead of simply saying x_skip = 2 ( == x_odd_inc=3,\n> > > > > > > > > > > > > > x_even_inc=2)\n> > > > > > > > > > > > > \n> > > > > > > > > > > > > Lots of sensors that support configuring skipping do no expose separate\n> > > > > > > > > > > > > odd and even skipping increments. That's why I think a simpler parameter\n> > > > > > > > > > > > > would be better.\n> > > > > > > > > > > > > \n> > > > > > > > > > > > > Sakari, do you have an opinion on this ? Are there reasonable use cases\n> > > > > > > > > > > > > for controlling the odd and even increments separately in a way that\n> > > > > > > > > > > > > couldn't be expressed by a single skipping factor (for each direction) ?\n> > > > > > > > > > > > \n> > > > > > > > > > > > Skipping (sub-sampling) is generally independent horizontally and\n> > > > > > > > > > > > vertically, binning is not. On some sensors reasonable output sizes may be\n> > > > > > > > > > > > impelemented a combination of the two.\n> > > > > > > > > > > \n> > > > > > > > > > > There's no disagreement that horizontal and vertical factors need to be\n> > > > > > > > > > > expressed independently. The question was about independent even and odd\n> > > > > > > > > > > increments.\n> > > > > > > > > > \n> > > > > > > > > > That's what I meant.\n> > > > > > > > > > \n> > > > > > > > > > CCS separates odd and even increments but in practice the odd increment\n> > > > > > > > > > should always be 1. I guess we could add support for these as well.\n> > > > > > > > > \n> > > > > > > > > I'm not asking to add support for exposing the odd and even increments\n> > > > > > > > > to userspace. Quite the opposite, I was proposing combining them into a\n> > > > > > > > > single factor in the API that libcamera exposes to applications. The\n> > > > > > > > > feedback I would like is whether or not there is a real need for\n> > > > > > > > > applications to configure the increments separately. If so, why ?\n> > > > > > > > \n> > > > > > > > The limits for horizontal and vertical sub-sampling are not connected in\n> > > > > > > > hardware. Beyond that, as I noted above, some reasonable output sizes are\n> > > > > > > > achieved as combination of sub-sampling and binning on some sensors.\n> > > > > > > > Therefore I don't think you can combine the two, at least without limiting\n> > > > > > > > what can be supported, which is why I think horizontal and vertical\n> > > > > > > > sub-sampling need to remain separate.\n> > > > > > > \n> > > > > > > ... I don't think we understand each other.\n> > > > > > > \n> > > > > > > The odd and even increments exist both horizontally and vertically.\n> > > > > > > Quoting myself from a previous e-mail,\n> > > > > > > \n> > > > > > > > > > > There's no disagreement that horizontal and vertical factors need to be\n> > > > > > > > > > > expressed independently. The question was about independent even and odd\n> > > > > > > > > > > increments.\n> > > > > > \n> > > > > > Ah, right. As noted above, the even increment is almost always 1. In\n> > > > > > practice this could have other values on monochrome sensors. We could\n> > > > > > expose both (via controls) right from the begininning, I think that makes\n> > > > > > sense.\n> > > > > \n> > > > > What's the use case ?\n> > > > \n> > > > To do sub-sampling on monochrome sensors that require even values (and the\n> > > > same values for odd and even increments). There are different options in\n> > > > how this can be implemented, see table 78 (page 145) and the examples on\n> > > > page 148 in CCS 1.1 spec.\n> > > \n> > > Does this have to be exposed to userspace, or can appropriate even and\n> > > odd increments be computed by the kernel ?\n> > \n> > It would seem like that they could, but if the API e.g. CCS provides is\n> > more expressive than what we provide towards the user space, there could be\n> > situations where there are more options with different image quality\n> > related properties. I'm not sure if we'll ever see that, though -- right\n> > now that's not the case at least.\n> \n> I'm not denying it can't happen, but I'd like to better understand the\n> needs. If we decide to expose separate odd and even increments to\n> userspace, we also need to explain to userspace how those need to be\n> computed.\n> \n> My understanding of the odd/even increments is that they are meant to\n> make the sub-sampling configuration of the sensor independent from the\n> CFA pattern. Is there more to it ?\n\nThere's that, and in addition it would allow e.g. skipping one in every\nthree pixels, that could be interesting in monochrome sensors. I'm still\nnot sure if anyone ever might want to do that. :-)","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 B8778C32F1\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 19 Nov 2024 09:53:39 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id D28AA65EEB;\n\tTue, 19 Nov 2024 10:53:38 +0100 (CET)","from lahtoruutu.iki.fi (lahtoruutu.iki.fi [185.185.170.37])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 6B15A65EE0\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 19 Nov 2024 10:53:36 +0100 (CET)","from hillosipuli.retiisi.eu\n\t(2a00-1190-d1dd-0-c641-1eff-feae-163c.v6.cust.suomicom.net\n\t[IPv6:2a00:1190:d1dd:0:c641:1eff:feae:163c])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\tkey-exchange X25519 server-signature RSA-PSS (2048 bits)\n\tserver-digest SHA256)\n\t(No client certificate requested) (Authenticated sender: sailus)\n\tby lahtoruutu.iki.fi (Postfix) with ESMTPSA id 4Xt0Ds3dBGz49Q0n;\n\tTue, 19 Nov 2024 11:53:32 +0200 (EET)","from valkosipuli.retiisi.eu (valkosipuli.localdomain [192.168.4.2])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\tkey-exchange ECDHE (prime256v1) server-signature RSA-PSS (4096 bits)\n\tserver-digest SHA256) (No client certificate requested)\n\tby hillosipuli.retiisi.eu (Postfix) with ESMTPS id D7DB7634C93;\n\tTue, 19 Nov 2024 11:53:31 +0200 (EET)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (2048-bit key;\n\tunprotected) header.d=iki.fi header.i=@iki.fi header.b=\"DL6g/sl1\";\n\tdkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=iki.fi; s=lahtoruutu;\n\tt=1732010014;\n\th=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n\tto:to:cc:cc:mime-version:mime-version:content-type:content-type:\n\tin-reply-to:in-reply-to:references:references;\n\tbh=fvzFWd/1mklyZC+28ayLMkCEJ9iAmhHO1YXIc2PO3GI=;\n\tb=DL6g/sl1woTGSS59sPGduR2v7AC0F6OJgjFP8JiNcRzGDCVFwYhsEePnDMPPZVf1yXTnYb\n\tIYa0Wo9hA72uO0SBrm0JqP2Ufu7KchqWqY+lLCZ0iasXTvFOgeWHo6epua3oWX6LrzRhtd\n\tTvQZelHQxHtgrA+A57eUfWgCsrk//P02qytnO3+0JbFhbeMaVrIKf0mf80sqGNYHfip+to\n\teh9Nzs827GgMmyxbdWSOo7DtQ/l8arY7A/aDpGSum1gKr/Dp9hiZzzKwNTwe+8VYeJ3Eq0\n\tgcjO4Y+z7CN1VKTPFiDJguKgQ9mcEC5jgKfPKSzk4l6FUeDCAZ/p5P0tKmdBZQ==","ARC-Message-Signature":"i=1; a=rsa-sha256; c=relaxed/relaxed; d=iki.fi;\n\ts=lahtoruutu; t=1732010014;\n\th=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n\tto:to:cc:cc:mime-version:mime-version:content-type:content-type:\n\tin-reply-to:in-reply-to:references:references;\n\tbh=fvzFWd/1mklyZC+28ayLMkCEJ9iAmhHO1YXIc2PO3GI=;\n\tb=ODZF1cwgOucEoHSNSdvhV24LBnWa1Op+bl+OQD50eppPwrZoxMujModxKOnb+SeQDDlskr\n\tqAIvGWa2d/93KPztpK4yBhX5t86wbwIY22Djnk+jtNnzkNp8cpgYRlK6UW3tXoCldqfkvm\n\t+0DZ+CPyuKpO6twvD3r59BxxMfJkATNe4vCrofOEeQ+xF9fG7ktD9rsHKuW8w2pEf/NEvy\n\thSRgEx1PsorSiL/lKznRN6xY7l4rzcAyKzBHxF2isvgqa61/GEAK5jBjPfpjSm3mAaf8ES\n\tPEekQ7A5C95OkdWmi4sPMygQkfSajeP9lIykB4V0ahQJ8SPGvUk8erYJ64PZCA==","ARC-Seal":"i=1; s=lahtoruutu; d=iki.fi; t=1732010014; a=rsa-sha256; cv=none; \n\tb=q77npTh8A514X5Dbrw0jxqHXIGkojNOSAGYgpGJzhq8UvVkgRbHPgaMSqRQMdfO+CLcD42\n\tfsGDQsH9+8tIDAlRztNL+pBFzn4H2Jyp1KFsEL4Lgl8X1uq2jWAj4RQZ13pwobOduR+hns\n\t/KON/uPXuCQAzeanDmOd4d8Z4iu/0tToQxeEERO3rkV0V10Qg2gyz+BJczQw/bCBFIjP+g\n\tJw3lxFi1D9h5xlHxvIc4pG9QnAAb+BpgCn3m1coCh+hgydBOhUGmGVvhBb6cJG5eVpsW57\n\tZc/OptuWWsuGZRrtRijkHJefB1zDOXOgsMOF/yFDXHgOYdZ2RBahOLRbsxRP3w==","ARC-Authentication-Results":"i=1; ORIGINATING;\n\tauth=pass smtp.auth=sailus smtp.mailfrom=sakari.ailus@iki.fi","Date":"Tue, 19 Nov 2024 09:53:31 +0000","From":"Sakari Ailus <sakari.ailus@iki.fi>","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Cc":"Jacopo Mondi <jacopo.mondi@ideasonboard.com>,\n\tlibcamera-devel@lists.libcamera.org","Subject":"Re: [libcamera-devel] [PATCH v3 02/12] libcamera: camera: Introduce\n\tSensorConfiguration","Message-ID":"<ZzxgG7kWMGPvIq4f@valkosipuli.retiisi.eu>","References":"<ZzG6gyFvm6Tdj_92@valkosipuli.retiisi.eu>\n\t<20241111081230.GI6002@pendragon.ideasonboard.com>\n\t<ZzHBrQRZgjnetDhp@valkosipuli.retiisi.eu>\n\t<20241111085755.GA1546@pendragon.ideasonboard.com>\n\t<ZzHIgyp_iuMHDrVV@valkosipuli.retiisi.eu>\n\t<20241111092702.GB1546@pendragon.ideasonboard.com>\n\t<ZzHShjTSjIr5VXPR@valkosipuli.retiisi.eu>\n\t<20241111095950.GC7767@pendragon.ideasonboard.com>\n\t<ZzHXFmXAhTBC8s-y@valkosipuli.retiisi.eu>\n\t<20241112062738.GC21062@pendragon.ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=us-ascii","Content-Disposition":"inline","In-Reply-To":"<20241112062738.GC21062@pendragon.ideasonboard.com>","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>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]