PDK API Guide for J721E
DOF Interface

Introduction

Interface file for DOF M2M FVID2 driver

Files

file  vhwa_m2mDof.h
 Defines the structures / control operations that could be used to configure / control DOF M2M driver.
 

Data Structures

struct  Vhwa_M2mDofPrms
 Connfiguration parameters of DOF. More...
 
struct  Vhwa_M2mDofCreateArgs
 Parameters required to create a new handle. More...
 
struct  Vhwa_M2mDofInitParams
 Initialization Parameters for DOF M2M Driver. More...
 
struct  Vhwa_M2mDofSl2AllocPrms
 Init Parameters required to allocate DOF driver. More...
 

Functions

static void Vhwa_m2mDofInitParamsInit (Vhwa_M2mDofInitParams *dofInitPrms)
 Vhwa_M2mDofInitParams structure init function. More...
 
static void Vhwa_m2mDofConfigInit (Vhwa_M2mDofPrms *dofCfg)
 Function to initialize the DOF configuration parameters to default. More...
 
static void Vhwa_m2mDofCreateArgsInit (Vhwa_M2mDofCreateArgs *createArgs)
 Function to initialize the DOF create argument parameters to default. More...
 
int32_t Vhwa_m2mDofInit (Vhwa_M2mDofInitParams *pInitPrms)
 DOF initialization function. This function initializes the DOF hardware and drivers. This function should be called before calling any driver APIs and only once. More...
 
void Vhwa_m2mDofDeInit (void)
 DOF de-initialization function. This function un-initializes the DOF hardware and drivers. This function should be called during system shutdown if Vhwa_m2mDofDeInit() was called by the application. More...
 
int32_t Vhwa_m2mDofAllocSl2 (const Vhwa_M2mDofSl2AllocPrms *sl2allocPrms)
 Function to allocate Sl2 memory for input and output buffers. Both DOF and SDE SL2 memory should be freed before reallocating. More...
 
int32_t Vhwa_m2mDofFreeSl2 (void)
 Function to free allocated SL2. More...
 
void Vhwa_m2mConfScoreParamInit (Dof_ConfScoreParam *csPrms)
 Function to Initialize the confidence score with default value. More...
 
static void Vhwa_M2mDofSl2AllocPrmsInit (Vhwa_M2mDofSl2AllocPrms *sl2Prms)
 

Macros

#define VHWA_M2M_DOF_MAX_IN_BUFFER   (5U)
 
#define VHWA_M2M_DOF_MAX_OUT_BUFFER   (1U)
 
#define VHWA_M2M_DOF_MAX_BUFFER
 
#define VHWA_M2M_DOF_DRV_INST_ID   (0U)
 
#define VHWA_M2M_DOF_MAX_HANDLES   (4u)
 Max Number of handles supported by DOF M2M Driver. More...
 

VHWA DOF IOCTL macros

Input/Output control MACRO's for DOF driver

#define VHWA_M2M_IOCTL_DOF_SET_PARAMS   (VHWA_IOCTL_DOF_IOCTL_BASE)
 IOCTL for setting DOF configuration. More...
 
#define VHWA_M2M_IOCTL_DOF_SET_CONF_SCORE_PARAMS   (VHWA_M2M_IOCTL_DOF_SET_PARAMS + 1u)
 IOCTL for setting Confidence score parameters. More...
 
#define VHWA_M2M_IOCTL_DOF_SET_HTS_LIMIT   (VHWA_M2M_IOCTL_DOF_SET_CONF_SCORE_PARAMS + 1u)
 IOCTL for setting bandwidth limiter. More...
 
#define VHWA_M2M_IOCTL_DOF_SET_NEXT_PYR   (VHWA_M2M_IOCTL_DOF_SET_HTS_LIMIT + 1u)
 IOCTL for setting next Pyramid level to be processsed this IOCTL should be called bfore process request. More...
 
#define VHWA_M2M_IOCTL_DOF_GET_PERFORMANCE   (VHWA_M2M_IOCTL_DOF_SET_NEXT_PYR + 1u)
 IOCTL for getting IP performance. More...
 
#define VHWA_M2M_IOCTL_DOF_GET_PSA_SIGN   (VHWA_M2M_IOCTL_DOF_GET_PERFORMANCE + 1u)
 IOCTL for getting the PSA signature. More...
 
#define VHWA_M2M_IOCTL_DOF_GET_HISTOGRAM   (VHWA_M2M_IOCTL_DOF_GET_PSA_SIGN + 1u)
 IOCTL for getting flow vector histogram. More...
 
#define VHWA_M2M_IOCTL_DOF_REGISTER_ERR_CB   (VHWA_M2M_IOCTL_DOF_GET_HISTOGRAM + 1u)
 IOCTL for registering the Error Callback. More...
 
#define VHWA_M2M_IOCTL_DOF_SYNC_START   (VHWA_M2M_IOCTL_DOF_REGISTER_ERR_CB + 1u)
 IOCTL to sync start each module This IOCTL doesn't configure any register and only enable pipeline to start processing. More...
 

VHWA DOF IO buffer indexes

