Message ID | 20250203085853.1361401-6-sakari.ailus@linux.intel.com (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | Sub-device configuration models | expand |
On Mon, Feb 3, 2025 at 8:59 AM Sakari Ailus <sakari.ailus@linux.intel.com> wrote: > > Document scaling and post-scaler digital crop operations for the common > raw sensor model. > > Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> > Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com> > --- > .../media/v4l/subdev-config-model.rst | 24 +++++++++++++++---- > 1 file changed, 19 insertions(+), 5 deletions(-) > Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> Cheers, Prabhakar > diff --git a/Documentation/userspace-api/media/v4l/subdev-config-model.rst b/Documentation/userspace-api/media/v4l/subdev-config-model.rst > index b0bd09772ceb..f15e5495cc34 100644 > --- a/Documentation/userspace-api/media/v4l/subdev-config-model.rst > +++ b/Documentation/userspace-api/media/v4l/subdev-config-model.rst > @@ -118,11 +118,18 @@ sub-sampling to achieve the desired size. > > The digital crop operation takes place after binning and sub-sampling. It is > configured by setting the ``V4L2_SEL_TGT_CROP`` rectangle on (pad, stream) pair > -0/0. The resulting image size is further output by the sensor. > +0/0. > + > +The scaling operation is performed after the digital crop. It is configured by > +setting the ``V4L2_SEL_TGT_COMPOSE`` rectangle on (pad, stream) pair 0/0, > +relative to the digital crop. > > The sensor's output mbus code is configured by setting the format on the (pad, > -stream) pair 0/0. When setting the format, always use the same width and height > -as for the digital crop setting. > +stream) pair 0/0. The width and height fields are used to configure post-scaler > +digital crop if supported by the driver, affecting the right and bottom edges of > +the frame. If post-scaler digital crop is not supported, the width and height > +fields of the format will match the compose rectangle sizes applied on the same > +0/0 (pad, stream) pair. > > Drivers may only support some of even none of these configurations, in which > case they do not expose the corresponding selection rectangles. If any selection > @@ -180,12 +187,19 @@ Also refer to :ref:`Selection targets <v4l2-selection-targets-table>`. > - X > - Digital crop. This rectangle is relative to the ``V4L2_SEL_TGT_COMPOSE`` > rectangle on (pad, stream) pair 1/0. > + * - 0/0 > + - ``V4L2_SEL_TGT_COMPOSE`` > + - \- > + - X > + - Scaling. This rectangle is relative to the ``V4L2_SEL_TGT_CROP`` > + rectangle on (pad, stream) pair 0/0. > * - 0/0 > - Format > - X > - X > - - Image data source format. Always assign the width and height fields of > - the format to the same values than for the ``V4L2_SEL_TGT_CROP`` > + - Image data source format and post-scaler crop. The width and height > + fields of the format, used to configure post-scaler crop on the right > + and bottom edges of the image, are related to the ``V4L2_SEL_TGT_COMPOSE`` > rectangle on (pad, stream) pair 0/0. The media bus code reflects the > pixel data output of the sensor. > * - 0/1 > -- > 2.39.5 >
diff --git a/Documentation/userspace-api/media/v4l/subdev-config-model.rst b/Documentation/userspace-api/media/v4l/subdev-config-model.rst index b0bd09772ceb..f15e5495cc34 100644 --- a/Documentation/userspace-api/media/v4l/subdev-config-model.rst +++ b/Documentation/userspace-api/media/v4l/subdev-config-model.rst @@ -118,11 +118,18 @@ sub-sampling to achieve the desired size. The digital crop operation takes place after binning and sub-sampling. It is configured by setting the ``V4L2_SEL_TGT_CROP`` rectangle on (pad, stream) pair -0/0. The resulting image size is further output by the sensor. +0/0. + +The scaling operation is performed after the digital crop. It is configured by +setting the ``V4L2_SEL_TGT_COMPOSE`` rectangle on (pad, stream) pair 0/0, +relative to the digital crop. The sensor's output mbus code is configured by setting the format on the (pad, -stream) pair 0/0. When setting the format, always use the same width and height -as for the digital crop setting. +stream) pair 0/0. The width and height fields are used to configure post-scaler +digital crop if supported by the driver, affecting the right and bottom edges of +the frame. If post-scaler digital crop is not supported, the width and height +fields of the format will match the compose rectangle sizes applied on the same +0/0 (pad, stream) pair. Drivers may only support some of even none of these configurations, in which case they do not expose the corresponding selection rectangles. If any selection @@ -180,12 +187,19 @@ Also refer to :ref:`Selection targets <v4l2-selection-targets-table>`. - X - Digital crop. This rectangle is relative to the ``V4L2_SEL_TGT_COMPOSE`` rectangle on (pad, stream) pair 1/0. + * - 0/0 + - ``V4L2_SEL_TGT_COMPOSE`` + - \- + - X + - Scaling. This rectangle is relative to the ``V4L2_SEL_TGT_CROP`` + rectangle on (pad, stream) pair 0/0. * - 0/0 - Format - X - X - - Image data source format. Always assign the width and height fields of - the format to the same values than for the ``V4L2_SEL_TGT_CROP`` + - Image data source format and post-scaler crop. The width and height + fields of the format, used to configure post-scaler crop on the right + and bottom edges of the image, are related to the ``V4L2_SEL_TGT_COMPOSE`` rectangle on (pad, stream) pair 0/0. The media bus code reflects the pixel data output of the sensor. * - 0/1