Re: [PATCH v2] Documentation: media: *_DEFAULT targets for subdevs

From: Ricardo Ribalda Delgado
Date: Thu Oct 24 2019 - 09:43:58 EST


Hi Sakari

Lets say the user wants to select the active pixels. He needs to set
the crop and the compose.

1) he gets V4L2_SEL_TGT_CROP_DEFAULT

2) he sets V4L2_SEL_TGT_CROP

How does he knows which compose to use? What if the compose starts at
(0,0) instead of (32,32)....?

I think it is easier if

3) he gets V4L2_SEL_TGT_COMPOSE_DEFAULT

4) he sets V4L2_SEL_TGT_COMPOSE

This is similar as how we do it today with a v4l2_device. What if we
simply replicate that behaviour?


Best regards

On Thu, Oct 24, 2019 at 3:32 PM Sakari Ailus
<sakari.ailus@xxxxxxxxxxxxxxx> wrote:
>
> Hi Ricardo,
>
> On Thu, Oct 24, 2019 at 02:35:25PM +0200, Ricardo Ribalda Delgado wrote:
> > Some sensors have optical blanking areas, this is, pixels that are
> > painted and do not account for light, only noise.
> >
> > These special pixels are very useful for calibrating the sensor, but
> > should not be displayed on a DEFAULT target.
> >
> > Signed-off-by: Ricardo Ribalda Delgado <ribalda@xxxxxxxxxx>
> > ---
> >
> > v2: Changes by Sakari Ailus <sakari.ailus@xxxxxxxxxxxxxxx>
> >
> > Only change CROP_DEFAULT
> >
> > Documentation/media/uapi/v4l/v4l2-selection-targets.rst | 6 ++++--
> > 1 file changed, 4 insertions(+), 2 deletions(-)
> >
> > diff --git a/Documentation/media/uapi/v4l/v4l2-selection-targets.rst b/Documentation/media/uapi/v4l/v4l2-selection-targets.rst
> > index f74f239b0510..41c6674ec283 100644
> > --- a/Documentation/media/uapi/v4l/v4l2-selection-targets.rst
> > +++ b/Documentation/media/uapi/v4l/v4l2-selection-targets.rst
> > @@ -38,8 +38,10 @@ of the two interfaces they are used.
> > * - ``V4L2_SEL_TGT_CROP_DEFAULT``
> > - 0x0001
> > - Suggested cropping rectangle that covers the "whole picture".
> > + This includes only active pixels and excludes other non-active
> > + pixels such as black pixels.
> > + - Yes
> > - Yes
> > - - No
> > * - ``V4L2_SEL_TGT_CROP_BOUNDS``
> > - 0x0002
> > - Bounds of the crop rectangle. All valid crop rectangles fit inside
> > @@ -61,7 +63,7 @@ of the two interfaces they are used.
> > - 0x0101
> > - Suggested composition rectangle that covers the "whole picture".
> > - Yes
> > - - No
> > + - Yes
>
> This is COMPOSE_DEFAULT that wasn't meant to be changed. So with this chunk
> dropped,
>
> Acked-by: Sakari Ailus <sakari.ailus@xxxxxxxxxxxxxxx>
>
> > * - ``V4L2_SEL_TGT_COMPOSE_BOUNDS``
> > - 0x0102
> > - Bounds of the compose rectangle. All valid compose rectangles fit
>
> --
> Sakari Ailus
> sakari.ailus@xxxxxxxxxxxxxxx