Input/Output buffer MACRO's for DOF driver

#define DOF_INPUT_REFERENCE_IMG   (0U)
 
#define DOF_INPUT_CURRENT_IMG   (1U)
 
#define DOF_INPUT_TEMPORAL_PRED   (2U)
 
#define DOF_INPUT_PYRAMID_PRED   (3U)
 
#define DOF_INPUT_SOF   (4U)
 
#define DOF_OUTPUT   (5U)
 
#define DOF_INPUT_FOCO_REF_IMG   (6U)
 
#define DOF_INPUT_FOCO_CURR_IMG   (7U)
 

VHWA DOF Default Init Paramters

VHWA DOF Default Init Paramters for Sl2

#define DOF_DEFAULT_IMG_WIDTH   (1312U)
 
#define DOF_DEFAULT_CCSF   (FVID2_CCSF_BITS12_UNPACKED16)
 
#define DOF_DEFAULT_REF_BUFF_DEPTH   (2U)
 
#define DOF_DEFAULT_CUR_BUFF_DEPTH   (2U)
 
#define DOF_DEFAULT_FV_BUFF_DEPTH   (4U)
 
#define DOF_DEFAULT_TOP_SR   (48U)
 
#define DOF_DEFAULT_BOT_SR   (48U)
 

Macro Definition Documentation

◆ VHWA_M2M_IOCTL_DOF_SET_PARAMS

#define VHWA_M2M_IOCTL_DOF_SET_PARAMS   (VHWA_IOCTL_DOF_IOCTL_BASE)

IOCTL for setting DOF configuration.

◆ VHWA_M2M_IOCTL_DOF_SET_CONF_SCORE_PARAMS

#define VHWA_M2M_IOCTL_DOF_SET_CONF_SCORE_PARAMS   (VHWA_M2M_IOCTL_DOF_SET_PARAMS + 1u)

IOCTL for setting Confidence score parameters.

◆ VHWA_M2M_IOCTL_DOF_SET_HTS_LIMIT

#define VHWA_M2M_IOCTL_DOF_SET_HTS_LIMIT   (VHWA_M2M_IOCTL_DOF_SET_CONF_SCORE_PARAMS + 1u)

IOCTL for setting bandwidth limiter.

◆ VHWA_M2M_IOCTL_DOF_SET_NEXT_PYR

#define VHWA_M2M_IOCTL_DOF_SET_NEXT_PYR   (VHWA_M2M_IOCTL_DOF_SET_HTS_LIMIT + 1u)

IOCTL for setting next Pyramid level to be processsed this IOCTL should be called bfore process request.

◆ VHWA_M2M_IOCTL_DOF_GET_PERFORMANCE

#define VHWA_M2M_IOCTL_DOF_GET_PERFORMANCE   (VHWA_M2M_IOCTL_DOF_SET_NEXT_PYR + 1u)

IOCTL for getting IP performance.

◆ VHWA_M2M_IOCTL_DOF_GET_PSA_SIGN

#define VHWA_M2M_IOCTL_DOF_GET_PSA_SIGN   (VHWA_M2M_IOCTL_DOF_GET_PERFORMANCE + 1u)

IOCTL for getting the PSA signature.

◆ VHWA_M2M_IOCTL_DOF_GET_HISTOGRAM

#define VHWA_M2M_IOCTL_DOF_GET_HISTOGRAM   (VHWA_M2M_IOCTL_DOF_GET_PSA_SIGN + 1u)

IOCTL for getting flow vector histogram.

◆ VHWA_M2M_IOCTL_DOF_REGISTER_ERR_CB

#define VHWA_M2M_IOCTL_DOF_REGISTER_ERR_CB   (VHWA_M2M_IOCTL_DOF_GET_HISTOGRAM + 1u)

IOCTL for registering the Error Callback.

◆ VHWA_M2M_IOCTL_DOF_SYNC_START

#define VHWA_M2M_IOCTL_DOF_SYNC_START   (VHWA_M2M_IOCTL_DOF_REGISTER_ERR_CB + 1u)

IOCTL to sync start each module This IOCTL doesn't configure any register and only enable pipeline to start processing.

◆ VHWA_M2M_DOF_MAX_IN_BUFFER

#define VHWA_M2M_DOF_MAX_IN_BUFFER   (5U)

Maximim number of inputs DOF buffers

◆ VHWA_M2M_DOF_MAX_OUT_BUFFER

#define VHWA_M2M_DOF_MAX_OUT_BUFFER   (1U)

Maximim number of output DOF buffers

◆ VHWA_M2M_DOF_MAX_BUFFER

#define VHWA_M2M_DOF_MAX_BUFFER
Value:
VHWA_M2M_DOF_MAX_OUT_BUFFER)
#define VHWA_M2M_DOF_MAX_IN_BUFFER
Definition: vhwa_m2mDof.h:117

Maximim number of total DOF buffers Instance ID for the DOF M2m driver

◆ VHWA_M2M_DOF_DRV_INST_ID

#define VHWA_M2M_DOF_DRV_INST_ID   (0U)

◆ VHWA_M2M_DOF_MAX_HANDLES

