/
Zynq UltraScale+ MPSoC VCU TRD 2021.2 - YUV444 Video Capture and Display

Zynq UltraScale+ MPSoC VCU TRD 2021.2 - YUV444 Video Capture and Display

This page provides all the information related to the VCU TRD YUV444 design.

This is a beta release and will be included in the future TRD releases as an additional design module. Also note that this page stands alone and does not rely on the common VCU TRD “Build and Run Flow” page.

Table of Contents

1 Overview

This module enables the capture of YUV444 8-bit and 10-bit video from HDMI-RX . The video can be displayed on HDMI-TX or DisplayPort and recorded on SD cards or USB/SATA drives. The module can stream-in or stream-out encoded data through an Ethernet interface. This module supports up to single-stream 4kp30 YU24 and XV30 format.

Xilinx Zynq UltraScale+ VCU HW does not support YUV444 encode/decode processing. Only YUV 4:0:0, 4:2:0 and 4:2:2 sub-sampling modes are supported. This feature enables encoding yuv444p (single planar) video frames using VCU, reading them as YUV4:0:0 of Width x 3*Height buffer. Similar at decoder side, VCU Decoder output Width x 3*Height YUV4:0:0 raw video frame but display will treat that buffers YUV444 planar buffer. This feature also includes enhancing FB_RD, FB_WR IP/Drivers and V4l2 and DRM frameworks to support YUV444 planar buffer format.

This design supports the following video interfaces:

Sources:

  • HDMI-RX capture pipeline implemented in the PL.

  • File source (SD card, USB storage, SATA hard disk).

  • Stream-In from network or internet.

Sinks:

  • HDMI-TX display pipeline implemented in the PL.

  • DP display pipeline implemented in the PL.

  • Stream-out to network or internet

VCU Codec:

  • Video Encode/Decode capability using VCU hard block in the PL 

    • AVC/HEVC encoding

    • Encoder/decoder parameter configuration.

Video format:

  • YU24

  • XV30

Supported Resolutions:

The table below provides the supported resolutions from the command line app only in this design.

Resolution

Command Line

Single Stream

Multi-stream

4kp60

x

x

4kp30

x

1080p60

x

√ - Supported
x – Not supported

The below table gives information about the features supported in this design. 

Pipeline

Input source

Format

Output Type

Resolution

VCU codec

Pipeline

Input source

Format

Output Type

Resolution

VCU codec

Capture → Display (Pass-through)

HDMI-RX

YU24/XV30

HDMI-TX/DP

4kp30

None

Record/ Stream-Out pipeline

HDMI-RX

YU24/XV30

File Sink/ Stream-Out

4kp30

HEVC/AVC

File/ Streaming Playback pipeline

File Source/ Stream-In

YU24/XV30

HDMI-TX/DP

4kp30

HEVC/AVC

Serial pipeline is not supported in this beta release.

The below figure shows the zcu106 YUV444 design hardware block diagram.

The below figure shows the zcu106 YUV444 design software block diagram.

2 Hardware and Software Tools

2.1 Hardware Tools

Required:

  • ZCU106 evaluation board (rev C/D/E/F/1.0) with power cable

  • YUV444 10-bit supported Monitor with DisplayPort/HDMI input supporting up to 3840x2160p30 resolution

  • Display Port cable (DP certified)

  • HDMI cable 2.0 certified

  • Class-10 SD card

  • HDMI Receiver - NVIDIA SHIELD / NVIDIA SHIELD Pro for YUV444 8-bit video capture

  • HDMI Receiver - MI-BOX for YUV444 10-bit video capture

  • Ethernet cable for streaming use-cases

Optional:

  • USB pen drive formatted with the FAT32 file system and hub

  • SATA drive formatted with the FAT32 file system, external power supply, and data cable

2.2 Software Tools

Required:

2.3 Download, Installation, and Licensing

The Vivado Design Suite User Guide explains how to download and install the Vivado Design Suite tools, which include the Vivado Integrated Design Environment (IDE), High-Level Synthesis tool, and System Generator for DSP. This guide also provides information about licensing and administering evaluation and full copies of Xilinx design tools and intellectual property (IP) products. The Vivado Design Suite can be downloaded from here.

LogiCORE IP Licensing:

The following IP cores require a license to build the design.

  • Video Timing Controller (VTC) - Included with Vivado - PG016

  • Video Mixer - Included with Vivado - PG243

  • Video PHY Controller - Included with Vivado - PG230

  • HDMI-RX/TX Subsystem - Purchase license (Hardware evaluation available) - PG235 & PG236

  • Video Processing Subsystem (VPSS) - Included with Vivado - PG231

  • XDMA - Included with Vivado - PG195

