NVIDIA DRIVE OS Linux SDK API Reference

5.2.0 Release
For Test and Development only
Image OFST Synchronization

Detailed Description

The NvMedia IOFST NvSciSync API encompasses all NvMediaIOFST NvSciSync handling functions.

Macros

#define NVMEDIA_IOFST_NVSCISYNC_VERSION_MAJOR   1
 Major version number. More...
 
#define NVMEDIA_IOFST_NVSCISYNC_VERSION_MINOR   2
 Minor version number. More...
 
#define NVMEDIA_IOFST_MAX_PRENVSCISYNCFENCES   (3U)
 Specifies the maximum number of times NvMediaIOFSTInsertPreNvSciSyncFence() can be called before each call to NvMediaIOFSTProcessFrame(). More...
 

Functions

NvMediaStatus NvMediaIOFSTNvSciSyncGetVersion (NvMediaVersion *version)
 Returns the version information for the NvMediaIOFST NvSciSync library. More...
 
NvMediaStatus NvMediaIOFSTFillNvSciSyncAttrList (const NvMediaIOFST *iofst, NvSciSyncAttrList attrlist, NvMediaNvSciSyncClientType clienttype)
 Fills the NvMediaIOFST specific NvSciSync attributes. More...
 
NvMediaStatus NvMediaIOFSTRegisterNvSciSyncObj (const NvMediaIOFST *iofst, NvMediaNvSciSyncObjType syncobjtype, NvSciSyncObj nvscisync)
 Registers an NvSciSyncObj with NvMediaIOFST. More...
 
NvMediaStatus NvMediaIOFSTUnregisterNvSciSyncObj (const NvMediaIOFST *iofst, NvSciSyncObj nvscisync)
 Unregisters an NvSciSyncObj with NvMediaIOFST. More...
 
NvMediaStatus NvMediaIOFSTSetNvSciSyncObjforEOF (const NvMediaIOFST *iofst, NvSciSyncObj nvscisyncEOF)
 Specifies the NvSciSyncObj to be used for an EOF NvSciSyncFence. More...
 
NvMediaStatus NvMediaIOFSTInsertPreNvSciSyncFence (const NvMediaIOFST *iofst, const NvSciSyncFence *prenvscisyncfence)
 Sets an NvSciSyncFence as a prefence for an NvMediaIOFSTProcessFrame() operation. More...
 
NvMediaStatus NvMediaIOFSTGetEOFNvSciSyncFence (const NvMediaIOFST *iofst, NvSciSyncObj eofnvscisyncobj, NvSciSyncFence *eofnvscisyncfence)
 Gets EOF NvSciSyncFence for an NvMediaIOFSTProcessFrame() operation. More...
 
NvMediaStatus NvMediaIOFSTSetNvSciSyncObjforSOF (const NvMediaIOFST *iofst, const NvSciSyncObj nvscisyncSOF)
 Specifies the NvSciSyncObj to be used for an SOF NvSciSyncFence. More...
 
NvMediaStatus NvMediaIOFSTGetSOFNvSciSyncFence (const NvMediaIOFST *iofst, const NvSciSyncObj sofnvscisyncobj, NvSciSyncFence *sofnvscisyncfence)
 Gets SOF NvSciSyncFence for an NvMediaIOFSTProcessFrame() operation. More...
 

Macro Definition Documentation

◆ NVMEDIA_IOFST_MAX_PRENVSCISYNCFENCES

#define NVMEDIA_IOFST_MAX_PRENVSCISYNCFENCES   (3U)

Specifies the maximum number of times NvMediaIOFSTInsertPreNvSciSyncFence() can be called before each call to NvMediaIOFSTProcessFrame().

Definition at line 46 of file nvmedia_iofst_nvscisync.h.

◆ NVMEDIA_IOFST_NVSCISYNC_VERSION_MAJOR

#define NVMEDIA_IOFST_NVSCISYNC_VERSION_MAJOR   1

Major version number.

Definition at line 38 of file nvmedia_iofst_nvscisync.h.

◆ NVMEDIA_IOFST_NVSCISYNC_VERSION_MINOR

#define NVMEDIA_IOFST_NVSCISYNC_VERSION_MINOR   2

Minor version number.

Definition at line 40 of file nvmedia_iofst_nvscisync.h.