#define VHWA_M2M_DOF_MAX_HANDLES   (4u)

Max Number of handles supported by DOF M2M Driver.

◆ DOF_INPUT_REFERENCE_IMG

#define DOF_INPUT_REFERENCE_IMG   (0U)

◆ DOF_INPUT_CURRENT_IMG

#define DOF_INPUT_CURRENT_IMG   (1U)

◆ DOF_INPUT_TEMPORAL_PRED

#define DOF_INPUT_TEMPORAL_PRED   (2U)

◆ DOF_INPUT_PYRAMID_PRED

#define DOF_INPUT_PYRAMID_PRED   (3U)

◆ DOF_INPUT_SOF

#define DOF_INPUT_SOF   (4U)

◆ DOF_OUTPUT

#define DOF_OUTPUT   (5U)

◆ DOF_INPUT_FOCO_REF_IMG

#define DOF_INPUT_FOCO_REF_IMG   (6U)

◆ DOF_INPUT_FOCO_CURR_IMG

#define DOF_INPUT_FOCO_CURR_IMG   (7U)

◆ DOF_DEFAULT_IMG_WIDTH

#define DOF_DEFAULT_IMG_WIDTH   (1312U)

◆ DOF_DEFAULT_CCSF

#define DOF_DEFAULT_CCSF   (FVID2_CCSF_BITS12_UNPACKED16)

◆ DOF_DEFAULT_REF_BUFF_DEPTH

#define DOF_DEFAULT_REF_BUFF_DEPTH   (2U)

◆ DOF_DEFAULT_CUR_BUFF_DEPTH

#define DOF_DEFAULT_CUR_BUFF_DEPTH   (2U)

◆ DOF_DEFAULT_FV_BUFF_DEPTH

#define DOF_DEFAULT_FV_BUFF_DEPTH   (4U)

◆ DOF_DEFAULT_TOP_SR

#define DOF_DEFAULT_TOP_SR   (48U)

◆ DOF_DEFAULT_BOT_SR

#define DOF_DEFAULT_BOT_SR   (48U)

Function Documentation

◆ Vhwa_m2mDofInitParamsInit()

static void Vhwa_m2mDofInitParamsInit ( Vhwa_M2mDofInitParams dofInitPrms)
inlinestatic

Vhwa_M2mDofInitParams structure init function.

Parameters
dofInitPrmsPointer to Vhwa_M2mDofInitParams structure.
Returns
None

◆ Vhwa_m2mDofConfigInit()

static void Vhwa_m2mDofConfigInit ( Vhwa_M2mDofPrms dofCfg)
inlinestatic

Function to initialize the DOF configuration parameters to default.

Parameters
dofCfgPointer to a Vhwa_M2mDofPrms containing DOF configuration
Returns
None

◆ Vhwa_m2mDofCreateArgsInit()

static void Vhwa_m2mDofCreateArgsInit ( Vhwa_M2mDofCreateArgs createArgs)
inlinestatic

Function to initialize the DOF create argument parameters to default.

Parameters
createArgsPointer to a Vhwa_M2mDofCreateArgs containing DOF create arguments
Returns
None

◆ Vhwa_m2mDofInit()

int32_t Vhwa_m2mDofInit ( Vhwa_M2mDofInitParams pInitPrms)

DOF initialization function. This function initializes the DOF hardware and drivers. This function should be called before calling any driver APIs and only once.

Parameters
pInitPrmsPointer to a Vhwa_M2mDofInitParams structure containing the DOF driver initialization parameters
Returns
FVID2_SOK if successful, else suitable error code

◆ Vhwa_m2mDofDeInit()

void Vhwa_m2mDofDeInit ( void  )

DOF de-initialization function. This function un-initializes the DOF hardware and drivers. This function should be called during system shutdown if Vhwa_m2mDofDeInit() was called by the application.

Returns
None

◆ Vhwa_m2mDofAllocSl2()

int32_t Vhwa_m2mDofAllocSl2 ( const Vhwa_M2mDofSl2AllocPrms sl2allocPrms)

Function to allocate Sl2 memory for input and output buffers. Both DOF and SDE SL2 memory should be freed before reallocating.

Parameters
sl2allocPrmsPointer to a Vhwa_M2mDofSl2AllocPrms structure containing the SL2 allocation parameters
Returns
FVID2_SOK if successful, else suitable error code

◆ Vhwa_m2mDofFreeSl2()

int32_t Vhwa_m2mDofFreeSl2 ( void  )

Function to free allocated SL2.

Returns
FVID2_SOK if successful, else suitable error code

◆ Vhwa_m2mConfScoreParamInit()

void Vhwa_m2mConfScoreParamInit ( Dof_ConfScoreParam csPrms)

Function to Initialize the confidence score with default value.

Parameters
csPrmsPointer to a Dof_ConfScoreParam structure which needs to be initialized
Returns
None

◆ Vhwa_M2mDofSl2AllocPrmsInit()

static void Vhwa_M2mDofSl2AllocPrmsInit ( Vhwa_M2mDofSl2AllocPrms sl2Prms)
inlinestatic