To obtain the LogiCORE IP license, please visit the respective IP product page and get the license.

Note: Hardware Evaluation keys allow you to simulate and implement your design, run timing analysis and generate a time-limited bitstream to program a Xilinx FPGA. The core in the programmed device will function in hardware for anywhere from 2 to 8 hours, depending on the core.

3 Board Setup

The below section will provide the information on the ZCU106 board setup for running the TRD.

  1. Connect the Micro USB cable into the ZCU106 Board Micro USB port J83, and the other end into an open USB port on the host PC. This cable is used for UART over USB communication.

  2. Insert the SD card with the images copied into the SD card slot J100. Please find here how to prepare the SD card for a specific design.

  3. Set the SW6 switches as shown in the below Figure. This configures the boot settings to boot from SD.

  4. Connect 12V Power to the ZCU106 6-Pin Molex connector.

  5. Connect one end of the Display Port (DP) cable to the board’s U129 connector and the other end to the DP port of the 4K monitor.

  6. Connect one end of the HDMI cable to the board’s P7 stacked HDMI connector (lower port) and another end to the HDMI source in case of a HDMI design.

  7. Connect one end of the HDMI cable to the board’s P7 stacked HDMI connector (upper port) and another end to the HDMI monitor in case of a HDMI design.

    • Note: It is highly recommended to disconnect DP or HDMI cable whenever not in used. Using both simultaneously might lead to unexpected behaviors.

  8. For a USB storage device, connect the USB hub along with the mouse. (Optional)

  9. For a SATA storage device, connect the SATA data cable to the SATA 3.0 port. (Optional)

  10. Set up a terminal session between a PC COM port and the serial port on the evaluation board (See Determine which COM to use to access the USB serial port on the ZCU106 board for more details)

  11. Copy YUV444 images into the SD card and insert the SD card on the board.

  12. The below images will show how to connect interfaces on the ZCU106 board.

 

3.1 Determine which COM to use to access the USB serial port on the ZCU106 board

Make sure that the ZCU106 board is powered on and a micro USB cable is connected between the ZCU106 board and host PC. This ensures that the USB-to-serial bridge is enumerated by the PC host.

Open your computer's Control Panel by clicking on Start > Control Panel.

