Sakari Ailus | 64b9ce8 | 2012-06-01 13:56:53 -0300 | [diff] [blame^] | 1 | <section id="v4l2-selections-common"> |
| 2 | |
| 3 | <title>Selection targets</title> |
| 4 | |
| 5 | <para>While the <link linkend="selection-api">V4L2 selection |
| 6 | API</link> and <link linkend="v4l2-subdev-selections">V4L2 subdev |
| 7 | selection APIs</link> are very similar, there's one fundamental |
| 8 | difference between the two. On sub-device API, the selection |
| 9 | rectangle refers to the media bus format, and is bound to a |
| 10 | sub-device's pad. On the V4L2 interface the selection rectangles |
| 11 | refer to the in-memory pixel format.</para> |
| 12 | |
| 13 | <para>The precise meaning of the selection targets may thus be |
| 14 | affected on which of the two interfaces they are used.</para> |
| 15 | |
| 16 | <table pgwide="1" frame="none" id="v4l2-selection-targets-table"> |
| 17 | <title>Selection target definitions</title> |
| 18 | <tgroup cols="5"> |
| 19 | <colspec colname="c1" /> |
| 20 | <colspec colname="c2" /> |
| 21 | <colspec colname="c3" /> |
| 22 | <colspec colname="c4" /> |
| 23 | <colspec colname="c5" /> |
| 24 | &cs-def; |
| 25 | <thead> |
| 26 | <row rowsep="1"> |
| 27 | <entry align="left">Target name</entry> |
| 28 | <entry align="left">id</entry> |
| 29 | <entry align="left">Definition</entry> |
| 30 | <entry align="left">Valid for V4L2</entry> |
| 31 | <entry align="left">Valid for V4L2 subdev</entry> |
| 32 | </row> |
| 33 | </thead> |
| 34 | <tbody valign="top"> |
| 35 | <row> |
| 36 | <entry><constant>V4L2_SEL_TGT_CROP</constant></entry> |
| 37 | <entry>0x0000</entry> |
| 38 | <entry>Crop rectangle. Defines the cropped area.</entry> |
| 39 | <entry>Yes</entry> |
| 40 | <entry>Yes</entry> |
| 41 | </row> |
| 42 | <row> |
| 43 | <entry><constant>V4L2_SEL_TGT_CROP_DEFAULT</constant></entry> |
| 44 | <entry>0x0001</entry> |
| 45 | <entry>Suggested cropping rectangle that covers the "whole picture".</entry> |
| 46 | <entry>Yes</entry> |
| 47 | <entry>No</entry> |
| 48 | </row> |
| 49 | <row> |
| 50 | <entry><constant>V4L2_SEL_TGT_CROP_BOUNDS</constant></entry> |
| 51 | <entry>0x0002</entry> |
| 52 | <entry>Bounds of the crop rectangle. All valid crop |
| 53 | rectangles fit inside the crop bounds rectangle. |
| 54 | </entry> |
| 55 | <entry>Yes</entry> |
| 56 | <entry>Yes</entry> |
| 57 | </row> |
| 58 | <row> |
| 59 | <entry><constant>V4L2_SEL_TGT_COMPOSE</constant></entry> |
| 60 | <entry>0x0100</entry> |
| 61 | <entry>Compose rectangle. Used to configure scaling |
| 62 | and composition.</entry> |
| 63 | <entry>Yes</entry> |
| 64 | <entry>Yes</entry> |
| 65 | </row> |
| 66 | <row> |
| 67 | <entry><constant>V4L2_SEL_TGT_COMPOSE_DEFAULT</constant></entry> |
| 68 | <entry>0x0101</entry> |
| 69 | <entry>Suggested composition rectangle that covers the "whole picture".</entry> |
| 70 | <entry>Yes</entry> |
| 71 | <entry>No</entry> |
| 72 | </row> |
| 73 | <row> |
| 74 | <entry><constant>V4L2_SEL_TGT_COMPOSE_BOUNDS</constant></entry> |
| 75 | <entry>0x0102</entry> |
| 76 | <entry>Bounds of the compose rectangle. All valid compose |
| 77 | rectangles fit inside the compose bounds rectangle.</entry> |
| 78 | <entry>Yes</entry> |
| 79 | <entry>Yes</entry> |
| 80 | </row> |
| 81 | <row> |
| 82 | <entry><constant>V4L2_SEL_TGT_COMPOSE_PADDED</constant></entry> |
| 83 | <entry>0x0103</entry> |
| 84 | <entry>The active area and all padding pixels that are inserted or |
| 85 | modified by hardware.</entry> |
| 86 | <entry>Yes</entry> |
| 87 | <entry>No</entry> |
| 88 | </row> |
| 89 | </tbody> |
| 90 | </tgroup> |
| 91 | </table> |
| 92 | </section> |