All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jacopo Mondi <jacopo@jmondi.org>
To: Pavel Machek <pavel@ucw.cz>
Cc: "open list:MEDIA INPUT INFRASTRUCTURE (V4L/DVB)" 
	<linux-media@vger.kernel.org>,
	libcamera-devel@lists.libcamera.org,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	Hans Verkuil <hverkuil-cisco@xs4all.nl>,
	Sakari Ailus <sakari.ailus@linux.intel.com>,
	Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
	Rob Herring <robh@kernel.org>,
	tfiga@google.com, devicetree@vger.kernel.org
Subject: Re: [PATCH v11 02/13] dt-bindings: video-interface: Replace 'rotation' description
Date: Mon, 25 May 2020 14:46:57 +0200	[thread overview]
Message-ID: <20200525124657.umnvfzpyo7moutp4@uno.localdomain> (raw)
In-Reply-To: <20200525111621.GE27989@amd>

[-- Attachment #1: Type: text/plain, Size: 3193 bytes --]

Pavel,

On Mon, May 25, 2020 at 01:16:21PM +0200, Pavel Machek wrote:
> On Sat 2020-05-09 11:04:45, Jacopo Mondi wrote:
> > Replace the 'rotation' property description by providing a definition
> > relative to the camera sensor pixel array coordinate system and the
> > captured scene.
> >
> > Acked-by: Rob Herring <robh@kernel.org>
> > Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
> > ---
> >  .../bindings/media/video-interfaces.txt       | 359 +++++++++++++++++-
> >  1 file changed, 356 insertions(+), 3 deletions(-)
> >
> > diff --git a/Documentation/devicetree/bindings/media/video-interfaces.txt b/Documentation/devicetree/bindings/media/video-interfaces.txt
> > index b1ff492c7da7a..3920f25a91235 100644
> > --- a/Documentation/devicetree/bindings/media/video-interfaces.txt
> > +++ b/Documentation/devicetree/bindings/media/video-interfaces.txt
> > @@ -85,9 +85,362 @@ Optional properties
> >
> >  - lens-focus: A phandle to the node of the focus lens controller.
> >
> > -- rotation: The device, typically an image sensor, is not mounted upright,
> > -  but a number of degrees counter clockwise. Typical values are 0 and 180
> > -  (upside down).
> > +- rotation: The camera rotation is expressed as the angular difference in
> > +  degrees between two reference systems, one relative to the camera module, and
> > +  one defined on the external world scene to be captured when projected on the
> > +  image sensor pixel array.
>
> So.. how is this supposed to work. There's a phone, with its main
> camera. It is designed to be used in both portrait and landscape
> modes, internal accelerometr can tell between the two.
>
> Plus you have phone with a keyboard. Common usage is portrait with
> keyboard closed, and landscape with keyboard open...
>

While I agree for 'orientation' we're far from perfection (and that's
why I've been asked s/location/orientation/ to reserve 'location' for
the future), 'rotation' is only defined by the camera sensor mounting
rotation and the external scene. The way you move your phone should
not impact the pixel read-out sequence.

All phones can be used in portarait or landscape mode, I don't see why
having a mechanical keyboard is different. You can type in landscape
mode on a touchscreen keyboard, if you like to.

The property gives you the rotation correction (actually, the control
gives the correction) for display in the 'intended usage orientation'.
If your concern is displaying the image,  as you sense the
accellerometers to rotate the UI, the application that display the
image will be rotated too, adding to the corrected image (capture image +
rotation here specified) the required UI rotation.

On the 'intended usage orientation', as there is one for the UI, there
is one for all other components in the phone, so if your system
establishes that 'portrait' is the (rotation = 0) point for the UI,
this applies to the rest of the system.

> And yes, there's linux with v4l2 working on Nokia N900.
>

How is this and orientation handled there ?


> Best regards,
> 								Pavel
> --
> (english) http://www.livejournal.com/~pavelmachek
> (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html



[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2020-05-25 12:43 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-09  9:04 [PATCH v11 00/13] media: report camera properties Jacopo Mondi
2020-05-09  9:04 ` [PATCH v11 01/13] dt-bindings: video-interfaces: Document 'orientation' property Jacopo Mondi
2020-05-25 11:13   ` Pavel Machek
2020-05-09  9:04 ` [PATCH v11 02/13] dt-bindings: video-interface: Replace 'rotation' description Jacopo Mondi
2020-05-25 11:16   ` Pavel Machek
2020-05-25 12:46     ` Jacopo Mondi [this message]
2020-05-09  9:04 ` [PATCH v11 03/13] media: v4l2-ctrl: Document V4L2_CID_CAMERA_ORIENTATION Jacopo Mondi
2020-05-09  9:04 ` [PATCH v11 04/13] media: v4l2-ctrl: Document V4L2_CID_CAMERA_SENSOR_ROTATION Jacopo Mondi
2020-05-09  9:04 ` [PATCH v11 05/13] media: v4l2-ctrls: Add camera orientation and rotation Jacopo Mondi
2020-05-09  9:04 ` [PATCH v11 06/13] media: v4l2-fwnode: Add helper to parse device properties Jacopo Mondi
2020-05-09  9:04 ` [PATCH v11 07/13] include: v4l2-ctrl: Sort forward declarations Jacopo Mondi
2020-05-09  9:04 ` [PATCH v11 08/13] media: v4l2-ctrls: Sort includes alphabetically Jacopo Mondi
2020-05-09  9:04 ` [PATCH v11 09/13] media: v4l2-ctrls: Add helper to register properties Jacopo Mondi
2020-05-09  9:04 ` [PATCH v11 10/13] media: i2c: ov5670: Parse and " Jacopo Mondi
2020-05-09  9:04 ` [PATCH v11 11/13] media: i2c: ov13858: " Jacopo Mondi
2020-05-09  9:04 ` [PATCH v11 12/13] media: i2c: imx219: " Jacopo Mondi
2020-05-09  9:04 ` [PATCH v11 13/13] dt-bindings: Add media properties Jacopo Mondi
2020-05-11  7:27   ` Hans Verkuil
2020-05-20  7:52     ` Jacopo Mondi
2020-06-24 13:46       ` Hans Verkuil
2020-05-18 18:21   ` Rob Herring

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200525124657.umnvfzpyo7moutp4@uno.localdomain \
    --to=jacopo@jmondi.org \
    --cc=devicetree@vger.kernel.org \
    --cc=hverkuil-cisco@xs4all.nl \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=libcamera-devel@lists.libcamera.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=pavel@ucw.cz \
    --cc=robh@kernel.org \
    --cc=sakari.ailus@linux.intel.com \
    --cc=tfiga@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.