[{"id":38456,"web_url":"https://patchwork.libcamera.org/comment/38456/","msgid":"<6af505f4cdf9628dd62d09f60d0173c810727122.camel@collabora.com>","date":"2026-03-30T15:40:45","subject":"Re: [PATCH v4] gstreamer: Add sensor-config property","submitter":{"id":31,"url":"https://patchwork.libcamera.org/api/people/31/","name":"Nicolas Dufresne","email":"nicolas.dufresne@collabora.com"},"content":"Hi,\n\nLe lundi 30 mars 2026 à 11:14 +0100, David Plowman a écrit :\n> +\t\t\t/* Optional skipping (defaults to 1 for all increments). */\n> +\t\t\tgint xOddInc, xEvenInc, yOddInc, yEvenInc;\n> +\t\t\tif (gst_structure_get_int(self->sensor_config, \"x-odd-inc\", &xOddInc) && xOddInc > 0)\n> +\t\t\t\tsensorCfg.skipping.xOddInc = xOddInc;\n> +\t\t\tif (gst_structure_get_int(self->sensor_config, \"x-even-inc\", &xEvenInc) && xEvenInc > 0)\n> +\t\t\t\tsensorCfg.skipping.xEvenInc = xEvenInc;\n> +\t\t\tif (gst_structure_get_int(self->sensor_config, \"y-odd-inc\", &yOddInc) && yOddInc > 0)\n> +\t\t\t\tsensorCfg.skipping.yOddInc = yOddInc;\n> +\t\t\tif (gst_structure_get_int(self->sensor_config, \"y-even-inc\", &yEvenInc) && yEvenInc > 0)\n> +\t\t\t\tsensorCfg.skipping.yEvenInc = yEvenInc;\n> +\n\nJust wanted to let other reviewers know that I'm not very familiar this specific\nfeature. So I accepted that naming in the sense that \"it matches mostly\" the\nlibcamera API. But as a users, x-odd-inc and so on is not specially intuitive.\nWould be nice with someone that knows this un-implemented design better can\nreview the names here.\n\nNicolas","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 27E0CBDCBD\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 30 Mar 2026 15:40:51 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 3B74B62CC7;\n\tMon, 30 Mar 2026 17:40:50 +0200 (CEST)","from bali.collaboradmins.com (bali.collaboradmins.com\n\t[IPv6:2a01:4f8:201:9162::2])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 06F3562CC7\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 30 Mar 2026 17:40:48 +0200 (CEST)","from [IPv6:2606:6d00:15:e06b::c41] (unknown\n\t[IPv6:2606:6d00:15:e06b::c41])\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\t(Authenticated sender: nicolas)\n\tby bali.collaboradmins.com (Postfix) with ESMTPSA id 1F13E17E483A;\n\tMon, 30 Mar 2026 17:40:48 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (2048-bit key;\n\tunprotected) header.d=collabora.com header.i=@collabora.com\n\theader.b=\"FJIUfCos\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com;\n\ts=mail; t=1774885248;\n\tbh=KPOHO4xAGi4SNQpHWuYy1wn25Vji3ZNt+9/QQNunaQY=;\n\th=Subject:From:To:Date:In-Reply-To:References:From;\n\tb=FJIUfCosRB3TtsWsTRGPa/TZRv/AAZeSDQcW/9d6i8PQyngizLh/KKO+HxQuRcXN8\n\tw17XuNRUyESiSqtVasfJr62apHDRQL8hvfVt1KXOz8ovrcHsbqF94VFNGfwhdsmCzo\n\tdDbndx0uT9Wq7FIWzW+GguTYBqWfkmt/9cnGRcltboVTfRXJGayVxZhJq2zWL6FC01\n\tE8WAnYnfcPWIpUyULd6QAL8RkU2SUEpJAhBE4dpxPYRW24/ILz4gFL2/SmqySm4Uh9\n\tfkUKWcyvWc/GEb+Zba0nwRUWmV5vZcIjuz6UozE8YzKbaCMb4qVAXLWbkUZHo5sAjG\n\twR3rws2Bv+L7A==","Message-ID":"<6af505f4cdf9628dd62d09f60d0173c810727122.camel@collabora.com>","Subject":"Re: [PATCH v4] gstreamer: Add sensor-config property","From":"Nicolas Dufresne <nicolas.dufresne@collabora.com>","To":"David Plowman <david.plowman@raspberrypi.com>, \n\tlibcamera-devel@lists.libcamera.org","Date":"Mon, 30 Mar 2026 11:40:45 -0400","In-Reply-To":"<20260330101654.3332-1-david.plowman@raspberrypi.com>","References":"<20260330101654.3332-1-david.plowman@raspberrypi.com>","Autocrypt":"addr=nicolas.dufresne@collabora.com; prefer-encrypt=mutual;\n\tkeydata=mDMEaCN2ixYJKwYBBAHaRw8BAQdAM0EHepTful3JOIzcPv6ekHOenE1u0vDG1gdHFrChD\n\t/e0J05pY29sYXMgRHVmcmVzbmUgPG5pY29sYXNAbmR1ZnJlc25lLmNhPoicBBMWCgBEAhsDBQsJCA\n\tcCAiICBhUKCQgLAgQWAgMBAh4HAheABQkJZfd1FiEE7w1SgRXEw8IaBG8S2UGUUSlgcvQFAmibrjo\n\tCGQEACgkQ2UGUUSlgcvQlQwD/RjpU1SZYcKG6pnfnQ8ivgtTkGDRUJ8gP3fK7+XUjRNIA/iXfhXMN\n\tabIWxO2oCXKf3TdD7aQ4070KO6zSxIcxgNQFtDFOaWNvbGFzIER1ZnJlc25lIDxuaWNvbGFzLmR1Z\n\tnJlc25lQGNvbGxhYm9yYS5jb20+iJkEExYKAEECGwMFCwkIBwICIgIGFQoJCAsCBBYCAwECHgcCF4\n\tAWIQTvDVKBFcTDwhoEbxLZQZRRKWBy9AUCaCyyxgUJCWX3dQAKCRDZQZRRKWBy9ARJAP96pFmLffZ\n\tsmBUpkyVBfFAf+zq6BJt769R0al3kHvUKdgD9G7KAHuioxD2v6SX7idpIazjzx8b8rfzwTWyOQWHC\n\tAAS0LU5pY29sYXMgRHVmcmVzbmUgPG5pY29sYXMuZHVmcmVzbmVAZ21haWwuY29tPoiZBBMWCgBBF\n\tiEE7w1SgRXEw8IaBG8S2UGUUSlgcvQFAmibrGYCGwMFCQll93UFCwkIBwICIgIGFQoJCAsCBBYCAw\n\tECHgcCF4AACgkQ2UGUUSlgcvRObgD/YnQjfi4+L8f4fI7p1pPMTwRTcaRdy6aqkKEmKsCArzQBAK8\n\tbRLv9QjuqsE6oQZra/RB4widZPvphs78H0P6NmpIJ","Organization":"Collabora Canada","Content-Type":"multipart/signed; micalg=\"pgp-sha512\";\n\tprotocol=\"application/pgp-signature\";\n\tboundary=\"=-FXdLrczCwJXn5R4hNMpg\"","User-Agent":"Evolution 3.58.3 (3.58.3-1.fc43) ","MIME-Version":"1.0","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":38457,"web_url":"https://patchwork.libcamera.org/comment/38457/","msgid":"<9bfe9c474b116dbda5674311af09d4eef45fd0ba.camel@collabora.com>","date":"2026-03-30T15:41:08","subject":"Re: [PATCH v4] gstreamer: Add sensor-config property","submitter":{"id":31,"url":"https://patchwork.libcamera.org/api/people/31/","name":"Nicolas Dufresne","email":"nicolas.dufresne@collabora.com"},"content":"Le lundi 30 mars 2026 à 11:14 +0100, David Plowman a écrit :\n> The sensor-config property may optionally be specified to give the\n> outputSize and bitDepth of the SensorConfiguration that is applied to\n> the camera configuration. For example, use\n> \n> libcamerasrc sensor-config=\"sensor/config,width=2304,height=1296,depth=10\"\n> \n> to request the 10-bit 2304x1296 mode of a sensor.\n> \n> All three parameters, width, height and bit depth, must be present, or\n> it will issue a warning and revert to automatic mode selection (as if\n> there were no sensor-config at all).\n> \n> If a mode is requested that doesn't exist then camera configuration\n> will fail and the pipeline won't start.\n> \n> As future-proofing, the SensorConfiguration's binning, increment and\n> analog-crop parameters may be specified, though libcamera currently\n> ignores them.\n> \n> Signed-off-by: David Plowman <david.plowman@raspberrypi.com>\n> Reviewed-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>\n> Closes: https://gitlab.freedesktop.org/camera/libcamera/-/issues/300\n> ---\n>  src/gstreamer/gstlibcamerasrc.cpp | 73 +++++++++++++++++++++++++++++++\n>  1 file changed, 73 insertions(+)\n> \n> diff --git a/src/gstreamer/gstlibcamerasrc.cpp b/src/gstreamer/gstlibcamerasrc.cpp\n> index a7241e9b..5d3ee3a2 100644\n> --- a/src/gstreamer/gstlibcamerasrc.cpp\n> +++ b/src/gstreamer/gstlibcamerasrc.cpp\n> @@ -141,6 +141,7 @@ struct _GstLibcameraSrc {\n>  \tGstTask *task;\n>  \n>  \tgchar *camera_name;\n> +\tGstStructure *sensor_config;\n>  \n>  \tstd::atomic<GstEvent *> pending_eos;\n>  \n> @@ -152,6 +153,7 @@ struct _GstLibcameraSrc {\n>  enum {\n>  \tPROP_0,\n>  \tPROP_CAMERA_NAME,\n> +\tPROP_SENSOR_CONFIG,\n>  \tPROP_LAST\n>  };\n>  \n> @@ -846,6 +848,55 @@ gst_libcamera_src_task_enter(GstTask *task, [[maybe_unused]] GThread *thread,\n>  \t}\n>  \tg_assert(state->config_->size() == state->srcpads_.size());\n>  \n> +\t/* Apply optional sensor configuration. */\n> +\tif (self->sensor_config) {\n> +\t\tgint w = 0, h = 0, depth = 0;\n> +\t\tif (!gst_structure_get_int(self->sensor_config, \"width\", &w) ||\n> +\t\t    !gst_structure_get_int(self->sensor_config, \"height\", &h) ||\n> +\t\t    !gst_structure_get_int(self->sensor_config, \"depth\", &depth) ||\n> +\t\t    w <= 0 || h <= 0 || depth <= 0) {\n> +\t\t\tGST_ELEMENT_WARNING(self, RESOURCE, SETTINGS,\n> +\t\t\t\t\t    (\"sensor-config requires non-zero width, height and depth\"\n> +\t\t\t\t\t     \" fields, ignoring\"),\n> +\t\t\t\t\t    (nullptr));\n> +\t\t} else {\n> +\t\t\tSensorConfiguration sensorCfg;\n> +\t\t\tsensorCfg.outputSize = Size(w, h);\n> +\t\t\tsensorCfg.bitDepth = depth;\n> +\n> +\t\t\t/* Optional binning (defaults to 1x1). */\n> +\t\t\tgint binX, binY;\n> +\t\t\tif (gst_structure_get_int(self->sensor_config, \"bin-x\", &binX) && binX > 0)\n> +\t\t\t\tsensorCfg.binning.binX = binX;\n> +\t\t\tif (gst_structure_get_int(self->sensor_config, \"bin-y\", &binY) && binY > 0)\n> +\t\t\t\tsensorCfg.binning.binY = binY;\n> +\n> +\t\t\t/* Optional skipping (defaults to 1 for all increments). */\n> +\t\t\tgint xOddInc, xEvenInc, yOddInc, yEvenInc;\n> +\t\t\tif (gst_structure_get_int(self->sensor_config, \"x-odd-inc\", &xOddInc) && xOddInc > 0)\n> +\t\t\t\tsensorCfg.skipping.xOddInc = xOddInc;\n> +\t\t\tif (gst_structure_get_int(self->sensor_config, \"x-even-inc\", &xEvenInc) && xEvenInc > 0)\n> +\t\t\t\tsensorCfg.skipping.xEvenInc = xEvenInc;\n> +\t\t\tif (gst_structure_get_int(self->sensor_config, \"y-odd-inc\", &yOddInc) && yOddInc > 0)\n> +\t\t\t\tsensorCfg.skipping.yOddInc = yOddInc;\n> +\t\t\tif (gst_structure_get_int(self->sensor_config, \"y-even-inc\", &yEvenInc) && yEvenInc > 0)\n> +\t\t\t\tsensorCfg.skipping.yEvenInc = yEvenInc;\n> +\n> +\t\t\t/* Optional analog crop (defaults to \"unset\"). */\n> +\t\t\tgint cropX, cropY, cropW, cropH;\n> +\t\t\tif (gst_structure_get_int(self->sensor_config, \"analog-crop-x\", &cropX) &&\n> +\t\t\t    gst_structure_get_int(self->sensor_config, \"analog-crop-y\", &cropY) &&\n> +\t\t\t    gst_structure_get_int(self->sensor_config, \"analog-crop-width\", &cropW) &&\n> +\t\t\t    gst_structure_get_int(self->sensor_config, \"analog-crop-height\", &cropH) &&\n> +\t\t\t    cropX >= 0 && cropY >= 0 && cropW > 0 && cropH > 0)\n> +\t\t\t\tsensorCfg.analogCrop = Rectangle(cropX, cropY,\n> +\t\t\t\t\t\t\t\t static_cast<unsigned int>(cropW),\n> +\t\t\t\t\t\t\t\t static_cast<unsigned int>(cropH));\n\nAck.\n\n> +\n> +\t\t\tstate->config_->sensorConfig = sensorCfg;\n> +\t\t}\n> +\t}\n> +\n>  \tif (!gst_libcamera_src_negotiate(self)) {\n>  \t\tstate->initControls_.clear();\n>  \t\tGST_ELEMENT_FLOW_ERROR(self, GST_FLOW_NOT_NEGOTIATED);\n> @@ -934,6 +985,10 @@ gst_libcamera_src_set_property(GObject *object, guint prop_id,\n>  \t\tg_free(self->camera_name);\n>  \t\tself->camera_name = g_value_dup_string(value);\n>  \t\tbreak;\n> +\tcase PROP_SENSOR_CONFIG:\n> +\t\tg_clear_pointer(&self->sensor_config, gst_structure_free);\n> +\t\tself->sensor_config = (GstStructure *)g_value_dup_boxed(value);\n> +\t\tbreak;\n>  \tdefault:\n>  \t\tif (!state->controls_.setProperty(prop_id - PROP_LAST, value, pspec))\n>  \t\t\tG_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec);\n> @@ -953,6 +1008,9 @@ gst_libcamera_src_get_property(GObject *object, guint prop_id, GValue *value,\n>  \tcase PROP_CAMERA_NAME:\n>  \t\tg_value_set_string(value, self->camera_name);\n>  \t\tbreak;\n> +\tcase PROP_SENSOR_CONFIG:\n> +\t\tg_value_set_boxed(value, self->sensor_config);\n> +\t\tbreak;\n>  \tdefault:\n>  \t\tif (!state->controls_.getProperty(prop_id - PROP_LAST, value, pspec))\n>  \t\t\tG_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec);\n> @@ -1040,6 +1098,7 @@ gst_libcamera_src_finalize(GObject *object)\n>  \tg_clear_object(&self->task);\n>  \tg_mutex_clear(&self->state->lock_);\n>  \tg_free(self->camera_name);\n> +\tg_clear_pointer(&self->sensor_config, gst_structure_free);\n>  \tdelete self->state;\n>  \n>  \treturn klass->finalize(object);\n> @@ -1162,6 +1221,20 @@ gst_libcamera_src_class_init(GstLibcameraSrcClass *klass)\n>  \t\t\t\t\t\t\t     | G_PARAM_STATIC_STRINGS));\n>  \tg_object_class_install_property(object_class, PROP_CAMERA_NAME, spec);\n>  \n> +\tspec = g_param_spec_boxed(\"sensor-config\", \"Sensor Config\",\n> +\t\t\t\t  \"Desired sensor configuration as a GstStructure with mandatory \"\n> +\t\t\t\t  \"fields width, height and depth, and optional fields bin-x, bin-y, \"\n> +\t\t\t\t  \"x-odd-inc, x-even-inc, y-odd-inc, y-even-inc, \"\n> +\t\t\t\t  \"analog-crop-x, analog-crop-y, analog-crop-width, analog-crop-height \"\n> +\t\t\t\t  \"(e.g. \\\"sensor/config,width=2304,height=1296,depth=10\\\"). \"\n> +\t\t\t\t  \"Leave unset to let the pipeline negotiate the sensor mode automatically.\",\n> +\t\t\t\t  GST_TYPE_STRUCTURE,\n> +\t\t\t\t  (GParamFlags)(GST_PARAM_MUTABLE_READY\n> +\t\t\t\t\t\t| G_PARAM_CONSTRUCT\n> +\t\t\t\t\t\t| G_PARAM_READWRITE\n> +\t\t\t\t\t\t| G_PARAM_STATIC_STRINGS));\n> +\tg_object_class_install_property(object_class, PROP_SENSOR_CONFIG, spec);\n> +\n>  \tGstCameraControls::installProperties(object_class, PROP_LAST);\n>  }\n>","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 254A1BDCBD\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 30 Mar 2026 15:41:12 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id C86B362D05;\n\tMon, 30 Mar 2026 17:41:11 +0200 (CEST)","from bali.collaboradmins.com (bali.collaboradmins.com\n\t[148.251.105.195])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 706C462CC7\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 30 Mar 2026 17:41:10 +0200 (CEST)","from [IPv6:2606:6d00:15:e06b::c41] (unknown\n\t[IPv6:2606:6d00:15:e06b::c41])\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\t(No client certificate requested) (Authenticated sender: nicolas)\n\tby bali.collaboradmins.com (Postfix) with ESMTPSA id 878A217E483F;\n\tMon, 30 Mar 2026 17:41:09 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (2048-bit key;\n\tunprotected) header.d=collabora.com header.i=@collabora.com\n\theader.b=\"HET+BzoI\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com;\n\ts=mail; t=1774885270;\n\tbh=Fy0m2y91CaN63CP2zOxDOHZbUe43+rG7XF6CqaugEwE=;\n\th=Subject:From:To:Date:In-Reply-To:References:From;\n\tb=HET+BzoIFABsBo+pPf29bYzdzVBUdgaK7Fk0GcHEMNNC/r3JtRxrHyIJoFQzYortK\n\tKv1SajMCOzKdFE2mrCSkvmYab5ac8D4bBze+b1XDc3J+ry/ajTpMYjNHt7yBw0jEi0\n\tyWeN8+UmuDLs+/XbPvvFsiZfe8mjTd+JPKmSeZtVlpViGFgqJfhLvSGJ/HlQtpH2i9\n\tmwwhIOr7iHxRJ+xUhigodH+FiBEJf/Hs5ichu2aszAqBrF+0RQnGZPFoPDwMUhGT2j\n\tzfOQIBgxaPnTCzwmcdmnqtYrC3CLUmzki6QCcr40O8Nt/CR22kGaD2PqC7Xytikgyj\n\tcZgHjGP2qrBog==","Message-ID":"<9bfe9c474b116dbda5674311af09d4eef45fd0ba.camel@collabora.com>","Subject":"Re: [PATCH v4] gstreamer: Add sensor-config property","From":"Nicolas Dufresne <nicolas.dufresne@collabora.com>","To":"David Plowman <david.plowman@raspberrypi.com>, \n\tlibcamera-devel@lists.libcamera.org","Date":"Mon, 30 Mar 2026 11:41:08 -0400","In-Reply-To":"<20260330101654.3332-1-david.plowman@raspberrypi.com>","References":"<20260330101654.3332-1-david.plowman@raspberrypi.com>","Autocrypt":"addr=nicolas.dufresne@collabora.com; prefer-encrypt=mutual;\n\tkeydata=mDMEaCN2ixYJKwYBBAHaRw8BAQdAM0EHepTful3JOIzcPv6ekHOenE1u0vDG1gdHFrChD\n\t/e0J05pY29sYXMgRHVmcmVzbmUgPG5pY29sYXNAbmR1ZnJlc25lLmNhPoicBBMWCgBEAhsDBQsJCA\n\tcCAiICBhUKCQgLAgQWAgMBAh4HAheABQkJZfd1FiEE7w1SgRXEw8IaBG8S2UGUUSlgcvQFAmibrjo\n\tCGQEACgkQ2UGUUSlgcvQlQwD/RjpU1SZYcKG6pnfnQ8ivgtTkGDRUJ8gP3fK7+XUjRNIA/iXfhXMN\n\tabIWxO2oCXKf3TdD7aQ4070KO6zSxIcxgNQFtDFOaWNvbGFzIER1ZnJlc25lIDxuaWNvbGFzLmR1Z\n\tnJlc25lQGNvbGxhYm9yYS5jb20+iJkEExYKAEECGwMFCwkIBwICIgIGFQoJCAsCBBYCAwECHgcCF4\n\tAWIQTvDVKBFcTDwhoEbxLZQZRRKWBy9AUCaCyyxgUJCWX3dQAKCRDZQZRRKWBy9ARJAP96pFmLffZ\n\tsmBUpkyVBfFAf+zq6BJt769R0al3kHvUKdgD9G7KAHuioxD2v6SX7idpIazjzx8b8rfzwTWyOQWHC\n\tAAS0LU5pY29sYXMgRHVmcmVzbmUgPG5pY29sYXMuZHVmcmVzbmVAZ21haWwuY29tPoiZBBMWCgBBF\n\tiEE7w1SgRXEw8IaBG8S2UGUUSlgcvQFAmibrGYCGwMFCQll93UFCwkIBwICIgIGFQoJCAsCBBYCAw\n\tECHgcCF4AACgkQ2UGUUSlgcvRObgD/YnQjfi4+L8f4fI7p1pPMTwRTcaRdy6aqkKEmKsCArzQBAK8\n\tbRLv9QjuqsE6oQZra/RB4widZPvphs78H0P6NmpIJ","Organization":"Collabora Canada","Content-Type":"multipart/signed; micalg=\"pgp-sha512\";\n\tprotocol=\"application/pgp-signature\";\n\tboundary=\"=-vvtvJ74S8+jq+d8TjS5W\"","User-Agent":"Evolution 3.58.3 (3.58.3-1.fc43) ","MIME-Version":"1.0","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":38468,"web_url":"https://patchwork.libcamera.org/comment/38468/","msgid":"<acvszJJ8JEWckYfl@zed>","date":"2026-03-31T15:54:27","subject":"Re: [PATCH v4] gstreamer: Add sensor-config property","submitter":{"id":143,"url":"https://patchwork.libcamera.org/api/people/143/","name":"Jacopo Mondi","email":"jacopo.mondi@ideasonboard.com"},"content":"Hi Nicolas,\n\nOn Mon, Mar 30, 2026 at 11:40:45AM -0400, Nicolas Dufresne wrote:\n> Hi,\n>\n> Le lundi 30 mars 2026 à 11:14 +0100, David Plowman a écrit :\n> > +\t\t\t/* Optional skipping (defaults to 1 for all increments). */\n> > +\t\t\tgint xOddInc, xEvenInc, yOddInc, yEvenInc;\n> > +\t\t\tif (gst_structure_get_int(self->sensor_config, \"x-odd-inc\", &xOddInc) && xOddInc > 0)\n> > +\t\t\t\tsensorCfg.skipping.xOddInc = xOddInc;\n> > +\t\t\tif (gst_structure_get_int(self->sensor_config, \"x-even-inc\", &xEvenInc) && xEvenInc > 0)\n> > +\t\t\t\tsensorCfg.skipping.xEvenInc = xEvenInc;\n> > +\t\t\tif (gst_structure_get_int(self->sensor_config, \"y-odd-inc\", &yOddInc) && yOddInc > 0)\n> > +\t\t\t\tsensorCfg.skipping.yOddInc = yOddInc;\n> > +\t\t\tif (gst_structure_get_int(self->sensor_config, \"y-even-inc\", &yEvenInc) && yEvenInc > 0)\n> > +\t\t\t\tsensorCfg.skipping.yEvenInc = yEvenInc;\n> > +\n>\n> Just wanted to let other reviewers know that I'm not very familiar this specific\n> feature. So I accepted that naming in the sense that \"it matches mostly\" the\n> libcamera API. But as a users, x-odd-inc and so on is not specially intuitive.\n> Would be nice with someone that knows this un-implemented design better can\n> review the names here.\n\nUnfortunately the concept itself (\"pixel increment counter for odd rows\")\nis not easy to summarize with a nice name, if that's what concerns\nyou.\n\nAnyone who's playing with sensor configurations and tries to configure\nthe skipping/binning modes should find those terms ... familiar (?) as\nthey're also used by the MIPI CCS specs as well (see 8.2.3\n\"Sub-Sampled Readout\")\n\nOf course, if there are better proposals I welcome them.\n\n\n\n>\n> Nicolas","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 6FBECBDCBD\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 31 Mar 2026 15:54:33 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id B276C6274D;\n\tTue, 31 Mar 2026 17:54:32 +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 BDFB86274D\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 31 Mar 2026 17:54:30 +0200 (CEST)","from ideasonboard.com (net-93-65-100-155.cust.vodafonedsl.it\n\t[93.65.100.155])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 2DA08244D;\n\tTue, 31 Mar 2026 17:53:08 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"WsP0szjZ\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1774972388;\n\tbh=tQyHFFhqx9id8Cv23eg0vCHeodUyAjFFJBPD9/rTSZ0=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=WsP0szjZ7f8CVnacZJSyjHyvwu9PwyglTJRVfssYkBTkReE5LcXSrd4ZUpV0e0vGH\n\t6AqFYml+ZlmYwFDSeC2amY4WyEtB9HFWO1LM6j9CjJEN3GcExTEYxGrEarl9mDTr4j\n\tRKU9fFb8KiB1qw5L/PHHfWs2eFqoPTztfKRplSTc=","Date":"Tue, 31 Mar 2026 17:54:27 +0200","From":"Jacopo Mondi <jacopo.mondi@ideasonboard.com>","To":"Nicolas Dufresne <nicolas.dufresne@collabora.com>","Cc":"David Plowman <david.plowman@raspberrypi.com>, \n\tlibcamera-devel@lists.libcamera.org","Subject":"Re: [PATCH v4] gstreamer: Add sensor-config property","Message-ID":"<acvszJJ8JEWckYfl@zed>","References":"<20260330101654.3332-1-david.plowman@raspberrypi.com>\n\t<6af505f4cdf9628dd62d09f60d0173c810727122.camel@collabora.com>","MIME-Version":"1.0","Content-Type":"multipart/signed; micalg=pgp-sha512;\n\tprotocol=\"application/pgp-signature\"; boundary=\"bfintam7emkbfq6t\"","Content-Disposition":"inline","In-Reply-To":"<6af505f4cdf9628dd62d09f60d0173c810727122.camel@collabora.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>"}}]