Re: [PATCH v2 04/31] v4l: VIDIOC_SUBDEV_S_SELECTION and VIDIOC_SUBDEV_G_SELECTION IOCTLs

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

 



Hi Sylwester,

On Sat, Feb 04, 2012 at 11:37:38PM +0100, Sylwester Nawrocki wrote:
> On 02/04/2012 09:30 PM, Sakari Ailus wrote:
> >>> +#define V4L2_SUBDEV_SEL_FLAG_SIZE_GE			(1<<   0)
> >>> +#define V4L2_SUBDEV_SEL_FLAG_SIZE_LE			(1<<   1)
> >>> +#define V4L2_SUBDEV_SEL_FLAG_KEEP_CONFIG		(1<<   2)
> >>> +
> >>> +/* active cropping area */
> >>> +#define V4L2_SUBDEV_SEL_TGT_CROP_ACTIVE			0
> >>> +/* cropping bounds */
> >>> +#define V4L2_SUBDEV_SEL_TGT_CROP_BOUNDS			2
> >>
> >> You've dropped the DEFAULT targets but the target numbers stayed
> >> unchanged. How about using hex numbers ? e.g.
> >>
> >> #define V4L2_SUBDEV_SEL_TGT_COMPOSE_ACTIVE		0x0100
> >> #define V4L2_SUBDEV_SEL_TGT_COMPOSE_BOUNDS		0x0101
> > 
> > Fine for me. Changed for the next revision.
> > 
> > I wanted to keep the target numbers the same since we're still using
> > exactly the same as the V4L2.
> 
> You're right, keeping the numbers same for subdevs and regular video
> nodes may be important. I'm wondering whether we should use same
> definitions for subdevs, rather than inventing new ones ? In case we 
> associate the selection targets with controls some target identifiers
> must not actually be different. Whether the control belongs directly 
> to a video node control handler or is inherited from a sub-device the
> selection target would have to be same. I'm referring here to an auto
> focus rectangle selection target base for instance.
> I guess including videodev2.h from v4l2-subdev.h is not an option, if
> at all necessary ?

I think you're right; there would be advantages of using the same
definitions. On the other hand, there may be subtle and not so subtle
differences what these rectangles actually mean between the two interfaces.

The interface is quite similar to controls but the purpose it is used for is
quite different: not many interdependencies are expected with controls
whereas selections have many. The reason for this is we're using them to
control various kinds of image processing functionality which might not be
even similar on V4L2 subdev nodes and V4L2 nodes: the former is a superset
of the latter.

I'd like to have Laurent's opinion on this.

Regards,

-- 
Sakari Ailus
e-mail: sakari.ailus@xxxxxx	jabber/XMPP/Gmail: sailus@xxxxxxxxxxxxxx
--
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