Hello, I am trying to use nvjpeg decoder to decode JPEG images. Based on the “jetson_multimedia_api/samples/12_v4l2_camera_cuda” sample code, I have modified it for testing purposes.
1.Tested decoding a 1080P JPEG image read from a file or directly obtained from a USB camera into a YUV image using the nvjpeg decoder’s decodeToFd.
Found that the average decoding time per frame is about 85ms. The decoding speed is too slow, which is definitely abnormal.
Please refer to the attachment for the test code.
The test command is: ./v4l2_camera_cuda -d /dev/video0 -s 1920x1080 -f MJPEG -n 2
During testing, every time a JPEG frame is decoded, the following message appears: NVMMLITE_NVVIDEODEC, NvVideoBufferProcessing:6109 Consume the extra signalling for EOS.
2.Testing environment is Orin Nano。
/$ jetson_release -v
Software part of jetson-stats 4.3.2 - (c) 2024, Raffaello Bonghi
Model: NVIDIA Jetson Orin Nano Developer Kit - Jetpack 6.0 [L4T 36.3.0]
NV Power Mode[0]: 15W
Serial Number: [XXX Show with: jetson_release -s XXX]
Hardware:
- Module: Check with sudo
- SoC: tegra234
- CUDA Arch BIN: 8.7
Platform: - Machine: aarch64
- System: Linux
- Distribution: Ubuntu 22.04 Jammy Jellyfish
- Release: 5.15.136-tegra
- Python: 3.10.12
jtop: - Version: 4.3.2
- Service: Active
Libraries: - CUDA: 12.2.140
- cuDNN: 8.9.4.25
- TensorRT: 8.6.2.3
- VPI: 3.1.5
- Vulkan: 1.3.204
- OpenCV: 4.8.0 - with CUDA: NO
cat /etc/nv_tegra_release
R36 (release), REVISION: 3.0, GCID: 36191598, BOARD: generic, EABI: aarch64, DATE: Mon May 6 17:34:21 UTC 2024
KERNEL_VARIANT: oot
TARGET_USERSPACE_LIB_DIR=nvidia
TARGET_USERSPACE_LIB_DIR_PATH=usr/lib/aarch64-linux-gnu/nvidia
-
I found a similar issue at this URL: Jpeg decode very slow for non-yuv420p jpg .
-
How can this problem of JPEG-to-YUV decoding being too slow be resolved?
-
The test code is provided in the attachment.
12_v4l2_camera_cuda.zip (317.5 KB)

