xref: /openbmc/linux/Documentation/admin-guide/media/ipu3.rst (revision b97d4a1eb4baede15e9c9503d97f81d007e493f3)
132e2eae2SMauro Carvalho Chehab.. SPDX-License-Identifier: GPL-2.0
232e2eae2SMauro Carvalho Chehab
332e2eae2SMauro Carvalho Chehab.. include:: <isonum.txt>
432e2eae2SMauro Carvalho Chehab
532e2eae2SMauro Carvalho Chehab===============================================================
632e2eae2SMauro Carvalho ChehabIntel Image Processing Unit 3 (IPU3) Imaging Unit (ImgU) driver
732e2eae2SMauro Carvalho Chehab===============================================================
832e2eae2SMauro Carvalho Chehab
932e2eae2SMauro Carvalho ChehabCopyright |copy| 2018 Intel Corporation
1032e2eae2SMauro Carvalho Chehab
1132e2eae2SMauro Carvalho ChehabIntroduction
1232e2eae2SMauro Carvalho Chehab============
1332e2eae2SMauro Carvalho Chehab
1432e2eae2SMauro Carvalho ChehabThis file documents the Intel IPU3 (3rd generation Image Processing Unit)
1532e2eae2SMauro Carvalho ChehabImaging Unit drivers located under drivers/media/pci/intel/ipu3 (CIO2) as well
1632e2eae2SMauro Carvalho Chehabas under drivers/staging/media/ipu3 (ImgU).
1732e2eae2SMauro Carvalho Chehab
1832e2eae2SMauro Carvalho ChehabThe Intel IPU3 found in certain Kaby Lake (as well as certain Sky Lake)
1932e2eae2SMauro Carvalho Chehabplatforms (U/Y processor lines) is made up of two parts namely the Imaging Unit
2032e2eae2SMauro Carvalho Chehab(ImgU) and the CIO2 device (MIPI CSI2 receiver).
2132e2eae2SMauro Carvalho Chehab
2232e2eae2SMauro Carvalho ChehabThe CIO2 device receives the raw Bayer data from the sensors and outputs the
2332e2eae2SMauro Carvalho Chehabframes in a format that is specific to the IPU3 (for consumption by the IPU3
2432e2eae2SMauro Carvalho ChehabImgU). The CIO2 driver is available as drivers/media/pci/intel/ipu3/ipu3-cio2*
2532e2eae2SMauro Carvalho Chehaband is enabled through the CONFIG_VIDEO_IPU3_CIO2 config option.
2632e2eae2SMauro Carvalho Chehab
2732e2eae2SMauro Carvalho ChehabThe Imaging Unit (ImgU) is responsible for processing images captured
2832e2eae2SMauro Carvalho Chehabby the IPU3 CIO2 device. The ImgU driver sources can be found under
2932e2eae2SMauro Carvalho Chehabdrivers/staging/media/ipu3 directory. The driver is enabled through the
3032e2eae2SMauro Carvalho ChehabCONFIG_VIDEO_IPU3_IMGU config option.
3132e2eae2SMauro Carvalho Chehab
3232e2eae2SMauro Carvalho ChehabThe two driver modules are named ipu3_csi2 and ipu3_imgu, respectively.
3332e2eae2SMauro Carvalho Chehab
3432e2eae2SMauro Carvalho ChehabThe drivers has been tested on Kaby Lake platforms (U/Y processor lines).
3532e2eae2SMauro Carvalho Chehab
3632e2eae2SMauro Carvalho ChehabBoth of the drivers implement V4L2, Media Controller and V4L2 sub-device
3732e2eae2SMauro Carvalho Chehabinterfaces. The IPU3 CIO2 driver supports camera sensors connected to the CIO2
3832e2eae2SMauro Carvalho ChehabMIPI CSI-2 interfaces through V4L2 sub-device sensor drivers.
3932e2eae2SMauro Carvalho Chehab
4032e2eae2SMauro Carvalho ChehabCIO2
4132e2eae2SMauro Carvalho Chehab====
4232e2eae2SMauro Carvalho Chehab
4332e2eae2SMauro Carvalho ChehabThe CIO2 is represented as a single V4L2 subdev, which provides a V4L2 subdev
4432e2eae2SMauro Carvalho Chehabinterface to the user space. There is a video node for each CSI-2 receiver,
4532e2eae2SMauro Carvalho Chehabwith a single media controller interface for the entire device.
4632e2eae2SMauro Carvalho Chehab
4732e2eae2SMauro Carvalho ChehabThe CIO2 contains four independent capture channel, each with its own MIPI CSI-2
4832e2eae2SMauro Carvalho Chehabreceiver and DMA engine. Each channel is modelled as a V4L2 sub-device exposed
4932e2eae2SMauro Carvalho Chehabto userspace as a V4L2 sub-device node and has two pads:
5032e2eae2SMauro Carvalho Chehab
5132e2eae2SMauro Carvalho Chehab.. tabularcolumns:: |p{0.8cm}|p{4.0cm}|p{4.0cm}|
5232e2eae2SMauro Carvalho Chehab
5332e2eae2SMauro Carvalho Chehab.. flat-table::
5432e2eae2SMauro Carvalho Chehab
5532e2eae2SMauro Carvalho Chehab    * - pad
5632e2eae2SMauro Carvalho Chehab      - direction
5732e2eae2SMauro Carvalho Chehab      - purpose
5832e2eae2SMauro Carvalho Chehab
5932e2eae2SMauro Carvalho Chehab    * - 0
6032e2eae2SMauro Carvalho Chehab      - sink
6132e2eae2SMauro Carvalho Chehab      - MIPI CSI-2 input, connected to the sensor subdev
6232e2eae2SMauro Carvalho Chehab
6332e2eae2SMauro Carvalho Chehab    * - 1
6432e2eae2SMauro Carvalho Chehab      - source
6532e2eae2SMauro Carvalho Chehab      - Raw video capture, connected to the V4L2 video interface
6632e2eae2SMauro Carvalho Chehab
6732e2eae2SMauro Carvalho ChehabThe V4L2 video interfaces model the DMA engines. They are exposed to userspace
6832e2eae2SMauro Carvalho Chehabas V4L2 video device nodes.
6932e2eae2SMauro Carvalho Chehab
7032e2eae2SMauro Carvalho ChehabCapturing frames in raw Bayer format
7132e2eae2SMauro Carvalho Chehab------------------------------------
7232e2eae2SMauro Carvalho Chehab
7332e2eae2SMauro Carvalho ChehabCIO2 MIPI CSI2 receiver is used to capture frames (in packed raw Bayer format)
7432e2eae2SMauro Carvalho Chehabfrom the raw sensors connected to the CSI2 ports. The captured frames are used
7532e2eae2SMauro Carvalho Chehabas input to the ImgU driver.
7632e2eae2SMauro Carvalho Chehab
7732e2eae2SMauro Carvalho ChehabImage processing using IPU3 ImgU requires tools such as raw2pnm [#f1]_, and
7832e2eae2SMauro Carvalho Chehabyavta [#f2]_ due to the following unique requirements and / or features specific
7932e2eae2SMauro Carvalho Chehabto IPU3.
8032e2eae2SMauro Carvalho Chehab
8132e2eae2SMauro Carvalho Chehab-- The IPU3 CSI2 receiver outputs the captured frames from the sensor in packed
8232e2eae2SMauro Carvalho Chehabraw Bayer format that is specific to IPU3.
8332e2eae2SMauro Carvalho Chehab
8432e2eae2SMauro Carvalho Chehab-- Multiple video nodes have to be operated simultaneously.
8532e2eae2SMauro Carvalho Chehab
8632e2eae2SMauro Carvalho ChehabLet us take the example of ov5670 sensor connected to CSI2 port 0, for a
8732e2eae2SMauro Carvalho Chehab2592x1944 image capture.
8832e2eae2SMauro Carvalho Chehab
8932e2eae2SMauro Carvalho ChehabUsing the media contorller APIs, the ov5670 sensor is configured to send
9032e2eae2SMauro Carvalho Chehabframes in packed raw Bayer format to IPU3 CSI2 receiver.
9132e2eae2SMauro Carvalho Chehab
929eb88a81SJordan Hand.. code-block:: none
9332e2eae2SMauro Carvalho Chehab
949eb88a81SJordan Hand    # This example assumes /dev/media0 as the CIO2 media device
9532e2eae2SMauro Carvalho Chehab    export MDEV=/dev/media0
9632e2eae2SMauro Carvalho Chehab
9732e2eae2SMauro Carvalho Chehab    # and that ov5670 sensor is connected to i2c bus 10 with address 0x36
9832e2eae2SMauro Carvalho Chehab    export SDEV=$(media-ctl -d $MDEV -e "ov5670 10-0036")
9932e2eae2SMauro Carvalho Chehab
10032e2eae2SMauro Carvalho Chehab    # Establish the link for the media devices using media-ctl [#f3]_
10132e2eae2SMauro Carvalho Chehab    media-ctl -d $MDEV -l "ov5670:0 -> ipu3-csi2 0:0[1]"
10232e2eae2SMauro Carvalho Chehab
10332e2eae2SMauro Carvalho Chehab    # Set the format for the media devices
10432e2eae2SMauro Carvalho Chehab    media-ctl -d $MDEV -V "ov5670:0 [fmt:SGRBG10/2592x1944]"
10532e2eae2SMauro Carvalho Chehab    media-ctl -d $MDEV -V "ipu3-csi2 0:0 [fmt:SGRBG10/2592x1944]"
10632e2eae2SMauro Carvalho Chehab    media-ctl -d $MDEV -V "ipu3-csi2 0:1 [fmt:SGRBG10/2592x1944]"
10732e2eae2SMauro Carvalho Chehab
10832e2eae2SMauro Carvalho ChehabOnce the media pipeline is configured, desired sensor specific settings
10932e2eae2SMauro Carvalho Chehab(such as exposure and gain settings) can be set, using the yavta tool.
11032e2eae2SMauro Carvalho Chehab
11132e2eae2SMauro Carvalho Chehabe.g
11232e2eae2SMauro Carvalho Chehab
1139eb88a81SJordan Hand.. code-block:: none
1149eb88a81SJordan Hand
11532e2eae2SMauro Carvalho Chehab    yavta -w 0x009e0903 444 $SDEV
11632e2eae2SMauro Carvalho Chehab    yavta -w 0x009e0913 1024 $SDEV
11732e2eae2SMauro Carvalho Chehab    yavta -w 0x009e0911 2046 $SDEV
11832e2eae2SMauro Carvalho Chehab
11932e2eae2SMauro Carvalho ChehabOnce the desired sensor settings are set, frame captures can be done as below.
12032e2eae2SMauro Carvalho Chehab
12132e2eae2SMauro Carvalho Chehabe.g
12232e2eae2SMauro Carvalho Chehab
1239eb88a81SJordan Hand.. code-block:: none
1249eb88a81SJordan Hand
12532e2eae2SMauro Carvalho Chehab    yavta --data-prefix -u -c10 -n5 -I -s2592x1944 --file=/tmp/frame-#.bin \
12632e2eae2SMauro Carvalho Chehab          -f IPU3_SGRBG10 $(media-ctl -d $MDEV -e "ipu3-cio2 0")
12732e2eae2SMauro Carvalho Chehab
12832e2eae2SMauro Carvalho ChehabWith the above command, 10 frames are captured at 2592x1944 resolution, with
12932e2eae2SMauro Carvalho ChehabsGRBG10 format and output as IPU3_SGRBG10 format.
13032e2eae2SMauro Carvalho Chehab
13132e2eae2SMauro Carvalho ChehabThe captured frames are available as /tmp/frame-#.bin files.
13232e2eae2SMauro Carvalho Chehab
13332e2eae2SMauro Carvalho ChehabImgU
13432e2eae2SMauro Carvalho Chehab====
13532e2eae2SMauro Carvalho Chehab
13632e2eae2SMauro Carvalho ChehabThe ImgU is represented as two V4L2 subdevs, each of which provides a V4L2
13732e2eae2SMauro Carvalho Chehabsubdev interface to the user space.
13832e2eae2SMauro Carvalho Chehab
13932e2eae2SMauro Carvalho ChehabEach V4L2 subdev represents a pipe, which can support a maximum of 2 streams.
14032e2eae2SMauro Carvalho ChehabThis helps to support advanced camera features like Continuous View Finder (CVF)
14132e2eae2SMauro Carvalho Chehaband Snapshot During Video(SDV).
14232e2eae2SMauro Carvalho Chehab
14332e2eae2SMauro Carvalho ChehabThe ImgU contains two independent pipes, each modelled as a V4L2 sub-device
14432e2eae2SMauro Carvalho Chehabexposed to userspace as a V4L2 sub-device node.
14532e2eae2SMauro Carvalho Chehab
14632e2eae2SMauro Carvalho ChehabEach pipe has two sink pads and three source pads for the following purpose:
14732e2eae2SMauro Carvalho Chehab
14832e2eae2SMauro Carvalho Chehab.. tabularcolumns:: |p{0.8cm}|p{4.0cm}|p{4.0cm}|
14932e2eae2SMauro Carvalho Chehab
15032e2eae2SMauro Carvalho Chehab.. flat-table::
15132e2eae2SMauro Carvalho Chehab
15232e2eae2SMauro Carvalho Chehab    * - pad
15332e2eae2SMauro Carvalho Chehab      - direction
15432e2eae2SMauro Carvalho Chehab      - purpose
15532e2eae2SMauro Carvalho Chehab
15632e2eae2SMauro Carvalho Chehab    * - 0
15732e2eae2SMauro Carvalho Chehab      - sink
15832e2eae2SMauro Carvalho Chehab      - Input raw video stream
15932e2eae2SMauro Carvalho Chehab
16032e2eae2SMauro Carvalho Chehab    * - 1
16132e2eae2SMauro Carvalho Chehab      - sink
16232e2eae2SMauro Carvalho Chehab      - Processing parameters
16332e2eae2SMauro Carvalho Chehab
16432e2eae2SMauro Carvalho Chehab    * - 2
16532e2eae2SMauro Carvalho Chehab      - source
16632e2eae2SMauro Carvalho Chehab      - Output processed video stream
16732e2eae2SMauro Carvalho Chehab
16832e2eae2SMauro Carvalho Chehab    * - 3
16932e2eae2SMauro Carvalho Chehab      - source
17032e2eae2SMauro Carvalho Chehab      - Output viewfinder video stream
17132e2eae2SMauro Carvalho Chehab
17232e2eae2SMauro Carvalho Chehab    * - 4
17332e2eae2SMauro Carvalho Chehab      - source
17432e2eae2SMauro Carvalho Chehab      - 3A statistics
17532e2eae2SMauro Carvalho Chehab
17632e2eae2SMauro Carvalho ChehabEach pad is connected to a corresponding V4L2 video interface, exposed to
17732e2eae2SMauro Carvalho Chehabuserspace as a V4L2 video device node.
17832e2eae2SMauro Carvalho Chehab
17932e2eae2SMauro Carvalho ChehabDevice operation
18032e2eae2SMauro Carvalho Chehab----------------
18132e2eae2SMauro Carvalho Chehab
18232e2eae2SMauro Carvalho ChehabWith ImgU, once the input video node ("ipu3-imgu 0/1":0, in
18332e2eae2SMauro Carvalho Chehab<entity>:<pad-number> format) is queued with buffer (in packed raw Bayer
18432e2eae2SMauro Carvalho Chehabformat), ImgU starts processing the buffer and produces the video output in YUV
18532e2eae2SMauro Carvalho Chehabformat and statistics output on respective output nodes. The driver is expected
18632e2eae2SMauro Carvalho Chehabto have buffers ready for all of parameter, output and statistics nodes, when
18732e2eae2SMauro Carvalho Chehabinput video node is queued with buffer.
18832e2eae2SMauro Carvalho Chehab
18932e2eae2SMauro Carvalho ChehabAt a minimum, all of input, main output, 3A statistics and viewfinder
19032e2eae2SMauro Carvalho Chehabvideo nodes should be enabled for IPU3 to start image processing.
19132e2eae2SMauro Carvalho Chehab
19232e2eae2SMauro Carvalho ChehabEach ImgU V4L2 subdev has the following set of video nodes.
19332e2eae2SMauro Carvalho Chehab
19432e2eae2SMauro Carvalho Chehabinput, output and viewfinder video nodes
19532e2eae2SMauro Carvalho Chehab----------------------------------------
19632e2eae2SMauro Carvalho Chehab
19732e2eae2SMauro Carvalho ChehabThe frames (in packed raw Bayer format specific to the IPU3) received by the
19832e2eae2SMauro Carvalho Chehabinput video node is processed by the IPU3 Imaging Unit and are output to 2 video
19932e2eae2SMauro Carvalho Chehabnodes, with each targeting a different purpose (main output and viewfinder
20032e2eae2SMauro Carvalho Chehaboutput).
20132e2eae2SMauro Carvalho Chehab
20232e2eae2SMauro Carvalho ChehabDetails onand the Bayer format specific to the IPU3 can be found in
20332e2eae2SMauro Carvalho Chehab:ref:`v4l2-pix-fmt-ipu3-sbggr10`.
20432e2eae2SMauro Carvalho Chehab
20532e2eae2SMauro Carvalho ChehabThe driver supports V4L2 Video Capture Interface as defined at :ref:`devices`.
20632e2eae2SMauro Carvalho Chehab
20732e2eae2SMauro Carvalho ChehabOnly the multi-planar API is supported. More details can be found at
20832e2eae2SMauro Carvalho Chehab:ref:`planar-apis`.
20932e2eae2SMauro Carvalho Chehab
21032e2eae2SMauro Carvalho ChehabParameters video node
21132e2eae2SMauro Carvalho Chehab---------------------
21232e2eae2SMauro Carvalho Chehab
21332e2eae2SMauro Carvalho ChehabThe parameters video node receives the ImgU algorithm parameters that are used
21432e2eae2SMauro Carvalho Chehabto configure how the ImgU algorithms process the image.
21532e2eae2SMauro Carvalho Chehab
21632e2eae2SMauro Carvalho ChehabDetails on processing parameters specific to the IPU3 can be found in
21732e2eae2SMauro Carvalho Chehab:ref:`v4l2-meta-fmt-params`.
21832e2eae2SMauro Carvalho Chehab
21932e2eae2SMauro Carvalho Chehab3A statistics video node
22032e2eae2SMauro Carvalho Chehab------------------------
22132e2eae2SMauro Carvalho Chehab
22232e2eae2SMauro Carvalho Chehab3A statistics video node is used by the ImgU driver to output the 3A (auto
22332e2eae2SMauro Carvalho Chehabfocus, auto exposure and auto white balance) statistics for the frames that are
22432e2eae2SMauro Carvalho Chehabbeing processed by the ImgU to user space applications. User space applications
22532e2eae2SMauro Carvalho Chehabcan use this statistics data to compute the desired algorithm parameters for
22632e2eae2SMauro Carvalho Chehabthe ImgU.
22732e2eae2SMauro Carvalho Chehab
22832e2eae2SMauro Carvalho ChehabConfiguring the Intel IPU3
22932e2eae2SMauro Carvalho Chehab==========================
23032e2eae2SMauro Carvalho Chehab
23132e2eae2SMauro Carvalho ChehabThe IPU3 ImgU pipelines can be configured using the Media Controller, defined at
23232e2eae2SMauro Carvalho Chehab:ref:`media_controller`.
23332e2eae2SMauro Carvalho Chehab
23411de96b9SBingbu CaoRunning mode and firmware binary selection
2355b9f8e4aSMauro Carvalho Chehab------------------------------------------
2365b9f8e4aSMauro Carvalho Chehab
23711de96b9SBingbu CaoImgU works based on firmware, currently the ImgU firmware support run 2 pipes in
23811de96b9SBingbu Caotime-sharing with single input frame data. Each pipe can run at certain mode -
23911de96b9SBingbu Cao"VIDEO" or "STILL", "VIDEO" mode is commonly used for video frames capture, and
24011de96b9SBingbu Cao"STILL" is used for still frame capture. However, you can also select "VIDEO" to
24111de96b9SBingbu Caocapture still frames if you want to capture images with less system load and
24211de96b9SBingbu Caopower. For "STILL" mode, ImgU will try to use smaller BDS factor and output
24311de96b9SBingbu Caolarger bayer frame for further YUV processing than "VIDEO" mode to get high
24411de96b9SBingbu Caoquality images. Besides, "STILL" mode need XNR3 to do noise reduction, hence
24511de96b9SBingbu Cao"STILL" mode will need more power and memory bandwidth than "VIDEO" mode. TNR
24611de96b9SBingbu Caowill be enabled in "VIDEO" mode and bypassed by "STILL" mode. ImgU is running at
24711de96b9SBingbu Cao“VIDEO” mode by default, the user can use v4l2 control V4L2_CID_INTEL_IPU3_MODE
24811de96b9SBingbu Cao(currently defined in drivers/staging/media/ipu3/include/intel-ipu3.h) to query
24911de96b9SBingbu Caoand set the running mode. For user, there is no difference for buffer queueing
25011de96b9SBingbu Caobetween the "VIDEO" and "STILL" mode, mandatory input and main output node
25111de96b9SBingbu Caoshould be enabled and buffers need be queued, the statistics and the view-finder
25211de96b9SBingbu Caoqueues are optional.
25332e2eae2SMauro Carvalho Chehab
25411de96b9SBingbu CaoThe firmware binary will be selected according to current running mode, such log
25511de96b9SBingbu Cao"using binary if_to_osys_striped " or "using binary if_to_osys_primary_striped"
25611de96b9SBingbu Caocould be observed if you enable the ImgU dynamic debug, the binary
25711de96b9SBingbu Caoif_to_osys_striped is selected for "VIDEO" and the binary
25811de96b9SBingbu Cao"if_to_osys_primary_striped" is selected for "STILL".
25911de96b9SBingbu Cao
26032e2eae2SMauro Carvalho Chehab
26132e2eae2SMauro Carvalho ChehabProcessing the image in raw Bayer format
26232e2eae2SMauro Carvalho Chehab----------------------------------------
26332e2eae2SMauro Carvalho Chehab
26432e2eae2SMauro Carvalho ChehabConfiguring ImgU V4L2 subdev for image processing
26532e2eae2SMauro Carvalho Chehab~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
26632e2eae2SMauro Carvalho Chehab
26732e2eae2SMauro Carvalho ChehabThe ImgU V4L2 subdevs have to be configured with media controller APIs to have
26832e2eae2SMauro Carvalho Chehaball the video nodes setup correctly.
26932e2eae2SMauro Carvalho Chehab
27032e2eae2SMauro Carvalho ChehabLet us take "ipu3-imgu 0" subdev as an example.
27132e2eae2SMauro Carvalho Chehab
2729eb88a81SJordan Hand.. code-block:: none
2739eb88a81SJordan Hand
27432e2eae2SMauro Carvalho Chehab    media-ctl -d $MDEV -r
27532e2eae2SMauro Carvalho Chehab    media-ctl -d $MDEV -l "ipu3-imgu 0 input":0 -> "ipu3-imgu 0":0[1]
27632e2eae2SMauro Carvalho Chehab    media-ctl -d $MDEV -l "ipu3-imgu 0":2 -> "ipu3-imgu 0 output":0[1]
27732e2eae2SMauro Carvalho Chehab    media-ctl -d $MDEV -l "ipu3-imgu 0":3 -> "ipu3-imgu 0 viewfinder":0[1]
27832e2eae2SMauro Carvalho Chehab    media-ctl -d $MDEV -l "ipu3-imgu 0":4 -> "ipu3-imgu 0 3a stat":0[1]
27932e2eae2SMauro Carvalho Chehab
28032e2eae2SMauro Carvalho ChehabAlso the pipe mode of the corresponding V4L2 subdev should be set as desired
28132e2eae2SMauro Carvalho Chehab(e.g 0 for video mode or 1 for still mode) through the control id 0x009819a1 as
28232e2eae2SMauro Carvalho Chehabbelow.
28332e2eae2SMauro Carvalho Chehab
2849eb88a81SJordan Hand.. code-block:: none
2859eb88a81SJordan Hand
28632e2eae2SMauro Carvalho Chehab    yavta -w "0x009819A1 1" /dev/v4l-subdev7
28732e2eae2SMauro Carvalho Chehab
28832e2eae2SMauro Carvalho ChehabCertain hardware blocks in ImgU pipeline can change the frame resolution by
28932e2eae2SMauro Carvalho Chehabcropping or scaling, these hardware blocks include Input Feeder(IF), Bayer Down
29032e2eae2SMauro Carvalho ChehabScaler (BDS) and Geometric Distortion Correction (GDC).
29132e2eae2SMauro Carvalho ChehabThere is also a block which can change the frame resolution - YUV Scaler, it is
29232e2eae2SMauro Carvalho Chehabonly applicable to the secondary output.
29332e2eae2SMauro Carvalho Chehab
29432e2eae2SMauro Carvalho ChehabRAW Bayer frames go through these ImgU pipeline hardware blocks and the final
29532e2eae2SMauro Carvalho Chehabprocessed image output to the DDR memory.
29632e2eae2SMauro Carvalho Chehab
29732e2eae2SMauro Carvalho Chehab.. kernel-figure::  ipu3_rcb.svg
29832e2eae2SMauro Carvalho Chehab   :alt: ipu3 resolution blocks image
29932e2eae2SMauro Carvalho Chehab
30032e2eae2SMauro Carvalho Chehab   IPU3 resolution change hardware blocks
30132e2eae2SMauro Carvalho Chehab
30232e2eae2SMauro Carvalho Chehab**Input Feeder**
30332e2eae2SMauro Carvalho Chehab
30432e2eae2SMauro Carvalho ChehabInput Feeder gets the Bayer frame data from the sensor, it can enable cropping
30532e2eae2SMauro Carvalho Chehabof lines and columns from the frame and then store pixels into device's internal
30632e2eae2SMauro Carvalho Chehabpixel buffer which are ready to readout by following blocks.
30732e2eae2SMauro Carvalho Chehab
30832e2eae2SMauro Carvalho Chehab**Bayer Down Scaler**
30932e2eae2SMauro Carvalho Chehab
31032e2eae2SMauro Carvalho ChehabBayer Down Scaler is capable of performing image scaling in Bayer domain, the
31132e2eae2SMauro Carvalho Chehabdownscale factor can be configured from 1X to 1/4X in each axis with
31232e2eae2SMauro Carvalho Chehabconfiguration steps of 0.03125 (1/32).
31332e2eae2SMauro Carvalho Chehab
31432e2eae2SMauro Carvalho Chehab**Geometric Distortion Correction**
31532e2eae2SMauro Carvalho Chehab
31632e2eae2SMauro Carvalho ChehabGeometric Distortion Correction is used to performe correction of distortions
31732e2eae2SMauro Carvalho Chehaband image filtering. It needs some extra filter and envelop padding pixels to
31832e2eae2SMauro Carvalho Chehabwork, so the input resolution of GDC should be larger than the output
31932e2eae2SMauro Carvalho Chehabresolution.
32032e2eae2SMauro Carvalho Chehab
32132e2eae2SMauro Carvalho Chehab**YUV Scaler**
32232e2eae2SMauro Carvalho Chehab
32332e2eae2SMauro Carvalho ChehabYUV Scaler which similar with BDS, but it is mainly do image down scaling in
32432e2eae2SMauro Carvalho ChehabYUV domain, it can support up to 1/12X down scaling, but it can not be applied
32532e2eae2SMauro Carvalho Chehabto the main output.
32632e2eae2SMauro Carvalho Chehab
32732e2eae2SMauro Carvalho ChehabThe ImgU V4L2 subdev has to be configured with the supported resolutions in all
32832e2eae2SMauro Carvalho Chehabthe above hardware blocks, for a given input resolution.
32932e2eae2SMauro Carvalho ChehabFor a given supported resolution for an input frame, the Input Feeder, Bayer
33032e2eae2SMauro Carvalho ChehabDown Scaler and GDC blocks should be configured with the supported resolutions
33132e2eae2SMauro Carvalho Chehabas each hardware block has its own alignment requirement.
33232e2eae2SMauro Carvalho Chehab
33332e2eae2SMauro Carvalho ChehabYou must configure the output resolution of the hardware blocks smartly to meet
33432e2eae2SMauro Carvalho Chehabthe hardware requirement along with keeping the maximum field of view. The
33532e2eae2SMauro Carvalho Chehabintermediate resolutions can be generated by specific tool -
33632e2eae2SMauro Carvalho Chehab
33732e2eae2SMauro Carvalho Chehabhttps://github.com/intel/intel-ipu3-pipecfg
33832e2eae2SMauro Carvalho Chehab
33932e2eae2SMauro Carvalho ChehabThis tool can be used to generate intermediate resolutions. More information can
34032e2eae2SMauro Carvalho Chehabbe obtained by looking at the following IPU3 ImgU configuration table.
34132e2eae2SMauro Carvalho Chehab
34232e2eae2SMauro Carvalho Chehabhttps://chromium.googlesource.com/chromiumos/overlays/board-overlays/+/master
34332e2eae2SMauro Carvalho Chehab
34432e2eae2SMauro Carvalho ChehabUnder baseboard-poppy/media-libs/cros-camera-hal-configs-poppy/files/gcss
34532e2eae2SMauro Carvalho Chehabdirectory, graph_settings_ov5670.xml can be used as an example.
34632e2eae2SMauro Carvalho Chehab
34732e2eae2SMauro Carvalho ChehabThe following steps prepare the ImgU pipeline for the image processing.
34832e2eae2SMauro Carvalho Chehab
34932e2eae2SMauro Carvalho Chehab1. The ImgU V4L2 subdev data format should be set by using the
35032e2eae2SMauro Carvalho ChehabVIDIOC_SUBDEV_S_FMT on pad 0, using the GDC width and height obtained above.
35132e2eae2SMauro Carvalho Chehab
35232e2eae2SMauro Carvalho Chehab2. The ImgU V4L2 subdev cropping should be set by using the
35332e2eae2SMauro Carvalho ChehabVIDIOC_SUBDEV_S_SELECTION on pad 0, with V4L2_SEL_TGT_CROP as the target,
35432e2eae2SMauro Carvalho Chehabusing the input feeder height and width.
35532e2eae2SMauro Carvalho Chehab
35632e2eae2SMauro Carvalho Chehab3. The ImgU V4L2 subdev composing should be set by using the
35732e2eae2SMauro Carvalho ChehabVIDIOC_SUBDEV_S_SELECTION on pad 0, with V4L2_SEL_TGT_COMPOSE as the target,
35832e2eae2SMauro Carvalho Chehabusing the BDS height and width.
35932e2eae2SMauro Carvalho Chehab
36032e2eae2SMauro Carvalho ChehabFor the ov5670 example, for an input frame with a resolution of 2592x1944
36132e2eae2SMauro Carvalho Chehab(which is input to the ImgU subdev pad 0), the corresponding resolutions
36232e2eae2SMauro Carvalho Chehabfor input feeder, BDS and GDC are 2592x1944, 2592x1944 and 2560x1920
36332e2eae2SMauro Carvalho Chehabrespectively.
36432e2eae2SMauro Carvalho Chehab
36532e2eae2SMauro Carvalho ChehabOnce this is done, the received raw Bayer frames can be input to the ImgU
36632e2eae2SMauro Carvalho ChehabV4L2 subdev as below, using the open source application v4l2n [#f1]_.
36732e2eae2SMauro Carvalho Chehab
36832e2eae2SMauro Carvalho ChehabFor an image captured with 2592x1944 [#f4]_ resolution, with desired output
36932e2eae2SMauro Carvalho Chehabresolution as 2560x1920 and viewfinder resolution as 2560x1920, the following
37032e2eae2SMauro Carvalho Chehabv4l2n command can be used. This helps process the raw Bayer frames and produces
37132e2eae2SMauro Carvalho Chehabthe desired results for the main output image and the viewfinder output, in NV12
37232e2eae2SMauro Carvalho Chehabformat.
37332e2eae2SMauro Carvalho Chehab
3749eb88a81SJordan Hand.. code-block:: none
3759eb88a81SJordan Hand
37632e2eae2SMauro Carvalho Chehab    v4l2n --pipe=4 --load=/tmp/frame-#.bin --open=/dev/video4
3779eb88a81SJordan Hand          --fmt=type:VIDEO_OUTPUT_MPLANE,width=2592,height=1944,pixelformat=0X47337069 \
3789eb88a81SJordan Hand          --reqbufs=type:VIDEO_OUTPUT_MPLANE,count:1 --pipe=1 \
3799eb88a81SJordan Hand          --output=/tmp/frames.out --open=/dev/video5 \
3809eb88a81SJordan Hand          --fmt=type:VIDEO_CAPTURE_MPLANE,width=2560,height=1920,pixelformat=NV12 \
3819eb88a81SJordan Hand          --reqbufs=type:VIDEO_CAPTURE_MPLANE,count:1 --pipe=2 \
3829eb88a81SJordan Hand          --output=/tmp/frames.vf --open=/dev/video6 \
3839eb88a81SJordan Hand          --fmt=type:VIDEO_CAPTURE_MPLANE,width=2560,height=1920,pixelformat=NV12 \
3849eb88a81SJordan Hand          --reqbufs=type:VIDEO_CAPTURE_MPLANE,count:1 --pipe=3 --open=/dev/video7 \
3859eb88a81SJordan Hand          --output=/tmp/frames.3A --fmt=type:META_CAPTURE,? \
38632e2eae2SMauro Carvalho Chehab          --reqbufs=count:1,type:META_CAPTURE --pipe=1,2,3,4 --stream=5
38732e2eae2SMauro Carvalho Chehab
388ce7d96a4SBingbu CaoYou can also use yavta [#f2]_ command to do same thing as above:
389ce7d96a4SBingbu Cao
390ce7d96a4SBingbu Cao.. code-block:: none
391ce7d96a4SBingbu Cao
392ce7d96a4SBingbu Cao    yavta --data-prefix -Bcapture-mplane -c10 -n5 -I -s2592x1944 \
393ce7d96a4SBingbu Cao          --file=frame-#.out-f NV12 /dev/video5 & \
394ce7d96a4SBingbu Cao    yavta --data-prefix -Bcapture-mplane -c10 -n5 -I -s2592x1944 \
395ce7d96a4SBingbu Cao          --file=frame-#.vf -f NV12 /dev/video6 & \
396ce7d96a4SBingbu Cao    yavta --data-prefix -Bmeta-capture -c10 -n5 -I \
397ce7d96a4SBingbu Cao          --file=frame-#.3a /dev/video7 & \
398ce7d96a4SBingbu Cao    yavta --data-prefix -Boutput-mplane -c10 -n5 -I -s2592x1944 \
399ce7d96a4SBingbu Cao          --file=/tmp/frame-in.cio2 -f IPU3_SGRBG10 /dev/video4
400ce7d96a4SBingbu Cao
40132e2eae2SMauro Carvalho Chehabwhere /dev/video4, /dev/video5, /dev/video6 and /dev/video7 devices point to
40232e2eae2SMauro Carvalho Chehabinput, output, viewfinder and 3A statistics video nodes respectively.
40332e2eae2SMauro Carvalho Chehab
40432e2eae2SMauro Carvalho ChehabConverting the raw Bayer image into YUV domain
40532e2eae2SMauro Carvalho Chehab----------------------------------------------
40632e2eae2SMauro Carvalho Chehab
40732e2eae2SMauro Carvalho ChehabThe processed images after the above step, can be converted to YUV domain
40832e2eae2SMauro Carvalho Chehabas below.
40932e2eae2SMauro Carvalho Chehab
41032e2eae2SMauro Carvalho ChehabMain output frames
41132e2eae2SMauro Carvalho Chehab~~~~~~~~~~~~~~~~~~
41232e2eae2SMauro Carvalho Chehab
4139eb88a81SJordan Hand.. code-block:: none
4149eb88a81SJordan Hand
41532e2eae2SMauro Carvalho Chehab    raw2pnm -x2560 -y1920 -fNV12 /tmp/frames.out /tmp/frames.out.ppm
41632e2eae2SMauro Carvalho Chehab
41732e2eae2SMauro Carvalho Chehabwhere 2560x1920 is output resolution, NV12 is the video format, followed
41832e2eae2SMauro Carvalho Chehabby input frame and output PNM file.
41932e2eae2SMauro Carvalho Chehab
42032e2eae2SMauro Carvalho ChehabViewfinder output frames
42132e2eae2SMauro Carvalho Chehab~~~~~~~~~~~~~~~~~~~~~~~~
42232e2eae2SMauro Carvalho Chehab
4239eb88a81SJordan Hand.. code-block:: none
4249eb88a81SJordan Hand
42532e2eae2SMauro Carvalho Chehab    raw2pnm -x2560 -y1920 -fNV12 /tmp/frames.vf /tmp/frames.vf.ppm
42632e2eae2SMauro Carvalho Chehab
42732e2eae2SMauro Carvalho Chehabwhere 2560x1920 is output resolution, NV12 is the video format, followed
42832e2eae2SMauro Carvalho Chehabby input frame and output PNM file.
42932e2eae2SMauro Carvalho Chehab
43032e2eae2SMauro Carvalho ChehabExample user space code for IPU3
43132e2eae2SMauro Carvalho Chehab================================
43232e2eae2SMauro Carvalho Chehab
43332e2eae2SMauro Carvalho ChehabUser space code that configures and uses IPU3 is available here.
43432e2eae2SMauro Carvalho Chehab
43532e2eae2SMauro Carvalho Chehabhttps://chromium.googlesource.com/chromiumos/platform/arc-camera/+/master/
43632e2eae2SMauro Carvalho Chehab
43732e2eae2SMauro Carvalho ChehabThe source can be located under hal/intel directory.
43832e2eae2SMauro Carvalho Chehab
43932e2eae2SMauro Carvalho ChehabOverview of IPU3 pipeline
44032e2eae2SMauro Carvalho Chehab=========================
44132e2eae2SMauro Carvalho Chehab
44232e2eae2SMauro Carvalho ChehabIPU3 pipeline has a number of image processing stages, each of which takes a
44332e2eae2SMauro Carvalho Chehabset of parameters as input. The major stages of pipelines are shown here:
44432e2eae2SMauro Carvalho Chehab
44532e2eae2SMauro Carvalho Chehab.. kernel-render:: DOT
44632e2eae2SMauro Carvalho Chehab   :alt: IPU3 ImgU Pipeline
44732e2eae2SMauro Carvalho Chehab   :caption: IPU3 ImgU Pipeline Diagram
44832e2eae2SMauro Carvalho Chehab
44932e2eae2SMauro Carvalho Chehab   digraph "IPU3 ImgU" {
45032e2eae2SMauro Carvalho Chehab       node [shape=box]
45132e2eae2SMauro Carvalho Chehab       splines="ortho"
45232e2eae2SMauro Carvalho Chehab       rankdir="LR"
45332e2eae2SMauro Carvalho Chehab
45432e2eae2SMauro Carvalho Chehab       a [label="Raw pixels"]
45532e2eae2SMauro Carvalho Chehab       b [label="Bayer Downscaling"]
45632e2eae2SMauro Carvalho Chehab       c [label="Optical Black Correction"]
45732e2eae2SMauro Carvalho Chehab       d [label="Linearization"]
45832e2eae2SMauro Carvalho Chehab       e [label="Lens Shading Correction"]
45932e2eae2SMauro Carvalho Chehab       f [label="White Balance / Exposure / Focus Apply"]
46032e2eae2SMauro Carvalho Chehab       g [label="Bayer Noise Reduction"]
46132e2eae2SMauro Carvalho Chehab       h [label="ANR"]
46232e2eae2SMauro Carvalho Chehab       i [label="Demosaicing"]
46332e2eae2SMauro Carvalho Chehab       j [label="Color Correction Matrix"]
46432e2eae2SMauro Carvalho Chehab       k [label="Gamma correction"]
46532e2eae2SMauro Carvalho Chehab       l [label="Color Space Conversion"]
46632e2eae2SMauro Carvalho Chehab       m [label="Chroma Down Scaling"]
46732e2eae2SMauro Carvalho Chehab       n [label="Chromatic Noise Reduction"]
46832e2eae2SMauro Carvalho Chehab       o [label="Total Color Correction"]
46932e2eae2SMauro Carvalho Chehab       p [label="XNR3"]
47032e2eae2SMauro Carvalho Chehab       q [label="TNR"]
4719611ba28SBingbu Cao       r [label="DDR", style=filled, fillcolor=yellow, shape=cylinder]
4729611ba28SBingbu Cao       s [label="YUV Downscaling"]
4739611ba28SBingbu Cao       t [label="DDR", style=filled, fillcolor=yellow, shape=cylinder]
47432e2eae2SMauro Carvalho Chehab
4759611ba28SBingbu Cao       { rank=same; a -> b -> c -> d -> e -> f -> g -> h -> i }
4769611ba28SBingbu Cao       { rank=same; j -> k -> l -> m -> n -> o -> p -> q -> s -> t}
47732e2eae2SMauro Carvalho Chehab
4789611ba28SBingbu Cao       a -> j [style=invis, weight=10]
4799611ba28SBingbu Cao       i -> j
4809611ba28SBingbu Cao       q -> r
48132e2eae2SMauro Carvalho Chehab   }
48232e2eae2SMauro Carvalho Chehab
48332e2eae2SMauro Carvalho ChehabThe table below presents a description of the above algorithms.
48432e2eae2SMauro Carvalho Chehab
48532e2eae2SMauro Carvalho Chehab======================== =======================================================
48632e2eae2SMauro Carvalho ChehabName			 Description
48732e2eae2SMauro Carvalho Chehab======================== =======================================================
48832e2eae2SMauro Carvalho ChehabOptical Black Correction Optical Black Correction block subtracts a pre-defined
48932e2eae2SMauro Carvalho Chehab			 value from the respective pixel values to obtain better
49032e2eae2SMauro Carvalho Chehab			 image quality.
491*b97d4a1eSMauro Carvalho Chehab			 Defined in struct ipu3_uapi_obgrid_param.
49232e2eae2SMauro Carvalho ChehabLinearization		 This algo block uses linearization parameters to
49332e2eae2SMauro Carvalho Chehab			 address non-linearity sensor effects. The Lookup table
49432e2eae2SMauro Carvalho Chehab			 table is defined in
495*b97d4a1eSMauro Carvalho Chehab			 struct ipu3_uapi_isp_lin_vmem_params.
49632e2eae2SMauro Carvalho ChehabSHD			 Lens shading correction is used to correct spatial
49732e2eae2SMauro Carvalho Chehab			 non-uniformity of the pixel response due to optical
49832e2eae2SMauro Carvalho Chehab			 lens shading. This is done by applying a different gain
49932e2eae2SMauro Carvalho Chehab			 for each pixel. The gain, black level etc are
500*b97d4a1eSMauro Carvalho Chehab			 configured in struct ipu3_uapi_shd_config_static.
50132e2eae2SMauro Carvalho ChehabBNR			 Bayer noise reduction block removes image noise by
50232e2eae2SMauro Carvalho Chehab			 applying a bilateral filter.
503*b97d4a1eSMauro Carvalho Chehab			 See struct ipu3_uapi_bnr_static_config for details.
50432e2eae2SMauro Carvalho ChehabANR			 Advanced Noise Reduction is a block based algorithm
50532e2eae2SMauro Carvalho Chehab			 that performs noise reduction in the Bayer domain. The
50632e2eae2SMauro Carvalho Chehab			 convolution matrix etc can be found in
507*b97d4a1eSMauro Carvalho Chehab			 struct ipu3_uapi_anr_config.
50832e2eae2SMauro Carvalho ChehabDM			 Demosaicing converts raw sensor data in Bayer format
50932e2eae2SMauro Carvalho Chehab			 into RGB (Red, Green, Blue) presentation. Then add
51032e2eae2SMauro Carvalho Chehab			 outputs of estimation of Y channel for following stream
51132e2eae2SMauro Carvalho Chehab			 processing by Firmware. The struct is defined as
512*b97d4a1eSMauro Carvalho Chehab			 struct ipu3_uapi_dm_config.
51332e2eae2SMauro Carvalho ChehabColor Correction	 Color Correction algo transforms sensor specific color
51432e2eae2SMauro Carvalho Chehab			 space to the standard "sRGB" color space. This is done
51532e2eae2SMauro Carvalho Chehab			 by applying 3x3 matrix defined in
516*b97d4a1eSMauro Carvalho Chehab			 struct ipu3_uapi_ccm_mat_config.
517*b97d4a1eSMauro Carvalho ChehabGamma correction	 Gamma correction struct ipu3_uapi_gamma_config is a
51832e2eae2SMauro Carvalho Chehab			 basic non-linear tone mapping correction that is
51932e2eae2SMauro Carvalho Chehab			 applied per pixel for each pixel component.
52032e2eae2SMauro Carvalho ChehabCSC			 Color space conversion transforms each pixel from the
52132e2eae2SMauro Carvalho Chehab			 RGB primary presentation to YUV (Y: brightness,
52232e2eae2SMauro Carvalho Chehab			 UV: Luminance) presentation. This is done by applying
52332e2eae2SMauro Carvalho Chehab			 a 3x3 matrix defined in
524*b97d4a1eSMauro Carvalho Chehab			 struct ipu3_uapi_csc_mat_config
52532e2eae2SMauro Carvalho ChehabCDS			 Chroma down sampling
52632e2eae2SMauro Carvalho Chehab			 After the CSC is performed, the Chroma Down Sampling
52732e2eae2SMauro Carvalho Chehab			 is applied for a UV plane down sampling by a factor
52832e2eae2SMauro Carvalho Chehab			 of 2 in each direction for YUV 4:2:0 using a 4x2
529*b97d4a1eSMauro Carvalho Chehab			 configurable filter struct ipu3_uapi_cds_params.
53032e2eae2SMauro Carvalho ChehabCHNR			 Chroma noise reduction
53132e2eae2SMauro Carvalho Chehab			 This block processes only the chrominance pixels and
53232e2eae2SMauro Carvalho Chehab			 performs noise reduction by cleaning the high
53332e2eae2SMauro Carvalho Chehab			 frequency noise.
534*b97d4a1eSMauro Carvalho Chehab			 See struct struct ipu3_uapi_yuvp1_chnr_config.
53532e2eae2SMauro Carvalho ChehabTCC			 Total color correction as defined in struct
536*b97d4a1eSMauro Carvalho Chehab			 struct ipu3_uapi_yuvp2_tcc_static_config.
53732e2eae2SMauro Carvalho ChehabXNR3			 eXtreme Noise Reduction V3 is the third revision of
53832e2eae2SMauro Carvalho Chehab			 noise reduction algorithm used to improve image
53932e2eae2SMauro Carvalho Chehab			 quality. This removes the low frequency noise in the
54032e2eae2SMauro Carvalho Chehab			 captured image. Two related structs are  being defined,
541*b97d4a1eSMauro Carvalho Chehab			 struct ipu3_uapi_isp_xnr3_params for ISP data memory
542*b97d4a1eSMauro Carvalho Chehab			 and struct ipu3_uapi_isp_xnr3_vmem_params for vector
54332e2eae2SMauro Carvalho Chehab			 memory.
54432e2eae2SMauro Carvalho ChehabTNR			 Temporal Noise Reduction block compares successive
54532e2eae2SMauro Carvalho Chehab			 frames in time to remove anomalies / noise in pixel
546*b97d4a1eSMauro Carvalho Chehab			 values. struct ipu3_uapi_isp_tnr3_vmem_params and
547*b97d4a1eSMauro Carvalho Chehab			 struct ipu3_uapi_isp_tnr3_params are defined for ISP
54832e2eae2SMauro Carvalho Chehab			 vector and data memory respectively.
54932e2eae2SMauro Carvalho Chehab======================== =======================================================
55032e2eae2SMauro Carvalho Chehab
55132e2eae2SMauro Carvalho ChehabOther often encountered acronyms not listed in above table:
55232e2eae2SMauro Carvalho Chehab
55332e2eae2SMauro Carvalho Chehab	ACC
55432e2eae2SMauro Carvalho Chehab		Accelerator cluster
55532e2eae2SMauro Carvalho Chehab	AWB_FR
55632e2eae2SMauro Carvalho Chehab		Auto white balance filter response statistics
55732e2eae2SMauro Carvalho Chehab	BDS
55832e2eae2SMauro Carvalho Chehab		Bayer downscaler parameters
55932e2eae2SMauro Carvalho Chehab	CCM
56032e2eae2SMauro Carvalho Chehab		Color correction matrix coefficients
56132e2eae2SMauro Carvalho Chehab	IEFd
56232e2eae2SMauro Carvalho Chehab		Image enhancement filter directed
56332e2eae2SMauro Carvalho Chehab	Obgrid
56432e2eae2SMauro Carvalho Chehab		Optical black level compensation
56532e2eae2SMauro Carvalho Chehab	OSYS
56632e2eae2SMauro Carvalho Chehab		Output system configuration
56732e2eae2SMauro Carvalho Chehab	ROI
56832e2eae2SMauro Carvalho Chehab		Region of interest
56932e2eae2SMauro Carvalho Chehab	YDS
57032e2eae2SMauro Carvalho Chehab		Y down sampling
57132e2eae2SMauro Carvalho Chehab	YTM
57232e2eae2SMauro Carvalho Chehab		Y-tone mapping
57332e2eae2SMauro Carvalho Chehab
57432e2eae2SMauro Carvalho ChehabA few stages of the pipeline will be executed by firmware running on the ISP
57532e2eae2SMauro Carvalho Chehabprocessor, while many others will use a set of fixed hardware blocks also
57632e2eae2SMauro Carvalho Chehabcalled accelerator cluster (ACC) to crunch pixel data and produce statistics.
57732e2eae2SMauro Carvalho Chehab
57832e2eae2SMauro Carvalho ChehabACC parameters of individual algorithms, as defined by
579*b97d4a1eSMauro Carvalho Chehabstruct ipu3_uapi_acc_param, can be chosen to be applied by the user
580*b97d4a1eSMauro Carvalho Chehabspace through struct struct ipu3_uapi_flags embedded in
581*b97d4a1eSMauro Carvalho Chehabstruct ipu3_uapi_params structure. For parameters that are configured as
58232e2eae2SMauro Carvalho Chehabnot enabled by the user space, the corresponding structs are ignored by the
58332e2eae2SMauro Carvalho Chehabdriver, in which case the existing configuration of the algorithm will be
58432e2eae2SMauro Carvalho Chehabpreserved.
58532e2eae2SMauro Carvalho Chehab
58632e2eae2SMauro Carvalho ChehabReferences
58732e2eae2SMauro Carvalho Chehab==========
58832e2eae2SMauro Carvalho Chehab
58932e2eae2SMauro Carvalho Chehab.. [#f5] drivers/staging/media/ipu3/include/intel-ipu3.h
59032e2eae2SMauro Carvalho Chehab
59132e2eae2SMauro Carvalho Chehab.. [#f1] https://github.com/intel/nvt
59232e2eae2SMauro Carvalho Chehab
59332e2eae2SMauro Carvalho Chehab.. [#f2] http://git.ideasonboard.org/yavta.git
59432e2eae2SMauro Carvalho Chehab
59532e2eae2SMauro Carvalho Chehab.. [#f3] http://git.ideasonboard.org/?p=media-ctl.git;a=summary
59632e2eae2SMauro Carvalho Chehab
59732e2eae2SMauro Carvalho Chehab.. [#f4] ImgU limitation requires an additional 16x16 for all input resolutions
598