Re: [PATCH v11 07/11] media: v4l2: document the usage of min/max for V4L2_CTRL_TYPE_RECT

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

 



On 26/04/2023 10:29, Yunke Cao wrote:
> Document the default implementation of min/max for rectangle controls.
> 
> Reviewed-by: Daniel Scally <dan.scally@xxxxxxxxxxxxxxxx>
> Signed-off-by: Yunke Cao <yunkec@xxxxxxxxxx>
> ---
> Changelog since v10:
> - Added Reviewed-by from Daniel.
> Changelog since v9:
> - No change.
> Changelog since v8:
> - New patch.
> 
>  Documentation/userspace-api/media/v4l/vidioc-queryctrl.rst | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/Documentation/userspace-api/media/v4l/vidioc-queryctrl.rst b/Documentation/userspace-api/media/v4l/vidioc-queryctrl.rst
> index 58982cd382e3..efa07428ba7a 100644
> --- a/Documentation/userspace-api/media/v4l/vidioc-queryctrl.rst
> +++ b/Documentation/userspace-api/media/v4l/vidioc-queryctrl.rst
> @@ -447,7 +447,11 @@ See also the examples in :ref:`control`.
>        - n/a
>        - A struct :c:type:`v4l2_rect`, containing a rectangle described by
>  	the position of its top-left corner, the width and the height. Units
> -	depend on the use case.
> +	depend on the use case. Use ``V4L2_CTRL_WHICH_MIN_VAL`` and
> +	``V4L2_CTRL_WHICH_MAX_VAL`` to query the range of rectangle sizes. The
> +	top-left corner of the minimum and maximum rectangles should be the
> +	same. For example, a control can have a minimum rectangle of 1x1@0x0 and
> +	a maximum of 640x480@0x0.

I am not sure that it is wise to document here how MIN/MAX_VAL work. This might
depend on the control itself. E.g. patch 11/11 nicely documents this for
V4L2_CID_UVC_REGION_OF_INTEREST_RECT.

I am actually in favor of dropping this patch altogether. Whether min/max is
supported and what it means has to be part of the actual control documentation
and not of the definition of the compound control type itself.

Regards,

	Hans

>      * - ``V4L2_CTRL_TYPE_H264_SPS``
>        - n/a
>        - n/a




[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