All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: Adding a control for Sensor Orientation
@ 2009-02-16  8:33 Hans Verkuil
  2009-02-16 22:36 ` Adam Baker
  0 siblings, 1 reply; 39+ messages in thread
From: Hans Verkuil @ 2009-02-16  8:33 UTC (permalink / raw)
  To: Hans de Goede
  Cc: kilgota, Trent Piepho, Adam Baker, linux-media,
	Jean-Francois Moine, Olivier Lorin


>
>
> kilgota@banach.math.auburn.edu wrote:
>>
>
> <huge snip>
>
>> Therefore,
>>
>> 1. Everyone seems to agree that the kernel module itself is not going to
>> do things like rotate or flip data even if a given supported device
>> always needs that done.
>>
>> However, this decision has a consequence:
>>
>> 2. Therefore, the module must send the information about what is needed
>> out of the module, to whatever place is going to deal with it.
>> Information which is known to the module but unknown anywere else must
>> be transmitted somehow.
>>
>> Now there is a further consequence:
>>
>> 3. In view of (1) and (2) there has to be a way agreed upon for the
>> module to pass the relevant information onward.
>>
>> It is precisely on item 3 that we are stuck right now. There is an
>> immediate need, not a theoretical need but an immediate need. However,
>> there is no agreed-upon method or convention for communication.
>>
>
> We are no longer stuck here, the general agreement is adding 2 new buffer
> flags, one to indicate the driver knows the data in the buffer is
> vflipped and one for hflip. Then we can handle v-flipped, h-flipped and
> 180
> degrees cameras
>
> This is agreed up on, Trent is arguing we may need more flags in the
> future,
> but that is something for the future, all we need know is these 2 flags
> and
> Hans Verkuil who AFAIK was the only one objecting to doing this with
> buffer
> flags has agreed this is the best solution.

Well, I just posted an alternative solution this morning (Hans probably
hadn't read it yet) which I want to see discussed first. I think it is a
better solution than this. Basically combining the best of two worlds
IMHO.

We are talking about a core change, so some careful thought should go into
this.

> So Adam, kilgota, please ignore the rest of this thread and move forward
> with
> the driver, just add the necessary buffer flags to videodev2.h as part of
> your
> patch (It is usually to submit new API stuff with the same patch which
> introduces the first users of this API.

Don't ignore it yet :-)

Regards,

       Hans

> I welcome libv4l patches to use these flags.
>
> Regards,
>
> Hans
>


-- 
Hans Verkuil - video4linux developer - sponsored by TANDBERG


^ permalink raw reply	[flat|nested] 39+ messages in thread
* Re: Adding a control for Sensor Orientation
@ 2009-02-16 14:00 Hans Verkuil
  2009-02-16 14:25 ` Hans de Goede
  2009-02-16 16:09 ` Trent Piepho
  0 siblings, 2 replies; 39+ messages in thread
From: Hans Verkuil @ 2009-02-16 14:00 UTC (permalink / raw)
  To: Hans de Goede
  Cc: Trent Piepho, Mauro Carvalho Chehab, kilgota, Adam Baker,
	linux-media, Jean-Francois Moine, Olivier Lorin

>> If you want to add two bits with
>> mount information, feel free. But don't abuse them for pivot
>> information.
>> If you want that, then add another two bits for the rotation:
>>
>> #define V4L2_BUF_FLAG_VFLIP     0x0400
>> #define V4L2_BUF_FLAG_HFLIP     0x0800
>>
>> #define V4L2_BUF_FLAG_PIVOT_0   0x0000
>> #define V4L2_BUF_FLAG_PIVOT_90  0x1000
>> #define V4L2_BUF_FLAG_PIVOT_180 0x2000
>> #define V4L2_BUF_FLAG_PIVOT_270 0x3000
>> #define V4L2_BUF_FLAG_PIVOT_MSK 0x3000
>>
>
> Ok, this seems good. But if we want to distinguish between static sensor
> mount
> information, and dynamic sensor orientation changing due to pivotting,
> then I
> think we should only put the pivot flags in the buffer flags, and the
> static
> flags should be in the VIDIOC_QUERYCAP capabilities flag, what do you
> think of
> that?

That's for driver global information. This type of information is
input-specific (e.g. input 1 might be from an S-Video input and does not
require v/hflip, and input 2 is from a sensor and does require v/hflip).
So struct v4l2_input seems a good place for it.

Looking at v4l2_input there is a status field, but the status information
is valid for the current input only. We can:

1) add flags here and only set the mounting information for the current
input,

2) add flags here and document that these flags are valid for any input,
not just the current, or:

3) take one of the reserved fields and turn that into a 'flags' field that
can be used for static info about the input.

To be honest, I prefer 3.

The same can be done for v4l2_output should it become necessary in the
future.

Actually, pivot information could be stored here as well. Doing that makes
it possible to obtain the orientation without needing to start a capture,
and makes it possible to be used (although awkwardly) with the read()
interface.

You still want to report this information in v4l2_buffer as well since it
can change on the fly.

Regards,

       Hans

-- 
Hans Verkuil - video4linux developer - sponsored by TANDBERG


^ permalink raw reply	[flat|nested] 39+ messages in thread
* Re: Adding a control for Sensor Orientation
@ 2009-02-16 12:02 Hans Verkuil
  0 siblings, 0 replies; 39+ messages in thread
From: Hans Verkuil @ 2009-02-16 12:02 UTC (permalink / raw)
  To: Jean-Francois Moine
  Cc: Hans de Goede, Trent Piepho, Mauro Carvalho Chehab, kilgota,
	Adam Baker, linux-media, Olivier Lorin


> On Mon, 16 Feb 2009 12:01:14 +0100 (CET)
> "Hans Verkuil" <hverkuil@xs4all.nl> wrote:
>
>> Anyone can add an API in 5 seconds. It's modifying or removing a bad
>> API that worries me as that can take years. If you want to add two
>> bits with mount information, feel free. But don't abuse them for
>> pivot information. If you want that, then add another two bits for
>> the rotation:
>>
>> #define V4L2_BUF_FLAG_VFLIP     0x0400
>> #define V4L2_BUF_FLAG_HFLIP     0x0800
>>
>> #define V4L2_BUF_FLAG_PIVOT_0   0x0000
>> #define V4L2_BUF_FLAG_PIVOT_90  0x1000
>> #define V4L2_BUF_FLAG_PIVOT_180 0x2000
>> #define V4L2_BUF_FLAG_PIVOT_270 0x3000
>> #define V4L2_BUF_FLAG_PIVOT_MSK 0x3000
>
> Hi,
>
> HFLIP + VFLIP = PIVOT_180
>
> then
>
> #define V4L2_BUF_FLAG_PIVOT_180 0x0c00

This makes it impossible for an application to see the difference between
an upside-down mounted sensor and a 180-degrees pivoted camera. In
addition, there may be sensors that are not upside-down, but only
V-flipped (or only H-flipped).

All this seems so simple, but it really isn't. This is something for an
RFC, posted and discussed both here and at least the linux-omap list, as
the input from the people who are working on those embedded systems will
be very valuable.

And what about output devices? E.g. LCDs? These too can be mounted
upside-down or rotated. You won't encounter this situation on a PC, but it
is another matter in the embedded space. Any API should by preference be
usable both for capture and output.

Regards,

        Hans

-- 
Hans Verkuil - video4linux developer - sponsored by TANDBERG


^ permalink raw reply	[flat|nested] 39+ messages in thread
* Re: Adding a control for Sensor Orientation
@ 2009-02-16 11:01 Hans Verkuil
  2009-02-16 11:12 ` Jean-Francois Moine
  2009-02-16 12:07 ` Hans de Goede
  0 siblings, 2 replies; 39+ messages in thread
From: Hans Verkuil @ 2009-02-16 11:01 UTC (permalink / raw)
  To: Hans de Goede
  Cc: Trent Piepho, Mauro Carvalho Chehab, kilgota, Adam Baker,
	linux-media, Jean-Francois Moine, Olivier Lorin

Hi Hans,

> Agreed, and that is not what we are doing, we are only talking mount
> information here.
>
> Lets please keep pivot out of the discussion entirely. Esp the whole
> handheld
> case, notice that the handheld case will have to be handled at the
> application
> level anyways, as the portrait versus landscape detection sensor will not
> be
> part of the cam, but will be handled by the kernel input subsystem.
>
> The problems we are *currently* trying to deal with are 3 things:
>
>
> 1) Some (web)cams have their sensors mounted upside down and some laptops
> have
>     their webcam module entirely mounted upside down
>
> This is a known and solved problem. These webcams have well known usb-ID's
> and
> in the laptop case this get complemented by DMI info as one module type
> (so one
> USB-id) may be mounted correctly in one laptop model and upside down in
> another.
>
> I've discussed this with Laurent Pinchart (and other webcam driver
> authors) and
> the conclusion was that having a table of USB-ID's + DMI strings in the
> driver,
> and design an API to tell userspace to sensor is upside down and have code
> for
> all this both in the driver and in userspace makes no sense. Esp since
> such a
> table will probably be more easy to update in userspace too. So the
> conclusion
> was to just put the entire table of cams with known upside down mounted
> sensors
> in userspace. This is currently in libv4l and making many philips webcam
> users
> happy (philips has a tendency to mount the sensor upside down).
>
> A special case here is if the driver can do flipping in hardware, in this
> case
> (which is rarer then we would like), the driver keeps the table itself and
> simply inverts the meaning of the v and h flip controls so userspace will
> never
> notice anything, this is what the m5602 driver does.

Very nice. I agree completely.

> 2) The new sq905X driver being worked on has the problem that all devices
> have
> the same USB-ID, and some model string or id is read in a sq905 specific
> way
> over usb and the sensor orientation differs from model.
>
> So we need an API to relay this information to userspace, and specifically
> to
> libv4l, so it can correct the orientation in software.
>
> If you look at the amount of code needed here to relay this information
> using a
> control at both the kernel and userspace side this is ridiculous we are
> talking
> about a shitload of code to transport 2 bits from kernel space to
> userspace.
> Adding a new ioctl just for this would be less code.
>
> Also read-only versions of existing controls are definitively not the
> answer
> here. read-only already has a well defined meaning, lets not overload that
> and
> add all kind of vagueness to our API. API's need to be clear, well and
> precisely defined!

OK.

> The discussion on solving the sq905X case was wide open until 3 came
> along:
>
>
> 3) There is a cam which can be clicked on for example the top of a
> notebook
> screen, and then can be flipped over the screen to film someone who is not
> behind the keyboard, but on the other (back) side of the notebook screen.
> This
> flipping happens over the X axis, causing the image to be upside down,
> this cam
> has a built-in sensor to detect this (and only this, its a 1 bit sensor).
>
> Since we want to be able to correct this in software (in libv4l) on the
> fly,
> the idea was born to add vflip and hflip flags to the v4l buffer flags, as
> polling some control for this is too ugly for words. This also gave us a
> nice
> simple KISS solution for problem 2.

OK, I'm fine with using two hflip/vflip bits to tell the mount position.

> So all this has nothing to do with pivotting, case 3 could be seen as a
> very
> special case of pivotting, but it is really just a case of the becoming
> mounted
> upside down on the fly. and there certainly is no 90 degrees rotation (or
> any
> rotation other then 180 degrees) involved in this anywhere. That is a
> different
>   (much harder) problem, which needs to be solved at the application level
> as
> width and height will change.

Case 3 *is* pivoting. That's a separate piece of information from the
mount position. All I want is that that is administrated in separate bits.
And if we do this, do it right and support the reporting of 0, 90, 180 and
270 degrees. No one expects libv4l to handle the portrait modes, and apps
that can handle this will probably not use libv4l at all.

> Now can we please stop this color of the bikeshed discussion, add the 2
> damn
> flags and move forward?

Anyone can add an API in 5 seconds. It's modifying or removing a bad API
that worries me as that can take years. If you want to add two bits with
mount information, feel free. But don't abuse them for pivot information.
If you want that, then add another two bits for the rotation:

#define V4L2_BUF_FLAG_VFLIP     0x0400
#define V4L2_BUF_FLAG_HFLIP     0x0800

#define V4L2_BUF_FLAG_PIVOT_0   0x0000
#define V4L2_BUF_FLAG_PIVOT_90  0x1000
#define V4L2_BUF_FLAG_PIVOT_180 0x2000
#define V4L2_BUF_FLAG_PIVOT_270 0x3000
#define V4L2_BUF_FLAG_PIVOT_MSK 0x3000

Regards,

        Hans

-- 
Hans Verkuil - video4linux developer - sponsored by TANDBERG


^ permalink raw reply	[flat|nested] 39+ messages in thread
* Re: Adding a control for Sensor Orientation
@ 2009-02-16  9:07 Hans Verkuil
  2009-02-16  9:44 ` Hans de Goede
  0 siblings, 1 reply; 39+ messages in thread
