Re: Adding a control for Sensor Orientation

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

 



On Sun, 15 Feb 2009 10:29:03 +0100
Hans de Goede <hdegoede@xxxxxxxxxx> wrote:

> > I think we should also be able to detect 90 and 270 degree rotations. Or at 
> > the very least prepare for it. It's a safe bet to assume that webcams will 
> > arrive that can detect portrait vs landscape orientation.
> > 
> 
> Handling those (esp on the fly) will be rather hard as width and height then 
> get swapped. So lets worry about those when we need to. We will need an 
> additional flag for those cases anyways.
> 
The camera rotation is something that is already needed, at least on some
embedded devices, like those cellular phones whose display changes when you
rotate the device.

By looking at the v4l2_buffer struct, we currently have 4 reserved bytes. It
has also one flags field, with several bits not used. I can see 2 possibilities to extend the API:

1) adding V4L2_BUF_FLAG_HFLIP and V4L2_BUF_FLAG_VFLIP flags. This would work
for 90, 180 and 270 rotation;

2) spend a few bytes for storing the camera angle. If a camera have a precise
sensor, this could be used by some software to reduce the angle movements of a
moving camera. However, if we consider this case, we would also need to
consider other camera movements.

So, IMO, the two flags could be more appropriate.


Cheers,
Mauro
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[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