NOTICE: The Processors Wiki will End-of-Life on January 15, 2021. It is recommended to download any files or other content you may need that are hosted on processors.wiki.ti.com. The site is now set to read only.

Template:Glsdk VIP VPE

From Texas Instruments Wiki
Jump to: navigation, search

|

Running VIP/VPE/CAL application[edit]

Video Input Port[edit]

Video Input Port is used to capture video frames from BT56/ BT601 Camera. Currently the VIP driver supports following features.


For more information on VIP driver and other features, please refer to http://processors.wiki.ti.com/index.php/Processor_SDK_VIP_Driver

  • Standard V4L2 capture driver
  • Supports single planar buffers
  • Supports MMAP buffering method
  • Supports DMABUF based buffering method
  • Supports V4L2 endpoint standard way of specifying camera nodes
  • Supports captures upto 60FPS
  • Multi instance capture - All slices, ports supported
  • Capture from a YUYV camera(8bit)
  • NV12 capture format

Camera Adapter Layer[edit]

Camera Adapter Layer is used to capture video from CSI Camera. Currently the CAL driver supports following features.

  • Standard V4L2 capture driver
  • Supports single planar buffers
  • Supports MMAP buffering method
  • Supports DMABUF based buffering method
  • Supports V4L2 endpoint standard way of specifying camera nodes (CSI bindings)
  • Multi instance capture - 4data lane phy0 + 2data lane phy1

Supported cameras[edit]

Camera Adapter Layer is used to capture video from CSI Camera. Currently the CAL driver supports following features. Processor SDK Linux Automotive release supports following sensors/cameras/video inputs:-

  • OV10633 sensor - YUYV sensor connected on J6 EVM
  • OV10635 sensor - YUYV sensor on Vision board
  • OV10635 sensor - YUYV sensor connected through LVDS
  • TVP5158 decoder - Support for decoding single channel analog video
  • OV10640/OV490 - 720p CSI2 raw camera connected to OV490 ISP in YUYV format

Processor SDK supports following sensors/cameras

  • mt9t111 camera sensor


  Note: This release of PSDKLA with kernel 4.19, supports only OV10633 sensor.
        OV10635 sensor capture on Vision Board and LVDS Capture are supported with VisionSDK v3.8. 
        FPDLink serializer and deserializer support is also not available with this release.
        JAMR board support is not validated with this release
        CSI2 capture not validated with this release


Running dmabuftest[edit]

dmabuftest is a user space application which demonstrates capture display loopback. It can support multiple captures at the same time

Video buffers are allocated by libdrm and they are shared to VIP through dmabuf.

It interfaces with the VIP through standard v4l2 ioctls.

Filesystem from release has dmabuftest app preinstalled.

To capture and display on the LCD screen, run following command

target# dmabuftest -s 4:800x480 -d /dev/video1 -c 1280x720@YUYV
target# dmabuftest -s 16:800x480 -d /dev/video1 -c 1280x720@YUYV


To capture and display on the HDMI display, run following command

target# dmabuftest -s 32:1920x1200 -d /dev/video1 -c 1280x720@YUYV
target# dmabuftest -s 4:1920x1080 -d /dev/video1 -c 1280x720@YUYV


To capture video in NV12 format, run following command

target# dmabuftest -s 32:1920x1200 -d /dev/video1 -c 1280x720@NV12
target# dmabuftest -s 16:800x480 -d /dev/video1 -c 1280x720@NV12


To capture and display on KMScube backend (Video on a rotating cube), run following command

target# dmabuftest --kmscube --fov 20 -d /dev/video1 -c 1280x720@YUYV
This feature is currently not supported

To capture and display on wayland backend (Video in a wayland client window), run following command

target# dmabuftest -w 640x480 --pos 100x400 /dev/video1 -c 1280x720@YUYV


Capturing from OV10633 onboard camera[edit]

Linux kernel driver for OV1063x cameras support OV10633 sensor.

Video capture can be verified from the OV10633 sensor as follows

  • Connect OV10633 sensor to the Leopard Imaging port on the J6 EVM
  • Reboot the board and enable i2c2 as given above
  • I2C device on Bus 2 slave address 0x37 should be probed successfully
  • VIP should register a V4L2 video device (e.g. /dev/video1) using this i2c device
  • Run dmabuftest with '1280x720@YUYV' as capture format
Capturing from OV10635 Vision board camera[edit]

Linux kernel driver for OV1063x cameras support OV10635 sensor.

Video capture can be verified from the OV10635 sensor as follows

  • Connect OV10635 sensor to the OVcam port on the Vision board
  • Change the SW3 switch setting on Vision board as SW3[1-8] = 01010101
  • Reboot the board and enable i2c2 as given above
  • I2C device on Bus 2 slave address 0x30 should be probed successfully
  • VIP should register a V4L2 video device (e.g. /dev/video1) using this i2c device
  • Run dmabuftest with '1280x720@YUYV' as capture format
Capturing through TVP decoder[edit]

Linux kernel supports TVP5158 NTSC/PAL decoder.

TVP5158 decoder is a TI chip which can decode upto 4 channels of NTSC/PAL analog video and multiplex it.

Video capture from 1 channel TVP5158 can be verified as follows.

  • Connect analog camera to the Vin1 port of the JAMR3 board
  • Change the SW2 switch setting on JAMR board as SW2[1-2] = [OFF, ON] - This is to select i2c4 for the IO expander
  • Reboot the board and enable i2c2 as given above
  • I2C device on Bus 2 slave address 0x58 should be probed successfully
  • VIP should register a V4L2 video device (e.g. /dev/video1) using this i2c device
  • Run dmabuftest with capture format of the analog camera (e.g. '720x240@YUYV')
