summaryrefslogtreecommitdiffstats
path: root/Documentation/DocBook/v4l/dev-subdev.xml
diff options
context:
space:
mode:
authorAntti Koskipaa2010-06-23 10:03:42 +0200
committerMauro Carvalho Chehab2011-03-22 08:53:33 +0100
commitf6a5cb1be894468cdc69ec557d47f40c28f64642 (patch)
tree57518c84f343f0205a568c5333f5b5ead7c38ff8 /Documentation/DocBook/v4l/dev-subdev.xml
parent[media] v4l: v4l2_subdev userspace frame interval API (diff)
downloadkernel-qcow2-linux-f6a5cb1be894468cdc69ec557d47f40c28f64642.tar.gz
kernel-qcow2-linux-f6a5cb1be894468cdc69ec557d47f40c28f64642.tar.xz
kernel-qcow2-linux-f6a5cb1be894468cdc69ec557d47f40c28f64642.zip
[media] v4l: v4l2_subdev userspace crop API
This patch adds the VIDIOC_SUBDEV_S_CROP and G_CROP ioctls to the userland API. CROPCAP is not implemented because it's redundant. Signed-off-by: Antti Koskipaa <akoskipa@gmail.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'Documentation/DocBook/v4l/dev-subdev.xml')
-rw-r--r--Documentation/DocBook/v4l/dev-subdev.xml33
1 files changed, 33 insertions, 0 deletions
diff --git a/Documentation/DocBook/v4l/dev-subdev.xml b/Documentation/DocBook/v4l/dev-subdev.xml
index fc62e65f45ef..e9eb8af0f303 100644
--- a/Documentation/DocBook/v4l/dev-subdev.xml
+++ b/Documentation/DocBook/v4l/dev-subdev.xml
@@ -275,6 +275,39 @@
</para>
</section>
+ <section>
+ <title>Cropping and scaling</title>
+
+ <para>Many sub-devices support cropping frames on their input or output
+ pads (or possible even on both). Cropping is used to select the area of
+ interest in an image, typically on a video sensor or video decoder. It can
+ also be used as part of digital zoom implementations to select the area of
+ the image that will be scaled up.</para>
+
+ <para>Crop settings are defined by a crop rectangle and represented in a
+ &v4l2-rect; by the coordinates of the top left corner and the rectangle
+ size. Both the coordinates and sizes are expressed in pixels.</para>
+
+ <para>The crop rectangle is retrieved and set using the
+ &VIDIOC-SUBDEV-G-CROP; and &VIDIOC-SUBDEV-S-CROP; ioctls. Like for pad
+ formats, drivers store try and active crop rectangles. The format
+ negotiation mechanism applies to crop settings as well.</para>
+
+ <para>On input pads, cropping is applied relatively to the current pad
+ format. The pad format represents the image size as received by the
+ sub-device from the previous block in the pipeline, and the crop rectangle
+ represents the sub-image that will be transmitted further inside the
+ sub-device for processing. The crop rectangle be entirely containted
+ inside the input image size.</para>
+
+ <para>Input crop rectangle are reset to their default value when the input
+ image format is modified. Drivers should use the input image size as the
+ crop rectangle default value, but hardware requirements may prevent this.
+ </para>
+
+ <para>Cropping behaviour on output pads is not defined.</para>
+
+ </section>
</section>
&sub-subdev-formats;