From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from mail-ee0-f66.google.com ([74.125.83.66]:58687 "EHLO mail-ee0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751800Ab2F3VNr (ORCPT ); Sat, 30 Jun 2012 17:13:47 -0400 Received: by eeke50 with SMTP id e50so373648eek.1 for ; Sat, 30 Jun 2012 14:13:43 -0700 (PDT) Message-ID: <4FEF6C04.8010405@gmail.com> Date: Sat, 30 Jun 2012 23:13:40 +0200 From: Sylwester Nawrocki MIME-Version: 1.0 To: Sakari Ailus CC: linux-media@vger.kernel.org, t.stanislaws@samsung.com, laurent.pinchart@ideasonboard.com, hverkuil@xs4all.nl Subject: Re: [PATCH 6/8] v4l: Unify selection flags documentation References: <20120630170506.GE19384@valkosipuli.retiisi.org.uk> <1341075839-18586-6-git-send-email-sakari.ailus@iki.fi> In-Reply-To: <1341075839-18586-6-git-send-email-sakari.ailus@iki.fi> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Sender: linux-media-owner@vger.kernel.org List-ID: On 06/30/2012 07:03 PM, Sakari Ailus wrote: > As for the selection targets, the selection flags are now the same on V4L2 > and V4L2 subdev interfaces. Also document them so. > > Signed-off-by: Sakari Ailus > --- > Documentation/DocBook/media/v4l/dev-subdev.xml | 6 +- > Documentation/DocBook/media/v4l/selection-api.xml | 6 +- > .../DocBook/media/v4l/selections-common.xml | 226 +++++++++++++------- > .../DocBook/media/v4l/vidioc-g-selection.xml | 27 +--- > .../media/v4l/vidioc-subdev-g-selection.xml | 39 +---- > 5 files changed, 159 insertions(+), 145 deletions(-) > > diff --git a/Documentation/DocBook/media/v4l/dev-subdev.xml b/Documentation/DocBook/media/v4l/dev-subdev.xml > index afeb196..a3d9dd0 100644 > --- a/Documentation/DocBook/media/v4l/dev-subdev.xml > +++ b/Documentation/DocBook/media/v4l/dev-subdev.xml > @@ -323,10 +323,10 @@ > The drivers should always use the closest possible > rectangle the user requests on all selection targets, unless > specifically told otherwise. > -V4L2_SUBDEV_SEL_FLAG_SIZE_GE and > -V4L2_SUBDEV_SEL_FLAG_SIZE_LE flags may be > +V4L2_SEL_FLAG_GE and > +V4L2_SEL_FLAG_LE flags may be > used to round the image size either up or down. - linkend="v4l2-subdev-selection-flags"> > + linkend="v4l2-selection-flags" /> > > >
> diff --git a/Documentation/DocBook/media/v4l/selection-api.xml b/Documentation/DocBook/media/v4l/selection-api.xml > index 24dec10..e7ed507 100644 > --- a/Documentation/DocBook/media/v4l/selection-api.xml > +++ b/Documentation/DocBook/media/v4l/selection-api.xml > @@ -55,7 +55,7 @@ cropping and composing rectangles have the same size. > >
> > - See for more > + See for more > information. > >
> @@ -74,7 +74,7 @@ cropping/composing rectangles may have to be aligned, and both the source and > the sink may have arbitrary upper and lower size limits. Therefore, as usual, > drivers are expected to adjust the requested parameters and return the actual > values selected. An application can control the rounding behaviour using -linkend="v4l2-sel-flags"> constraint flags. > +linkend="v4l2-selection-flags"> constraint flags. > >
> > @@ -117,7 +117,7 @@ the bounds rectangle. The composing rectangle must lie completely inside bounds > rectangle. The driver must adjust the composing rectangle to fit to the > bounding limits. Moreover, the driver can perform other adjustments according > to hardware limitations. The application can control rounding behaviour using > - constraint flags. > + constraint flags. > > For capture devices the default composing rectangle is queried using > V4L2_SEL_TGT_COMPOSE_DEFAULT. It is usually equal to the > diff --git a/Documentation/DocBook/media/v4l/selections-common.xml b/Documentation/DocBook/media/v4l/selections-common.xml > index d0411ab..7cec5c1 100644 > --- a/Documentation/DocBook/media/v4l/selections-common.xml > +++ b/Documentation/DocBook/media/v4l/selections-common.xml > @@ -1,6 +1,6 @@ >
> > -Selection targets > +Common selection definitions > > While theV4L2 selection > API andV4L2 subdev > @@ -10,83 +10,155 @@ > sub-device's pad. On the V4L2 interface the selection rectangles > refer to the in-memory pixel format. > > -The precise meaning of the selection targets may thus be > - affected on which of the two interfaces they are used. > +This section defines the common definitions of the > + selection interfaces on the two APIs. > > - > -Selection target definitions > - > - > - > - > - > - > -&cs-def; > - > - > - Target name > - id > - Definition > - Valid for V4L2 > - Valid for V4L2 subdev > - > - > - > - > - V4L2_SEL_TGT_CROP > - 0x0000 > - Crop rectangle. Defines the cropped area. > - Yes > - Yes > - > - > -V4L2_SEL_TGT_CROP_DEFAULT > -0x0001 > -Suggested cropping rectangle that covers the "whole picture". > - Yes > - No > - > - > - V4L2_SEL_TGT_CROP_BOUNDS > - 0x0002 > - Bounds of the crop rectangle. All valid crop > - rectangles fit inside the crop bounds rectangle. > - > - Yes > - Yes > - > - > - V4L2_SEL_TGT_COMPOSE > - 0x0100 > - Compose rectangle. Used to configure scaling > - and composition. > - Yes > - Yes > - > - > -V4L2_SEL_TGT_COMPOSE_DEFAULT > -0x0101 > -Suggested composition rectangle that covers the "whole picture". > - Yes > - No > - > - > - V4L2_SEL_TGT_COMPOSE_BOUNDS > - 0x0102 > - Bounds of the compose rectangle. All valid compose > - rectangles fit inside the compose bounds rectangle. > - Yes > - Yes > - > - > -V4L2_SEL_TGT_COMPOSE_PADDED > -0x0103 > -The active area and all padding pixels that are inserted or > +
> + > +Selection targets > + > +The precise meaning of the selection targets may be > + dependent on which of the two interfaces they are used. > + > +
> +Selection target definitions > + s/4/5 > + > + > + > + > + > + &cs-def; > + > + > + Target name > + id > + Definition > + Valid for V4L2 > + Valid for V4L2 subdev > + > + > + > + > + V4L2_SEL_TGT_CROP > + 0x0000 > + Crop rectangle. Defines the cropped area. > + Yes > + Yes > + > + > + V4L2_SEL_TGT_CROP_DEFAULT > + 0x0001 > + Suggested cropping rectangle that covers the "whole picture". > + Yes > + No > + > + > + V4L2_SEL_TGT_CROP_BOUNDS > + 0x0002 > + Bounds of the crop rectangle. All valid crop > + rectangles fit inside the crop bounds rectangle. > + > + Yes > + Yes > + > + > + V4L2_SEL_TGT_COMPOSE > + 0x0100 > + Compose rectangle. Used to configure scaling > + and composition. > + Yes > + Yes > + > + > + V4L2_SEL_TGT_COMPOSE_DEFAULT > + 0x0101 > + Suggested composition rectangle that covers the "whole picture". > + Yes > + No > + > + > + V4L2_SEL_TGT_COMPOSE_BOUNDS > + 0x0102 > + Bounds of the compose rectangle. All valid compose > + rectangles fit inside the compose bounds rectangle. > + Yes > + Yes > + > + > + V4L2_SEL_TGT_COMPOSE_PADDED > + 0x0103 > + The active area and all padding pixels that are inserted or > modified by hardware. > - Yes > - No > + Yes > + No > + > + > + > +
> + > +
> + > +
> + > +Selection flags > + > + > +Selection flag definitions > + s/4/5 > + > + > + > + > + > + &cs-def; > + > + > + Flag name > + id > + Definition > + Valid for V4L2 > + Valid for V4L2 subdev > > - > - > -
> + > + > + > + V4L2_SEL_FLAG_GE > + (1<< 0) This field is quite badly formatted, due to too small width of column c2. I couldn't fix that with "colwidth" though. It's minor issue anyway. Acked-by: Sylwester Nawrocki