The NvMediaIofa object takes an uncompressed bufObj frame pair and turns them into optical flow / stereo disparity estimation data.
6
Data Structures | |
struct | NvMediaIofaEpipolarInfo |
Structure holds Epipolar information. More... | |
struct | NvMediaIofaROIRectParams |
Holds Co-ordinates for Region of Interest. More... | |
struct | NvMediaIofaROIParams |
Structure holds ROI information. More... | |
struct | NvMediaIofaCapability |
Nvmedia Iofa Capability structure. More... | |
struct | NvMediaIofa |
Holds an IOFA object created and returned by NvMediaIOFACreate(). More... | |
struct | NvMediaIofaInitParams |
Holds IOFA Initialization API parameters. More... | |
struct | NvMediaIofaSGMParams |
Holds SGM parameters TBD: Add more details about SGM Params with input range. More... | |
struct | NvMediaIofaBufArray |
Holds pointers to NvMedia bufObjs containing input and output surfaces. More... | |
struct | NvMediaIofaPydHintParams |
Parameters related to input pyramid hint surface. More... | |
struct | NvMediaIofaProcessParams |
Holds IOFA Process Frame API parameters. More... | |
Macros | |
#define | NVMEDIA_IOFA_VERSION_MAJOR 1 |
Major version number. More... | |
#define | NVMEDIA_IOFA_VERSION_MINOR 3 |
Minor version number. More... | |
#define | NVMEDIA_IOFA_VERSION_PATCH 0 |
Patch version number. More... | |
#define | NVMEDIA_IOFA_MAX_PYD_LEVEL 5U |
Maximum number of Pyramid level supported in Pyramid OF mode. More... | |
#define | NVMEDIA_IOFA_MAX_ROI_SUPPORTED 32U |
Maximum number of Region of Interest supported on IOFA. More... | |
#define | NVMEDIA_IOFA_MAX_PRENVSCISYNCFENCES 16U |
Specifies the maximum number of times NvMediaIOFAInsertPreNvSciSyncFence() can be called before each call to NvMediaIOFAProcessFrame(). More... | |
Typedefs | |
typedef struct NvMediaIofa | NvMediaIofa |
Holds an IOFA object created and returned by NvMediaIOFACreate(). More... | |
#define NVMEDIA_IOFA_MAX_PRENVSCISYNCFENCES 16U |
Specifies the maximum number of times NvMediaIOFAInsertPreNvSciSyncFence() can be called before each call to NvMediaIOFAProcessFrame().
Definition at line 59 of file nvmedia_iofa.h.
#define NVMEDIA_IOFA_MAX_PYD_LEVEL 5U |
Maximum number of Pyramid level supported in Pyramid OF mode.
Definition at line 51 of file nvmedia_iofa.h.
#define NVMEDIA_IOFA_MAX_ROI_SUPPORTED 32U |
Maximum number of Region of Interest supported on IOFA.
Definition at line 53 of file nvmedia_iofa.h.
#define NVMEDIA_IOFA_VERSION_MAJOR 1 |
Major version number.
Definition at line 44 of file nvmedia_iofa.h.
#define NVMEDIA_IOFA_VERSION_MINOR 3 |
Minor version number.
Definition at line 46 of file nvmedia_iofa.h.
#define NVMEDIA_IOFA_VERSION_PATCH 0 |
Patch version number.
Definition at line 48 of file nvmedia_iofa.h.
typedef struct NvMediaIofa NvMediaIofa |
Holds an IOFA object created and returned by NvMediaIOFACreate().
Defines IOFA Stereo DISPARITY RANGE.
Enumerator | |
---|---|
NVMEDIA_IOFA_DISPARITY_RANGE_128 | Maximum Stereo Disparity Range of 128 pixels. |
NVMEDIA_IOFA_DISPARITY_RANGE_256 | Maximum Stereo Disparity Range of 256 pixels. |
Definition at line 121 of file nvmedia_iofa.h.
Defines IOFA Flow Epipolar Search Range.
Enumerator | |
---|---|
NVMEDIA_IOFA_EPI_SEARCH_RANGE_128 | Maximum Epipolar Flow Search Range of 128 pixels. |
NVMEDIA_IOFA_EPI_SEARCH_RANGE_256 | Maximum Epipolar Flow Search Range of 256 pixels. |
Definition at line 132 of file nvmedia_iofa.h.
enum NvMediaIofaGridSize |
Defines the Output Grid Size.
IOFA supports variable flow vector/disparity output density.
IOFA provides single output for each input region corrosponding to grid block size.
Grid Size controls flow vector/disparity map granularity.
Application can set any grid size from the list of Grid sizes supported by IOFA.
Enumerator | |
---|---|
NVMEDIA_IOFA_GRIDSIZE_1X1 | Grid Size 1x1. |
NVMEDIA_IOFA_GRIDSIZE_2X2 | Grid Size 2x2. |
NVMEDIA_IOFA_GRIDSIZE_4X4 | Grid Size 4x4. |
NVMEDIA_IOFA_GRIDSIZE_8X8 | Grid Size 8x8. |
Definition at line 82 of file nvmedia_iofa.h.
enum NvMediaIofaMode |
Defines mode supported by IOFA Driver.
Definition at line 64 of file nvmedia_iofa.h.
enum NvMediaIofaPreset |
Nvmedia Iofa Preset.
Enumerator | |
---|---|
NVMEDIA_IOFA_PRESET_HQ | High Quality Preset. |
NVMEDIA_IOFA_PRESET_HP | High Performance Preset. |
Definition at line 143 of file nvmedia_iofa.h.
enum NvMediaIofaPydMode |
Modes for pyramid SGM
Applicable to Pyramid SGM IOFA mode only.
Enumerator | |
---|---|
NVMEDIA_IOFA_PYD_FRAME_MODE | All pyramid levels of a input and reference frame will be processed in single NvMediaIOFAProcessFrame call.
|
NVMEDIA_IOFA_PYD_LEVEL_MODE | A single pyramid level of a input and reference frame will be processed by NvMediaIOFAProcessFrame API
|
Definition at line 98 of file nvmedia_iofa.h.
NvMedia Iofa task status error codes.
Definition at line 154 of file nvmedia_iofa.h.
NvMediaIofa* NvMediaIOFACreate | ( | void | ) |
Creates an NvMediaIofa object that can compute optical flow or stereo disparity using two bufObjs.
Usage considerations
NvMediaStatus NvMediaIOFADestroy | ( | const NvMediaIofa * | ofaPubl | ) |
Destroys the created NvMediaIofa object and frees associated resources.
Usage considerations
[in] | ofaPubl | Pointer to the NvMediaIofa object to destroy, returned by NvMediaIOFACreate(). Non-NULL - valid pointer address |
NvMediaStatus NvMediaIOFAFillNvSciBufAttrList | ( | NvSciBufAttrList | attrlist | ) |
Fills the NvMediaIofa specific NvSciBuf attributes which than then be used to allocate an NvSciBufObj that NvMediaIofa can consume.
This function updates the input NvSciBufAttrList with values equivalent to the following public attribute key-values: NvSciBufGeneralAttrKey_PeerHwEngineArray set to
This function assumes that attrlist is a valid NvSciBufAttrList created by the caller by a call to NvSciBufAttrListCreate.
Usage considerations
[out] | attrlist | A pointer to an NvSciBufAttrList structure where NvMediaIofa places the NvSciBuf attributes. |
NvMediaStatus NvMediaIOFAFillNvSciSyncAttrList | ( | const NvMediaIofa * | ofaPubl, |
NvSciSyncAttrList | attrlist, | ||
NvMediaNvSciSyncClientType | clienttype | ||
) |
Fills the NvMediaIofa specific NvSciSync attributes.
This function assumes that attrlist is a valid NvSciSyncAttrList.
This function updates the input NvSciSyncAttrList with values equivalent to the following public attribute key-values: NvSciSyncAttrKey_RequiredPerm set to
The application must not set these attributes in the NvSciSyncAttrList passed as an input to this function.
Usage considerations
[in] | ofaPubl | A pointer to the NvMediaIofa object. Input range: Can be NULL or Non-NULL valid pointer address |
[out] | attrlist | A pointer to an NvSciSyncAttrList structure where NvMedia places NvSciSync attributes. |
[in] | clienttype | Indicates whether the NvSciSyncAttrList requested for an NvMediaIofa signaler or an NvMediaIofa waiter. Input range: Entries in NvMediaNvSciSyncClientType enumeration |
NvMediaStatus NvMediaIOFAGetCapability | ( | const NvMediaIofa * | ofaPubl, |
const NvMediaIofaMode | mode, | ||
NvMediaIofaCapability * | pCapability | ||
) |
Get IOFA Capability.
This function returns ofa hw capabilities.
Usage considerations
Considerations for Safety:
[in] | ofaPubl | Pointer to the NvMediaIofa object to use. Non-NULL - valid pointer address |
[in] | mode | one of the value from NvMediaIofaMode. |
[out] | pCapability | A pointer to a structure that contains capability data |
NvMediaStatus NvMediaIOFAGetEOFNvSciSyncFence | ( | const NvMediaIofa * | ofaPubl, |
NvSciSyncObj | eofnvscisyncobj, | ||
NvSciSyncFence * | eofnvscisyncfence | ||
) |
Gets EOF NvSciSyncFence for an NvMediaIOFAProcessFrame() operation.
The EOF NvSciSyncFence associated with an NvMediaIOFAProcessFrame() operation is an NvSciSyncFence. Its expiry indicates that the corresponding NvMediaIOFAProcessFrame() operation has finished.
This function returns the EOF NvSciSyncFence associated with the last NvMediaIOFAProcessFrame() call. NvMediaIOFAGetEOFNvSciSyncFence() must be called after an NvMediaIOFAProcessFrame() call.
For example, in this sequence of code:
expiry of eofnvscisyncfence indicates that the preceding NvMediaIOFAProcessFrame() operation has finished.
Usage considerations
[in] | ofaPubl | A pointer to the NvMediaIofa object. Input range: Non-NULL - valid pointer address |
[in] | eofnvscisyncobj | An EOF NvSciSyncObj associated with the NvSciSyncFence which is being requested. Input range: A valid NvSciSyncObj |
[out] | eofnvscisyncfence | A pointer to the EOF NvSciSyncFence. |
NvMediaStatus NvMediaIOFAGetSGMConfigParams | ( | const NvMediaIofa * | ofaPubl, |
NvMediaIofaSGMParams * | pSGMParams | ||
) |
Get the SGM configuration parameters being used.
Usage considerations
[in] | ofaPubl | Pointer to the NvMediaIofa object to use. Non-NULL - valid pointer address |
[out] | pSGMParams | A pointer to a structure that specifies SGM parameters. |
NvMediaStatus NvMediaIOFAGetVersion | ( | NvMediaVersion * | version | ) |
Retrieves the version information for the NvMedia IOFA library.
Usage considerations
[out] | version | A pointer to a NvMediaVersion structure filled by the IOFA library. |
NvMediaStatus NvMediaIOFAInit | ( | NvMediaIofa * | ofaPubl, |
const NvMediaIofaInitParams * | initParams, | ||
const uint8_t | maxInputBuffering | ||
) |
Initializes the parameters for optical flow and stereo estimation.
Usage considerations
[in] | ofaPubl | A pointer to the NvMediaIofa estimator to use. Non-NULL - valid pointer address |
[in] | initParams | A pointer to a structure that specifies initialization parameters. Non-NULL - valid address. Ranges specific to each member in the structure can be found in NvMediaIofaInitParams. |
[in] | maxInputBuffering | Maximum number of NvMediaIOFAProcessFrame() operations that can be queued by NvMediaIofa. If more than maxInputBuffering operations are queued, NvMediaIOFAProcessFrame() returns an error to indicate insufficient buffering. The values between 1 to 8, in increments of 1 |
NvMediaStatus NvMediaIOFAInsertPreNvSciSyncFence | ( | const NvMediaIofa * | ofaPubl, |
const NvSciSyncFence * | prenvscisyncfence | ||
) |
Sets an NvSciSyncFence as a prefence for an NvMediaIOFAProcessFrame() NvSciSyncFence operation.
You must call NvMediaIOFAInsertPreNvSciSyncFence() before you call NvMediaIOFAProcessFrame(). The NvMediaIOFAProcessFrame() operation is started only after the expiry of the prenvscisyncfence.
For example, in this sequence of code:
the NvMediaIOFAProcessFrame() operation is assured to start only after the expiry of prenvscisyncfence.
You can set a maximum of NVMEDIA_IOFA_MAX_PRENVSCISYNCFENCES prefences by calling NvMediaIOFAInsertPreNvSciSyncFence() before NvMediaIOFAProcessFrame(). After the call to NvMediaIOFAProcessFrame(), all NvSciSyncFences previously inserted by NvMediaIOFAInsertPreNvSciSyncFence() are removed, and they are not reused for the subsequent NvMediaIOFAProcessFrame() calls.
Usage considerations
[in] | ofaPubl | A pointer to the NvMediaIofa object. Input range: Non-NULL - valid pointer address |
[in] | prenvscisyncfence | A pointer to NvSciSyncFence. Input range: Non-NULL - valid pointer address |
NvMediaStatus NvMediaIOFAProcessFrame | ( | const NvMediaIofa * | ofaPubl, |
const NvMediaIofaBufArray * | pSurfArray, | ||
const NvMediaIofaProcessParams * | pProcessParams, | ||
const NvMediaIofaEpipolarInfo * | pEpiInfo, | ||
const NvMediaIofaROIParams * | pROIParams | ||
) |
Performs IOFA estimation on a specified frame pair.
Estimation is based on the difference between refFrame and inputframe. The output of Optical Flow processing is motion vectors [X, Y Components], and that of Stereo Disparity processing is a disparity surface [X component].
Usage considerations
[in] | ofaPubl | A pointer to the NvMediaIOFA estimator to use. Non-NULL - valid pointer address |
[in] | surfArray | A pointer to a structure that specifies input and output surface parameters. Non-NULL - valid address. Ranges specific to each member in the structure can be found in NvMediaIofaBufArray. |
[in] | processParams | A pointer to a structure that specifies process frame parameters. Non-NULL - valid address. Ranges specific to each member in the structure can be found in NvMediaIofaProcessParams. |
[in] | pROIParams | A pointer to a structure that specifies ROI parameters. Note: HW will generate output for ROI region only and Single ROI should give best perf for pyramid SGM Mode. pROIParams are optional argument and can be NULL if ROI is not set by App. Ranges specific to each member in the structure can be found in NvMediaIofaROIParams. |
[in] | pEpipolarInfo | A pointer to a structure that specifies Epipolar info parameters. pEpipolarInfo is required argument only when /ref ofaMode in /ref NvMediaIofaInitParams is set to /ref NVMEDIA_IOFA_MODE_EPIOF. Ranges specific to each member in the structure can be found in NvMediaIofaEpipolarInfo. Epipolar OF support will be added in next release. Ignored right now in driver. Set it to NULL till EpiPolar OF support is enabled. |
NvMediaStatus NvMediaIOFARegisterNvSciBufObj | ( | const NvMediaIofa * | ofaPubl, |
NvSciBufObj | bufObj | ||
) |
Registers an NvSciBufObj for use with an NvMediaIofa handle.
The NvMediaIofa handle maintains a record of all the bufObjs registered using this API.
This is a mandatory API which needs to be called before NvMediaIOFAProcessFrame()
All NvMediaIOFANvSciBufRegister() API calls must be made before first NvMediaIOFAProcessFrame() API call. Registration of the buffer is done with the same access permission as that of the NvSciBufObj being registered. NvSciBufObj that need to be registered with a reduced permission (Eg: Input buffer accesses being set to read-only) can be done so by first duplicating the NvSciBufObj using NvSciBufObjDupWithReducePerm() followed by a call the register the duplicated NvSciBufObj.
Maximum of 192 NvSciBufObj handles can be registered using NvMediaIOFARegisterNvSciSyncObj() API.
Usage considerations
[in] | ofaPubl | NvMediaIofa handle. Input range: Non-NULL - valid pointer address |
[in] | bufObj | An NvSciBufObj object. Input range: A valid NvSciBufObj |
NvMediaStatus NvMediaIOFARegisterNvSciSyncObj | ( | const NvMediaIofa * | ofaPubl, |
NvMediaNvSciSyncObjType | syncobjtype, | ||
NvSciSyncObj | syncObj | ||
) |
Registers an NvSciSyncObj with NvMediaIofa.
Every NvSciSyncObj (even duplicate objects) used by NvMediaIofa must be registered by a call to this function before it is used. Only the exact same registered NvSciSyncObj can be passed to NvMediaIOFASetNvSciSyncObjforEOF(), NvMediaIOFAGetEOFNvSciSyncFence(), or NvMediaIOFAUnregisterNvSciSyncObj().
For a given NvMediaIofa handle, one NvSciSyncObj can be registered as one NvMediaNvSciSyncObjType only. For each NvMediaNvSciSyncObjType, a maximum of 16 NvSciSyncObjs can be registered.
Usage considerations
[in] | ofaPubl | A pointer to the NvMediaIofa object. Input range: Non-NULL - valid pointer address |
[in] | syncobjtype | Determines how nvscisync is used by ofaPubl. Input range: Entries in NvMediaNvSciSyncObjType enumeration |
[in] | nvscisync | The NvSciSyncObj to be registered with ofaPubl. Input range: A valid NvSciSyncObj |
NvMediaStatus NvMediaIOFASetNvSciSyncObjforEOF | ( | const NvMediaIofa * | ofaPubl, |
NvSciSyncObj | nvscisyncEOF | ||
) |
Specifies the NvSciSyncObj to be used for an EOF NvSciSyncFence.
To use NvMediaIOFAGetEOFNvSciSyncFence(), the application must call NvMediaIOFASetNvSciSyncObjforEOF() before it calls NvMediaIOFAProcessFrame().
NvMediaIOFASetNvSciSyncObjforEOF() currently may be called only once before each call to NvMediaIOFAProcessFrame(). The application may choose to call this function only once before the first call to NvMediaIOFAProcessFrame().
Usage considerations
[in] | ofaPubl | A pointer to the NvMediaIofa object. Input range: Non-NULL - valid pointer address |
[in] | nvscisyncEOF | A registered NvSciSyncObj which is to be associated with EOF NvSciSyncFence. Input range: A valid NvSciSyncObj |
NvMediaStatus NvMediaIOFASetSGMConfigParams | ( | const NvMediaIofa * | ofaPubl, |
const NvMediaIofaSGMParams * | pSGMParams | ||
) |
Set the SGM configuration parameters to be used.
Usage considerations
[in] | ofaPubl | Pointer to the NvMediaIofa object to use. Non-NULL - valid pointer address |
[in] | pSGMParams | A pointer to a structure that specifies SGM parameters. |
NvMediaStatus NvMediaIOFAUnregisterNvSciBufObj | ( | const NvMediaIofa * | ofaPubl, |
NvSciBufObj | bufObj | ||
) |
Un-registers NvSciBufObj which was previously registered with NvMediaIofa using NvMediaIOFARegisterNvSciBufObj().
For all NvSciBufObj handles registered with NvMediaIofa using NvMediaIOFARegisterNvSciBufObj() API, NvMediaIOFAUnregisterNvSciBufObj() must be called before calling NvMediaIOFADestroy() API. For unregistration to succeed, it should be ensured that none of the submitted tasks on the bufObj are pending prior to calling NvMediaIOFAUnregisterNvSciBufObj(). In order to ensure this, NvMediaIOFAUnregisterNvSciSyncObj() should be called prior to this API on all registered NvSciSyncObj. Post this NvMediaIOFAUnregisterNvSciBufObj() can be successfully called on a valid NvSciBufObj.
For deterministic execution of NvMediaIOFAProcessFrame() API, NvMediaIOFAUnregisterNvSciBufObj() must be called only after last NvMediaIOFAProcessFrame() call.
Usage considerations
[in] | ofaPubl | NvMediaIofa handle. Input range: Non-NULL - valid pointer address |
[in] | bufObj | An NvSciBufObj object. Input range: A valid NvSciBufObj |
NvMediaStatus NvMediaIOFAUnregisterNvSciSyncObj | ( | const NvMediaIofa * | ofaPubl, |
NvSciSyncObj | syncObj | ||
) |
Unregisters an NvSciSyncObj with NvMediaIofa.
Every NvSciSyncObj registered with NvMediaIofa by NvMediaIOFARegisterNvSciSyncObj() must be unregistered before calling NvMediaIOFAUnregisterNvSciBufObj to unregister the NvSciBufObjs.
Before the application calls this function, it must ensure that any NvMediaIOFAProcessFrame() operation that uses the NvSciSyncObj has completed. If this function is called while NvSciSyncObj is still in use by any NvMediaIOFAProcessFrame() operation, the API returns NVMEDIA_STATUS_PENDING to indicate the same. NvSciSyncFenceWait() API can be called on the EOF NvSciSyncFence obtained post the last call to NvMediaIOFAProcessFrame() to wait for the associated tasks to complete. The EOF NvSciSyncFence would have been previously obtained via a call to NvMediaIOFAGetEOFNvSciSyncFence().
Usage considerations
[in] | ofaPubl | A pointer to the NvMediaIofa object. Input range: Non-NULL - valid pointer address |
[in] | nvscisync | An NvSciSyncObj to be unregistered with ofaPubl. Input range: A valid NvSciSyncObj |