1.. Permission is granted to copy, distribute and/or modify this 2.. document under the terms of the GNU Free Documentation License, 3.. Version 1.1 or any later version published by the Free Software 4.. Foundation, with no Invariant Sections, no Front-Cover Texts 5.. and no Back-Cover Texts. A copy of the license is included at 6.. Documentation/media/uapi/fdl-appendix.rst. 7.. 8.. TODO: replace it to GFDL-1.1-or-later WITH no-invariant-sections 9 10.. _pixfmt-reserved: 11 12*************************** 13Reserved Format Identifiers 14*************************** 15 16These formats are not defined by this specification, they are just 17listed for reference and to avoid naming conflicts. If you want to 18register your own format, send an e-mail to the linux-media mailing list 19`https://linuxtv.org/lists.php <https://linuxtv.org/lists.php>`__ 20for inclusion in the ``videodev2.h`` file. If you want to share your 21format with other developers add a link to your documentation and send a 22copy to the linux-media mailing list for inclusion in this section. If 23you think your format should be listed in a standard format section 24please make a proposal on the linux-media mailing list. 25 26 27.. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}| 28 29.. _reserved-formats: 30 31.. flat-table:: Reserved Image Formats 32 :header-rows: 1 33 :stub-columns: 0 34 :widths: 3 1 4 35 36 * - Identifier 37 - Code 38 - Details 39 * .. _V4L2-PIX-FMT-DV: 40 41 - ``V4L2_PIX_FMT_DV`` 42 - 'dvsd' 43 - unknown 44 * .. _V4L2-PIX-FMT-ET61X251: 45 46 - ``V4L2_PIX_FMT_ET61X251`` 47 - 'E625' 48 - Compressed format of the ET61X251 driver. 49 * .. _V4L2-PIX-FMT-HI240: 50 51 - ``V4L2_PIX_FMT_HI240`` 52 - 'HI24' 53 - 8 bit RGB format used by the BTTV driver. 54 * .. _V4L2-PIX-FMT-HM12: 55 56 - ``V4L2_PIX_FMT_HM12`` 57 - 'HM12' 58 - YUV 4:2:0 format used by the IVTV driver, 59 `http://www.ivtvdriver.org/ <http://www.ivtvdriver.org/>`__ 60 61 The format is documented in the kernel sources in the file 62 ``Documentation/media/v4l-drivers/cx2341x.rst`` 63 * .. _V4L2-PIX-FMT-CPIA1: 64 65 - ``V4L2_PIX_FMT_CPIA1`` 66 - 'CPIA' 67 - YUV format used by the gspca cpia1 driver. 68 * .. _V4L2-PIX-FMT-JPGL: 69 70 - ``V4L2_PIX_FMT_JPGL`` 71 - 'JPGL' 72 - JPEG-Light format (Pegasus Lossless JPEG) used in Divio webcams NW 73 80x. 74 * .. _V4L2-PIX-FMT-SPCA501: 75 76 - ``V4L2_PIX_FMT_SPCA501`` 77 - 'S501' 78 - YUYV per line used by the gspca driver. 79 * .. _V4L2-PIX-FMT-SPCA505: 80 81 - ``V4L2_PIX_FMT_SPCA505`` 82 - 'S505' 83 - YYUV per line used by the gspca driver. 84 * .. _V4L2-PIX-FMT-SPCA508: 85 86 - ``V4L2_PIX_FMT_SPCA508`` 87 - 'S508' 88 - YUVY per line used by the gspca driver. 89 * .. _V4L2-PIX-FMT-SPCA561: 90 91 - ``V4L2_PIX_FMT_SPCA561`` 92 - 'S561' 93 - Compressed GBRG Bayer format used by the gspca driver. 94 * .. _V4L2-PIX-FMT-PAC207: 95 96 - ``V4L2_PIX_FMT_PAC207`` 97 - 'P207' 98 - Compressed BGGR Bayer format used by the gspca driver. 99 * .. _V4L2-PIX-FMT-MR97310A: 100 101 - ``V4L2_PIX_FMT_MR97310A`` 102 - 'M310' 103 - Compressed BGGR Bayer format used by the gspca driver. 104 * .. _V4L2-PIX-FMT-JL2005BCD: 105 106 - ``V4L2_PIX_FMT_JL2005BCD`` 107 - 'JL20' 108 - JPEG compressed RGGB Bayer format used by the gspca driver. 109 * .. _V4L2-PIX-FMT-OV511: 110 111 - ``V4L2_PIX_FMT_OV511`` 112 - 'O511' 113 - OV511 JPEG format used by the gspca driver. 114 * .. _V4L2-PIX-FMT-OV518: 115 116 - ``V4L2_PIX_FMT_OV518`` 117 - 'O518' 118 - OV518 JPEG format used by the gspca driver. 119 * .. _V4L2-PIX-FMT-PJPG: 120 121 - ``V4L2_PIX_FMT_PJPG`` 122 - 'PJPG' 123 - Pixart 73xx JPEG format used by the gspca driver. 124 * .. _V4L2-PIX-FMT-SE401: 125 126 - ``V4L2_PIX_FMT_SE401`` 127 - 'S401' 128 - Compressed RGB format used by the gspca se401 driver 129 * .. _V4L2-PIX-FMT-SQ905C: 130 131 - ``V4L2_PIX_FMT_SQ905C`` 132 - '905C' 133 - Compressed RGGB bayer format used by the gspca driver. 134 * .. _V4L2-PIX-FMT-MJPEG: 135 136 - ``V4L2_PIX_FMT_MJPEG`` 137 - 'MJPG' 138 - Compressed format used by the Zoran driver 139 * .. _V4L2-PIX-FMT-PWC1: 140 141 - ``V4L2_PIX_FMT_PWC1`` 142 - 'PWC1' 143 - Compressed format of the PWC driver. 144 * .. _V4L2-PIX-FMT-PWC2: 145 146 - ``V4L2_PIX_FMT_PWC2`` 147 - 'PWC2' 148 - Compressed format of the PWC driver. 149 * .. _V4L2-PIX-FMT-SN9C10X: 150 151 - ``V4L2_PIX_FMT_SN9C10X`` 152 - 'S910' 153 - Compressed format of the SN9C102 driver. 154 * .. _V4L2-PIX-FMT-SN9C20X-I420: 155 156 - ``V4L2_PIX_FMT_SN9C20X_I420`` 157 - 'S920' 158 - YUV 4:2:0 format of the gspca sn9c20x driver. 159 * .. _V4L2-PIX-FMT-SN9C2028: 160 161 - ``V4L2_PIX_FMT_SN9C2028`` 162 - 'SONX' 163 - Compressed GBRG bayer format of the gspca sn9c2028 driver. 164 * .. _V4L2-PIX-FMT-STV0680: 165 166 - ``V4L2_PIX_FMT_STV0680`` 167 - 'S680' 168 - Bayer format of the gspca stv0680 driver. 169 * .. _V4L2-PIX-FMT-WNVA: 170 171 - ``V4L2_PIX_FMT_WNVA`` 172 - 'WNVA' 173 - Used by the Winnov Videum driver, 174 `http://www.thedirks.org/winnov/ <http://www.thedirks.org/winnov/>`__ 175 * .. _V4L2-PIX-FMT-TM6000: 176 177 - ``V4L2_PIX_FMT_TM6000`` 178 - 'TM60' 179 - Used by Trident tm6000 180 * .. _V4L2-PIX-FMT-CIT-YYVYUY: 181 182 - ``V4L2_PIX_FMT_CIT_YYVYUY`` 183 - 'CITV' 184 - Used by xirlink CIT, found at IBM webcams. 185 186 Uses one line of Y then 1 line of VYUY 187 * .. _V4L2-PIX-FMT-KONICA420: 188 189 - ``V4L2_PIX_FMT_KONICA420`` 190 - 'KONI' 191 - Used by Konica webcams. 192 193 YUV420 planar in blocks of 256 pixels. 194 * .. _V4L2-PIX-FMT-YYUV: 195 196 - ``V4L2_PIX_FMT_YYUV`` 197 - 'YYUV' 198 - unknown 199 * .. _V4L2-PIX-FMT-Y4: 200 201 - ``V4L2_PIX_FMT_Y4`` 202 - 'Y04 ' 203 - Old 4-bit greyscale format. Only the most significant 4 bits of 204 each byte are used, the other bits are set to 0. 205 * .. _V4L2-PIX-FMT-Y6: 206 207 - ``V4L2_PIX_FMT_Y6`` 208 - 'Y06 ' 209 - Old 6-bit greyscale format. Only the most significant 6 bits of 210 each byte are used, the other bits are set to 0. 211 * .. _V4L2-PIX-FMT-S5C-UYVY-JPG: 212 213 - ``V4L2_PIX_FMT_S5C_UYVY_JPG`` 214 - 'S5CI' 215 - Two-planar format used by Samsung S5C73MX cameras. The first plane 216 contains interleaved JPEG and UYVY image data, followed by meta 217 data in form of an array of offsets to the UYVY data blocks. The 218 actual pointer array follows immediately the interleaved JPEG/UYVY 219 data, the number of entries in this array equals the height of the 220 UYVY image. Each entry is a 4-byte unsigned integer in big endian 221 order and it's an offset to a single pixel line of the UYVY image. 222 The first plane can start either with JPEG or UYVY data chunk. The 223 size of a single UYVY block equals the UYVY image's width 224 multiplied by 2. The size of a JPEG chunk depends on the image and 225 can vary with each line. 226 227 The second plane, at an offset of 4084 bytes, contains a 4-byte 228 offset to the pointer array in the first plane. This offset is 229 followed by a 4-byte value indicating size of the pointer array. 230 All numbers in the second plane are also in big endian order. 231 Remaining data in the second plane is undefined. The information 232 in the second plane allows to easily find location of the pointer 233 array, which can be different for each frame. The size of the 234 pointer array is constant for given UYVY image height. 235 236 In order to extract UYVY and JPEG frames an application can 237 initially set a data pointer to the start of first plane and then 238 add an offset from the first entry of the pointers table. Such a 239 pointer indicates start of an UYVY image pixel line. Whole UYVY 240 line can be copied to a separate buffer. These steps should be 241 repeated for each line, i.e. the number of entries in the pointer 242 array. Anything what's in between the UYVY lines is JPEG data and 243 should be concatenated to form the JPEG stream. 244 * .. _V4L2-PIX-FMT-MT21C: 245 246 - ``V4L2_PIX_FMT_MT21C`` 247 - 'MT21' 248 - Compressed two-planar YVU420 format used by Mediatek MT8173. 249 The compression is lossless. 250 It is an opaque intermediate format and the MDP hardware must be 251 used to convert ``V4L2_PIX_FMT_MT21C`` to ``V4L2_PIX_FMT_NV12M``, 252 ``V4L2_PIX_FMT_YUV420M`` or ``V4L2_PIX_FMT_YVU420``. 253 * .. _V4L2-PIX-FMT-SUNXI-TILED-NV12: 254 255 - ``V4L2_PIX_FMT_SUNXI_TILED_NV12`` 256 - 'ST12' 257 - Two-planar NV12-based format used by the video engine found on Allwinner 258 (codenamed sunxi) platforms, with 32x32 tiles for the luminance plane 259 and 32x64 tiles for the chrominance plane. The data in each tile is 260 stored in linear order, within the tile bounds. Each tile follows the 261 previous one linearly in memory (from left to right, top to bottom). 262 263 The associated buffer dimensions are aligned to match an integer number 264 of tiles, resulting in 32-aligned resolutions for the luminance plane 265 and 16-aligned resolutions for the chrominance plane (with 2x2 266 subsampling). 267 268.. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}| 269 270.. _format-flags: 271 272.. flat-table:: Format Flags 273 :header-rows: 0 274 :stub-columns: 0 275 :widths: 3 1 4 276 277 * - ``V4L2_PIX_FMT_FLAG_PREMUL_ALPHA`` 278 - 0x00000001 279 - The color values are premultiplied by the alpha channel value. For 280 example, if a light blue pixel with 50% transparency was described 281 by RGBA values (128, 192, 255, 128), the same pixel described with 282 premultiplied colors would be described by RGBA values (64, 96, 283 128, 128) 284