[{"id":34638,"web_url":"https://patchwork.libcamera.org/comment/34638/","msgid":"<vmnmq6fc23qy5v5csfiytc6qfasc6y6gb3pkxw7zjt56iwxy3k@c6nohno7sjn7>","date":"2025-06-25T17:32:38","subject":"Re: [PATCH] camera_sensor: Expand on computeTransform()\n\tdocumentation","submitter":{"id":143,"url":"https://patchwork.libcamera.org/api/people/143/","name":"Jacopo Mondi","email":"jacopo.mondi@ideasonboard.com"},"content":"Hi Umang\n\nOn Wed, Jun 25, 2025 at 09:44:58PM +0530, Umang Jain wrote:\n> The description for computeTransform() when the desired orientation\n> cannot be achieved, can be expanded a further bit, to clearly report\n> that orientation will be adjusted to native camera sensor mounting\n> orientation.\n>\n> Signed-off-by: Umang Jain <uajain@igalia.com>\n\n> ---\n>  src/libcamera/sensor/camera_sensor.cpp | 3 ++-\n>  1 file changed, 2 insertions(+), 1 deletion(-)\n>\n> diff --git a/src/libcamera/sensor/camera_sensor.cpp b/src/libcamera/sensor/camera_sensor.cpp\n> index d19b5e2e..6f4a13fe 100644\n> --- a/src/libcamera/sensor/camera_sensor.cpp\n> +++ b/src/libcamera/sensor/camera_sensor.cpp\n> @@ -302,7 +302,8 @@ int CameraSensor::setEmbeddedDataEnabled(bool enable)\n>   * camera sensor, likely at configure() time.\n>   *\n>   * If the requested \\a orientation cannot be obtained, the \\a orientation\n> - * parameter is adjusted to report the current image orientation and\n> + * parameter is adjusted to report the native image orientation (i.e.\n> + * physical mounting orientation of the camera sensor) and\n\nI would say \"rotation\" for being consistent with the fact we use\nrotation for camera sensor, and orientation for images.\n\nnit apart:\nReviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>\n\n>   * Transform::Identity is returned.\n>   *\n>   * If the requested \\a orientation can be obtained, the function computes a\n> --\n> 2.49.0\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 D4568C3237\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 25 Jun 2025 17:32:44 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id A65BA68DE6;\n\tWed, 25 Jun 2025 19:32: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 73B2561533\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 25 Jun 2025 19:32:42 +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 216AA6F3;\n\tWed, 25 Jun 2025 19:32:24 +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=\"nyyV56Uz\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1750872744;\n\tbh=GGkU5R+JC570jm9nZ+PEBfMqsnJE47ErMA9fSIwu3mQ=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=nyyV56Uzl0zfohumGes/quMvUQYex3Nz2Y8iS0aicZajvvC9DYXIObL9TuVy7UShx\n\tYwA5ACVngfBPcXqvWshKMIVPTOHZawCQS0sG+KsGja6SrBfVJlG3Pk5QiORMwl4/EI\n\tMiKloo2QCcTYEusl1YFLdgIG9YDfXNqDS5tUY0ZA=","Date":"Wed, 25 Jun 2025 19:32:38 +0200","From":"Jacopo Mondi <jacopo.mondi@ideasonboard.com>","To":"Umang Jain <uajain@igalia.com>","Cc":"libcamera-devel@lists.libcamera.org","Subject":"Re: [PATCH] camera_sensor: Expand on computeTransform()\n\tdocumentation","Message-ID":"<vmnmq6fc23qy5v5csfiytc6qfasc6y6gb3pkxw7zjt56iwxy3k@c6nohno7sjn7>","References":"<20250625161458.31006-1-uajain@igalia.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20250625161458.31006-1-uajain@igalia.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":34640,"web_url":"https://patchwork.libcamera.org/comment/34640/","msgid":"<346B8DBD-B412-4E0E-A4B7-269E71F03CBC@igalia.com>","date":"2025-06-25T21:05:04","subject":"Re: [PATCH] camera_sensor: Expand on computeTransform()\n\tdocumentation","submitter":{"id":232,"url":"https://patchwork.libcamera.org/api/people/232/","name":"Umang Jain","email":"uajain@igalia.com"},"content":"Hi Jacopo\n\nOn 25 June 2025 11:02:38 pm IST, Jacopo Mondi <jacopo.mondi@ideasonboard.com> wrote:\n>Hi Umang\n>\n>On Wed, Jun 25, 2025 at 09:44:58PM +0530, Umang Jain wrote:\n>> The description for computeTransform() when the desired orientation\n>> cannot be achieved, can be expanded a further bit, to clearly report\n>> that orientation will be adjusted to native camera sensor mounting\n>> orientation.\n>>\n>> Signed-off-by: Umang Jain <uajain@igalia.com>\n>\n>> ---\n>>  src/libcamera/sensor/camera_sensor.cpp | 3 ++-\n>>  1 file changed, 2 insertions(+), 1 deletion(-)\n>>\n>> diff --git a/src/libcamera/sensor/camera_sensor.cpp b/src/libcamera/sensor/camera_sensor.cpp\n>> index d19b5e2e..6f4a13fe 100644\n>> --- a/src/libcamera/sensor/camera_sensor.cpp\n>> +++ b/src/libcamera/sensor/camera_sensor.cpp\n>> @@ -302,7 +302,8 @@ int CameraSensor::setEmbeddedDataEnabled(bool enable)\n>>   * camera sensor, likely at configure() time.\n>>   *\n>>   * If the requested \\a orientation cannot be obtained, the \\a orientation\n>> - * parameter is adjusted to report the current image orientation and\n>> + * parameter is adjusted to report the native image orientation (i.e.\n>> + * physical mounting orientation of the camera sensor) and\n>\n>I would say \"rotation\" for being consistent with the fact we use\n>rotation for camera sensor, and orientation for images.\n\nI had written 'rotation' first, however changed it to 'orientation' after looking at mountingOrientation_ in computeTransform().\n\nPerhaps that can be changed to mountingRotation_ as well. \n\n>\n>nit apart:\n>Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>\n>\n>>   * Transform::Identity is returned.\n>>   *\n>>   * If the requested \\a orientation can be obtained, the function computes a\n>> --\n>> 2.49.0\n>>\n\nRegards,\nUmang","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 648C6C3237\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 25 Jun 2025 21:05:19 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 6BC8868DE2;\n\tWed, 25 Jun 2025 23:05:18 +0200 (CEST)","from fanzine2.igalia.com (fanzine2.igalia.com [213.97.179.56])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 576D861533\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 25 Jun 2025 23:05:16 +0200 (CEST)","from [49.36.69.141] (helo=[127.0.0.1])\n\tby fanzine2.igalia.com with esmtpsa \n\t(Cipher TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_128_GCM:128)\n\t(Exim) id 1uUXIw-008hy4-6g; Wed, 25 Jun 2025 23:05:14 +0200"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=igalia.com header.i=@igalia.com\n\theader.b=\"fZ8b0SJC\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=igalia.com;\n\ts=20170329;\n\th=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID:\n\tReferences:In-Reply-To:Subject:CC:To:From:Date:Sender:Reply-To:Content-ID:\n\tContent-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc\n\t:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe:\n\tList-Post:List-Owner:List-Archive;\n\tbh=Oz8eYOT6NmAJhX2+H3mPSYqshltQqIyTfdNyk30Jf0o=;\n\tb=fZ8b0SJCwIy05YucTji8kVAW0k\n\tNt4nY2wrOxH3r+EdlAlvalQJ+3JHLeS9VA11UPFeL6jHnbhPqVgWBYuvOGNfIv9vL+9pIYhAauIjB\n\tsGBYWS64Aq9cPsX3DoNhCLi2So/Jb1lkCFUEH9DqdvegANyyG9OeuKwy/X3yz5kSuGnN46VfHDfZF\n\tWrUa03M8AjHA1IeQQ3jttnfGbFVLi4rBD+Sj56m754CzW+bsgpdbQpkHquw/yIGxvfXLRx4U42zez\n\tQ4Mjb+Fi7dIf2ZGp6DnM3rSAj4OoFddWNyBbj2iUusfrKLIkq+0uKtLW00wKUiLmcwakZ0ZllB4TK\n\tiiobbarQ==;","Date":"Thu, 26 Jun 2025 02:35:04 +0530","From":"Umang Jain <uajain@igalia.com>","To":"Jacopo Mondi <jacopo.mondi@ideasonboard.com>","CC":"libcamera-devel@lists.libcamera.org","Subject":"Re: [PATCH] camera_sensor: Expand on computeTransform()\n\tdocumentation","User-Agent":"K-9 Mail for Android","In-Reply-To":"<vmnmq6fc23qy5v5csfiytc6qfasc6y6gb3pkxw7zjt56iwxy3k@c6nohno7sjn7>","References":"<20250625161458.31006-1-uajain@igalia.com>\n\t<vmnmq6fc23qy5v5csfiytc6qfasc6y6gb3pkxw7zjt56iwxy3k@c6nohno7sjn7>","Message-ID":"<346B8DBD-B412-4E0E-A4B7-269E71F03CBC@igalia.com>","MIME-Version":"1.0","Content-Type":"text/plain;\n charset=utf-8","Content-Transfer-Encoding":"quoted-printable","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":34641,"web_url":"https://patchwork.libcamera.org/comment/34641/","msgid":"<20250625211426.GC32071@pendragon.ideasonboard.com>","date":"2025-06-25T21:14:26","subject":"Re: [PATCH] camera_sensor: Expand on computeTransform()\n\tdocumentation","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"On Thu, Jun 26, 2025 at 02:35:04AM +0530, Umang Jain wrote:\n> On 25 June 2025 11:02:38 pm IST, Jacopo Mondi wrote:\n> >On Wed, Jun 25, 2025 at 09:44:58PM +0530, Umang Jain wrote:\n> >> The description for computeTransform() when the desired orientation\n> >> cannot be achieved, can be expanded a further bit, to clearly report\n> >> that orientation will be adjusted to native camera sensor mounting\n> >> orientation.\n> >>\n> >> Signed-off-by: Umang Jain <uajain@igalia.com>\n> >\n> >> ---\n> >>  src/libcamera/sensor/camera_sensor.cpp | 3 ++-\n> >>  1 file changed, 2 insertions(+), 1 deletion(-)\n> >>\n> >> diff --git a/src/libcamera/sensor/camera_sensor.cpp b/src/libcamera/sensor/camera_sensor.cpp\n> >> index d19b5e2e..6f4a13fe 100644\n> >> --- a/src/libcamera/sensor/camera_sensor.cpp\n> >> +++ b/src/libcamera/sensor/camera_sensor.cpp\n> >> @@ -302,7 +302,8 @@ int CameraSensor::setEmbeddedDataEnabled(bool enable)\n> >>   * camera sensor, likely at configure() time.\n> >>   *\n> >>   * If the requested \\a orientation cannot be obtained, the \\a orientation\n> >> - * parameter is adjusted to report the current image orientation and\n> >> + * parameter is adjusted to report the native image orientation (i.e.\n> >> + * physical mounting orientation of the camera sensor) and\n> >\n> > I would say \"rotation\" for being consistent with the fact we use\n> > rotation for camera sensor, and orientation for images.\n> \n> I had written 'rotation' first, however changed it to 'orientation'\n> after looking at mountingOrientation_ in computeTransform().\n> \n> Perhaps that can be changed to mountingRotation_ as well.\n\nmountingOrientation_ is the orientation of the image resulting from the\nphysical rotation of the camera sensor:\n\n\tint32_t propertyValue = rotationControl->second.def().get<int32_t>();\n\n\t/*\n\t * Cache the Transform associated with the camera mounting\n\t * rotation for later use in computeTransform().\n\t */\n\tbool success;\n\tmountingOrientation_ = orientationFromRotation(propertyValue, &success);\n\nThe variable name therefore seems correct to me.\n\nWould the following be clearer ?\n\n * If the requested \\a orientation cannot be obtained, the \\a orientation\n * parameter is adjusted to report the native image orientation (i.e. resulting\n * from the physical mounting rotation of the camera sensor, without any\n * transformation) and Transform::Identity is returned.\n\n> > nit apart:\n> > Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>\n> >\n> >>   * Transform::Identity is returned.\n> >>   *\n> >>   * If the requested \\a orientation can be obtained, the function computes a","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 014B9BDCBF\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 25 Jun 2025 21:14:50 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id A67C068DF4;\n\tWed, 25 Jun 2025 23:14:49 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 9D53F61533\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 25 Jun 2025 23:14:48 +0200 (CEST)","from pendragon.ideasonboard.com (81-175-209-231.bb.dnainternet.fi\n\t[81.175.209.231])\n\tby perceval.ideasonboard.com (Postfix) with UTF8SMTPSA id 05C806F3;\n\tWed, 25 Jun 2025 23:14:29 +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=\"sMDFbcoG\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1750886070;\n\tbh=jIViPwpap7VDgYyRY2VpA0dje2k7uygM791vyHWsaR8=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=sMDFbcoG75GVadVb5LUXCkQoPuW4kAQs8obBQGUUsOFXAwTm/qQMIw5FrVHtBOeDn\n\tnSs2J5bXuDC5w1Z8o7Rx1Br59/2vWtJ+5J5ss1Cl5o3aX9rdCC4eiBwdTKzoj49I08\n\twYxZYgsGKEQjGcR4IdupAH+8s+b4A3zK7Jrajtos=","Date":"Thu, 26 Jun 2025 00:14:26 +0300","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Umang Jain <uajain@igalia.com>","Cc":"Jacopo Mondi <jacopo.mondi@ideasonboard.com>,\n\tlibcamera-devel@lists.libcamera.org","Subject":"Re: [PATCH] camera_sensor: Expand on computeTransform()\n\tdocumentation","Message-ID":"<20250625211426.GC32071@pendragon.ideasonboard.com>","References":"<20250625161458.31006-1-uajain@igalia.com>\n\t<vmnmq6fc23qy5v5csfiytc6qfasc6y6gb3pkxw7zjt56iwxy3k@c6nohno7sjn7>\n\t<346B8DBD-B412-4E0E-A4B7-269E71F03CBC@igalia.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","Content-Transfer-Encoding":"8bit","In-Reply-To":"<346B8DBD-B412-4E0E-A4B7-269E71F03CBC@igalia.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>"}}]