Patch Detail
Show a patch.
GET /api/patches/26905/?format=api
{ "id": 26905, "url": "https://patchwork.libcamera.org/api/patches/26905/?format=api", "web_url": "https://patchwork.libcamera.org/patch/26905/", "project": { "id": 1, "url": "https://patchwork.libcamera.org/api/projects/1/?format=api", "name": "libcamera", "link_name": "libcamera", "list_id": "libcamera_core", "list_email": "libcamera-devel@lists.libcamera.org", "web_url": "", "scm_url": "", "webscm_url": "" }, "msgid": "<20260616120828.375547-2-stefan.klug@ideasonboard.com>", "date": "2026-06-16T12:08:14", "name": "[v1,1/2] libcamera: Clarify meaning of PixelArraySize and other rectangles", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "1a8ed4213411021bffb7410eb81baeba136e4eca", "submitter": { "id": 184, "url": "https://patchwork.libcamera.org/api/people/184/?format=api", "name": "Stefan Klug", "email": "stefan.klug@ideasonboard.com" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/26905/mbox/", "series": [ { "id": 5998, "url": "https://patchwork.libcamera.org/api/series/5998/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=5998", "date": "2026-06-16T12:08:13", "name": "Clarify rectangle behavior", "version": 1, "mbox": "https://patchwork.libcamera.org/series/5998/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/26905/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/26905/checks/", "tags": {}, "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 70204C3261\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 16 Jun 2026 12:08:51 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 29D8B625C9;\n\tTue, 16 Jun 2026 14:08:51 +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 632C1625BE\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 16 Jun 2026 14:08:48 +0200 (CEST)", "from ideasonboard.com (unknown\n\t[IPv6:2a00:6020:448c:6c00:f9ec:e24d:190b:e780])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id EDEE8448;\n\tTue, 16 Jun 2026 14:08:14 +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=\"B3WmNeTQ\"; dkim-atps=neutral", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1781611695;\n\tbh=WJFA8Mm7FeFoElhVwCKj/APNP4z5j2CteTh+OkK1j/g=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=B3WmNeTQ5zFzyUAh+hmMSwlnSYpnAQY/LxQS+Gv7nInOqhsy9vAIKBQlgITSWBQUZ\n\tjhGbaCRaeSuBR92UumTZSW9npfeVvwSfZg51KwcWZ/+u5EHoYmnQ1nsfv89VxeBFcu\n\tOX/ZP8oHp0n+tv7g0ux49j/10RUV9/5wE383vaVE=", "From": "Stefan Klug <stefan.klug@ideasonboard.com>", "To": "libcamera-devel@lists.libcamera.org", "Cc": "Stefan Klug <stefan.klug@ideasonboard.com>", "Subject": "[PATCH v1 1/2] libcamera: Clarify meaning of PixelArraySize and\n\tother rectangles", "Date": "Tue, 16 Jun 2026 14:08:14 +0200", "Message-ID": "<20260616120828.375547-2-stefan.klug@ideasonboard.com>", "X-Mailer": "git-send-email 2.53.0", "In-Reply-To": "<20260616120828.375547-1-stefan.klug@ideasonboard.com>", "References": "<20260616120828.375547-1-stefan.klug@ideasonboard.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "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>" }, "content": "Current documented behavior for PixelArraySize is to report the readable\narray size of the sensor data. If the readable array is offset relative\nto the physical sensor array, all related rectangles (ScalerCrop,\nPixelArrayActiveAreas) shall be reported relative to PixelArraySize.\n\nHowever no known pipeline and IPA implements it that way. All\npipelines/IPAs treat PixelArraySize as the physical sensor size and\nhandle the rectangles relative to that size.\n\nAdjust the documentation to fit the actual implementations. Add another\nproperty named PixelArrayReadableArea to convey the information that\nPixelArraySize was intended for.\n\nThis has the added benefit that all rectangles are relative to the\nphysical sensor array, which is necessary to align tuning data like lens\nshading correction.\n\nSigned-off-by: Stefan Klug <stefan.klug@ideasonboard.com>\n\n---\n\nToDo:\n- Implement the expected behavior in CameraSensorRaw\n---\n include/libcamera/ipa/core.mojom | 2 +-\n src/libcamera/property_ids_core.yaml | 116 ++++++++++--------\n src/libcamera/sensor/camera_sensor_legacy.cpp | 26 ++--\n src/libcamera/sensor/camera_sensor_raw.cpp | 16 +--\n 4 files changed, 89 insertions(+), 71 deletions(-)", "diff": "diff --git a/include/libcamera/ipa/core.mojom b/include/libcamera/ipa/core.mojom\nindex bce797245829..5da780f5d256 100644\n--- a/include/libcamera/ipa/core.mojom\n+++ b/include/libcamera/ipa/core.mojom\n@@ -154,7 +154,7 @@ module libcamera;\n \n /**\n * \\var IPACameraSensorInfo::activeAreaSize\n- * \\brief The size of the pixel array active area of the sensor\n+ * \\brief The size of the physical pixel array of the sensor in pixels\n */\n \n /**\ndiff --git a/src/libcamera/property_ids_core.yaml b/src/libcamera/property_ids_core.yaml\nindex d5b3d309c055..96c85f9233fd 100644\n--- a/src/libcamera/property_ids_core.yaml\n+++ b/src/libcamera/property_ids_core.yaml\n@@ -427,11 +427,29 @@ controls:\n - PixelArraySize:\n type: Size\n description: |\n- The camera sensor pixel array readable area vertical and horizontal\n- sizes, in pixels.\n+ The camera sensor pixel array vertical and horizontal sizes, in pixels.\n \n- The PixelArraySize property defines the size in pixel units of the\n- readable part of full pixel array matrix, including optical black\n+ The PixelArraySize property defines the size in pixel units of the full\n+ pixel array matrix. It is often not be possible to capture the whole\n+ physical pixel array. For the largest readable area \\see\n+ PixelArrayReadableArea.\n+\n+ This defines a rectangle whose top-left corner is placed in position (0,\n+ 0) and whose vertical and horizontal sizes are defined by this property.\n+ All other rectangles that describe portions of the pixel array, such as\n+ the optical black pixels rectangles and active pixel areas, are defined\n+ relatively to this rectangle.\n+\n+ \\todo Rename this property to Size once we will have property\n+ categories (i.e. Properties::PixelArray::Size)\n+\n+ - PixelArrayReadableArea:\n+ type: Rectangle\n+ description: |\n+ The camera sensor pixel array readable area.\n+\n+ The PixelArrayReadableArea property defines the rectangle in pixel units\n+ of the readable part of full pixel array matrix, including optical black\n pixels used for calibration, pixels which are not considered valid for\n capture and active pixels containing valid image data.\n \n@@ -442,23 +460,25 @@ controls:\n \n For example, let's consider a pixel array matrix assembled as follows\n \n- +--------------------------------------------------+\n- |xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx|\n- |xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx|\n- |xxDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDxx|\n- |xxDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDxx|\n- |xxDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDxx|\n- |xxDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDxx|\n- |xxDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDxx|\n- |xxDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDxx|\n+ PixelArraySize.width\n+ /--------------------------------------------------/\n+ +--------------------------------------------------+ /\n+ |xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx| |\n+ |xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx| |\n+ |xxDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDxx| |\n+ |xxDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDxx| |\n+ |xxDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDxx| |\n+ |xxDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDxx| |\n+ |xxDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDxx| |\n+ |xxDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDxx| | PixelArraySize.height\n ... ... ... ... ...\n \n ... ... ... ... ...\n- |xxDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDxx|\n- |xxDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDxx|\n- |xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx|\n- |xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx|\n- +--------------------------------------------------+\n+ |xxDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDxx| |\n+ |xxDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDxx| |\n+ |xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx| |\n+ |xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx| |\n+ +--------------------------------------------------+ /\n \n starting with two lines of non-readable pixels (x), followed by N lines\n of readable data (D) surrounded by two columns of non-readable pixels on\n@@ -467,35 +487,32 @@ controls:\n sizes of the largest possible buffer of raw data that can be presented\n to applications.\n \n- PixelArraySize.width\n- /----------------------------------------------/\n- +----------------------------------------------+ /\n- |DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD| |\n- |DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD| |\n- |DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD| |\n- |DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD| |\n- |DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD| |\n- |DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD| | PixelArraySize.height\n- ... ... ... ... ...\n- ... ... ... ... ...\n- |DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD| |\n- |DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD| |\n- +----------------------------------------------+ /\n+ PixelArrayReadableArea.width\n+ /--------------------------------------------/\n+ PixelArrayReadableArea.x\n+ +--o-----------------------------------------------+\n+ |xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx|\n+ |xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx|\n+ oxxDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDxx| / PixelArrayReadableArea.y\n+ |xxDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDxx| |\n+ |xxDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDxx| |\n+ |xxDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDxx| |\n+ |xxDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDxx| |\n+ |xxDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDxx| | PixelArrayReadableArea.height\n+ ... ... ... ... ...\n \n- This defines a rectangle whose top-left corner is placed in position (0,\n- 0) and whose vertical and horizontal sizes are defined by this property.\n- All other rectangles that describe portions of the pixel array, such as\n- the optical black pixels rectangles and active pixel areas, are defined\n- relatively to this rectangle.\n+ ... ... ... ... ...\n+ |xxDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDxx| |\n+ |xxDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDxx| /\n+ |xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx|\n+ |xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx|\n+ +--------------------------------------------------+\n \n All the coordinates are expressed relative to the default sensor readout\n direction, without any transformation (such as horizontal and vertical\n flipping) applied. When mapping them to the raw pixel buffer,\n applications shall take any configured transformation into account.\n \n- \\todo Rename this property to Size once we will have property\n- categories (i.e. Properties::PixelArray::Size)\n-\n - PixelArrayOpticalBlackRectangles:\n type: Rectangle\n size: [n]\n@@ -519,7 +536,7 @@ controls:\n they could be positioned too close to the chip margins or to the optical\n black shielding placed on top of optical black pixels.\n \n- PixelArraySize.width\n+ PixelArrayReadableArea.width\n /----------------------------------------------/\n x1 x2\n +--o---------------------------------------o---+ /\n@@ -532,7 +549,7 @@ controls:\n |IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII| |\n |IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII| |\n y3 |IIOOPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPOOII| |\n- |IIOOPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPOOII| | PixelArraySize.height\n+ |IIOOPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPOOII| | PixelArrayReadableArea.height\n |IIOOPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPOOII| |\n ... ... ... ... ...\n ... ... ... ... ...\n@@ -560,7 +577,7 @@ controls:\n skips the invalid lines and columns, producing the following data\n buffer, when captured to memory\n \n- PixelArraySize.width\n+ PixelArrayReadableArea.width\n /----------------------------------------------/\n x1\n +--------------------------------------------o-+ /\n@@ -570,7 +587,7 @@ controls:\n |OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO| |\n y1 oOOPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPOO| |\n |OOPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPOO| |\n- |OOPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPOO| | PixelArraySize.height\n+ |OOPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPOO| | PixelArrayReadableArea.height\n ... ... ... ... ... |\n ... ... ... ... ... |\n |OOPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPOO| |\n@@ -578,14 +595,17 @@ controls:\n +----------------------------------------------+ /\n \n then the invalid lines and columns should not be reported as part of the\n- PixelArraySize property in first place.\n+ PixelArrayReadableArea property in first place. As the coordinates of\n+ PixelArrayReadableArea are relative to the physical pixel array, care\n+ must be taken to report it in a way that the valid pixel data maps to\n+ the correct physical position.\n \n In this case, the position of the black pixel rectangles will be\n \n PixelArrayOpticalBlackRectangles = {\n- { 0, 0, y1 + 1, PixelArraySize[0] },\n- { 0, y1, 2, PixelArraySize[1] - y1 + 1 },\n- { x1, y1, 2, PixelArraySize[1] - y1 + 1 },\n+ { 0, 0, PixelArrayReadableArea.width, y1 + 1 },\n+ { 0, y1, 2, PixelArrayReadableArea.height - y1 + 1 },\n+ { x1, y1, 2, PixelArrayReadableArea.height - y1 + 1 },\n };\n \n \\todo Rename this property to Size once we will have property\ndiff --git a/src/libcamera/sensor/camera_sensor_legacy.cpp b/src/libcamera/sensor/camera_sensor_legacy.cpp\nindex 6a683821f219..482e387d3b24 100644\n--- a/src/libcamera/sensor/camera_sensor_legacy.cpp\n+++ b/src/libcamera/sensor/camera_sensor_legacy.cpp\n@@ -38,6 +38,7 @@\n #include \"libcamera/internal/media_device.h\"\n #include \"libcamera/internal/sysfs.h\"\n #include \"libcamera/internal/v4l2_subdevice.h\"\n+#include \"linux/v4l2-common.h\"\n \n namespace libcamera {\n \n@@ -131,6 +132,7 @@ private:\n \tcontrols::draft::TestPatternModeEnum testPatternMode_;\n \n \tSize pixelArraySize_;\n+\tRectangle readableArea_;\n \tRectangle activeArea_;\n \tconst BayerFormat *bayerFormat_;\n \tbool supportFlips_;\n@@ -390,7 +392,7 @@ int CameraSensorLegacy::validateSensorDriver()\n \t * test platforms have been updated.\n \t */\n \tRectangle rect;\n-\tint ret = subdev_->getSelection(pad_, V4L2_SEL_TGT_CROP_BOUNDS, &rect);\n+\tint ret = subdev_->getSelection(pad_, V4L2_SEL_TGT_NATIVE_SIZE, &rect);\n \tif (ret) {\n \t\t/*\n \t\t * Default the pixel array size to the largest size supported\n@@ -407,9 +409,18 @@ int CameraSensorLegacy::validateSensorDriver()\n \t\tpixelArraySize_ = rect.size();\n \t}\n \n+\tret = subdev_->getSelection(pad_, V4L2_SEL_TGT_CROP_BOUNDS, &readableArea_);\n+\tif (ret) {\n+\t\treadableArea_ = Rectangle(pixelArraySize_);\n+\t\tLOG(CameraSensor, Warning)\n+\t\t\t<< \"The PixelArrayReadableArea property has been defaulted to \"\n+\t\t\t<< readableArea_;\n+\t\terr = -EINVAL;\n+\t}\n+\n \tret = subdev_->getSelection(pad_, V4L2_SEL_TGT_CROP_DEFAULT, &activeArea_);\n \tif (ret) {\n-\t\tactiveArea_ = Rectangle(pixelArraySize_);\n+\t\tactiveArea_ = readableArea_;\n \t\tLOG(CameraSensor, Warning)\n \t\t\t<< \"The PixelArrayActiveAreas property has been defaulted to \"\n \t\t\t<< activeArea_;\n@@ -621,6 +632,7 @@ int CameraSensorLegacy::initProperties()\n \t}\n \n \tproperties_.set(properties::PixelArraySize, pixelArraySize_);\n+\tproperties_.set(properties::PixelArrayReadableArea, readableArea_);\n \tproperties_.set(properties::PixelArrayActiveAreas, { activeArea_ });\n \n \t/* Color filter array pattern, register only for RAW sensors. */\n@@ -882,16 +894,6 @@ int CameraSensorLegacy::sensorInfo(IPACameraSensorInfo *info) const\n \t\t\t<< \"The analogue crop rectangle has been defaulted to the active area size\";\n \t}\n \n-\t/*\n-\t * IPACameraSensorInfo::analogCrop::x and IPACameraSensorInfo::analogCrop::y\n-\t * are defined relatively to the active pixel area, while V4L2's\n-\t * TGT_CROP target is defined in respect to the full pixel array.\n-\t *\n-\t * Compensate it by subtracting the active area offset.\n-\t */\n-\tinfo->analogCrop.x -= activeArea_.x;\n-\tinfo->analogCrop.y -= activeArea_.y;\n-\n \t/* The bit depth and image size depend on the currently applied format. */\n \tV4L2SubdeviceFormat format{};\n \tret = subdev_->getFormat(pad_, &format);\ndiff --git a/src/libcamera/sensor/camera_sensor_raw.cpp b/src/libcamera/sensor/camera_sensor_raw.cpp\nindex 10eba0331fe8..410edeb68983 100644\n--- a/src/libcamera/sensor/camera_sensor_raw.cpp\n+++ b/src/libcamera/sensor/camera_sensor_raw.cpp\n@@ -416,6 +416,12 @@ std::optional<int> CameraSensorRaw::init()\n \tauto last = std::unique(sizes_.begin(), sizes_.end());\n \tsizes_.erase(last, sizes_.end());\n \n+\t/*\n+\t * \\todo Implement querying the physical sensor size based on pad 1,\n+\t * stream 0. See\n+\t * https://lore.kernel.org/linux-media/20260409201501.975242-23-sakari.ailus@linux.intel.com/\n+\t */\n+\n \t/*\n \t * 3. Query selection rectangles. Retrieve properties, and verify that\n \t * all the expected selection rectangles are supported.\n@@ -999,16 +1005,6 @@ int CameraSensorRaw::sensorInfo(IPACameraSensorInfo *info) const\n \tif (ret)\n \t\treturn ret;\n \n-\t/*\n-\t * IPACameraSensorInfo::analogCrop::x and IPACameraSensorInfo::analogCrop::y\n-\t * are defined relatively to the active pixel area, while V4L2's\n-\t * TGT_CROP target is defined in respect to the full pixel array.\n-\t *\n-\t * Compensate it by subtracting the active area offset.\n-\t */\n-\tinfo->analogCrop.x -= activeArea_.x;\n-\tinfo->analogCrop.y -= activeArea_.y;\n-\n \t/* The bit depth and image size depend on the currently applied format. */\n \tV4L2SubdeviceFormat format{};\n \tret = subdev_->getFormat(streams_.image.source, &format);\n", "prefixes": [ "v1", "1/2" ] }