[{"id":4898,"web_url":"https://patchwork.libcamera.org/comment/4898/","msgid":"<20200525111621.GE27989@amd>","date":"2020-05-25T11:16:21","subject":"Re: [libcamera-devel] [PATCH v11 02/13] dt-bindings:\n\tvideo-interface: Replace 'rotation' description","submitter":{"id":49,"url":"https://patchwork.libcamera.org/api/people/49/","name":"Pavel Machek","email":"pavel@ucw.cz"},"content":"On Sat 2020-05-09 11:04:45, Jacopo Mondi wrote:\n> Replace the 'rotation' property description by providing a definition\n> relative to the camera sensor pixel array coordinate system and the\n> captured scene.\n> \n> Acked-by: Rob Herring <robh@kernel.org>\n> Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>\n> ---\n>  .../bindings/media/video-interfaces.txt       | 359 +++++++++++++++++-\n>  1 file changed, 356 insertions(+), 3 deletions(-)\n> \n> diff --git a/Documentation/devicetree/bindings/media/video-interfaces.txt b/Documentation/devicetree/bindings/media/video-interfaces.txt\n> index b1ff492c7da7a..3920f25a91235 100644\n> --- a/Documentation/devicetree/bindings/media/video-interfaces.txt\n> +++ b/Documentation/devicetree/bindings/media/video-interfaces.txt\n> @@ -85,9 +85,362 @@ Optional properties\n> \n>  - lens-focus: A phandle to the node of the focus lens controller.\n> \n> -- rotation: The device, typically an image sensor, is not mounted upright,\n> -  but a number of degrees counter clockwise. Typical values are 0 and 180\n> -  (upside down).\n> +- rotation: The camera rotation is expressed as the angular difference in\n> +  degrees between two reference systems, one relative to the camera module, and\n> +  one defined on the external world scene to be captured when projected on the\n> +  image sensor pixel array.\n\nSo.. how is this supposed to work. There's a phone, with its main\ncamera. It is designed to be used in both portrait and landscape\nmodes, internal accelerometr can tell between the two.\n\nPlus you have phone with a keyboard. Common usage is portrait with\nkeyboard closed, and landscape with keyboard open...\n\nAnd yes, there's linux with v4l2 working on Nokia N900.\n\nBest regards,\n\t\t\t\t\t\t\t\tPavel","headers":{"Return-Path":"<pavel@ucw.cz>","Received":["from jabberwock.ucw.cz (jabberwock.ucw.cz [46.255.230.98])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 829D6603D4\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 25 May 2020 13:16:22 +0200 (CEST)","by jabberwock.ucw.cz (Postfix, from userid 1017)\n\tid 2F0BA1C02C4; Mon, 25 May 2020 13:16:22 +0200 (CEST)"],"Date":"Mon, 25 May 2020 13:16:21 +0200","From":"Pavel Machek <pavel@ucw.cz>","To":"Jacopo Mondi <jacopo@jmondi.org>","Cc":"\"open list:MEDIA INPUT INFRASTRUCTURE (V4L/DVB)\"\n\t<linux-media@vger.kernel.org>, libcamera-devel@lists.libcamera.org,\n\tMauro Carvalho Chehab <mchehab@kernel.org>,\n\tHans Verkuil <hverkuil-cisco@xs4all.nl>,\n\tSakari Ailus <sakari.ailus@linux.intel.com>,\n\tLaurent Pinchart <laurent.pinchart@ideasonboard.com>,\n\tRob Herring <robh@kernel.org>, tfiga@google.com,\n\tdevicetree@vger.kernel.org","Message-ID":"<20200525111621.GE27989@amd>","References":"<20200509090456.3496481-1-jacopo@jmondi.org>\n\t<20200509090456.3496481-3-jacopo@jmondi.org>","MIME-Version":"1.0","Content-Type":"multipart/signed; micalg=pgp-sha1;\n\tprotocol=\"application/pgp-signature\"; boundary=\"2hMgfIw2X+zgXrFs\"","Content-Disposition":"inline","In-Reply-To":"<20200509090456.3496481-3-jacopo@jmondi.org>","User-Agent":"Mutt/1.5.23 (2014-03-12)","Subject":"Re: [libcamera-devel] [PATCH v11 02/13] dt-bindings:\n\tvideo-interface: Replace 'rotation' description","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>","X-List-Received-Date":"Mon, 25 May 2020 11:16:22 -0000"}},{"id":4900,"web_url":"https://patchwork.libcamera.org/comment/4900/","msgid":"<20200525124657.umnvfzpyo7moutp4@uno.localdomain>","date":"2020-05-25T12:46:57","subject":"Re: [libcamera-devel] [PATCH v11 02/13] dt-bindings:\n\tvideo-interface: Replace 'rotation' description","submitter":{"id":3,"url":"https://patchwork.libcamera.org/api/people/3/","name":"Jacopo Mondi","email":"jacopo@jmondi.org"},"content":"Pavel,\n\nOn Mon, May 25, 2020 at 01:16:21PM +0200, Pavel Machek wrote:\n> On Sat 2020-05-09 11:04:45, Jacopo Mondi wrote:\n> > Replace the 'rotation' property description by providing a definition\n> > relative to the camera sensor pixel array coordinate system and the\n> > captured scene.\n> >\n> > Acked-by: Rob Herring <robh@kernel.org>\n> > Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>\n> > ---\n> >  .../bindings/media/video-interfaces.txt       | 359 +++++++++++++++++-\n> >  1 file changed, 356 insertions(+), 3 deletions(-)\n> >\n> > diff --git a/Documentation/devicetree/bindings/media/video-interfaces.txt b/Documentation/devicetree/bindings/media/video-interfaces.txt\n> > index b1ff492c7da7a..3920f25a91235 100644\n> > --- a/Documentation/devicetree/bindings/media/video-interfaces.txt\n> > +++ b/Documentation/devicetree/bindings/media/video-interfaces.txt\n> > @@ -85,9 +85,362 @@ Optional properties\n> >\n> >  - lens-focus: A phandle to the node of the focus lens controller.\n> >\n> > -- rotation: The device, typically an image sensor, is not mounted upright,\n> > -  but a number of degrees counter clockwise. Typical values are 0 and 180\n> > -  (upside down).\n> > +- rotation: The camera rotation is expressed as the angular difference in\n> > +  degrees between two reference systems, one relative to the camera module, and\n> > +  one defined on the external world scene to be captured when projected on the\n> > +  image sensor pixel array.\n>\n> So.. how is this supposed to work. There's a phone, with its main\n> camera. It is designed to be used in both portrait and landscape\n> modes, internal accelerometr can tell between the two.\n>\n> Plus you have phone with a keyboard. Common usage is portrait with\n> keyboard closed, and landscape with keyboard open...\n>\n\nWhile I agree for 'orientation' we're far from perfection (and that's\nwhy I've been asked s/location/orientation/ to reserve 'location' for\nthe future), 'rotation' is only defined by the camera sensor mounting\nrotation and the external scene. The way you move your phone should\nnot impact the pixel read-out sequence.\n\nAll phones can be used in portarait or landscape mode, I don't see why\nhaving a mechanical keyboard is different. You can type in landscape\nmode on a touchscreen keyboard, if you like to.\n\nThe property gives you the rotation correction (actually, the control\ngives the correction) for display in the 'intended usage orientation'.\nIf your concern is displaying the image,  as you sense the\naccellerometers to rotate the UI, the application that display the\nimage will be rotated too, adding to the corrected image (capture image +\nrotation here specified) the required UI rotation.\n\nOn the 'intended usage orientation', as there is one for the UI, there\nis one for all other components in the phone, so if your system\nestablishes that 'portrait' is the (rotation = 0) point for the UI,\nthis applies to the rest of the system.\n\n> And yes, there's linux with v4l2 working on Nokia N900.\n>\n\nHow is this and orientation handled there ?\n\n\n> Best regards,\n> \t\t\t\t\t\t\t\tPavel\n> --\n> (english) http://www.livejournal.com/~pavelmachek\n> (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html","headers":{"Return-Path":"<jacopo@jmondi.org>","Received":["from relay12.mail.gandi.net (relay12.mail.gandi.net\n\t[217.70.178.232])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id CB0E9603D4\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 25 May 2020 14:43:40 +0200 (CEST)","from uno.localdomain (2-224-242-101.ip172.fastwebnet.it\n\t[2.224.242.101]) (Authenticated sender: jacopo@jmondi.org)\n\tby relay12.mail.gandi.net (Postfix) with ESMTPSA id E226720000B;\n\tMon, 25 May 2020 12:43:37 +0000 (UTC)"],"Date":"Mon, 25 May 2020 14:46:57 +0200","From":"Jacopo Mondi <jacopo@jmondi.org>","To":"Pavel Machek <pavel@ucw.cz>","Cc":"\"open list:MEDIA INPUT INFRASTRUCTURE (V4L/DVB)\"\n\t<linux-media@vger.kernel.org>, libcamera-devel@lists.libcamera.org,\n\tMauro Carvalho Chehab <mchehab@kernel.org>,\n\tHans Verkuil <hverkuil-cisco@xs4all.nl>,\n\tSakari Ailus <sakari.ailus@linux.intel.com>,\n\tLaurent Pinchart <laurent.pinchart@ideasonboard.com>,\n\tRob Herring <robh@kernel.org>, tfiga@google.com,\n\tdevicetree@vger.kernel.org","Message-ID":"<20200525124657.umnvfzpyo7moutp4@uno.localdomain>","References":"<20200509090456.3496481-1-jacopo@jmondi.org>\n\t<20200509090456.3496481-3-jacopo@jmondi.org>\n\t<20200525111621.GE27989@amd>","MIME-Version":"1.0","Content-Type":"multipart/signed; micalg=pgp-sha256;\n\tprotocol=\"application/pgp-signature\"; boundary=\"cozzvhkmmtid52ks\"","Content-Disposition":"inline","In-Reply-To":"<20200525111621.GE27989@amd>","Subject":"Re: [libcamera-devel] [PATCH v11 02/13] dt-bindings:\n\tvideo-interface: Replace 'rotation' description","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>","X-List-Received-Date":"Mon, 25 May 2020 12:43:41 -0000"}}]