sphinx.addnodesdocument)}( rawsourcechildren]( translations LanguagesNode)}(hhh](h pending_xref)}(hhh]docutils.nodesTextChinese (Simplified)}parenthsba attributes}(ids]classes]names]dupnames]backrefs] refdomainstdreftypedoc reftarget*/translations/zh_CN/admin-guide/media/ipu3modnameN classnameN refexplicitutagnamehhh ubh)}(hhh]hChinese (Traditional)}hh2sbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget*/translations/zh_TW/admin-guide/media/ipu3modnameN classnameN refexplicituh1hhh ubh)}(hhh]hItalian}hhFsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget*/translations/it_IT/admin-guide/media/ipu3modnameN classnameN refexplicituh1hhh ubh)}(hhh]hJapanese}hhZsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget*/translations/ja_JP/admin-guide/media/ipu3modnameN classnameN refexplicituh1hhh ubh)}(hhh]hKorean}hhnsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget*/translations/ko_KR/admin-guide/media/ipu3modnameN classnameN refexplicituh1hhh ubh)}(hhh]hSpanish}hhsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget*/translations/sp_SP/admin-guide/media/ipu3modnameN classnameN refexplicituh1hhh ubeh}(h]h ]h"]h$]h&]current_languageEnglishuh1h hh _documenthsourceNlineNubhcomment)}(h SPDX-License-Identifier: GPL-2.0h]h SPDX-License-Identifier: GPL-2.0}hhsbah}(h]h ]h"]h$]h&] xml:spacepreserveuh1hhhhhhD/var/lib/git/docbuild/linux/Documentation/admin-guide/media/ipu3.rsthKubh)}(h4This data file has been placed in the public domain.h]h4This data file has been placed in the public domain.}hhsbah}(h]h ]h"]h$]h&]hhuh1hhhhhho/srv/docbuild/lib/venvs/build-kernel-docs/lib64/python3.9/site-packages/docutils/parsers/rst/include/isonum.txthKubh)}(hDerived from the Unicode character mappings available from . Processed by unicode2rstsubs.py, part of Docutils: .h]hDerived from the Unicode character mappings available from . Processed by unicode2rstsubs.py, part of Docutils: .}hhsbah}(h]h ]h"]h$]h&]hhuh1hhhhhhhhKubhsubstitution_definition)}(h*.. |amp| unicode:: U+00026 .. AMPERSANDh]h&}hhsbah}(h]h ]h"]ampah$]h&]uh1hhhhKhhhhubh)}(h+.. |apos| unicode:: U+00027 .. APOSTROPHEh]h'}hhsbah}(h]h ]h"]aposah$]h&]uh1hhhhKhhhhubh)}(h).. |ast| unicode:: U+0002A .. ASTERISKh]h*}hhsbah}(h]h ]h"]astah$]h&]uh1hhhhK hhhhubh)}(h+.. |brvbar| unicode:: U+000A6 .. BROKEN BARh]h¦}hjsbah}(h]h ]h"]brvbarah$]h&]uh1hhhhK hhhhubh)}(h0.. |bsol| unicode:: U+0005C .. REVERSE SOLIDUSh]h\}hjsbah}(h]h ]h"]bsolah$]h&]uh1hhhhK hhhhubh)}(h*.. |cent| unicode:: U+000A2 .. CENT SIGNh]h¢}hjsbah}(h]h ]h"]centah$]h&]uh1hhhhK hhhhubh)}(h&.. |colon| unicode:: U+0003A .. COLONh]h:}hj-sbah}(h]h ]h"]colonah$]h&]uh1hhhhK hhhhubh)}(h&.. |comma| unicode:: U+0002C .. COMMAh]h,}hj<sbah}(h]h ]h"]commaah$]h&]uh1hhhhKhhhhubh)}(h... |commat| unicode:: U+00040 .. COMMERCIAL ATh]h@}hjKsbah}(h]h ]h"]commatah$]h&]uh1hhhhKhhhhubh)}(h/.. |copy| unicode:: U+000A9 .. COPYRIGHT SIGNh]h©}hjZsbah}(h]h ]h"]copyah$]h&]uh1hhhhKhhhhubh)}(h... |curren| unicode:: U+000A4 .. CURRENCY SIGNh]h¤}hjisbah}(h]h ]h"]currenah$]h&]uh1hhhhKhhhhubh)}(h0.. |darr| unicode:: U+02193 .. DOWNWARDS ARROWh]h↓}hjxsbah}(h]h ]h"]darrah$]h&]uh1hhhhKhhhhubh)}(h,.. |deg| unicode:: U+000B0 .. DEGREE SIGNh]h°}hjsbah}(h]h ]h"]degah$]h&]uh1hhhhKhhhhubh)}(h... |divide| unicode:: U+000F7 .. DIVISION SIGNh]h÷}hjsbah}(h]h ]h"]divideah$]h&]uh1hhhhKhhhhubh)}(h,.. |dollar| unicode:: U+00024 .. DOLLAR SIGNh]h$}hjsbah}(h]h ]h"]dollarah$]h&]uh1hhhhKhhhhubh)}(h,.. |equals| unicode:: U+0003D .. EQUALS SIGNh]h=}hjsbah}(h]h ]h"]equalsah$]h&]uh1hhhhKhhhhubh)}(h1.. |excl| unicode:: U+00021 .. EXCLAMATION MARKh]h!}hjsbah}(h]h ]h"]exclah$]h&]uh1hhhhKhhhhubh)}(h9.. |frac12| unicode:: U+000BD .. VULGAR FRACTION ONE HALFh]h½}hjsbah}(h]h ]h"]frac12ah$]h&]uh1hhhhKhhhhubh)}(h<.. |frac14| unicode:: U+000BC .. VULGAR FRACTION ONE QUARTERh]h¼}hjsbah}(h]h ]h"]frac14ah$]h&]uh1hhhhKhhhhubh)}(h;.. |frac18| unicode:: U+0215B .. VULGAR FRACTION ONE EIGHTHh]h⅛}hjsbah}(h]h ]h"]frac18ah$]h&]uh1hhhhKhhhhubh)}(h?.. |frac34| unicode:: U+000BE .. VULGAR FRACTION THREE QUARTERSh]h¾}hjsbah}(h]h ]h"]frac34ah$]h&]uh1hhhhKhhhhubh)}(h>.. |frac38| unicode:: U+0215C .. VULGAR FRACTION THREE EIGHTHSh]h⅜}hjsbah}(h]h ]h"]frac38ah$]h&]uh1hhhhKhhhhubh)}(h=.. |frac58| unicode:: U+0215D .. VULGAR FRACTION FIVE EIGHTHSh]h⅝}hjsbah}(h]h ]h"]frac58ah$]h&]uh1hhhhKhhhhubh)}(h>.. |frac78| unicode:: U+0215E .. VULGAR FRACTION SEVEN EIGHTHSh]h⅞}hj,sbah}(h]h ]h"]frac78ah$]h&]uh1hhhhKhhhhubh)}(h2.. |gt| unicode:: U+0003E .. GREATER-THAN SIGNh]h>}hj;sbah}(h]h ]h"]gtah$]h&]uh1hhhhKhhhhubh)}(h9.. |half| unicode:: U+000BD .. VULGAR FRACTION ONE HALFh]h½}hjJsbah}(h]h ]h"]halfah$]h&]uh1hhhhK hhhhubh)}(h/.. |horbar| unicode:: U+02015 .. HORIZONTAL BARh]h―}hjYsbah}(h]h ]h"]horbarah$]h&]uh1hhhhK!hhhhubh)}(h'.. |hyphen| unicode:: U+02010 .. HYPHENh]h‐}hjhsbah}(h]h ]h"]hyphenah$]h&]uh1hhhhK"hhhhubh)}(h:.. |iexcl| unicode:: U+000A1 .. INVERTED EXCLAMATION MARKh]h¡}hjwsbah}(h]h ]h"]iexclah$]h&]uh1hhhhK#hhhhubh)}(h7.. |iquest| unicode:: U+000BF .. INVERTED QUESTION MARKh]h¿}hjsbah}(h]h ]h"]iquestah$]h&]uh1hhhhK$hhhhubh)}(hJ.. |laquo| unicode:: U+000AB .. LEFT-POINTING DOUBLE ANGLE QUOTATION MARKh]h«}hjsbah}(h]h ]h"]laquoah$]h&]uh1hhhhK%hhhhubh)}(h0.. |larr| unicode:: U+02190 .. LEFTWARDS ARROWh]h←}hjsbah}(h]h ]h"]larrah$]h&]uh1hhhhK&hhhhubh)}(h3.. |lcub| unicode:: U+0007B .. LEFT CURLY BRACKETh]h{}hjsbah}(h]h ]h"]lcubah$]h&]uh1hhhhK'hhhhubh)}(h;.. |ldquo| unicode:: U+0201C .. LEFT DOUBLE QUOTATION MARKh]h“}hjsbah}(h]h ]h"]ldquoah$]h&]uh1hhhhK(hhhhubh)}(h).. |lowbar| unicode:: U+0005F .. LOW LINEh]h_}hjsbah}(h]h ]h"]lowbarah$]h&]uh1hhhhK)hhhhubh)}(h1.. |lpar| unicode:: U+00028 .. LEFT PARENTHESISh]h(}hjsbah}(h]h ]h"]lparah$]h&]uh1hhhhK*hhhhubh)}(h4.. |lsqb| unicode:: U+0005B .. LEFT SQUARE BRACKETh]h[}hjsbah}(h]h ]h"]lsqbah$]h&]uh1hhhhK+hhhhubh)}(h;.. |lsquo| unicode:: U+02018 .. LEFT SINGLE QUOTATION MARKh]h‘}hjsbah}(h]h ]h"]lsquoah$]h&]uh1hhhhK,hhhhubh)}(h/.. |lt| unicode:: U+0003C .. LESS-THAN SIGNh]h<}hj sbah}(h]h ]h"]ltah$]h&]uh1hhhhK-hhhhubh)}(h+.. |micro| unicode:: U+000B5 .. MICRO SIGNh]hµ}hjsbah}(h]h ]h"]microah$]h&]uh1hhhhK.hhhhubh)}(h+.. |middot| unicode:: U+000B7 .. MIDDLE DOTh]h·}hj+sbah}(h]h ]h"]middotah$]h&]uh1hhhhK/hhhhubh)}(h/.. |nbsp| unicode:: U+000A0 .. NO-BREAK SPACEh]h }hj:sbah}(h]h ]h"]nbspah$]h&]uh1hhhhK0hhhhubh)}(h).. |not| unicode:: U+000AC .. NOT SIGNh]h¬}hjIsbah}(h]h ]h"]notah$]h&]uh1hhhhK1hhhhubh)}(h,.. |num| unicode:: U+00023 .. NUMBER SIGNh]h#}hjXsbah}(h]h ]h"]numah$]h&]uh1hhhhK2hhhhubh)}(h).. |ohm| unicode:: U+02126 .. OHM SIGNh]hΩ}hjgsbah}(h]h ]h"]ohmah$]h&]uh1hhhhK3hhhhubh)}(h;.. |ordf| unicode:: U+000AA .. FEMININE ORDINAL INDICATORh]hª}hjvsbah}(h]h ]h"]ordfah$]h&]uh1hhhhK4hhhhubh)}(h<.. |ordm| unicode:: U+000BA .. MASCULINE ORDINAL INDICATORh]hº}hjsbah}(h]h ]h"]ordmah$]h&]uh1hhhhK5hhhhubh)}(h-.. |para| unicode:: U+000B6 .. PILCROW SIGNh]h¶}hjsbah}(h]h ]h"]paraah$]h&]uh1hhhhK6hhhhubh)}(h-.. |percnt| unicode:: U+00025 .. PERCENT SIGNh]h%}hjsbah}(h]h ]h"]percntah$]h&]uh1hhhhK7hhhhubh)}(h*.. |period| unicode:: U+0002E .. FULL STOPh]h.}hjsbah}(h]h ]h"]periodah$]h&]uh1hhhhK8hhhhubh)}(h*.. |plus| unicode:: U+0002B .. PLUS SIGNh]h+}hjsbah}(h]h ]h"]plusah$]h&]uh1hhhhK9hhhhubh)}(h0.. |plusmn| unicode:: U+000B1 .. PLUS-MINUS SIGNh]h±}hjsbah}(h]h ]h"]plusmnah$]h&]uh1hhhhK:hhhhubh)}(h+.. |pound| unicode:: U+000A3 .. POUND SIGNh]h£}hjsbah}(h]h ]h"]poundah$]h&]uh1hhhhK;hhhhubh)}(h... |quest| unicode:: U+0003F .. QUESTION MARKh]h?}hjsbah}(h]h ]h"]questah$]h&]uh1hhhhKhhhhubh)}(h1.. |rarr| unicode:: U+02192 .. RIGHTWARDS ARROWh]h→}hjsbah}(h]h ]h"]rarrah$]h&]uh1hhhhK?hhhhubh)}(h4.. |rcub| unicode:: U+0007D .. RIGHT CURLY BRACKETh]h}}hj*sbah}(h]h ]h"]rcubah$]h&]uh1hhhhK@hhhhubh)}(h<.. |rdquo| unicode:: U+0201D .. RIGHT DOUBLE QUOTATION MARKh]h”}hj9sbah}(h]h ]h"]rdquoah$]h&]uh1hhhhKAhhhhubh)}(h0.. |reg| unicode:: U+000AE .. REGISTERED SIGNh]h®}hjHsbah}(h]h ]h"]regah$]h&]uh1hhhhKBhhhhubh)}(h2.. |rpar| unicode:: U+00029 .. RIGHT PARENTHESISh]h)}hjWsbah}(h]h ]h"]rparah$]h&]uh1hhhhKChhhhubh)}(h5.. |rsqb| unicode:: U+0005D .. RIGHT SQUARE BRACKETh]h]}hjfsbah}(h]h ]h"]rsqbah$]h&]uh1hhhhKDhhhhubh)}(h<.. |rsquo| unicode:: U+02019 .. RIGHT SINGLE QUOTATION MARKh]h’}hjusbah}(h]h ]h"]rsquoah$]h&]uh1hhhhKEhhhhubh)}(h-.. |sect| unicode:: U+000A7 .. SECTION SIGNh]h§}hjsbah}(h]h ]h"]sectah$]h&]uh1hhhhKFhhhhubh)}(h*.. |semi| unicode:: U+0003B .. SEMICOLONh]h;}hjsbah}(h]h ]h"]semiah$]h&]uh1hhhhKGhhhhubh)}(h,.. |shy| unicode:: U+000AD .. SOFT HYPHENh]h­}hjsbah}(h]h ]h"]shyah$]h&]uh1hhhhKHhhhhubh)}(h(.. |sol| unicode:: U+0002F .. SOLIDUSh]h/}hjsbah}(h]h ]h"]solah$]h&]uh1hhhhKIhhhhubh)}(h,.. |sung| unicode:: U+0266A .. EIGHTH NOTEh]h♪}hjsbah}(h]h ]h"]sungah$]h&]uh1hhhhKJhhhhubh)}(h0.. |sup1| unicode:: U+000B9 .. SUPERSCRIPT ONEh]h¹}hjsbah}(h]h ]h"]sup1ah$]h&]uh1hhhhKKhhhhubh)}(h0.. |sup2| unicode:: U+000B2 .. SUPERSCRIPT TWOh]h²}hjsbah}(h]h ]h"]sup2ah$]h&]uh1hhhhKLhhhhubh)}(h2.. |sup3| unicode:: U+000B3 .. SUPERSCRIPT THREEh]h³}hjsbah}(h]h ]h"]sup3ah$]h&]uh1hhhhKMhhhhubh)}(h4.. |times| unicode:: U+000D7 .. MULTIPLICATION SIGNh]h×}hjsbah}(h]h ]h"]timesah$]h&]uh1hhhhKNhhhhubh)}(h0.. |trade| unicode:: U+02122 .. TRADE MARK SIGNh]h™}hj sbah}(h]h ]h"]tradeah$]h&]uh1hhhhKOhhhhubh)}(h... |uarr| unicode:: U+02191 .. UPWARDS ARROWh]h↑}hjsbah}(h]h ]h"]uarrah$]h&]uh1hhhhKPhhhhubh)}(h... |verbar| unicode:: U+0007C .. VERTICAL LINEh]h|}hj)sbah}(h]h ]h"]verbarah$]h&]uh1hhhhKQhhhhubh)}(h*.. |yen| unicode:: U+000A5 .. YEN SIGN h]h¥}hj8sbah}(h]h ]h"]yenah$]h&]uh1hhhhKRhhhhubhsection)}(hhh](htitle)}(h?Intel Image Processing Unit 3 (IPU3) Imaging Unit (ImgU) driverh]h?Intel Image Processing Unit 3 (IPU3) Imaging Unit (ImgU) driver}(hjNhhhNhNubah}(h]h ]h"]h$]h&]uh1jLhjIhhhhhKubh paragraph)}(h'Copyright |copy| 2018 Intel Corporationh](h Copyright }(hj^hhhNhNubh©}(hj^hhhNhNubh 2018 Intel Corporation}(hj^hhhNhNubeh}(h]h ]h"]h$]h&]uh1j\hhhK hjIhhubjH)}(hhh](jM)}(h Introductionh]h Introduction}(hjwhhhNhNubah}(h]h ]h"]h$]h&]uh1jLhjthhhhhK ubj])}(hThis file documents the Intel IPU3 (3rd generation Image Processing Unit) Imaging Unit drivers located under drivers/media/pci/intel/ipu3 (CIO2) as well as under drivers/staging/media/ipu3 (ImgU).h]hThis file documents the Intel IPU3 (3rd generation Image Processing Unit) Imaging Unit drivers located under drivers/media/pci/intel/ipu3 (CIO2) as well as under drivers/staging/media/ipu3 (ImgU).}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j\hhhKhjthhubj])}(hThe Intel IPU3 found in certain Kaby Lake (as well as certain Sky Lake) platforms (U/Y processor lines) is made up of two parts namely the Imaging Unit (ImgU) and the CIO2 device (MIPI CSI2 receiver).h]hThe Intel IPU3 found in certain Kaby Lake (as well as certain Sky Lake) platforms (U/Y processor lines) is made up of two parts namely the Imaging Unit (ImgU) and the CIO2 device (MIPI CSI2 receiver).}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j\hhhKhjthhubj])}(hX)The CIO2 device receives the raw Bayer data from the sensors and outputs the frames in a format that is specific to the IPU3 (for consumption by the IPU3 ImgU). The CIO2 driver is available as drivers/media/pci/intel/ipu3/ipu3-cio2* and is enabled through the CONFIG_VIDEO_IPU3_CIO2 config option.h]hX)The CIO2 device receives the raw Bayer data from the sensors and outputs the frames in a format that is specific to the IPU3 (for consumption by the IPU3 ImgU). The CIO2 driver is available as drivers/media/pci/intel/ipu3/ipu3-cio2* and is enabled through the CONFIG_VIDEO_IPU3_CIO2 config option.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j\hhhKhjthhubj])}(hThe Imaging Unit (ImgU) is responsible for processing images captured by the IPU3 CIO2 device. The ImgU driver sources can be found under drivers/staging/media/ipu3 directory. The driver is enabled through the CONFIG_VIDEO_IPU3_IMGU config option.h]hThe Imaging Unit (ImgU) is responsible for processing images captured by the IPU3 CIO2 device. The ImgU driver sources can be found under drivers/staging/media/ipu3 directory. The driver is enabled through the CONFIG_VIDEO_IPU3_IMGU config option.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j\hhhKhjthhubj])}(hGThe two driver modules are named ipu3_csi2 and ipu3_imgu, respectively.h]hGThe two driver modules are named ipu3_csi2 and ipu3_imgu, respectively.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j\hhhK hjthhubj])}(hIThe drivers has been tested on Kaby Lake platforms (U/Y processor lines).h]hIThe drivers has been tested on Kaby Lake platforms (U/Y processor lines).}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j\hhhK"hjthhubj])}(hBoth of the drivers implement V4L2, Media Controller and V4L2 sub-device interfaces. The IPU3 CIO2 driver supports camera sensors connected to the CIO2 MIPI CSI-2 interfaces through V4L2 sub-device sensor drivers.h]hBoth of the drivers implement V4L2, Media Controller and V4L2 sub-device interfaces. The IPU3 CIO2 driver supports camera sensors connected to the CIO2 MIPI CSI-2 interfaces through V4L2 sub-device sensor drivers.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j\hhhK$hjthhubeh}(h] introductionah ]h"] introductionah$]h&]uh1jGhjIhhhhhK ubjH)}(hhh](jM)}(hCIO2h]hCIO2}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jLhjhhhhhK)ubj])}(hThe CIO2 is represented as a single V4L2 subdev, which provides a V4L2 subdev interface to the user space. There is a video node for each CSI-2 receiver, with a single media controller interface for the entire device.h]hThe CIO2 is represented as a single V4L2 subdev, which provides a V4L2 subdev interface to the user space. There is a video node for each CSI-2 receiver, with a single media controller interface for the entire device.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j\hhhK+hjhhubj])}(hThe CIO2 contains four independent capture channel, each with its own MIPI CSI-2 receiver and DMA engine. Each channel is modelled as a V4L2 sub-device exposed to userspace as a V4L2 sub-device node and has two pads:h]hThe CIO2 contains four independent capture channel, each with its own MIPI CSI-2 receiver and DMA engine. Each channel is modelled as a V4L2 sub-device exposed to userspace as a V4L2 sub-device node and has two pads:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j\hhhK/hjhhubhtabular_col_spec)}(hhh]h}(h]h ]h"]h$]h&]spec|p{0.8cm}|p{4.0cm}|p{4.0cm}|uh1jhhhK3hjhhubhtable)}(hhh]htgroup)}(hhh](hcolspec)}(hhh]h}(h]h ]h"]h$]h&]colwidthK!uh1j3hj0ubj4)}(hhh]h}(h]h ]h"]h$]h&]colwidthK!uh1j3hj0ubj4)}(hhh]h}(h]h ]h"]h$]h&]colwidthK!uh1j3hj0ubhthead)}(hhh]hrow)}(hhh](hentry)}(hhh]j])}(hPadh]hPad}(hjbhhhNhNubah}(h]h ]h"]h$]h&]uh1j\hhhK8hj_ubah}(h]h ]h"]h$]h&]uh1j]hjZubj^)}(hhh]j])}(h Directionh]h Direction}(hjyhhhNhNubah}(h]h ]h"]h$]h&]uh1j\hhhK9hjvubah}(h]h ]h"]h$]h&]uh1j]hjZubj^)}(hhh]j])}(hPurposeh]hPurpose}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j\hhhK:hjubah}(h]h ]h"]h$]h&]uh1j]hjZubeh}(h]h ]h"]h$]h&]uh1jXhjUubah}(h]h ]h"]h$]h&]uh1jShj0ubhtbody)}(hhh](jY)}(hhh](j^)}(hhh]j])}(h0h]h0}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j\hhhKhjubah}(h]h ]h"]h$]h&]uh1j]hjubeh}(h]h ]h"]h$]h&]uh1jXhjubjY)}(hhh](j^)}(hhh]j])}(h1h]h1}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j\hhhK@hjubah}(h]h ]h"]h$]h&]uh1j]hjubj^)}(hhh]j])}(hsourceh]hsource}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j\hhhKAhjubah}(h]h ]h"]h$]h&]uh1j]hjubj^)}(hhh]j])}(h8Raw video capture, connected to the V4L2 video interfaceh]h8Raw video capture, connected to the V4L2 video interface}(hj7hhhNhNubah}(h]h ]h"]h$]h&]uh1j\hhhKBhj4ubah}(h]h ]h"]h$]h&]uh1j]hjubeh}(h]h ]h"]h$]h&]uh1jXhjubeh}(h]h ]h"]h$]h&]uh1jhj0ubeh}(h]h ]h"]h$]h&]colsKuh1j.hj+ubah}(h]h ]h"]h$]h&]uh1j)hjhhhNhNubj])}(hjThe V4L2 video interfaces model the DMA engines. They are exposed to userspace as V4L2 video device nodes.h]hjThe V4L2 video interfaces model the DMA engines. They are exposed to userspace as V4L2 video device nodes.}(hjdhhhNhNubah}(h]h ]h"]h$]h&]uh1j\hhhKDhjhhubjH)}(hhh](jM)}(h$Capturing frames in raw Bayer formath]h$Capturing frames in raw Bayer format}(hjuhhhNhNubah}(h]h ]h"]h$]h&]uh1jLhjrhhhhhKHubj])}(hCIO2 MIPI CSI2 receiver is used to capture frames (in packed raw Bayer format) from the raw sensors connected to the CSI2 ports. The captured frames are used as input to the ImgU driver.h]hCIO2 MIPI CSI2 receiver is used to capture frames (in packed raw Bayer format) from the raw sensors connected to the CSI2 ports. The captured frames are used as input to the ImgU driver.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j\hhhKJhjrhhubj])}(hImage processing using IPU3 ImgU requires tools such as raw2pnm [#f1]_, and yavta [#f2]_ due to the following unique requirements and / or features specific to IPU3.h](h@Image processing using IPU3 ImgU requires tools such as raw2pnm }(hjhhhNhNubhfootnote_reference)}(h[#f1]_h]h1}(hjhhhNhNubah}(h]id1ah ]h"]h$]h&]autoKrefidf1docnameadmin-guide/media/ipu3uh1jhjresolvedKubh , and yavta }(hjhhhNhNubj)}(h[#f2]_h]h2}(hjhhhNhNubah}(h]id2ah ]h"]h$]h&]jKjf2jjuh1jhjjKubhM due to the following unique requirements and / or features specific to IPU3.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1j\hhhKNhjrhhubj])}(hz-- The IPU3 CSI2 receiver outputs the captured frames from the sensor in packed raw Bayer format that is specific to IPU3.h]hz-- The IPU3 CSI2 receiver outputs the captured frames from the sensor in packed raw Bayer format that is specific to IPU3.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j\hhhKRhjrhhubj])}(h;-- Multiple video nodes have to be operated simultaneously.h]h;-- Multiple video nodes have to be operated simultaneously.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j\hhhKUhjrhhubj])}(haLet us take the example of ov5670 sensor connected to CSI2 port 0, for a 2592x1944 image capture.h]haLet us take the example of ov5670 sensor connected to CSI2 port 0, for a 2592x1944 image capture.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j\hhhKWhjrhhubj])}(hUsing the media controller APIs, the ov5670 sensor is configured to send frames in packed raw Bayer format to IPU3 CSI2 receiver.h]hUsing the media controller APIs, the ov5670 sensor is configured to send frames in packed raw Bayer format to IPU3 CSI2 receiver.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j\hhhKZhjrhhubh literal_block)}(hX# This example assumes /dev/media0 as the CIO2 media device export MDEV=/dev/media0 # and that ov5670 sensor is connected to i2c bus 10 with address 0x36 export SDEV=$(media-ctl -d $MDEV -e "ov5670 10-0036") # Establish the link for the media devices using media-ctl media-ctl -d $MDEV -l "ov5670:0 -> ipu3-csi2 0:0[1]" # Set the format for the media devices media-ctl -d $MDEV -V "ov5670:0 [fmt:SGRBG10/2592x1944]" media-ctl -d $MDEV -V "ipu3-csi2 0:0 [fmt:SGRBG10/2592x1944]" media-ctl -d $MDEV -V "ipu3-csi2 0:1 [fmt:SGRBG10/2592x1944]"h]hX# This example assumes /dev/media0 as the CIO2 media device export MDEV=/dev/media0 # and that ov5670 sensor is connected to i2c bus 10 with address 0x36 export SDEV=$(media-ctl -d $MDEV -e "ov5670 10-0036") # Establish the link for the media devices using media-ctl media-ctl -d $MDEV -l "ov5670:0 -> ipu3-csi2 0:0[1]" # Set the format for the media devices media-ctl -d $MDEV -V "ov5670:0 [fmt:SGRBG10/2592x1944]" media-ctl -d $MDEV -V "ipu3-csi2 0:0 [fmt:SGRBG10/2592x1944]" media-ctl -d $MDEV -V "ipu3-csi2 0:1 [fmt:SGRBG10/2592x1944]"}hjsbah}(h]h ]h"]h$]h&]hhforcelanguagenonehighlight_args}uh1jhhhK]hjrhhubj])}(hOnce the media pipeline is configured, desired sensor specific settings (such as exposure and gain settings) can be set, using the yavta tool.h]hOnce the media pipeline is configured, desired sensor specific settings (such as exposure and gain settings) can be set, using the yavta tool.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j\hhhKmhjrhhubj])}(he.gh]he.g}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1j\hhhKphjrhhubj)}(h[yavta -w 0x009e0903 444 $SDEV yavta -w 0x009e0913 1024 $SDEV yavta -w 0x009e0911 2046 $SDEVh]h[yavta -w 0x009e0903 444 $SDEV yavta -w 0x009e0913 1024 $SDEV yavta -w 0x009e0911 2046 $SDEV}hj7sbah}(h]h ]h"]h$]h&]hhjjnonej}uh1jhhhKrhjrhhubj])}(hNOnce the desired sensor settings are set, frame captures can be done as below.h]hNOnce the desired sensor settings are set, frame captures can be done as below.}(hjGhhhNhNubah}(h]h ]h"]h$]h&]uh1j\hhhKxhjrhhubj])}(he.gh]he.g}(hjUhhhNhNubah}(h]h ]h"]h$]h&]uh1j\hhhKzhjrhhubj)}(hyavta --data-prefix -u -c10 -n5 -I -s2592x1944 --file=/tmp/frame-#.bin \ -f IPU3_SGRBG10 $(media-ctl -d $MDEV -e "ipu3-cio2 0")h]hyavta --data-prefix -u -c10 -n5 -I -s2592x1944 --file=/tmp/frame-#.bin \ -f IPU3_SGRBG10 $(media-ctl -d $MDEV -e "ipu3-cio2 0")}hjcsbah}(h]h ]h"]h$]h&]hhjjnonej}uh1jhhhK|hjrhhubj])}(h~With the above command, 10 frames are captured at 2592x1944 resolution, with sGRBG10 format and output as IPU3_SGRBG10 format.h]h~With the above command, 10 frames are captured at 2592x1944 resolution, with sGRBG10 format and output as IPU3_SGRBG10 format.}(hjshhhNhNubah}(h]h ]h"]h$]h&]uh1j\hhhKhjrhhubj])}(h hhhNhNubah}(h]h ]h"]h$]h&]uh1j\hhhKhj; ubah}(h]h ]h"]h$]h&]uh1j]hj ubeh}(h]h ]h"]h$]h&]uh1jXhjm ubjY)}(hhh](j^)}(hhh]j])}(h3h]h3}(hj^ hhhNhNubah}(h]h ]h"]h$]h&]uh1j\hhhKhj[ ubah}(h]h ]h"]h$]h&]uh1j]hjX ubj^)}(hhh]j])}(hsourceh]hsource}(hju hhhNhNubah}(h]h ]h"]h$]h&]uh1j\hhhKhjr ubah}(h]h ]h"]h$]h&]uh1j]hjX ubj^)}(hhh]j])}(hOutput viewfinder video streamh]hOutput viewfinder video stream}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j\hhhKhj ubah}(h]h ]h"]h$]h&]uh1j]hjX ubeh}(h]h ]h"]h$]h&]uh1jXhjm ubjY)}(hhh](j^)}(hhh]j])}(h4h]h4}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j\hhhKhj ubah}(h]h ]h"]h$]h&]uh1j]hj ubj^)}(hhh]j])}(hsourceh]hsource}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j\hhhKhj ubah}(h]h ]h"]h$]h&]uh1j]hj ubj^)}(hhh]j])}(h 3A statisticsh]h 3A statistics}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j\hhhKhj ubah}(h]h ]h"]h$]h&]uh1j]hj ubeh}(h]h ]h"]h$]h&]uh1jXhjm ubeh}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]colsKuh1j.hjubah}(h]h ]h"]h$]h&]uh1j)hjhhhNhNubj])}(hpEach pad is connected to a corresponding V4L2 video interface, exposed to userspace as a V4L2 video device node.h]hpEach pad is connected to a corresponding V4L2 video interface, exposed to userspace as a V4L2 video device node.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j\hhhKhjhhubjH)}(hhh](jM)}(hDevice operationh]hDevice operation}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jLhj hhhhhKubj])}(hXWith ImgU, once the input video node ("ipu3-imgu 0/1":0, in : format) is queued with buffer (in packed raw Bayer format), ImgU starts processing the buffer and produces the video output in YUV format and statistics output on respective output nodes. The driver is expected to have buffers ready for all of parameter, output and statistics nodes, when input video node is queued with buffer.h]hXWith ImgU, once the input video node (“ipu3-imgu 0/1”:0, in : format) is queued with buffer (in packed raw Bayer format), ImgU starts processing the buffer and produces the video output in YUV format and statistics output on respective output nodes. The driver is expected to have buffers ready for all of parameter, output and statistics nodes, when input video node is queued with buffer.}(hj& hhhNhNubah}(h]h ]h"]h$]h&]uh1j\hhhKhj hhubj])}(hAt a minimum, all of input, main output, 3A statistics and viewfinder video nodes should be enabled for IPU3 to start image processing.h]hAt a minimum, all of input, main output, 3A statistics and viewfinder video nodes should be enabled for IPU3 to start image processing.}(hj4 hhhNhNubah}(h]h ]h"]h$]h&]uh1j\hhhKhj hhubj])}(h;Each ImgU V4L2 subdev has the following set of video nodes.h]h;Each ImgU V4L2 subdev has the following set of video nodes.}(hjB hhhNhNubah}(h]h ]h"]h$]h&]uh1j\hhhKhj hhubeh}(h]device-operationah ]h"]device operationah$]h&]uh1jGhjhhhhhKubjH)}(hhh](jM)}(h(input, output and viewfinder video nodesh]h(input, output and viewfinder video nodes}(hj[ hhhNhNubah}(h]h ]h"]h$]h&]uh1jLhjX hhhhhKubj])}(hThe frames (in packed raw Bayer format specific to the IPU3) received by the input video node is processed by the IPU3 Imaging Unit and are output to 2 video nodes, with each targeting a different purpose (main output and viewfinder output).h]hThe frames (in packed raw Bayer format specific to the IPU3) received by the input video node is processed by the IPU3 Imaging Unit and are output to 2 video nodes, with each targeting a different purpose (main output and viewfinder output).}(hji hhhNhNubah}(h]h ]h"]h$]h&]uh1j\hhhKhjX hhubj])}(heDetails onand the Bayer format specific to the IPU3 can be found in :ref:`v4l2-pix-fmt-ipu3-sbggr10`.h](hDDetails onand the Bayer format specific to the IPU3 can be found in }(hjw hhhNhNubh)}(h :ref:`v4l2-pix-fmt-ipu3-sbggr10`h]hinline)}(hj h]hv4l2-pix-fmt-ipu3-sbggr10}(hj hhhNhNubah}(h]h ](xrefstdstd-refeh"]h$]h&]uh1j hj ubah}(h]h ]h"]h$]h&]refdocj refdomainj reftyperef refexplicitrefwarn reftargetv4l2-pix-fmt-ipu3-sbggr10uh1hhhhKhjw ubh.}(hjw hhhNhNubeh}(h]h ]h"]h$]h&]uh1j\hhhKhjX hhubj])}(hNThe driver supports V4L2 Video Capture Interface as defined at :ref:`devices`.h](h?The driver supports V4L2 Video Capture Interface as defined at }(hj hhhNhNubh)}(h:ref:`devices`h]j )}(hj h]hdevices}(hj hhhNhNubah}(h]h ](j stdstd-refeh"]h$]h&]uh1j hj ubah}(h]h ]h"]h$]h&]refdocj refdomainj reftyperef refexplicitrefwarnj devicesuh1hhhhKhj ubh.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1j\hhhKhjX hhubj])}(hXOnly the multi-planar API is supported. More details can be found at :ref:`planar-apis`.h](hEOnly the multi-planar API is supported. More details can be found at }(hj hhhNhNubh)}(h:ref:`planar-apis`h]j )}(hj h]h planar-apis}(hj hhhNhNubah}(h]h ](j stdstd-refeh"]h$]h&]uh1j hj ubah}(h]h ]h"]h$]h&]refdocj refdomainj reftyperef refexplicitrefwarnj planar-apisuh1hhhhKhj ubh.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1j\hhhKhjX hhubeh}(h]'input-output-and-viewfinder-video-nodesah ]h"](input, output and viewfinder video nodesah$]h&]uh1jGhjhhhhhKubjH)}(hhh](jM)}(hParameters video nodeh]hParameters video node}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jLhj hhhhhKubj])}(hThe parameters video node receives the ImgU algorithm parameters that are used to configure how the ImgU algorithms process the image.h]hThe parameters video node receives the ImgU algorithm parameters that are used to configure how the ImgU algorithms process the image.}(hj* hhhNhNubah}(h]h ]h"]h$]h&]uh1j\hhhKhj hhubj])}(hbDetails on processing parameters specific to the IPU3 can be found in :ref:`v4l2-meta-fmt-params`.h](hFDetails on processing parameters specific to the IPU3 can be found in }(hj8 hhhNhNubh)}(h:ref:`v4l2-meta-fmt-params`h]j )}(hjB h]hv4l2-meta-fmt-params}(hjD hhhNhNubah}(h]h ](j stdstd-refeh"]h$]h&]uh1j hj@ ubah}(h]h ]h"]h$]h&]refdocj refdomainjN reftyperef refexplicitrefwarnj v4l2-meta-fmt-paramsuh1hhhhKhj8 ubh.}(hj8 hhhNhNubeh}(h]h ]h"]h$]h&]uh1j\hhhKhj hhubeh}(h]parameters-video-nodeah ]h"]parameters video nodeah$]h&]uh1jGhjhhhhhKubjH)}(hhh](jM)}(h3A statistics video nodeh]h3A statistics video node}(hju hhhNhNubah}(h]h ]h"]h$]h&]uh1jLhjr hhhhhKubj])}(hXA3A statistics video node is used by the ImgU driver to output the 3A (auto focus, auto exposure and auto white balance) statistics for the frames that are being processed by the ImgU to user space applications. User space applications can use this statistics data to compute the desired algorithm parameters for the ImgU.h]hXA3A statistics video node is used by the ImgU driver to output the 3A (auto focus, auto exposure and auto white balance) statistics for the frames that are being processed by the ImgU to user space applications. User space applications can use this statistics data to compute the desired algorithm parameters for the ImgU.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j\hhhKhjr hhubeh}(h]a-statistics-video-nodeah ]h"]3a statistics video nodeah$]h&]uh1jGhjhhhhhKubeh}(h]imguah ]h"]imguah$]h&]uh1jGhjIhhhhhKubjH)}(hhh](jM)}(hConfiguring the Intel IPU3h]hConfiguring the Intel IPU3}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jLhj hhhhhKubj])}(hiThe IPU3 ImgU pipelines can be configured using the Media Controller, defined at :ref:`media_controller`.h](hQThe IPU3 ImgU pipelines can be configured using the Media Controller, defined at }(hj hhhNhNubh)}(h:ref:`media_controller`h]j )}(hj h]hmedia_controller}(hj hhhNhNubah}(h]h ](j stdstd-refeh"]h$]h&]uh1j hj ubah}(h]h ]h"]h$]h&]refdocj refdomainj reftyperef refexplicitrefwarnj media_controlleruh1hhhhKhj ubh.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1j\hhhKhj hhubjH)}(hhh](jM)}(h*Running mode and firmware binary selectionh]h*Running mode and firmware binary selection}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jLhj hhhhhKubj])}(hXImgU works based on firmware, currently the ImgU firmware support run 2 pipes in time-sharing with single input frame data. Each pipe can run at certain mode - "VIDEO" or "STILL", "VIDEO" mode is commonly used for video frames capture, and "STILL" is used for still frame capture. However, you can also select "VIDEO" to capture still frames if you want to capture images with less system load and power. For "STILL" mode, ImgU will try to use smaller BDS factor and output larger bayer frame for further YUV processing than "VIDEO" mode to get high quality images. Besides, "STILL" mode need XNR3 to do noise reduction, hence "STILL" mode will need more power and memory bandwidth than "VIDEO" mode. TNR will be enabled in "VIDEO" mode and bypassed by "STILL" mode. ImgU is running at "VIDEO" mode by default, the user can use v4l2 control V4L2_CID_INTEL_IPU3_MODE (currently defined in drivers/staging/media/ipu3/include/uapi/intel-ipu3.h) to query and set the running mode. For user, there is no difference for buffer queueing between the "VIDEO" and "STILL" mode, mandatory input and main output node should be enabled and buffers need be queued, the statistics and the view-finder queues are optional.h]hXImgU works based on firmware, currently the ImgU firmware support run 2 pipes in time-sharing with single input frame data. Each pipe can run at certain mode - “VIDEO” or “STILL”, “VIDEO” mode is commonly used for video frames capture, and “STILL” is used for still frame capture. However, you can also select “VIDEO” to capture still frames if you want to capture images with less system load and power. For “STILL” mode, ImgU will try to use smaller BDS factor and output larger bayer frame for further YUV processing than “VIDEO” mode to get high quality images. Besides, “STILL” mode need XNR3 to do noise reduction, hence “STILL” mode will need more power and memory bandwidth than “VIDEO” mode. TNR will be enabled in “VIDEO” mode and bypassed by “STILL” mode. ImgU is running at “VIDEO” mode by default, the user can use v4l2 control V4L2_CID_INTEL_IPU3_MODE (currently defined in drivers/staging/media/ipu3/include/uapi/intel-ipu3.h) to query and set the running mode. For user, there is no difference for buffer queueing between the “VIDEO” and “STILL” mode, mandatory input and main output node should be enabled and buffers need be queued, the statistics and the view-finder queues are optional.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j\hhhKhj hhubj])}(hXSThe firmware binary will be selected according to current running mode, such log "using binary if_to_osys_striped " or "using binary if_to_osys_primary_striped" could be observed if you enable the ImgU dynamic debug, the binary if_to_osys_striped is selected for "VIDEO" and the binary "if_to_osys_primary_striped" is selected for "STILL".h]hXgThe firmware binary will be selected according to current running mode, such log “using binary if_to_osys_striped “ or “using binary if_to_osys_primary_striped” could be observed if you enable the ImgU dynamic debug, the binary if_to_osys_striped is selected for “VIDEO” and the binary “if_to_osys_primary_striped” is selected for “STILL”.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j\hhhMhj hhubeh}(h]*running-mode-and-firmware-binary-selectionah ]h"]*running mode and firmware binary selectionah$]h&]uh1jGhj hhhhhKubjH)}(hhh](jM)}(h(Processing the image in raw Bayer formath]h(Processing the image in raw Bayer format}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jLhj hhhhhM ubjH)}(hhh](jM)}(h1Configuring ImgU V4L2 subdev for image processingh]h1Configuring ImgU V4L2 subdev for image processing}(hj- hhhNhNubah}(h]h ]h"]h$]h&]uh1jLhj* hhhhhM ubj])}(hsThe ImgU V4L2 subdevs have to be configured with media controller APIs to have all the video nodes setup correctly.h]hsThe ImgU V4L2 subdevs have to be configured with media controller APIs to have all the video nodes setup correctly.}(hj; hhhNhNubah}(h]h ]h"]h$]h&]uh1j\hhhMhj* hhubj])}(h/Let us take "ipu3-imgu 0" subdev as an example.h]h3Let us take “ipu3-imgu 0” subdev as an example.}(hjI hhhNhNubah}(h]h ]h"]h$]h&]uh1j\hhhMhj* hhubj)}(hX%media-ctl -d $MDEV -r media-ctl -d $MDEV -l "ipu3-imgu 0 input":0 -> "ipu3-imgu 0":0[1] media-ctl -d $MDEV -l "ipu3-imgu 0":2 -> "ipu3-imgu 0 output":0[1] media-ctl -d $MDEV -l "ipu3-imgu 0":3 -> "ipu3-imgu 0 viewfinder":0[1] media-ctl -d $MDEV -l "ipu3-imgu 0":4 -> "ipu3-imgu 0 3a stat":0[1]h]hX%media-ctl -d $MDEV -r media-ctl -d $MDEV -l "ipu3-imgu 0 input":0 -> "ipu3-imgu 0":0[1] media-ctl -d $MDEV -l "ipu3-imgu 0":2 -> "ipu3-imgu 0 output":0[1] media-ctl -d $MDEV -l "ipu3-imgu 0":3 -> "ipu3-imgu 0 viewfinder":0[1] media-ctl -d $MDEV -l "ipu3-imgu 0":4 -> "ipu3-imgu 0 3a stat":0[1]}hjW sbah}(h]h ]h"]h$]h&]hhjjnonej}uh1jhhhMhj* hhubj])}(hAlso the pipe mode of the corresponding V4L2 subdev should be set as desired (e.g 0 for video mode or 1 for still mode) through the control id 0x009819a1 as below.h]hAlso the pipe mode of the corresponding V4L2 subdev should be set as desired (e.g 0 for video mode or 1 for still mode) through the control id 0x009819a1 as below.}(hjg hhhNhNubah}(h]h ]h"]h$]h&]uh1j\hhhMhj* hhubj)}(h(yavta -w "0x009819A1 1" /dev/v4l-subdev7h]h(yavta -w "0x009819A1 1" /dev/v4l-subdev7}hju sbah}(h]h ]h"]h$]h&]hhjjnonej}uh1jhhhMhj* hhubj])}(hXLCertain hardware blocks in ImgU pipeline can change the frame resolution by cropping or scaling, these hardware blocks include Input Feeder(IF), Bayer Down Scaler (BDS) and Geometric Distortion Correction (GDC). There is also a block which can change the frame resolution - YUV Scaler, it is only applicable to the secondary output.h]hXLCertain hardware blocks in ImgU pipeline can change the frame resolution by cropping or scaling, these hardware blocks include Input Feeder(IF), Bayer Down Scaler (BDS) and Geometric Distortion Correction (GDC). There is also a block which can change the frame resolution - YUV Scaler, it is only applicable to the secondary output.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j\hhhM#hj* hhubj])}(hwRAW Bayer frames go through these ImgU pipeline hardware blocks and the final processed image output to the DDR memory.h]hwRAW Bayer frames go through these ImgU pipeline hardware blocks and the final processed image output to the DDR memory.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j\hhhM)hj* hhubkfigure kernel_figure)}(hhh]hfigure)}(hhh](himage)}(hr.. kernel-figure:: ipu3_rcb.svg :alt: ipu3 resolution blocks image IPU3 resolution change hardware blocks h]h}(h]h ]h"]h$]h&]altipu3 resolution blocks imageuriadmin-guide/media/ipu3_rcb.svg candidates}*j suh1j hj hhhKubhcaption)}(h&IPU3 resolution change hardware blocksh]h&IPU3 resolution change hardware blocks}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j hhhM/hj ubeh}(h]id6ah ]h"]h$]h&]uh1j hj ubah}(h]h ]h"]h$]h&]uh1j hj* hhhhhNubj])}(h**Input Feeder**h]hstrong)}(hj h]h Input Feeder}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj ubah}(h]h ]h"]h$]h&]uh1j\hhhM1hj* hhubj])}(hInput Feeder gets the Bayer frame data from the sensor, it can enable cropping of lines and columns from the frame and then store pixels into device's internal pixel buffer which are ready to readout by following blocks.h]hInput Feeder gets the Bayer frame data from the sensor, it can enable cropping of lines and columns from the frame and then store pixels into device’s internal pixel buffer which are ready to readout by following blocks.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j\hhhM3hj* hhubj])}(h**Bayer Down Scaler**h]j )}(hjh]hBayer Down Scaler}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&]uh1j\hhhM7hj* hhubj])}(hBayer Down Scaler is capable of performing image scaling in Bayer domain, the downscale factor can be configured from 1X to 1/4X in each axis with configuration steps of 0.03125 (1/32).h]hBayer Down Scaler is capable of performing image scaling in Bayer domain, the downscale factor can be configured from 1X to 1/4X in each axis with configuration steps of 0.03125 (1/32).}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j\hhhM9hj* hhubj])}(h#**Geometric Distortion Correction**h]j )}(hj*h]hGeometric Distortion Correction}(hj,hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj(ubah}(h]h ]h"]h$]h&]uh1j\hhhM=hj* hhubj])}(hGeometric Distortion Correction is used to perform correction of distortions and image filtering. It needs some extra filter and envelope padding pixels to work, so the input resolution of GDC should be larger than the output resolution.h]hGeometric Distortion Correction is used to perform correction of distortions and image filtering. It needs some extra filter and envelope padding pixels to work, so the input resolution of GDC should be larger than the output resolution.}(hj?hhhNhNubah}(h]h ]h"]h$]h&]uh1j\hhhM?hj* hhubj])}(h**YUV Scaler**h]j )}(hjOh]h YUV Scaler}(hjQhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjMubah}(h]h ]h"]h$]h&]uh1j\hhhMDhj* hhubj])}(hYUV Scaler which similar with BDS, but it is mainly do image down scaling in YUV domain, it can support up to 1/12X down scaling, but it can not be applied to the main output.h]hYUV Scaler which similar with BDS, but it is mainly do image down scaling in YUV domain, it can support up to 1/12X down scaling, but it can not be applied to the main output.}(hjdhhhNhNubah}(h]h ]h"]h$]h&]uh1j\hhhMFhj* hhubj])}(hX^The ImgU V4L2 subdev has to be configured with the supported resolutions in all the above hardware blocks, for a given input resolution. For a given supported resolution for an input frame, the Input Feeder, Bayer Down Scaler and GDC blocks should be configured with the supported resolutions as each hardware block has its own alignment requirement.h]hX^The ImgU V4L2 subdev has to be configured with the supported resolutions in all the above hardware blocks, for a given input resolution. For a given supported resolution for an input frame, the Input Feeder, Bayer Down Scaler and GDC blocks should be configured with the supported resolutions as each hardware block has its own alignment requirement.}(hjrhhhNhNubah}(h]h ]h"]h$]h&]uh1j\hhhMJhj* hhubj])}(hYou must configure the output resolution of the hardware blocks smartly to meet the hardware requirement along with keeping the maximum field of view. The intermediate resolutions can be generated by specific tool -h]hYou must configure the output resolution of the hardware blocks smartly to meet the hardware requirement along with keeping the maximum field of view. The intermediate resolutions can be generated by specific tool -}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j\hhhMPhj* hhubj])}(h+https://github.com/intel/intel-ipu3-pipecfgh]h reference)}(hjh]h+https://github.com/intel/intel-ipu3-pipecfg}(hjhhhNhNubah}(h]h ]h"]h$]h&]refurijuh1jhjubah}(h]h ]h"]h$]h&]uh1j\hhhMThj* hhubj])}(hThis tool can be used to generate intermediate resolutions. More information can be obtained by looking at the following IPU3 ImgU configuration table.h]hThis tool can be used to generate intermediate resolutions. More information can be obtained by looking at the following IPU3 ImgU configuration table.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j\hhhMVhj* hhubj])}(hMhttps://chromium.googlesource.com/chromiumos/overlays/board-overlays/+/masterh]j)}(hjh]hMhttps://chromium.googlesource.com/chromiumos/overlays/board-overlays/+/master}(hjhhhNhNubah}(h]h ]h"]h$]h&]refurijuh1jhjubah}(h]h ]h"]h$]h&]uh1j\hhhMYhj* hhubj])}(hUnder baseboard-poppy/media-libs/cros-camera-hal-configs-poppy/files/gcss directory, graph_settings_ov5670.xml can be used as an example.h]hUnder baseboard-poppy/media-libs/cros-camera-hal-configs-poppy/files/gcss directory, graph_settings_ov5670.xml can be used as an example.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j\hhhM[hj* hhubj])}(hGThe following steps prepare the ImgU pipeline for the image processing.h]hGThe following steps prepare the ImgU pipeline for the image processing.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j\hhhM^hj* hhubj])}(h1. The ImgU V4L2 subdev data format should be set by using the VIDIOC_SUBDEV_S_FMT on pad 0, using the GDC width and height obtained above.h]h1. The ImgU V4L2 subdev data format should be set by using the VIDIOC_SUBDEV_S_FMT on pad 0, using the GDC width and height obtained above.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j\hhhM`hj* hhubj])}(h2. The ImgU V4L2 subdev cropping should be set by using the VIDIOC_SUBDEV_S_SELECTION on pad 0, with V4L2_SEL_TGT_CROP as the target, using the input feeder height and width.h]h2. The ImgU V4L2 subdev cropping should be set by using the VIDIOC_SUBDEV_S_SELECTION on pad 0, with V4L2_SEL_TGT_CROP as the target, using the input feeder height and width.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j\hhhMchj* hhubj])}(h3. The ImgU V4L2 subdev composing should be set by using the VIDIOC_SUBDEV_S_SELECTION on pad 0, with V4L2_SEL_TGT_COMPOSE as the target, using the BDS height and width.h]h3. The ImgU V4L2 subdev composing should be set by using the VIDIOC_SUBDEV_S_SELECTION on pad 0, with V4L2_SEL_TGT_COMPOSE as the target, using the BDS height and width.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j\hhhMghj* hhubj])}(hFor the ov5670 example, for an input frame with a resolution of 2592x1944 (which is input to the ImgU subdev pad 0), the corresponding resolutions for input feeder, BDS and GDC are 2592x1944, 2592x1944 and 2560x1920 respectively.h]hFor the ov5670 example, for an input frame with a resolution of 2592x1944 (which is input to the ImgU subdev pad 0), the corresponding resolutions for input feeder, BDS and GDC are 2592x1944, 2592x1944 and 2560x1920 respectively.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j\hhhMkhj* hhubj])}(hOnce this is done, the received raw Bayer frames can be input to the ImgU V4L2 subdev as below, using the open source application v4l2n [#f1]_.h](hOnce this is done, the received raw Bayer frames can be input to the ImgU V4L2 subdev as below, using the open source application v4l2n }(hj"hhhNhNubj)}(h[#f1]_h]h1}(hj*hhhNhNubah}(h]id3ah ]h"]h$]h&]jKjjjjuh1jhj"jKubh.}(hj"hhhNhNubeh}(h]h ]h"]h$]h&]uh1j\hhhMphj* hhubj])}(hXBFor an image captured with 2592x1944 [#f4]_ resolution, with desired output resolution as 2560x1920 and viewfinder resolution as 2560x1920, the following v4l2n command can be used. This helps process the raw Bayer frames and produces the desired results for the main output image and the viewfinder output, in NV12 format.h](h%For an image captured with 2592x1944 }(hjChhhNhNubj)}(h[#f4]_h]h3}(hjKhhhNhNubah}(h]id4ah ]h"]h$]h&]jKjf4jjuh1jhjCjKubhX resolution, with desired output resolution as 2560x1920 and viewfinder resolution as 2560x1920, the following v4l2n command can be used. This helps process the raw Bayer frames and produces the desired results for the main output image and the viewfinder output, in NV12 format.}(hjChhhNhNubeh}(h]h ]h"]h$]h&]uh1j\hhhMshj* hhubj)}(hXv4l2n --pipe=4 --load=/tmp/frame-#.bin --open=/dev/video4 --fmt=type:VIDEO_OUTPUT_MPLANE,width=2592,height=1944,pixelformat=0X47337069 \ --reqbufs=type:VIDEO_OUTPUT_MPLANE,count:1 --pipe=1 \ --output=/tmp/frames.out --open=/dev/video5 \ --fmt=type:VIDEO_CAPTURE_MPLANE,width=2560,height=1920,pixelformat=NV12 \ --reqbufs=type:VIDEO_CAPTURE_MPLANE,count:1 --pipe=2 \ --output=/tmp/frames.vf --open=/dev/video6 \ --fmt=type:VIDEO_CAPTURE_MPLANE,width=2560,height=1920,pixelformat=NV12 \ --reqbufs=type:VIDEO_CAPTURE_MPLANE,count:1 --pipe=3 --open=/dev/video7 \ --output=/tmp/frames.3A --fmt=type:META_CAPTURE,? \ --reqbufs=count:1,type:META_CAPTURE --pipe=1,2,3,4 --stream=5h]hXv4l2n --pipe=4 --load=/tmp/frame-#.bin --open=/dev/video4 --fmt=type:VIDEO_OUTPUT_MPLANE,width=2592,height=1944,pixelformat=0X47337069 \ --reqbufs=type:VIDEO_OUTPUT_MPLANE,count:1 --pipe=1 \ --output=/tmp/frames.out --open=/dev/video5 \ --fmt=type:VIDEO_CAPTURE_MPLANE,width=2560,height=1920,pixelformat=NV12 \ --reqbufs=type:VIDEO_CAPTURE_MPLANE,count:1 --pipe=2 \ --output=/tmp/frames.vf --open=/dev/video6 \ --fmt=type:VIDEO_CAPTURE_MPLANE,width=2560,height=1920,pixelformat=NV12 \ --reqbufs=type:VIDEO_CAPTURE_MPLANE,count:1 --pipe=3 --open=/dev/video7 \ --output=/tmp/frames.3A --fmt=type:META_CAPTURE,? \ --reqbufs=count:1,type:META_CAPTURE --pipe=1,2,3,4 --stream=5}hjesbah}(h]h ]h"]h$]h&]hhjjnonej}uh1jhhhMyhj* hhubj])}(h@You can also use yavta [#f2]_ command to do same thing as above:h](hYou can also use yavta }(hjuhhhNhNubj)}(h[#f2]_h]h2}(hj}hhhNhNubah}(h]id5ah ]h"]h$]h&]jKjjjjuh1jhjujKubh# command to do same thing as above:}(hjuhhhNhNubeh}(h]h ]h"]h$]h&]uh1j\hhhMhj* hhubj)}(hXyavta --data-prefix -Bcapture-mplane -c10 -n5 -I -s2592x1944 \ --file=frame-#.out-f NV12 /dev/video5 & \ yavta --data-prefix -Bcapture-mplane -c10 -n5 -I -s2592x1944 \ --file=frame-#.vf -f NV12 /dev/video6 & \ yavta --data-prefix -Bmeta-capture -c10 -n5 -I \ --file=frame-#.3a /dev/video7 & \ yavta --data-prefix -Boutput-mplane -c10 -n5 -I -s2592x1944 \ --file=/tmp/frame-in.cio2 -f IPU3_SGRBG10 /dev/video4h]hXyavta --data-prefix -Bcapture-mplane -c10 -n5 -I -s2592x1944 \ --file=frame-#.out-f NV12 /dev/video5 & \ yavta --data-prefix -Bcapture-mplane -c10 -n5 -I -s2592x1944 \ --file=frame-#.vf -f NV12 /dev/video6 & \ yavta --data-prefix -Bmeta-capture -c10 -n5 -I \ --file=frame-#.3a /dev/video7 & \ yavta --data-prefix -Boutput-mplane -c10 -n5 -I -s2592x1944 \ --file=/tmp/frame-in.cio2 -f IPU3_SGRBG10 /dev/video4}hjsbah}(h]h ]h"]h$]h&]hhjjnonej}uh1jhhhMhj* hhubj])}(hwhere /dev/video4, /dev/video5, /dev/video6 and /dev/video7 devices point to input, output, viewfinder and 3A statistics video nodes respectively.h]hwhere /dev/video4, /dev/video5, /dev/video6 and /dev/video7 devices point to input, output, viewfinder and 3A statistics video nodes respectively.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j\hhhMhj* hhubeh}(h]1configuring-imgu-v4l2-subdev-for-image-processingah ]h"]1configuring imgu v4l2 subdev for image processingah$]h&]uh1jGhj hhhhhM ubeh}(h](processing-the-image-in-raw-bayer-formatah ]h"](processing the image in raw bayer formatah$]h&]uh1jGhj hhhhhM ubjH)}(hhh](jM)}(h.Converting the raw Bayer image into YUV domainh]h.Converting the raw Bayer image into YUV domain}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jLhjhhhhhMubj])}(hSThe processed images after the above step, can be converted to YUV domain as below.h]hSThe processed images after the above step, can be converted to YUV domain as below.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j\hhhMhjhhubjH)}(hhh](jM)}(hMain output framesh]hMain output frames}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jLhjhhhhhMubj)}(h@raw2pnm -x2560 -y1920 -fNV12 /tmp/frames.out /tmp/frames.out.ppmh]h@raw2pnm -x2560 -y1920 -fNV12 /tmp/frames.out /tmp/frames.out.ppm}hjsbah}(h]h ]h"]h$]h&]hhjjnonej}uh1jhhhMhjhhubj])}(hlwhere 2560x1920 is output resolution, NV12 is the video format, followed by input frame and output PNM file.h]hlwhere 2560x1920 is output resolution, NV12 is the video format, followed by input frame and output PNM file.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j\hhhMhjhhubeh}(h]main-output-framesah ]h"]main output framesah$]h&]uh1jGhjhhhhhMubjH)}(hhh](jM)}(hViewfinder output framesh]hViewfinder output frames}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jLhjhhhhhMubj)}(h>raw2pnm -x2560 -y1920 -fNV12 /tmp/frames.vf /tmp/frames.vf.ppmh]h>raw2pnm -x2560 -y1920 -fNV12 /tmp/frames.vf /tmp/frames.vf.ppm}hj+sbah}(h]h ]h"]h$]h&]hhjjnonej}uh1jhhhMhjhhubj])}(hlwhere 2560x1920 is output resolution, NV12 is the video format, followed by input frame and output PNM file.h]hlwhere 2560x1920 is output resolution, NV12 is the video format, followed by input frame and output PNM file.}(hj;hhhNhNubah}(h]h ]h"]h$]h&]uh1j\hhhMhjhhubeh}(h]viewfinder-output-framesah ]h"]viewfinder output framesah$]h&]uh1jGhjhhhhhMubeh}(h].converting-the-raw-bayer-image-into-yuv-domainah ]h"].converting the raw bayer image into yuv domainah$]h&]uh1jGhj hhhhhMubeh}(h]configuring-the-intel-ipu3ah ]h"]configuring the intel ipu3ah$]h&]uh1jGhjIhhhhhKubjH)}(hhh](jM)}(h Example user space code for IPU3h]h Example user space code for IPU3[s}(hjdhhhNhNubah}(h]h ]h"]h$]h&]uh1jLhjahhhhhMubj])}(h@User space code that configures and uses IPU3 is available here.h]h@User space code that configures and uses IPU3 is available here.}(hjrhhhNhNubah}(h]h ]h"]h$]h&]uh1j\hhhMhjahhubj])}(hJhttps://chromium.googlesource.com/chromiumos/platform/arc-camera/+/master/h]j)}(hjh]hJhttps://chromium.googlesource.com/chromiumos/platform/arc-camera/+/master/}(hjhhhNhNubah}(h]h ]h"]h$]h&]refurijuh1jhjubah}(h]h ]h"]h$]h&]uh1j\hhhMhjahhubj])}(h4The source can be located under hal/intel directory.h]h4The source can be located under hal/intel directory.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j\hhhMhjahhubeh}(h] example-user-space-code-for-ipu3ah ]h"] example user space code for ipu3ah$]h&]uh1jGhjIhhhhhMubjH)}(hhh](jM)}(hOverview of IPU3 pipelineh]hOverview of IPU3 pipeline}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jLhjhhhhhMubj])}(hIPU3 pipeline has a number of image processing stages, each of which takes a set of parameters as input. The major stages of pipelines are shown here:h]hIPU3 pipeline has a number of image processing stages, each of which takes a set of parameters as input. The major stages of pipelines are shown here:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j\hhhMhjhhubj )}(hhh](j kernel_render)}(hhh]j)}(hXdigraph "IPU3 ImgU" { node [shape=box] splines="ortho" rankdir="LR" a [label="Raw pixels"] b [label="Bayer Downscaling"] c [label="Optical Black Correction"] d [label="Linearization"] e [label="Lens Shading Correction"] f [label="White Balance / Exposure / Focus Apply"] g [label="Bayer Noise Reduction"] h [label="ANR"] i [label="Demosaicing"] j [label="Color Correction Matrix"] k [label="Gamma correction"] l [label="Color Space Conversion"] m [label="Chroma Down Scaling"] n [label="Chromatic Noise Reduction"] o [label="Total Color Correction"] p [label="XNR3"] q [label="TNR"] r [label="DDR", style=filled, fillcolor=yellow, shape=cylinder] s [label="YUV Downscaling"] t [label="DDR", style=filled, fillcolor=yellow, shape=cylinder] { rank=same; a -> b -> c -> d -> e -> f -> g -> h -> i } { rank=same; j -> k -> l -> m -> n -> o -> p -> q -> s -> t} a -> j [style=invis, weight=10] i -> j q -> r }h]hXdigraph "IPU3 ImgU" { node [shape=box] splines="ortho" rankdir="LR" a [label="Raw pixels"] b [label="Bayer Downscaling"] c [label="Optical Black Correction"] d [label="Linearization"] e [label="Lens Shading Correction"] f [label="White Balance / Exposure / Focus Apply"] g [label="Bayer Noise Reduction"] h [label="ANR"] i [label="Demosaicing"] j [label="Color Correction Matrix"] k [label="Gamma correction"] l [label="Color Space Conversion"] m [label="Chroma Down Scaling"] n [label="Chromatic Noise Reduction"] o [label="Total Color Correction"] p [label="XNR3"] q [label="TNR"] r [label="DDR", style=filled, fillcolor=yellow, shape=cylinder] s [label="YUV Downscaling"] t [label="DDR", style=filled, fillcolor=yellow, shape=cylinder] { rank=same; a -> b -> c -> d -> e -> f -> g -> h -> i } { rank=same; j -> k -> l -> m -> n -> o -> p -> q -> s -> t} a -> j [style=invis, weight=10] i -> j q -> r }}hjsbah}(h]h ]h"]h$]h&]hhuh1jhjhhubah}(h]h ]h"]h$]h&]altIPU3 ImgU PipelinesrclangDOTuh1jhjubj )}(hIPU3 ImgU Pipeline Diagramh]hIPU3 ImgU Pipeline Diagram}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j hhhKhjubeh}(h]id7ah ]h"]h$]h&]altjcaptionjuh1j hjhhhhhNubj])}(h?The table below presents a description of the above algorithms.h]h?The table below presents a description of the above algorithms.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j\hhhMhjhhubj*)}(hhh]j/)}(hhh](j4)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1j3hjubj4)}(hhh]h}(h]h ]h"]h$]h&]colwidthK7uh1j3hjubjT)}(hhh]jY)}(hhh](j^)}(hhh]j])}(hNameh]hName}(hj5hhhNhNubah}(h]h ]h"]h$]h&]uh1j\hhhMhj2ubah}(h]h ]h"]h$]h&]uh1j]hj/ubj^)}(hhh]j])}(h Descriptionh]h Description}(hjLhhhNhNubah}(h]h ]h"]h$]h&]uh1j\hhhMhjIubah}(h]h ]h"]h$]h&]uh1j]hj/ubeh}(h]h ]h"]h$]h&]uh1jXhj,ubah}(h]h ]h"]h$]h&]uh1jShjubj)}(hhh](jY)}(hhh](j^)}(hhh]j])}(hOptical Black Correctionh]hOptical Black Correction}(hjuhhhNhNubah}(h]h ]h"]h$]h&]uh1j\hhhMhjrubah}(h]h ]h"]h$]h&]uh1j]hjoubj^)}(hhh]j])}(hOptical Black Correction block subtracts a pre-defined value from the respective pixel values to obtain better image quality. Defined in struct ipu3_uapi_obgrid_param.h]hOptical Black Correction block subtracts a pre-defined value from the respective pixel values to obtain better image quality. Defined in struct ipu3_uapi_obgrid_param.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j\hhhMhjubah}(h]h ]h"]h$]h&]uh1j]hjoubeh}(h]h ]h"]h$]h&]uh1jXhjlubjY)}(hhh](j^)}(hhh]j])}(h Linearizationh]h Linearization}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j\hhhMhjubah}(h]h ]h"]h$]h&]uh1j]hjubj^)}(hhh]j])}(hThis algo block uses linearization parameters to address non-linearity sensor effects. The Lookup table table is defined in struct ipu3_uapi_isp_lin_vmem_params.h]hThis algo block uses linearization parameters to address non-linearity sensor effects. The Lookup table table is defined in struct ipu3_uapi_isp_lin_vmem_params.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j\hhhMhjubah}(h]h ]h"]h$]h&]uh1j]hjubeh}(h]h ]h"]h$]h&]uh1jXhjlubjY)}(hhh](j^)}(hhh]j])}(hSHDh]hSHD}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j\hhhMhjubah}(h]h ]h"]h$]h&]uh1j]hjubj^)}(hhh]j])}(hLens shading correction is used to correct spatial non-uniformity of the pixel response due to optical lens shading. This is done by applying a different gain for each pixel. The gain, black level etc are configured in struct ipu3_uapi_shd_config_static.h]hLens shading correction is used to correct spatial non-uniformity of the pixel response due to optical lens shading. This is done by applying a different gain for each pixel. The gain, black level etc are configured in struct ipu3_uapi_shd_config_static.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j\hhhMhjubah}(h]h ]h"]h$]h&]uh1j]hjubeh}(h]h ]h"]h$]h&]uh1jXhjlubjY)}(hhh](j^)}(hhh]j])}(hBNRh]hBNR}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j\hhhMhjubah}(h]h ]h"]h$]h&]uh1j]hjubj^)}(hhh]j])}(hBayer noise reduction block removes image noise by applying a bilateral filter. See struct ipu3_uapi_bnr_static_config for details.h]hBayer noise reduction block removes image noise by applying a bilateral filter. See struct ipu3_uapi_bnr_static_config for details.}(hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1j\hhhMhj.ubah}(h]h ]h"]h$]h&]uh1j]hjubeh}(h]h ]h"]h$]h&]uh1jXhjlubjY)}(hhh](j^)}(hhh]j])}(hANRh]hANR}(hjQhhhNhNubah}(h]h ]h"]h$]h&]uh1j\hhhMhjNubah}(h]h ]h"]h$]h&]uh1j]hjKubj^)}(hhh]j])}(hAdvanced Noise Reduction is a block based algorithm that performs noise reduction in the Bayer domain. The convolution matrix etc can be found in struct ipu3_uapi_anr_config.h]hAdvanced Noise Reduction is a block based algorithm that performs noise reduction in the Bayer domain. The convolution matrix etc can be found in struct ipu3_uapi_anr_config.}(hjhhhhNhNubah}(h]h ]h"]h$]h&]uh1j\hhhMhjeubah}(h]h ]h"]h$]h&]uh1j]hjKubeh}(h]h ]h"]h$]h&]uh1jXhjlubjY)}(hhh](j^)}(hhh]j])}(hDMh]hDM}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j\hhhMhjubah}(h]h ]h"]h$]h&]uh1j]hjubj^)}(hhh]j])}(hDemosaicing converts raw sensor data in Bayer format into RGB (Red, Green, Blue) presentation. Then add outputs of estimation of Y channel for following stream processing by Firmware. The struct is defined as struct ipu3_uapi_dm_config.h]hDemosaicing converts raw sensor data in Bayer format into RGB (Red, Green, Blue) presentation. Then add outputs of estimation of Y channel for following stream processing by Firmware. The struct is defined as struct ipu3_uapi_dm_config.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j\hhhMhjubah}(h]h ]h"]h$]h&]uh1j]hjubeh}(h]h ]h"]h$]h&]uh1jXhjlubjY)}(hhh](j^)}(hhh]j])}(hColor Correctionh]hColor Correction}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j\hhhMhjubah}(h]h ]h"]h$]h&]uh1j]hjubj^)}(hhh]j])}(hColor Correction algo transforms sensor specific color space to the standard "sRGB" color space. This is done by applying 3x3 matrix defined in struct ipu3_uapi_ccm_mat_config.h]hColor Correction algo transforms sensor specific color space to the standard “sRGB” color space. This is done by applying 3x3 matrix defined in struct ipu3_uapi_ccm_mat_config.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j\hhhMhjubah}(h]h ]h"]h$]h&]uh1j]hjubeh}(h]h ]h"]h$]h&]uh1jXhjlubjY)}(hhh](j^)}(hhh]j])}(hGamma correctionh]hGamma correction}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j\hhhMhjubah}(h]h ]h"]h$]h&]uh1j]hjubj^)}(hhh]j])}(hGamma correction struct ipu3_uapi_gamma_config is a basic non-linear tone mapping correction that is applied per pixel for each pixel component.h]hGamma correction struct ipu3_uapi_gamma_config is a basic non-linear tone mapping correction that is applied per pixel for each pixel component.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j\hhhMhj ubah}(h]h ]h"]h$]h&]uh1j]hjubeh}(h]h ]h"]h$]h&]uh1jXhjlubjY)}(hhh](j^)}(hhh]j])}(hCSCh]hCSC}(hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1j\hhhM hj*ubah}(h]h ]h"]h$]h&]uh1j]hj'ubj^)}(hhh]j])}(hColor space conversion transforms each pixel from the RGB primary presentation to YUV (Y: brightness, UV: Luminance) presentation. This is done by applying a 3x3 matrix defined in struct ipu3_uapi_csc_mat_configh]hColor space conversion transforms each pixel from the RGB primary presentation to YUV (Y: brightness, UV: Luminance) presentation. This is done by applying a 3x3 matrix defined in struct ipu3_uapi_csc_mat_config}(hjDhhhNhNubah}(h]h ]h"]h$]h&]uh1j\hhhM hjAubah}(h]h ]h"]h$]h&]uh1j]hj'ubeh}(h]h ]h"]h$]h&]uh1jXhjlubjY)}(hhh](j^)}(hhh]j])}(hCDSh]hCDS}(hjdhhhNhNubah}(h]h ]h"]h$]h&]uh1j\hhhMhjaubah}(h]h ]h"]h$]h&]uh1j]hj^ubj^)}(hhh]j])}(hChroma down sampling After the CSC is performed, the Chroma Down Sampling is applied for a UV plane down sampling by a factor of 2 in each direction for YUV 4:2:0 using a 4x2 configurable filter struct ipu3_uapi_cds_params.h]hChroma down sampling After the CSC is performed, the Chroma Down Sampling is applied for a UV plane down sampling by a factor of 2 in each direction for YUV 4:2:0 using a 4x2 configurable filter struct ipu3_uapi_cds_params.}(hj{hhhNhNubah}(h]h ]h"]h$]h&]uh1j\hhhMhjxubah}(h]h ]h"]h$]h&]uh1j]hj^ubeh}(h]h ]h"]h$]h&]uh1jXhjlubjY)}(hhh](j^)}(hhh]j])}(hCHNRh]hCHNR}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j\hhhMhjubah}(h]h ]h"]h$]h&]uh1j]hjubj^)}(hhh]j])}(hChroma noise reduction This block processes only the chrominance pixels and performs noise reduction by cleaning the high frequency noise. See struct struct ipu3_uapi_yuvp1_chnr_config.h]hChroma noise reduction This block processes only the chrominance pixels and performs noise reduction by cleaning the high frequency noise. See struct struct ipu3_uapi_yuvp1_chnr_config.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j\hhhMhjubah}(h]h ]h"]h$]h&]uh1j]hjubeh}(h]h ]h"]h$]h&]uh1jXhjlubjY)}(hhh](j^)}(hhh]j])}(hTCCh]hTCC}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j\hhhMhjubah}(h]h ]h"]h$]h&]uh1j]hjubj^)}(hhh]j])}(hUTotal color correction as defined in struct struct ipu3_uapi_yuvp2_tcc_static_config.h]hUTotal color correction as defined in struct struct ipu3_uapi_yuvp2_tcc_static_config.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j\hhhMhjubah}(h]h ]h"]h$]h&]uh1j]hjubeh}(h]h ]h"]h$]h&]uh1jXhjlubjY)}(hhh](j^)}(hhh]j])}(hXNR3h]hXNR3}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j\hhhMhjubah}(h]h ]h"]h$]h&]uh1j]hjubj^)}(hhh]j])}(hXBeXtreme Noise Reduction V3 is the third revision of noise reduction algorithm used to improve image quality. This removes the low frequency noise in the captured image. Two related structs are being defined, struct ipu3_uapi_isp_xnr3_params for ISP data memory and struct ipu3_uapi_isp_xnr3_vmem_params for vector memory.h]hXBeXtreme Noise Reduction V3 is the third revision of noise reduction algorithm used to improve image quality. This removes the low frequency noise in the captured image. Two related structs are being defined, struct ipu3_uapi_isp_xnr3_params for ISP data memory and struct ipu3_uapi_isp_xnr3_vmem_params for vector memory.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j\hhhMhjubah}(h]h ]h"]h$]h&]uh1j]hjubeh}(h]h ]h"]h$]h&]uh1jXhjlubjY)}(hhh](j^)}(hhh]j])}(hTNRh]hTNR}(hj@hhhNhNubah}(h]h ]h"]h$]h&]uh1j\hhhM#hj=ubah}(h]h ]h"]h$]h&]uh1j]hj:ubj^)}(hhh]j])}(hTemporal Noise Reduction block compares successive frames in time to remove anomalies / noise in pixel values. struct ipu3_uapi_isp_tnr3_vmem_params and struct ipu3_uapi_isp_tnr3_params are defined for ISP vector and data memory respectively.h]hTemporal Noise Reduction block compares successive frames in time to remove anomalies / noise in pixel values. struct ipu3_uapi_isp_tnr3_vmem_params and struct ipu3_uapi_isp_tnr3_params are defined for ISP vector and data memory respectively.}(hjWhhhNhNubah}(h]h ]h"]h$]h&]uh1j\hhhM#hjTubah}(h]h ]h"]h$]h&]uh1j]hj:ubeh}(h]h ]h"]h$]h&]uh1jXhjlubeh}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]colsKuh1j.hjubah}(h]h ]h"]h$]h&]uh1j)hjhhhhhNubj])}(h;Other often encountered acronyms not listed in above table:h]h;Other often encountered acronyms not listed in above table:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j\hhhM*hjhhubh block_quote)}(hXACC Accelerator cluster AWB_FR Auto white balance filter response statistics BDS Bayer downscaler parameters CCM Color correction matrix coefficients IEFd Image enhancement filter directed Obgrid Optical black level compensation OSYS Output system configuration ROI Region of interest YDS Y down sampling YTM Y-tone mapping h]hdefinition_list)}(hhh](hdefinition_list_item)}(hACC Accelerator clusterh](hterm)}(hACCh]hACC}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhM,hjubh definition)}(hhh]j])}(hAccelerator clusterh]hAccelerator cluster}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j\hhhM-hjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhhhM,hjubj)}(h4AWB_FR Auto white balance filter response statisticsh](j)}(hAWB_FRh]hAWB_FR}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhM.hjubj)}(hhh]j])}(h-Auto white balance filter response statisticsh]h-Auto white balance filter response statistics}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j\hhhM/hjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhhhM.hjubj)}(hBDS Bayer downscaler parametersh](j)}(hBDSh]hBDS}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhM0hjubj)}(hhh]j])}(hBayer downscaler parametersh]hBayer downscaler parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j\hhhM1hjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhhhM0hjubj)}(h(CCM Color correction matrix coefficientsh](j)}(hCCMh]hCCM}(hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhM2hj0ubj)}(hhh]j])}(h$Color correction matrix coefficientsh]h$Color correction matrix coefficients}(hjEhhhNhNubah}(h]h ]h"]h$]h&]uh1j\hhhM3hjBubah}(h]h ]h"]h$]h&]uh1jhj0ubeh}(h]h ]h"]h$]h&]uh1jhhhM2hjubj)}(h&IEFd Image enhancement filter directedh](j)}(hIEFdh]hIEFd}(hjchhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhM4hj_ubj)}(hhh]j])}(h!Image enhancement filter directedh]h!Image enhancement filter directed}(hjthhhNhNubah}(h]h ]h"]h$]h&]uh1j\hhhM5hjqubah}(h]h ]h"]h$]h&]uh1jhj_ubeh}(h]h ]h"]h$]h&]uh1jhhhM4hjubj)}(h'Obgrid Optical black level compensationh](j)}(hObgridh]hObgrid}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhM6hjubj)}(hhh]j])}(h Optical black level compensationh]h Optical black level compensation}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j\hhhM7hjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhhhM6hjubj)}(h OSYS Output system configurationh](j)}(hOSYSh]hOSYS}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhM8hjubj)}(hhh]j])}(hOutput system configurationh]hOutput system configuration}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j\hhhM9hjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhhhM8hjubj)}(hROI Region of interesth](j)}(hROIh]hROI}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhM:hjubj)}(hhh]j])}(hRegion of interesth]hRegion of interest}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j\hhhM;hjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhhhM:hjubj)}(hYDS Y down samplingh](j)}(hYDSh]hYDS}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhM<hjubj)}(hhh]j])}(hY down samplingh]hY down sampling}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1j\hhhM=hj-ubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhhhM<hjubj)}(hYTM Y-tone mapping h](j)}(hYTMh]hYTM}(hjNhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhM?hjJubj)}(hhh]j])}(hY-tone mappingh]hY-tone mapping}(hj_hhhNhNubah}(h]h ]h"]h$]h&]uh1j\hhhM?hj\ubah}(h]h ]h"]h$]h&]uh1jhjJubeh}(h]h ]h"]h$]h&]uh1jhhhM?hjubeh}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhhhM,hjhhubj])}(hA few stages of the pipeline will be executed by firmware running on the ISP processor, while many others will use a set of fixed hardware blocks also called accelerator cluster (ACC) to crunch pixel data and produce statistics.h]hA few stages of the pipeline will be executed by firmware running on the ISP processor, while many others will use a set of fixed hardware blocks also called accelerator cluster (ACC) to crunch pixel data and produce statistics.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j\hhhMAhjhhubj])}(hXACC parameters of individual algorithms, as defined by struct ipu3_uapi_acc_param, can be chosen to be applied by the user space through struct struct ipu3_uapi_flags embedded in struct ipu3_uapi_params structure. For parameters that are configured as not enabled by the user space, the corresponding structs are ignored by the driver, in which case the existing configuration of the algorithm will be preserved.h]hXACC parameters of individual algorithms, as defined by struct ipu3_uapi_acc_param, can be chosen to be applied by the user space through struct struct ipu3_uapi_flags embedded in struct ipu3_uapi_params structure. For parameters that are configured as not enabled by the user space, the corresponding structs are ignored by the driver, in which case the existing configuration of the algorithm will be preserved.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j\hhhMEhjhhubeh}(h]overview-of-ipu3-pipelineah ]h"]overview of ipu3 pipelineah$]h&]uh1jGhjIhhhhhMubjH)}(hhh](jM)}(h Referencesh]h References}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jLhjhhhhhMNubhfootnote)}(hhttps://github.com/intel/nvt h](hlabel)}(hhh]h1}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjhhhNhNubj])}(hhttps://github.com/intel/nvth]j)}(hjh]hhttps://github.com/intel/nvt}(hjhhhNhNubah}(h]h ]h"]h$]h&]refurijuh1jhjubah}(h]h ]h"]h$]h&]uh1j\hhhMPhjubeh}(h]jah ]h"]f1ah$]h&](jj4ejKjjuh1jhhhMPhjhhubj)}(h&http://git.ideasonboard.org/yavta.git h](j)}(hhh]h2}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjhhhNhNubj])}(h%http://git.ideasonboard.org/yavta.gith]j)}(hjh]h%http://git.ideasonboard.org/yavta.git}(hjhhhNhNubah}(h]h ]h"]h$]h&]refurijuh1jhjubah}(h]h ]h"]h$]h&]uh1j\hhhMRhjubeh}(h]jah ]h"]f2ah$]h&](jjejKjjuh1jhhhMRhjhhubj)}(hFImgU limitation requires an additional 16x16 for all input resolutionsh](j)}(hhh]h3}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjhhhNhNubj])}(hj h]hFImgU limitation requires an additional 16x16 for all input resolutions}(hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1j\hhhMThjubeh}(h]jZah ]h"]f4ah$]h&]jUajKjjuh1jhhhMThjhhubeh}(h] referencesah ]h"] referencesah$]h&]uh1jGhjIhhhhhMNubeh}(h];intel-image-processing-unit-3-ipu3-imaging-unit-imgu-driverah ]h"]?intel image processing unit 3 (ipu3) imaging unit (imgu) driverah$]h&]uh1jGhhhhhhhKubeh}(h]h ]h"]h$]h&]sourcehuh1hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(jLN generatorN datestampN source_linkN source_urlN toc_backlinksj]footnote_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_handlerjuerror_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}(hhhhhhj jjjj*jj9j-jHj<jWjKjfjZjujijjxjjjjjjjjjjjjjjjjj jjjj)jj8j,jGj;jVjJjejYjtjhjjwjjjjjjjjjjjjjjjjj jjj j(jj7j+jFj:jUjIjdjXjsjgjjvjjjjjjjjjjjjjjjjj jjj j'jj6j*jEj9jTjHjcjWjrjfjjujjjjjjjjjjjjjjjjjjjj j&jj5j)jDj8usubstitution_names}(amphߌaposhasthbrvbarj bsoljcentj*colonj9commajHcommatjWcopyjfcurrenjudarrjdegjdividejdollarjequalsjexcljfrac12jfrac14jfrac18jfrac34j frac38jfrac58j)frac78j8gtjGhalfjVhorbarjehyphenjtiexcljiquestjlaquojlarrjlcubjldquojlowbarjlparjlsqbjlsquoj ltjmicroj(middotj7nbspjFnotjUnumjdohmjsordfjordmjparajpercntjperiodjplusjplusmnjpoundjquestjquotj raquojrarrj'rcubj6rdquojEregjTrparjcrsqbjrrsquojsectjsemijshyjsoljsungjsup1jsup2jsup3jtimesjtradejuarrj&verbarj5yenjDurefnames}(f1](jj*ef2](jj}ef4]jKaurefids}(j](jj*ej](jj}ejZ]jKaunameids}(jPjMjjjjjjj j jU jR j j jo jl j j j^j[j j jjjjjVjSjjjNjKjjjjjHjEjjjjj@jZu nametypes}(jPjjjj jU j jo j j^j jjjVjjNjjjHjjj@uh}(jMjIjjtjjjjrjjjjj jjR j j jX jl j j jr j[j j j jj jj* j4j*jUjKjj}jSjjjjKjjjajjjEjjjjjjZjj j jju footnote_refs}(j](jj*ej](jj}ej]jKau citation_refs} autofootnotes](jjjeautofootnote_refs](jjj*jKj}esymbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}jKsRparse_messages]transform_messages] transformerN include_log](Documentation/admin-guide/media/ipu3.rst(NNNNta decorationNhhub.