Please provide the following info (tick the boxes after creating this topic):
Software Version
DRIVE OS 6.0.10.0
DRIVE OS 6.0.8.1
DRIVE OS 6.0.6
DRIVE OS 6.0.5
DRIVE OS 6.0.4 (rev. 1)
DRIVE OS 6.0.4 SDK
other
Target Operating System
Linux
QNX
other
Hardware Platform
DRIVE AGX Orin Developer Kit (940-63710-0010-300)
DRIVE AGX Orin Developer Kit (940-63710-0010-200)
DRIVE AGX Orin Developer Kit (940-63710-0010-100)
DRIVE AGX Orin Developer Kit (940-63710-0010-D00)
DRIVE AGX Orin Developer Kit (940-63710-0010-C00)
DRIVE AGX Orin Developer Kit (not sure its number)
other
SDK Manager Version
2.1.0
other
Host Machine Version
native Ubuntu Linux 20.04 Host installed with SDK Manager
native Ubuntu Linux 20.04 Host installed with DRIVE OS Docker Containers
native Ubuntu Linux 18.04 Host installed with DRIVE OS Docker Containers
other
Issue Description
Hi all, I am hoping to understand the steps & requirements for setting up the buffer & synchronization mechanism between passing the SIPL buffers to IEP for encoding. Both SIPL (ISP output only) & IEP are running in the same process.
NvSciBuf
Do I need to follow the steps in how-to-shared-scibufobj-between-two-function-engines to create the NvSciBufObj
? It seems like it is possible to just pass the SIPL buffer pointer into NvMediaIEPFeedFrame
(see pseudo code below).
- The SDK API also strongly recommended that the
NvSciBufObj
be registered withNvMediaIEPRegisterNvSciBufObj()
, does this need to be done, if yes do I only need to register it once with the first SIPL buffer received?
INvSIPLClient::INvSIPLNvMBuffer* nvm_buf; // buffer from SIPL
NvSciBufObj buf_ptr = nvm_buf->GetNvSciBufImage();
NvMediaIEPFeedFrame(encoder_context_,
buf_ptr,
&encode_pic_params_H265_,
NVMEDIA_ENCODER_INSTANCE_0);
NvSciSync
Pre-fence
For synchronization of the SIPL ISP output into IEP, is it possible to use the EOF from SIPL Buffer as a pre-fence for NVMediaIEPFeedFrame
? Similar to what was suggested in how-to-shorten-the-image-process-time.
- I also see that the encoder sample app has a
preSyncObj
(of typeNvSciSyncObj
). Is this needed because the sample app is retrieving the image from a queue and putting it into a buffer?
NvSciSyncFence fence = NvSciSyncFenceInitializer;
auto status = nvm_buf->GetEOFNvSciSyncFence(&fence);
auto status = NvMediaIEPInsertPreNvSciSyncFence(encoder_context_, fence);
/*** Then call NvMediaIEPFeedFrame() ***/
End-fence
I think that an EOF is also needed to signify that NvMediaIEPFeedFrame()
has completed, similar to the IEP encoder sample app. Does the pseudo code look correct?
- For creating the NvSciSync for IEP, can it be independent of SIPL since it is only signalling the EOF for IEP feed frame, or do I need to setup the NvSciSync list with both SIPL & IEP, and then reconcile it? If I need to set it up with SIPL & IEP, do I just call
NvMediaIEPFillNvSciSyncAttrList
andINvSIPLCamera::FillNvSciSyncAttrList
to set up the attribute list before reconciling?
// Setup the sync object attributes.
NvSciSyncAttrListCreate()
NvSciSyncAttrListSetAttrs()
NvSciSyncAttrListReconcile()
NvSciSyncObjAlloc() // Alloc for eofSyncObj.
NvSciSyncFence eof_fence = NvSciSyncFenceInitializer;
status = NvMediaIEPRegisterNvSciSyncObj(encoder_context_, NVMEDIA_EOFSYNCOBJ, eofSyncObj);
status = NvMediaIEPSetNvSciSyncObjforEOF(encoder_context_, eofSyncObj)
status = NvMediaIEPGetEOFNvSciSyncFence(encoder_context_, eofSyncObj, &eof_fence);
/*** Call NvMediaIEPFeedFrame() ***/
status = NvMediaIEPGetEOFNvSciSyncFence(encoder_context_, eofSyncObj, &eof_fence);
Thanks in advance for the help!