From: Hans Verkuil @ 2009-02-16  9:07 UTC (permalink / raw)
  To: Hans Verkuil
  Cc: Hans de Goede, Trent Piepho, Mauro Carvalho Chehab, kilgota,
	Adam Baker, linux-media, Jean-Francois Moine, Olivier Lorin


>
>>
>>
>> Hans Verkuil wrote:
>>> On Monday 16 February 2009 05:04:40 Trent Piepho wrote:
>>>> On Sun, 15 Feb 2009, Mauro Carvalho Chehab wrote:
>>>>> On Sun, 15 Feb 2009 10:29:03 +0100
>>>>>
>>>>> Hans de Goede <hdegoede@redhat.com> 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.
>>>
>>> I think we have to distinguish between two separate types of data:
>>> fixed
>>> ('the sensor is mounted upside-down', or 'the sensor always requires a
>>> hflip/vflip') and dynamic ('the user pivoted the camera 270 degrees').
>>>
>>> The first is static data and I think we can just reuse the existing
>>> HFLIP/VFLIP controls: just make them READONLY to tell libv4l that
>>> libv4l
>>> needs to do the flipping.
>>>
>>> The second is dynamic data and should be passed through v4l2_buffer
>>> since
>>> this can change on a per-frame basis. In this case add two bits to the
>>> v4l2_buffer's flags field:
>>>
>>> V4L2_BUF_FLAG_ROTATION_MSK	0x0c00
>>> V4L2_BUF_FLAG_ROTATION_0	0x0000
>>> V4L2_BUF_FLAG_ROTATION_90	0x0400
>>> V4L2_BUF_FLAG_ROTATION_180	0x0800
>>> V4L2_BUF_FLAG_ROTATION_270	0x0c00
>>>
>>> No need to use the reserved field.
>>>
>>> This makes a lot more sense to me: static (or rarely changing) data
>>> does
>>> not
>>> belong to v4l2_buffer, that's what controls are for. And something
>>> dynamic
>>> like pivoting belongs to v4l2_buffer. This seems like a much cleaner
>>> API
>>> to
>>> me.
>>
>> I agree that we have static and dynamic camera properties, and that we
>> may
>> want
>>   to have 2 API's for them. I disagree the control API is the proper API
>> to
>> expose static properties, many existing applications will not handle
>> this
>> well.
>
> ??? And they will when exposed through v4l2_buffer? It's all new
> functionality, so that is a non-argument. The point is that libv4l has to
> be able to detect and handle oddly mounted sensors. It can do that easily
> through the already existing HFLIP/VFLIP controls. It's a one time check
> when the device is opened (does it have read-only H/VFLIP controls? If so,
> then libv4l knows it has to correct).
>
> Completely independent from that is the camera pivot: this is dynamic and
> while by default libv4l may be called upon to handle this, it should also
> be possible to disable this in libv4l by the application.
>
> You should definitely not mix pivoting information with sensor mount
> information: e.g. if you see hflip and vflip bits set, does that mean that
> the sensor is mounted upside down? Or that the camera is pivoted 180
> degrees? That's two different things.
>
>> More over in the case we are discussing now, we have one type of data
>> (sensor
>> orientation) which can be both static or dynamic depending on the camera
>> having
>> 2 API's for this is just plain silly. Thus unnecessarily complicates
>> things if
>> some camera property can be static in some cases and dynamic in others
>> then we
>> should just always treat it as dynamic. This way we will only have one
>> code
>> path to deal with instead of two (with very interesting interactions
>> also,
>> what
>> if both API's sat rotate 180 degrees, should we then not rotate at
>> all?).
>> This
>> way lies madness.
>
> I strongly disagree. Yes, if both sensor mount info and pivot info is
> handled completely inside libv4l, then indeed it doesn't have to rotate at
> all. But the application probably still wants to know that the user
> rotated the camera 180 degrees, if only to be able to report this
> situation. And this is of course even more important for the 90 and 270
> degree rotations (think handhelds).
>
>> My conclusion:
>> 1) Since rotation can be dynamic store it in the buffer flags
>
> Ack. But rotation != sensor mount position.
>
>> 2) In the future we will most likely need an API to be able to query
>> camera
>>     properties
>
> For sensor mount position we have them in the form of HFLIP/VFLIP readonly
> controls. One-time check, simple to use.
>
> I'd like some more input on this from other people as well.

