Zynq UltraScale+ MPSoC VCU TRD 2021.1 - 10G HDMI Video Capture and Display
This page provides all the information related to Design Module 4 - VCU TRD 10G HDMI Video Capture and Display design.
Table of Contents
1 Overview
The primary goal of this Design is to demonstrate the capabilities of VCU hard block present in Zynq UltraScale+ EV devices. The TRD will serve as a platform to tune the performance parameters of VCU and arrive at optimal configurations for encoder and decoder blocks with the streaming use case where bandwidth plays a vital role. 10G will give sufficient bandwidth for the streaming protocol to play video pipeline smoothly.
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
VCU Codec:
Video Encode/Decode capability using VCU hard block in PL
AVC/HEVC encoding
Encoder/decoder parameter configuration
Streaming Interfaces:
10G Ethernet on PL
1G Ethernet on PS
Video format:
NV12
10G Deliverables:
Pipeline | Input Source | Output Type | Resolution | Video Codec Type | Deliverables |
Record / Stream-Out pipeline | HDMI-Rx | File Sink / Stream-Out | 4K /1080p | HEVC / AVC | HDMI-Rx Video encodes with VCU and stores it in a container format |
Playback pipeline | File Source / Stream-In | HDMI-Tx | 4K /1080p | HEVC / AVC | Playback of the local-file / stream-in with video decoded using VCU and display on HDMI-Tx |
Capture → Display | HDMI-Rx | HDMI-Tx | 4K /1080p | HEVC / AVC | HDMI-Rx Video passes to HDMI-Tx without VCU |
Capture → Encode → Decode → Display | HDMI-Rx | HDMI-Tx | 4K /1080p | HEVC / AVC | HDMI-Rx raw video passes through VCU elements encoder and decoder and finally displays on HDMI-Tx |
Supported Resolution:
The table below provides the supported resolution in this design.
Resolution | Command Line | |
Single Stream | Multi-stream | |
4Kp60 | √ | NA |
4Kp30 | √ | NA |
1080p60 | √ | NA |
√ - Supported
NA – Not applicable
The below sections describe the 10G HDMI Video Capture and HDMI Display design. It is VCU TRD design supporting 10G HDMI-Rx and HDMI-Tx. For the overview, software tools, system requirements and design files follow the link below:
The below figure shows the 10G HDMI Video Capture and HDMI Display design hardware block diagram.
The below figure shows the 10G HDMI Video Capture and HDMI Display design software block diagram.
1.1 Board Setup
Refer below link for Board Setup
Board Connections:
The figure shows the ZCU106 board connections for 10G HDMI-Rx and HDMI-Tx Streaming support
1.2 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 mentioned 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.
Refer below link to download all TRD contents.
Refer Section 4.1 : Download the TRD of
Zynq UltraScale+ MPSoC VCU TRD 2021.1wiki page to download all TRD contents.
TRD package contents are placed in the following directory structure. The user needs to copy all the files from the $TRD_HOME/images/vcu_10g/ to FAT32 formatted SD card directory.
rdf0428-zcu106-vcu-trd-2021-1/
├── apu
│ └── vcu_petalinux_bsp
├── images
│ ├── vcu_10g
│ ├── vcu_audio
│ ├── vcu_llp2_hdmi_nv12
│ ├── vcu_llp2_hdmi_nv16
│ ├── vcu_llp2_hdmi_xv20
│ ├── vcu_llp2_sdi_xv20
│ ├── vcu_multistream_nv12
│ ├── vcu_pcie
│ ├── vcu_plddrv1_hdr10_hdmi
│ ├── vcu_plddrv2_hdr10_hdmi
│ └── vcu_sdi_xv20
├── pcie_host_package
│ ├── COPYING
│ ├── include
│ ├── LICENSE
│ ├── readme.txt
│ ├── RELEASE
│ ├── tests
│ ├── tools
│ └── xdma
├── pl
│ ├── constrs
│ ├── designs
│ ├── prebuild
│ ├── README.md
│ └── srcs
└── README.txt
└── zcu106_vcu_trd_sources_and_licenses.tar.gzTRD package contents specific to 10G HDMI Video Capture and HDMI Display design is placed in the following directory structure.
rdf0428-zcu106-vcu-trd-2021-1/
├── apu
│ └── vcu_petalinux_bsp
│ └── xilinx-vcu-zcu106-v2021.1-final.bsp
├── images
│ ├── vcu_10g
│ │ ├── autostart.sh
│ │ ├── BOOT.BIN
│ │ ├── boot.scr
│ │ ├── config
│ │ ├── Image
| | ├── rootfs.cpio.gz.u-boot
│ │ ├── system.dtb
│ │ └── vcu
├── pcie_host_package
├── pl
│ ├── constrs
│ ├── designs
│ │ ├── zcu106_10g
│ ├── prebuild
│ │ ├── zcu106_10g
│ ├── README.md
│ └── srcs
│ ├── hdl
│ └── ip
└── README.txt
└── zcu106_vcu_trd_sources_and_licenses.tar.gzconfiguration files (input.cfg) for various Resolutions are placed in the following directory structure in /media/card.
config
├── 4kp60
│ ├── Display
│ ├── Record
│ ├── Stream-out
│ └── Stream-in
├── 4kp30
│ ├── Display
│ ├── Record
│ ├── Stream-out
│ └── Stream-in
├── 1080p60
│ ├── Display
│ ├── Record
│ ├── Stream-out
│ └── Stream-in
└── input.cfg1.2.1 GStreamer Application (vcu_gst_app)
The vcu_gst_app is a command-line multi-threaded Linux application. The command-line application requires an input configuration file (input.cfg) to be provided in plain text.
Execution of the application is shown below:
$ vcu_gst_app < path to *.cfg file>Example:
4Kp60 HEVC_HIGH Display Pipeline execution
$ vcu_gst_app /media/card/config/4kp60/Display/Single_4kp60_HEVC_HIGH.cfg4Kp60 HEVC_HIGH Record Pipeline execution
$ vcu_gst_app /media/card/config/4kp60/Record/Single_4kp60_HEVC_HIGH.cfg4Kp60 HEVC_HIGH Stream-out Pipeline execution
$ vcu_gst_app /media/card/config/4kp60/Stream-out/Single_4kp60_HEVC_HIGH.cfg4Kp60 HEVC_HIGH Stream-in Pipeline execution
$ vcu_gst_app /media/card/config/4kp60/Stream-in/input.cfgMake sure HDMI-Rx should be configured to 4Kp60 mode
Latency Measurement: To measure the latency of the pipeline, run the below command. The latency data is huge, so dump it to a file.
$ GST_DEBUG="GST_TRACER:7" GST_TRACERS="latency" GST_DEBUG_FILE=/run/latency.log vcu_gst_app /media/card/config/input.cfgRefer below link for detailed run flow steps
1.3 Build Flow
Refer below link for Build Flow
2 Other Information
2.1 Known Issues
For Petalinux related known issues please refer: PetaLinux 2021.1 - Product Update Release Notes and Known Issues
For VCU related known issues please refer AR# 76600: LogiCORE H.264/H.265 Video Codec Unit (VCU) - Release Notes and Known Issues and Xilinx Zynq UltraScale+ MPSoC Video Codec Unit.
2.2 Limitations
For Petalinux related limitations please refer: PetaLinux 2021.1 - Product Update Release Notes and Known Issues
For VCU related limitations please refer AR# 76600: LogiCORE H.264/H.265 Video Codec Unit (VCU) - Release Notes and Known Issues, Xilinx Zynq UltraScale+ MPSoC Video Codec Unit and PG252.
2.3 Optimum VCU Encoder parameters for use-cases:
Video streaming:
Video streaming use-case requires a very stable bitrate graph for all pictures
It is good to avoid periodic large Intra pictures during the encoding session
Low-latency rate control (hardware RC) is the preferred control-rate for video streaming, it tries to maintain equal amount frame sizes for all pictures.
Good to avoid periodic Intra frames instead use low-delay-p (IPPPPP…)
VBR is not a preferred mode of streaming
Performance: AVC Encoder settings:
It is preferred to use 8 or higher slices for better AVC encoder performance
AVC standard does not support Tile mode processing which results in the processing of MB rows sequentially for entropy coding
Quality: Low bitrate AVC encoding:
Enable
profile=highand useqp-mode=autofor low-bitrate encoding use-casesThe high profile enables 8x8 transform which results in better video quality at low bitrates
3 Appendix A - Input Configuration File (input.cfg)
The example configuration files are stored at /media/card/config/ folder.
Configuration Type | Configuration Name | Description | Available Options | Note |
|---|---|---|---|---|
Common | Common configuration | It is the starting point of common configuration |
|
|
Number of Input |
| 1,2,3,4 |
| |
Output | Select the video interface | HDMI |
| |
Out Type |
| display and stream |
| |
Display Rate | Pipeline frame rate | 30 or 60 FPS |
| |
Exit | It indicates to the application that the configuration is over |
|
| |
Input | Input Configuration | It is the starting point of the input configuration |
|
|
Input Numbers | Starting Nth input configuration | 1 |
| |
Input Type | Input Type | HDMI |
| |
Uri | File path or Network URL. Applicable for file playback and stream-in pipeline only. Supported file formats for playback are ts, mp4, and mkv |
| For 10G HDMI Options: file:///run/media/sda/abc.ts (for file path), udp://192.168.26.89:5004/ (for Network streaming, Here | |
Raw | To tell the pipeline is processed or pass-through | TRUE,FALSE |
| |
Width | The width of the live source | 3840, 1920 |
| |
Height | The height of the live source | 2160,1080 |
| |
Exit | It indicates to the application that the configuration is over |
|
| |
Encoder | Encoder Configuration | It is the starting point of encoder configuration |
|
|
Encoder Number | Starting Nth encoder configuration | 1,2,3,4 |
| |
Encoder Name | Name of the encoder | AVC/HEVC |
| |
Profile | Name of the profile | high for AVC main for HEVC |
| |
Rate Control | Rate control options | CBR, VBR, and Low_Latency |
| |
Filler Data | Filler Data NAL units for CBR rate control | False |
| |
QP | QP control mode used by the VCU encoder | Uniform, Auto |
| |
L2 Cache | Enable or Disable L2Cache buffer in encoding process | True, False |
| |
Latency Mode | Encoder latency mode. | Normal,sub_frame |
| |
Low Bandwidth | If enabled, decrease the vertical search range used for P-frame motion estimation to reduce the bandwidth. | True, False |
| |
Gop Mode | Group of Pictures mode. | Basic, low_delay_p, low_delay_b |
| |
Bitrate | Target bitrate in Kbps | 1-60000 |
| |
B Frames | Number of B-frames between two consecutive P-frames | 0-4 |
| |
Slice | The number of slices produced for each frame. Each slice contains one or more complete macroblock/CTU row(s). Slices are distributed over the frame as regularly as possible. If slice-size is defined as well more slices may be produced to fit the slice-size requirement. | 4-22 4Kp resolution with HEVC codec |
| |
GoP Length | The distance between two consecutive I frames | 1-1000 |
| |
GDR Mode | It specifies which Gradual Decoder Refresh(GDR) scheme should be used when | Horizontal, Vertical, Disabled | GDR mode is currently supported with LLP1/LLP2 low-delay-p use-cases only | |
Entropy Mode | It specifies the entropy mode for H.264 (AVC) encoding process | CAVLC, CABAC, Default |
| |
Max Picture Size | It is used to curtail instantaneous peak in the bit-stream using this parameter. It works in CBR/VBR rate-control only. When it is enabled, max-picture-size value is calculated and set with 10% of AllowedPeakMargin. i.e. | TRUE, FALSE | It works in CBR/VBR rate-control only | |
Format | The format of input data | NV12 |
| |
Preset |
| HEVC_HIGH, HEVC_MEDIUM, HEVC_LOW, AVC_HIGH, AVC_MEDIUM, AVC_LOW, Custom |
| |
Exit | It indicates to the application that the configuration is over |
|
| |
Record | Record Configuration | It is the starting point of record configuration |
|
|
Record Number | starting Nth record configuration | 1 |
| |
Out-File Name | Record file path. |
|
| |
Duration | Duration in minutes | 1-3 |
| |
Exit | It indicates to the application that the configuration is over |
|
| |
Streaming | Streaming Configuration | It is the starting point of streaming configuration |
|
|
Streaming Number | Starting Nth Streaming configuration | 1 |
| |
Host IP | The host to send the packets to |
| For 10G- Options: | |
© Copyright 2019 - 2022 Xilinx Inc. Privacy Policy