sphinx.addnodesdocument)}( rawsourcechildren]( translations LanguagesNode)}(hhh](h pending_xref)}(hhh]docutils.nodesTextChinese (Simplified)}parenthsba attributes}(ids]classes]names]dupnames]backrefs] refdomainstdreftypedoc reftarget7/translations/zh_CN/userspace-api/media/v4l/pixfmt-v4l2modnameN classnameN refexplicitutagnamehhh ubh)}(hhh]hChinese (Traditional)}hh2sbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget7/translations/zh_TW/userspace-api/media/v4l/pixfmt-v4l2modnameN classnameN refexplicituh1hhh ubh)}(hhh]hItalian}hhFsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget7/translations/it_IT/userspace-api/media/v4l/pixfmt-v4l2modnameN classnameN refexplicituh1hhh ubh)}(hhh]hJapanese}hhZsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget7/translations/ja_JP/userspace-api/media/v4l/pixfmt-v4l2modnameN classnameN refexplicituh1hhh ubh)}(hhh]hKorean}hhnsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget7/translations/ko_KR/userspace-api/media/v4l/pixfmt-v4l2modnameN classnameN refexplicituh1hhh ubh)}(hhh]hSpanish}hhsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget7/translations/sp_SP/userspace-api/media/v4l/pixfmt-v4l2modnameN classnameN refexplicituh1hhh ubeh}(h]h ]h"]h$]h&]current_languageEnglishuh1h hh _documenthsourceNlineNubhcomment)}(h8SPDX-License-Identifier: GFDL-1.1-no-invariants-or-laterh]h8SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later}hhsbah}(h]h ]h"]h$]h&] xml:spacepreserveuh1hhhhhhQ/var/lib/git/docbuild/linux/Documentation/userspace-api/media/v4l/pixfmt-v4l2.rsthKubhsection)}(hhh](htitle)}(hSingle-planar format structureh]hSingle-planar format structure}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhhhhKubhtabular_col_spec)}(hhh]h}(h]h ]h"]h$]h&]spec|p{4.0cm}|p{2.6cm}|p{10.7cm}|uh1hhhhKhhhhubhindex)}(hhh]h}(h]h ]h"]h$]h&]entries](singlev4l2_pix_format (C type)c.v4l2_pix_formathNtauh1hhhhhhNhNubhdesc)}(hhh](hdesc_signature)}(hv4l2_pix_formath]hdesc_signature_line)}(htype v4l2_pix_formath](hdesc_sig_keyword)}(htypeh]htype}(hhhhhNhNubah}(h]h ]kah"]h$]h&]uh1hhhhhhhhK ubhdesc_sig_space)}(h h]h }(hj hhhNhNubah}(h]h ]wah"]h$]h&]uh1j hhhhhhhK ubh desc_name)}(hv4l2_pix_formath]h desc_sig_name)}(hhh]hv4l2_pix_format}(hj"hhhNhNubah}(h]h ]nah"]h$]h&]uh1j hjubah}(h]h ](sig-namedescnameeh"]h$]h&]hhuh1jhhhhhhhK ubeh}(h]h ]h"]h$]h&]hh add_permalinkuh1hsphinx_line_type declaratorhhhhhhhK ubah}(h]hah ](sig sig-objecteh"]h$]h&] is_multiline _toc_parts) _toc_namehuh1hhhhK hhhhubh desc_content)}(hhh]h}(h]h ]h"]h$]h&]uh1jLhhhhhhhK ubeh}(h]h ](ctypeeh"]h$]h&]domainjZobjtypej[desctypej[noindex noindexentrynocontentsentryuh1hhhhhhNhNubhtable)}(hhh](h)}(hstruct v4l2_pix_formath]hstruct v4l2_pix_format}(hjjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK hjgubhtgroup)}(hhh](hcolspec)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1j}hjzubj~)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1j}hjzubj~)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1j}hjzubhtbody)}(hhh](hrow)}(hhh](hentry)}(hhh]h paragraph)}(h__u32h]h__u32}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]j)}(h ``width``h]hliteral)}(hjh]hwidth}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]j)}(hImage width in pixels.h]hImage width in pixels.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh]j)}(h__u32h]h__u32}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]j)}(h ``height``h]j)}(hj h]hheight}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]j)}(hXImage height in pixels. If ``field`` is one of ``V4L2_FIELD_TOP``, ``V4L2_FIELD_BOTTOM`` or ``V4L2_FIELD_ALTERNATE`` then height refers to the number of lines in the field, otherwise it refers to the number of lines in the frame (which is twice the field height for interlaced formats).h](hImage height in pixels. If }(hj>hhhNhNubj)}(h ``field``h]hfield}(hjFhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj>ubh is one of }(hj>hhhNhNubj)}(h``V4L2_FIELD_TOP``h]hV4L2_FIELD_TOP}(hjXhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj>ubh, }(hj>hhhNhNubj)}(h``V4L2_FIELD_BOTTOM``h]hV4L2_FIELD_BOTTOM}(hjjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj>ubh or }(hj>hhhNhNubj)}(h``V4L2_FIELD_ALTERNATE``h]hV4L2_FIELD_ALTERNATE}(hj|hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj>ubh then height refers to the number of lines in the field, otherwise it refers to the number of lines in the frame (which is twice the field height for interlaced formats).}(hj>hhhNhNubeh}(h]h ]h"]h$]h&]uh1jhhhKhj;ubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]j)}(hhh](j)}(hX:cspan:`2` Applications set these fields to request an image size, drivers return the closest possible values. In case of planar formats the ``width`` and ``height`` applies to the largest plane. To avoid ambiguities drivers must return values rounded up to a multiple of the scale factor of any smaller planes. For example when the image format is YUV 4:2:0, ``width`` and ``height`` must be multiples of two.h](h Applications set these fields to request an image size, drivers return the closest possible values. In case of planar formats the }(hjhhhNhNubj)}(h ``width``h]hwidth}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh and }(hjhhhNhNubj)}(h ``height``h]hheight}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh applies to the largest plane. To avoid ambiguities drivers must return values rounded up to a multiple of the scale factor of any smaller planes. For example when the image format is YUV 4:2:0, }(hjhhhNhNubj)}(h ``width``h]hwidth}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh and }(hjhhhNhNubj)}(h ``height``h]hheight}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh must be multiples of two.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1jhhhKhjubj)}(hXFor compressed formats that contain the resolution information encoded inside the stream, when fed to a stateful mem2mem decoder, the fields may be zero to rely on the decoder to detect the right values. For more details see :ref:`decoder` and format descriptions.h](hFor compressed formats that contain the resolution information encoded inside the stream, when fed to a stateful mem2mem decoder, the fields may be zero to rely on the decoder to detect the right values. For more details see }(hjhhhNhNubh)}(h:ref:`decoder`h]hinline)}(hjh]hdecoder}(hj hhhNhNubah}(h]h ](xrefstdstd-refeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdoc#userspace-api/media/v4l/pixfmt-v4l2 refdomainjreftyperef refexplicitrefwarn reftargetdecoderuh1hhhhK$hjubh and format descriptions.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1jhhhK$hjubj)}(hX For compressed formats on the CAPTURE side of a stateful mem2mem encoder, the fields must be zero, since the coded size is expected to be calculated internally by the encoder itself, based on the OUTPUT side. For more details see :ref:`encoder` and format descriptions.h](hFor compressed formats on the CAPTURE side of a stateful mem2mem encoder, the fields must be zero, since the coded size is expected to be calculated internally by the encoder itself, based on the OUTPUT side. For more details see }(hj3hhhNhNubh)}(h:ref:`encoder`h]j )}(hj=h]hencoder}(hj?hhhNhNubah}(h]h ](jstdstd-refeh"]h$]h&]uh1jhj;ubah}(h]h ]h"]h$]h&]refdocj! refdomainjIreftyperef refexplicitrefwarnj'encoderuh1hhhhK)hj3ubh and format descriptions.}(hj3hhhNhNubeh}(h]h ]h"]h$]h&]uh1jhhhK)hjubeh}(h]h ]h"]h$]h&]morecolsKuh1jhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh]j)}(h__u32h]h__u32}(hjxhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhK-hjuubah}(h]h ]h"]h$]h&]uh1jhjrubj)}(hhh]j)}(h``pixelformat``h]j)}(hjh]h pixelformat}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhhhK.hjubah}(h]h ]h"]h$]h&]uh1jhjrubj)}(hhh]j)}(hX The pixel format or type of compression, set by the application. This is a little endian :ref:`four character code `. V4L2 defines standard RGB formats in :ref:`pixfmt-rgb`, YUV formats in :ref:`yuv-formats`, and reserved codes in :ref:`reserved-formats`h](hYThe pixel format or type of compression, set by the application. This is a little endian }(hjhhhNhNubh)}(h(:ref:`four character code `h]j )}(hjh]hfour character code}(hjhhhNhNubah}(h]h ](jstdstd-refeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj! refdomainjreftyperef refexplicitrefwarnj' v4l2-fourccuh1hhhhK/hjubh'. V4L2 defines standard RGB formats in }(hjhhhNhNubh)}(h:ref:`pixfmt-rgb`h]j )}(hjh]h pixfmt-rgb}(hjhhhNhNubah}(h]h ](jstdstd-refeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj! refdomainjreftyperef refexplicitrefwarnj' pixfmt-rgbuh1hhhhK/hjubh, YUV formats in }(hjhhhNhNubh)}(h:ref:`yuv-formats`h]j )}(hjh]h yuv-formats}(hjhhhNhNubah}(h]h ](jstdstd-refeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj! refdomainj reftyperef refexplicitrefwarnj' yuv-formatsuh1hhhhK/hjubh, and reserved codes in }(hjhhhNhNubh)}(h:ref:`reserved-formats`h]j )}(hj%h]hreserved-formats}(hj'hhhNhNubah}(h]h ](jstdstd-refeh"]h$]h&]uh1jhj#ubah}(h]h ]h"]h$]h&]refdocj! refdomainj1reftyperef refexplicitrefwarnj'reserved-formatsuh1hhhhK/hjubeh}(h]h ]h"]h$]h&]uh1jhhhK/hjubah}(h]h ]h"]h$]h&]uh1jhjrubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh]j)}(h__u32h]h__u32}(hj[hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhK5hjXubah}(h]h ]h"]h$]h&]uh1jhjUubj)}(hhh]j)}(h ``field``h]j)}(hjth]hfield}(hjvhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjrubah}(h]h ]h"]h$]h&]uh1jhhhK6hjoubah}(h]h ]h"]h$]h&]uh1jhjUubj)}(hhh]j)}(hXeField order, from enum :c:type:`v4l2_field`. Video images are typically interlaced. Applications can request to capture or output only the top or bottom field, or both fields interlaced or sequentially stored in one buffer or alternating in separate buffers. Drivers return the actual field order selected. For more details on fields see :ref:`field-order`.h](hField order, from enum }(hjhhhNhNubh)}(h:c:type:`v4l2_field`h]j)}(hjh]h v4l2_field}(hjhhhNhNubah}(h]h ](jjZc-typeeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj! refdomainjZreftypetype refexplicitrefwarn c:parent_keysphinx.domains.c LookupKey)}data]sbj' v4l2_fielduh1hhhhK7hjubhX'. Video images are typically interlaced. Applications can request to capture or output only the top or bottom field, or both fields interlaced or sequentially stored in one buffer or alternating in separate buffers. Drivers return the actual field order selected. For more details on fields see }(hjhhhNhNubh)}(h:ref:`field-order`h]j )}(hjh]h field-order}(hjhhhNhNubah}(h]h ](jstdstd-refeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj! refdomainjreftyperef refexplicitrefwarnj' field-orderuh1hhhhK7hjubh.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1jhhhK7hjubah}(h]h ]h"]h$]h&]uh1jhjUubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh]j)}(h__u32h]h__u32}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhK=hjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]j)}(h``bytesperline``h]j)}(hjh]h bytesperline}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhhhK>hjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]j)}(hDDistance in bytes between the leftmost pixels in two adjacent lines.h]hDDistance in bytes between the leftmost pixels in two adjacent lines.}(hj8hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhK?hj5ubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]j)}(hhh](j)}(h :cspan:`2`h]h}(h]h ]h"]h$]h&]uh1jhhhKAhjUubj)}(hXRBoth applications and drivers can set this field to request padding bytes at the end of each line. Drivers however may ignore the value requested by the application, returning ``width`` times bytes per pixel or a larger value required by the hardware. That implies applications can just set this field to zero to get a reasonable default.h](hBoth applications and drivers can set this field to request padding bytes at the end of each line. Drivers however may ignore the value requested by the application, returning }(hjbhhhNhNubj)}(h ``width``h]hwidth}(hjjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjbubh times bytes per pixel or a larger value required by the hardware. That implies applications can just set this field to zero to get a reasonable default.}(hjbhhhNhNubeh}(h]h ]h"]h$]h&]uh1jhhhKChjUubj)}(hX.Video hardware may access padding bytes, therefore they must reside in accessible memory. Consider cases where padding bytes after the last line of an image cross a system page boundary. Input devices may write padding bytes, the value is undefined. Output devices ignore the contents of padding bytes.h]hX.Video hardware may access padding bytes, therefore they must reside in accessible memory. Consider cases where padding bytes after the last line of an image cross a system page boundary. Input devices may write padding bytes, the value is undefined. Output devices ignore the contents of padding bytes.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKJhjUubj)}(hXWhen the image format is planar the ``bytesperline`` value applies to the first plane and is divided by the same factor as the ``width`` field for the other planes. For example the Cb and Cr planes of a YUV 4:2:0 image have half as many padding bytes following each line as the Y plane. To avoid ambiguities drivers must return a ``bytesperline`` value rounded up to a multiple of the scale factor.h](h$When the image format is planar the }(hjhhhNhNubj)}(h``bytesperline``h]h bytesperline}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubhK value applies to the first plane and is divided by the same factor as the }(hjhhhNhNubj)}(h ``width``h]hwidth}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh field for the other planes. For example the Cb and Cr planes of a YUV 4:2:0 image have half as many padding bytes following each line as the Y plane. To avoid ambiguities drivers must return a }(hjhhhNhNubj)}(h``bytesperline``h]h bytesperline}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh4 value rounded up to a multiple of the scale factor.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1jhhhKPhjUubj)}(h{For compressed formats the ``bytesperline`` value makes no sense. Applications and drivers must set this to 0 in that case.h](hFor compressed formats the }(hjhhhNhNubj)}(h``bytesperline``h]h bytesperline}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubhP value makes no sense. Applications and drivers must set this to 0 in that case.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1jhhhKXhjUubeh}(h]h ]h"]h$]h&]morecolsKuh1jhjRubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh]j)}(h__u32h]h__u32}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKZhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]j)}(h ``sizeimage``h]j)}(hj h]h sizeimage}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhhhK[hjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hXSize in bytes of the buffer to hold a complete image, set by the driver. Usually this is ``bytesperline`` times ``height``. When the image consists of variable length compressed data this is the number of bytes required by the codec to support the worst-case compression scenario.h](hYSize in bytes of the buffer to hold a complete image, set by the driver. Usually this is }(hj>hhhNhNubj)}(h``bytesperline``h]h bytesperline}(hjFhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj>ubh times }(hj>hhhNhNubj)}(h ``height``h]hheight}(hjXhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj>ubh. When the image consists of variable length compressed data this is the number of bytes required by the codec to support the worst-case compression scenario.}(hj>hhhNhNubeh}(h]h ]h"]h$]h&]uh1jhhhK\hj;ubj)}(h6The driver will set the value for uncompressed images.h]h6The driver will set the value for uncompressed images.}(hjphhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKbhj;ubj)}(hXClients are allowed to set the sizeimage field for variable length compressed data flagged with ``V4L2_FMT_FLAG_COMPRESSED`` at :ref:`VIDIOC_ENUM_FMT`, but the driver may ignore it and set the value itself, or it may modify the provided value based on alignment requirements or minimum/maximum size requirements. If the client wants to leave this to the driver, then it should set sizeimage to 0.h](h`Clients are allowed to set the sizeimage field for variable length compressed data flagged with }(hj~hhhNhNubj)}(h``V4L2_FMT_FLAG_COMPRESSED``h]hV4L2_FMT_FLAG_COMPRESSED}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj~ubh at }(hj~hhhNhNubh)}(h:ref:`VIDIOC_ENUM_FMT`h]j )}(hjh]hVIDIOC_ENUM_FMT}(hjhhhNhNubah}(h]h ](jstdstd-refeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj! refdomainjreftyperef refexplicitrefwarnj'vidioc_enum_fmtuh1hhhhKdhj~ubh, but the driver may ignore it and set the value itself, or it may modify the provided value based on alignment requirements or minimum/maximum size requirements. If the client wants to leave this to the driver, then it should set sizeimage to 0.}(hj~hhhNhNubeh}(h]h ]h"]h$]h&]uh1jhhhKdhj;ubeh}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh]j)}(h__u32h]h__u32}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKkhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]j)}(h``colorspace``h]j)}(hjh]h colorspace}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhhhKlhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]j)}(hXImage colorspace, from enum :c:type:`v4l2_colorspace`. This information supplements the ``pixelformat`` and must be set by the driver for capture streams and by the application for output streams, see :ref:`colorspaces`. If the application sets the flag ``V4L2_PIX_FMT_FLAG_SET_CSC`` then the application can set this field for a capture stream to request a specific colorspace for the captured image data. If the driver cannot handle requested conversion, it will return another supported colorspace. The driver indicates that colorspace conversion is supported by setting the flag V4L2_FMT_FLAG_CSC_COLORSPACE in the corresponding struct :c:type:`v4l2_fmtdesc` during enumeration. See :ref:`fmtdesc-flags`.h](hImage colorspace, from enum }(hj hhhNhNubh)}(h:c:type:`v4l2_colorspace`h]j)}(hjh]hv4l2_colorspace}(hjhhhNhNubah}(h]h ](jjZc-typeeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj! refdomainjZreftypetype refexplicitrefwarnjjj'v4l2_colorspaceuh1hhhhKmhj ubh#. This information supplements the }(hj hhhNhNubj)}(h``pixelformat``h]h pixelformat}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubhb and must be set by the driver for capture streams and by the application for output streams, see }(hj hhhNhNubh)}(h:ref:`colorspaces`h]j )}(hjJh]h colorspaces}(hjLhhhNhNubah}(h]h ](jstdstd-refeh"]h$]h&]uh1jhjHubah}(h]h ]h"]h$]h&]refdocj! refdomainjVreftyperef refexplicitrefwarnj' colorspacesuh1hhhhKmhj ubh#. If the application sets the flag }(hj hhhNhNubj)}(h``V4L2_PIX_FMT_FLAG_SET_CSC``h]hV4L2_PIX_FMT_FLAG_SET_CSC}(hjlhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubhXe then the application can set this field for a capture stream to request a specific colorspace for the captured image data. If the driver cannot handle requested conversion, it will return another supported colorspace. The driver indicates that colorspace conversion is supported by setting the flag V4L2_FMT_FLAG_CSC_COLORSPACE in the corresponding struct }(hj hhhNhNubh)}(h:c:type:`v4l2_fmtdesc`h]j)}(hjh]h v4l2_fmtdesc}(hjhhhNhNubah}(h]h ](jjZc-typeeh"]h$]h&]uh1jhj~ubah}(h]h ]h"]h$]h&]refdocj! refdomainjZreftypetype refexplicitrefwarnjjj' v4l2_fmtdescuh1hhhhKmhj ubh during enumeration. See }(hj hhhNhNubh)}(h:ref:`fmtdesc-flags`h]j )}(hjh]h fmtdesc-flags}(hjhhhNhNubah}(h]h ](jstdstd-refeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj! refdomainjreftyperef refexplicitrefwarnj' fmtdesc-flagsuh1hhhhKmhj ubh.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1jhhhKmhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh]j)}(h__u32h]h__u32}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKxhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]j)}(h``priv``h]j)}(hjh]hpriv}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhhhKyhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hXRThis field indicates whether the remaining fields of the struct :c:type:`v4l2_pix_format`, also called the extended fields, are valid. When set to ``V4L2_PIX_FMT_PRIV_MAGIC``, it indicates that the extended fields have been correctly initialized. When set to any other value it indicates that the extended fields contain undefined values.h](h@This field indicates whether the remaining fields of the struct }(hjhhhNhNubh)}(h:c:type:`v4l2_pix_format`h]j)}(hjh]hv4l2_pix_format}(hj hhhNhNubah}(h]h ](jjZc-typeeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj! refdomainjZreftypetype refexplicitrefwarnjjj'v4l2_pix_formatuh1hhhhKzhjubh:, also called the extended fields, are valid. When set to }(hjhhhNhNubj)}(h``V4L2_PIX_FMT_PRIV_MAGIC``h]hV4L2_PIX_FMT_PRIV_MAGIC}(hj?hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh, it indicates that the extended fields have been correctly initialized. When set to any other value it indicates that the extended fields contain undefined values.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1jhhhKzhjubj)}(hXPApplications that wish to use the pixel format extended fields must first ensure that the feature is supported by querying the device for the :ref:`V4L2_CAP_EXT_PIX_FORMAT ` capability. If the capability isn't set the pixel format extended fields are not supported and using the extended fields will lead to undefined results.h](hApplications that wish to use the pixel format extended fields must first ensure that the feature is supported by querying the device for the }(hjWhhhNhNubh)}(h):ref:`V4L2_CAP_EXT_PIX_FORMAT `h]j )}(hjah]hV4L2_CAP_EXT_PIX_FORMAT}(hjchhhNhNubah}(h]h ](jstdstd-refeh"]h$]h&]uh1jhj_ubah}(h]h ]h"]h$]h&]refdocj! refdomainjmreftyperef refexplicitrefwarnj'querycapuh1hhhhKhjWubh capability. If the capability isn’t set the pixel format extended fields are not supported and using the extended fields will lead to undefined results.}(hjWhhhNhNubeh}(h]h ]h"]h$]h&]uh1jhhhKhjubj)}(hTo use the extended fields, applications must set the ``priv`` field to ``V4L2_PIX_FMT_PRIV_MAGIC``, initialize all the extended fields and zero the unused bytes of the struct :c:type:`v4l2_format` ``raw_data`` field.h](h6To use the extended fields, applications must set the }(hjhhhNhNubj)}(h``priv``h]hpriv}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh field to }(hjhhhNhNubj)}(h``V4L2_PIX_FMT_PRIV_MAGIC``h]hV4L2_PIX_FMT_PRIV_MAGIC}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubhM, initialize all the extended fields and zero the unused bytes of the struct }(hjhhhNhNubh)}(h:c:type:`v4l2_format`h]j)}(hjh]h v4l2_format}(hjhhhNhNubah}(h]h ](jjZc-typeeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj! refdomainjZreftypetype refexplicitrefwarnjjj' v4l2_formatuh1hhhhKhjubh }(hjhhhNhNubj)}(h ``raw_data``h]hraw_data}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh field.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1jhhhKhjubj)}(hXWhen the ``priv`` field isn't set to ``V4L2_PIX_FMT_PRIV_MAGIC`` drivers must act as if all the extended fields were set to zero. On return drivers must set the ``priv`` field to ``V4L2_PIX_FMT_PRIV_MAGIC`` and all the extended fields to applicable values.h](h When the }(hjhhhNhNubj)}(h``priv``h]hpriv}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh field isn’t set to }(hjhhhNhNubj)}(h``V4L2_PIX_FMT_PRIV_MAGIC``h]hV4L2_PIX_FMT_PRIV_MAGIC}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubha drivers must act as if all the extended fields were set to zero. On return drivers must set the }(hjhhhNhNubj)}(h``priv``h]hpriv}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh field to }(hjhhhNhNubj)}(h``V4L2_PIX_FMT_PRIV_MAGIC``h]hV4L2_PIX_FMT_PRIV_MAGIC}(hj. hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh2 and all the extended fields to applicable values.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1jhhhKhjubeh}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh]j)}(h__u32h]h__u32}(hjX hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKhjU ubah}(h]h ]h"]h$]h&]uh1jhjR ubj)}(hhh]j)}(h ``flags``h]j)}(hjq h]hflags}(hjs hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjo ubah}(h]h ]h"]h$]h&]uh1jhhhKhjl ubah}(h]h ]h"]h$]h&]uh1jhjR ubj)}(hhh]j)}(h@Flags set by the application or driver, see :ref:`format-flags`.h](h,Flags set by the application or driver, see }(hj hhhNhNubh)}(h:ref:`format-flags`h]j )}(hj h]h format-flags}(hj hhhNhNubah}(h]h ](jstdstd-refeh"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]refdocj! refdomainj reftyperef refexplicitrefwarnj' format-flagsuh1hhhhKhj ubh.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1jhhhKhj ubah}(h]h ]h"]h$]h&]uh1jhjR ubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh]j)}(hunion {h]hunion {}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKhj ubah}(h]h ]h"]h$]h&]uh1jhj ubj)}(hhh]j)}(h (anonymous)h]h (anonymous)}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKhj ubah}(h]h ]h"]h$]h&]morecolsKuh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh]j)}(h__u32h]h__u32}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKhj ubah}(h]h ]h"]h$]h&]uh1jhj ubj)}(hhh]j)}(h ``ycbcr_enc``h]j)}(hj$ h]h ycbcr_enc}(hj& hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj" ubah}(h]h ]h"]h$]h&]uh1jhhhKhj ubah}(h]h ]h"]h$]h&]uh1jhj ubj)}(hhh]j)}(hXY'CbCr encoding, from enum :c:type:`v4l2_ycbcr_encoding`. This information supplements the ``colorspace`` and must be set by the driver for capture streams and by the application for output streams, see :ref:`colorspaces`. If the application sets the flag ``V4L2_PIX_FMT_FLAG_SET_CSC`` then the application can set this field for a capture stream to request a specific Y'CbCr encoding for the captured image data. If the driver cannot handle requested conversion, it will return another supported encoding. This field is ignored for HSV pixelformats. The driver indicates that ycbcr_enc conversion is supported by setting the flag V4L2_FMT_FLAG_CSC_YCBCR_ENC in the corresponding struct :c:type:`v4l2_fmtdesc` during enumeration. See :ref:`fmtdesc-flags`.h](hY’CbCr encoding, from enum }(hjB hhhNhNubh)}(h:c:type:`v4l2_ycbcr_encoding`h]j)}(hjL h]hv4l2_ycbcr_encoding}(hjN hhhNhNubah}(h]h ](jjZc-typeeh"]h$]h&]uh1jhjJ ubah}(h]h ]h"]h$]h&]refdocj! refdomainjZreftypetype refexplicitrefwarnjjj'v4l2_ycbcr_encodinguh1hhhhKhjB ubh#. This information supplements the }(hjB hhhNhNubj)}(h``colorspace``h]h colorspace}(hjm hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjB ubhb and must be set by the driver for capture streams and by the application for output streams, see }(hjB hhhNhNubh)}(h:ref:`colorspaces`h]j )}(hj h]h colorspaces}(hj hhhNhNubah}(h]h ](jstdstd-refeh"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]refdocj! refdomainj reftyperef refexplicitrefwarnj' colorspacesuh1hhhhKhjB ubh#. If the application sets the flag }(hjB hhhNhNubj)}(h``V4L2_PIX_FMT_FLAG_SET_CSC``h]hV4L2_PIX_FMT_FLAG_SET_CSC}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjB ubhX then the application can set this field for a capture stream to request a specific Y’CbCr encoding for the captured image data. If the driver cannot handle requested conversion, it will return another supported encoding. This field is ignored for HSV pixelformats. The driver indicates that ycbcr_enc conversion is supported by setting the flag V4L2_FMT_FLAG_CSC_YCBCR_ENC in the corresponding struct }(hjB hhhNhNubh)}(h:c:type:`v4l2_fmtdesc`h]j)}(hj h]h v4l2_fmtdesc}(hj hhhNhNubah}(h]h ](jjZc-typeeh"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]refdocj! refdomainjZreftypetype refexplicitrefwarnjjj' v4l2_fmtdescuh1hhhhKhjB ubh during enumeration. See }(hjB hhhNhNubh)}(h:ref:`fmtdesc-flags`h]j )}(hj h]h fmtdesc-flags}(hj hhhNhNubah}(h]h ](jstdstd-refeh"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]refdocj! refdomainj reftyperef refexplicitrefwarnj' fmtdesc-flagsuh1hhhhKhjB ubh.}(hjB hhhNhNubeh}(h]h ]h"]h$]h&]uh1jhhhKhj? ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh]j)}(h__u32h]h__u32}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKhj ubah}(h]h ]h"]h$]h&]uh1jhj ubj)}(hhh]j)}(h ``hsv_enc``h]j)}(hj- h]hhsv_enc}(hj/ hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj+ ubah}(h]h ]h"]h$]h&]uh1jhhhKhj( ubah}(h]h ]h"]h$]h&]uh1jhj ubj)}(hhh]j)}(hXHSV encoding, from enum :c:type:`v4l2_hsv_encoding`. This information supplements the ``colorspace`` and must be set by the driver for capture streams and by the application for output streams, see :ref:`colorspaces`. If the application sets the flag ``V4L2_PIX_FMT_FLAG_SET_CSC`` then the application can set this field for a capture stream to request a specific HSV encoding for the captured image data. If the driver cannot handle requested conversion, it will return another supported encoding. This field is ignored for non-HSV pixelformats. The driver indicates that hsv_enc conversion is supported by setting the flag V4L2_FMT_FLAG_CSC_HSV_ENC in the corresponding struct :c:type:`v4l2_fmtdesc` during enumeration. See :ref:`fmtdesc-flags`.h](hHSV encoding, from enum }(hjK hhhNhNubh)}(h:c:type:`v4l2_hsv_encoding`h]j)}(hjU h]hv4l2_hsv_encoding}(hjW hhhNhNubah}(h]h ](jjZc-typeeh"]h$]h&]uh1jhjS ubah}(h]h ]h"]h$]h&]refdocj! refdomainjZreftypetype refexplicitrefwarnjjj'v4l2_hsv_encodinguh1hhhhKhjK ubh#. This information supplements the }(hjK hhhNhNubj)}(h``colorspace``h]h colorspace}(hjv hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjK ubhb and must be set by the driver for capture streams and by the application for output streams, see }(hjK hhhNhNubh)}(h:ref:`colorspaces`h]j )}(hj h]h colorspaces}(hj hhhNhNubah}(h]h ](jstdstd-refeh"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]refdocj! refdomainj reftyperef refexplicitrefwarnj' colorspacesuh1hhhhKhjK ubh#. If the application sets the flag }(hjK hhhNhNubj)}(h``V4L2_PIX_FMT_FLAG_SET_CSC``h]hV4L2_PIX_FMT_FLAG_SET_CSC}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjK ubhX then the application can set this field for a capture stream to request a specific HSV encoding for the captured image data. If the driver cannot handle requested conversion, it will return another supported encoding. This field is ignored for non-HSV pixelformats. The driver indicates that hsv_enc conversion is supported by setting the flag V4L2_FMT_FLAG_CSC_HSV_ENC in the corresponding struct }(hjK hhhNhNubh)}(h:c:type:`v4l2_fmtdesc`h]j)}(hj h]h v4l2_fmtdesc}(hj hhhNhNubah}(h]h ](jjZc-typeeh"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]refdocj! refdomainjZreftypetype refexplicitrefwarnjjj' v4l2_fmtdescuh1hhhhKhjK ubh during enumeration. See }(hjK hhhNhNubh)}(h:ref:`fmtdesc-flags`h]j )}(hj h]h fmtdesc-flags}(hj hhhNhNubah}(h]h ](jstdstd-refeh"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]refdocj! refdomainj reftyperef refexplicitrefwarnj' fmtdesc-flagsuh1hhhhKhjK ubh.}(hjK hhhNhNubeh}(h]h ]h"]h$]h&]uh1jhhhKhjH ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh]j)}(h}h]h}}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKhj ubah}(h]h ]h"]h$]h&]uh1jhj ubj)}(hhh]h}(h]h ]h"]h$]h&]morecolsKuh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh]j)}(h__u32h]h__u32}(hjG hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKhjD ubah}(h]h ]h"]h$]h&]uh1jhjA ubj)}(hhh]j)}(h``quantization``h]j)}(hj` h]h quantization}(hjb hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj^ ubah}(h]h ]h"]h$]h&]uh1jhhhKhj[ ubah}(h]h ]h"]h$]h&]uh1jhjA ubj)}(hhh]j)}(hXQuantization range, from enum :c:type:`v4l2_quantization`. This information supplements the ``colorspace`` and must be set by the driver for capture streams and by the application for output streams, see :ref:`colorspaces`. If the application sets the flag ``V4L2_PIX_FMT_FLAG_SET_CSC`` then the application can set this field for a capture stream to request a specific quantization range for the captured image data. If the driver cannot handle requested conversion, it will return another supported quantization. The driver indicates that quantization conversion is supported by setting the flag V4L2_FMT_FLAG_CSC_QUANTIZATION in the corresponding struct :c:type:`v4l2_fmtdesc` during enumeration. See :ref:`fmtdesc-flags`.h](hQuantization range, from enum }(hj~ hhhNhNubh)}(h:c:type:`v4l2_quantization`h]j)}(hj h]hv4l2_quantization}(hj hhhNhNubah}(h]h ](jjZc-typeeh"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]refdocj! refdomainjZreftypetype refexplicitrefwarnjjj'v4l2_quantizationuh1hhhhKhj~ ubh#. This information supplements the }(hj~ hhhNhNubj)}(h``colorspace``h]h colorspace}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj~ ubhb and must be set by the driver for capture streams and by the application for output streams, see }(hj~ hhhNhNubh)}(h:ref:`colorspaces`h]j )}(hj h]h colorspaces}(hj hhhNhNubah}(h]h ](jstdstd-refeh"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]refdocj! refdomainj reftyperef refexplicitrefwarnj' colorspacesuh1hhhhKhj~ ubh#. If the application sets the flag }(hj~ hhhNhNubj)}(h``V4L2_PIX_FMT_FLAG_SET_CSC``h]hV4L2_PIX_FMT_FLAG_SET_CSC}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj~ ubhXs then the application can set this field for a capture stream to request a specific quantization range for the captured image data. If the driver cannot handle requested conversion, it will return another supported quantization. The driver indicates that quantization conversion is supported by setting the flag V4L2_FMT_FLAG_CSC_QUANTIZATION in the corresponding struct }(hj~ hhhNhNubh)}(h:c:type:`v4l2_fmtdesc`h]j)}(hj h]h v4l2_fmtdesc}(hj hhhNhNubah}(h]h ](jjZc-typeeh"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]refdocj! refdomainjZreftypetype refexplicitrefwarnjjj' v4l2_fmtdescuh1hhhhKhj~ ubh during enumeration. See }(hj~ hhhNhNubh)}(h:ref:`fmtdesc-flags`h]j )}(hj h]h fmtdesc-flags}(hj hhhNhNubah}(h]h ](jstdstd-refeh"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]refdocj! refdomainj" reftyperef refexplicitrefwarnj' fmtdesc-flagsuh1hhhhKhj~ ubh.}(hj~ hhhNhNubeh}(h]h ]h"]h$]h&]uh1jhhhKhj{ ubah}(h]h ]h"]h$]h&]uh1jhjA ubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh]j)}(h__u32h]h__u32}(hjP hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKhjM ubah}(h]h ]h"]h$]h&]uh1jhjJ ubj)}(hhh]j)}(h ``xfer_func``h]j)}(hji h]h xfer_func}(hjk hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjg ubah}(h]h ]h"]h$]h&]uh1jhhhKhjd ubah}(h]h ]h"]h$]h&]uh1jhjJ ubj)}(hhh]j)}(hXTransfer function, from enum :c:type:`v4l2_xfer_func`. This information supplements the ``colorspace`` and must be set by the driver for capture streams and by the application for output streams, see :ref:`colorspaces`. If the application sets the flag ``V4L2_PIX_FMT_FLAG_SET_CSC`` then the application can set this field for a capture stream to request a specific transfer function for the captured image data. If the driver cannot handle requested conversion, it will return another supported transfer function. The driver indicates that xfer_func conversion is supported by setting the flag V4L2_FMT_FLAG_CSC_XFER_FUNC in the corresponding struct :c:type:`v4l2_fmtdesc` during enumeration. See :ref:`fmtdesc-flags`.h](hTransfer function, from enum }(hj hhhNhNubh)}(h:c:type:`v4l2_xfer_func`h]j)}(hj h]hv4l2_xfer_func}(hj hhhNhNubah}(h]h ](jjZc-typeeh"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]refdocj! refdomainjZreftypetype refexplicitrefwarnjjj'v4l2_xfer_funcuh1hhhhKhj ubh#. This information supplements the }(hj hhhNhNubj)}(h``colorspace``h]h colorspace}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubhb and must be set by the driver for capture streams and by the application for output streams, see }(hj hhhNhNubh)}(h:ref:`colorspaces`h]j )}(hj h]h colorspaces}(hj hhhNhNubah}(h]h ](jstdstd-refeh"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]refdocj! refdomainj reftyperef refexplicitrefwarnj' colorspacesuh1hhhhKhj ubh#. If the application sets the flag }(hj hhhNhNubj)}(h``V4L2_PIX_FMT_FLAG_SET_CSC``h]hV4L2_PIX_FMT_FLAG_SET_CSC}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubhXq then the application can set this field for a capture stream to request a specific transfer function for the captured image data. If the driver cannot handle requested conversion, it will return another supported transfer function. The driver indicates that xfer_func conversion is supported by setting the flag V4L2_FMT_FLAG_CSC_XFER_FUNC in the corresponding struct }(hj hhhNhNubh)}(h:c:type:`v4l2_fmtdesc`h]j)}(hj h]h v4l2_fmtdesc}(hj hhhNhNubah}(h]h ](jjZc-typeeh"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]refdocj! refdomainjZreftypetype refexplicitrefwarnjjj' v4l2_fmtdescuh1hhhhKhj ubh during enumeration. See }(hj hhhNhNubh)}(h:ref:`fmtdesc-flags`h]j )}(hjh]h fmtdesc-flags}(hj!hhhNhNubah}(h]h ](jstdstd-refeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj! refdomainj+reftyperef refexplicitrefwarnj' fmtdesc-flagsuh1hhhhKhj ubh.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1jhhhKhj ubah}(h]h ]h"]h$]h&]uh1jhjJ ubeh}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjzubeh}(h]h ]h"]h$]h&]colsKuh1jxhjgubeh}(h]id1ah ] longtableah"]h$]h&]uh1jehhhhhNhNubh)}(hhh]h}(h]h ]h"]h$]h&]hԌ|p{6.8cm}|p{2.3cm}|p{8.2cm}|uh1hhhhKhhhhubhtarget)}(h.. _format-flags:h]h}(h]h ]h"]h$]h&]refid format-flagsuh1jrhKhhhhhhubjf)}(hhh](h)}(h Format Flagsh]h Format Flags}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubjy)}(hhh](j~)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1j}hjubj~)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1j}hjubj~)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1j}hjubj)}(hhh](j)}(hhh](j)}(hhh]j)}(h"``V4L2_PIX_FMT_FLAG_PREMUL_ALPHA``h]j)}(hjh]hV4L2_PIX_FMT_FLAG_PREMUL_ALPHA}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]j)}(h 0x00000001h]h 0x00000001}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]j)}(hXThe color values are premultiplied by the alpha channel value. For example, if a light blue pixel with 50% transparency was described by RGBA values (128, 192, 255, 128), the same pixel described with premultiplied colors would be described by RGBA values (64, 96, 128, 128)h]hXThe color values are premultiplied by the alpha channel value. For example, if a light blue pixel with 50% transparency was described by RGBA values (128, 192, 255, 128), the same pixel described with premultiplied colors would be described by RGBA values (64, 96, 128, 128)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh](js)}(h .. _`v4l2-pix-fmt-flag-set-csc`:h]h}(h]h ]h"]h$]h&]j~v4l2-pix-fmt-flag-set-cscuh1jrhKhj)}(hhh](jj)}(hXSet by the application. It is only used for capture and is ignored for output streams. If set, then request the device to do colorspace conversion from the received colorspace to the requested colorspace values. If the colorimetry field (``colorspace``, ``xfer_func``, ``ycbcr_enc``, ``hsv_enc`` or ``quantization``) is set to ``*_DEFAULT``, then that colorimetry setting will remain unchanged from what was received. So in order to change the quantization, only the ``quantization`` field shall be set to non default value (``V4L2_QUANTIZATION_FULL_RANGE`` or ``V4L2_QUANTIZATION_LIM_RANGE``) and all other colorimetry fields shall be set to ``*_DEFAULT``.h](hSet by the application. It is only used for capture and is ignored for output streams. If set, then request the device to do colorspace conversion from the received colorspace to the requested colorspace values. If the colorimetry field (}(hj hhhNhNubj)}(h``colorspace``h]h colorspace}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubh, }(hj hhhNhNubj)}(h ``xfer_func``h]h xfer_func}(hj:hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubh, }(hj hhhNhNubj)}(h ``ycbcr_enc``h]h ycbcr_enc}(hjLhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubh, }hj sbj)}(h ``hsv_enc``h]hhsv_enc}(hj^hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubh or }(hj hhhNhNubj)}(h``quantization``h]h quantization}(hjphhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubh ) is set to }(hj hhhNhNubj)}(h ``*_DEFAULT``h]h *_DEFAULT}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubh, then that colorimetry setting will remain unchanged from what was received. So in order to change the quantization, only the }(hj hhhNhNubj)}(h``quantization``h]h quantization}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubh* field shall be set to non default value (}(hj hhhNhNubj)}(h ``V4L2_QUANTIZATION_FULL_RANGE``h]hV4L2_QUANTIZATION_FULL_RANGE}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubh or }(hj hhhNhNubj)}(h``V4L2_QUANTIZATION_LIM_RANGE``h]hV4L2_QUANTIZATION_LIM_RANGE}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubh3) and all other colorimetry fields shall be set to }(hj hhhNhNubj)}(h ``*_DEFAULT``h]h *_DEFAULT}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubh.}(hj hhhNhNubeh}(h]jah ]h"]v4l2-pix-fmt-flag-set-cscah$]h&]uh1jhhhKhjexpect_referenced_by_name}jjsexpect_referenced_by_id}jjsubj)}(hpTo check which conversions are supported by the hardware for the current pixel format, see :ref:`fmtdesc-flags`.h](h[To check which conversions are supported by the hardware for the current pixel format, see }(hjhhhNhNubh)}(h:ref:`fmtdesc-flags`h]j )}(hjh]h fmtdesc-flags}(hjhhhNhNubah}(h]h ](jstdstd-refeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj! refdomainjreftyperef refexplicitrefwarnj' fmtdesc-flagsuh1hhhhKhjubh.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1jhhhKhjubeh}(h]h ]h"]h$]h&]uh1jhj ububj)}(h``V4L2_PIX_FMT_FLAG_SET_CSC``h]j)}(hj!h]hV4L2_PIX_FMT_FLAG_SET_CSC}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhhhKhjubeh}(h]h ]h"]h$]h&]uh1jhj ubj)}(hhh](jj)}(h 0x00000002h]h 0x00000002}(hj?hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKhj<ubeh}(h]h ]h"]h$]h&]uh1jhj ubjeh}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]colsKuh1jxhjubeh}(h](id2jeh ]h"] format-flagsah$]h&]uh1jehhhhhNhNj}jkjtsj}jjtsubeh}(h]single-planar-format-structureah ]h"]single-planar format structureah$]h&]uh1hhhhhhhhKubeh}(h]h ]h"]h$]h&]sourcehuh1hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(hN generatorN datestampN source_linkN source_urlN toc_backlinksjfootnote_backlinksK sectnum_xformKstrip_commentsNstrip_elements_with_classesN strip_classesN report_levelK halt_levelKexit_status_levelKdebugNwarning_streamN tracebackinput_encoding utf-8-siginput_encoding_error_handlerstrictoutput_encodingutf-8output_encoding_error_handlerjerror_encodingutf-8error_encoding_error_handlerbackslashreplace language_codeenrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourceh _destinationN _config_files]7/var/lib/git/docbuild/linux/Documentation/docutils.confafile_insertion_enabled raw_enabledKline_length_limitM'pep_referencesN pep_base_urlhttps://peps.python.org/pep_file_url_templatepep-%04drfc_referencesN rfc_base_url&https://datatracker.ietf.org/doc/html/ tab_widthKtrim_footnote_reference_spacesyntax_highlightlong smart_quotessmartquotes_locales]character_level_inline_markupdoctitle_xform docinfo_xformKsectsubtitle_xform image_loadinglinkembed_stylesheetcloak_email_addressessection_self_linkenvNubreporterNindirect_targets]substitution_defs}substitution_names}refnames}refids}(j]jtaj]jaunameids}(jujrjkjjju nametypes}(jujkjuh}(jrhhhjjjj jbjgjhju footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}jKsRparse_messages]hsystem_message)}(hhh]j)}(heUnexpected possible title overline or transition. Treating it as ordinary text because it's so short.h]hgUnexpected possible title overline or transition. Treating it as ordinary text because it’s so short.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]levelKtypeINFOlineKsourcehuh1jhj ubatransform_messages](j)}(hhh]j)}(hhh]h2Hyperlink target "format-flags" is not referenced.}hj!sbah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]levelKtypejsourcehlineKuh1jubj)}(hhh]j)}(hhh]h?Hyperlink target "v4l2-pix-fmt-flag-set-csc" is not referenced.}hj;sbah}(h]h ]h"]h$]h&]uh1jhj8ubah}(h]h ]h"]h$]h&]levelKtypejlineKsourcehuh1jubj)}(hhh]j)}(hhh]h?Hyperlink target "v4l2-pix-fmt-flag-set-csc" is not referenced.}hjUsbah}(h]h ]h"]h$]h&]uh1jhjRubah}(h]h ]h"]h$]h&]levelKtypejlineKsourcehuh1jubj)}(hhh]j)}(hhh]h?Hyperlink target "v4l2-pix-fmt-flag-set-csc" is not referenced.}hjosbah}(h]h ]h"]h$]h&]uh1jhjlubah}(h]h ]h"]h$]h&]levelKtypejlineKsourcehuh1jube transformerN include_log] decorationNhhub.