Re: [PATCH v15 18/19] media: uvcvideo: implement UVC v1.5 ROI

From: Hans de Goede
Date: Mon Dec 09 2024 - 10:28:44 EST


Hi Ricardo,

On 9-Dec-24 4:23 PM, Ricardo Ribalda wrote:
> Hi Hans
>
> On Mon, 9 Dec 2024 at 15:22, Hans de Goede <hdegoede@xxxxxxxxxx> wrote:

<snip>

>>> diff --git a/include/uapi/linux/uvcvideo.h b/include/uapi/linux/uvcvideo.h
>>> index f86185456dc5..cbe15bca9569 100644
>>> --- a/include/uapi/linux/uvcvideo.h
>>> +++ b/include/uapi/linux/uvcvideo.h
>>> @@ -16,6 +16,7 @@
>>> #define UVC_CTRL_DATA_TYPE_BOOLEAN 3
>>> #define UVC_CTRL_DATA_TYPE_ENUM 4
>>> #define UVC_CTRL_DATA_TYPE_BITMASK 5
>>> +#define UVC_CTRL_DATA_TYPE_RECT 6
>>>
>>> /* Control flags */
>>> #define UVC_CTRL_FLAG_SET_CUR (1 << 0)
>>> @@ -38,6 +39,18 @@
>>>
>>> #define UVC_MENU_NAME_LEN 32
>>>
>>> +/* V4L2 driver-specific controls */
>>> +#define V4L2_CID_UVC_REGION_OF_INTEREST_RECT (V4L2_CID_USER_UVC_BASE + 1)
>>> +#define V4L2_CID_UVC_REGION_OF_INTEREST_AUTO (V4L2_CID_USER_UVC_BASE + 2)
>>> +#define V4L2_UVC_REGION_OF_INTEREST_AUTO_EXPOSURE (1 << 0)
>>> +#define V4L2_UVC_REGION_OF_INTEREST_AUTO_IRIS (1 << 1)
>>> +#define V4L2_UVC_REGION_OF_INTEREST_AUTO_WHITE_BALANCE (1 << 2)
>>> +#define V4L2_UVC_REGION_OF_INTEREST_AUTO_FOCUS (1 << 3)
>>> +#define V4L2_UVC_REGION_OF_INTEREST_AUTO_FACE_DETECT (1 << 4)
>>> +#define V4L2_UVC_REGION_OF_INTEREST_AUTO_DETECT_AND_TRACK (1 << 5)
>>> +#define V4L2_UVC_REGION_OF_INTEREST_AUTO_IMAGE_STABILIZATION (1 << 6)
>>> +#define V4L2_UVC_REGION_OF_INTEREST_AUTO_HIGHER_QUALITY (1 << 7)
>>> +
>>
>> Hmm, shoudn't these be standardized. At least the ROI rect control seems like
>> something which could be standardized ?
>
> I believe that back in 2022 we deciced to go with custom controls:
> https://lore.kernel.org/linux-media/a0fe2b49-12b7-8eaf-c3ef-7af1a247e595@xxxxxxxxx/

Ok that is good enough for me. I just wanted to make sure this was already looked
at as a possible generic ctrl.

Regards,

Hans