NVIDIA / CUDALibrarySamples

CUDA Library Samples
Other
1.59k stars 340 forks source link

Why is the encoding speed of nvJPEG2000-Encoder so slow? #205

Open MakerLiu opened 2 months ago

MakerLiu commented 2 months ago

Screencast.webm I am using nvJPEG2000 to encode 3040*2160 PGM images on an NVIDIA Jetson AGX Orin (32G) device. On average, encoding a JP2 image takes 0.34 seconds. You can see the video I uploaded. Is this speed reasonable? Where might the performance bottleneck be, and can you provide some suggestions? Thank you!

MakerLiu commented 2 months ago

Screenshot from 2024-08-07 17-44-38

zohebk-nv commented 1 month ago

Hi @MakerLiu, from the screen cast that you've shared, the throughput achieved by nvjpeg2k is about 7 images/sec. The lower speed likely due the heavy computation requirements of JPEG2000 encoding process. What is the bitdepth of the image that you are compressing? If the bitdepth is closer to 16, then the perf that you are seeing seems plausible.

Would it be possible for you to share details of your workflow? I can check to see if there any encode parameters that could be of use