Re: [PATCHv4 0/5] media: uvcvideo: implement UVC 1.5 ROI

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

 



On 01/05/2021 03:58, Sergey Senozhatsky wrote:
> Hi Hans,
> 
> On (21/04/30 14:49), Hans Verkuil wrote:
>> Hi Sergey,
>>
>> On 30/04/2021 13:26, Sergey Senozhatsky wrote:
>>> Hello,
>>>
>>> 	This patch set implements UVC 1.5 ROI using v4l2_selection API.
>>
>> Is the selection API the right approach for this? Wouldn't it make
>> sense to use controls instead?
> 
> [..]
> 
>> If this was discussed before, then can you give a me pointer to that discussion?
>> I couldn't find anything for that, but I didn't look very long for it :-)
> 
> I believe Tomasz raised this question over IRC back in the days and there
> was no clear conclusion at the end: selection API vs control - 50/50 split.
> After internal discussions we decided to go with the selection API.
> 
>> In any case, it doesn't really feel like it is the right API for this job.
> 
> Well, we pass a rectangle to the driver. The driver already knows what
> to do with some of those rectangles, we teach it to handle one more. So
> we don't introduce anything new, but use the existing API instead.
> 

Yes, but this works for only one ROI since the Selection API has no provision
for rectangle arrays, but with the upcoming dynamic array control support this
is trivial for controls. In addition, controls are already integrated in the
Request API, so this will automatically work with requests as well.

I don't remember being involved in the irc discussion (if I was, I don't remember
it), and that discussion definitely did not know about dynamic arrays since that's
brand new and not even merged yet and may even precede the Request API depending
on how long ago the irc discussion was.

I think being able to provide multiple ROI rectangles is an obvious feature in
general, even if UVC currently supports only a single rectangle. Ditto for being
able to use them in a request. You get both for free when using controls.

Before I can accept this series I think I need to have feedback from others
why they believe the Selection API is the right API to use.

Regards,

	Hans



[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