[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YFQ4HuavL7R6VPha@google.com>
Date: Fri, 19 Mar 2021 14:35:26 +0900
From: Sergey Senozhatsky <senozhatsky@...omium.org>
To: Ricardo Ribalda <ribalda@...omium.org>
Cc: Ricardo Ribalda Delgado <ricardo.ribalda@...il.com>,
Laurent Pinchart <laurent.pinchart@...asonboard.com>,
Tomasz Figa <tfiga@...omium.org>,
Mauro Carvalho Chehab <mchehab@...nel.org>,
linux-media <linux-media@...r.kernel.org>,
LKML <linux-kernel@...r.kernel.org>,
Sergey Senozhatsky <senozhatsky@...omium.org>
Subject: Re: [PATCHv2 3/3] media: uvcvideo: add UVC 1.5 ROI control
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.
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");
---
Powered by blists - more mailing lists