Function Documentation

◆ NvMediaIOFSTFillNvSciSyncAttrList()

NvMediaStatus NvMediaIOFSTFillNvSciSyncAttrList ( const NvMediaIOFST iofst,
NvSciSyncAttrList  attrlist,
NvMediaNvSciSyncClientType  clienttype 
)

Fills the NvMediaIOFST specific NvSciSync attributes.

This function assumes that attrlist is a valid NvSciSyncAttrList.

This function sets the public attribute:

The application must not set this attribute.

Precondition
NvMediaIOFSTCreate()
Postcondition
NvSciSyncAttrList populated with NvMediaIOFST specific NvSciSync attributes

Considerations for Safety:

  • Operation Mode: Init
Parameters
[in]iofstAn NvMediaIOFST device handle.
[out]attrlistA pointer to an NvSciSyncAttrList structure where NvMedia places NvSciSync attributes.
[in]clienttypeIndicates whether the attrlist is requested for an NvMediaIOFST signaler or an NvMediaIOFST waiter.
Returns
NvMediaStatus The status of the operation. Possible values are:

◆ NvMediaIOFSTGetEOFNvSciSyncFence()

NvMediaStatus NvMediaIOFSTGetEOFNvSciSyncFence ( const NvMediaIOFST iofst,
NvSciSyncObj  eofnvscisyncobj,
NvSciSyncFence eofnvscisyncfence 
)

Gets EOF NvSciSyncFence for an NvMediaIOFSTProcessFrame() operation.

The EOF NvSciSyncFence associated with an NvMediaIOFSTProcessFrame() operation is an NvSciSyncFence. Its expiry indicates that the corresponding NvMediaIOFSTProcessFrame() operation has finished.

This function returns the EOF NvSciSyncFence associated with the last NvMediaIOFSTProcessFrame() call. NvMediaIOFSTGetEOFNvSciSyncFence() must be called after an NvMediaIOFSTProcessFrame() call.

For example, in this sequence of code:

nvmstatus = NvMediaIOFSTProcessFrame(handle, srcsurf, refsurf, mvsurf,
hintparams, instanceId);
nvmstatus = NvMediaIOFSTGetEOFNvSciSyncFence(handle, nvscisyncEOF,
eofnvscisyncfence);

expiry of eofnvscisyncfence indicates that the preceding NvMediaIOFSTProcessFrame() operation has finished.

Precondition
NvMediaIOFSTSetNvSciSyncObjforEOF()
NvMediaIOFSTProcessFrame()
Postcondition
EOF NvSciSync fence for a submitted task is obtained

Considerations for Safety:

  • Operation Mode: Runtime
Parameters
[in]iofstAn NvMediaIOFST device handle.
[in]eofnvscisyncobjAn EOF NvSciSyncObj associated with the NvSciSyncFence which is being requested.
[out]eofnvscisyncfenceA pointer to EOF NvSciSyncFence.
Returns
NvMediaStatus The status of the operation. Possible values are:

◆ NvMediaIOFSTGetSOFNvSciSyncFence()

NvMediaStatus NvMediaIOFSTGetSOFNvSciSyncFence ( const NvMediaIOFST iofst,
const NvSciSyncObj  sofnvscisyncobj,
NvSciSyncFence sofnvscisyncfence 
)

Gets SOF NvSciSyncFence for an NvMediaIOFSTProcessFrame() operation.

This function is not supported

The SOF NvSciSyncFence associated with an NvMediaIOFSTProcessFrame() operation is an NvSciSyncFence. Its expiry indicates that the corresponding NvMediaIOFSTProcessFrame() operation has started.

This function returns the SOF NvSciSyncFence associated with the last NvMediaIOFSTProcessFrame() call. NvMediaIOFSTGetSOFNvSciSyncFence() must be called after an NvMediaIOFSTProcessFrame() call.

Precondition
N/A
Postcondition
N/A

Considerations for Safety:

  • Operation Mode: N/A
Parameters
[in]iofstAn NvMediaIOFST device handle.
[in]sofnvscisyncobjAn SOF NvSciSyncObj associated with the NvSciSyncFence which is being requested.
[out]sofnvscisyncfenceA pointer to SOF NvSciSyncFence.
Returns
NvMediaStatus The status of the operation. Possible values are:

◆ NvMediaIOFSTInsertPreNvSciSyncFence()

NvMediaStatus NvMediaIOFSTInsertPreNvSciSyncFence ( const NvMediaIOFST iofst,
const NvSciSyncFence prenvscisyncfence 
)

Sets an NvSciSyncFence as a prefence for an NvMediaIOFSTProcessFrame() operation.

You must call NvMediaIOFSTInsertPreNvSciSyncFence() before you call NvMediaIOFSTProcessFrame(). The NvMediaIOFSTProcessFrame() operation is started only after the expiry of the prenvscisyncfence.

For example, in this sequence of code:

nvmstatus = NvMediaIOFSTInsertPreNvSciSyncFence(handle, prenvscisyncfence);
nvmstatus = NvMediaIOFSTProcessFrame(handle, srcsurf, refsurf, mvsurf,
hintparams, instanceId);

the NvMediaIOFSTProcessFrame() operation is assured to start only after the expiry of prenvscisyncfence.

You can set a maximum of NVMEDIA_IOFST_MAX_PRENVSCISYNCFENCES prefences by calling NvMediaIOFSTInsertPreNvSciSyncFence() before NvMediaIOFSTProcessFrame(). After the call to NvMediaIOFSTProcessFrame(), all NvSciSyncFences previously inserted by NvMediaIOFSTInsertPreNvSciSyncFence() are removed, and they are not reused for the subsequent NvMediaIOFSTProcessFrame() calls.

Precondition
Pre-NvSciSync fence obtained from previous engine in the pipeline
Postcondition
Pre-NvSciSync fence is set

Considerations for Safety:

  • Operation Mode: Runtime
Parameters
[in]iofstAn NvMediaIOFST device handle.
[in]prenvscisyncfenceA pointer to NvSciSyncFence.
Returns
NvMediaStatus The status of the operation. Possible values are:

◆ NvMediaIOFSTNvSciSyncGetVersion()

NvMediaStatus NvMediaIOFSTNvSciSyncGetVersion ( NvMediaVersion version)

Returns the version information for the NvMediaIOFST NvSciSync library.

Precondition
None
Postcondition
None

Considerations for Safety:

  • Operation Mode: Init
Parameters
[out]versionA pointer to an NvMediaVersion structure filled by the IOFST NvSciSync library.
Returns
NvMediaStatus The status of the operation. Possible values are:

◆ NvMediaIOFSTRegisterNvSciSyncObj()

NvMediaStatus NvMediaIOFSTRegisterNvSciSyncObj ( const NvMediaIOFST iofst,
NvMediaNvSciSyncObjType  syncobjtype,
NvSciSyncObj  nvscisync 
)

Registers an NvSciSyncObj with NvMediaIOFST.

Every NvSciSyncObj (even duplicate objects) used by NvMediaIOFST must be registered by a call to this function before it is used. Only the exact same registered NvSciSyncObj can be passed to NvMediaIOFSTSetNvSciSyncObjforEOF(), NvMediaIOFSTGetEOFNvSciSyncFence(), or NvMediaIOFSTUnregisterNvSciSyncObj().

For a given NvMediaIOFST handle, one NvSciSyncObj can be registered as one NvMediaNvSciSyncObjType only. For each NvMediaNvSciSyncObjType, a maximum of 16 NvSciSyncObjs can be registered.

Precondition
NvMediaIOFSTFillNvSciSyncAttrList()
Postcondition
NvSciSyncObj registered with NvMediaIOFST

Considerations for Safety:

  • Operation Mode: Init
Parameters
[in]iofstAn NvMediaIOFST device handle.
[in]syncobjtypeDetermines how nvscisync is used by iofst.
[in]nvscisyncThe NvSciSyncObj to be registered with iofst.
Returns
NvMediaStatus The status of the operation. Possible values are:

◆ NvMediaIOFSTSetNvSciSyncObjforEOF()

NvMediaStatus NvMediaIOFSTSetNvSciSyncObjforEOF ( const NvMediaIOFST iofst,
NvSciSyncObj  nvscisyncEOF 
)

Specifies the NvSciSyncObj to be used for an EOF NvSciSyncFence.

To use NvMediaIOFSTGetEOFNvSciSyncFence(), the application must call NvMediaIOFSTSetNvSciSyncObjforEOF() before it calls NvMediaIOFSTProcessFrame().

