Latency of tx2nx encoder and decoder

I’m using tx2nx to test the latency of the encoding and decoding.
My test method is here.
PC connect to FPGA. Then FPGA marks the precise time on the received picture. Then output to the display A and tx2nx’s caputure HDMI. The tx2nx receive the video. encode->decode->display B. At last, compare the time of display A and display B. It’s about 66ms.The latency is about 4 frame. How to reduce the latency?

Hi,
Please enable max performance mode to encoder and decoder. And set disable-dpb=true and try again.

In gstreamer, the properties are
Jetson Nano 4K decode&encode latency - #4 by DaneLLL

You can see similar options in jetson_multimedia_api.

ret = dec->disableDPB();
TEST_ERROR(ret < 0, "Error in decoder disableDPB", cleanup);

ret = dec->setMaxPerfMode(1);
TEST_ERROR(ret < 0, "Error while setting decoder to max perf", cleanup);

ret = enc->setMaxPerfMode(1);
TEST_ERROR(ret < 0, "Error while setting encoder to max perf", cleanup);

I have already setted this and sudo jetson_clocks.

Hi,
Please also set this option to encoder:

        -hpt <type>           HW preset type (1 = ultrafast, 2 = fast, 3 = medium,  4 = slow)

Please set to ultrafast to get fastest encoding speed.
Basically if these options are set, it is optimal performance for encoder and decoder. There may not have room for further improvement.

And there is option –stats in 00_video_decode and 01_video_encode. Please run and check the results for reference.