Note that the Start button is typically located in the lower-left corner of the screen. Occasionally, it is in the upper left corner.

  1. Click Device Manager to open the Device Manager window. Note: You might be asked to confirm opening the Device Manager. If so, click YES.

  2. Expand Ports (COM and LPT).

  3. Locate the Silicon Labs Quad CP210x USB to UART Bridge: Interface 0 (COM#)

  4. Note the COM Port number for further steps.

  5. Close the Device Manager by clicking the red X in the upper right corner of the window.

Launch any Terminal application such as Tera Term to view the serial messages

  1. Launch Tera Term and open the COM the port that is associated with Silicon Labs Quad CP210x USB to UART Bridge: Interface 0 of the USB-to-serial bridge.

  2. Set the COM port to 115200 Baud rate, 8 bit data, none parity, 1 stop bit.

  3. Power ON the board which has an SD card. Switch ON SW1 to power the ZCU106 board.

  4. It boots Linux on board and it will take about a minute for Linux to boot. 

4 Download the TRD

5 Run Flow

The TRD package is released with the source code, Vivado project, PetaLinux BSP, and SD card image that enables the user to run the demonstration.

It also includes the binaries necessary to configure and boot the ZCU106 board. Prior to running the steps outlined in this wiki page, download the TRD package and extract its contents to a directory referred to as TRD_HOME which is the home directory.

TRD package contents are placed in the following directory structure. The user needs to copy all of the files from the $TRD_HOME/images/vcu_yuv444/ to the FAT32 formatted SD card directory.

└── rdf0428-zcu106-vcu-yuv444-EA-2021-2 ├── apu │   └── vcu_petalinux_bsp │   └── xilinx-vcu-zcu106-v2021.2-final.bsp ├── images │   └── vcu_yuv444 │   ├── autostart.sh │   ├── BOOT.BIN │   ├── bootfiles │   │   ├── bl31.elf │   │   ├── bootgen.bif │   │   ├── pmufw.elf │   │   ├── system.bit │   │   ├── u-boot.elf │   │   └── zynqmp_fsbl.elf │   ├── boot.scr │   ├── config │   ├── Image │   ├── rootfs.cpio.gz.u-boot │   ├── system.dtb │   └── vcu ├── pl │   ├── constrs │   │   ├── hdcp_keymngmt_blk.xdc │   │   └── vcu_hdr.xdc │   ├── designs │   │   └── zcu106_HDR10_DCI4K_YUV444 │   ├── README.md │   └── srcs │   ├── hdl │   └── ip ├── README.txt └── zcu106_vcu_trd_sources_and_licenses.tar.gz

Scripts to run yuv444 use-cases for various resolutions are placed in following directory structure:

config ├── 1080p60 │   ├── Display │   ├── Playback │   ├── Record │   ├── Stream-in │   └── Stream-out └── 4kp30 ├── Display ├── Playback ├── Record ├── Stream-in └── Stream-out

5.1 Prepare an SD Card

There are many options to format the SD Card in the windows tool, but always format with FAT32 option. Use the SD Card Formatter tool to format the SD card, https://www.sdcard.org/downloads/formatter_4/

Please note that the Windows format option cannot be used.

  • Copy all of the files from the $TRD_HOME/images/<Path to Design Images>/ to a FAT32 formatted SD card directory

  • Power on the board. Make sure INIT_B, DONE and all power rail LEDs are lit green

  • After a successful boot, a shell prompt will appear as shown below.

root@zcu106_vcu_yuv444:~#

The SD card file system is mounted at /media/card. Optional storage medium SATA and USB are mounted at /media/sata and /media/usb respectively.

5.2 GStreamer pipelines

  • YUV444 pipeline support is not added in the vcu_gst_app in this beta release. As an alternative a user would need to use the provided scripts or could also directly use gst-launch commands.

  • Make sure that the HDMI-RX is configured to 4kp30 mode to run the below pipelines.

  • Make sure the scalar is set with respective YUV444 format (8-bit or 10-bit) to run the below pipelines. (check section-8 for media-ctl commands)

YUV444 8-bit pipelines

4kp30 YU24 HEVC YUV444 8-bit Display HDMI Pass-through pipeline execution

sh /media/card/config/4kp30/Display/YU24/Single_4kp30_HDMI_Passthrough_8b.sh

4kp30 YU24 HEVC YUV444 8-bit Display DP Pass-through pipeline execution

sh /media/card/config/4kp30/Display/YU24/Single_4kp30_DP_Passthrough_8b.sh

4kp30 YU24 HEVC YUV444 8-bit record pipeline execution

sh /media/card/config/4kp30/Record/YU24/Single_4kp30_HEVC_8b.sh

4kp30 YU24 HEVC YUV444 8-bit HDMI playback pipeline execution

sh /media/card/config/4kp30/Playback/YU24/Single_4kp30_HEVC_HDMI_8b.sh

4kp30 YU24 HEVC YUV444 8-bit DP playback pipeline execution

sh /media/card/config/4kp30/Playback/YU24/Single_4kp30_HEVC_DP_8b.sh

4kp30 YU24 HEVC YUV444 8-bit stream-out pipeline execution

sh /media/card/config/4kp30/Stream-out/YU24/Single_4kp30_HEVC_8b.sh

4kp30 YU24 HEVC YUV444 8-bit stream-in HDMI pipeline execution

sh /media/card/config/4kp30/Stream-in/YU24/Single_4kp30_HEVC_HDMI_8b.sh

4kp30 YU24 HEVC YUV444 8-bit stream-in DP pipeline execution

sh /media/card/config/4kp30/Stream-in/YU24/Single_4kp30_HEVC_DP_8b.sh

YUV444 10-bit pipelines

4kp30 XV30 HEVC YUV444 10-bit Display HDMI Pass-through pipeline execution

sh /media/card/config/4kp30/Display/XV30/Single_4kp30_HDMI_Passthrough_10b.sh

4kp30 XV30 HEVC YUV444 10-bit Display DP Pass-through pipeline execution

sh /media/card/config/4kp30/Display/XV30/Single_4kp30_DP_Passthrough_10b.sh

4kp30 XV30 HEVC YUV444 10-bit record pipeline execution

sh /media/card/config/4kp30/Record/XV30/Single_4kp30_HEVC_10b.sh

4kp30 XV30 HEVC YUV444 10-bit HDMI playback pipeline execution

sh /media/card/config/4kp30/Playback/XV30/Single_4kp30_HEVC_HDMI_10b.sh

4kp30 XV30 HEVC YUV444 10-bit DP playback pipeline execution

sh /media/card/config/4kp30/Playback/XV30/Single_4kp30_HEVC_DP_10b.sh

4kp30 XV30 HEVC YUV444 10-bit stream-out pipeline execution

sh /media/card/config/4kp30/Stream-out/XV30/Single_4kp30_HEVC_10b.sh

4kp30 XV30 HEVC YUV444 10-bit stream-in HDMI pipeline execution

sh /media/card/config/4kp30/Stream-in/XV30/Single_4kp30_HEVC_HDMI_10b.sh

4kp30 XV30 HEVC YUV444 10-bit stream-in DP pipeline execution

sh /media/card/config/4kp30/Stream-in/XV30/Single_4kp30_HEVC_DP_10b.sh

5.3 Mount locations

The mount locations for various devices can be found in the below table.
The mount locations can vary.  Users can use lsblk or mount to find the location of the mounted devices.

Below are some example mount points:

Device

Mount Location

Device

Mount Location

SD Card

/media/card

Sata Drive

/run/media/sda

USB Drive

/media/usb

RAM Disk

/run/media

5.4 QoS Configuration

Check the Read QoS, Write QoS, Read Commands Issuing Capability and Write Commands Issuing Capability configuration of HP ports that interface the VCU with the PS DDR.

The AXI-QoS{3:0] lines behavior define the following three types of Traffic in Decimal format on the AXI Bus.

Traffic Class

Read QoS Value (default)

Write QoS Value (default)

Best Effort (BE)

0-3

0-7

Video (V)

4-11

8-15

Low Latency (LL)

12-15

N/A

 Below is the reference QoS configuration script as per the VCU recommendation.

#!/bin/bash /sbin/devmem 0xfd360008 w 0x3 #RDQoS for S_AXI_HPC0_FPD /sbin/devmem 0xfd370008 w 0x3 #RDQoS for S_AXI_HPC1_FPD /sbin/devmem 0xfd380008 w 0x3 #RDQoS for S_AXI_HP0_FPD /sbin/devmem 0xfd390008 w 0x3 #RDQoS for S_AXI_HP1_FPD /sbin/devmem 0xfd3a0008 w 0x3 #RDQoS for S_AXI_HP2_FPD /sbin/devmem 0xfd3b0008 w 0x3 #RDQoS for S_AXI_HP3_FPD /sbin/devmem 0xfd36001c w 0x3 #WRQoS for S_AXI_HPC0_FPD /sbin/devmem 0xfd37001c w 0x3 #WRQoS for S_AXI_HPC1_FPD /sbin/devmem 0xfd38001c w 0x3 #WRQoS for S_AXI_HP0_FPD /sbin/devmem 0xfd39001c w 0x3 #WRQoS for S_AXI_HP1_FPD /sbin/devmem 0xfd3a001c w 0x3 #WRQoS for S_AXI_HP2_FPD /sbin/devmem 0xfd3b001c w 0x3 #WRQoS for S_AXI_HP3_FPD /sbin/devmem 0xfd360004 w 0xF #RDISSUE for S_AXI_HPC0_FPD /sbin/devmem 0xfd370004 w 0xF #RDISSUE for S_AXI_HPC1_FPD /sbin/devmem 0xfd380004 w 0xF #RDISSUE for S_AXI_HP0_FPD /sbin/devmem 0xfd390004 w 0xF #RDISSUE for S_AXI_HP1_FPD /sbin/devmem 0xfd3A0004 w 0xF #RDISSUE for S_AXI_HP2_FPD /sbin/devmem 0xfd3B0004 w 0xF #RDISSUE for S_AXI_HP3_FPD /sbin/devmem 0xfd360018 w 0xF #WRISSUE for S_AXI_HPC0_FPD /sbin/devmem 0xfd370018 w 0xF #WRISSUE for S_AXI_HPC1_FPD /sbin/devmem 0xfd380018 w 0xF #WRISSUE for S_AXI_HP0_FPD /sbin/devmem 0xfd390018 w 0xF #WRISSUE for S_AXI_HP1_FPD /sbin/devmem 0xfd3A0018 w 0xF #WRISSUE for S_AXI_HP2_FPD /sbin/devmem 0xfd3B0018 w 0xF #WRISSUE for S_AXI_HP3_FPD

6 Build Flow

The following tutorials assume that the $TRD_HOME environment variable is set as shown below.

$ export TRD_HOME=</path/to/downloaded/zipfile>/rdf0428-zcu106-vcu-yuv444-EA-2021-2

6.1 Hardware Design

Refer to the Vivado Design Suite User Guide: Using the Vivado IDE (UG893), for information on setting up the Vivado environment.

On Linux:

  1. Open a Linux terminal

  2. Change the directory to $TRD_HOME/pl

  3. Run the following command in theVivado shell to create the Vivado IPI project and invoke the GUI.

$ vivado -source designs/zcu106_HDR10_DCI4K_YUV444/project.tcl

After executing the script, the Vivado IPI block design comes up as shown in the below figure.

  • Click on “Generate Bitstream”.

If the user gets any pop-up with “No implementation Results available”. Click “Yes”. Then, if any pop-up comes up with “Launch runs”, Click "OK”.

The design is implemented and a pop-up window comes up saying “Open Implemented Design”. Click "OK".

After opening the implemented design, the window looks as shown in the below figure.

The actual results might look slightly different than the image shown

To generate the .xsa file:


Go to File > Export > Export Hardware

In the Export Hardware Platform window click Next.

In the next window, select Include bitstream and click Next.

The default XSA file name is <hardware design name_wrapper>. Choose the path where the XSA file has to be written.

for example, the XSA is created at $TRD_HOME/pl/build/zcu106_trd/zcu106_trd_wrapper.xsa for a VCU TRD hardware design.

Click Finish for the XSA file to be generated.

6.2 VCU PetaLinux BSP

This tutorial shows how to build the Linux image and boot image using the PetaLinux build tool.
PetaLinux Installation: Refer to the PetaLinux Tools Documentation UG1144 for installation.

Follow all of the build steps in sequence.

$ source <path/to/petalinux-installer>/tool/petalinux-v2021.2-final/settings.sh $ echo $PETALINUX

Post PetaLinux installation, the $PETALINUX environment variable should be set.

  • Create a PetaLinux project.

$ cd $TRD_HOME/apu/vcu_petalinux_bsp $ petalinux-create -t project -s xilinx-vcu-zcu106-v2021.2-final.bsp
  • Configure the PetaLinux project.

$ cd xilinx-vcu-zcu106-v2021.2-final
  • Use the below command to configure the PetaLinux project for the YUV444 design.

$ petalinux-config --get-hw-description=$TRD_HOME/pl/prebuild/zcu106_HDR10_DCI4K_YUV444

Please note that, the below config options are disabled in xilinx-vcu-zcu106-v2021.2-final/project-spec/configs/config for a VCU TRD BSP

  • CONFIG_SUBSYSTEM_FPGA_MANAGER : this adds overlay dtb nodes, and overlay dtb nodes are not used in VCU TRD so it is disabled

  • CONFIG_SUBSYSTEM_REMOVE_PL_DTB : PL IPs are used in VCU TRD designs, so keep it disabled to generate PL DTB nodes

  • If the Vivado project has been modified for the YUV444 design then use the below command to configure the BSP

$ petalinux-config --get-hw-description=$TRD_HOME/pl/build/zcu106_HDR10_DCI4K_YUV444
  • Create a soft link of the design dtsi file to system-user.dtsi using the below command:

$ cd project-spec/meta-user/recipes-bsp/device-tree/files/ $ ln -sf vcu_plddr_hdr10_hdmi.dtsi system-user.dtsi $ cd ../../../../../
  • Build the PetaLinux project

$ petalinux-build
  • Build SDK components to use it as sysroot for application development.

$ petalinux-build --sdk $ petalinux-package --sysroot
  • Create a boot image (BOOT.BIN) including FSBL, ATF, bitstream, and U-Boot.

$ cd images/linux $ petalinux-package --boot --fsbl zynqmp_fsbl.elf --u-boot u-boot.elf --pmufw pmufw.elf --fpga system.bit
  • Copy the generated boot image and Linux image to the SD card directory.

$ cp BOOT.BIN system.dtb Image rootfs.cpio.gz.u-boot boot.scr $TRD_HOME/images/vcu_yuv444

7 Other Information

7.1 Known Issues

7.2 Limitations


8 HDMI-RX/TX Link-up and GStreamer Commands

This section covers configuration of HDMI-RX using the media-ctl utility and HDMI-TX using the modetest utility, along with demonstrating HDMI-RX/TX link-up issues and steps to switch HDMI-RX resolution. It also contains sample GStreamer HDMI video pipelines for Display, Record & Playback, Stream-in and Stream-out use-cases.

  • The HDMI source can be locked to any resolution. Run the below command for all media nodes to print the media device topology, where mediaX represents different media nodes. In the topology log, look for the v_hdmi_rx_ss string to identify the HDMI input source media node.

$ media-ctl -p -d /dev/media2
  • To check the link status, resolution and video node of the HDMI input source, run the below media-ctl command, where ,mediaX indicates the media node for the HDMI input source.

$ media-ctl -p -d /dev/media2
  • When the HDMI source is connected to the 4Kp30 resolution and YUV444 8-bit color-space, it shows the following:

root@zcu106_vcu_yuv444:~# media-ctl -p -d /dev/media2 -----> HDMI-Rx media node Media controller API version 5.10.0 Media device information ------------------------ driver xilinx-video model Xilinx Video Composite Device serial bus info hw revision 0x0 driver version 5.10.0 Device topology - entity 1: vcap_hdmi_input_v_proc_ss_0 out (1 pad, 1 link) type Node subtype V4L flags 0 device node name /dev/video5 -----> Video node for HDMI-Rx source pad0: Sink <- "a0040000.v_proc_ss":1 [ENABLED] - entity 5: a0040000.v_proc_ss (2 pads, 2 links) type V4L2 subdev subtype Unknown flags 0 device node name /dev/v4l-subdev0 pad0: Sink [fmt:VUY8_1X24/3840x2160 field:none] <- "a0400000.v_hdmi_rx_ss":0 [ENABLED] pad1: Source [fmt:VUY10_1X30/3840x2160 field:none] -> "vcap_hdmi_input_v_proc_ss_0 out":0 [ENABLED] - entity 8: a0400000.v_hdmi_rx_ss (1 pad, 1 link) type V4L2 subdev subtype Unknown flags 0 device node name /dev/v4l-subdev1 pad0: Source [fmt:VUY8_1X24/3840x2160 field:none colorspace:rec709 xfer:709 ycbcr:709 quantization:lim-range] [dv.caps:BT.656/1120 min:0x0@25000000 max:4096x2160@297000000 stds:CEA-861,DMT,CVT,GTF caps:progressive,reduced-blanking,custom] [dv.detect:BT.656/1120 3840x2160p30 (4400x2250) stds:CEA-861 flags:CE-video] -> "a0040000.v_proc_ss":0 [ENABLED] -----> Resolution and Frame-rate of HDMI-Rx source

Check the resolution and frame-rate of dv.detect under the v_hdmi_rx_ss node.

  • When the HDMI source is not connected, it shows the following:

root@zcu106_vcu_yuv444:~# media-ctl -p -d /dev/media2 -----> HDMI-Rx media node Media controller API version 5.10.0 Media device information ------------------------ driver xilinx-video model Xilinx Video Composite Device serial bus info hw revision 0x0 driver version 5.10.0 Device topology - entity 1: vcap_hdmi_input_v_proc_ss_0 out (1 pad, 1 link) type Node subtype V4L flags 0 device node name /dev/video5 -----> Video node for HDMI-Rx source pad0: Sink <- "a0040000.v_proc_ss":1 [ENABLED] - entity 5: a0040000.v_proc_ss (2 pads, 2 links) type V4L2 subdev subtype Unknown flags 0 device node name /dev/v4l-subdev0 pad0: Sink [fmt:VUY8_1X24/3840x2160 field:none] <- "a0400000.v_hdmi_rx_ss":0 [ENABLED] pad1: Source [fmt:VUY10_1X30/3840x2160 field:none] -> "vcap_hdmi_input_v_proc_ss_0 out":0 [ENABLED] - entity 8: a0400000.v_hdmi_rx_ss (1 pad, 1 link) type V4L2 subdev subtype Unknown flags 0 device node name /dev/v4l-subdev1 pad0: Source [fmt:VUY8_1X24/3840x2160 field:none colorspace:rec709 xfer:709 ycbcr:709 quantization:lim-range] [dv.caps:BT.656/1120 min:0x0@25000000 max:4096x2160@297000000 stds:CEA-861,DMT,CVT,GTF caps:progressive,reduced-blanking,custom] [dv.query:no-link] -----> HDMI-Rx Link Status -> "a0040000.v_proc_ss":0 [ENABLED]

Here dv.query:no-link under v_hdmi_rx_ss node shows HDMI-RX source is not connected or HDMI-RX source is not active (Try waking up the device by pressing a key on remote).

Notes for gst-launch-1.0 commands:

  • The Video node for the HDMI-RX source can be checked using the media-ctl command. Run the below media-ctl command to check the video node for the HDMI-RX source, where media0 indicates the media node for the HDMI input source.

$ media-ctl -p -d /dev/media2
  • Make sure the HDMI-RX media pipeline is configured for 4kp60 resolution and source/sink has the same color format for connected nodes. For XV20 format, run the below media-ctl commands to set the resolution and format of the HDMI scaler node where media0 indicates the media node for HDMI input source.

If the HDMI Input Source is NVIDIA SHIELD and display format for the NVIDIA SHIELD is set to YUV444 8-bit format, run the below commands to set the v_proc_ss input and output format to YUV444 8-bit.

$ media-ctl -d /dev/media2 -V "\"a0040000.v_proc_ss\":1 [fmt:VUY8_1X24/3840x2160 field:none]" $ media-ctl -d /dev/media2 -V "\"a0040000.v_proc_ss\":0 [fmt:VUY8_1X24/3840x2160 field:none]"

If the HDMI Input Source is NVIDIA SHIELD and display format for the NVIDIA SHIELD is set to YUV422 10-bit format, run the below commands to set the v_proc_ss input to YUV422 10-bit and output format to YUV444 10-bit.

$ media-ctl -d /dev/media2 -V "\"a0040000.v_proc_ss\":1 [fmt:VUY10_1X30/3840x2160 field:none]" $ media-ctl -d /dev/media2 -V "\"a0040000.v_proc_ss\":0 [fmt:VUY8_1X24/3840x2160 field:none]"

Make sure the NVIDIA SHIELD is configured for 4K resolution and the respective color-space format (i.e. For YUV444 8-bits: VUY8_1X24).

  • Change the resolution of the HDMI Input Source from 1080p60 to 4kp30 by following the below steps.

    • Set the HDMI source resolution to 4kp60 (Homepage → Settings → Display & Sound → Resolution → change to 4kp30).

    • Save the configuration for the change to take effect.

    • Verify the desired HDMI Input Source Resolution (4kp30) by following the above steps.

  • To run HDMI use-cases, use below modetest commands:

For YUV444 8-bit

$ modetest -D amba_pl@0:drm-pl-disp-drvhdmi_output_v_hdmi_tx_ss_0 -s 37:3840x2160-30@YU24

For YUV444 10-bit

$ modetest -D amba_pl@0:drm-pl-disp-drvhdmi_output_v_hdmi_tx_ss_0 -s 37:3840x2160-30@XV30

If the HDMI-Tx link-up issue is observed after Linux booting, use above HDMI modetest commands.

  • To run DP use-cases, use below modetest commands:

For YUV444 8-bit

$ modetest -M xlnx -D fd4a0000.display -s 43:3840x2160-30@AR24 -P 39@41:3840x2160@YU24 -w 40:g_alpha_en:0

For YUV444 10-bit

$ modetest -M xlnx -D fd4a0000.display -s 43:3840x2160-30@AR24 -P 39@41:3840x2160@XV30 -w 40:g_alpha_en:0
  • The table below lists the parameters of the pixel format.

 

Pixel Format

GStreamer Format

Media Bus Format

 

Pixel Format

GStreamer Format

Media Bus Format

YUV444 8-bit

YU24

Y444

VUY8_1X24

YUV444 10-bit

XV30

Y444_10LE32

VUY10_1X30 

  • Make sure that the HDMI-Rx supports YUV444. It should be configured to 4kp30 mode before running the below pipelines.

  • Make sure to properly configure HDMI-Rx and HDMI-Tx using relevant media-ctl and modetest commands.

  • While running record/playback pipelines, make sure that the file location is USB-3.0/SATA/RAMFS to avoid the read-write bandwidth issue.

  • For 1080p display, stream-in and playback use-cases over DP, use the fullscreen-overlay=true property in kmssink.

  • Video5 in the each gst-launch pipelines indicates a video node for the input source

  • 192.168.25.89 is the client IP address and 5004 is the port number in the streaming pipeline.

  • Run the following gst-launch-1.0 command to display raw YUV444 8-bit video over HDMI using the GStreamer pipeline.

gst-launch-1.0 v4l2src device=/dev/video5 ! video/x-raw, width=3840, height=2160, format=Y444, framerate=30/1 ! queue ! fpsdisplaysink text-overlay=false fps-update-interval=1000 name=fpssink video-sink="kmssink bus-id=amba_pl@0:drm-pl-disp-drvhdmi_output_v_hdmi_tx_ss_0 show-preroll-frame=false" sync=true -v
  • Run the following gst-launch-1.0 command to display raw YUV444 10-bit video over HDMI using the GStreamer pipeline.

gst-launch-1.0 v4l2src device=/dev/video5 ! video/x-raw, width=3840, height=2160, format=Y444_10LE32, framerate=30/1 ! queue ! fpsdisplaysink text-overlay=false name=fpssink video-sink="kmssink bus-id=amba_pl@0:drm-pl-disp-drvhdmi_output_v_hdmi_tx_ss_0 show-preroll-frame=false" sync=true -v
  • Run the following gst-launch-1.0 command to display raw YUV444 8-bit video over DP using the GStreamer pipeline.

gst-launch-1.0 v4l2src device=/dev/video5 io-mode=5 ! video/x-raw, width=3840, height=2160, format=Y444, framerate=30/1 ! queue ! fpsdisplaysink text-overlay=false fps-update-interval=1000 name=fpssink video-sink="kmssink bus-id="fd4a0000.display" show-preroll-frame=false" sync=true -v
  • Run the following gst-launch-1.0 command to display raw YUV444 10-bit video over DP using the GStreamer pipeline.

gst-launch-1.0 v4l2src device=/dev/video5 io-mode=4 ! video/x-raw, width=3840, height=2160, format=Y444_10LE32, framerate=30/1 ! queue ! fpsdisplaysink text-overlay=false name=fpssink video-sink="kmssink bus-id="fd4a0000.display" show-preroll-frame=false" sync=true -v
  • Run the following gst-launch-1.0 command to record YUV444 8-bit video using the GStreamer pipeline.

gst-launch-1.0 v4l2src device=/dev/video5 num-buffers=1800 ! video/x-raw, width=3840, height=2160, format=Y444, framerate=30/1 ! omxh265enc target-bitrate=25000 control-rate=low-latency y444-to-gray=true num-slices=6 periodicity-idr=120 ! filesink location=/run/test.h265
  • Run the following gst-launch-1.0 command to record YUV444 10-bit video using the GStreamer pipeline.

gst-launch-1.0 v4l2src device=/dev/video5 num-buffers=1800 ! video/x-raw, width=3840, height=2160, format=Y444_10LE32, framerate=30/1 ! omxh265enc target-bitrate=25000 control-rate=low-latency y444-to-gray=true num-slices=6 periodicity-idr=120 ! filesink location=/run/test.h265
  • Run the following gst-launch-1.0 command to play the recorded 8-bit/10-bit video file over HDMI using the GStreamer pipeline.

gst-launch-1.0 filesrc location=/run/test.h265 ! h265parse ! omxh265dec ! queue ! fpsdisplaysink text-overlay=false name=fpssink video-sink="kmssink bus-id=amba_pl@0:drm-pl-disp-drvhdmi_output_v_hdmi_tx_ss_0 gray-to-y444=true show-preroll-frame=false" sync=true -v
  • Run the following gst-launch-1.0 command to play the recorded 8-bit/10-bit video file over DP using the GStreamer pipeline.

gst-launch-1.0 filesrc location=/run/test.h265 ! h265parse ! omxh265dec ! queue ! fpsdisplaysink text-overlay=false name=fpssink video-sink="kmssink bus-id="fd4a0000.display" gray-to-y444=true show-preroll-frame=false" sync=true -v
  • Run the following gst-launch-1.0 command to capture, encode and stream-out YUV444 8-bit video using the GStreamer pipeline.

gst-launch-1.0 v4l2src device=/dev/video5 ! video/x-raw, width=3840, height=2160, format=Y444, framerate=30/1 ! omxh265enc target-bitrate=25000 control-rate=low-latency y444-to-gray=true num-slices=6 periodicity-idr=120 ! queue ! rtph265pay ! udpsink buffer-size=60000000 port=5004 host=192.168.25.89
  • Run the following gst-launch-1.0 command to capture, encode and stream-out YUV444 10-bit video using the GStreamer pipeline.

gst-launch-1.0 v4l2src device=/dev/video5 ! video/x-raw, width=3840, height=2160, format=Y444_10LE32, framerate=30/1 ! omxh265enc target-bitrate=25000 control-rate=low-latency y444-to-gray=true num-slices=6 periodicity-idr=120 ! queue ! rtph265pay ! udpsink buffer-size=60000000 port=5004 host=192.168.25.89
  • Run the following gst-launch-1.0 command to stream-in, decode and play YUV444 8-bit/10-bit video over HDMI using the GStreamer pipeline

gst-launch-1.0 udpsrc buffer-size=60000000 port=5004 ! application/x-rtp,encoding-name=H265,payload=96 ! rtph265depay ! h265parse ! video/x-h265, alignment=au ! omxh265dec ! queue ! fpsdisplaysink text-overlay=false name=fpssink video-sink="kmssink bus-id=amba_pl@0:drm-pl-disp-drvhdmi_output_v_hdmi_tx_ss_0 gray-to-y444=true show-preroll-frame=false" sync=true -v
  • Run the following gst-launch-1.0 command to stream-in, decode and play YUV444 8-bit/10-bit video over DP using the GStreamer pipeline

gst-launch-1.0 udpsrc buffer-size=60000000 address=192.168.25.89 port=5004 ! application/x-rtp,encoding-name=H265,payload=96 ! rtph265depay ! h265parse ! video/x-h265, alignment=au ! omxh265dec ! queue ! fpsdisplaysink text-overlay=false name=fpssink video-sink="kmssink bus-id="fd4a0000.display" gray-to-y444=true show-preroll-frame=false" sync=true -v

Related content

© Copyright 2019 - 2022 Xilinx Inc. Privacy Policy