NVIDIA DRIVE OS Linux API Reference

5.1.3.0 Release

 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Image OpticalFlow/StereoDisparity (OFST) Estimator

Detailed Description

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   5
 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

NvMediaIOFSTNvMediaIOFSTCreate (NvMediaDevice *device, NvMediaIOFSTType estimationType, NvMediaSurfaceType inputFormat, NvMediaSurfaceType outputFormat, 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 (NvMediaIOFST *ofst)
 Destroys an NvMediaIOFST object. More...
 
NvMediaStatus NvMediaIOFSTProcessFrame (NvMediaIOFST *ofst, NvMediaImage *frame, NvMediaImage *refFrame, NvMediaImage *mvs, NvMediaOFSTExternalHintParams *extHintParams, NvMediaEncoderInstanceId instanceId)
 Performs OFST estimation on a specified frame pair. More...
 

Macro Definition Documentation

#define NVMEDIA_IOFST_VERSION_MAJOR   1

Major version number.

Definition at line 35 of file nvmedia_iofst.h.

#define NVMEDIA_IOFST_VERSION_MINOR   5

Minor version number.

Definition at line 37 of file nvmedia_iofst.h.

Enumeration Type Documentation

Defines the image estimation type.

Enumerator
NVMEDIA_IMAGE_OPTICALFLOW_ESTIMATION_HP_MODE 

High Performance OpticalFlow.

NVMEDIA_IMAGE_STEREODISPARITY_ESTIMATION_HP_MODE 

High Performance StereoDisparity.

NVMEDIA_IMAGE_OPTICALFLOW_ESTIMATION_HQ_MODE 

High Quality OpticalFlow.

NVMEDIA_IMAGE_STEREODISPARITY_ESTIMATION_HQ_MODE 

High Quality StereoDisparity.

NVMEDIA_IMAGE_OPTICALFLOW_ESTIMATION_UHP_MODE 

Ultra High Performance OpticalFlow.

NVMEDIA_IMAGE_STEREODISPARITY_ESTIMATION_UHP_MODE 

Ultra High Performance StereoDisparity.

Definition at line 42 of file nvmedia_iofst.h.

Defines OFST estimation configuration features.

Enumerator
NVMEDIA_OFST_CONFIG_ENABLE_PROFILING 

Enables OFST profiling.

Definition at line 60 of file nvmedia_iofst.h.

Function Documentation

NvMediaIOFST* NvMediaIOFSTCreate ( NvMediaDevice device,
NvMediaIOFSTType  estimationType,
NvMediaSurfaceType  inputFormat,
NvMediaSurfaceType  outputFormat,
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.

Parameters
[in]deviceA pointer to the NvMediaDevice this OFST is to use.
[in]estimationTypeEstimation 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]inputFormatInput 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]outputFormatOutput 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]initParamsA pointer to a structure that specifies initialization parameters.
[in]maxInputBufferingNumber 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]instanceIdID of the encoder engine instance. Supported instances are:
NVMEDIA_ENCODER_INSTANCE_0
NVMEDIA_ENCODER_INSTANCE_1
NVMEDIA_ENCODER_INSTANCE_AUTO
Returns
The new Image OFST Estimator handle if successful, or NULL otherwise.
void NvMediaIOFSTDestroy ( NvMediaIOFST ofst)

Destroys an NvMediaIOFST object.

Parameters
[in]ofstThe OFST object to destroy.
NvMediaStatus NvMediaIOFSTProcessFrame ( NvMediaIOFST ofst,
NvMediaImage frame,
NvMediaImage refFrame,
NvMediaImage mvs,
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.

Parameters
[in]ofstA pointer to the OFSTestimator to use.
[in]frameA pointer to current frame YUV data. It must be the same sourceType as ofst->inputformat.
[in]refFrameA pointer to reference frame YUV data. It must be the same sourceType as ofst->inputformat.
[in]mvsA pointer to a frame which contains motion vector output. It must be of the same sourceType as ofst->outputformat.
[in]extHintParamsA 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]instanceIdThe ID of the encoder engine instance. If NVMEDIA_ENCODER_INSTANCE_AUTO is used the call to NvMediaVideoEncoderCreate(), the following instances are supported:
Returns
The completion status of the operation: NVMEDIA_STATUS_OK if the call is successful, or NVMEDIA_STATUS_BAD_PARAMETER if any of the pointer input parameters is NULL.