[libcamera-devel] [PATCH v3 4/8] libcamera: v4l2_subdevice: Update crop/compose rectangle
Kieran Bingham
kieran.bingham at ideasonboard.com
Wed Feb 27 00:35:16 CET 2019
Hi Jacopo,
On 26/02/2019 16:26, Jacopo Mondi wrote:
> Update the crop/compose rectangle provided to setCrop()/setCompose()
> methods with the rectangle sizes set by the device driver after a
> S_SELECTION ioctl operation.
>
> Signed-off-by: Jacopo Mondi <jacopo at jmondi.org>
> ---
> src/libcamera/v4l2_subdevice.cpp | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/src/libcamera/v4l2_subdevice.cpp b/src/libcamera/v4l2_subdevice.cpp
> index f81a521f9e2a..a043a07ff156 100644
> --- a/src/libcamera/v4l2_subdevice.cpp
> +++ b/src/libcamera/v4l2_subdevice.cpp
> @@ -385,6 +385,11 @@ int V4L2Subdevice::setSelection(unsigned int pad, unsigned int target,
> return ret;
> }
>
> + rect->y = sel.r.left;
> + rect->x = sel.r.top;
Hrm... am I crazy? or are the x/y coordinates swapped there.
X is horizontal, so it's the left value, right? (pun-intended).
Same comment applies to the sel being set earlier in the function?
> + rect->w = sel.r.width;
> + rect->h = sel.r.height;
> +
> return 0;
> }
>
>
--
Regards
--
Kieran
More information about the libcamera-devel
mailing list