AR# 73199

2019.2 Zynq UltraScale+ MPSoC VCU - How do I enable support for HDR10 metadata insertion and extraction with VCU Control Software?

描述

This Answer Record covers the following:

1) 2019.2 Zynq UltraScale+ MPSoC VCU - How do I enable support for HDR10 metadata insertion and extraction with VCU Control Software?

2) The 2019.2 Xilinx Zynq UltraScale+ VCU Control Software includes support for HDR10 metadata insertion and extraction in file to file operations.

However, there is a known issue with the Advanced Video Coding (AVC) Content Light Level (CLL) Supplemental Enhancement Information (SEI) and color description VUI parsing in the Zynq UltraScale+ MPSoC VCU decoder.

解决方案

The following patch resolves the known issue with AVC CLL SEI and color description VUI parsing in the Zynq UltraScale+ MPSoC VCU decoder allowing for HDR10 metadata insertion and extraction in file to file operations.

  • 2019.2 - Users can download the PetaLinux Recipes and Patch files from (Xilinx Answer 73019) to work around this issue
  • 2020.1 - This issue will be resolved in the 2020.1 release and later versions

Additional Information on HDR10 Support in the Zynq UltraScale+ MPSoC VCU Control Software:

This Answer Record provides information about the HDR10 metadata structure and commands for the VCU control software to insert or extract HDR10 metadata into or from an encoded video file.

HDR10 Metadata Structure:


The HDR10 metadata structure follows the ITU Series H Supplement 18 standard for HDR and WCG (https://www.itu.int/rec/T-REC-H.Sup18-201710-I).

There are three HDR10 related video usability information (VUI) parameters: color primaries, transfer characteristics, and matrix coefficients. 

This VUI metadata is contained in the sequence parameter set (SPS) of the intracoded frames:


 

In addition to the VUI parameters, there are two HDR10 related supplemental enhancement information (SEI) messages: 

Mastering Display Color Volume (MDCV) and Content Light Level (CLL). 

These SEI messages are formatted in the following structure:




USAGE:

Control Software Decoder

To extract HDR10 metadata while decoding an encoded file you can use the following:

ctrlsw_decoder -hevc -in bitstream.hevc -out decoded.yuv --hdr-file HDRSEIs_output.txt
ctrlsw_decoder -avc -in bitstream.avc -out decoded.yuv --hdr-file HDRSEIs_output.txt


The file specified in --hdr-file will contain the extracted HDR10 metadata information formatted in the following structure:

  • colour_primaries: <colour primaries value> 1
  • transfer_characteristics: <transfer function value> 2
  • matrix_coefficients: <matrix coefficients value> 2
  • mastering_display_colour_volume: <display_primaries_GX> <display_primaries_GY> <display_primaries_BX> <display_primaries_BY> <display_primaries_RX> <display_primaries_RY> <white_point_x> <white_point_y> <max_display_mastering_luminance> <min_display_mastering_luminance>
  • content_light_level_info: <max_content_light_level> <max_pic_average_light_level>

Note:

  1. This value follows the enumeration as specified in vcu-ctrl-sw/include/lib_common/HDR.h
  2. These values follow the interpretation tables as specified in Table E-4 and E-5 of the ITU H.264 (https://www.itu.int/rec/T-REC-H.264) and H.265 standards (https://www.itu.int/rec/T-REC-H.265).

Control Software Encoder

To insert HDR10 metadata while encoding a file you can use the following:

ctrlsw_encoder -cfg HDR-XilinxExample.cfg


The HDR10 specific configurations are:

#--------------------------------------------------------------------------
[INPUT]
#--------------------------------------------------------------------------
HDRFile = HDRSEIs.txt

#--------------------------------------------------------------------------
[SETTINGS]
#--------------------------------------------------------------------------
TransferCharac = TRANSFER_BT_2100_PQ 1
ColourMatrix = COLOUR_MAT_BT_2100_YCBCR 2
EnableSEI = SEI_MDCV | SEI_CLL
ColourDescription = COLOUR_DESC_BT_2020 3


The HDRSEIs.txt should have the MDCV and CLL SEI information in the following format:

  • mastering_display_colour_volume: <display_primaries_GX> <display_primaries_GY> <display_primaries_BX> <display_primaries_BY> <display_primaries_RX> <display_primaries_RY> <white_point_x> <white_point_y> <max_display_mastering_luminance> <min_display_mastering_luminance>
  • content_light_level_info: <max_content_light_level> <max_pic_average_light_level>

Note:

  1. This value follows the enumeration as specified in Table E-4 of the ITU H.264/H.265 standards. As per HDR10 standards, only PQ (TRANSFER_BT_2100_PQ) is used.
  2. This value follows the enumeration as specified in Table E-5 of the ITU H.264/H.265 standards. As per HDR10 standards, only NCL YCbCr (COLOUR_MAT_BT_2100_YCBCR) is used.
  3. This value follows the enumeration as specified in vcu-ctrl-sw/include/lib_common/HDR.h. As per HDR10 standards, only BT2020 (COLOUR_DESC_BT_2020) is used.


See the attached ZIP file for example configuration files for HDR10 metadata insertion and extraction in file to file operations.

附件

文件名 文件大小 File Type
2019-11-26_-_AR73199_hdr_sample_streams_cfg_files.zip 424 KB ZIP

链接问答记录

主要问答记录

AR# 73199
日期 01/26/2020
状态 Active
Type 综合文章
器件
Tools
IP