Nvidia Video Codec SDK 7.0.1 HEVC VUI parameters problems

When I set VUI parameters during initialize an encoding session for h264 codec like this:
m_stEncodeConfig.encodeCodecConfig.h264Config.h264VUIParameters.videoSignalTypePresentFlag |= 1;
m_stEncodeConfig.encodeCodecConfig.h264Config.h264VUIParameters.videoFormat = 5;
m_stEncodeConfig.encodeCodecConfig.h264Config.h264VUIParameters.videoFullRangeFlag |= 1;
m_stEncodeConfig.encodeCodecConfig.h264Config.h264VUIParameters.colourDescriptionPresentFlag |= 1;
m_stEncodeConfig.encodeCodecConfig.h264Config.h264VUIParameters.colourMatrix = 9;

It works absolutely well.

But when I try to do the same thing for HEVC codec
m_stEncodeConfig.encodeCodecConfig.hevcConfig.hevcVUIParameters.videoSignalTypePresentFlag |= 1;
m_stEncodeConfig.encodeCodecConfig.hevcConfig.hevcVUIParameters.videoFormat = 5;
m_stEncodeConfig.encodeCodecConfig.hevcConfig.hevcVUIParameters.videoFullRangeFlag |= 1;
m_stEncodeConfig.encodeCodecConfig.hevcConfig.hevcVUIParameters.colourDescriptionPresentFlag |= 1;
m_stEncodeConfig.encodeCodecConfig.hevcConfig.hevcVUIParameters.colourPrimaries = 9;

it doesn’t make any effect for output HEVC stream. There is a SPS block in the stream, but the VUI parameters in it are still initial: videoSignalTypePresentFlag = 0, for example.

We use LINUX X64 (AMD64/EM64T) DISPLAY DRIVER 367.57 and Video Codec SDK is 7.0.1 version and the hardware is GeForce GTX 1060 (Pascal)

We just tried this internally and it worked fine. Can you please check with the latest drivers and SDK 7.1? If it still reproduces, please provide the following additional information for us to help further:

  1. Driver version
  2. SDK version
  3. Application you are using
  4. Exact sequence of steps (with source code) in the application
  5. Preferably, please share an application which reproduces the problem

Thank you for your help.

Hi,
Driver version : 375.26
SDK version: 7.1.9
Application you are using:
I took NvEncoder sample from SDK as a base and modified it like this:


Samples/common/src/NvHWEncoder.cpp | 13 +++++++++++++
1 file changed, 13 insertions(+)

diff --git a/Samples/common/src/NvHWEncoder.cpp b/Samples/common/src/NvHWEncoder.cpp
index 1b9206c…221d44c 100644
— a/Samples/common/src/NvHWEncoder.cpp
+++ b/Samples/common/src/NvHWEncoder.cpp
@@ -893,6 +893,19 @@ NVENCSTATUS CNvHWEncoder::CreateEncoder(EncodeConfig *pEncCfg)
else if (pEncCfg->codec == NV_ENC_HEVC)
{
m_stEncodeConfig.encodeCodecConfig.hevcConfig.idrPeriod = pEncCfg->gopLength;

  •   /***Setting VUI parameters here**/
    
  •   fprintf(stderr, "Setting VUI parameters:\n");
    
  •   fprintf(stderr, "      videoSignalTypePresentFlag : 1\n");
    
  •   fprintf(stderr, "      videoFormat : 5\n");
    
  •   fprintf(stderr, "      videoFullRangeFlag : 1\n");
    
  •   fprintf(stderr, "      colourDescriptionPresentFlag : 1\n");
    
  •   fprintf(stderr, "      colourPrimaries : 9\n");
    
  •   m_stEncodeConfig.encodeCodecConfig.hevcConfig.hevcVUIParameters.videoSignalTypePresentFlag |= 1;
    
  •   m_stEncodeConfig.encodeCodecConfig.hevcConfig.hevcVUIParameters.videoFormat = 5;
    
  •   m_stEncodeConfig.encodeCodecConfig.hevcConfig.hevcVUIParameters.videoFullRangeFlag |= 1;
    
  •   m_stEncodeConfig.encodeCodecConfig.hevcConfig.hevcVUIParameters.colourDescriptionPresentFlag |= 1;
    
  •   m_stEncodeConfig.encodeCodecConfig.hevcConfig.hevcVUIParameters.colourPrimaries = 9;
    
  •   /***End of changing***/
    

    }

    NV_ENC_CAPS_PARAM stCapsParam;

Exact sequence of steps (with source code) in the application
Please download ZIP archive with sources from Dropbox - File Deleted

Preferably, please share an application which reproduces the problem
In the ZIP archive above you can find README.txt with steps to reproduce the problem.

Here is the screenshot with parsed VUI parameters in the result HEVC file.
http://joxi.ru/E2p6onu9G6YGrY
You can see that hevcVUIParameters are not applied.

Thanks for the update. We were able to reproduce and root cause the issue. This will be fixed in the upcoming SDK. Thank you for reporting the issue.