An additional comment: I'm willing to consider having both hflip/vflip
bits and rotate bits in v4l2_buffer (although I think it is not the best
solution), or a separate CAM_SENSOR_MOUNT control conveying the sensor
mount information. But don't mix mount and pivot info.

Regards,

        Hans

-- 
Hans Verkuil - video4linux developer - sponsored by TANDBERG


^ permalink raw reply	[flat|nested] 39+ messages in thread
* Re: Adding a control for Sensor Orientation
@ 2009-02-16  8:57 Hans Verkuil
  0 siblings, 0 replies; 39+ messages in thread
From: Hans Verkuil @ 2009-02-16  8:57 UTC (permalink / raw)
  To: Hans de Goede
  Cc: Trent Piepho, Mauro Carvalho Chehab, kilgota, Adam Baker,
	linux-media, Jean-Francois Moine, Olivier Lorin


>
>
> Hans Verkuil wrote:
>> On Monday 16 February 2009 05:04:40 Trent Piepho wrote:
>>> On Sun, 15 Feb 2009, Mauro Carvalho Chehab wrote:
>>>> On Sun, 15 Feb 2009 10:29:03 +0100
>>>>
>>>> Hans de Goede <hdegoede@redhat.com> 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.
>>
>> I think we have to distinguish between two separate types of data: fixed
>> ('the sensor is mounted upside-down', or 'the sensor always requires a
>> hflip/vflip') and dynamic ('the user pivoted the camera 270 degrees').
>>
>> The first is static data and I think we can just reuse the existing
>> HFLIP/VFLIP controls: just make them READONLY to tell libv4l that libv4l
>> needs to do the flipping.
>>
>> The second is dynamic data and should be passed through v4l2_buffer
>> since
>> this can change on a per-frame basis. In this case add two bits to the
>> v4l2_buffer's flags field:
>>
>> V4L2_BUF_FLAG_ROTATION_MSK	0x0c00
>> V4L2_BUF_FLAG_ROTATION_0	0x0000
>> V4L2_BUF_FLAG_ROTATION_90	0x0400
>> V4L2_BUF_FLAG_ROTATION_180	0x0800
>> V4L2_BUF_FLAG_ROTATION_270	0x0c00
>>
>> No need to use the reserved field.
>>
>> This makes a lot more sense to me: static (or rarely changing) data does
>> not
>> belong to v4l2_buffer, that's what controls are for. And something
>> dynamic
>> like pivoting belongs to v4l2_buffer. This seems like a much cleaner API
>> to
>> me.
>
> I agree that we have static and dynamic camera properties, and that we may
> want
>   to have 2 API's for them. I disagree the control API is the proper API
> to
> expose static properties, many existing applications will not handle this
> well.

??? And they will when exposed through v4l2_buffer? It's all new
functionality, so that is a non-argument. The point is that libv4l has to
be able to detect and handle oddly mounted sensors. It can do that easily
through the already existing HFLIP/VFLIP controls. It's a one time check
when the device is opened (does it have read-only H/VFLIP controls? If so,
then libv4l knows it has to correct).

Completely independent from that is the camera pivot: this is dynamic and
while by default libv4l may be called upon to handle this, it should also
be possible to disable this in libv4l by the application.

You should definitely not mix pivoting information with sensor mount
information: e.g. if you see hflip and vflip bits set, does that mean that
the sensor is mounted upside down? Or that the camera is pivoted 180
degrees? That's two different things.

> More over in the case we are discussing now, we have one type of data
> (sensor
> orientation) which can be both static or dynamic depending on the camera
> having
> 2 API's for this is just plain silly. Thus unnecessarily complicates
> things if
> some camera property can be static in some cases and dynamic in others
> then we
> should just always treat it as dynamic. This way we will only have one
> code
> path to deal with instead of two (with very interesting interactions also,
> what
> if both API's sat rotate 180 degrees, should we then not rotate at all?).
> This
> way lies madness.

I strongly disagree. Yes, if both sensor mount info and pivot info is
handled completely inside libv4l, then indeed it doesn't have to rotate at
all. But the application probably still wants to know that the user
rotated the camera 180 degrees, if only to be able to report this
situation. And this is of course even more important for the 90 and 270
degree rotations (think handhelds).

> My conclusion:
> 1) Since rotation can be dynamic store it in the buffer flags

Ack. But rotation != sensor mount position.

> 2) In the future we will most likely need an API to be able to query
> camera
>     properties

