Hello DaneLLL, About 06_jpeg_decode

Hello,

INC_DIRS -I/usr/src/jetson_multimedia_api/include -I/usr/src/jetson_multimedia_api/include/libjpeg-8b

INC_DIRS += -I$(ALGO_CUDA_DIR) -I$(ALGO_TRT_DIR) -I$(TARGET_ROOTFS)/$(CUDA_PATH)/include

INC_DIRS += -I$(TARGET_ROOTFS)/usr/include/(TEGRA_ARMABI) -I(TARGET_ROOTFS)/usr/include/libdrm

INC_DIRS += -I$(TARGET_ROOTFS)/usr/include/opencv4

LIB_DIRS += -L$(TARGET_ROOTFS)/(CUDA_PATH)/lib64 -L(TARGET_ROOTFS)/usr/lib/(TEGRA_ARMABI) -L(TARGET_ROOTFS)/usr/lib/$(TEGRA_ARMABI)/tegra

========================
DaneLLL
Hi,
It looks like you don’t link to

/usr/lib/aarch64-linux-gnu/tegra/**libnvjpeg.so**

==============================

Linked all as shown above.

Thank you.

Hi,
The issue should be you build NvJpegDecoder with OpenCV. OpenCV links to libjpeg.so, which contradicts with libnvjpeg.so. You may eliminate OpenCv and try again.

Hello,

How to eleminate OpenCV on NANO?

Thank you

Hi,
This should not be required:

INC_DIRS += -I$(TARGET_ROOTFS)/usr/include/opencv4

And these section in Rules.mk:

LDFLAGS += \
	-lpthread -lv4l2 -lEGL -lGLESv2 -lX11 \
	-lnvbuf_utils -lnvjpeg -lnvosd -ldrm \
	-lcuda -lcudart \
	-lnvinfer -lnvparsers \
	-L"$(TARGET_ROOTFS)/$(CUDA_PATH)/lib64" \
	-L"$(TARGET_ROOTFS)/usr/lib/$(TEGRA_ARMABI)" \
	-L"$(TARGET_ROOTFS)/usr/lib/$(TEGRA_ARMABI)/tegra"

You should need -lnvbuf_utils -lnvjpeg

Hello,

Can I get rid of opencv in /usr/src/jetson_multimedia_api/samples/common/Rules.mk

commenting out #-I"$(TARGET_ROOFS)/usr/include/opencv4 ?

Thank you.

Hi,
Rules.mk is required for building the samples. You can refer to it and write your own Makefile.

Hello,

I tried to this.

But same error occurred.

What am I supposed to do?

Thank you.

Hello,

Hello,

INC_DIRS += -I…/…/OpenSSL/$(GFV_TMN)/include -I/usr/src/jetson_multimedia_api/include -I/usr/src/jetson_multimedia_api/include/libjpeg-8b

INC_DIRS += -I$(ALGO_CUDA_DIR) -I$(ALGO_TRT_DIR) -I$(TARGET_ROOTFS)/$(CUDA_PATH)/include

INC_DIRS += -I$(TARGET_ROOTFS)/usr/include/(TEGRA_ARMABI) -I(TARGET_ROOTFS)/usr/include/libdrm

LIB_DIRS += -L$(TARGET_ROOTFS)/(CUDA_PATH)/lib64 -L(TARGET_ROOTFS)/usr/lib/(TEGRA_ARMABI) -L(TARGET_ROOTFS)/usr/lib/$(TEGRA_ARMABI)/tegra

LIBS += -lnvjpeg
-lpthread -lv4l2 -lEGL -lGLESv2 -lX11
-lnvbuf_utils -lnvosd -ldrm
-lcuda -lcudart
-lnvinfer -lnvparsers \

How can I solve this problem?

Thank you.

Hi,
Since we have the samples open source. For customization, you may refer to the default code. Other users can share you experience.

1 Like

Hi DaneLLL.

Thank you for your answer and support.

How can I get the open source you mentioned above?

👍

Hi,
The samples are in

/usr/src/jetson_multimedia_api/

For building 06_jpeg_decode, you would need the files:

/usr/src/jetson_multimedia_api/samples/06_jpeg_decode/Makefile
/usr/src/jetson_multimedia_api/samples/Rules.mk

Fur customizing the make files, you can try to integrate Rules.mk to Makefile first.

1 Like