NVIDIA DRIVE OS Linux SDK API Reference5.1.6.0 Release |
The NvMediaIOFST object takes an uncompressed image frame pair and turns them into opticalflow/stereodisparity estimation data.
Data Structures | |
struct | NvMediaIOFST |
Holds an OFST object created by NvMediaIOFSTCreate. More... | |
struct | NvMediaOFSTInitializeParams |
Holds OFST estimation initialization parameters. More... | |
struct | NvMediaOFSTExternalHintParams |
Holds OFST estimation parameters. More... | |
Macros | |
#define | NVMEDIA_IOFST_VERSION_MAJOR 1 |
Major version number. More... | |
#define | NVMEDIA_IOFST_VERSION_MINOR 10 |
Minor version number. More... | |
Enumerations | |
enum | NvMediaIOFSTType { NVMEDIA_IMAGE_OPTICALFLOW_ESTIMATION_HP_MODE, NVMEDIA_IMAGE_STEREODISPARITY_ESTIMATION_HP_MODE, NVMEDIA_IMAGE_OPTICALFLOW_ESTIMATION_HQ_MODE, NVMEDIA_IMAGE_STEREODISPARITY_ESTIMATION_HQ_MODE, NVMEDIA_IMAGE_OPTICALFLOW_ESTIMATION_UHP_MODE, NVMEDIA_IMAGE_STEREODISPARITY_ESTIMATION_UHP_MODE } |
Defines the image estimation type. More... | |
enum | NvMediaOFSTConfigFeatures { NVMEDIA_OFST_CONFIG_ENABLE_PROFILING = (1 << 0) } |
Defines OFST estimation configuration features. More... | |
Functions | |
NvMediaStatus | NvMediaIOFSTGetVersion (NvMediaVersion *version) |
Returns the version information for the NvMedia IOFST library. More... | |
NvMediaIOFST * | NvMediaIOFSTCreate (const NvMediaDevice *device, NvMediaIOFSTType estimationType, NvMediaSurfaceType inputFormat, NvMediaSurfaceType outputFormat, const NvMediaOFSTInitializeParams *initParams, uint8_t maxInputBuffering, NvMediaEncoderInstanceId instanceId) |
Creates an OFST object that can create motion vectors based on the difference between two frames. More... | |
void | NvMediaIOFSTDestroy (const NvMediaIOFST *ofst) |
Destroys an NvMediaIOFST object. More... | |
NvMediaStatus | NvMediaIOFSTProcessFrame (const NvMediaIOFST *ofst, NvMediaImage *frame, NvMediaImage *refFrame, NvMediaImage *mvs, const NvMediaOFSTExternalHintParams *extHintParams, NvMediaEncoderInstanceId instanceId) |
Performs OFST estimation on a specified frame pair. More... | |
#define NVMEDIA_IOFST_VERSION_MAJOR 1 |
Major version number.
Definition at line 38 of file nvmedia_iofst.h.
#define NVMEDIA_IOFST_VERSION_MINOR 10 |
Minor version number.
Definition at line 40 of file nvmedia_iofst.h.
enum NvMediaIOFSTType |
Defines the image estimation type.
Definition at line 45 of file nvmedia_iofst.h.
Defines OFST estimation configuration features.
Enumerator | |
---|---|
NVMEDIA_OFST_CONFIG_ENABLE_PROFILING |
Enables OFST profiling. |
Definition at line 63 of file nvmedia_iofst.h.
NvMediaIOFST* NvMediaIOFSTCreate | ( | const NvMediaDevice * | device, |
NvMediaIOFSTType | estimationType, | ||
NvMediaSurfaceType | inputFormat, | ||
NvMediaSurfaceType | outputFormat, | ||
const NvMediaOFSTInitializeParams * | initParams, | ||
uint8_t | maxInputBuffering, | ||
NvMediaEncoderInstanceId | instanceId | ||
) |
Creates an OFST object that can create motion vectors based on the difference between two frames.
Feeds surfaces to the OFST estimator with NvMediaIOFSTProcessFrame() and retrieves estimated data with NvMediaIOFSTProcessFrame() motion vector surface.
[in] | device | A pointer to the NvMediaDevice this OFST is to use. |
[in] | estimationType | Estimation type. Supported types are: NVMEDIA_IMAGE_OPTICALFLOW_ESTIMATION_HP_MODE NVMEDIA_IMAGE_STEREODISPARITY_ESTIMATION_HP_MODE NVMEDIA_IMAGE_OPTICALFLOW_ESTIMATION_HQ_MODE NVMEDIA_IMAGE_STEREODISPARITY_ESTIMATION_HQ_MODE NVMEDIA_IMAGE_OPTICALFLOW_ESTIMATION_UHP_MODE NVMEDIA_IMAGE_STEREODISPARITY_ESTIMATION_UHP_MODE |
[in] | inputFormat | Input format. Must be obtained by a call to NvMediaSurfaceFormatGetType() with: NVM_SURF_FMT_SET_ATTR_YUV(attr, LUMA, NONE, PACKED, UINT, [8/10/16], BL) NVM_SURF_FMT_SET_ATTR_YUV(attr, YUV, 420, SEMI_PLANAR, UINT, [8/10/12/16], BL) NVM_SURF_FMT_SET_ATTR_YUV(attr, YUV, 444, SEMI_PLANAR, UINT, [8/10/12/16], BL) |
[in] | outputFormat | Output format. Obtained by a call to NvMediaSurfaceFormatGetType() with: NVM_SURF_FMT_SET_ATTR_RGBA(attr, RG, INT, 16, BL) NVM_SURF_FMT_SET_ATTR_RGBA(attr, ALPHA, INT, 16, BL) |
[in] | initParams | A pointer to a structure that specifies initialization parameters. |
[in] | maxInputBuffering | Number of NvMediaIOFSTProcessFrame() operations that can be queued by the NvMediaIOFST. If more than maxInputBuffering operations are queued, NvMediaIOFSTProcessFrame() blocks until the excess operations are dequeued. |
[in] | instanceId | ID of the encoder engine instance. Supported instances are: NVMEDIA_ENCODER_INSTANCE_0 NVMEDIA_ENCODER_INSTANCE_1 NVMEDIA_ENCODER_INSTANCE_AUTO |
void NvMediaIOFSTDestroy | ( | const NvMediaIOFST * | ofst | ) |
Destroys an NvMediaIOFST object.
[in] | ofst | The OFST object to destroy. |
NvMediaStatus NvMediaIOFSTGetVersion | ( | NvMediaVersion * | version | ) |
Returns the version information for the NvMedia IOFST library.
[out] | version | : A pointer to a NvMediaVersion structure filled by the IOFST library. |
NvMediaStatus NvMediaIOFSTProcessFrame | ( | const NvMediaIOFST * | ofst, |
NvMediaImage * | frame, | ||
NvMediaImage * | refFrame, | ||
NvMediaImage * | mvs, | ||
const NvMediaOFSTExternalHintParams * | extHintParams, | ||
NvMediaEncoderInstanceId | instanceId | ||
) |
Performs OFST estimation on a specified frame pair.
Estimation is based on the difference between refFrame and frame. The OFST produces motion vectors.
[in] | ofst | A pointer to the OFSTestimator to use. |
[in] | frame | A pointer to current frame YUV data. It must be the same sourceType as ofst->inputformat. |
[in] | refFrame | A pointer to reference frame YUV data. It must be the same sourceType as ofst->inputformat. |
[in] | mvs | A pointer to a frame which contains motion vector output. It must be of the same sourceType as ofst->outputformat. |
[in] | extHintParams | A pointer to a structure containing external hint parameters. It is used for ME hinting. Set it to NULL if ME hinting is not needed. |
[in] | instanceId | The ID of the encoder engine instance. If NVMEDIA_ENCODER_INSTANCE_AUTO is used the call to NvMediaVideoEncoderCreate(), the following instances are supported:
|