metafmt-generic.rst 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341
  1. .. SPDX-License-Identifier: GPL-2.0 OR GFDL-1.1-no-invariants-or-later
  2. .. c:namespace:: V4L
  3. ********************************************************************************************************************************************************************************************************************************************************************************
  4. V4L2_META_FMT_GENERIC_8 ('MET8'), V4L2_META_FMT_GENERIC_CSI2_10 ('MC1A'), V4L2_META_FMT_GENERIC_CSI2_12 ('MC1C'), V4L2_META_FMT_GENERIC_CSI2_14 ('MC1E'), V4L2_META_FMT_GENERIC_CSI2_16 ('MC1G'), V4L2_META_FMT_GENERIC_CSI2_20 ('MC1K'), V4L2_META_FMT_GENERIC_CSI2_24 ('MC1O')
  5. ********************************************************************************************************************************************************************************************************************************************************************************
  6. Generic line-based metadata formats
  7. Description
  8. ===========
  9. These generic line-based metadata formats define the memory layout of the data
  10. without defining the format or meaning of the metadata itself.
  11. .. _v4l2-meta-fmt-generic-8:
  12. V4L2_META_FMT_GENERIC_8
  13. -----------------------
  14. The V4L2_META_FMT_GENERIC_8 format is a plain 8-bit metadata format. This format
  15. is used on CSI-2 for 8 bits per :term:`Data Unit`.
  16. Additionally it is used for 16 bits per Data Unit when two bytes of metadata are
  17. packed into one 16-bit Data Unit. Otherwise the 16 bits per pixel dataformat is
  18. :ref:`V4L2_META_FMT_GENERIC_CSI2_16 <v4l2-meta-fmt-generic-csi2-16>`.
  19. **Byte Order Of V4L2_META_FMT_GENERIC_8.**
  20. Each cell is one byte. "M" denotes a byte of metadata.
  21. .. tabularcolumns:: |p{2.4cm}|p{1.2cm}|p{1.2cm}|p{1.2cm}|p{1.2cm}|
  22. .. flat-table:: Sample 4x2 Metadata Frame
  23. :header-rows: 0
  24. :stub-columns: 0
  25. :widths: 12 8 8 8 8
  26. * - start + 0:
  27. - M\ :sub:`00`
  28. - M\ :sub:`10`
  29. - M\ :sub:`20`
  30. - M\ :sub:`30`
  31. * - start + 4:
  32. - M\ :sub:`01`
  33. - M\ :sub:`11`
  34. - M\ :sub:`21`
  35. - M\ :sub:`31`
  36. .. _v4l2-meta-fmt-generic-csi2-10:
  37. V4L2_META_FMT_GENERIC_CSI2_10
  38. -----------------------------
  39. V4L2_META_FMT_GENERIC_CSI2_10 contains 8-bit generic metadata packed in 10-bit
  40. Data Units, with one padding byte after every four bytes of metadata. This
  41. format is typically used by CSI-2 receivers with a source that transmits
  42. MEDIA_BUS_FMT_META_10 and the CSI-2 receiver writes the received data to memory
  43. as-is.
  44. The packing of the data follows the MIPI CSI-2 specification and the padding of
  45. the data is defined in the MIPI CCS specification.
  46. This format is also used in conjunction with 20 bits per :term:`Data Unit`
  47. formats that pack two bytes of metadata into one Data Unit. Otherwise the
  48. 20 bits per pixel dataformat is :ref:`V4L2_META_FMT_GENERIC_CSI2_20
  49. <v4l2-meta-fmt-generic-csi2-20>`.
  50. This format is little endian.
  51. **Byte Order Of V4L2_META_FMT_GENERIC_CSI2_10.**
  52. Each cell is one byte. "M" denotes a byte of metadata and "x" a byte of padding.
  53. .. tabularcolumns:: |p{2.4cm}|p{1.2cm}|p{1.2cm}|p{1.2cm}|p{1.2cm}|p{1.8cm}|
  54. .. flat-table:: Sample 4x2 Metadata Frame
  55. :header-rows: 0
  56. :stub-columns: 0
  57. :widths: 12 8 8 8 8 8
  58. * - start + 0:
  59. - M\ :sub:`00`
  60. - M\ :sub:`10`
  61. - M\ :sub:`20`
  62. - M\ :sub:`30`
  63. - x
  64. * - start + 5:
  65. - M\ :sub:`01`
  66. - M\ :sub:`11`
  67. - M\ :sub:`21`
  68. - M\ :sub:`31`
  69. - x
  70. .. _v4l2-meta-fmt-generic-csi2-12:
  71. V4L2_META_FMT_GENERIC_CSI2_12
  72. -----------------------------
  73. V4L2_META_FMT_GENERIC_CSI2_12 contains 8-bit generic metadata packed in 12-bit
  74. Data Units, with one padding byte after every two bytes of metadata. This format
  75. is typically used by CSI-2 receivers with a source that transmits
  76. MEDIA_BUS_FMT_META_12 and the CSI-2 receiver writes the received data to memory
  77. as-is.
  78. The packing of the data follows the MIPI CSI-2 specification and the padding of
  79. the data is defined in the MIPI CCS specification.
  80. This format is also used in conjunction with 24 bits per :term:`Data Unit`
  81. formats that pack two bytes of metadata into one Data Unit. Otherwise the
  82. 24 bits per pixel dataformat is :ref:`V4L2_META_FMT_GENERIC_CSI2_24
  83. <v4l2-meta-fmt-generic-csi2-24>`.
  84. This format is little endian.
  85. **Byte Order Of V4L2_META_FMT_GENERIC_CSI2_12.**
  86. Each cell is one byte. "M" denotes a byte of metadata and "x" a byte of padding.
  87. .. tabularcolumns:: |p{2.4cm}|p{1.2cm}|p{1.2cm}|p{1.8cm}|p{1.2cm}|p{1.2cm}|p{1.8cm}|
  88. .. flat-table:: Sample 4x2 Metadata Frame
  89. :header-rows: 0
  90. :stub-columns: 0
  91. :widths: 12 8 8 8 8 8 8
  92. * - start + 0:
  93. - M\ :sub:`00`
  94. - M\ :sub:`10`
  95. - x
  96. - M\ :sub:`20`
  97. - M\ :sub:`30`
  98. - x
  99. * - start + 6:
  100. - M\ :sub:`01`
  101. - M\ :sub:`11`
  102. - x
  103. - M\ :sub:`21`
  104. - M\ :sub:`31`
  105. - x
  106. .. _v4l2-meta-fmt-generic-csi2-14:
  107. V4L2_META_FMT_GENERIC_CSI2_14
  108. -----------------------------
  109. V4L2_META_FMT_GENERIC_CSI2_14 contains 8-bit generic metadata packed in 14-bit
  110. Data Units, with three padding bytes after every four bytes of metadata. This
  111. format is typically used by CSI-2 receivers with a source that transmits
  112. MEDIA_BUS_FMT_META_14 and the CSI-2 receiver writes the received data to memory
  113. as-is.
  114. The packing of the data follows the MIPI CSI-2 specification and the padding of
  115. the data is defined in the MIPI CCS specification.
  116. This format is little endian.
  117. **Byte Order Of V4L2_META_FMT_GENERIC_CSI2_14.**
  118. Each cell is one byte. "M" denotes a byte of metadata and "x" a byte of padding.
  119. .. tabularcolumns:: |p{2.4cm}|p{1.2cm}|p{1.2cm}|p{1.2cm}|p{1.2cm}|p{1.8cm}|p{1.8cm}|p{1.8cm}|
  120. .. flat-table:: Sample 4x2 Metadata Frame
  121. :header-rows: 0
  122. :stub-columns: 0
  123. :widths: 12 8 8 8 8 8 8 8
  124. * - start + 0:
  125. - M\ :sub:`00`
  126. - M\ :sub:`10`
  127. - M\ :sub:`20`
  128. - M\ :sub:`30`
  129. - x
  130. - x
  131. - x
  132. * - start + 7:
  133. - M\ :sub:`01`
  134. - M\ :sub:`11`
  135. - M\ :sub:`21`
  136. - M\ :sub:`31`
  137. - x
  138. - x
  139. - x
  140. .. _v4l2-meta-fmt-generic-csi2-16:
  141. V4L2_META_FMT_GENERIC_CSI2_16
  142. -----------------------------
  143. V4L2_META_FMT_GENERIC_CSI2_16 contains 8-bit generic metadata packed in 16-bit
  144. Data Units, with one padding byte after every byte of metadata. This format is
  145. typically used by CSI-2 receivers with a source that transmits
  146. MEDIA_BUS_FMT_META_16 and the CSI-2 receiver writes the received data to memory
  147. as-is.
  148. The packing of the data follows the MIPI CSI-2 specification and the padding of
  149. the data is defined in the MIPI CCS specification.
  150. Some devices support more efficient packing of metadata in conjunction with
  151. 16-bit image data. In that case the dataformat is
  152. :ref:`V4L2_META_FMT_GENERIC_8 <v4l2-meta-fmt-generic-8>`.
  153. This format is little endian.
  154. **Byte Order Of V4L2_META_FMT_GENERIC_CSI2_16.**
  155. Each cell is one byte. "M" denotes a byte of metadata and "x" a byte of padding.
  156. .. tabularcolumns:: |p{2.4cm}|p{1.2cm}|p{.8cm}|p{1.2cm}|p{.8cm}|p{1.2cm}|p{.8cm}|p{1.2cm}|p{.8cm}|
  157. .. flat-table:: Sample 4x2 Metadata Frame
  158. :header-rows: 0
  159. :stub-columns: 0
  160. :widths: 12 8 8 8 8 8 8 8 8
  161. * - start + 0:
  162. - M\ :sub:`00`
  163. - x
  164. - M\ :sub:`10`
  165. - x
  166. - M\ :sub:`20`
  167. - x
  168. - M\ :sub:`30`
  169. - x
  170. * - start + 8:
  171. - M\ :sub:`01`
  172. - x
  173. - M\ :sub:`11`
  174. - x
  175. - M\ :sub:`21`
  176. - x
  177. - M\ :sub:`31`
  178. - x
  179. .. _v4l2-meta-fmt-generic-csi2-20:
  180. V4L2_META_FMT_GENERIC_CSI2_20
  181. -----------------------------
  182. V4L2_META_FMT_GENERIC_CSI2_20 contains 8-bit generic metadata packed in 20-bit
  183. Data Units, with alternating one or two padding bytes after every byte of
  184. metadata. This format is typically used by CSI-2 receivers with a source that
  185. transmits MEDIA_BUS_FMT_META_20 and the CSI-2 receiver writes the received data
  186. to memory as-is.
  187. The packing of the data follows the MIPI CSI-2 specification and the padding of
  188. the data is defined in the MIPI CCS specification.
  189. Some devices support more efficient packing of metadata in conjunction with
  190. 16-bit image data. In that case the dataformat is
  191. :ref:`V4L2_META_FMT_GENERIC_CSI2_10 <v4l2-meta-fmt-generic-csi2-10>`.
  192. This format is little endian.
  193. **Byte Order Of V4L2_META_FMT_GENERIC_CSI2_20.**
  194. Each cell is one byte. "M" denotes a byte of metadata and "x" a byte of padding.
  195. .. tabularcolumns:: |p{2.4cm}|p{1.2cm}|p{1.2cm}|p{1.2cm}|p{1.2cm}|p{1.8cm}|p{1.2cm}|p{1.2cm}|p{1.2cm}|p{1.2cm}|p{1.8cm}
  196. .. flat-table:: Sample 4x2 Metadata Frame
  197. :header-rows: 0
  198. :stub-columns: 0
  199. :widths: 12 8 8 8 8 8 8 8 8 8 8
  200. * - start + 0:
  201. - M\ :sub:`00`
  202. - x
  203. - M\ :sub:`10`
  204. - x
  205. - x
  206. - M\ :sub:`20`
  207. - x
  208. - M\ :sub:`30`
  209. - x
  210. - x
  211. * - start + 10:
  212. - M\ :sub:`01`
  213. - x
  214. - M\ :sub:`11`
  215. - x
  216. - x
  217. - M\ :sub:`21`
  218. - x
  219. - M\ :sub:`31`
  220. - x
  221. - x
  222. .. _v4l2-meta-fmt-generic-csi2-24:
  223. V4L2_META_FMT_GENERIC_CSI2_24
  224. -----------------------------
  225. V4L2_META_FMT_GENERIC_CSI2_24 contains 8-bit generic metadata packed in 24-bit
  226. Data Units, with two padding bytes after every byte of metadata. This format is
  227. typically used by CSI-2 receivers with a source that transmits
  228. MEDIA_BUS_FMT_META_24 and the CSI-2 receiver writes the received data to memory
  229. as-is.
  230. The packing of the data follows the MIPI CSI-2 specification and the padding of
  231. the data is defined in the MIPI CCS specification.
  232. Some devices support more efficient packing of metadata in conjunction with
  233. 16-bit image data. In that case the dataformat is
  234. :ref:`V4L2_META_FMT_GENERIC_CSI2_12 <v4l2-meta-fmt-generic-csi2-12>`.
  235. This format is little endian.
  236. **Byte Order Of V4L2_META_FMT_GENERIC_CSI2_24.**
  237. Each cell is one byte. "M" denotes a byte of metadata and "x" a byte of padding.
  238. .. tabularcolumns:: |p{2.4cm}|p{1.2cm}|p{.8cm}|p{.8cm}|p{1.2cm}|p{.8cm}|p{.8cm}|p{1.2cm}|p{.8cm}|p{.8cm}|p{1.2cm}|p{.8cm}|p{.8cm}|
  239. .. flat-table:: Sample 4x2 Metadata Frame
  240. :header-rows: 0
  241. :stub-columns: 0
  242. :widths: 12 8 8 8 8 8 8 8 8 8 8 8 8
  243. * - start + 0:
  244. - M\ :sub:`00`
  245. - x
  246. - x
  247. - M\ :sub:`10`
  248. - x
  249. - x
  250. - M\ :sub:`20`
  251. - x
  252. - x
  253. - M\ :sub:`30`
  254. - x
  255. - x
  256. * - start + 12:
  257. - M\ :sub:`01`
  258. - x
  259. - x
  260. - M\ :sub:`11`
  261. - x
  262. - x
  263. - M\ :sub:`21`
  264. - x
  265. - x
  266. - M\ :sub:`31`
  267. - x
  268. - x