Re: Adding a control for Sensor Orientation

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

 



On Sun, 15 Feb 2009, Mauro Carvalho Chehab wrote:
> 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;

HFLIP and VFLIP are only good for 0 and 180 degrees.  90 and 270 isn't the
same as flipping.

The problem I'm seeing here is that as people are using v4l2 for digital
cameras instead of tv capture there is more and more meta-data available.
Things like shutter speed, aperture, focus distance, and so on.  Just look
at all the EXIF data a digital camera provides.  Four bytes and two flags
are going to run out very quickly at this rate.

It's a shame there are not 8 bytes left, as then they could be used for a
pointer to an extended meta-data structure.
--
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