• ZCU106使用VCU TRD的MIPI的例子


    在ZCU106上,使用VCU TRD的MIPI的例子,可以从MIPI摄像头采取图像数据,并使用GStreamer推送到HDMI显示器上。

    echo -e "
    
    Xilinx CSI2 Rx Subsystem Information: "
    dmesg | grep -i "Xilinx CSI2 Rx Subsystem"
    
    # echo -e "
    
    v4l2 Device Information: "
    # v4l2-ctl --list-devices
    
    echo -e "
    
    Find Media Pipeline: "
    for m in /dev/media* ; do echo $m ; media-ctl -p -d $m | grep -B 3 /dev/video1 ; echo '-----------' ; done
    
    echo -e "
    
    Display Media Pipeline Information: "
    media-ctl -p -d /dev/media7
    
    echo -e "
    
    Find Controls for MIPI CSI-2 RX: "
    yavta -l /dev/v4l-subdev8
    
    echo -e "
    
    Update Controls for MIPI CSI-2 RX: "
    yavta -w '0x0098c981 4' /dev/v4l-subdev8
    yavta -l /dev/v4l-subdev8
    
    
    echo -e "
    
    Update the MIPI CSI-2 Rx Pipeline Formats: "
    #SONY IMX274 Sensor
    # VCU-TRD 2019.2, "IMX274":0
    # VCU-TRD 2020.1, "IMX274 3-001a"
    media-ctl -d /dev/media7 -V ""IMX274":0 [fmt:SRGGB8_1X8/1920x1080 field:none]"
    # VCU-TRD 2020.1, media-ctl -d /dev/media7 -V ""IMX274 3-001a":0 [fmt:SRGGB8_1X8/1920x1080 field:none]"
    #MIPI CSI2-Rx Subsystem
    media-ctl -d /dev/media7 -V ""a00f0000.mipi_csi2_rx_subsystem":0 [fmt:SRGGB8_1X8/1920x1080 field:none]"
    media-ctl -d /dev/media7 -V ""a00f0000.mipi_csi2_rx_subsystem":1 [fmt:SRGGB8_1X8/1920x1080 field:none]"
    #Demosaic IP
    media-ctl -d /dev/media7 -V ""a0250000.v_demosaic":0 [fmt:SRGGB8_1X8/1920x1080 field:none]"
    media-ctl -d /dev/media7 -V ""a0250000.v_demosaic":1 [fmt:RBG888_1X24/1920x1080 field:none]"
    #Gamma LUT IP
    media-ctl -d /dev/media7 -V ""a0270000.v_gamma_lut":0 [fmt:RBG888_1X24/1920x1080 field:none]"
    media-ctl -d /dev/media7 -V ""a0270000.v_gamma_lut":1 [fmt:RBG888_1X24/1920x1080 field:none]"
    #VPSS: Color Space Conversion (CSC) Only
    media-ctl -d /dev/media7 -V ""a0240000.v_proc_ss":0 [fmt:RBG888_1X24/1920x1080 field:none]"
    media-ctl -d /dev/media7 -V ""a0240000.v_proc_ss":1 [fmt:RBG888_1X24/1920x1080 field:none]"
    #VPSS: Scaler Only with CSC
    media-ctl -d /dev/media7 -V ""a0200000.v_proc_ss":0 [fmt:RBG888_1X24/1920x1080 field:none]"
    # VCU-TRD 2019.2, Failed to set VYYUYY8_1X24
    # VCU-TRD 2020.1, Success to set VYYUYY8_1X24
    media-ctl -d /dev/media7 -V ""a0200000.v_proc_ss":1 [fmt:VYYUYY8_1X24/1920x1080 field:none]"
    
    echo -e "
    Check the MIPI CSI-2 Rx Pipeline Formats: "
    media-ctl -p -d /dev/media7
    
    
    echo -e "
    
    Find Controls for CSC: "
    yavta -l /dev/v4l-subdev11
    
    echo -e "
    Update CSC Settings to improve colors: "
    yavta -w '0x0098c9a1 80' /dev/v4l-subdev11
    yavta -w '0x0098c9a2 55' /dev/v4l-subdev11
    yavta -w '0x0098c9a3 35' /dev/v4l-subdev11
    yavta -w '0x0098c9a4 24' /dev/v4l-subdev11
    yavta -w '0x0098c9a5 40' /dev/v4l-subdev11
    
    echo -e "
    
    Verify Controls for CSC: "
    yavta -l /dev/v4l-subdev11
    
    echo -e "
    List Video Frames format: "
    yavta --enum-formats /dev/video1
    
    echo -e "
    Use Yavta to dump frames: "
    yavta -n 3 -c10 -f NV12 -s 1920x1080 --skip 7 -F /dev/video1
    
    echo -e "
    Check and set HDMI Monitor: "
    ls -l /dev/dri/by-path/ | grep mix
    modetest -D a0070000.v_mix | grep -C8 Connectors
    modetest -D a0070000.v_mix -s 41:1920x1080-30@BG24
    
    echo -e "
    Use GStreamer to send the output to HDIM Tx Subsystem for display on HDMI Monitor: "
    gst-launch-1.0 v4l2src device=/dev/video1 
    ! video/x-raw, width=1920, height=1080, framerate=60/1 ! queue 
    ! kmssink bus-id=a0070000.v_mix
    
    echo -e "
    Done."
    

      

    参考文档

    Zynq UltraScale+ MPSoC VCU TRD - Debugging - MIPI CSI-2 Rx Capture Pipeline

    https://xilinx-wiki.atlassian.net/wiki/spaces/A/pages/174719104/Zynq+UltraScale+MPSoC+VCU+TRD+-+Debugging+-+MIPI+CSI-2+Rx+Capture+Pipeline

  • 相关阅读:
    数组中的逆序对 --剑指offer
    第一个只出现一次的字符 --剑指offer
    丑数 --剑指offer
    把数组排成最小的数 --剑指offer
    整数中1出现的次数 --剑指offer
    最小的k个数 --剑指offer
    数组中出现次数超过一半的数字 --剑指offer
    redis击穿,穿透,雪崩,分布式锁,api(jedis,luttuce)
    Java创建数据库新建表及初始化表
    generatorConfig.xml自动生成实体类,dao和xml
  • 原文地址:https://www.cnblogs.com/hankfu/p/13386700.html
Copyright © 2020-2023  润新知