Hi, I’m trying to use the setROIParams function on Jetson Xavier NX platform (should also work on other Jetson devices) to implement dynamic RoI encoding to encode a video. Our goal is to use Jetson’s hardware acceleration for video encoding and set different QP value for different regions. We used the function as in the API docs in our C++ code (ROIRect and QPdelta and maximum 8 RoI regions). But the problem is that the RoI encoding sometimes works and sometime fails (with no RoI encoded at all). We’ve tried different RoI location, area and QP value but still don’t understand when it work and when it fails. Some of our observations are:
- The RoI region can’t be the same as frame size. It must be a little smaller than the frame size. But we don’t know how that exact value is defined.
- The default QP value for unset region is unknown. Sometimes it seems their QP is very low (good quality) while sometimes the figure is almost static (unchanged).
- Seems a single RoI region can’t be too large. Maybe it can’t cross multiple slices?
- Sometimes the encoded video size is very large (3M+) and sometimes only 500KB with only a slight change of ROI region…
The official docs provide nearly no explanation for the usage of this function and there’s no way to debug since the values are directly set to the registers. All we know is the parameter format from notes of source code… Is there any one have used this function or give us some reference of how to use that? Thanks a lot!!!