selections-common.xml 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164
  1. <section id="v4l2-selections-common">
  2. <title>Common selection definitions</title>
  3. <para>While the <link linkend="selection-api">V4L2 selection
  4. API</link> and <link linkend="v4l2-subdev-selections">V4L2 subdev
  5. selection APIs</link> are very similar, there's one fundamental
  6. difference between the two. On sub-device API, the selection
  7. rectangle refers to the media bus format, and is bound to a
  8. sub-device's pad. On the V4L2 interface the selection rectangles
  9. refer to the in-memory pixel format.</para>
  10. <para>This section defines the common definitions of the
  11. selection interfaces on the two APIs.</para>
  12. <section id="v4l2-selection-targets">
  13. <title>Selection targets</title>
  14. <para>The precise meaning of the selection targets may be
  15. dependent on which of the two interfaces they are used.</para>
  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>
  93. <section id="v4l2-selection-flags">
  94. <title>Selection flags</title>
  95. <table pgwide="1" frame="none" id="v4l2-selection-flags-table">
  96. <title>Selection flag definitions</title>
  97. <tgroup cols="5">
  98. <colspec colname="c1" />
  99. <colspec colname="c2" />
  100. <colspec colname="c3" />
  101. <colspec colname="c4" />
  102. <colspec colname="c5" />
  103. &cs-def;
  104. <thead>
  105. <row rowsep="1">
  106. <entry align="left">Flag name</entry>
  107. <entry align="left">id</entry>
  108. <entry align="left">Definition</entry>
  109. <entry align="left">Valid for V4L2</entry>
  110. <entry align="left">Valid for V4L2 subdev</entry>
  111. </row>
  112. </thead>
  113. <tbody valign="top">
  114. <row>
  115. <entry><constant>V4L2_SEL_FLAG_GE</constant></entry>
  116. <entry>(1 &lt;&lt; 0)</entry>
  117. <entry>Suggest the driver it should choose greater or
  118. equal rectangle (in size) than was requested. Albeit the
  119. driver may choose a lesser size, it will only do so due to
  120. hardware limitations. Without this flag (and
  121. <constant>V4L2_SEL_FLAG_LE</constant>) the
  122. behaviour is to choose the closest possible
  123. rectangle.</entry>
  124. <entry>Yes</entry>
  125. <entry>Yes</entry>
  126. </row>
  127. <row>
  128. <entry><constant>V4L2_SEL_FLAG_LE</constant></entry>
  129. <entry>(1 &lt;&lt; 1)</entry>
  130. <entry>Suggest the driver it
  131. should choose lesser or equal rectangle (in size) than was
  132. requested. Albeit the driver may choose a greater size, it
  133. will only do so due to hardware limitations.</entry>
  134. <entry>Yes</entry>
  135. <entry>Yes</entry>
  136. </row>
  137. <row>
  138. <entry><constant>V4L2_SEL_FLAG_KEEP_CONFIG</constant></entry>
  139. <entry>(1 &lt;&lt; 2)</entry>
  140. <entry>The configuration must not be propagated to any
  141. further processing steps. If this flag is not given, the
  142. configuration is propagated inside the subdevice to all
  143. further processing steps.</entry>
  144. <entry>No</entry>
  145. <entry>Yes</entry>
  146. </row>
  147. </tbody>
  148. </tgroup>
  149. </table>
  150. </section>
  151. </section>