Capturing through LVDS camera[edit]

LVDS camera is also a camera connected through a serializer and deserializer

Linux kernel has driver for FPDlink serializers and deserializers

For interfacing every LVDS camera with J6, an I2C slave for ser, deser and camera is needed. By default, all of the device tree nodes are disabled.

Following table shows mapping between all LVDS cameras on multi deserializer duaghter card for Vision Board.

LVDS camera    Camera address alias    Serializer address alias    Derializer address    VIP port
cam1           0x38                    0x74                        0x60                  Vin1a(VIP1 slice0 port A)
cam2           0x39                    0x75                        0x64                  Vin2a(VIP1 slice1 port A)
cam3           0x3A                    0x76                        0x68                  Vin3a(VIP2 slice0 port A)
cam4           0x3B                    0x77                        0x6C                  Vin5a(VIP3 slice0 port A)
cam5           0x3C                    0x78                        0x61                  Vin4b(VIP2 slice1 port B)
cam6           0x3D                    0x79                        0x69                  Vin6a(VIP3 slice1 port A)

Video capture from LVDS camera can be verified as follows.

  • Connect a LVDS camera to cam1/2/3/4 port of Multides board.
  • Change the SW3 switch setting on Vision board as SW3[1-8] = 00100101
  • I2C device on Bus 2 slave address (e.g. 0x38 for cam1) should be probed successfully
  • VIP should register a V4L2 video device (e.g. /dev/video1) using this i2c device
  • Run dmabuftest with '1280x720@YUYV' as capture format


Capturing through OV10640/OV490 CSI camera/ISP[edit]

Linux kernel supports CSI capture from OV10640 RAW camera and OV490 ISP.

CAL works on the CSI2 protocol and supports both raw and YUYV capture. It is verified with the OV10640 raw camera and OV490 ISP. TI-EVM has support for capturing via two CSI phys. - phy0 (4data lanes) and phy1 (2data lanes)

Video capture from OV490 can be verified as follows.

  • Connect OV10640 camera to the OV490 board
  • Connect the OV490 board to the TI-EVM via the CSI2 dual 490 adaptor board
  • I2C device on Bus 4 slave address 0x24 should be probed successfully
  • VIP should register a V4L2 video device (e.g. /dev/video1) using this i2c device
  • Run dmabuftest with capture format of the analog camera (e.g. '1280x720@YUYV')

Video Processing Engine(VPE)[edit]

VPE supports Scalar, Colour Space Conversion and Deinterlace.It uses V4L2 mem2mem API.

Supported Input formats: nv12, yuyv, uyvy

Supported Output formats: nv12, yuyv, uyvy, rgb24, bgr24, argb24, abgr24

Not Supported formats: yuv444, yvyu, vyuy, nv16, nv61, nv21

File to File[edit]
 test-v4l2-m2m

 Usage:
 <SRCfilename> <SRCWidth> <SRCHeight> <SRCFormat> <DSTfilename> <DSTWidth> <DSTHeight> <DSTformat> <interlace> <translen>

Note:

<interlace> : set 1, If input is interlaced and want deinterlaced(progressive) output. output height should be twice of input height.


Deinterlace(DI):-

target# test-v4l2-m2m /dev/video0 frame-176-144-nv12-inp.yuv 176 144 nv12 progressive_output.nv12 176 288 nv12 1 1

Scalar(SC):-

target# test-v4l2-m2m /dev/video0 frame-176-144-nv12-inp.yuv 176 144 nv12 frame-1920-1080-nv12-out.nv12 1920 1080 nv12 0 1

Colour Space Conversion(CSC):-

target# test-v4l2-m2m /dev/video0 frame-720-240-yuyv-inp.yuv 720 240 yuyv frame-720-240-argb32-out.argb32 720 240 argb32 0 1

SC+CSC+DI:-

target# test-v4l2-m2m /dev/video0 frame-720-240-yuyv-inp.yuv 720 240 yuyv frame-1920-1080-rgb24-dei-out.rgb24 1920 1080 rgb24 1 1
File to Display[edit]
 filevpedisplay

 Usage:
 <src_filename> <src_w> <src_h> <src_format> <dst_w> <dst_h> <dst_format> <top> <left> <w> <h> <inter> <trans> -s <conn_id>:<mode>


Input without crop:

target# filevpedisplay frame-176-144-nv12-inp.yuv 176 144 nv12 800 480 yuyv 0 0 176 144 0 1 -s 4:800x480

Input with crop:

target# filevpedisplay frame-176-144-nv12-inp.yuv 176 144 nv12 800 480 yuyv 16 32 128 128 0 1 -s 4:800x480


Input without crop:

target# filevpedisplay frame-176-144-nv12-inp.yuv 176 144 nv12 800 480 yuyv 0 0 176 144 0 1 -s 16:800x480

Input with crop:

target# filevpedisplay frame-176-144-nv12-inp.yuv 176 144 nv12 800 480 yuyv 16 32 128 128 0 1 -s 4:1280x720


VIP-VPE-Display[edit]

Camera captures the frames, which are processed by VPE(SC, CSC, Dei) then displays on LCD/HDMI.

 capturevpedisplay

 Usage:
 <src_w> <src_h> <src_format> <dst_w> <dst_h> <dst_format> <inter> <trans> -s <conn_id>:<mode>


target# capturevpedisplay 640 480 yuyv 320 240 uyvy 0 1 -s 4:640x480


target# capturevpedisplay 640 480 yuyv 320 240 uyvy 0 1 -s 4:1280x720