NvMediaIOFSTSetNvSciSyncObjforEOF() currently may be called only once before each call to NvMediaIOFSTProcessFrame(). The application may choose to call this function only once before the first call to NvMediaIOFSTProcessFrame().

Precondition
NvMediaIOFSTRegisterNvSciSyncObj()
Postcondition
NvSciSyncObj to be used as EOF NvSciSyncFence is set

Considerations for Safety:

  • Operation Mode: Runtime
Parameters
[in]iofstAn NvMediaIOFST device handle.
[in]nvscisyncEOFA registered NvSciSyncObj which is to be associated with EOF NvSciSyncFence.
Returns
NvMediaStatus The status of the operation. Possible values are:

◆ NvMediaIOFSTSetNvSciSyncObjforSOF()

NvMediaStatus NvMediaIOFSTSetNvSciSyncObjforSOF ( const NvMediaIOFST iofst,
const NvSciSyncObj  nvscisyncSOF 
)

Specifies the NvSciSyncObj to be used for an SOF NvSciSyncFence.

This function is not supported

To use NvMediaIOFSTGetSOFNvSciSyncFence(), the application must call NvMediaIOFSTSetNvSciSyncObjforSOF() before it calls NvMediaIOFSTProcessFrame().

NvMediaIOFSTSetNvSciSyncObjforSOF() currently may be called only once before each call to NvMediaIOFSTProcessFrame(). The application may choose to call this function only once before the first call to NvMediaIOFSTProcessFrame().

Precondition
N/A
Postcondition
N/A

Considerations for Safety:

  • Operation Mode: N/A
Parameters
[in]iofstAn NvMediaIOFST device handle.
[in]nvscisyncSOFA registered NvSciSyncObj which is to be associated with SOF NvSciSyncFence.
Returns
NvMediaStatus The status of the operation. Possible values are:

◆ NvMediaIOFSTUnregisterNvSciSyncObj()

NvMediaStatus NvMediaIOFSTUnregisterNvSciSyncObj ( const NvMediaIOFST iofst,
NvSciSyncObj  nvscisync 
)

Unregisters an NvSciSyncObj with NvMediaIOFST.

Every NvSciSyncObj registered with NvMediaIOFST by NvMediaIOFSTRegisterNvSciSyncObj() must be unregistered before calling NvMediaIOFSTDestroy().

Before the application calls this function, it must ensure that any NvMediaIOFSTProcessFrame() operation that uses the NvSciSyncObj has completed. If this function is called while NvSciSyncObj is still in use by any NvMediaIOFSTProcessFrame() operation, the behavior is undefined.

Precondition
NvMediaIOFSTProcessFrame()
NvMediaImageGetStatus() [verify that processing is complete]
Postcondition
NvSciSyncObj un-registered with NvMediaIOFST

Considerations for Safety:

  • Operation Mode: De-init
Parameters
[in]iofstAn NvMediaIOFST device handle.
[in]nvscisyncAn NvSciSyncObj to be unregistered with iofst.
Returns
NvMediaStatus The status of the operation. Possible values are:
NvMediaIOFSTProcessFrame
NvMediaStatus NvMediaIOFSTProcessFrame(const NvMediaIOFST *ofst, const NvMediaImage *frame, const NvMediaImage *refFrame, const NvMediaImage *mvs, const NvMediaOFSTExternalHintParams *extHintParams, NvMediaEncoderInstanceId instanceId)
Performs OF/ST estimation on a specified frame pair.
NvMediaIOFSTInsertPreNvSciSyncFence
NvMediaStatus NvMediaIOFSTInsertPreNvSciSyncFence(const NvMediaIOFST *iofst, const NvSciSyncFence *prenvscisyncfence)
Sets an NvSciSyncFence as a prefence for an NvMediaIOFSTProcessFrame() operation.
NvMediaIOFSTGetEOFNvSciSyncFence
NvMediaStatus NvMediaIOFSTGetEOFNvSciSyncFence(const NvMediaIOFST *iofst, NvSciSyncObj eofnvscisyncobj, NvSciSyncFence *eofnvscisyncfence)
Gets EOF NvSciSyncFence for an NvMediaIOFSTProcessFrame() operation.