For sensor mount position we have them in the form of HFLIP/VFLIP readonly
controls. One-time check, simple to use.

I'd like some more input on this from other people as well.

Regards,

     Hans

-- 
Hans Verkuil - video4linux developer - sponsored by TANDBERG


^ permalink raw reply	[flat|nested] 39+ messages in thread
* Adding a control for Sensor Orientation
@ 2009-02-14 20:48 Adam Baker
  2009-02-14 21:04 ` Hans Verkuil
  2009-02-14 21:55 ` Hans de Goede
  0 siblings, 2 replies; 39+ messages in thread
From: Adam Baker @ 2009-02-14 20:48 UTC (permalink / raw)
  To: linux-media
  Cc: Jean-Francois Moine, kilgota, Hans Verkuil, Olivier Lorin, Hans de Goede

Hi all,

Hans Verkuil put forward a convincing argument that sensor orientation 
shouldn't be part of the buffer flags as then it would be unavailable to 
clients that use read() so it looks like implementing a read only control is 
the only appropriate option.

It seems that Sensor Orientation is an attribute that many cameras may want to 
expose so it shouldn't be a private control. Olivier Lorin's example patch 
created a new CAMERA_PROPERTIES class. I'm not sure that a new class is 
really justified so would like to hear other views on where the control 
should live (and also if everyone is happy with Hans Verkuil's suggested name 
of SENSOR_ORIENTATION which I prefer to Olivier Lorin's SENSOR_UPSIDE_DOWN as 
we want to represent HFLIP and VFLIP as well as upside down (which as 
currently implemented means 180 degree rotation.))

