Msphinx.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]hPortuguese (Brazilian)}hhsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget7/translations/pt_BR/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](singleV4L.v4l2_pix_format (C type)c.V4L.v4l2_pix_formathNtauh1hhhhhhNhNubhdesc)}(hhh](hdesc_signature)}(hv4l2_pix_formath]hdesc_signature_line)}(htype v4l2_pix_formath](hdesc_sig_keyword)}(htypeh]htype}(hjhhhNhNubah}(h]h ]kah"]h$]h&]uh1j hjhhhhhK ubhdesc_sig_space)}(h h]h }(hjhhhNhNubah}(h]h ]wah"]h$]h&]uh1jhjhhhhhK ubh desc_name)}(hv4l2_pix_formath]h desc_sig_name)}(hjh]hv4l2_pix_format}(hj6hhhNhNubah}(h]h ]nah"]h$]h&]uh1j4hj0ubah}(h]h ](sig-namedescnameeh"]h$]h&]hhuh1j.hjhhhhhK ubeh}(h]h ]h"]h$]h&]hhƌ add_permalinkuh1jsphinx_line_type declaratorhjhhhhhK ubah}(h]hah ](sig sig-objecteh"]h$]h&] is_multiline _toc_parts) _toc_namehuh1jhhhK hhhhubh desc_content)}(hhh]h}(h]h ]h"]h$]h&]uh1j`hhhhhhhK ubeh}(h]h ](ctypeeh"]h$]h&]domainjnobjtypejodesctypejonoindex noindexentrynocontentsentryuh1hhhhhhNhNubhtable)}(hhh](h)}(hstruct v4l2_pix_formath]hstruct v4l2_pix_format}(hj~hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj{ubhtgroup)}(hhh](hcolspec)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jhjubj)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jhjubj)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jhjubhtbody)}(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)}(hj4h]hheight}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj2ubah}(h]h ]h"]h$]h&]uh1jhhhKhj/ubah}(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 }(hjRhhhNhNubj)}(h ``field``h]hfield}(hjZhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjRubh is one of }(hjRhhhNhNubj)}(h``V4L2_FIELD_TOP``h]hV4L2_FIELD_TOP}(hjlhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjRubh, }(hjRhhhNhNubj)}(h``V4L2_FIELD_BOTTOM``h]hV4L2_FIELD_BOTTOM}(hj~hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjRubh or }(hjRhhhNhNubj)}(h``V4L2_FIELD_ALTERNATE``h]hV4L2_FIELD_ALTERNATE}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjRubh 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).}(hjRhhhNhNubeh}(h]h ]h"]h$]h&]uh1jhhhKhjOubah}(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}(hjhhhNhNubah}(h]h ](xrefstdstd-refeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdoc#userspace-api/media/v4l/pixfmt-v4l2 refdomainj)reftyperef 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 }(hjGhhhNhNubh)}(h:ref:`encoder`h]j)}(hjQh]hencoder}(hjShhhNhNubah}(h]h ](j(stdstd-refeh"]h$]h&]uh1jhjOubah}(h]h ]h"]h$]h&]refdocj5 refdomainj]reftyperef refexplicitrefwarnj;encoderuh1hhhhK*hjGubh and format descriptions.}(hjGhhhNhNubeh}(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}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhK.hjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(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&]uh1jhjubj)}(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 ](j(stdstd-refeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj5 refdomainjreftyperef refexplicitrefwarnj; v4l2-fourccuh1hhhhK0hjubh'. V4L2 defines standard RGB formats in }(hjhhhNhNubh)}(h:ref:`pixfmt-rgb`h]j)}(hjh]h pixfmt-rgb}(hjhhhNhNubah}(h]h ](j(stdstd-refeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj5 refdomainjreftyperef refexplicitrefwarnj; pixfmt-rgbuh1hhhhK0hjubh, YUV formats in }(hjhhhNhNubh)}(h:ref:`yuv-formats`h]j)}(hjh]h yuv-formats}(hjhhhNhNubah}(h]h ](j(stdstd-refeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj5 refdomainj!reftyperef refexplicitrefwarnj; yuv-formatsuh1hhhhK0hjubh, and reserved codes in }(hjhhhNhNubh)}(h:ref:`reserved-formats`h]j)}(hj9h]hreserved-formats}(hj;hhhNhNubah}(h]h ](j(stdstd-refeh"]h$]h&]uh1jhj7ubah}(h]h ]h"]h$]h&]refdocj5 refdomainjEreftyperef refexplicitrefwarnj;reserved-formatsuh1hhhhK0hjubeh}(h]h ]h"]h$]h&]uh1jhhhK0hjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh]j)}(h__u32h]h__u32}(hjohhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhK6hjlubah}(h]h ]h"]h$]h&]uh1jhjiubj)}(hhh]j)}(h ``field``h]j)}(hjh]hfield}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhhhK7hjubah}(h]h ]h"]h$]h&]uh1jhjiubj)}(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 ](j(jnc-typeeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj5 refdomainjnreftypetype refexplicitrefwarn c:parent_keysphinx.domains.c LookupKey)}data]j ASTIdentifier)} identifierV4LsbNasbj; v4l2_fielduh1hhhhK8hjubhX'. 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 ](j(stdstd-refeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj5 refdomainjreftyperef refexplicitrefwarnj; field-orderuh1hhhhK8hjubh.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1jhhhK8hjubah}(h]h ]h"]h$]h&]uh1jhjiubeh}(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)}(hj5h]h bytesperline}(hj7hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj3ubah}(h]h ]h"]h$]h&]uh1jhhhK?hj0ubah}(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.}(hjShhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhK@hjPubah}(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&]uh1jhhhKBhjpubj)}(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 }(hj}hhhNhNubj)}(h ``width``h]hwidth}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj}ubh 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.}(hj}hhhNhNubeh}(h]h ]h"]h$]h&]uh1jhhhKDhjpubj)}(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&]uh1jhhhKKhjpubj)}(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&]uh1jhhhKQhjpubj)}(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&]uh1jhhhKYhjpubeh}(h]h ]h"]h$]h&]morecolsKuh1jhjmubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh]j)}(h__u32h]h__u32}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhK[hjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]j)}(h ``sizeimage``h]j)}(hj;h]h sizeimage}(hj=hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj9ubah}(h]h ]h"]h$]h&]uh1jhhhK\hj6ubah}(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 }(hjYhhhNhNubj)}(h``bytesperline``h]h bytesperline}(hjahhhNhNubah}(h]h ]h"]h$]h&]uh1jhjYubh times }(hjYhhhNhNubj)}(h ``height``h]hheight}(hjshhhNhNubah}(h]h ]h"]h$]h&]uh1jhjYubh. 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.}(hjYhhhNhNubeh}(h]h ]h"]h$]h&]uh1jhhhK]hjVubj)}(h6The driver will set the value for uncompressed images.h]h6The driver will set the value for uncompressed images.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKchjVubj)}(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 }(hjhhhNhNubj)}(h``V4L2_FMT_FLAG_COMPRESSED``h]hV4L2_FMT_FLAG_COMPRESSED}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh at }(hjhhhNhNubh)}(h:ref:`VIDIOC_ENUM_FMT`h]j)}(hjh]hVIDIOC_ENUM_FMT}(hjhhhNhNubah}(h]h ](j(stdstd-refeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj5 refdomainjreftyperef refexplicitrefwarnj;vidioc_enum_fmtuh1hhhhKehjubh, 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.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1jhhhKehjVubeh}(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&]uh1jhhhKlhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]j)}(h``colorspace``h]j)}(hjh]h colorspace}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhhhKmhjubah}(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)}(hj0h]hv4l2_colorspace}(hj2hhhNhNubah}(h]h ](j(jnc-typeeh"]h$]h&]uh1jhj.ubah}(h]h ]h"]h$]h&]refdocj5 refdomainjnreftypetype refexplicitrefwarnjjj;v4l2_colorspaceuh1hhhhKnhj&ubh#. This information supplements the }(hj&hhhNhNubj)}(h``pixelformat``h]h pixelformat}(hjQhhhNhNubah}(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)}(hjeh]h colorspaces}(hjghhhNhNubah}(h]h ](j(stdstd-refeh"]h$]h&]uh1jhjcubah}(h]h ]h"]h$]h&]refdocj5 refdomainjqreftyperef refexplicitrefwarnj; colorspacesuh1hhhhKnhj&ubh#. If the application sets the flag }(hj&hhhNhNubj)}(h``V4L2_PIX_FMT_FLAG_SET_CSC``h]hV4L2_PIX_FMT_FLAG_SET_CSC}(hjhhhNhNubah}(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 ](j(jnc-typeeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj5 refdomainjnreftypetype refexplicitrefwarnjjj; v4l2_fmtdescuh1hhhhKnhj&ubh during enumeration. See }(hj&hhhNhNubh)}(h:ref:`fmtdesc-flags`h]j)}(hjh]h fmtdesc-flags}(hjhhhNhNubah}(h]h ](j(stdstd-refeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj5 refdomainjreftyperef refexplicitrefwarnj; fmtdesc-flagsuh1hhhhKnhj&ubh.}(hj&hhhNhNubeh}(h]h ]h"]h$]h&]uh1jhhhKnhj#ubah}(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&]uh1jhhhKyhjubah}(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&]uh1jhhhKzhj ubah}(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 }(hj/hhhNhNubh)}(h:c:type:`v4l2_pix_format`h]j)}(hj9h]hv4l2_pix_format}(hj;hhhNhNubah}(h]h ](j(jnc-typeeh"]h$]h&]uh1jhj7ubah}(h]h ]h"]h$]h&]refdocj5 refdomainjnreftypetype refexplicitrefwarnjjj;v4l2_pix_formatuh1hhhhK{hj/ubh:, also called the extended fields, are valid. When set to }(hj/hhhNhNubj)}(h``V4L2_PIX_FMT_PRIV_MAGIC``h]hV4L2_PIX_FMT_PRIV_MAGIC}(hjZhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj/ubh, 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.}(hj/hhhNhNubeh}(h]h ]h"]h$]h&]uh1jhhhK{hj,ubj)}(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 }(hjrhhhNhNubh)}(h):ref:`V4L2_CAP_EXT_PIX_FORMAT `h]j)}(hj|h]hV4L2_CAP_EXT_PIX_FORMAT}(hj~hhhNhNubah}(h]h ](j(stdstd-refeh"]h$]h&]uh1jhjzubah}(h]h ]h"]h$]h&]refdocj5 refdomainjreftyperef refexplicitrefwarnj;querycapuh1hhhhKhjrubh 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.}(hjrhhhNhNubeh}(h]h ]h"]h$]h&]uh1jhhhKhj,ubj)}(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 ](j(jnc-typeeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj5 refdomainjnreftypetype refexplicitrefwarnjjj; v4l2_formatuh1hhhhKhjubh }(hjhhhNhNubj)}(h ``raw_data``h]hraw_data}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh field.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1jhhhKhj,ubj)}(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 }(hj hhhNhNubj)}(h``priv``h]hpriv}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubh field isn’t set to }(hj hhhNhNubj)}(h``V4L2_PIX_FMT_PRIV_MAGIC``h]hV4L2_PIX_FMT_PRIV_MAGIC}(hj% hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubha drivers must act as if all the extended fields were set to zero. On return drivers must set the }(hj hhhNhNubj)}(h``priv``h]hpriv}(hj7 hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubh field to }(hj hhhNhNubj)}(h``V4L2_PIX_FMT_PRIV_MAGIC``h]hV4L2_PIX_FMT_PRIV_MAGIC}(hjI hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubh2 and all the extended fields to applicable values.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1jhhhKhj,ubeh}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh]j)}(h__u32h]h__u32}(hjs hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKhjp ubah}(h]h ]h"]h$]h&]uh1jhjm ubj)}(hhh]j)}(h ``flags``h]j)}(hj h]hflags}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1jhhhKhj ubah}(h]h ]h"]h$]h&]uh1jhjm 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 ](j(stdstd-refeh"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]refdocj5 refdomainj reftyperef refexplicitrefwarnj; format-flagsuh1hhhhKhj ubh.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1jhhhKhj ubah}(h]h ]h"]h$]h&]uh1jhjm 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}(hjA 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 }(hj] hhhNhNubh)}(h:c:type:`v4l2_ycbcr_encoding`h]j)}(hjg h]hv4l2_ycbcr_encoding}(hji hhhNhNubah}(h]h ](j(jnc-typeeh"]h$]h&]uh1jhje ubah}(h]h ]h"]h$]h&]refdocj5 refdomainjnreftypetype refexplicitrefwarnjjj;v4l2_ycbcr_encodinguh1hhhhKhj] 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 ](j(stdstd-refeh"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]refdocj5 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] 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 }(hj] hhhNhNubh)}(h:c:type:`v4l2_fmtdesc`h]j)}(hj h]h v4l2_fmtdesc}(hj hhhNhNubah}(h]h ](j(jnc-typeeh"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]refdocj5 refdomainjnreftypetype refexplicitrefwarnjjj; v4l2_fmtdescuh1hhhhKhj] ubh during enumeration. See }(hj] hhhNhNubh)}(h:ref:`fmtdesc-flags`h]j)}(hj h]h fmtdesc-flags}(hj hhhNhNubah}(h]h ](j(stdstd-refeh"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]refdocj5 refdomainj reftyperef refexplicitrefwarnj; fmtdesc-flagsuh1hhhhKhj] ubh.}(hj] hhhNhNubeh}(h]h ]h"]h$]h&]uh1jhhhKhjZ 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)}(hjH h]hhsv_enc}(hjJ hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjF ubah}(h]h ]h"]h$]h&]uh1jhhhKhjC 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 }(hjf hhhNhNubh)}(h:c:type:`v4l2_hsv_encoding`h]j)}(hjp h]hv4l2_hsv_encoding}(hjr hhhNhNubah}(h]h ](j(jnc-typeeh"]h$]h&]uh1jhjn ubah}(h]h ]h"]h$]h&]refdocj5 refdomainjnreftypetype refexplicitrefwarnjjj;v4l2_hsv_encodinguh1hhhhKhjf ubh#. This information supplements the }(hjf hhhNhNubj)}(h``colorspace``h]h colorspace}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjf ubhb and must be set by the driver for capture streams and by the application for output streams, see }(hjf hhhNhNubh)}(h:ref:`colorspaces`h]j)}(hj h]h colorspaces}(hj hhhNhNubah}(h]h ](j(stdstd-refeh"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]refdocj5 refdomainj reftyperef refexplicitrefwarnj; colorspacesuh1hhhhKhjf ubh#. If the application sets the flag }(hjf hhhNhNubj)}(h``V4L2_PIX_FMT_FLAG_SET_CSC``h]hV4L2_PIX_FMT_FLAG_SET_CSC}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjf 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 }(hjf hhhNhNubh)}(h:c:type:`v4l2_fmtdesc`h]j)}(hj h]h v4l2_fmtdesc}(hj hhhNhNubah}(h]h ](j(jnc-typeeh"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]refdocj5 refdomainjnreftypetype refexplicitrefwarnjjj; v4l2_fmtdescuh1hhhhKhjf ubh during enumeration. See }(hjf hhhNhNubh)}(h:ref:`fmtdesc-flags`h]j)}(hj h]h fmtdesc-flags}(hj hhhNhNubah}(h]h ](j(stdstd-refeh"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]refdocj5 refdomainj reftyperef refexplicitrefwarnj; fmtdesc-flagsuh1hhhhKhjf ubh.}(hjf hhhNhNubeh}(h]h ]h"]h$]h&]uh1jhhhKhjc ubah}(h]h ]h"]h$]h&]uh1jhj) ubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh]j)}(h}h]h}}(hj8 hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKhj5 ubah}(h]h ]h"]h$]h&]uh1jhj2 ubj)}(hhh]h}(h]h ]h"]h$]h&]morecolsKuh1jhj2 ubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh]j)}(h__u32h]h__u32}(hjb hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKhj_ ubah}(h]h ]h"]h$]h&]uh1jhj\ ubj)}(hhh]j)}(h``quantization``h]j)}(hj{ h]h quantization}(hj} hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjy ubah}(h]h ]h"]h$]h&]uh1jhhhKhjv ubah}(h]h ]h"]h$]h&]uh1jhj\ 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 ](j(jnc-typeeh"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]refdocj5 refdomainjnreftypetype 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 ](j(stdstd-refeh"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]refdocj5 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 ](j(jnc-typeeh"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]refdocj5 refdomainjnreftypetype refexplicitrefwarnjjj; v4l2_fmtdescuh1hhhhKhj ubh during enumeration. See }(hj hhhNhNubh)}(h:ref:`fmtdesc-flags`h]j)}(hj1 h]h fmtdesc-flags}(hj3 hhhNhNubah}(h]h ](j(stdstd-refeh"]h$]h&]uh1jhj/ ubah}(h]h ]h"]h$]h&]refdocj5 refdomainj= reftyperef refexplicitrefwarnj; fmtdesc-flagsuh1hhhhKhj ubh.}(hj 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}(hjk hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKhjh ubah}(h]h ]h"]h$]h&]uh1jhje ubj)}(hhh]j)}(h ``xfer_func``h]j)}(hj h]h xfer_func}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1jhhhKhj ubah}(h]h ]h"]h$]h&]uh1jhje 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 ](j(jnc-typeeh"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]refdocj5 refdomainjnreftypetype 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 ](j(stdstd-refeh"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]refdocj5 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}(hjhhhNhNubah}(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)}(hjh]h v4l2_fmtdesc}(hjhhhNhNubah}(h]h ](j(jnc-typeeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj5 refdomainjnreftypetype refexplicitrefwarnjjj; v4l2_fmtdescuh1hhhhKhj ubh during enumeration. See }(hj hhhNhNubh)}(h:ref:`fmtdesc-flags`h]j)}(hj:h]h fmtdesc-flags}(hj<hhhNhNubah}(h]h ](j(stdstd-refeh"]h$]h&]uh1jhj8ubah}(h]h ]h"]h$]h&]refdocj5 refdomainjFreftyperef refexplicitrefwarnj; fmtdesc-flagsuh1hhhhKhj ubh.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1jhhhKhj ubah}(h]h ]h"]h$]h&]uh1jhje ubeh}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]colsKuh1jhj{ubeh}(h]id1ah ] longtableah"]h$]h&]uh1jyhhhhhNhNubh)}(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-flagsuh1jhKhhhhhhubjz)}(hhh](h)}(h Format Flagsh]h Format Flags}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubj)}(hhh](j)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jhjubj)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jhjubj)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jhjubj)}(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)}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKhj ubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh](j)}(h .. _`v4l2-pix-fmt-flag-set-csc`:h]h}(h]h ]h"]h$]h&]jv4l2-pix-fmt-flag-set-cscuh1jhKhj)}(hhh](j-j)}(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}(hjChhhNhNubah}(h]h ]h"]h$]h&]uh1jhj;ubh, }(hj;hhhNhNubj)}(h ``xfer_func``h]h xfer_func}(hjUhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj;ubh, }(hj;hhhNhNubj)}(h ``ycbcr_enc``h]h ycbcr_enc}(hjghhhNhNubah}(h]h ]h"]h$]h&]uh1jhj;ubh, }hj;sbj)}(h ``hsv_enc``h]hhsv_enc}(hjyhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj;ubh or }(hj;hhhNhNubj)}(h``quantization``h]h quantization}(hjhhhNhNubah}(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]j7ah ]h"]v4l2-pix-fmt-flag-set-cscah$]h&]uh1jhhhKhj8expect_referenced_by_name}jj-sexpect_referenced_by_id}j7j-subj)}(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)}(hj h]h fmtdesc-flags}(hjhhhNhNubah}(h]h ](j(stdstd-refeh"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]refdocj5 refdomainjreftyperef refexplicitrefwarnj; fmtdesc-flagsuh1hhhhKhjubh.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1jhhhKhj8ubeh}(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&]uh1jhj:ubah}(h]h ]h"]h$]h&]uh1jhhhKhj*ubeh}(h]h ]h"]h$]h&]uh1jhj'ubj)}(hhh](j-j)}(h 0x00000002h]h 0x00000002}(hjZhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKhjWubeh}(h]h ]h"]h$]h&]uh1jhj'ubj8eh}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]colsKuh1jhjubeh}(h](id2jeh ]h"] format-flagsah$]h&]uh1jyhhhhhNhNj}jjsj}jjsubeh}(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_sourcehnj _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]jaj7]j-aunameids}(jjjjjj7u nametypes}(jjjuh}(jhhjjjj7j;j}j{jju 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&]levelKtypeINFOlineKsourcehuh1jhj5 ubatransform_messages](j)}(hhh]j)}(hhh]h2Hyperlink target "format-flags" is not referenced.}hj<sbah}(h]h ]h"]h$]h&]uh1jhj9ubah}(h]h ]h"]h$]h&]levelKtypej4sourcehnjlineKuh1jubj)}(hhh]j)}(hhh]h?Hyperlink target "v4l2-pix-fmt-flag-set-csc" is not referenced.}hjVsbah}(h]h ]h"]h$]h&]uh1jhjSubah}(h]h ]h"]h$]h&]levelKtypej4lineKsourcehuh1jubj)}(hhh]j)}(hhh]h?Hyperlink target "v4l2-pix-fmt-flag-set-csc" is not referenced.}hjpsbah}(h]h ]h"]h$]h&]uh1jhjmubah}(h]h ]h"]h$]h&]levelKtypej4lineKsourcehuh1jubj)}(hhh]j)}(hhh]h?Hyperlink target "v4l2-pix-fmt-flag-set-csc" is not referenced.}hjsbah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]levelKtypej4lineKsourcehuh1jube transformerN include_log] decorationNhhub.