lkml.org 
[lkml]   [2021]   [Mar]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCHv2 3/3] media: uvcvideo: add UVC 1.5 ROI control
Hi Sergey

On Fri, Mar 19, 2021 at 6:35 AM Sergey Senozhatsky
<senozhatsky@chromium.org> wrote:
>
> On (21/03/18 22:19), Ricardo Ribalda wrote:
> > >
> > > May I please ask for more opinions on this?
> >
> > Could you try setting the roi in a loop in your device and verify that
> > it accepts all the values with no modification. If so we can implement
> > the set/get as a quirk for other devices.
>
> Tested on two (very) different devices.

Ahoy, Matey ;)

That is great news. Thanks for testing this.


>
> Firmware D:
>
> CLAP all passed, we are cool
>
> Firmware H:
>
> CLAP all passed, we are cool
>
>
> Code sample
>
> ---
> in_selection.target = V4L2_SEL_TGT_ROI;
> in_selection.flags = V4L2_SEL_FLAG_ROI_AUTO_EXPOSURE;
>
> for (int i = 0; i < 1001; i++) {
> in_selection.r.left = 0 + i;
> in_selection.r.top = 0 + i;
> in_selection.r.width = 42 + i;
> in_selection.r.height = 42 + i;
>
> ret = doioctl(fd, VIDIOC_S_SELECTION, &in_selection);
> if (ret) {
> fprintf(stderr, "BOOM %d\n", ret);
> exit(1);
> }
>
> ret = doioctl(fd, VIDIOC_G_SELECTION, &in_selection);
> if (ret) {
> fprintf(stderr, "BANG %d\n", ret);
> exit(2);
> }
>
> if (in_selection.r.left != i ||
> in_selection.r.top != i ||
> in_selection.r.width != i + 42 ||
> in_selection.r.height != i + 42) {
>
> fprintf(stderr, "SNAP %d %d %d %d != %d %d %d %d\n",
> i, i, i + 42, i + 42,
> in_selection.r.left,
> in_selection.r.top,
> in_selection.r.width,
> in_selection.r.height);
> exit(3);
> }
> }
>
> fprintf(stderr, "CLAP all passed, we are cool\n");
> ---



--
Ricardo Ribalda

\
 
 \ /
  Last update: 2021-03-19 17:41    [W:0.078 / U:0.072 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site