Video Core Feature Interface Reference Manual  jpl-r3.19.0-rc5
vftr_ld.h File Reference

Core feature-lib for light detection. More...

#include "mpi_base_types.h"
#include "mpi_index.h"
#include "vftr_dump.h"

Data Structures

struct  VFTR_LD_PARAM_S
 Structure of light detection parameters. More...
 
struct  VFTR_LD_STATUS_S
 Structure of light detection status. More...
 
struct  VFTR_LD_INSTANCE_S
 Structure for the light detection instance. More...
 

Macros

#define VFTR_LD_MAX_SEN_TH   255
 
#define VFTR_LD_MIN_SEN_TH   1
 
#define VFTR_LD_MAX_ALARM_SUPR   10
 
#define VFTR_LD_MIN_ALARM_SUPR   0
 
#define VFTR_LD_MAX_ALARM_LATENCY   10
 
#define VFTR_LD_MIN_ALARM_LATENCY   0
 
#define VFTR_LD_MAX_ALARM_LATENCY_CYC   5
 
#define VFTR_LD_MIN_ALARM_LATENCY_CYC   1
 
#define VFTR_LD_MAX_DET_PERIOD   10
 
#define VFTR_LD_MIN_DET_PERIOD   0
 

Enumerations

enum  VFTR_LD_COND_E {
  VFTR_LD_LIGHT_NONE = 0x0, VFTR_LD_LIGHT_ON = 0x1, VFTR_LD_LIGHT_OFF = 0x2, VFTR_LD_LIGHT_BOTH = 0x3,
  VFTR_LD_LIGHT_NUM = 0x4
}
 Enumeration of light detection mode. More...
 

Functions

VFTR_LD_INSTANCE_SVFTR_LD_newInstance ()
 Create light detection instance. More...
 
INT32 VFTR_LD_deleteInstance (VFTR_LD_INSTANCE_S **instance)
 Delete light detection instance. More...
 
INT32 VFTR_LD_setParam (VFTR_LD_INSTANCE_S *instance, const MPI_SIZE_S *res, const VFTR_LD_PARAM_S *param)
 Set light detection parameters. More...
 
INT32 VFTR_LD_checkParam (const MPI_SIZE_S *res, const VFTR_LD_PARAM_S *param)
 check light detection parameters. More...
 
INT32 VFTR_LD_getParam (const VFTR_LD_INSTANCE_S *instance, VFTR_LD_PARAM_S *param)
 Get light detection parameters. More...
 
INT32 _VFTR_LD_dump (VFTR_LD_INSTANCE_S *instance, const UINT8 mcvp_avg_y_cfg_idx, VFTR_LD_STATUS_S *status)
 
INT32 _VFTR_LD_detect (VFTR_LD_INSTANCE_S *instance, const UINT8 mcvp_avg_y_cfg_idx, VFTR_LD_STATUS_S *status)
 
FORCE_INLINE INT32 VFTR_LD_detect (VFTR_LD_INSTANCE_S *instance, const UINT8 mcvp_avg_y_cfg_idx, VFTR_LD_STATUS_S *status)
 An inline function. If variable vftr_dump_en is true, then call dump function for debugging. More...
 
INT32 VFTR_LD_getStat (const VFTR_LD_INSTANCE_S *instance, VFTR_LD_STATUS_S *status)
 

Detailed Description

Core feature-lib for light detection.

Enumeration Type Documentation

Enumeration of light detection mode.

Enumerator
VFTR_LD_LIGHT_NONE 

Change none.

VFTR_LD_LIGHT_ON 

Triggered by light ON.

VFTR_LD_LIGHT_OFF 

Triggered by light OFF.

VFTR_LD_LIGHT_BOTH 

Triggered by both light ON and light OFF.

VFTR_LD_LIGHT_NUM 

Number of light condition.

Function Documentation

INT32 VFTR_LD_checkParam ( const MPI_SIZE_S res,
const VFTR_LD_PARAM_S param 
)

check light detection parameters.

Parameters
[in]paramlight detection parameters.
Return values
0Success.
EFAULTInput pointer is NULL.
EINVALlight detection parameters are invalid.
See also
VFTR_LD_getParam()
VFTR_LD_checkParam()
INT32 VFTR_LD_deleteInstance ( VFTR_LD_INSTANCE_S **  instance)

Delete light detection instance.

Parameters
[in,out]instancelight detection instance.
Returns
The execution result.
Return values
0success.
EFAULTinput pointer is NULL.
See also
VFTR_LD_newInstance()
FORCE_INLINE INT32 VFTR_LD_detect ( VFTR_LD_INSTANCE_S instance,
const UINT8  mcvp_avg_y_cfg_idx,
VFTR_LD_STATUS_S status 
)

An inline function. If variable vftr_dump_en is true, then call dump function for debugging.

See also
_VFTR_AROI_dump()
_VFTR_AROI_detectRoi()
INT32 VFTR_LD_getParam ( const VFTR_LD_INSTANCE_S instance,
VFTR_LD_PARAM_S param 
)

Get light detection parameters.

Parameters
[in]instanceLD instance.
[out]paramLD parameters.
Return values
0Success.
EFAULTInput pointer is NULL.
See also
VFTR_LD_setParam()
VFTR_LD_checkParam()
VFTR_LD_INSTANCE_S* VFTR_LD_newInstance ( )

Create light detection instance.

Returns
The pointer of light detection instance.
Return values
Not NULLsuccess to create instance.
NULLfail to create instance.
See also
VFTR_LD_deleteInstance()
INT32 VFTR_LD_setParam ( VFTR_LD_INSTANCE_S instance,
const MPI_SIZE_S res,
const VFTR_LD_PARAM_S param 
)

Set light detection parameters.

Parameters
[in,out]instancelight detection instance.
[in]paramlight detection parameters.
Return values
0success.
EFAULTinput pointer is NULL.
See also
VFTR_LD_getParam()
VFTR_LD_checkParam()