Skip to content

MI SCL API


REVISION HISTORY

Revision No.
Description
Date
3.0
  • Initial release
  • 12/04/2020
    3.1
  • Added Muffin flow chart
  • 07/25/2021
  • Added PROCFS introduction
  • 08/25/2021
    3.2
  • Added Mochi info
  • 02/17/2022
    3.3
  • Added MI_SCL_StretchBufOsd Info
  • Added PROCFS debug cmd
  • 03/21/2022
    3.4
  • Added Maruko information
  • 03/22/2022
    3.5
  • In Section 5.2 add debug CMD:ptsth/resethw/cmdqtimeout/outputfilter
  • 08/03/2022
    3.6
  • In Section 2.15 add MI_SCL_StretchBuf demo
  • 09/09/2022
    3.7
  • Added Opera info
  • In Section 1.2 modified the expression of Device Id to make it easier to understand
  • 10/28/2022
    3.8
  • In Section 5.2 add debug CMD:cmdqdelay/doublevsyncdrop
  • 12/01/2022
    3.9
  • Added souffle info
  • 02/13/2023
    3.10
  • Added Iford info
  • 12/01/2023
    3.11
  • Added pixel format gray8 support info
  • 03/04/2024
    3.12
  • Added Ifado info
  • 03/19/2024
    3.13
  • Added Pcupid info
  • 04/10/2024
    3.14
  • In Section 1.4 change Ifado Chn Number to 4 and change Ifado MIN WxH to 64x16
  • 07/10/2024
    3.15
  • In Section 2.11 added note for MI_SCL_SetOutputPortParam
  • 08/02/2024
    3.16
  • In Section 3.26 added new dev id MI_SCL_DEV_VDEC_TILE
  • 08/08/2024
    3.17
  • Added Ifackel info
  • 08/13/2024
    3.18
  • Added Ibopper info
  • 08/16/2024
    3.19
  • Modified Ifado block diagram
  • In Section 6.2 added bEnable2LVScalingdown and u8HvspBypassEn param
  • In Section 2.11 modified note for MI_SCL_SetOutputPortParam
  • 11/20/2024
    3.20
  • Added Jaguar1 info
  • 01/08/2025
    3.21
  • In Section 1.2 added Ifackel MI_SCL_DEV_DIPR0 rot description. In Section 6.2 added Jaguar1 u8HvspBypassEn default value description.
  • 02/06/2025
    3.22
  • Optimize doc structure
  • 04/23/2025
    3.23
  • Errata documentation
  • 06/10/2025
    3.24
  • In Section 1.4 modify Ibopper input and output specifications
  • 06/18/2025
    3.25
  • In Section 3.8 added MI_SCL_FilterTableAttr_t parameters
  • In Section 6.2 added bHvsp0Up, bHvsp0Table0En, au8Hvsp0Table0FilePathV and au8Hvsp0Table0FilePathH parameters description
  • 06/05/2025
    3.26
  • Added Ifliegen info
  • 08/12/2025
    3.27
  • Added Ihalo info
  • 08/13/2025
    3.28
  • Added Mhera info
  • 11/05/2025

    1. OVERVIEW


    1.1. Module description

    SCL scales the original image to the specified resolution of each output port. Each scl is divided into different devices according to the type of input data source,and each output port has a crop/scaling/mirror/flip/pixel conversion function.

    Keyword

    • Device

      Device consists of a fixed input type and a user assigned HWSclId.

    • Channel

      A device can be time-sharing multiplexed into multiple channels.

    • Input Port

      Input port on the channel and the input type supported by each device are shown in the flowchart of chapter 1.5.

    • Output port

      Output port on the Device, which corresponds to the HWSclId of the Device one-to-one.

    • Crop

      Crop the image.

    • Scaling

      Saling to reduce or enlarge the image.

    • Compress

      Compress mode, compress data transmission to save bandwidth.

    • Rotate

      Rotate the input image by a certain angle and output.


    1.2. Basic structure

    • The MI_SCL module processes raw image data from various input sources through the crop, scaling, mirror, and flip units of the target output port, converting it into the target image format resolution. The MI_SCL module can support multiple such output ports, with specific capabilities and the number of supported output ports depending on the particular chip platform. For details on the differences between chips, please refer to section 1.5.

    • MI_SCL classifies different devices based on various source data. Most devices support selecting all output ports, while a few devices only support selecting specific output ports. When creating a device, multiple output ports can be selected, but output ports occupied by other devices cannot be chosen. The capability of output ports varies depending on different chipset platforms; specific details can be found in Chapter 1.5, which covers chipset differences.

    • For a device with a data source from DRAM, the MI_SCL can additionally configure cropping for the input port. Note that rotation is not currently supported for this crop operation.

    • The device performing rotation operations utilizes the hardware resources of the scaling unit within the selected output port. Therefore, an output port that performs rotation cannot simultaneously handle other operations such as cropping, scaling, mirroring/flip, or pixel transformation. In other words, an output port configured for rotation can only perform rotation and cannot be used for scaling, cropping, or other functionalities.

    • The SCL backend can be venc or disp modules, or it can directly output the frame without any subsequent processing. The supported backend modules vary across different chip platforms. For details, refer to Section 1.5.1 Chip Specifications.

    Figure 1-1: SCL Hardware Block Diagram

    1.3. Function introduction

    MI_SCL supported features:

    • Support for image resolution scaling and image effect adjustment

    • Support for cropping specific regions of an image

    • Support for pixfmt conversion

    • Support for multiplexing a single data stream into multiple streams

    • Support for image mirroring and flipping

    • Support for rotation on certain platforms (refer to section 1.5.1 for chip specifications)

    • Support for input decompression and output compression on certain platforms (refer to section 1.5.1 for chip specifications)


    1.4. Application scenarios

    MI_SCL can be applied in the following scenarios:

    • Pure linux environment

      Applications can be developed based on the API interfaces provided by MI_SCL.

    • Pure rtos environment

      In an RTOS environment, applications can be developed based on the API interfaces provided by MI_SCL.

    • Dualos environment

      In a dual OS environment, applications running on the Linux side and applications running on the RTOS side can be developed based on the MI_SCL API.


    1.5. Chip difference


    1.5.1. Specification

    Both '\' and 'N' mean this function is not supported.

    • Module function specifications

      Function Tiramisu Mochi Muffin Maruko Opera Souffle Iford Ifado Pcupid Ifackel Ibopper Jaguar1 Ifliegen Ihalo Mhera
      Dev Number 4 2 7 3 5 4 2 2 2 5 1 4 3 3 1
      Chn Number 32 32 32 16 16 32 4 4 32 16 32 16 4 4 64
      Port Number 6 7 9 4 4 7 3 3 1 5 1 8 3 3 1
      InputCrop Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y
      Rotation Y N Y N Y N N N Y Y N Y N N Y
      mirror Y Y Y Y Y Y Y Y Y Y N Y Y Y Y
      flip Y Y Y Y Y Y Y Y Y Y N Y Y Y Y
      OutPutCrop Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y
      Scaling Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y
      Compress N Y N Y Y Y N N N N N N N N N
      Max Pixel Rate 4K30 4K60 4K60 4K30 6M30 4K60 4K24 2K30 4K20 4k30 4M30 4K30 4K25 4K20 4K60
    • Input specifications

      Input Tiramisu Mochi Muffin Maruko Opera Souffle Iford Ifado Pcupid Ifackel Ibopper Jaguar1 Ifliegen Ihalo Mhera
      pixel ARGB8888 Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y
      ABGR8888 Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y
      BGRA8888 Y Y Y Y Y Y Y N Y Y N Y Y Y Y
      yuv420SP NV12 Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y
      yuv420SP NV21 Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y
      yuv420 Planer Y Y Y Y Y Y Y N Y Y N Y Y Y Y
      yuv422 YUYV Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y
      yuv422 YVYU Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y
      YUV422 VYUY Y Y Y Y Y Y Y Y Y Y N Y Y Y Y
      yuv422 UYVY Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y
      yuv422 SP Y Y Y Y Y Y Y N Y Y N Y Y Y Y
      yuv422 Planer Y Y Y Y Y Y Y N Y Y N Y Y Y Y
      Gray8 N N N N N Y Y N Y Y N Y Y Y Y
      Crop Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y
      CompressMode NONE Y Y Y Y Y Y Y Y N N N N N N N
      10TO6 N Y N Y Y Y N N N N N N N N N
      resolution(yuv420 limit) MI_SCL_DEV_RDMA0 Max width 4096 4096 7680 3840 2688 8192 3840 2560 1280 5376 8192 3840 3840 3840 4096
      MI_SCL_DEV_DIPR0 Max width 4096 \ 7680 \ 2688 8192 \ \ \ \ \ \ \ \ \
      MI_SCL_DEV_RDMA2 Max width \ \ 8192 \ \ \ \ \ \ \ \ \ \ \ \
      MI_SCL_DEV_DIPR1 Max width \ \ \ \ 2688 \ \ \ \ \ \ \ \ \ \
      MIN WxH 16x16 16x16 16x16 16x16 16x16 16x16 16x16 64x16 16x16 16x16 64x4 16x16 16x16 16x16 16x16
      Pixel Alignment (The same as rot source pixel) YUV Pack 8x2 2x2 2x2 2x2 2x2 2x2 2x2 2x2 2x2 2x2 2x2 2x2 2x2 2x2 2x2
      YUV SP 16x2 2x2 2x2 2x2 2x2 2x2 2x2 2x2 2x2 2x2 2x2 2x2 2x2 2x2 2x2
      YUV Planer 32x2 2x2 2x2 2x2 2x2 2x2 2x2 2x2 2x2 2x2 2x2 2x2 2x2 2x2 2x2
      ARGB 4x2 2x2 2x2 2x2 2x2 2x2 2x2 2x2 2x2 2x2 2x2 2x2 2x2 2x2 2x2
      Gray8 NA NA NA NA NA 2x2 2x2 NA 2x2 2x2 NA 2x2 2x2 2x2 2x2
      Rot source 2x2 NA 2x2 NA 2x2 NA NA NA 2x2 2x2 NA 2x2 NA NA 2x2

    • Output specifications

      Output Tiramisu Mochi Muffin Maruko Opera Souffle Iford Ifado Pcupid Ifackel Ibopper Jaguar1 Ifliegen Ihalo Mhera
      pixel ARGB8888 Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y
      ABGR8888 Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y
      BGRA8888 Y Y Y Y Y Y Y Y(Not supported by E_MI_SCL_HWSCL2) Y Y N Y Y Y Y
      RGB565 N N N N N N N N Y Y Y Y Y Y Y
      yuv420SP NV12 Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y
      yuv420SP NV21 Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y
      yuv420 Planer Y Y Y Y Y Y Y Y(Not supported by E_MI_SCL_HWSCL2) Y Y N Y Y Y Y
      yuv422 YUYV Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y
      yuv422 YVYU Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y
      YUV422 VYUY Y Y Y Y Y Y Y Y(Only supported by E_MI_SCL_HWSCL2) Y Y Y Y Y Y Y
      yuv422 UYVY Y Y Y Y Y Y Y Y(Only supported by E_MI_SCL_HWSCL2) Y Y Y Y Y Y Y
      yuv422 SP Y Y Y Y Y Y Y Y(Not supported by E_MI_SCL_HWSCL2) Y Y N Y Y Y Y
      yuv422 Planer Y Y Y Y Y Y Y Y(Not supported by E_MI_SCL_HWSCL2) Y Y N Y Y Y Y
      Gray8 N N N N N Y Y N Y Y N Y Y Y Y
      CompressMode NONE Y Y Y Y Y Y Y Y N N N N N N N
      10TO6 N Y N Y Y Y N N N N N N N N N
      IFC N N N Y Y Y N N N N N N N N N
      Crop Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y
      Scaling Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y
      Mirror Y Y Y Y Y Y Y Y Y Y N Y Y Y Y
      Flip Y Y Y Y Y Y Y Y Y Y N Y Y Y Y
      Rotation Y N Y N Y N N N Y Y N Y N N Y
      Frame mode Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y
      Realtime_JPEG Y Y N Y Y Y Y Y N Y N Y Y Y Y
      Ring_H26x Y Y Y N N N N N N N N N N N N
      HalfRing_H26x Y Y Y N N N N N N N N N N N N
      MultiRing_H26x N N N Y(Only supported by E_MI_SCL_HWSCL0) Y(Only supported by E_MI_SCL_HWSCL0) Y(Only supported by E_MI_SCL_HWSCL0) Y(Only supported by E_MI_SCL_HWSCL0) Y(Only supported by E_MI_SCL_HWSCL0) N Y(Only supported by E_MI_SCL_HWSCL0) N Y(Support for EMI_SCL_SWSCL0 multi ring venc device 0 and EMI_SCL_SWSCL2 multi ring venc device 1) Y(Only supported by E_MI_SCL_HWSCL0) Y(Only supported by E_MI_SCL_HWSCL0) N
      Realtime_H26x N N N N N N N N N N N N Y(Only supported by E_MI_SCL_HWSCL0) Y(Only supported by E_MI_SCL_HWSCL0) N
      TileMode SclId(Used by Disp rot) E_MI_SCL_HWSCL5 \ \ \ E_MI_SCL_HWSCL3 \ \ \ \ \ \ E_MI_SCL_HWSCL3 \ \ \
      YUV420 MAX Width E_MI_SCL_HWSCL0 4608 4096 7680 3840 2688 8192 3840 2560 1280 5376 8192 3840 3840 3840 4096
      E_MI_SCL_HWSCL1 4608 4096 7680 3840 2688 8192 3840 2560 \ 5376 \ 3840 3840 3840 \
      E_MI_SCL_HWSCL2 4096 3840 3840 1920 1920 1920 1920 2560 \ 1920 \ 2560 1280 1280 \
      E_MI_SCL_HWSCL3 4096 1920 1920 1920 2688 3840 \ \ \ 1280 \ 1920 \ \ \
      E_MI_SCL_HWSCL4 4096 1280 7680 \ \ 3840 \ \ \ 1920 \ 1280 \ \ \
      E_MI_SCL_HWSCL5 4096 1280 7680 \ \ 3840 \ \ \ \ \ 1280 \ \ \
      E_MI_SCL_HWSCL6 \ 4096 3840 \ \ 8192 \ \ \ \ \ 1280 \ \ \
      E_MI_SCL_HWSCL7 \ \ 1920 \ \ \ \ \ \ \ \ 1920 \ \ \
      E_MI_SCL_HWSCL8 \ \ 8192 \ \ \ \ \ \ \ \ \ \ \ \
      E_MI_SCL_HWSCL9 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \
      Pixel Alignment Width 2 2 2 2 2 2 2 2 2 2 16 2 2 2 2
      Height 2 2 2 2 2 2 2 2 2 2 16 2 2 2 2


    1.5.2. Tiramisu

    Figure 1-2: Tiramisu Diagram

    Tiramisu MI_SCL has 6 scl hardware, which are divided into different Devices according to the type of input source.

    Device Id Input port source type
    MI_SCL_DEV_ISP_REALTIME0 Only supports connection with MI_ISP output port0 realtime
    MI_SCL_DEV_RDMA0 Support Frame mode reading data from Dram; Support binding with MI_JPD realtime
    MI_SCL_DEV_VIF_REALTIME0 Only supports connection with MI_VIF YUV Realtime
    MI_SCL_DEV_DIPR0 Only supports Frame mode reading data from Dram; Only E_MI_SCL_HWSCL5 can be used; Only supports Rotation, see MI_SCL_SetChnParam for function limitation

    1.5.3. Muffin

    Figure 1-3: Muffin Diagram

    MI_SCL muffin has 9 scl hardware, which are divided into different Devices according to the type of input source.

    Device Id Input port source type
    MI_SCL_DEV_ISP_REALTIME0 Only supports connection with MI_ISP device0 output port0 realtime
    MI_SCL_DEV_RDMA0 Support Frame mode reading data from Dram; Support binding with MI_JPD realtime
    MI_SCL_DEV_VIF_REALTIME0 Only supports connection with MI_VIF device8 YUV Realtime
    MI_SCL_DEV_DIPR0 Only support Frame mode reading data from Dram; Only E_MI_SCL_HWSCL8 can be used; Only supports Rotation, see MI_SCL_SetChnParam for function limitation;
    MI_SCL_DEV_ISP_REALTIME1 Only supports connection with MI_ISP device1 output port0 realtime
    MI_SCL_DEV_RDMA2 Support Frame mode reading data from Dram; Support binding with MI_JPD realtime
    MI_SCL_DEV_VIF_REALTIME1 Only supports connection with MI_VIF device24 YUV Realtime

    1.5.4. Mochi

    Figure 1-4: Mochi Diagram

    Mochi MI_SCL has 7 scl hardware, which are divided into different Devices according to the type of input source.

    Device Id Input port source type
    MI_SCL_DEV_ISP_REALTIME0 Only support connection with MI_ISP output port0 realtime.
    MI_SCL_DEV_RDMA0 Support Frame mode reading data from Dram; Support binding with MI_JPD realtime.

    1.5.5. Maruko

    Figure 1-5: Maruko Diagram

    Maruko MI_SCL has 4 scl hardware, which are divided into different Devices according to the type of input source.

    Device Id Input port source type
    MI_SCL_DEV_ISP_REALTIME0 Only support connection with MI_ISP output port0 realtime.
    MI_SCL_DEV_RDMA0 Support Frame mode reading data from Dram.
    MI_SCL_DEV_VIF_REALTIME0 Only supports connection with MI_VIF YUV Realtime.

    1.5.6. Opera

    Figure 1-6: Opera Diagram

    Opera MI_SCL has 4 scl hardware, which are divided into different Devices according to the type of input source.

    Device Id Input port source type
    MI_SCL_DEV_ISP_REALTIME0 Only support connection with MI_ISP output port0 realtime.
    MI_SCL_DEV_RDMA0 Support Frame mode reading data from Dram and MI_JPD realtime binding.
    MI_SCL_DEV_VIF_REALTIME0 Only supports connection with MI_VIF YUV Realtime.
    MI_SCL_DEV_DIPR0 Only support Frame mode reading data from Dram; Only E_MI_SCL_HWSCL3 can be used.
    MI_SCL_DEV_DIPR1 Only support Frame mode reading data from Dram; Only E_MI_SCL_HWSCL1 can be used; Only supports Rotation, see MI_SCL_SetChnParam for function limitation.
    MI_SCL_DEV_HVP_REALTIME0 Only support connection with MI_HVP realtime; Only E_MI_SCL_HWSCL3 can be used, no support scaling up.

    1.5.7. Souffle

    Figure 1-7: Souffle Diagram

    Souffle MI_SCL has 7 scl hardware, which are divided into different Devices according to the type of input source.

    Device Id Input port source type
    MI_SCL_DEV_ISP_REALTIME0 Only support connection with MI_ISP device0 output port0 realtime.
    MI_SCL_DEV_RDMA0 Support Frame mode reading data from Dram and MI_JPD realtime binding.
    MI_SCL_DEV_VIF_REALTIME0 Only supports connection with MI_VIF YUV Realtime.
    MI_SCL_DEV_DIPR0 Only support Frame mode reading data from Dram; Only E_MI_SCL_HWSCL6 can be used.

    1.5.8. Iford

    Figure 1-8: Iford Diagram

    Iford MI_SCL has 3 scl hardware, which are divided into different Devices according to the type of input source.

    Device Id Input port source type
    MI_SCL_DEV_ISP_REALTIME0 Only support connection with MI_ISP device0 output port0 realtime.
    MI_SCL_DEV_RDMA0 Support Frame mode reading data from Dram.

    1.5.9. Ifado

    Figure 1-9: Ifado Diagram

    Ifado MI_SCL has 3 scl hardware, which are divided into different Devices according to the type of input source.

    Device Id Input port source type
    MI_SCL_DEV_ISP_REALTIME0 1. Only support connection with MI_ISP device0 output port0 realtime.
    2. When the scaling down ratio is large, user can use E_MI_SCL_HWSCL2 and enable the 2 level scaling down function to get a better image. See the bEnable2LVScalingdown for how to enable the 2 level scaling down function
    MI_SCL_DEV_RDMA0 Support Frame mode reading data from Dram with E_MI_SCL_HWSCL2.

    1.5.10. Pcupid

    Figure 1-10: Pcupid Diagram

    Pcupid MI_SCL has 1 scl hardware, which are divided into different Devices according to the type of input source.

    Device Id Input port source type
    MI_SCL_DEV_ISP_REALTIME0 Only support connection with MI_ISP device0 output port0 realtime.
    MI_SCL_DEV_RDMA0 Support Frame mode reading data from Dram and Rotation. Rotation and Scaling functions are mutually exclusive within the same channel. For the function limitation during rotation, please refer to MI_SCL_SetChnParam.

    1.5.11. Ifackel

    Figure 1-11: Ifackel Diagram

    Ifackel MI_SCL has 5 SCL hardware, which are divided into different devices according to the type of input source.

    Device Id Input port input source type
    MI_SCL_DEV_ISP_REALTIME0 Only support connection with MI_ISP device0 output port0 realtime.
    MI_SCL_DEV_RDMA0 Support Frame mode reading data from Dram.
    MI_SCL_DEV_VIF_REALTIME0 Only support connection with MI_VIF output port0 yuv format realtime.
    MI_SCL_DEV_DIPR0 Only supports Frame mode reading data from Dram, and only E_MI_SCL_HWSCL4 can be used. Only supports Rotation, see MI_SCL_SetChnParam for function limitation
    MI_SCL_DEV_VDEC_TILE 1. Only support Frame mode reading data from Dram, and only support yuv420nv12 tile 32x16 format input buffer from vdec.
    2. When the back-stage frame mode bind, you can use any one or more hw scl ports. When the back-stage realtime-disp bind, only E_MI_SCL_HWSCL4 can be used.
    3. The back-stage framemode and realtime bind do not support simultaneous use. If scl hw port4 realtime-disp, this dev cannot use other ports.
    4. This dev does not support multi-channel.
    5. When using scl-realtime-disp, scl only supports zooming in, not zooming out. The alignment requirement of scl crop (x, y, w, h) is (16, 64, 2, 2).
    6. When using scl-realtime-disp, only yuv420nv12 output is supported, and mirror/flip is not supported.

    1.5.12. Ibopper

    Figure 1-12: Ibopper Diagram

    Ibopper MI_SCL has 1 SCL hardware, which only supports devices with the input source RDMA0.

    Device Id Input port input source type
    MI_SCL_DEV_RDMA0 Support Frame mode reading data from Dram.

    1.5.13 Jaguar1

    Figure 1-13: Jaguar1 Diagram

    Jaguar1 MI_SCL has 8 SCL hardware, which are divided into different devices according to the type of input source.

    Device Id Input port input source type
    MI_SCL_DEV_RDMA0 Support Frame mode reading data from Dram.
    MI_SCL_DEV_ISP_REALTIME0 Only support connection with MI_ISP device0 output port0 realtime.
    MI_SCL_DEV_VIF_REALTIME0 Only support connection with MI_VIF output port0 yuv format realtime.
    MI_SCL_DEV_DIPR0 Only supports Frame mode reading data from Dram, and only E_MI_SCL_HWSCL7 can be used. Only supports rotation.

    1.5.14. Ifliegen

    Figure1-14:Ifliegen Diagram

    Ifliegen MI_SCL has 3 scl hardware, which are divided into different devices according to the type of input source.

    Device Id Input port input source type
    MI_SCL_DEV_RDMA0
  • Support Frame mode reading data from Dram.
  • SCL and DISP are mutually exclusive in using RDMA0
  • MI_SCL_DEV_ISP_REALTIME0 Only support connection with MI_ISP device0 output port0 realtime
    MI_SCL_DEV_VIF_REALTIME0 Only support connection with MI_VIF output port0 yuv format realtime

    Note:

    • SCL and DISP can not use at the same time because SCL and DISP are mutually exclusive in using RDMA0.Otherwise, an error message will occur 'rdma is being used by disp'.

    1.5.15. Ihalo

    Figure1-15:Ihalo Diagram

    Ihalo MI_SCL has 3 scl hardware, which are divided into different devices according to the type of input source.

    Device Id Input port input source type
    MI_SCL_DEV_RDMA0 Support Frame mode reading data from Dram.
    MI_SCL_DEV_ISP_REALTIME0 Only support connection with MI_ISP device0 output port0 realtime.
    MI_SCL_DEV_VIF_REALTIME0 Only support connection with MI_VIF output port0 yuv format realtime.

    1.5.16. Mhera

    Figure 1-16: Mhera Diagram

    Mhera MI_SCL has 1 scl hardware, which only supports devices with the input source RDMA0.

    Device Id Input port source type
    MI_SCL_DEV_RDMA0 Support Frame mode reading data from Dram and Rotation. Rotation and Scaling functions are mutually exclusive within the same channel. For the function limitation during rotation, please refer to MI_SCL_SetChnParam.

    1.6. Work principle

    NA


    1.7. Development process

    1.7.1. Compile configuration

    Figure 1-14: MI_SCL compilation configuration process
    1. Enter the project directory of alkaid, make menuconfig

    2. Press the enter key to select the "Generic Options" submenu

    3. Press the Enter key again to enter the "Interface Compile Config" submenu

    4. Use the spacebar to select the "scl" submodule. Once selected, save your configuration and recompile the project

      After successful compilation, mi_scl.ko will be placed in the directory sdk/interface/src/scl/, mi_scl.h and mi_scl_datatype.h will be exported to the project/release directory. Under a pure Linux environment, these files will be automatically included in the images.


    1.7.2 Configure MI_SCL module parameter loading

    The "modparam.json" file is located in the "/config" directory. This file will be loaded during the SCL initialization phase. For details about the common fields and their interpretation in "modparam.json", please refer to section 6.

    Note: When E_MI_MODULE_ID_SCL or its internal parameters are not configured, default values are used.


    1.7.3. API call flow

    Figure 1-15: API call flow

    The MI_SCL generic stream interface call is divided into the following steps:

    1. MI_SYS initialize

    2. Create MI_SCL Device

    3. Create MI_SCL Channel

    4. Set MI_SCL Channel parameter

    5. Start MI_SCL Channel

    6. Set MI_SCL Output port parameter

    7. Enable MI_SCL Output port

    8. Set MI_SCL Output port depth

    9. If MI_SCL has front and rear level modules, call the MI_SYS interface to bind MI_SCL with these modules

    10. The previous modules or SYS streams to SCL, SYS pulls streams from SCL, or SCL streams to the next stage

    11. If MI_SCL has front and rear level modules, call the MI_SYS interface to unbind MI_SCL with these modules

    12. Disable the enabled MI_SCL Output port

    13. Stop MI_SCL Channel

    14. Destroy MI_SCL Channel

    15. Destroy MI_SCL Device

    16. MI_SYS deinitialization


    1.8. Instance introduction

    This instance describes the initialization and deinitialization processes of the MI_SCL module.

    #include <stdio.h>
    #include <stdlib.h>
    #include <string.h>
    #include <signal.h>
    #include <unistd.h>
    
    #include "mi_common.h"
    #include "mi_common_datatype.h"
    #include "mi_sys.h"
    #include "mi_sys_datatype.h"
    #include "mi_scl.h"
    #include "mi_scl_datatype.h"
    
    #define ExecFuncIfSuccess(_func_,_ret_)                      \
        if((_func_)!=_ret_)                                      \
        {                                                        \
            printf("[ %d ] exec function is failed\n",__LINE__); \
            exit(-1);                                            \
        }                                                        \
        else                                                     \
        {                                                        \
            printf("[ %d ] exec function is success\n",__LINE__);\
        }
    
    MI_BOOL bExit = FALSE;
    
    MI_SCL_DEV g_SclDevId = 1;
    MI_SCL_CHANNEL g_SclChnId = 0;
    MI_SCL_PORT g_SclPortId = 0;
    
    MI_S32 scl_Init(void)
    {
        MI_SCL_DevAttr_t createDevAttr;
        MI_SCL_ChannelAttr_t sclChnAttr;
        MI_SCL_ChnParam_t sclChnParam;
        MI_SCL_OutPortParam_t sclOutPortParam;
    
        MI_SYS_ChnPort_t stChnPort;
        MI_SYS_WindowRect_t   stSCLOutCropRect;
        MI_SYS_WindowSize_t   stSCLOutputSize;
    
        memset(&createDevAttr, 0x0, sizeof(MI_SCL_DevAttr_t));
        memset(&sclChnAttr, 0x0, sizeof(MI_SCL_ChannelAttr_t));
        memset(&sclChnParam, 0x0, sizeof(MI_SCL_ChnParam_t));
        memset(&sclOutPortParam, 0x0, sizeof(MI_SCL_OutPortParam_t));
    
        memset(&stChnPort, 0x0, sizeof(MI_SYS_ChnPort_t));
        memset(&stSCLOutCropRect, 0x0, sizeof(MI_SYS_WindowRect_t));
        memset(&stSCLOutputSize, 0x0, sizeof(MI_SYS_WindowSize_t));
    
        createDevAttr.u32NeedUseHWOutPortMask = E_MI_SCL_HWSCL0;
        ExecFuncIfSuccess(MI_SCL_CreateDevice(g_SclDevId, &createDevAttr), MI_SUCCESS);
    
        ExecFuncIfSuccess(MI_SCL_CreateChannel(g_SclDevId, g_SclChnId, &sclChnAttr), MI_SUCCESS);
    
        sclChnParam.eRot = E_MI_SYS_ROTATE_NONE;
        ExecFuncIfSuccess(MI_SCL_SetChnParam(g_SclDevId, g_SclChnId, &sclChnParam), MI_SUCCESS);
    
        ExecFuncIfSuccess(MI_SCL_StartChannel(g_SclDevId, g_SclChnId), MI_SUCCESS);
    
        sclOutPortParam.stSCLOutCropRect = stSCLOutCropRect;
        sclOutPortParam.stSCLOutputSize = stSCLOutputSize;
        sclOutPortParam.bMirror = FALSE;
        sclOutPortParam.bFlip = FALSE;
        sclOutPortParam.eCompressMode = E_MI_SYS_COMPRESS_MODE_NONE;
        sclOutPortParam.stSCLOutputSize.u16Width = 1280;
        sclOutPortParam.stSCLOutputSize.u16Height = 720;
        sclOutPortParam.ePixelFormat = E_MI_SYS_PIXEL_FRAME_YUV_SEMIPLANAR_420;
        /*if E_MI_SCL_HWSCL2 use filter table 1
        * step1. setting modparam.json
        * {
        *     "bHvsp2Table1En" : true,    // E_MI_SCL_HWSCL2 table1
        *     "au8Hvsp2Table1FilePathV" : "/customer/fc66G1.00_SWLUT.txt",
        *     "au8Hvsp2Table1FilePathH" : "/customer/fc66G1.00_SWLUT.txt",
        * }
        * step2. set u8TableId and bEnable
        *      sclOutPortParam.stFilterTableAttr.bEnable = TRUE;
        *      sclOutPortParam.stFilterTableAttr.u8TableId = 1;
        */
        sclOutPortParam.stFilterTableAttr.bEnable = FALSE;
        sclOutPortParam.stFilterTableAttr.u8TableId = 0;
        ExecFuncIfSuccess(MI_SCL_SetOutputPortParam(g_SclDevId, g_SclChnId, g_SclPortId, &sclOutPortParam), MI_SUCCESS);
    
        ExecFuncIfSuccess(MI_SCL_EnableOutputPort(g_SclDevId, g_SclChnId, g_SclPortId), MI_SUCCESS);
    
        stChnPort.eModId = E_MI_MODULE_ID_SCL;
        stChnPort.u32DevId = g_SclDevId;
        stChnPort.u32ChnId = g_SclChnId;
        stChnPort.u32PortId = g_SclPortId;
        ExecFuncIfSuccess(MI_SYS_SetChnOutputPortDepth(0, &stChnPort, 0, 4), MI_SUCCESS);
    
        return MI_SUCCESS;
    }
    
    MI_S32 scl_unInit(void)
    {
        ExecFuncIfSuccess(MI_SCL_DisableOutputPort(g_SclDevId, g_SclChnId, g_SclPortId), MI_SUCCESS);
    
        ExecFuncIfSuccess(MI_SCL_StopChannel(g_SclDevId, g_SclChnId), MI_SUCCESS);
    
        ExecFuncIfSuccess(MI_SCL_DestroyChannel(g_SclDevId, g_SclChnId), MI_SUCCESS);
    
        ExecFuncIfSuccess(MI_SCL_DestroyDevice(g_SclDevId), MI_SUCCESS);
    
        return MI_SUCCESS;
    }
    
    void signalHandler(int signo)
    {
        printf("ctrl +c is input \n");
        bExit = TRUE;
        return;
    }
    
    int main(int argc, char** argv)
    {
        ExecFuncIfSuccess(MI_SYS_Init(0), MI_SUCCESS);
    
        ExecFuncIfSuccess(scl_Init(), MI_SUCCESS);
    
        //User defined streaming or extraction code snippets
    
        signal(SIGINT, signalHandler);
    
        while (!bExit)
        {
            sleep(1);
        }
    
        ExecFuncIfSuccess(scl_unInit(), MI_SUCCESS);
    
        ExecFuncIfSuccess(MI_SYS_Exit(0), MI_SUCCESS);
    }
    

    2. API REFERENCE


    This function module provides the following API:

    API Name Function
    MI_SCL_CreateDevice Create SCL device
    MI_SCL_DestoryDevice Destroy SCL device
    MI_SCL_CreateChannel Create SCL channel
    MI_SCL_DestroyChannel Destroy SCL channel
    MI_SCL_SetChnParam Set channel attribute
    MI_SCL_GetChnParam Get channel attribute
    MI_SCL_SetInputPortCrop Set channel input port crop
    MI_SCL_GetInputPortCrop Get channel input port crop information
    MI_SCL_StartChannel Start channel
    MI_SCL_StopChannel Stop channel
    MI_SCL_SetOutputPortParam Set output port parameter
    MI_SCL_GetOutputPortParam Get output port parameter
    MI_SCL_EnableOutputPort Enable output port
    MI_SCL_DisableOutputPort Disable output port
    MI_SCL_StretchBuf Zoom, stretch, crop the image data in the specified memory
    MI_SCL_StretchBufOsd Superimpose OsdBuf on the basis of Zoom, stretch, crop the image data in the specified memory

    2.1. MI_SCL_CreateDevice

    • Description

      Create SCL device.

    • Syntax

      MI_S32 MI_SCL_CreateDevice(MI_SCL_DEV DevId, MI_SCL_DevAttr_t *pstSclDevAttr)
      
    • Parameter

      Parameter name Description Input/Output
      DevId SCL device ID. Input
      pstSclDevAttr Scl device attribute. Input
    • Return value

      • MI_SUCCESS(0): successful.

      • Non-Zero: failed, see error code for details.

    • Dependence

      • Header: mi_scl_datatype.h, mi_scl.h

      • Library:

    • Note

      • For the characteristics of each device, please refer to Note in section 1.2.

    2.2. MI_SCL_DestroyDevice

    • Description

      Destroy SCL device.

    • Syntax

      MI_S32 MI_SCL_DestroyDevice(MI_SCL_DEV DevId)
      
    • Parameter

      Parameter name Description Input/Output
      DevId SCL device ID Input
    • Return value

      • MI_SUCCESS(0): successful.

      • Non-Zero: failed, see error code for details.

    • Dependence

      • Header: mi_scl_datatype.h, mi_scl.h

      • Library:

    • Note

      Disable all the output ports and channels on device, otherwise the failure will be returned.

    • Example

      See the example of MI_SCL_CreateDevice.

    • Related APIs

      MI_SCL_CreateDevice


    2.3. MI_SCL_CreateChannel

    • Description

      Create a SCL channel.

    • Syntax

      MI_S32 MI_SCL_CreateChannel(MI_SCL_DEV DevId, MI_SCL_CHANNEL ChnId, MI_SCL_ChannelAttr_t *pstChnAttr)
      
    • Parameter

      Parameter name Description Input/Output
      DevId SCL device ID Input
      ChnId SCL channel ID, value range (0 ~ 31) Input
      pstChnAttr SCL channel attribute Input
    • Return value

      • MI_SUCCESS(0): successful.

      • Non-Zero: failed, see error code for details.

    • Dependence

      • Header: mi_scl_datatype.h, mi_scl.h

      • Library:

    • Note

      Create device firstly, then channel can be created.

    • Example

      See the example of MI_SCL_CreateDevice.

    • Related APIs

      MI_SCL_DestroyChannel


    2.4. MI_SCL_DestroyChannel

    • Description

      Destroy SCL channel.

    • Syntax

      MI_S32 MI_SCL_DestroyChannel(MI_SCL_DEV DevId, MI_SCL_CHANNEL ChnId)
      
    • Parameter

      Parameter name Description Input/Output
      DevId SCL device ID Input
      ChnId SCL channel ID Input
    • Return value

      • MI_SUCCESS(0): successful.

      • Non-Zero: failed, see error code for details.

    • Dependence

      • Header: mi_scl_datatype.h, mi_scl.h

      • Library:

    • Note

      Disable all the output ports on device firstly, then the channel can be destroyed.

    • Example

      See the example of MI_SCL_CreateDevice.

    • Related APIs

      MI_SCL_CreateChannel


    2.5. MI_SCL_SetChnParam

    • Description

      Dynamically set channel parameters.

    • Syntax

      MI_S32 MI_SCL_SetChnParam(MI_SCL_DEV DevId, MI_SCL_CHANNEL ChnId, MI_SCL_ChnParam_t *pstChnParam)
      
    • Parameter

      Parameter name Description Input/Output
      DevId SCL device ID Input
      ChnId SCL channel ID Input
      pstChnParam Channel parameter Input
    • Return value

      • MI_SUCCESS(0): successful.

      • Non-Zero: failed, see error code for details.

    • Dependence

      • Header: mi_scl_datatype.h, mi_scl.h

      • Library:

    • Note

      • If the channel is running, use MI_SCL_StopChannel to stop it first and clear the buffer when you need to change the channel parameter.
      • When the channel sets rotation, it does not support crop, scaling, mirror, flip and pixel-change.
    • Example

      See the example of MI_SCL_CreateDevice.

    • Related APIs

      MI_SCL_GetChnParam


    2.6. MI_SCL_GetChnParam

    • Description

      Get channel parameter.

    • Syntax

      MI_S32 MI_SCL_GetChnParam(MI_SCL_DEV DevId, MI_SCL_CHANNEL ChnId, MI_SCL_ChnParam_t *pstChnParam)
      
    • Parameter

      Parameter name Description Input/Output
      DevId SCL device ID Input
      ChnId SCL channel ID Input
      pstChnParam SCL channel parameter Output
    • Return value

      • MI_SUCCESS(0): successful.

      • Non-Zero: failed, see error code for details.

    • Dependence

      • Header: mi_scl_datatype.h, mi_scl.h

      • Library:

    • Note

      When there is no setting, Parameter is all 0.

    • Related APIs

      MI_SCL_SetChnParam


    2.7. MI_SCL_SetInputPortCrop

    • Description

      Set channel input port crop area.

    • Syntax

      MI_S32 MI_SCL_SetInputPortCrop(MI_SCL_DEV DevId,MI_SCL_CHANNEL ChnId, MI_SYS_WindowRect_t *pstCropInfo)
      
    • Parameter

      Parameter name Description Input/Output
      DevId SCL device ID Input
      ChnId SCL channel ID Input
      pstCropInfo Crop area Input
    • Return value

      • MI_SUCCESS(0): successful.

      • Non-Zero: failed, see error code for details.

    • Dependence

      • Header: mi_scl_datatype.h, mi_scl.h

      • Library:

    • Note

      • This setting can only take effect when the Input port is reading data from DRAM.

      • When the input data compression mode is not E_MI_SYS_COMPRESS_MODE_NONE, the input data does not support cropping.

    • Example

      See the example of MI_SCL_CreateDevice.

    • Related APIs

      MI_SCL_GetInputPortCrop


    2.8. MI_SCL_GetInputPortCrop

    • Description

      Get channel input port crop area.

    • Syntax

      MI_S32 MI_SCL_GetInputPortCrop(MI_SCL_DEV DevId,MI_SCL_CHANNEL ChnId, MI_SYS_WindowRect_t *pstCropInfo)
      
    • Parameter

      Parameter name Description Input/Output
      DevId SCL device ID Input
      ChnId SCL channel ID Input
      pstCropInfo Crop area Output
    • Return value

      • MI_SUCCESS(0): successful.

      • Non-Zero: failed, see error code for details.

    • Dependence

      • Header: mi_scl_datatype.h, mi_scl.h

      • Library:

    • Note

      When no cropping is required, what you got is the input port resolution.

    • Related APIs

      MI_SCL_SetInputPortCrop


    2.9. MI_SCL_StartChannel

    • Description

      Start channel on device.

    • Syntax

      MI_S32 MI_SCL_StartChannel(MI_SCL_DEV DevId, MI_SCL_CHANNEL ChnId)
      
    • Parameter

      Parameter name Description Input/Output
      DevId SCL device ID Input
      ChnId SCL channel ID Input
    • Return value

      • MI_SUCCESS(0): successful.

      • Non-Zero: failed, see error code for details.

    • Dependence

      • Header: mi_scl_datatype.h, mi_scl.h

      • Library:

    • Note

      Called in pairs with MI_SCL_StopChannel.

    • Example

      See the example of MI_SCL_CreateDevice.

    • Related APIs

      MI_SCL_StopChannel


    2.10. MI_SCL_StopChannel

    • Description

      Stop channel on device.

    • Syntax

      MI_S32 MI_SCL_StopChannel(MI_SCL_DEV DevId, MI_SCL_CHANNEL ChnId)
      
    • Parameter

      Parameter name Description Input/Output
      DevId SCL device ID Input
      ChnId SCL channel ID Input
    • Return value

      • MI_SUCCESS(0): successful.

      • Non-Zero: failed, see error code for details.

    • Dependence

      • Header: mi_scl_datatype.h, mi_scl.h

      • Library:

    • Note

      All the channels can be stopped while creating, and then all the output ports will have no data output.

    • Example

      See the example of MI_SCL_CreateDevice.

    • Related APIs

      MI_SCL_StartChannel


    2.11. MI_SCL_SetOutputPortParam

    • Description

      Set channel output port parameter.

    • Syntax

      MI_S32 MI_SCL_SetOutputPortParam(MI_SCL_DEV DevId, MI_SCL_CHANNEL ChnId, MI_SCL_PORT PortId, MI_SCL_OutPortParam_t *pstOutPortParam)
      
    • Parameter

      Parameter name Description Input/Output
      DevId SCL device ID Input
      ChnId SCL channel ID Input
      PortId Output port ID Input
      pstOutPortParam Output port parameter Input
    • Return value

      • MI_SUCCESS(0): successful.

      • Non-Zero: failed, see error code for details.

    • Dependence

      • Header: mi_scl_datatype.h, mi_scl.h

      • Library:

    • Note

      • If the output port is enabled, and the output parameter need to be changed, you should call MI_SCL_DisableOutputPort to disable the port and set parameter, then restart the output port.

      • When VIF->ISP->SCL are all Realtime bindings, SCL Output setting Scaling up has the risk of FIFO FULL. It is not recommended to set Scaling up.

      • If E_MI_SYS_BIND_TYPE_HW_RING is bound to the next-level venc, the size of the buffer used is a whole buffer or an integer multiple of one buffer in any channel, when calling MI_SYS_ConfigPrivateMMAPool to configure the private pool, the parameter pstGlobalPrivPoolConf->uConfig.stpreDevPrivRingPoolConfig.u16RingLine must be at least two lines more than pstOutPortParam->stSCLOutputSize.u16Height. For example, pstGlobalPrivPoolConf->uConfig.stpreDevPrivRingPoolConfig.u16RingLine = pstOutPortParam->stSCLOutputSize.u16Height + 2. When the buffer size is a non-integer multiple of all channels, there is no such limitation.

    • Example

      See the example of MI_SCL_CreateDevice.

    • Related APIs

      MI_SCL_GetOutputPortParam


    2.12. MI_SCL_GetOutputPortParam

    • Description

      Get output port parameter.

    • Syntax

      MI_S32 MI_SCL_GetOutputPortParam(MI_SCL_DEV DevId, MI_SCL_CHANNEL ChnId, MI_SCL_PORT PortId, MI_SCL_OutPortParam_t *pstOutPortParam)
      
    • Parameter

      Parameter name Description Input/Output
      DevId SCL device ID Input
      ChnId SCL channel ID Input
      PortId SCL output port ID Input
      pstOutPortParam SCL output port parameter Output
    • Return value

      • MI_SUCCESS(0): successful.

      • Non-Zero: failed, see error code for details.

    • Dependence

      • Header: mi_scl_datatype.h, mi_scl.h

      • Library:

    • Related APIs

      MI_SCL_SetOutputPortParam


    2.13. MI_SCL_EnableOutputPort

    • Description

      Enable output port.

    • Syntax

      MI_S32 MI_SCL_EnableOutputPort(MI_SCL_DEV DevId,MI_SCL_CHANNEL ChnId, MI_SCL_PORT PortId)
      
    • Parameter

      Parameter name Description Input/Output
      DevId SCL device ID Input
      ChnId SCL channel ID Input
      PortId SCL output port ID Input
    • Return value

      • MI_SUCCESS(0): successful.

      • Non-Zero: failed, see error code for details.

    • Dependence

      • Header: mi_scl_datatype.h, mi_scl.h

      • Library:

    • Note

      Called in pair with MI_SCL_DisableOutputPort.

    • Example

      See the example of MI_SCL_CreateDevice.

    • Related APIs

      MI_SCL_DisableOutputPort


    2.14. MI_SCL_DisableOutputPort

    • Description

      Disable output port.

    • Syntax

      MI_S32 MI_SCL_DisableOutputPort(MI_SCL_DEV DevId,MI_SCL_CHANNEL ChnId, MI_SCL_PORT PortId)
      
    • Parameter

      Parameter name Description Input/Output
      DevId SCL device ID Input
      ChnId SCL channel ID Input
      PortId Output port ID Input
    • Return value

      • MI_SUCCESS(0): successful.

      • Non-Zero: failed, see error code for details.

    • Dependence

      • Header: mi_scl_datatype.h, mi_scl.h

      • Library:

    • Note

      Called in pair with MI_SCL_EnableOutputPort.

    • Example

      See the example of MI_SCL_CreateDevice.

    • Related APIs

      MI_SCL_EnableOutputPort


    2.15. MI_SCL_StretchBuf

    • Description

      Zoom, stretch, crop the image data in the specified memory.

    • Syntax

      MI_S32 MI_SCL_StretchBuf(MI_SCL_DirectBuf_t *pstSrcBuf, MI_SYS_WindowRect_t *pstSrcCrop, MI_SCL_DirectBuf_t *pstDstBuf, MI_SCL_FilterType_e eFilterType)
      
    • Parameter

      Parameter name Description Input/Output
      pstSrcBuf Source data buffer parameter pointer Input
      pstSrcCrop Source data crop area Input
      pstDstBuf Output buffer parameter pointer Output
      eFilterType Scl filter type Input
    • Return value

      • MI_SUCCESS(0): successful.

      • Non-Zero: failed, see error code for details.

    • Dependence

      • Header: mi_scl_datatype.h, mi_scl.h

      • Library:

    • Note

      • This interface is in blocking mode, and the frame of data will not end until it is finished.

      • Before using this interface, you need to set the corresponding DEVID. The corresponding DEVIDs used by different series of chips are as follows:

        Chip StretchBuf used DEVID
        Tiramisu MI_SCL_DEV_DIPR0
        Muffin MI_SCL_DEV_DIPR0
        Mochi MI_SCL_DEV_RDMA0
        Maruko MI_SCL_DEV_RDMA0
        Souffle MI_SCL_DEV_RDMA0
        Iford MI_SCL_DEV_RDMA0
        Ifado MI_SCL_DEV_RDMA0
        Pcupid MI_SCL_DEV_RDMA0
        Ifackel MI_SCL_DEV_RDMA0
        Ibopper MI_SCL_DEV_RDMA0
        Jaguar1 MI_SCL_DEV_RDMA0
        Ifliegen MI_SCL_DEV_RDMA0
        Ihalo MI_SCL_DEV_RDMA0
        Mhera MI_SCL_DEV_RDMA0
      • Alignment requirements for input width, height and stride:

        pixel format width height stride
        YUV420SPNV12, YUV420SPNV21, YUV422SP, Gray8 2 2 16
        YUV422YUYV, YUV422UYVY, YUV422YVYU, YUV422VYUY 2 2 16
        ARGB8888, ABGR8888, BGRA8888 2 2 16
      • Alignment requirements for output width and height:

        pixel format width height stride
        YUV420SPNV12, YUV420SPNV21, YUV422SP, Gray8 2 2 16
        YUV422YUYV, YUV422UYVY, YUV422YVYU, YUV422VYUY 2 2 16
        ARGB8888, ABGR8888, BGRA8888 2 2 16
      • StretchBuf used HWSCLID:

        Chip StretchBuf used HWSCL ID
        Tiramisu E_MI_SCL_HWSCL5
        Muffin E_MI_SCL_HWSCL8
        Mochi E_MI_SCL_HWSCL6
        Maruko E_MI_SCL_HWSCL3
        Souffle E_MI_SCL_HWSCL6
        Iford E_MI_SCL_HWSCL2
        Ifado E_MI_SCL_HWSCL2
        Pcupid E_MI_SCL_HWSCL0
        Ifackel E_MI_SCL_HWSCL2
        Ibopper E_MI_SCL_HWSCL0
        Jaguar1 E_MI_SCL_HWSCL1
        Ifliegen E_MI_SCL_HWSCL1
        Ihalo E_MI_SCL_HWSCL1
        Mhera E_MI_SCL_HWSCL0
    • Example

      MI_SCL_StretchBuf Usage:

      #define ALIGN_UP(x, align) (((x) + ((align) - 1)) & ~((align) - 1))
      
      int stretchBuffDemo()
      {
          MI_S32 s32Ret = 0;
          char *pInFilePath = "in.yuv";
          char *pOutFilePath = "out.yuv";
      
          MI_SCL_DirectBuf_t  stSrcBuff;
          memset(&stSrcBuff, 0x0, sizeof(MI_SCL_DirectBuf_t));
          stSrcBuff.u32Width = 1920;
          stSrcBuff.u32Height = 1080;
          stSrcBuff.ePixelFormat = E_MI_SYS_PIXEL_FRAME_YUV422_YUYV;
          stSrcBuff.u32Stride[0] = ALIGN_UP((stSrcBuff.u32Width*2),16);
          stSrcBuff.u32BuffSize = stSrcBuff.u32Stride[0]*stSrcBuff.u32Height;
      
          MI_SYS_WindowRect_t stoutputCrop;
          memset(&stoutputCrop, 0x0, sizeof(MI_SYS_WindowRect_t));
          stoutputCrop.u16X = 100;
          stoutputCrop.u16Y = 122;
          stoutputCrop.u16Width = 124;
          stoutputCrop.u16Height = 126;
      
          MI_SCL_DirectBuf_t  stDestBuff;
          memset(&stDestBuff, 0x0, sizeof(MI_SCL_DirectBuf_t));
          stDestBuff.u32Width = 100;
          stDestBuff.u32Height = 110;
          stDestBuff.ePixelFormat = E_MI_SYS_PIXEL_FRAME_YUV422_YUYV;
          stDestBuff.u32Stride[0] = ALIGN_UP((stDestBuff.u32Width*2),16);
          stDestBuff.u32BuffSize = stDestBuff.u32Stride[0]*stDestBuff.u32Height;
      
          void *pviraddr = NULL, *pviroutaddr = NULL;
          MI_PHY  phyInAllockAddr = 0, phyOutAllocAddr = 0;
      
          ExecFuncResult(MI_SYS_Init(0), s32Ret);
          ExecFuncResult(MI_SYS_MMA_Alloc(0, (MI_U8*)"mma_heap_name0", stSrcBuff.u32BuffSize, &phyInAllockAddr), s32Ret);
          ExecFuncResult(MI_SYS_Mmap(phyInAllockAddr, stSrcBuff.u32BuffSize, &pviraddr, FALSE), s32Ret);
          ExecFuncResult(MI_SYS_MMA_Alloc(0, (MI_U8*)"mma_heap_name0", stDestBuff.u32BuffSize, &phyOutAllocAddr), s32Ret);
          ExecFuncResult(MI_SYS_Mmap(phyOutAllocAddr, stDestBuff.u32BuffSize, &pviroutaddr, FALSE), s32Ret);
      
          stSrcBuff.phyAddr[0] = phyInAllockAddr;
          stDestBuff.phyAddr[0] = phyOutAllocAddr;
      
          FILE *src_fd = NULL;
          src_fd  = fopen(pInFilePath,"rb");
          fread(pviraddr, stSrcBuff.u32BuffSize, 1, src_fd);
          fclose(src_fd);
      
          MI_SCL_DEV DevId = 1;
          MI_SCL_DevAttr_t stDevAttr;
          stDevAttr.u32NeedUseHWOutPortMask = E_MI_SCL_HWSCL3;
          ExecFuncResult(MI_SCL_CreateDevice(DevId, &stDevAttr), s32Ret);
          ExecFuncResult(MI_SCL_StretchBuf(&stSrcBuff, &stoutputCrop, &stDestBuff, E_MI_SCL_FILTER_TYPE_AUTO), s32Ret);
      
          FILE *dst_fd = NULL;
          dst_fd  = fopen(pOutFilePath,"wb+");
          fwrite(pviroutaddr, stDestBuff.u32BuffSize, 1, dst_fd);
          fclose(dst_fd);
      
          ExecFuncResult(MI_SCL_DestroyDevice(DevId), s32Ret);
      
          MI_SYS_Munmap(pviraddr, stSrcBuff.u32BuffSize);
          MI_SYS_Munmap(pviroutaddr, stDestBuff.u32BuffSize);
          MI_SYS_MMA_Free(0,phyInAllockAddr);
          MI_SYS_MMA_Free(0,phyOutAllocAddr);
      
          EXIT:
      
          return MI_SUCCESS;
      
      }
      
    • Related APIs

      MI_SCL_CreateDevice


    2.16. MI_SCL_StretchBufOsd

    • Description

      Superimpose OsdBuf on the basis of Zoom, stretch, crop the image data in the specified memory.

    • Syntax

      MI_S32 MI_SCL_StretchBufOsd(MI_SCL_DirectBuf_t *pstSrcBuf,
      MI_SYS_WindowRect_t*pstSrcCrop,MI_SCL_DirectBuf_t *pstDstBuf,
      MI_SCL_DirectOsdBuf_t*pstDstOsdBuf,MI_SCL_FilterType_e eFilterType);
      
    • Parameter

      Parameter name Description Input/Output
      pstSrcBuf Source data buffer parameter pointer Input
      pstSrcCrop Source data crop area Input
      pstDstBuf Output buffer parameter pointer Output
      pstDstOsdBuf OsdBuf pointer superimposing on Output buffer Input
      eFilterType Scl filter type Input
    • Return value

      • MI_SUCCESS(0): successful.

      • Non-Zero: failed, see error code for details.

    • Dependence

      • Header: mi_scl_datatype.h, mi_scl.h

      • Library:

    • Note

      • Using this interface requires SCL to support OSD. Please refer to the MI RGN API for support.

      • Before using this interface, you need to create device first.

      • This interface is in blocking mode, and the frame of data will not end until it is finished.

      • The corresponding DEVIDs used by different series of chips are as follows:

        Chip StretchBuf used DEVID
        Tiramisu MI_SCL_DEV_DIPR0
        Muffin MI_SCL_DEV_DIPR0
        Mochi MI_SCL_DEV_RDMA0
        Maruko MI_SCL_DEV_RDMA0
        Souffle MI_SCL_DEV_RDMA0
        Iford MI_SCL_DEV_RDMA0
        Ifado MI_SCL_DEV_RDMA0
        Pcupid MI_SCL_DEV_RDMA0
        Ifackel MI_SCL_DEV_RDMA0
        Ibopper MI_SCL_DEV_RDMA0
        Jaguar1 MI_SCL_DEV_RDMA0
        Ifliegen MI_SCL_DEV_RDMA0
        Ihalo MI_SCL_DEV_RDMA0
        Mhera MI_SCL_DEV_RDMA0
      • Alignment requirements for input width, height and stride:

        pixel format width height stride
        YUV420SPNV12, YUV420SPNV21, YUV422SP, Gray8 2 2 16
        YUV422YUYV, YUV422UYVY, YUV422YVYU, YUV422VYUY 2 2 16
        ARGB8888, ABGR8888, BGRA8888 2 2 16
      • Alignment requirements for output width and height:

        pixel format width height stride
        YUV420SPNV12, YUV420SPNV21, YUV422SP, Gray8 2 2 16
        YUV422YUYV, YUV422UYVY, YUV422YVYU, YUV422VYUY 2 2 16
        ARGB8888, ABGR8888, BGRA8888 2 2 16
      • StretchBuf used HWSCLID:

        Chip StretchBuf used HWSCL ID
        Tiramisu E_MI_SCL_HWSCL5
        Muffin E_MI_SCL_HWSCL8
        Mochi E_MI_SCL_HWSCL6
        Maruko E_MI_SCL_HWSCL3
        Souffle E_MI_SCL_HWSCL6
        Iford E_MI_SCL_HWSCL2
        Ifado E_MI_SCL_HWSCL2
        Pcupid E_MI_SCL_HWSCL0
        Ifackel E_MI_SCL_HWSCL2
        Ibopper E_MI_SCL_HWSCL0
        Jaguar1 E_MI_SCL_HWSCL1
        Ifliegen E_MI_SCL_HWSCL1
        Ihalo E_MI_SCL_HWSCL1
        Mhera E_MI_SCL_HWSCL0
    • Related APIs

      MI_SCL_CreateDevice


    3. SCL DATA TYPE


    The video Input related data types are defined as follows:

    Data type Description
    MI_SCL_DEV SCL device ID
    MI_SCL_CHANNEL SCL channel ID
    MI_SCL_PORT SCL output port ID
    MI_SCL_HWSclId_e SCL output port corresponded hardware scaling ID
    MI_SCL_DevAttr_t SCL device attribute
    MI_SCL_ChannelAttr_t SCL channel static attribute
    MI_SCL_ChnParam_t SCL channel dynamic attribute
    MI_SCL_FilterTableAttr_t SCL Custom filter table attribute
    MI_SCL_OutPortParam_t SCL output port parameter
    MI_SCL_FilterType_e SCL filter type
    MI_SCL_DirectBuf_t SCL specified buffer parameter type
    MI_SCL_DirectOsdArgb1555Alpha_t Foreground and background Alpha settings of Argb1555 format
    MI_SCL_DirectOsdAlphaModePara_u The union of osd alpha mode parameters
    MI_SCL_DirectOsdAlphaMode_e The way to display with alpha mode
    MI_SCL_DirectOsdAlphaAttr_t The structure of the attribute of OSD ‘alpha’
    MI_SCL_DirectOsdInfo_t SCL direct processes Osdbuffer parameter Info
    MI_SCL_DirectOsdBuf_t SCL direct processes Osdbuffer parameter type
    MI_SCL_DEV_ISP_REALTIME0 SCL Device 0
    MI_SCL_DEV_RDMA0 SCL Device 1
    MI_SCL_DEV_VIF_REALTIME0 SCL Device 2
    MI_SCL_DEV_DIPR0 SCL Device 3
    MI_SCL_DEV_ISP_REALTIME1 SCL Device 4
    MI_SCL_DEV_RDMA2 SCL Device 5
    MI_SCL_DEV_VIF_REALTIME1 SCL Device 6
    MI_SCL_DEV_DIPR1 SCL Device 7
    MI_SCL_DEV_HVP_REALTIME0 SCL Device 8
    MI_SCL_DEV_VDEC_TILE SCL Device 9

    3.1. MI_SCL_DEV

    • Description

      Define SCL device ID type.

    • Definition

      typedef MI_U32 MI_SCL_DEV;
      

    3.2. MI_SCL_CHANNEL

    • Description

      Define SCL channel ID type.

    • Definition

      typedef MI_U32 MI_SCL_CHANNEL;
      

    3.3. MI_SCL_PORT

    • Description

      Define SCL output port ID type.

    • Definition

      typedef MI_U32 MI_SCL_PORT;
      

    3.4. MI_SCL_HWSclId_e

    • Description

      SCL device used hardware scaler Id enumeration.

    • Definition

      typedef enum
      {
          E_MI_SCL_HWSCLID_INVALID= 0,
          E_MI_SCL_HWSCL0         = 0x0001,
          E_MI_SCL_HWSCL1         = 0x0002,
          E_MI_SCL_HWSCL2         = 0x0004,
          E_MI_SCL_HWSCL3         = 0x0008,
          E_MI_SCL_HWSCL4         = 0x0010,
          E_MI_SCL_HWSCL5         = 0x0020,
          E_MI_SCL_HWSCL6         = 0x0040,
          E_MI_SCL_HWSCL7         = 0x0080,
          E_MI_SCL_HWSCL8         = 0x0100,
          E_MI_SCL_HWSCL_MAX      = 0xffff,
      }MI_SCL_HWSclId_e;
      
    • Note

      • For each HW scl id specification, please refer to HW sclid in Output specifications in Chapter 1.4, and select according to the scene.
    • Related data type and interface

      MI_SCL_DevAttr_t


    3.5. MI_SCL_DevAttr_t

    • Description

      SCL device attribute.

    • Definition

      typedef struct MI_SCL_DevAttr_s
      {
          MI_U32 u32NeedUseHWOutPortMask;
      }MI_SCL_DevAttr_t;
      
    • Member

      Member name Description
      u32NeedUseHWOutPortMask Scaler id used by device.
    • Note

      • u32NeedUseHWOutPortMask is composed of bit mask of MI_SCL_HWSclId_e.

        • Mapping with MI_SCL_HWSclId_e from low to high

        • The correspondence between portid and HWSCL ID on each Dev:

          stCreateDevAttr.u32NeedUseHWOutPortMask = E_MI_SCL_HWSCL2 | E_MI_SCL_HWSCL3 | E_MI_SCL_HWSCL4;

          Port0 → E_MI_SCL_HWSCL2

          Port1 → E_MI_SCL_HWSCL3

          Port2 → E_MI_SCL_HWSCL4

          PortID corresponds to HWSCL bitmask from least significant bit (LSB) to most significant bit (MSB)

      • The same HWSclId cannot be used across devices

        For example:

        MI_SCL_DEV_ISP_REALTIME0 pstSclDevAttr->u32NeedUseHWOutPortMask= E_MI_SCL_HWSCL2 | E_MI_SCL_HWSCL3;

        MI_SCL_DEV_RDMA0 pstSclDevAttr->u32NeedUseHWOutPortMask= E_MI_SCL_HWSCL0 | E_MI_SCL_HWSCL2;

        In this way, E_MI_SCL_HWSCL2 will be used by MI_SCL_DEV_ISP_REALTIME0 / MI_SCL_DEV_RDMA0 at the same time, and the err status will be returned when the device is created.

      • In Tiramisu, MI_SCL_DEV_DIPR0 will be created and used internally when MI_VDEC is used, and other device cannot use E_MI_SCL_HWSCL5 anymore, use the channel corresponding to MI_SCL_DEV_DIPR0 created by the user.

      • In Muffin, MI_SCL_DEV_DIPR0 will be created and used internally when MI_VDEC is used, and other device cannot use E_MI_SCL_HWSCL8 anymore, use the channel corresponding to MI_SCL_DEV_DIPR0 created by the user.

      • In Mochi, MI_SCL_DEV_RDMA0 will be created and used internally when MI_VDEC is used, and other device cannot use E_MI_SCL_HWSCL6 anymore, use the channel corresponding to MI_SCL_DEV_RDMA0 created by the user.

      • In Souffle, MI_SCL_DEV_DIPR0 will be created and used internally in MI_DISP, MI_SCL cannot use MI_SCL_DEV_DIPR0.

    • Related data type and interface

      MI_SCL_CreateDevice


    3.6. MI_SCL_ChannelAttr_t

    • Description

      Scl channel attribute.

    • Definition

      typedef struct MI_SCL_ChannelAttr_s
      {
          MI_U32 u32Reserved;
      }MI_SCL_ChannelAttr_t;
      
    • Member

      Member name Description
      u32Reserved Reserved.
    • Note

      Tiramisu has no channel static setting Parameter, which can be set directly to 0.

    • Related data type and interface

      MI_SCL_CreateChannel


    3.7. MI_SCL_ChnParam_t

    • Description

      SCL channel dynamic parameter type.

    • Definition

      typedef struct MI_SCL_ChnParam_s
      {
          MI_SYS_Rotate_e eRot;
      }MI_SCL_ChnParam_t;
      
    • Member

      Member name Description
      eRot Rotation Parameter
    • Note

      • When rotate 90/180/270 degree, output port only support rotation, do not support crop/scaling/pixel format conversion/Mirror/Filp.

      • When rotate 90/180/270 degree, MI_RGN attach is not supported to overlay osd/cover.

      • Chip support rotate situation:

        chip Support rotate devid
        Tiramisu MI_SCL_DEV_DIPR0
        Muffin MI_SCL_DEV_DIPR0
        Mochi Not support rotation
        Souffle Not support rotation
        Opera MI_SCL_DEV_DIPR1
        Iford Not support rotation
        Ifado Not support rotation
        Pcupid MI_SCL_DEV_RDMA0
        Ifackel MI_SCL_DEV_DIPR0
        Ibopper Not support rotation
        Jaguar1 MI_SCL_DEV_DIPR0
        Ifliegen Not support rotation
        Ihalo Not support rotation
        Mhera MI_SCL_DEV_RDMA0
      • Mochi/Souffle/Iford/Ifado/Ibopper only supports E_MI_SYS_ROTATE_NONE.

    • Related data type and interface

      MI_SCL_SetChnParam


    3.8. MI_SCL_FilterTableAttr_t

    • Description

      SCL Custom filter table attribute.

    • Definition

      typedef struct MI_SCL_FilterTableAttr_s
      {
          MI_BOOL bEnable;
          MI_U8   u8TableId;
      } MI_SCL_FilterTableAttr_t;
      
    • Member

      Member name Description
      bEnable enable the filter table corrsponding to the u8TableId
      u8TableId filter table id
    • Note

      Before using the filter table, the modparam.json file needs to be configured to load the corresponding filter table. The configuration method of modparam.json file refers to parameters bHvsp0Table0En, au8Hvsp0Table0FilePathV and au8Hvsp0Table0FilePathH in Section 6.2. For detailed usage, please refer to Section 1.8.

    • Related data type and interface

      MI_SCL_SetOutputPortParam


    3.9. MI_SCL_OutPortParam_t

    • Description

      SCL output port parameter.

    • Definition

      typedef struct MI_SCL_OutPortParam_s
      {
          MI_SYS_WindowRect_t stSCLOutCropRect;
          MI_SYS_WindowSize_t stSCLOutputSize;
          MI_BOOL bMirror;
          MI_BOOL bFlip;
          MI_SYS_PixelFormat_e ePixelFormat;
          MI_SYS_CompressMode_e eCompressMode;
          MI_SCL_FilterTableAttr_t stFilterTableAttr;
      }MI_SCL_OutPortParam_t;
      
    • Member

      Member name Description
      stSCLOutCropRect Output crop area
      stSCLOutputSize Output size
      bMirror Enable horizontal flip
      bFlip Enable vertical flip
      ePixelFormat Output pixel format
      eCompressMode Output compression format
      stFilterTableAttr Filter table attribute
    • Note

      • eCompressMode support range:

        Chip Supported compress mode
        Tiramisu E_MI_SYS_COMPRESS_MODE_NONE
        Muffin E_MI_SYS_COMPRESS_MODE_NONE
        Mochi E_MI_SYS_COMPRESS_MODE_NONE
        E_MI_SYS_COMPRESS_MODE_TO_6BIT
        Maruko E_MI_SYS_COMPRESS_MODE_NONE
        E_MI_SYS_COMPRESS_MODE_TO_6BIT
        E_MI_SYS_COMPRESS_MODE_IFC
        Souffle E_MI_SYS_COMPRESS_MODE_NONE
        E_MI_SYS_COMPRESS_MODE_TO_6BIT
        E_MI_SYS_COMPRESS_MODE_IFC
        Iford E_MI_SYS_COMPRESS_MODE_NONE
        Ifado E_MI_SYS_COMPRESS_MODE_NONE
        Pcupid E_MI_SYS_COMPRESS_MODE_NONE
        Ifackel E_MI_SYS_COMPRESS_MODE_NONE
        Ibopper E_MI_SYS_COMPRESS_MODE_NONE
        Jaguar1 E_MI_SYS_COMPRESS_MODE_NONE
        Ifliegen E_MI_SYS_COMPRESS_MODE_NONE
        Ihalo E_MI_SYS_COMPRESS_MODE_NONE
        Mhera E_MI_SYS_COMPRESS_MODE_NONE
        • eCompressMode limit

          Output_Compress 10TO6 IFC
          Pixel yuv420SP NV12 Y Y
          yuv422 YUYV Y N
          Pixel Alignment (WxH) yuv420SP NV12 2x2 2x2
          yuv422 YUYV 2x2 2x2
          bMirror N N
          bFlip Y N

        • E_MI_SYS_COMPRESS_MODE_IFC only supports one HW SclId at the same time.

      • Mochi/Maruko/Souffle/Iford/Ifado/Pcupid/Ibopper does not support to enable Mirror when ePixelFormat is YUV422_UYVY / YUV422_VYUY; and Pcupid does not support to enable Mirror when ePixelFormat is RGB565.

      • When binding to E_MI_SYS_BIND_TYPE_HW_RING VENC in the later stage of SCL, SCL does not support enabling Mirror/Flip and only supports ePixelFormat of E_MI_SYS_PIXEL_FRAME_YUV_SEMIPLANAR_420.

    • Related data type and interface

      MI_SCL_SetOutputPortParam


    3.10. MI_SCL_FilterType_e

    • Description

      Scl filter type.

    • Definition

      typedef enum
      {
          E_MI_SCL_FILTER_TYPE_AUTO,
          E_MI_SCL_FILTER_TYPE_BYPASS,
          E_MI_SCL_FILTER_TYPE_BILINEAR,
          E_MI_SCL_FILTER_TYPE_BICUBIC,
          E_MI_SCL_FILTER_TYPE_SELFDEFINED,
          E_MI_SCL_FILTER_TYPE_MAX,
      } MI_SCL_FilterType_e;
      
    • Member

      Member name Description
      E_MI_SCL_FILTER_TYPE_AUTO Automatic filter selection
      E_MI_SCL_FILTER_TYPE_BYPASS Without algorithm filter
      E_MI_SCL_FILTER_TYPE_BILINEAR Bilinear filter
      E_MI_SCL_FILTER_TYPE_BICUBIC Bicubic interpolation filter
      E_MI_SCL_FILTER_TYPE_SELFDEFINED Custom filter
      E_MI_SCL_FILTER_TYPE_MAX Maximum filter type
    • Note

      Choose the same filter type as the algorithm to get more accurate algorithm results.

    • Related data type and interface

      MI_SCL_StretchBuf


    3.11. MI_SCL_DirectBuf_t

    • Description

      SCL direct processes buffer parameter type.

    • Definition

      typedef struct MI_SCL_DirectBuf_s
      {
          MI_SYS_PixelFormat_e ePixelFormat;
          MI_U32 u32Width;
          MI_U32 u32Height;
          MI_PHY phyAddr[2];
          MI_U32 u32Stride[2];
          MI_U32 u32BuffSize;
      }MI_SCL_DirectBuf_t;
      
    • Member

      Member name Description
      ePixelFormat Buffer pixel format
      u32Width Effective pixel width
      u32Height Effective pixel height
      phyAddr Buffer physical address
      u32Stride Buffer number of bytes in a row
      u32BuffSize Buffer size
    • Related data type and interface

      MI_SCL_StretchBuf

      MI_SCL_StretchBufOsd


    3.12. MI_SCL_DirectOsdArgb1555Alpha_t

    • Description

      Argb1555 only has one bit to describe the alpha, which divides two settings, the foreground alpha with alpha bit equal '1' and background alpha with alpha bit equal '0'.

    • Definition

      typedef struct MI_SCL_DirectBufOsdArgb1555Alpha_s
      {
          MI_U8 u8BgAlpha;
          MI_U8 u8FgAlpha;
      } MI_SCL_DirectOsdArgb1555Alpha_t;
      
    • Member

      Member name Description
      u8BgAlpha The alpha value to display in background when alpha bit is 0. Value range: 0~0xFF.
      u8FgAlpha The alpha value to display in foreground when alpha bit is 1. Value range: 0~0xFF.
    • Related data type and interface

      MI_SCL_StretchBufOsd


    3.13. MI_SCL_DirectOsdAlphaModePara_u

    • Description

      The union of osd alpha mode parameters.

    • Definition

      typedef union
      {
          MI_SCL_DirectOsdArgb1555Alpha_t stArgb1555Alpha;
          MI_U8 u8ConstantAlpha;
      } MI_SCL_DirectOsdAlphaModePara_u;
      
    • Member

      Member name Description
      stArgb1555Alpha The setting of argb1555 format foreground and background alpha.
      u8ConstantAlpha The setting in constant alpha case, and value range is from 0 to 0xFF.
    • Related data type and interface

      MI_SCL_StretchBufOsd


    3.14. MI_SCL_DirectOsdAlphaMode_e

    • Description

      The way to display with alpha mode.

    • Definition

      typedef enum
      {
          E_MI_SCL_DIRECT_BUF_OSD_PIXEL_ALPHA = 0,
          E_MI_SCL_DIRECT_BUF_OSD_CONSTANT_ALPHT
      } MI_SCL_DirectOsdAlphaMode_e;
      
    • Member

      Member name Description
      E_MI_SCL_DIRECT_BUF_OSD_PIXEL_ALPHA OSD displays every pixel with alpha value, which can support by these color formats 'argb1555/argb4444/arbg8888/i2/i4/i8'. Rgb565 without alpha value does not make sense.
      E_MI_SCL_DIRECT_BUF_OSD_CONSTANT_ALPHT The hardware ignores the alpha value (if exist) from the pixel format, In fact it use the specified alpha value to take the place of the original alpha value of each pixel.
    • Related data type and interface

      MI_SCL_StretchBufOsd


    3.15. MI_SCL_DirectOsdAlphaAttr_t

    • Description

      The structure of the attribute of OSD 'alpha'.

    • Definition

      typedef struct MI_SCL_DirectOsdAlphaAttr_s
      {
          MI_SCL_DirectOsdAlphaMode_e   eAlphaMode;
          MI_SCL_DirectOsdAlphaModePara_u stAlphaPara;
      } MI_SCL_DirectOsdAlphaAttr_t;
      
    • Member

      Member name Description
      eAlphaMode The OSD alpha mode enum.
      stAlphaPara The parameters of alpha mode.
    • Related data type and interface

      MI_SCL_StretchBufOsd


    3.16. MI_SCL_DirectOsdInfo_t

    • Description

      SCL direct processes Osdbuffer parameter Info.

    • Definition

      typedef struct MI_SCL_DirectOsdInfo_s
      {
          MI_U32           u32X;
          MI_U32           u32Y;
          MI_U32           u32Width;
          MI_U32           u32Height;
          MI_PHY           phyAddr;
          MI_U32           u32Stride;
          MI_SCL_DirectOsdAlphaAttr_t stOsdAlphaAttr;
      } MI_SCL_DirectOsdInfo_t;
      
    • Member

      Member name Description
      u32X X-axis
      u32Y Y-axis
      u32Width Effective pixel width
      u32Height Effective pixel height
      phyAddr Buffer physical address
      u32Stride Buffer number of bytes in a row
      stOsdAlphaAttr Osd Alpha attribute.
    • Related data type and interface

      MI_SCL_StretchBufOsd


    3.17. MI_SCL_DirectOsdBuf_t

    • Description

      SCL direct processes Osdbuffer parameter type.

    • Definition

      typedef struct MI_SCL_DirectOsdBuf_s
      {
          MI_U8         u8OsdBufCnt;
          MI_SYS_PixelFormat_e  ePixelFormat;
          MI_SCL_DirectOsdInfo_t astOsdBuf[MI_SCL_DIRECT_OSD_CNT_MAX];
      } MI_SCL_DirectOsdBuf_t;
      
    • Member

      Member name Description
      u8OsdBufCnt the quantity of OSD image data
      ePixelFormat the pixfmt of OSD Buffer
      astOsdBuf OSD image data
    • Note

      • u8OsdBufCnt Effective interval is [0, MI_SCL_DIRECT_OSD_CNT_MAX].

        #define MI_SCL_DIRECT_OSD_CNT_MAX (8)
        
      • For ePixelFormat support scope, please refer to MI_RGN_AttachToChn in MI_RGN_API_V3.

    • Related data type and interface

      MI_SCL_StretchBufOsd


    3.18. MI_SCL_DEV_ISP_REALTIME0

    • Description

      SCL Device 0

    • Definition

      #define MI_SCL_DEV_ISP_REALTIME0 (0x0)
      

    3.19. MI_SCL_DEV_RDMA0

    • Description

      SCL Device 1

    • Definition

      #define MI_SCL_DEV_RDMA0         (0x1)
      

    3.20. MI_SCL_DEV_VIF_REALTIME0

    • Description

      SCL Device 2

    • Definition

      #define MI_SCL_DEV_VIF_REALTIME0 (0x2)
      

    3.21. MI_SCL_DEV_DIPR0

    • Description

      SCL Device 3

    • Definition

      #define MI_SCL_DEV_DIPR0         (0x3)
      

    3.22. MI_SCL_DEV_ISP_REALTIME1

    • Description

      SCL Device 4

    • Definition

      #define MI_SCL_DEV_ISP_REALTIME1 (0x4)
      

    3.23. MI_SCL_DEV_RDMA2

    • Description

      SCL Device 5

    • Definition

      #define MI_SCL_DEV_RDMA2 (0x5)
      

    3.24. MI_SCL_DEV_VIF_REALTIME1

    • Description

      SCL Device 6

    • Definition

      #define MI_SCL_DEV_VIF_REALTIME1 (0x6)
      

    3.25. MI_SCL_DEV_DIPR1

    • Description

      SCL Device 7

    • Definition

      #define MI_SCL_DEV_DIPR1 (0x7)
      

    3.26. MI_SCL_DEV_HVP_REALTIME0

    • Description

      SCL Device 8

    • Definition

      #define MI_SCL_DEV_HVP_REALTIME0 (0x8)
      

    3.27. MI_SCL_DEV_VDEC_TILE

    • Description

      SCL Device 9

    • Definition

      #define MI_SCL_DEV_VDEC_TILE (0x9)
      

    4. SCL ERROR CODE

    Video input APIs error code are as following.

    Error code Macro definition Description
    0XA0222000 MI_ERR_SCL_INVALID_DEVID Invalid device ID
    0XA0222001 MI_ERR_SCL_INVALID_CHNID Invalid channel ID
    0XA0222002 MI_ERR_SCL_INVALID_PORTID Invalid port ID
    0XA0222003 MI_ERR_SCL_ILLEGAL_PARAM Invalid parameter setting
    0XA0222004 MI_ERR_SCL_EXIST Device already exists
    0XA0222005 MI_ERR_SCL_UNEXIST Device already unexists
    0XA0222006 MI_ERR_SCL_NULL_PTR Input parameter null pointer error
    0XA0222007 MI_ERR_SCL_NOT_SUPPORT Operation not supported
    0XA0222008 MI_ERR_SCL_NOT_PERM Operation not allowed
    0XA0222009 MI_ERR_SCL_NOMEM Failed to allocate memory
    0XA022200a MI_ERR_SCL_NOBUF Buffer is full
    0XA022200b MI_ERR_SCL_BUF_EMPTY Buffer is empty
    0XA022200c MI_ERR_SCL_NOTREADY System is not initialized
    0XA022200d MI_ERR_SCL_BUSY System is busy

    5. PROCFS INTRODUCTION


    5.1. cat

    • Debug Information

      # cat /proc/mi_modules/mi_scl/mi_scl0
      

    • Debug Information Analysis

      Record the current use status and related attributes of the scaler, which can be dynamically obtained to facilitate debugging and testing.

    • Parameter Description

      Only SCL-specific fields are listed below. SYS-level common information (Common info / devpass pm status / CMDQ kickoff counter, etc.) in the proc output is not expanded here.

      Parameter Description
      module info InitCnt The count of connected module occurrence
      chip Chip index
      version Chip version
      UseSclMask The use status of scaler
      Device Info DevID Device ID
      refcnt The count of dev repeated creation
      src Input source
      sclmask Scaler id used by the device
      cmdq Cmdq pointer
      IrqEn IRQ enable status
      IrqMode IRQ mode
      Irqnum IRQ ID
      VsyncCnt ISR vsync Cnt
      crcFailCnt input crc check fail cnt
      FDCnt ISR Frame Done Cnt
      DropCnt IRQ Frame Drop or Double Vsync
      LdCnt Low Lantency Mode Match Line IRQ Cnt
      DVCnt double vsync cnt
      rstcnt reset hw cnt
      Channel Info DevId Device id
      ChnId Channel ID
      start Channel start or not
      Crop Channel Crop location
      Rot Rotation angle
      Size Input width/height
      pixel Input Pixel format
      compress input compress type
      Stride Input buffer stride
      Atom The count of buffers held by the bottom layer
      Atom0Cnt The count of times that the bottom layer cannot get buffer after buffer release
      PTMax/Cur Maximum hardware processing time/Current frame hardware processing time
      PreCnt/EnqCnt/BarCnt/checkin/
      checkout/DeqCnt
      The count of Callback interface execution
      MaxIv/MinIv callback execution interval
      DropCnt drop task cnt
      EnqOTNull The count that OutBuffer is Null while Enq
      Outputport Info DevId Device id
      ChnId Channel ID
      PortId Port ID
      sclid scaler ID
      bindtype 0: Real Time mode
      1: Ring mode
      2: frame mode
      Enable Enable status
      Pixel Output pixel format
      compress output compress type
      bMirr/flip Port mirror/flip
      PortCrop Port crop range
      OutputW/OutputH Output width/output height
      Histogram Scl Picture complexity
      MatchLine Low Lantency Mode Match Line Cnt
      Stride Output buffer stride, pixel byte
      GetCnt The count of outputbuffer to get
      FailCnt The count of outputbuffer failed to get
      FinishCnt The count of output buffer finished
      fps Output port frame rate


    5.2. echo

    Echo help can view available commands (output is printed to the serial console):

    # echo help > /proc/mi_modules/mi_scl/mi_sclx
    

    Note: In mi_sclx, x is the Device ID. For example, on Mhera platform, the node is mi_scl1.

    Function
    After finishing the bottom layer buffer, stop channel to trigger the bottem layer.
    Command echo stopchnl [chnid, ON/OFF] > /proc/mi_modules/mi_scl/mi_sclx
    Parameter
    Description
    Chnid: channel id
    ON/OFF: ON means stop channel, OFF means open channel
    Example echo stopchnl 0 ON > /proc/mi_modules/mi_scl/mi_sclx
    echo stopchnl 0 OFF > /proc/mi_modules/mi_scl/mi_sclx
    Function
    Dump the output data of the selected channel and save it in the /path.
    Command echo dumptaskfile [chnid, Cnt, /path/, bOnlyDumpResChange, bdumpport] > /proc/mi_modules/mi_scl/mi_sclx
    Parameter Description Chnid: Channel id
    Cnt: dump count. Please note that Cnt here is the count of dump images of inputport and outputport. If you need to dump images for both inputport and outputport, Cnt must be set to at least 2
    Path: The path where the dumped files are stored
    bOnlyDumpResChange: When switching resolutions, images may be distorted. The dump command and resolution switching operations are not easy to coordinate. You can set this parameter first, then switch the resolution. When the program recognizes it, it will dump the buffer after the resolution change. (Optional parameter)
    Bdumpport: Only dump a certain portid. The default is to dump all output ports. (Optional parameter)
    Example echo dumptaskfile 0 2 /tmp > /proc/mi_modules/mi_scl/mi_sclx
    Function
    Set pass atomvalue
    Command echo setatom [AtomValue] > /proc/mi_modules/mi_scl/mi_sclx
    Parameter
    Description
    AtomValue: The maximum number of buffers held by the driver.
    Example echo setatom 3 > /proc/mi_modules/mi_scl/mi_sclx
    PS: Sometimes the bottom layer is stuck, you can try to enlarge this atom, plug a buffer into the driver, and trigger again to see if it can be restored. Or when the frame is dropped, increase the atom to see if the frame can be full.
    Function
    Clear the input/output/done buffer of the specified channel port.
    Command echo clearbuf [chnid, portid, bClearInput, bClearoutput] > /proc/mi_modules/mi_scl/mi_sclx
    Parameter
    Description
    Chnid: channel id
    Portid: port id
    bClearInput: Clear input buffer
    bClearoutput: Clear output buffer
    Example echo clearbuf 0 0 1 0 > /proc/mi_modules/mi_scl/mi_sclx
    Function
    Set debug level
    Command echo debuglv [level] > /proc/mi_modules/mi_scl/mi_sclx
    echo debuglv [chnid][level] > /proc/mi_modules/mi_scl/mi_sclx
    Parameter
    Description
    Chnid: channel id
    Level:
    (1) When single parameter: 2:flow, 4:check irq done
    (2) When two parameters: 1:check buffer, 2:check loop, 4:check frame pts, 8:check fence done, 16:check func time, 32:check sidebandmsg
    Example echo debuglv 4 > /proc/mi_modules/mi_scl/mi_sclx //Open check irq done related MI print.
    echo debuglv 0 3 > /proc/mi_modules/mi_scl/mi_sclx //Open channel0 level3 print about buffer info and loop info.
    Function
    Set port enable or not
    Command echo enableport [chnid, portid, bEn] > /proc/mi_modules/mi_scl/mi_sclx
    Parameter
    Description
    Chnid: channel id
    Portid: port id
    bEn: 0:disable, 1:enable
    Example echo enableport 0 0 1 > /proc/mi_modules/mi_scl/mi_sclx
    Function
    Clear the buffer cached in Bind Q
    Command echo clearbindq [chnid bclear] > /proc/mi_modules/mi_scl/mi_sclx
    Parameter
    Description
    Chnid: channel id
    bclear: Whether to clear
    Example echo clearbindq 0 1 > /proc/mi_modules/mi_scl/mi_sclx //clear channel0 bindQ
    Clear channel0 bindQ.
    Sometimes the front end can't get the buffer, and it is found that scl BindQ is full. Judge whether scl takes the buffer fast enough. Clear bindQ to see if bindQ will be accumulated. If it is still accumulated, it means that the scl is not fast enough. If it is not increased, it means that the previous exception has been stuffed in and has not been consumed.
    Function
    Print the value lower than the setting frame rate.
    Command echo fpsth [chnid portid fpsint fpsfloat] > /proc/mi_modules/mi_scl/mi_sclx
    Parameter
    Description
    Chnid: channel id
    Portid: port id
    fpsint: Frame rate integer bits
    fpsfloat: Frame rate demical bits
    Example echo fpsth 0 0 30 30 > /proc/mi_modules/mi_scl/mi_sclx
    //Print the fps lower than 30.30 in channel0 port0.
    Function
    Set the print pts, print if it is exceeding PTS interval.
    Command echo ptsth [chnid portid ptsmininterval ptsmaxinterval] > /proc/mi_modules/mi_scl/mi_sclx
    Parameter
    Description
    Chnid: channel id
    Portid: port id
    ptsmininterval: pts interval min value
    ptsmaxinterval: pts interval max value
    Example echo ptsth 0 0 30000 40000 > /proc/mi_modules/mi_scl/mi_sclx
    // Values with PTS interval less than 30ms and more than 40ms in channel0 port0 are printed out.
    Function
    Reset SCL entire hardware.
    Command echo resethw [chnid ] > /proc/mi_modules/mi_scl/mi_sclx
    Parameter
    Description
    Chnid: channel id
    Example echo resethw 0 > /proc/mi_modules/mi_scl/mi_sclx
    Function
    Set output port parameters
    Command echo outputparam pixel [chnid, portid pixelmode] > /proc/mi_modules/mi_scl/mi_sclx
    echo outputparam compress [chnid, portid compressmode] > /proc/mi_modules/mi_scl/mi_sclx
    echo outputparam mirrorflip [chnid, portid bmirror bflip] > /proc/mi_modules/mi_scl/mi_sclx
    echo outputparam crop [chnid, portid cropX cropY cropW cropH] > /proc/mi_modules/mi_scl/mi_sclx
    echo outputparam size [chnid, portid sizeW sizeH] > /proc/mi_modules/mi_scl/mi_sclx
    echo outputparam all [chnid, portid pixelmode compressmode bmirror bflip cropX cropY cropW cropH sizeW sizeH] > /proc/mi_modules/mi_scl/mi_sclx
    Parameter
    Description
    Chnid: channel id
    Portid: port id
    Pixelmode: output pixel format
    Compressmode: ouput compress mode
    Bmirror: Ouput enable horizontal turn
    Bflip: Ouput enable vertical turn
    cropX: Output crop X coordinate
    cropY: Output crop Y coordinate
    cropW: Output crop width
    cropH: Output crop height
    sizeW: Output size width
    sizeH: Output size height
    Example echo outputparam pixel 0 0 11 > /proc/mi_modules/mi_scl/mi_sclx
    echo outputparam compress 0 0 5 > /proc/mi_modules/mi_scl/mi_sclx
    echo outputparam mirrorflip 0 0 1 1 > /proc/mi_modules/mi_scl/mi_sclx
    echo outputparam crop 0 0 0 0 1920 1080 > /proc/mi_modules/mi_scl/mi_sclx
    echo outputparam size 0 0 1920 1080 > /proc/mi_modules/mi_scl/mi_sclx
    echo outputparam all 0 0 11 5 1 1 0 0 1920 1080 1920 1080 > /proc/mi_modules/mi_scl/mi_sclx
    Function
    Set the crc of the output port.
    Command echo crcmode [chnid portid crcmode] > /proc/mi_modules/mi_scl/mi_sclx
    Parameter Description chnid: channel id
    Portid: port id
    crcmode: 0:not used, 1: used
    Example echo crcmode 0 1 1 > /proc/mi_modules/mi_scl/mi_sclx
    Function
    Set the bytewrite of the output port.
    Command echo bytewrite [chnid portid bEn offsetbyte] > /proc/mi_modules/mi_scl/mi_sclx
    Parameter Description chnid: channel id
    Portid: port id
    bEn: 0:disable, 1:enable
    offsetbyte: offset byte
    Example echo bytewrite 0 0 1 1 > /proc/mi_modules/mi_scl/mi_sclx
    Function
    Set the patengen of the input source.
    Command echo patengen [chnid bEn patengenmode] > /proc/mi_modules/mi_scl/mi_sclx
    Parameter Description chnid: channel id
    bEn: 0:disable, 1:enable
    patengenmode: 0:static, 1:dynamic
    Example echo patengen 0 1 0 > /proc/mi_modules/mi_scl/mi_sclx
    Function
    Set the command fetching information executed after cmdq timeout
    Command echo cmdqtimeout [bEn, keyword, cmdline, path] > /proc/mi_modules/mi_scl/mi_sclx
    Parameter
    Description
    bEn: 0:disable, 1:enable
    keyword: Commands executed
    cmdline: Executed string
    path: Information saving path
    Example echo cmdqtimeout 1 cat /proc/mi_modules/mi_isp/mi_scl0 /mnt/cmdqerr.txt > /proc/mi_modules/mi_isp/mi_scl0
    Function
    Set scl filter type.
    Command echo outputfilter [chnid, portid, filtertype] > /proc/mi_modules/mi_scl/mi_sclx
    Parameter
    Description
    Chnid: channel id
    Portid: port id
    filtertype: 0:auto, 1:bilinear, 2:bicubic
    Example echo outputfilter 0 0 1> /proc/mi_modules/mi_scl/mi_sclx
    Function
    Set cmdq delay time.
    Command echo cmdqdelay [time(ns)] > /proc/mi_modules/mi_scl/mi_sclx
    Parameter
    Description
    time: cmdq delay time (ns)
    Example echo cmdqdelay 100000 > /proc/mi_modules/mi_scl/mi_sclx
    Function
    Set double vsync drop enable.
    Command echo doublevsyncdrop [bEn] > /proc/mi_modules/mi_scl/mi_sclx
    Parameter
    Description
    bEn: 0:disable, 1:enable
    Example echo doublevsyncdrop 1 > /proc/mi_modules/mi_scl/mi_sclx
    Function
    Set ringlinecnt of each scl port.
    Command echo ringlinecnt [chnid portid ringlinecnt] > /proc/mi_modules/mi_scl/mi_sclx
    Parameter
    Description
    Chnid: channel id
    Portid: port id
    ringlinecnt: jpeg realtime sram ringbuffer linecnt
    Example echo ringlinecnt 0 0 540 > /proc/mi_modules/mi_scl/mi_sclx

    6. MODPARAM.JSON INTRODUCTION

    6.1. The json file content

    Note: When E_MI_MODULE_ID_SCL or its internal parameters are not configured, default values are used.

    Taking Ifackel as an example, different chips may have slight differences.

        {
            "E_MI_MODULE_ID_SCL" :
            {
                "u32MaxChnNum": "16",
                "bCmdqTimeOutDbgArray": "1",
                "u16CpuMaskAffinityArray": "0",
                "u32threadPriorityArray": "98",
                "u32PatMode": "0,0,0",
                "u32DevDbgLv": "0",
                "u8ChnDbgLv": "0",
                "bEnableTileModeArray": "0",
                "u16ByteWriteArray": "0",
                "u16FilterTypeArray": "0",
                "u16RingLineCntArray": "-1",
                "au8ChnMaxEnqTasks": "0",
                "scl_clk": "0"
            }
        }
    

    The modparam.json is under /config, when SCL is initialized, the json file will be loaded.


    6.2. SCL common paramaters and paramater description

    Parameter name Default value Supported chips Function
    u32MaxChnNum for chip Channel Number Maruko, Opera, Souffle and subsequent chips Set the maximum number of channels for scl, [0-U32MAX]
    bCmdqTimeOutDbgArray [true,true,true,true,true,true,true,true,true,true] Maruko, Opera, Souffle and subsequent chips Set whether to enable the reset debugging mechanism for each dev in scl, false (off), true (on). The array index corresponds to the dev id, and the array size should be the maximum dev id of scl + 1
    u16CpuMaskAffinityArray [0,0,0,0,0,0,0,0,0,0] Maruko, Opera, Souffle and subsequent chips Set the CPU affinity of each dev in scl, 0 (all CPUs), bit[0,3] corresponds to cpu[0,3]. The array subscript corresponds to the dev id, and the array size should be the maximum dev id of scl + 1
    u32threadPriorityArray [98,98,98,98,98,98,98,98,98,98] Maruko, Opera, Souffle and subsequent chips Set the priority of each dev thread of scl, [0-U32MAX]. The array subscript corresponds to the dev id, and the array size should be the maximum dev id of scl + 1
    u32PatMode [0,0,0] Maruko, Opera, Souffle and subsequent chips Set the scl dev pattern gen, and disable the patgen when the width or height is 0. Note that this parameter is a group of three, and the first parameter of each group represents the width, the second parameter represents the height, and the third parameter represents the patgen type. Currently, type supports the following settings: 0 (use the front module timing, image is static), 1 (use the front module timing, image is dynamic), 2 (use the scl internal timing, image is static), 3 (use the scl internal timing, image is dynamic)
    u32DevDbgLv [0,0] Maruko, Opera, Souffle and subsequent chips Set the scl dev log debugging level, [0-U32MAX]. Note that this parameter is a group of two, the first parameter of each group indicates the dev id, and the second parameter indicates the dev debug level to be set
    u8ChnDbgLv [0,0,0] Maruko, Opera, Souffle and subsequent chips Set the scl dev channel log debugging level, [0-U8MAX]. Note that this parameter is a group of three. The first parameter indicates the dev id, the second parameter indicates the channel id, and the third parameter indicates the channel debug level to be set.
    bEnableTileModeArray [false,false,false,false,false] Maruko, Opera, Souffle and subsequent chips Set whether the tile mode of each port of scl is enabled, false (off), true (on). The array subscript corresponds to the port id, and the array size should be the maximum port id of scl + 1
    u16ByteWriteArray [0,0,0,0,0] Maruko, Opera, Souffle and subsequent chips Set the bytewrite offset of each port of scl, [0-U16MAX]. The array subscript corresponds to the port id, and the array size should be the maximum port id of scl + 1
    u16FilterTypeArray [0,0,0,0,0] Maruko, Opera, Souffle and subsequent chips Set the filter type of each port in scl, 0 (automatic), 1 (Bilinear), 2 (Bicubic). The array subscript corresponds to the port id, and the array size should be the maximum port id of scl + 1
    u16RingLineCntArray See modparam.json Iford and subsequent chips Set the height of the RingBuf used by each port Realtime_JPEG or Realtime_H26X in scl, -1 (automatic), [0-OutSizeHeight]. The array index corresponds to the port id, and the array size should be the maximum port id of scl + 1
    u16RingMaxWidthArray See modparam.json Ifliegen and subsequent chips Set the width of the RingBuf used by each port Realtime_JPEG or Realtime_H26X in scl, -1 (automatic), [0-OutSizeWidth]. The array index corresponds to the port id, and the array size should be the maximum port id of scl + 1. If multiple channels with different output widths share the same port, the RingMaxWidth should be set to the maximum value among these output widths
    au8ChnMaxEnqTasks [0,0,2] Iford and subsequent chips Set the maximum number of enque tasks for scl channel, [0-U8Max]. Note that this parameter is a group of three. The first parameter of each group represents the dev id, the second parameter represents the channel id, and the third parameter represents the EnqueTaskCnt. In the example, the parameters represent dev0, channel0, and MaxEnqueCnt is set to 2
    scl_clk for chip default clk Iford and subsequent chips Set the scl clk gear, 0 (automatic), [0-MaxClk]. Note that only valid clock gears that meet the specifications of each chip can take effect here
    bEnable2LVScalingdown [false] Ifado Set whether to enable the 2 level scaling down function, false(off), true(on)
    u8HvspBypassEn 0 (Jaguar 1 and subsequent chips default to 1) Iford and subsequent chips Set whether to enable hvsp bypass function, 0(off), 1(on)
    bHvsp0Up false Iford, Ifado, Ifackel, Jaguar1 Set whether scl hvsp0 uses the filter table when image is scaling down or scaling up. false(scaling down), true(scaling up). Parameter hvsp0 correponds to E_MI_SCL_HWSCL0. If other HWSCL need to be configured, it needs to be modified accordingly.
    bHvsp0Table0En false Ihalo and subsequent chips Set whether to enable hvsp filter table function, false(off), true(on). If other HWSCL need to be configured, it needs to be modified accordingly. Scl can save up to four tables at most, and Tables 0 to 3 can be used.
    au8Hvsp0Table0FilePathV NULL Ihalo and subsequent chips Set the vertical filter table 0 file path of the scl hvsp0. The parameter hvsp0 correponds to E_MI_SCL_HWSCL0. If other HWSCL need to be configured, it needs to be modified accordingly. Scl can save up to four tables at most, and Tables 0 to 3 can be used.
    au8Hvsp0Table0FilePathH NULL Ihalo and subsequent chips Set the horizontal filter table 0 file path of the scl hvsp0. The parameter hvsp0 correponds to E_MI_SCL_HWSCL0. If other HWSCL need to be configured, it needs to be modified accordingly. Scl can save up to four tables at most, and Tables 0 to 3 can be used.