About the library of sample application 06_jpeg_decode

Hello,

To use the nvjpg hardware decoder,
I referenced the Rules.mk file in /usr/src/jetson_multimedia_api/samples directory.

But, I encouter undefined reference to ‘jpeg_std_error’ In function ‘NvJPEGDecoder::NvJPEGDecoder(char const*)’;

What am I supposed to do?

Thank you.

Hi,
It should be compiled by default.

nvidia@nvidia-desktop:/usr/src/jetson_multimedia_api/samples/06_jpeg_decode$ sudo make
[sudo] password for nvidia:
Compiling: jpeg_decode_csvparser.cpp
Compiling: jpeg_decode_main.cpp
Linking: jpeg_decode
nvidia@nvidia-desktop:/usr/src/jetson_multimedia_api/samples/06_jpeg_decode$

Please check Makefile. Probably some library links are missing.

Hello,

06_jpeg_decode 샘플코드를 참고하여
스트림으로 jpeg 이미지 버퍼를 가져와서 jpeg_decode_proc함수 안의

ctx.jpegdec->decodeToFd함수를 사용해서 하드웨어 디코딩으로 YUV를 얻고 싶습니다.

하지만 번번히 오류가 납니다.
make파일에서 라이브러리 설정할 때 주의해야하는 부분이 있습니까?

========================================
In function NvJPEGDecoder::NvJPEGDecoder(char const*)': NvJpegDecoder.cpp:(.text+0x64): undefined reference to jpeg_std_error
NvJpegDecoder.cpp:(.text+0x84): undefined reference to **jpeg_CreateDecompress**' /home/jetson5/(NvJpegDecoder.o): In function NvJPEGDecoder::~NvJPEGDecoder()’:
NvJpegDecoder.cpp:(.text+0x190): undefined reference to **jpeg_destroy_decompress**' /home/jetson5(NvJpegDecoder.o): In function NvJPEGDecoder::decodeToFd(int&, unsigned char*, unsigned long, unsigned int&, unsigned int&, unsigned int&)’:
NvJpegDecoder.cpp:(.text+0x4fc): undefined reference to **jpeg_mem_src**' NvJpegDecoder.cpp:(.text+0x518): undefined reference to jpeg_read_header
NvJpegDecoder.cpp:(.text+0x5b4): undefined reference to **jpeg_start_decompress**' NvJpegDecoder.cpp:(.text+0x738): undefined reference to jpeg_finish_decompress
NvJpegDecoder.cpp:(.text+0x77c): undefined reference to **jpeg_read_raw_data**' NvJpegDecoder.cpp:(.text+0x788): undefined reference to jpeg_finish_decompress

감사합니다.

Hi,
It looks like you don’t link to

/usr/lib/aarch64-linux-gnu/tegra/libnvjpeg.so
1 Like