Latency of MSENC and NVDEC/ Cache sync on Jetson TX2

Hi all,

I am interested to the latency of hardware engine (encoder and decoder) on Jetson TX2.

For encoder, I obtain : (for 4096x2160 yuv frames)
—> ~ 30 ms with gstreamer
—> ~ 50 ms with mmapi
—> ~ 60 ms with v4l2(h264 stream presents corruption, I think this is result of memory sync)

For decoder, values are more bigger.

  1. so I am interested that you share your results to compare them with what I obtain and to see if what i have obtained is very large and then to try to change my implementations to improve my latencies.

  2. when using v4l2 directly, how can I sync cache for better results (in other threads, with MMAPI, it is recommended to use functions in nvbuf_utils.h) how we can do this in v4l2 ?

  3. My latencies are not fixed. Sometimes and for the same codes with different API, I obtain different values. Is this normal ? For example, for MMAPI, I reach a latency of 30 ms for 2 or 3 times. What could be the cause ?

Hope that you share your experiences !!!

Regards,

A few relative posts about video encoding:
https://devtalk.nvidia.com/default/topic/1008984/jetson-tx2/video-encode-speed/post/5149942/#5149942
https://devtalk.nvidia.com/default/topic/1036725/jetson-tx2/clarification-on-tx2-max-hw-encode-resolution/post/5267392/#5267392
https://devtalk.nvidia.com/default/topic/1028317/jetson-tx2/h264-encoder-latency/post/5260699/#5260699

The resolution affects the latency.
Overall frame rate looks good. Actually it is better than 4Kp60. For latency, it is more like enhancement and we currecntly have no plan for it. Some other users may share their experience.