Problem with NvMedia2DBlitEx and NvMediaIEPFeedFrame

Please provide the following info (check/uncheck the boxes after creating this topic):
Software Version
DRIVE OS Linux 5.2.6
DRIVE OS Linux 5.2.6 and DriveWorks 4.0
[√] DRIVE OS Linux 5.2.0
DRIVE OS Linux 5.2.0 and DriveWorks 3.5
NVIDIA DRIVE™ Software 10.0 (Linux)
NVIDIA DRIVE™ Software 9.0 (Linux)
other DRIVE OS version
other

Target Operating System
[√] Linux
QNX
other

Hardware Platform
NVIDIA DRIVE™ AGX Xavier DevKit (E3550)
[√] NVIDIA DRIVE™ AGX Pegasus DevKit (E3550)
other

SDK Manager Version
1.9.1.10844
other

Host Machine Version
[√] native Ubuntu 18.04
other

Hi experts.
We have four cameras running on one xavier, and the original image data format is yuv422. We convert yuv422 to yuv420 through 2d conversion of NvMedia2DBlitEx, and then call NvMediaIEPFeedFrame to encode the NvMediaImage of yuv420.
But we often encounter the problem of NvMedia2DBlitEx conversion timeout of 10 seconds.
We are unable to reproduce this issue at the moment, but would like to ask the following question:
(1)We used NvMedia2DBlitEx for 2D conversion. What would be the problem if we don’t use nvsci for synchronization?
(2)Can we use the NvMediaIEPFeedFrame interface simultaneously in different threads to encode data for all cameras?
(3)Can the OnFrameAvailable callback function for the same camera be executed in different threads? When the callback function for the previous frame of the image has not been processed, the next frame of the image can also be processed.
(4)Is the operation of NvMedia2DCopyPlane also done through VIC?

Could you upgrade to the latest release, 5.2.6, and check if the problem persists?

It is currently unlikely to upgrade as it has already been widely used in production environments.

Please refer to NvMedia APIs and Thread Safety for your questions.

Also, yes, NvMedia2DCopyPlane() is done through VIC.

Thanks, I also want to ask a question. I create different instances of the same component in different threads. Can the APIs be used from different threads concurrently?

As mentioned in the documentation, NvMedia APIs are not designed to be thread-safe. Therefore, if you’re using them in a multi-threaded environment, it’s the application’s responsibility to ensure thread safety to prevent conflicts or unexpected behavior.

If I have 4 cameras connected at the same time. They are in different threads, and they all need to be resized. So they can only use API NvMedia2DBlitEx one by one and cannot be processed in parallel, is that right?

@VickNV Can you help answer this question? thanks!

You can attempt simultaneous calls to NvMedia2DBlitEx() using different 2D objects created by NvMedia2Dcreate(). This approach should work without encountering issues.

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