Video Encoder qpMap feature for low bitrate applications

I see that Jetson V4L2 interface only supports 8 ROI per frame. For my application, I need QPmap per MB similar to Video Codec SDK. There we set NV_ENC_RC_PARAMS::qpMapMode to NV_ENC_QP_MAP_DELTA when initializing the rate control, then pass Qp delta map when we pass video frame to encoder within NV_ENC_PIC_PARAMS struct, where NV_ENC_PIC_PARAMS::qpDeltaMap is an array, which has signed 8 bits per MB for qp delta map for that block.

How can I have access qpMap in Jetson Nano or AGX?

Hi,
The interface and capability are different between desktop GPUs and Jetson platforms. If you would like to port the application to Jetson platforms, would need to do adaptation. Please refer to populate_roi_Param() in 01_video_encode.

Please also check document:
Jetson Linux API Reference: 01_video_encode (video encode)

@DaneLLL

Will populate_roi_Param() have a limitation of 8 regions?
We will need # of ROIs is same as # of macroblock (16x16) of a frame.

Thanks,
FC

Hi,
Yes, it is the limitation as described in
Jetson Linux API Reference: V4L2 Video Encoder

@DaneLLL

Our project uses AGX and we need to have # of ROIs is as large as # of MacroBlocks?
Is # of ROIs=8 due to limitation of HW or it is a SW limitation?
If the limitation is from SW, can we implement new SW to remove it and how?

Thanks,

Hi,
It is a SW limitation but you are not able to modify it in upper layer. Need modification in low-level code. Could you share more information about the use-case? And how many ROIs you need in the use-case? We would need the information and check with our teams.

@DaneLLL

We have developed a preprocessing algorithm which classifies each MacroBlock (16x16) into a different priority class and encode each MB with different QP based on priority class of each MB. So in theory, max number of ROIs we need is # of MB (16x16) of a frame.

Thanks,
FC

Hi,
We have discussion about this use-case and there is concern about it. You would like to set QP value of each block. We have never done such experiment before. Besides, there is concern in encoding performance.

Since the use-case is advancing, we may not be able to support it.

I don’t understand why you have a concern of encoding performance if AGX encoder HW is the same as Desktop GPU because Desktop GPU supports emphasis map API which is the feature we need on AGX<
NVENC Video Encoder API Programming Guide :: NVIDIA Video Codec SDK Documentation