Jpeg encodeFromFd makes corrupted frame

I’m making application that will stream jpeg images. It works fine on TX2 but on Xavier AGX I getting corrupted frames. Looks like jpeg size is broken or jpeg encoder didn’t complete the frame. I made small example that demonstrate the issue: it makes frames with random lines, converts yuv422 to yuv420, encodes it to jpeg, sends over HTTP and saving to local file. In browser you will see that image height changes. In saved files you will see that jpeg-s are broken:

I’m using JP 4.6.1 and L4T 32.7.1

To reproduce the issue:
run ./main_http_jpg --port 5555 --max_size 640 --quality 75
main_http_jpg.cpp (5.0 KB)
and open test.html in browser on the xavier
test.html (1.4 KB)

Not sure, but what gives ? :

ldd ./main_http_jpg

Please try to reproduce the issue with our demo sample:


See if the issue is also present by running the sample. (0x0000ffffbacda000) => /lib/aarch64-linux-gnu/ (0x0000ffffbac6b000) => /usr/lib/aarch64-linux-gnu/ (0x0000ffffbac59000) => /usr/lib/aarch64-linux-gnu/ (0x0000ffffbabc5000) => /usr/lib/aarch64-linux-gnu/ (0x0000ffffbab9b000) => /usr/lib/aarch64-linux-gnu/tegra/ (0x0000ffffbaa85000) => /usr/lib/aarch64-linux-gnu/tegra/ (0x0000ffffbaa6a000) => /usr/lib/aarch64-linux-gnu/tegra/ (0x0000ffffbaa10000) => /usr/lib/aarch64-linux-gnu/ (0x0000ffffba9ac000) => /usr/lib/aarch64-linux-gnu/ (0x0000ffffba7c7000) => /lib/aarch64-linux-gnu/ (0x0000ffffba71c000) => /lib/aarch64-linux-gnu/ (0x0000ffffba6f8000) => /lib/aarch64-linux-gnu/ (0x0000ffffba585000)
/lib/ (0x0000ffffbacaa000) => /usr/lib/aarch64-linux-gnu/ (0x0000ffffba4ff000) => /lib/aarch64-linux-gnu/ (0x0000ffffba4eb000) => /usr/lib/aarch64-linux-gnu/tegra/ (0x0000ffffba4ca000) => /usr/lib/aarch64-linux-gnu/tegra/ (0x0000ffffba4b2000) => /usr/lib/aarch64-linux-gnu/tegra/ (0x0000ffffba47c000) => /usr/lib/aarch64-linux-gnu/ (0x0000ffffba458000) => /usr/lib/aarch64-linux-gnu/tegra/ (0x0000ffffba43b000) => /usr/lib/aarch64-linux-gnu/tegra/ (0x0000ffffba428000) => /usr/lib/aarch64-linux-gnu/tegra/ (0x0000ffffba404000) => /usr/lib/aarch64-linux-gnu/tegra/ (0x0000ffffba3db000) => /usr/lib/aarch64-linux-gnu/tegra/ (0x0000ffffba323000) => /usr/lib/aarch64-linux-gnu/tegra/ (0x0000ffffba2ab000) => /lib/aarch64-linux-gnu/ (0x0000ffffba293000) => /usr/lib/aarch64-linux-gnu/tegra/ (0x0000ffffba27f000) => /usr/lib/aarch64-linux-gnu/tegra/ (0x0000ffffba25f000) => /usr/lib/aarch64-linux-gnu/tegra/ (0x0000ffffba23a000) => /usr/lib/aarch64-linux-gnu/tegra/ (0x0000ffffba226000) => /usr/lib/aarch64-linux-gnu/tegra/ (0x0000ffffba20f000) => /usr/lib/aarch64-linux-gnu/ (0x0000ffffba084000) => /usr/lib/aarch64-linux-gnu/tegra/ (0x0000ffffba06b000) => /usr/lib/aarch64-linux-gnu/tegra/ (0x0000ffffba044000) => /usr/lib/aarch64-linux-gnu/tegra/ (0x0000ffffb9f65000) => /usr/lib/aarch64-linux-gnu/tegra/ (0x0000ffffb9e6e000) => /usr/lib/aarch64-linux-gnu/tegra/ (0x0000ffffb9e4e000) => /usr/lib/aarch64-linux-gnu/tegra/ (0x0000ffffb9e02000) => /usr/lib/aarch64-linux-gnu/tegra/ (0x0000ffffb9ded000)

I tried to reproduce with 05_jpeg_encode, but it compress only one frame per run and issue doesn’t happen.

The NvJpegEncoder is implemented for single JPEG encoding. Please refer to discussion in
JPEG encoding is not continuous

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.