About jpeg decode different on nano and nx

now i test the jpeg decode on the platform nano and nx,my jpeg resolution is 4096x2608,
but when i run at the nano result is follow:
ctx.use_fd---------1
–fd–finish-start=46
Image Resolution - 4096 x 2608
libv4l2_nvvidconv (0):(802) (INFO) : Allocating (1) OUTPUT PLANE BUFFERS Layout=0
libv4l2_nvvidconv (0):(818) (INFO) : Allocating (1) CAPTURE PLANE BUFFERS Layout=0
----------- Element = jpegdec -----------
Total units processed = 300
Average latency(usec) = 46664
Minimum latency(usec) = 37887
Maximum latency(usec) = 65175

App run was successful

but when i run the same program on nx,the result is follow:
ctx.use_fd---------1
–fd–finish-start=81
Image Resolution - 4096 x 2608
libv4l2_nvvidconv (0):(802) (INFO) : Allocating (1) OUTPUT PLANE BUFFERS Layout=0
libv4l2_nvvidconv (0):(818) (INFO) : Allocating (1) CAPTURE PLANE BUFFERS Layout=0
----------- Element = jpegdec -----------
Total units processed = 300
Average latency(usec) = 80999
Minimum latency(usec) = 76219
Maximum latency(usec) = 90372

App run was successful

so whether on the nano jpeg decode is fast then the nx?

Hi,
Please refer to power modes in
https://docs.nvidia.com/jetson/l4t/index.html#page/Tegra%2520Linux%2520Driver%2520Package%2520Development%2520Guide%2Fpower_management_jetson_xavier.html%23wwpID0E0NO0HA
By default Xavier NX is in 10W mode. Please set to 15W mode and try again.

hi ,thanks for your help ,now set the nx power modes to 0,but the result is follow:
root@ubuntu-NX:/nfsroot/pd/jetson_multimedia_api_new/samples/06_jpeg_decode# ./jpeg_decode num_files 1 4096-2608.jpg 4096-2608.yuv --perf
ctx.use_fd---------1
–fd–finish-start=80
Image Resolution - 4096 x 2608
libv4l2_nvvidconv (0):(802) (INFO) : Allocating (1) OUTPUT PLANE BUFFERS Layout=0
libv4l2_nvvidconv (0):(818) (INFO) : Allocating (1) CAPTURE PLANE BUFFERS Layout=0
----------- Element = jpegdec -----------
Total units processed = 300
Average latency(usec) = 80946
Minimum latency(usec) = 73336
Maximum latency(usec) = 86142

App run was successful
display the mode:
NV Fan Mode:quiet
NV Power Mode: MODE_15W_2CORE
0

set power to 2,the result is follow:
ctx.use_fd---------1
–fd–finish-start=80
Image Resolution - 4096 x 2608
libv4l2_nvvidconv (0):(802) (INFO) : Allocating (1) OUTPUT PLANE BUFFERS Layout=0
libv4l2_nvvidconv (0):(818) (INFO) : Allocating (1) CAPTURE PLANE BUFFERS Layout=0
----------- Element = jpegdec -----------
Total units processed = 300
Average latency(usec) = 80887
Minimum latency(usec) = 74524
Maximum latency(usec) = 90078

App run was successful
that is display the mode
NV Fan Mode:quiet
NV Power Mode: MODE_15W_6CORE
2

hi DaneLLL,so how can i know why the nx jpeg decode is slow then the nano?
i use the jtop ,found that on nano the nvjpeg freq display follow:

image

but on nx the nvjpeg freq display follow:
image

Hi,
We also have the same observation that Jetson Nano has better performance. It is under investigation and will update.

thanks for your help.please fix it tell me

hi DaneLLL ,is that problem fixed ?

Hi,

It is still under investigation. We are checking why the clock value is low on Xavier NX.

so whether we can modify the /sys/kernel/debug/bpmp/debug/clk/nafll_nvjpg/ceil_rate value to increase the clock value

and how much the max value of the /sys/kernel/debug/bpmp/debug/clk/nafll_nvjpg/ceil_rate can be set

Hi,
We have some investigation and confirmed that due to the design of Xavier NX module, NVJPG engine cannot achieve the same performance as Jetson Nano. Please note this.