All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sergey Senozhatsky <senozhatsky@chromium.org>
To: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
Cc: Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>,
	Sergey Senozhatsky <sergey.senozhatsky@gmail.com>,
	Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
	Tomasz Figa <tomasz.figa@gmail.com>,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	linux-media <linux-media@vger.kernel.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Sergey Senozhatsky <senozhatsky@chromium.org>,
	Ricardo Ribalda <ribalda@chromium.org>
Subject: Re: [PATCHv2 1/3] media: v4l UAPI docs: document ROI selection targets
Date: Wed, 17 Mar 2021 17:08:52 +0900	[thread overview]
Message-ID: <YFG5FA/9QEGKq+V9@google.com> (raw)
In-Reply-To: <CAPybu_1ng4GBVx64FQRR+rm2FcqLHkpW9c78AXg_P_6aR=2BKg@mail.gmail.com>

On (21/03/17 09:04), Ricardo Ribalda Delgado wrote:
> On Wed, Mar 17, 2021 at 2:31 AM Sergey Senozhatsky
> <sergey.senozhatsky.work@gmail.com> wrote:
> >
> > On (21/03/16 19:19), Ricardo Ribalda Delgado wrote:
> > > > +Configuration of Region of Interest (ROI)
> > > > +=========================================
> > > > +
> > > > +The range of coordinates of the top left corner, width and height of
> > > > +areas that can be ROI is given by the ``V4L2_SEL_TGT_ROI_BOUNDS`` target.
> > > > +It is recommended for the driver developers to put the top/left corner
> > > > +at position ``(0,0)``. The rectangle's coordinates are in global sensor
> > > > +coordinates. The units are in pixels and independent of the field of view.
> > > > +They are not impacted by any cropping or scaling that is currently being
> > > > +used.
> > >
> > > Can we also mention binning here?
> >
> > What's binning? Is it in the UVC spec?
> 
> Binning is when you reduce an image by adding up surrounding pixels.
> 
> So you have a 100x100 image that you convert to a 50x50 but showing
> the same area of interest.

I see. Hmm, not sure if I can comment on this. It's not in the spec,
so it might be up to the firmware, maybe. What do you think?

> > > > diff --git a/include/uapi/linux/v4l2-common.h b/include/uapi/linux/v4l2-common.h
> > > > index 7d21c1634b4d..d0c108fba638 100644
> > > > --- a/include/uapi/linux/v4l2-common.h
> > > > +++ b/include/uapi/linux/v4l2-common.h
> > > > @@ -78,6 +78,14 @@
> > > >  #define V4L2_SEL_TGT_COMPOSE_BOUNDS    0x0102
> > > >  /* Current composing area plus all padding pixels */
> > > >  #define V4L2_SEL_TGT_COMPOSE_PADDED    0x0103
> > > > +/* Current Region of Interest area */
> > > > +#define V4L2_SEL_TGT_ROI_CURRENT       0x0200
> > > > +/* Default Region of Interest area */
> > > > +#define V4L2_SEL_TGT_ROI_DEFAULT       0x0201
> > > > +/* Region of Interest bounds */
> > > > +#define V4L2_SEL_TGT_ROI_BOUNDS        0x0202
> > > > +/* Set Region of Interest area */
> > > > +#define V4L2_SEL_TGT_ROI               0x0203
> > >
> > > Nit: Maybe it could be a good idea to split doc and code. This way the
> > > backports/fixes are easier.
> >
> > I'm quite sure this is the first time I'm being asked to split code
> > and documentation :) I'm usually asked to do the opposite - merge code
> > and documentation.
> 
> I got answered in both directions.  I prefer to split it because the
> doc can go to different audience than the code, and then it makes my
> life easier when backporting.
> 
> But if you or Laurent prefer  otherwise I am of course happy with any option ;)

Either way works for me. Laurent, any preferences?

	-ss

  reply	other threads:[~2021-03-17  8:09 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-08  5:17 [PATCHv2 0/3] Add UVC 1.5 Region Of Interest control to uvcvideo Sergey Senozhatsky
2021-02-08  5:17 ` [PATCHv2 1/3] media: v4l UAPI docs: document ROI selection targets Sergey Senozhatsky
2021-03-16 18:19   ` Ricardo Ribalda Delgado
2021-03-17  1:31     ` Sergey Senozhatsky
2021-03-17  8:04       ` Ricardo Ribalda Delgado
2021-03-17  8:08         ` Sergey Senozhatsky [this message]
2021-02-08  5:17 ` [PATCHv2 2/3] media: uvcvideo: add ROI auto controls Sergey Senozhatsky
2021-03-16 18:29   ` Ricardo Ribalda Delgado
2021-03-17  1:34     ` Sergey Senozhatsky
2021-03-17  8:08       ` Ricardo Ribalda Delgado
2021-03-17  8:12         ` Sergey Senozhatsky
2021-03-17  9:18   ` Sergey Senozhatsky
2021-03-17  9:27     ` Sergey Senozhatsky
2021-02-08  5:17 ` [PATCHv2 3/3] media: uvcvideo: add UVC 1.5 ROI control Sergey Senozhatsky
2021-03-16 18:46   ` Ricardo Ribalda Delgado
2021-03-17  1:59     ` Sergey Senozhatsky
2021-03-17  7:58       ` Ricardo Ribalda Delgado
2021-03-18  4:47         ` Sergey Senozhatsky
2021-03-18 21:19           ` Ricardo Ribalda
2021-03-18 21:20             ` Ricardo Ribalda
2021-03-19  5:35             ` Sergey Senozhatsky
2021-03-19 16:40               ` Ricardo Ribalda
2021-03-16  5:25 ` [PATCHv2 0/3] Add UVC 1.5 Region Of Interest control to uvcvideo Sergey Senozhatsky

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YFG5FA/9QEGKq+V9@google.com \
    --to=senozhatsky@chromium.org \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=ribalda@chromium.org \
    --cc=ricardo.ribalda@gmail.com \
    --cc=sergey.senozhatsky.work@gmail.com \
    --cc=sergey.senozhatsky@gmail.com \
    --cc=tomasz.figa@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.