Hi guys,
I have an issue when trying to use nvjpegenc from my C++ application.
When I run the app I receive immediately: “JPEG parameter struct mismatch: library thinks size is 584, caller expects 728”
But , when I ran the same pipeline from the same Nvidia jetson NX (JP 4.6) Terminal it works fine!
gst-launch-1.0 nvarguscamerasrc ! ‘video/x-raw(memory:NVMM), width=1920, height=1080, format=NV12’ ! nvjpegenc ! filesink location=test.jpg
Any thoughts?
Hi,
Please build the C++ application with the lib:
/usr/lib/aarch64-linux-gnu/tegra/libnvjpeg.so
And try again.
Hi,
I built the app with the library but it will won’t work on runtime. same error.
Here is my CMake link:
find_library(NVJPEG_LIBRARY
NAMES nvjpeg
HINTS /usr/lib/aarch64-linux-gnu/tegra)
if(NVJPEG_LIBRARY)
message(STATUS “Found NVJPEG library: ${NVJPEG_LIBRARY}”)
else()
message(FATAL_ERROR “Could not find NVJPEG library”)
endif()
Link the library to your target
target_link_libraries(Chimera ${NVJPEG_LIBRARY})
cmake print is: – Found NVJPEG library: /usr/lib/aarch64-linux-gnu/tegra/libnvjpeg.so
Hi,
Another possibility is the app is linked to both libnvjpeg.so and libjpeg.so . Please check this and remove linking to libjpeg.so .
Hi,
You are right, I have a link to libjpeg.so as well, but I can’t remove it because I use opencv in my code and it depends on it.
libnvjpeg.so and libjpeg.so can’t be linked together?
system
Closed
July 3, 2024, 2:31am
8
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.