Hi, I’m trying to use nvjpeg decode jpg, base on “06_jpeg_decode” samples, I’ve modified it for tests.
First, convert 1 bmp image(1920x1080) to yuv420p/yuv422p/yuv444p yuv data, then use turbojpeg to get 3 different planar jpg files, all encode with 85 quailty.
yuv420p jpg decode: Average in 2.8ms, it works and great.
yuv422p jpg decode: Average in 55.5ms, it takes almost 20x time, much slower than turbojpeg software decode. And it prints for everytime when decoding : “Consume the extra signalling for EOS” “NvMMLiteOpen” “NvMMLiteBlockCreate”
yuv444p jpg decode: Average in 57.2ms, same as yuv422p
I read the doc about orin’s NVJPEG, if 444p cost 2X time than 420p is acceptable, but 20X time is so ridiculous, especially much slower than software decode.
The tests are simple, createJPEGDecoder → decodeToFd (cycle 100x), I’ve review the “decodeToFd”, it seems have no options/settings for different planars (it shouldn’t , other hw decoder for jpg are simple too). I’ve add some print at “pixel_format” , so it can recognize different planars. But “jpeg_start_decompress” in jpeglib , can’t see more detail.
So, is there any solutions for jpeg decode with yuv422p/yuv444p? USB Camera’s MJPEG stream all are yuv422p, software decoder not fast enough.
Here are some system info, jetpack6.1 L4T 36.4.0
Here are test code.
test_code.zip (1.5 MB)
Thanks