Re: [PATCH v11 02/13] dt-bindings: video-interface: Replace 'rotation' description

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
> > Signed-off-by: Jacopo Mondi <jacopo@xxxxxxxxxx>
> > ---
> >  .../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: signature.asc
Description: PGP signature


[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux