€•áBŒsphinx.addnodes”Œdocument”“”)”}”(Œ rawsource”Œ”Œchildren”]”(Œ translations”Œ LanguagesNode”“”)”}”(hhh]”(hŒ pending_xref”“”)”}”(hhh]”Œdocutils.nodes”ŒText”“”ŒChinese (Simplified)”…””}”Œparent”hsbaŒ attributes”}”(Œids”]”Œclasses”]”Œnames”]”Œdupnames”]”Œbackrefs”]”Œ refdomain”Œstd”Œreftype”Œdoc”Œ reftarget”Œ7/translations/zh_CN/userspace-api/media/v4l/planar-apis”Œmodname”NŒ classname”NŒ refexplicit”ˆuŒtagname”hhh ubh)”}”(hhh]”hŒChinese (Traditional)”…””}”hh2sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ7/translations/zh_TW/userspace-api/media/v4l/planar-apis”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒItalian”…””}”hhFsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ7/translations/it_IT/userspace-api/media/v4l/planar-apis”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒJapanese”…””}”hhZsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ7/translations/ja_JP/userspace-api/media/v4l/planar-apis”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒKorean”…””}”hhnsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ7/translations/ko_KR/userspace-api/media/v4l/planar-apis”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒSpanish”…””}”hh‚sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ7/translations/sp_SP/userspace-api/media/v4l/planar-apis”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubeh}”(h]”h ]”h"]”h$]”h&]”Œcurrent_language”ŒEnglish”uh1h hhŒ _document”hŒsource”NŒline”NubhŒcomment”“”)”}”(hŒ8SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later”h]”hŒ8SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later”…””}”hh£sbah}”(h]”h ]”h"]”h$]”h&]”Œ xml:space”Œpreserve”uh1h¡hhhžhhŸŒQ/var/lib/git/docbuild/linux/Documentation/userspace-api/media/v4l/planar-apis.rst”h KubhŒtarget”“”)”}”(hŒ.. _planar-apis:”h]”h}”(h]”h ]”h"]”h$]”h&]”Œrefid”Œ planar-apis”uh1h´h KhhhžhhŸh³ubhŒsection”“”)”}”(hhh]”(hŒtitle”“”)”}”(hŒSingle- and multi-planar APIs”h]”hŒSingle- and multi-planar APIs”…””}”(hhÉhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÇhhÄhžhhŸh³h KubhŒ paragraph”“”)”}”(hX?Some devices require data for each input or output video frame to be placed in discontiguous memory buffers. In such cases, one video frame has to be addressed using more than one memory address, i.e. one pointer per "plane". A plane is a sub-buffer of the current frame. For examples of such formats see :ref:`pixfmt`.”h]”(hX5Some devices require data for each input or output video frame to be placed in discontiguous memory buffers. In such cases, one video frame has to be addressed using more than one memory address, i.e. one pointer per “planeâ€. A plane is a sub-buffer of the current frame. For examples of such formats see ”…””}”(hhÙhžhhŸNh Nubh)”}”(hŒ :ref:`pixfmt`”h]”hŒinline”“”)”}”(hhãh]”hŒpixfmt”…””}”(hhçhžhhŸNh Nubah}”(h]”h ]”(Œxref”Œstd”Œstd-ref”eh"]”h$]”h&]”uh1håhháubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”Œ#userspace-api/media/v4l/planar-apis”Œ refdomain”hòŒreftype”Œref”Œ refexplicit”‰Œrefwarn”ˆŒ reftarget”Œpixfmt”uh1hhŸh³h K hhÙubhŒ.”…””}”(hhÙhžhhŸNh Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1h×hŸh³h K hhÄhžhubhØ)”}”(hŒÅInitially, V4L2 API did not support multi-planar buffers and a set of extensions has been introduced to handle them. Those extensions constitute what is being referred to as the "multi-planar API".”h]”hŒÉInitially, V4L2 API did not support multi-planar buffers and a set of extensions has been introduced to handle them. Those extensions constitute what is being referred to as the “multi-planar APIâ€.”…””}”(hjhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h×hŸh³h KhhÄhžhubhØ)”}”(hXžSome of the V4L2 API calls and structures are interpreted differently, depending on whether single- or multi-planar API is being used. An application can choose whether to use one or the other by passing a corresponding buffer type to its ioctl calls. Multi-planar versions of buffer types are suffixed with an ``_MPLANE`` string. For a list of available multi-planar buffer types see enum :c:type:`v4l2_buf_type`.”h]”(hX7Some of the V4L2 API calls and structures are interpreted differently, depending on whether single- or multi-planar API is being used. An application can choose whether to use one or the other by passing a corresponding buffer type to its ioctl calls. Multi-planar versions of buffer types are suffixed with an ”…””}”(hjhžhhŸNh NubhŒliteral”“”)”}”(hŒ ``_MPLANE``”h]”hŒ_MPLANE”…””}”(hj(hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j&hjubhŒD string. For a list of available multi-planar buffer types see enum ”…””}”(hjhžhhŸNh Nubh)”}”(hŒ:c:type:`v4l2_buf_type`”h]”j')”}”(hj<h]”hŒ v4l2_buf_type”…””}”(hj>hžhhŸNh Nubah}”(h]”h ]”(hñŒc”Œc-type”eh"]”h$]”h&]”uh1j&hj:ubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”hþŒ refdomain”jHŒreftype”Œtype”Œ refexplicit”‰Œrefwarn”‰jŒ v4l2_buf_type”uh1hhŸh³h KhjubhŒ.”…””}”(hjhžhhŸNh Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1h×hŸh³h KhhÄhžhubhÃ)”}”(hhh]”(hÈ)”}”(hŒMulti-planar formats”h]”hŒMulti-planar formats”…””}”(hjghžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÇhjdhžhhŸh³h KubhØ)”}”(hXMulti-planar API introduces new multi-planar formats. Those formats use a separate set of FourCC codes. It is important to distinguish between the multi-planar API and a multi-planar format. Multi-planar API calls can handle all single-planar formats as well (as long as they are passed in multi-planar API structures), while the single-planar API cannot handle multi-planar formats.”h]”hXMulti-planar API introduces new multi-planar formats. Those formats use a separate set of FourCC codes. It is important to distinguish between the multi-planar API and a multi-planar format. Multi-planar API calls can handle all single-planar formats as well (as long as they are passed in multi-planar API structures), while the single-planar API cannot handle multi-planar formats.”…””}”(hjuhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h×hŸh³h Khjdhžhubeh}”(h]”Œmulti-planar-formats”ah ]”h"]”Œmulti-planar formats”ah$]”h&]”uh1hÂhhÄhžhhŸh³h KubhÃ)”}”(hhh]”(hÈ)”}”(hŒ;Calls that distinguish between single and multi-planar APIs”h]”hŒ;Calls that distinguish between single and multi-planar APIs”…””}”(hjŽhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÇhj‹hžhhŸh³h K(ubhŒdefinition_list”“”)”}”(hhh]”(hŒdefinition_list_item”“”)”}”(hŒÐ:ref:`VIDIOC_QUERYCAP ` Two additional multi-planar capabilities are added. They can be set together with non-multi-planar ones for devices that handle both single- and multi-planar formats. ”h]”(hŒterm”“”)”}”(hŒ(:ref:`VIDIOC_QUERYCAP `”h]”h)”}”(hj«h]”hæ)”}”(hj«h]”hŒVIDIOC_QUERYCAP”…””}”(hj°hžhhŸNh Nubah}”(h]”h ]”(hñŒstd”Œstd-ref”eh"]”h$]”h&]”uh1håhj­ubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”hþŒ refdomain”jºŒreftype”Œref”Œ refexplicit”ˆŒrefwarn”ˆjŒvidioc_querycap”uh1hhŸh³h K-hj©ubah}”(h]”h ]”h"]”h$]”h&]”uh1j§hŸh³h K-hj£ubhŒ definition”“”)”}”(hhh]”hØ)”}”(hŒ¦Two additional multi-planar capabilities are added. They can be set together with non-multi-planar ones for devices that handle both single- and multi-planar formats.”h]”hŒ¦Two additional multi-planar capabilities are added. They can be set together with non-multi-planar ones for devices that handle both single- and multi-planar formats.”…””}”(hj×hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h×hŸh³h K+hjÔubah}”(h]”h ]”h"]”h$]”h&]”uh1jÒhj£ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j¡hŸh³h K-hjžubj¢)”}”(hXs:ref:`VIDIOC_G_FMT `, :ref:`VIDIOC_S_FMT `, :ref:`VIDIOC_TRY_FMT ` New structures for describing multi-planar formats are added: struct :c:type:`v4l2_pix_format_mplane` and struct :c:type:`v4l2_plane_pix_format`. Drivers may define new multi-planar formats, which have distinct FourCC codes from the existing single-planar ones. ”h]”(j¨)”}”(hŒl:ref:`VIDIOC_G_FMT `, :ref:`VIDIOC_S_FMT `, :ref:`VIDIOC_TRY_FMT `”h]”(h)”}”(hŒ":ref:`VIDIOC_G_FMT `”h]”hæ)”}”(hjûh]”hŒ VIDIOC_G_FMT”…””}”(hjýhžhhŸNh Nubah}”(h]”h ]”(hñŒstd”Œstd-ref”eh"]”h$]”h&]”uh1håhjùubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”hþŒ refdomain”jŒreftype”Œref”Œ refexplicit”ˆŒrefwarn”ˆjŒ vidioc_g_fmt”uh1hhŸh³h K4hjõubhŒ, ”…””}”(hjõhžhhŸNh Nubh)”}”(hŒ":ref:`VIDIOC_S_FMT `”h]”hæ)”}”(hjh]”hŒ VIDIOC_S_FMT”…””}”(hj!hžhhŸNh Nubah}”(h]”h ]”(hñŒstd”Œstd-ref”eh"]”h$]”h&]”uh1håhjubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”hþŒ refdomain”j+Œreftype”Œref”Œ refexplicit”ˆŒrefwarn”ˆjŒ vidioc_g_fmt”uh1hhŸh³h K4hjõubhŒ, ”…””}”hjõsbh)”}”(hŒ$:ref:`VIDIOC_TRY_FMT `”h]”hæ)”}”(hjCh]”hŒVIDIOC_TRY_FMT”…””}”(hjEhžhhŸNh Nubah}”(h]”h ]”(hñŒstd”Œstd-ref”eh"]”h$]”h&]”uh1håhjAubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”hþŒ refdomain”jOŒreftype”Œref”Œ refexplicit”ˆŒrefwarn”ˆjŒ vidioc_g_fmt”uh1hhŸh³h K4hjõubeh}”(h]”h ]”h"]”h$]”h&]”uh1j§hŸh³h K4hjñubjÓ)”}”(hhh]”hØ)”}”(hXNew structures for describing multi-planar formats are added: struct :c:type:`v4l2_pix_format_mplane` and struct :c:type:`v4l2_plane_pix_format`. Drivers may define new multi-planar formats, which have distinct FourCC codes from the existing single-planar ones.”h]”(hŒENew structures for describing multi-planar formats are added: struct ”…””}”(hjjhžhhŸNh Nubh)”}”(hŒ :c:type:`v4l2_pix_format_mplane`”h]”j')”}”(hjth]”hŒv4l2_pix_format_mplane”…””}”(hjvhžhhŸNh Nubah}”(h]”h ]”(hñjHŒc-type”eh"]”h$]”h&]”uh1j&hjrubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”hþŒ refdomain”jHŒreftype”Œtype”Œ refexplicit”‰Œrefwarn”‰jŒv4l2_pix_format_mplane”uh1hhŸh³h K0hjjubhŒ and struct ”…””}”(hjjhžhhŸNh Nubh)”}”(hŒ:c:type:`v4l2_plane_pix_format`”h]”j')”}”(hj—h]”hŒv4l2_plane_pix_format”…””}”(hj™hžhhŸNh Nubah}”(h]”h ]”(hñjHŒc-type”eh"]”h$]”h&]”uh1j&hj•ubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”hþŒ refdomain”jHŒreftype”Œtype”Œ refexplicit”‰Œrefwarn”‰jŒv4l2_plane_pix_format”uh1hhŸh³h K0hjjubhŒu. Drivers may define new multi-planar formats, which have distinct FourCC codes from the existing single-planar ones.”…””}”(hjjhžhhŸNh Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1h×hŸh³h K0hjgubah}”(h]”h ]”h"]”h$]”h&]”uh1jÒhjñubeh}”(h]”h ]”h"]”h$]”h&]”uh1j¡hŸh³h K4hjžhžhubj¢)”}”(hX:ref:`VIDIOC_QBUF `, :ref:`VIDIOC_DQBUF `, :ref:`VIDIOC_QUERYBUF ` A new struct :c:type:`v4l2_plane` structure for describing planes is added. Arrays of this structure are passed in the new ``m.planes`` field of struct :c:type:`v4l2_buffer`. ”h]”(j¨)”}”(hŒm:ref:`VIDIOC_QBUF `, :ref:`VIDIOC_DQBUF `, :ref:`VIDIOC_QUERYBUF `”h]”(h)”}”(hŒ :ref:`VIDIOC_QBUF `”h]”hæ)”}”(hjÔh]”hŒ VIDIOC_QBUF”…””}”(hjÖhžhhŸNh Nubah}”(h]”h ]”(hñŒstd”Œstd-ref”eh"]”h$]”h&]”uh1håhjÒubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”hþŒ refdomain”jàŒreftype”Œref”Œ refexplicit”ˆŒrefwarn”ˆjŒ vidioc_qbuf”uh1hhŸh³h K:hjÎubhŒ, ”…””}”(hjÎhžhhŸNh Nubh)”}”(hŒ!:ref:`VIDIOC_DQBUF `”h]”hæ)”}”(hjøh]”hŒ VIDIOC_DQBUF”…””}”(hjúhžhhŸNh Nubah}”(h]”h ]”(hñŒstd”Œstd-ref”eh"]”h$]”h&]”uh1håhjöubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”hþŒ refdomain”jŒreftype”Œref”Œ refexplicit”ˆŒrefwarn”ˆjŒ vidioc_qbuf”uh1hhŸh³h K:hjÎubhŒ, ”…””}”hjÎsbh)”}”(hŒ(:ref:`VIDIOC_QUERYBUF `”h]”hæ)”}”(hjh]”hŒVIDIOC_QUERYBUF”…””}”(hjhžhhŸNh Nubah}”(h]”h ]”(hñŒstd”Œstd-ref”eh"]”h$]”h&]”uh1håhjubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”hþŒ refdomain”j(Œreftype”Œref”Œ refexplicit”ˆŒrefwarn”ˆjŒvidioc_querybuf”uh1hhŸh³h K:hjÎubeh}”(h]”h ]”h"]”h$]”h&]”uh1j§hŸh³h K:hjÊubjÓ)”}”(hhh]”hØ)”}”(hŒ®A new struct :c:type:`v4l2_plane` structure for describing planes is added. Arrays of this structure are passed in the new ``m.planes`` field of struct :c:type:`v4l2_buffer`.”h]”(hŒ A new struct ”…””}”(hjChžhhŸNh Nubh)”}”(hŒ:c:type:`v4l2_plane`”h]”j')”}”(hjMh]”hŒ v4l2_plane”…””}”(hjOhžhhŸNh Nubah}”(h]”h ]”(hñjHŒc-type”eh"]”h$]”h&]”uh1j&hjKubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”hþŒ refdomain”jHŒreftype”Œtype”Œ refexplicit”‰Œrefwarn”‰jŒ v4l2_plane”uh1hhŸh³h K7hjCubhŒZ structure for describing planes is added. Arrays of this structure are passed in the new ”…””}”(hjChžhhŸNh Nubj')”}”(hŒ ``m.planes``”h]”hŒm.planes”…””}”(hjnhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j&hjCubhŒ field of struct ”…””}”(hjChžhhŸNh Nubh)”}”(hŒ:c:type:`v4l2_buffer`”h]”j')”}”(hj‚h]”hŒ v4l2_buffer”…””}”(hj„hžhhŸNh Nubah}”(h]”h ]”(hñjHŒc-type”eh"]”h$]”h&]”uh1j&hj€ubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”hþŒ refdomain”jHŒreftype”Œtype”Œ refexplicit”‰Œrefwarn”‰jŒ v4l2_buffer”uh1hhŸh³h K7hjCubhŒ.”…””}”(hjChžhhŸNh Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1h×hŸh³h K7hj@ubah}”(h]”h ]”h"]”h$]”h&]”uh1jÒhjÊubeh}”(h]”h ]”h"]”h$]”h&]”uh1j¡hŸh³h K:hjžhžhubj¢)”}”(hŒW:ref:`VIDIOC_REQBUFS ` Will allocate multi-planar buffers as requested.”h]”(j¨)”}”(hŒ&:ref:`VIDIOC_REQBUFS `”h]”h)”}”(hj»h]”hæ)”}”(hj»h]”hŒVIDIOC_REQBUFS”…””}”(hjÀhžhhŸNh Nubah}”(h]”h ]”(hñŒstd”Œstd-ref”eh"]”h$]”h&]”uh1håhj½ubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”hþŒ refdomain”jÊŒreftype”Œref”Œ refexplicit”ˆŒrefwarn”ˆjŒvidioc_reqbufs”uh1hhŸh³h K