Hi Vick,
Thanks for your quick reply. We got that it is not supported for RGBA and YUV422. Now in this issue, we focus on why format YUV420 semiplanar (NV21) does not work.
There is an image in directory /drive-linux/samples/Media/fisheye_1280_1080_yuv420.yuv, which is actually YUV420 I420 format with 3 planes.
1.If I use original code with YUV420(I420, 3 planes) sample image, it works. Attached the config file and img:
img_fisheye_1280_1080.I420 (9.9 MB)
img_fisheye_1280_1080_out.yuv420 (2.0 MB)
ldc_gen_warpmap_I420.conf (3.2 KB)
2.If I convert img format from I420 to YV12(3 planes), it works. Attached the config file and img:
img_fisheye_1280_1080.yv12 (9.9 MB)
img_fisheye_1280_1080_out.yv12 (2.0 MB)
ldc_gen_warpmap_yv12.conf (3.2 KB)
Above case is very very strange because originally nvmimg_ldc allocate 2 planes YUV , instead of 3 planes:
CreateSciBuf(2, srcWidth, srcHeight, pLDC, sciBufModule, &curr, &sciBufAttrListSrc);
And if I change it to 3 planes with CreateSciBuf(3, …), NvMediaLdcProcess will report err 6. syslog reports:
May 17 11:51:55 tegra-ubuntu nvmimg_ldc: Module_id 56 Severity 2 : failed to fill config struct, pixel format invalid
May 17 11:51:55 tegra-ubuntu nvmimg_ldc: NvLogOsSupportEnabled: nvlog DT node is not enabled, disabling library
May 17 11:51:55 tegra-ubuntu nvmimg_ldc: NvLogOsInit - NvLog support is not enabled
May 17 11:51:55 tegra-ubuntu nvmimg_ldc: Module_id 56 Severity 2 : failed to submit NvVIC geotrans operation 2
May 17 11:51:55 tegra-ubuntu nvmimg_ldc: Module_id 50 Severity 2 : failed to submit LDC operation, NvVIC failed with 2
May 17 11:51:55 tegra-ubuntu nvmimg_ldc: Module_id 50 Severity 2 : failed to submit NvMediaLdc operation 6
- If I convert img format from I420 to NV21 (semiplanar), sample runs without error logs, but image is wrong (Y correct, U/V wrong), Attached the config file and img
img_fisheye_1280_1080.nv21 (9.9 MB)
img_fisheye_1280_1080_out.nv21 (2.0 MB)
ldc_gen_warpmap_nv21.conf (3.2 KB)
BTW, Which API tells LDC what input YUV format should be? It was confused to process YV12 with 2 plane buffers.