Assuming that it is considered inappropriate to add a new control as 
an "Old-style 'user' control" then it is also, I presume, necessary to extend 
gspca to support VIDIOC_G_EXT_CTRLS as at the moment it requires all control 
access to use VIDIOC_G_CTRL. Would doing this conflict with anything anyone 
else may be working on such as conversion to use v4l2_device.

Thoughts please.

Adam Baker

^ permalink raw reply	[flat|nested] 39+ messages in thread

end of thread, other threads:[~2009-02-17 22:29 UTC | newest]

Thread overview: 39+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-02-16  8:33 Adding a control for Sensor Orientation Hans Verkuil
2009-02-16 22:36 ` Adam Baker
2009-02-17  2:00   ` kilgota
2009-02-17  7:27     ` Hans Verkuil
2009-02-17 22:29       ` Adam Baker
  -- strict thread matches above, loose matches on Subject: below --
2009-02-16 14:00 Hans Verkuil
2009-02-16 14:25 ` Hans de Goede
2009-02-16 16:09 ` Trent Piepho
2009-02-16 12:02 Hans Verkuil
2009-02-16 11:01 Hans Verkuil
2009-02-16 11:12 ` Jean-Francois Moine
2009-02-16 12:07 ` Hans de Goede
2009-02-16  9:07 Hans Verkuil
2009-02-16  9:44 ` Hans de Goede
2009-02-16 11:11   ` Mauro Carvalho Chehab
2009-02-16 12:19     ` Hans de Goede
2009-02-16 14:20       ` Mauro Carvalho Chehab
2009-02-16 15:00       ` Mauro Carvalho Chehab
2009-02-16 15:24         ` Hans de Goede
2009-02-16  8:57 Hans Verkuil
2009-02-14 20:48 Adam Baker
2009-02-14 21:04 ` Hans Verkuil
2009-02-14 21:55 ` Hans de Goede
2009-02-14 21:59   ` Hans Verkuil
2009-02-14 22:44     ` kilgota
2009-02-15  9:08       ` Hans de Goede
2009-02-15  9:19         ` Hans Verkuil
2009-02-15  9:29           ` Hans de Goede
2009-02-15 13:03             ` Trent Piepho
2009-02-15 13:46               ` Hans de Goede
2009-02-15 23:09                 ` Trent Piepho
2009-02-16  1:46                   ` kilgota
2009-02-16  3:47                     ` hermann pitton
2009-02-16  3:55                     ` Trent Piepho
2009-02-16  8:30                     ` Hans de Goede
2009-02-16  2:26             ` Mauro Carvalho Chehab
2009-02-16  4:04               ` Trent Piepho
2009-02-16  7:44                 ` Hans Verkuil
2009-02-16  8:37                   ` Hans de Goede

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.