MPP Programming Interface Reference Manual  jpl-r3.3.24
mpi_dev.h File Reference

MPI for video device. More...

#include "mpi_index.h"

Data Structures

struct  MPI_PATH_ATTR_S
 Struct for input path attributes. More...
 
struct  MPI_DEV_ATTR_S
 Struct for the attribute of video device. More...
 
struct  MPI_CHN_ATTR_S
 Struct for video channel attributes. More...
 
struct  MPI_CHN_STAT_S
 Struct for channel state. More...
 
struct  MPI_LDC_ATTR_S
 Struct for the attribute of LDC(Lens Distortion Correction). More...
 
struct  MPI_PANORAMA_ATTR_S
 Struct for the attribute of fisheye panorama. More...
 
struct  MPI_PANNING_ATTR_S
 Struct for the attribute of fisheye panning. More...
 
struct  MPI_SURROUND_ATTR_S
 Struct for the attribute of fisheye surround. More...
 
struct  MPI_STITCH_DIST_S
 Struct for stitch parmeters at certain distance. More...
 
struct  MPI_STITCH_ATTR_S
 Struct for the attribute of content adaptive stitching. More...
 
struct  MPI_WIN_ATTR_S
 Struct for the video window attributes. More...
 
struct  MPI_CHN_LAYOUT_S
 Struct for the video channel layout. More...
 
struct  MPI_ISP_MV_HIST_CFG_S
 Struct for the configuration of ISP MV hist. More...
 
struct  MPI_ISP_MV_HIST_S
 Struct for the of ISP MV hist. More...
 
struct  MPI_ISP_VAR_CFG_S
 Struct for the of ISP variance configuration. More...
 
struct  MPI_ISP_VAR_S
 Struct for the of ISP variance. More...
 
struct  MPI_ISP_Y_AVG_CFG_S
 Struct for the of ISP variance configuration. More...
 
struct  MPI_VIDEO_FRAME_INFO_S
 Struct for the video frame information. More...
 

Macros

#define MPI_VENC_ROI_NUM   (8)
 
#define MPI_SPH_VIDEO_SENSOR_NUM   (2)
 
#define MPI_STITCH_SENSOR_NUM   (2)
 
#define MPI_STITCH_TABLE_NUM   (3)
 
#define MPI_CENTER_OFFSET_MIN   (-8191)
 
#define MPI_CENTER_OFFSET_MAX   (8192)
 
#define MPI_LDC_RATIO_MIN   (0)
 
#define MPI_LDC_RATIO_MAX   (32767)
 
#define MPI_CIRCLE_RADIUS_MIN   (0)
 
#define MPI_CIRCLE_RADIUS_MAX   (65535)
 
#define MPI_PANORAMA_STRAIGHTEN_MIN   (0)
 
#define MPI_PANORAMA_STRAIGHTEN_MAX   (4095)
 
#define MPI_MAX_ISP_MV_HIST_BIN_NUM   (32)
 
#define MPI_MAX_ISP_MV_HIST_CFG_NUM   (1)
 
#define MPI_MAX_ISP_VAR_CFG_NUM   (1)
 
#define MPI_MAX_ISP_Y_AVG_CFG_NUM   (5)
 
#define MPI_MIN_ROI_VAL   (0)
 
#define MPI_MAX_ROI_VAL   (1024)
 
#define MPI_CHN_RES_ALIGN   (8)
 
#define MPI_CHN_LAYOUT_HOR_ALIGN   (16)
 
#define MPI_CHN_LAYOUT_VER_ALIGN   (32)
 
#define MPI_SENSOR_BMP(i)   (0x1 << (i))
 marco to transform path index to bitmap. More...
 

Typedefs

typedef UINT16 MPI_ISP_Y_AVG
 MPI_ISP_Y_AVG is represented by UINT16.
 

Enumerations

enum  MPI_HDR_MODE_E {
  MPI_HDR_MODE_NONE = 0, MPI_HDR_MODE_FRAME_PARL, MPI_HDR_MODE_FRAME_ITLV, MPI_HDR_MODE_TOP_N_BTM,
  MPI_HDR_MODE_SIDE_BY_SIDE, MPI_HDR_MODE_LINE_COLOC, MPI_HDR_MODE_LINE_ITLV, MPI_HDR_MODE_PIX_COLOC,
  MPI_HDR_MODE_PIX_ITLV, MPI_HDR_MODE_NUM
}
 Enumeration of HDR mode. More...
 
enum  MPI_LDC_VIEW_TYPE_E { MPI_LDC_VIEW_TYPE_CROP, MPI_LDC_VIEW_TYPE_ALL, MPI_LDC_VIEW_TYPE_NUM }
 Enumeration of LDC mode. More...
 
enum  MPI_WIN_VIEW_TYPE_E {
  MPI_WIN_VIEW_TYPE_NORMAL = 0, MPI_WIN_VIEW_TYPE_LDC, MPI_WIN_VIEW_TYPE_PANORAMA, MPI_WIN_VIEW_TYPE_PANNING,
  MPI_WIN_VIEW_TYPE_SURROUND, MPI_WIN_VIEW_TYPE_STITCH, MPI_WIN_VIEW_TYPE_GRAPHICS, MPI_WIN_VIEW_TYPE_NUM
}
 Enumeration of window view type. More...
 
enum  MPI_SNAPSHOT_TYPE { MPI_SNAPSHOT_Y = 0, MPI_SNAPSHOT_YUV, MPI_SNAPSHOT_RGB, MPI_SNAPSHOT_MAX }
 Enumneration of snapshot type. More...
 

Functions

INT32 MPI_DEV_addPath (MPI_PATH idx, const MPI_PATH_ATTR_S *p_path_attr)
 Add a input path and set its attributes. More...
 
INT32 MPI_DEV_deletePath (MPI_PATH idx)
 Delete an input path. More...
 
INT32 MPI_DEV_setPathAttr (MPI_PATH idx, const MPI_PATH_ATTR_S *p_path_attr)
 Set the input path attributes. More...
 
INT32 MPI_DEV_getPathAttr (MPI_PATH idx, MPI_PATH_ATTR_S *p_path_attr)
 Get the input path attributes. More...
 
INT32 MPI_DEV_createDev (MPI_DEV idx, const MPI_DEV_ATTR_S *p_dev_attr)
 Create a video device. More...
 
INT32 MPI_DEV_destroyDev (MPI_DEV idx)
 Delete a video device. More...
 
INT32 MPI_DEV_setDevAttr (MPI_DEV idx, const MPI_DEV_ATTR_S *p_dev_attr)
 Set the attributes of a video device. More...
 
INT32 MPI_DEV_getDevAttr (MPI_DEV idx, MPI_DEV_ATTR_S *p_dev_attr)
 Get the attributes of a video device. More...
 
INT32 MPI_DEV_startDev (MPI_DEV idx)
 Start the video device. More...
 
INT32 MPI_DEV_stopDev (MPI_DEV idx)
 Stop a video device. More...
 
INT32 MPI_DEV_addChn (MPI_CHN idx, const MPI_CHN_ATTR_S *p_chn_attr)
 Add a video channel and set its attributes. More...
 
INT32 MPI_DEV_deleteChn (MPI_CHN idx)
 Delete a video channel. More...
 
INT32 MPI_DEV_setChnAttr (MPI_CHN idx, const MPI_CHN_ATTR_S *p_chn_attr)
 Set the video channel attribute. More...
 
INT32 MPI_DEV_getChnAttr (MPI_CHN idx, MPI_CHN_ATTR_S *p_chn_attr)
 Get the video channel attributes. More...
 
INT32 MPI_DEV_setChnLayout (MPI_CHN idx, const MPI_CHN_LAYOUT_S *p_chn_layout)
 Set the video channel layout. More...
 
INT32 MPI_DEV_getChnLayout (MPI_CHN idx, MPI_CHN_LAYOUT_S *p_chn_layout)
 Get the video channel layout. More...
 
INT32 MPI_DEV_setWindowAttr (MPI_WIN idx, const MPI_WIN_ATTR_S *p_window_attr)
 Set the video window attribute. More...
 
INT32 MPI_DEV_getWindowAttr (MPI_WIN idx, MPI_WIN_ATTR_S *p_window_attr)
 Get the video window attribute. More...
 
INT32 MPI_DEV_setWindowRoi (MPI_WIN idx, const MPI_RECT_S *p_roi)
 Set the video window ROI. More...
 
INT32 MPI_DEV_getWindowRoi (MPI_WIN idx, MPI_RECT_S *p_roi)
 Get the video window ROI. More...
 
INT32 MPI_DEV_setStitchAttr (MPI_WIN idx, const MPI_STITCH_ATTR_S *p_stitch_attr)
 Set content adaptive stitching attribute. More...
 
INT32 MPI_DEV_getStitchAttr (MPI_WIN idx, MPI_STITCH_ATTR_S *p_stitch_attr)
 Get content adaptive stitching attribute. More...
 
INT32 MPI_DEV_setLdcAttr (MPI_WIN idx, const MPI_LDC_ATTR_S *p_ldc_attr)
 Set lens distortion correction attribute. More...
 
INT32 MPI_DEV_getLdcAttr (MPI_WIN idx, MPI_LDC_ATTR_S *p_ldc_attr)
 Get lens distortion correction attribute. More...
 
INT32 MPI_DEV_setPanoramaAttr (MPI_WIN idx, const MPI_PANORAMA_ATTR_S *p_panorama_attr)
 Set fisheye panorama attribute. More...
 
INT32 MPI_DEV_getPanoramaAttr (MPI_WIN idx, MPI_PANORAMA_ATTR_S *p_panorama_attr)
 Get fisheye panorama attribute. More...
 
INT32 MPI_DEV_setPanningAttr (MPI_WIN idx, const MPI_PANNING_ATTR_S *p_panning_attr)
 Set fisheye panning attribute. More...
 
INT32 MPI_DEV_getPanningAttr (MPI_WIN idx, MPI_PANNING_ATTR_S *p_panning_attr)
 Get fisheye panning attribute. More...
 
INT32 MPI_DEV_setSurroundAttr (MPI_WIN idx, const MPI_SURROUND_ATTR_S *p_surround_attr)
 Set fisheye surround attribute. More...
 
INT32 MPI_DEV_getSurroundAttr (MPI_WIN idx, MPI_SURROUND_ATTR_S *p_surround_attr)
 Get fisheye surround attribute. More...
 
INT32 MPI_DEV_startChn (MPI_CHN idx)
 Start a video channel. More...
 
INT32 MPI_DEV_stopChn (MPI_CHN idx)
 Stop a video channel. More...
 
INT32 MPI_DEV_startAllChn (MPI_DEV idx)
 Start all video channels. More...
 
INT32 MPI_DEV_stopAllChn (MPI_DEV idx)
 Stop all video channels that are running. More...
 
INT32 MPI_DEV_queryChnState (MPI_CHN idx, MPI_CHN_STAT_S *stat)
 Query a video channel state. More...
 
INT32 MPI_DEV_addIspMvHistCfg (MPI_WIN idx, const MPI_ISP_MV_HIST_CFG_S *cfg, UINT8 *cfg_idx)
 Add ISP MV histogram configuration. More...
 
INT32 MPI_DEV_rmIspMvHistCfg (MPI_WIN idx, UINT8 cfg_idx)
 Remove ISP MV histogram configuration. More...
 
INT32 MPI_DEV_getIspMvHistCfg (MPI_WIN idx, UINT8 cfg_idx, MPI_ISP_MV_HIST_CFG_S *cfg)
 Get ISP MV histogram configuration. More...
 
INT32 MPI_DEV_getIspMvHist (MPI_WIN idx, UINT8 roi_idx, MPI_ISP_MV_HIST_S *stat)
 Get ISP MV histogram. More...
 
INT32 MPI_DEV_addIspVarCfg (MPI_WIN idx, const MPI_ISP_VAR_CFG_S *cfg, UINT8 *cfg_idx)
 Add ISP variance configuration. More...
 
INT32 MPI_DEV_rmIspVarCfg (MPI_WIN idx, UINT8 cfg_idx)
 Remove ISP variance configuration. More...
 
INT32 MPI_DEV_getIspVarCfg (MPI_WIN idx, UINT8 cfg_idx, MPI_ISP_VAR_CFG_S *cfg)
 Get ISP variance configuration. More...
 
INT32 MPI_DEV_getIspVar (MPI_WIN idx, UINT8 cfg_idx, MPI_ISP_VAR_S *stat)
 Get ISP variance. More...
 
INT32 MPI_DEV_addIspYAvgCfg (MPI_WIN idx, const MPI_ISP_Y_AVG_CFG_S *cfg, UINT8 *cfg_idx)
 Add ISP Y average configuration. More...
 
INT32 MPI_DEV_rmIspYAvgCfg (MPI_WIN idx, UINT8 cfg_idx)
 Remove ISP Y average configuration. More...
 
INT32 MPI_DEV_getIspYAvgCfg (MPI_WIN idx, UINT8 cfg_idx, MPI_ISP_Y_AVG_CFG_S *cfg)
 Get ISP Y average configuration. More...
 
INT32 MPI_DEV_getIspYAvg (MPI_WIN idx, UINT8 cfg_idx, MPI_ISP_Y_AVG *y_avg)
 Get ISP Y average. More...
 
INT32 MPI_DEV_getWinFrame (MPI_WIN idx, MPI_VIDEO_FRAME_INFO_S *frame_info, INT32 time_ms)
 Get a window's snapshot. More...
 
INT32 MPI_DEV_releaseWinFrame (MPI_WIN idx, MPI_VIDEO_FRAME_INFO_S *frame_info)
 Release window snapshot. More...
 
INT32 MPI_DEV_waitWin (MPI_WIN idx, UINT32 *timestamp, INT32 timeout)
 Wait until processing done of a video window. More...
 
INT32 MPI_DEV_waitIspStat (MPI_WIN idx)
 Wait until ISP statistics is ready. More...
 

Detailed Description

MPI for video device.

Macro Definition Documentation

#define MPI_CENTER_OFFSET_MAX   (8192)

Center offset maximum

#define MPI_CENTER_OFFSET_MIN   (-8191)

Center offset minimun

#define MPI_CHN_LAYOUT_HOR_ALIGN   (16)

Horizontal alignment of channel layout.

#define MPI_CHN_LAYOUT_VER_ALIGN   (32)

Vertical alignment of channel layout.

#define MPI_CHN_RES_ALIGN   (8)

Alignment of channel resolution.

#define MPI_CIRCLE_RADIUS_MAX   (65535)

Circle radius maximum

#define MPI_CIRCLE_RADIUS_MIN   (0)

Circle radius minimum

#define MPI_LDC_RATIO_MAX   (32767)

LDC maximal ratio.

#define MPI_LDC_RATIO_MIN   (0)

LDC minimal ratio.

#define MPI_MAX_ISP_MV_HIST_BIN_NUM   (32)

Maximum number of MV histogram bins

#define MPI_MAX_ISP_MV_HIST_CFG_NUM   (1)

Maximum number of MV histogram configurations

#define MPI_MAX_ISP_VAR_CFG_NUM   (1)

Maximum number of variance configurations

#define MPI_MAX_ISP_Y_AVG_CFG_NUM   (5)

Maximum number of Y average configurations

#define MPI_MAX_ROI_VAL   (1024)

ROI value maximum

#define MPI_MIN_ROI_VAL   (0)

ROI value minimum

#define MPI_PANORAMA_STRAIGHTEN_MAX   (4095)

Panorama straighten maximum

#define MPI_PANORAMA_STRAIGHTEN_MIN   (0)

Panorama straighten minimum

#define MPI_SENSOR_BMP (   i)    (0x1 << (i))

marco to transform path index to bitmap.

Parameters
[in]isensor path index.
#define MPI_SPH_VIDEO_SENSOR_NUM   (2)

Number of spherical video sensor.

#define MPI_STITCH_SENSOR_NUM   (2)

Number of STITCH sensor.

#define MPI_STITCH_TABLE_NUM   (3)

Number of STITCH table.

#define MPI_VENC_ROI_NUM   (8)

Number of video encode ROI.

Enumeration Type Documentation

Enumeration of HDR mode.

Enumerator
MPI_HDR_MODE_NONE 

NO HDR mode.

MPI_HDR_MODE_FRAME_PARL 

Frame parallel HDR mode.

MPI_HDR_MODE_FRAME_ITLV 

Frame interleave HDR mode.

MPI_HDR_MODE_TOP_N_BTM 

TOP and bottom HDR mode.

MPI_HDR_MODE_SIDE_BY_SIDE 

Side by side HDR mode.

MPI_HDR_MODE_LINE_COLOC 

Line colocated HDR mode.

MPI_HDR_MODE_LINE_ITLV 

Line interleave HDR mode.

MPI_HDR_MODE_PIX_COLOC 

Pixel colocated HDR mode.

MPI_HDR_MODE_PIX_ITLV 

Pixel interleave HDR mode.

Enumeration of LDC mode.

Enumerator
MPI_LDC_VIEW_TYPE_CROP 

The corrected picture is cropped and the size of the cropped region is equal to that of the source picture.

MPI_LDC_VIEW_TYPE_ALL 

The maximum rectangle is obtained based on the edges of the corrected picture.

Enumneration of snapshot type.

Enumerator
MPI_SNAPSHOT_Y 

Y only

MPI_SNAPSHOT_YUV 

YUV snapshot

MPI_SNAPSHOT_RGB 

RGB snapshot

Enumeration of window view type.

Enumerator
MPI_WIN_VIEW_TYPE_NORMAL 

Normal view without GFX.

MPI_WIN_VIEW_TYPE_LDC 

LDC view.

MPI_WIN_VIEW_TYPE_PANORAMA 

Panorama view.

MPI_WIN_VIEW_TYPE_PANNING 

Panning view.

MPI_WIN_VIEW_TYPE_SURROUND 

Surround view.

MPI_WIN_VIEW_TYPE_STITCH 

Stitch view.

MPI_WIN_VIEW_TYPE_GRAPHICS 

Graphics view.

Function Documentation

INT32 MPI_DEV_addChn ( MPI_CHN  idx,
const MPI_CHN_ATTR_S p_chn_attr 
)

Add a video channel and set its attributes.

Parameters
[in]idxIndex of the video channel that is to be added.
[in]p_chn_attrPointer to the video channel attribute.
Returns
The execution result.
Return values
MPI_SUCCESSsuccess
othersfailure
Note
  • Video device should be created before creating video channel.
  • Video channel 0 should be created before other channels.
  • The attributes associate to video channel can be retrieved or modified after it is created. For example: MPI_CHN_ATTR_S, MPI_CHN_LAYOUT_S.
See also
MPI_DEV_deleteChn()
MPI_DEV_startChn()
MPI_DEV_setChnLayout()
MPI_DEV_setWindowAttr()
INT32 MPI_DEV_addIspMvHistCfg ( MPI_WIN  idx,
const MPI_ISP_MV_HIST_CFG_S cfg,
uint8_t *  cfg_idx 
)

Add ISP MV histogram configuration.

Parameters
[in]idxIndex of the video window that is to be configured.
[in]cfgisp mv histogram configuration.
[out]cfg_idxconfiguration index of target video window.
Returns
The execution result.
Return values
MPI_SUCCESSsuccess.
MPI_ERR_DEV_NULL_POINTERinput pointer is NULL.
MPI_ERR_DEV_INVALID_WINinvalid video window index.
MPI_ERR_DEV_INVALID_CHNinvalid video channel index.
MPI_ERR_DEV_INVALID_DEVinvalid device index.
MPI_ERR_DEV_INVALID_PARAMinvalid parameters.
MPI_ERR_DEV_NOT_EXISTdevice/channel not exist.
MPI_FAILUREunexpected fail.
Note
The number of added configuration should be less than MPI_MAX_ISP_MV_HIST_CFG_NUM which currently is 1.
Otherwise, only the latest configuration is applied.
Therefore, cfg_idx would always be 0
See also
MPI_DEV_rmIspMvHistCfg()
INT32 MPI_DEV_addIspVarCfg ( MPI_WIN  idx,
const MPI_ISP_VAR_CFG_S cfg,
uint8_t *  cfg_idx 
)

Add ISP variance configuration.

Parameters
[in]idxIndex of the video window that is to be configured.
[in]cfgisp variance configuration.
[out]cfg_idxconfiguration index of target video window.
Returns
The execution result.
Return values
MPI_SUCCESSsuccess.
MPI_ERR_DEV_NULL_POINTERinput pointer is NULL.
MPI_ERR_DEV_INVALID_WINinvalid video window index.
MPI_ERR_DEV_INVALID_CHNinvalid video channel index.
MPI_ERR_DEV_INVALID_DEVinvalid device index.
MPI_ERR_DEV_INVALID_PARAMinvalid parameters.
MPI_ERR_DEV_NOT_EXISTdevice/channel not exist.
MPI_FAILUREunexpected fail.
Note
The number of added configuration should be less than MPI_MAX_ISP_VAR_CFG_NUM which currently is 1.
Otherwise, only the latest configuration is applied.
Therefore, cfg_idx would always be 0
See also
MPI_DEV_rmIspVarCfg()
INT32 MPI_DEV_addIspYAvgCfg ( MPI_WIN  idx,
const MPI_ISP_Y_AVG_CFG_S cfg,
uint8_t *  cfg_idx 
)

Add ISP Y average configuration.

The number of added configuration should be less than MPI_MAX_ISP_Y_AVG_CFG_NUM which currently is 5.

Parameters
[in]idxIndex of the video window that is to be configured.
[in]cfgisp Y average configuration to add.
[out]cfg_idxconfiguration index of target video window.
Returns
The execution result.
Return values
MPI_SUCCESSsuccess.
MPI_ERR_DEV_NULL_POINTERinput pointer is NULL.
MPI_ERR_DEV_INVALID_WINinvalid video window index.
MPI_ERR_DEV_INVALID_CHNinvalid video channel index.
MPI_ERR_DEV_INVALID_DEVinvalid device index.
MPI_ERR_DEV_INVALID_PARAMinvalid parameters.
MPI_ERR_DEV_NOT_EXISTdevice/channel not exist.
MPI_FAILUREunexpected fail.
See also
MPI_DEV_rmIspYAvgCfg()
INT32 MPI_DEV_addPath ( MPI_PATH  idx,
const MPI_PATH_ATTR_S p_path_attr 
)

Add a input path and set its attributes.

Parameters
[in]idxinput path index.
[in]p_path_attrpointer to the input path attribute.
See also
MPI_DEV_deletePath()
Returns
The execution result.
Return values
MPI_SUCCESSsuccess
MPI_ERR_DEV_INVALID_PARAMinvalid attributes
othersfailure
Note
  • Video device should be created before creating input path.
See also
MPI_DEV_deletePath()
INT32 MPI_DEV_createDev ( MPI_DEV  idx,
const MPI_DEV_ATTR_S p_dev_attr 
)

Create a video device.

Parameters
[in]idxIndex of the video device that is to be created.
[in]p_dev_attrPointer to the device attribute.
Returns
The execution result.
Return values
MPI_SUCCESSsuccess
othersfailure
Note
  • The attributes associate to video device can be retrieved or modified after it is created. For example: MPI_DEV_ATTR_S.
  • Video device cannot be created multiple times.
See also
MPI_DEV_destroyDev()
INT32 MPI_DEV_deleteChn ( MPI_CHN  idx)

Delete a video channel.

Parameters
[in]idxIndex of the video channel that is to be deleted.
Returns
The execution result.
Return values
MPI_SUCCESSsuccess
othersfailure
Note
  • Video channel should be suspended before deleting itself.
See also
MPI_DEV_addChn()
MPI_DEV_stopChn()
INT32 MPI_DEV_deletePath ( MPI_PATH  idx)

Delete an input path.

Parameters
[in]idxIndex of the input path that is to be deleted.
Returns
The execution result.
Return values
MPI_SUCCESSsuccess
othersfailure
Note
  • Input path can be deleted when it is suspended.
See also
MPI_DEV_addPath()
INT32 MPI_DEV_destroyDev ( MPI_DEV  idx)

Delete a video device.

Parameters
[in]idxIndex of the video device that is to be destroyed.
Returns
The execution result.
Return values
MPI_SUCCESSsuccess
othersfailure
Note
  • Device cannot be destoried when it is running.
See also
MPI_DEV_createDev()
INT32 MPI_DEV_getChnAttr ( MPI_CHN  idx,
MPI_CHN_ATTR_S p_chn_attr 
)

Get the video channel attributes.

Parameters
[in]idxIndex of the video channel that is to retrieve setting.
[out]p_chn_attrPointer to the video channel attribute.
Returns
The execution result.
Return values
MPI_SUCCESSsuccess
othersfailure
Note
  • Video channel should be created before retrieving attributes.
See also
MPI_DEV_setChnAttr()
INT32 MPI_DEV_getChnLayout ( MPI_CHN  idx,
MPI_CHN_LAYOUT_S p_chn_layout 
)

Get the video channel layout.

Parameters
[in]idxIndex of the video channel that is to retrieve setting.
[out]p_chn_layoutPointer to the video channel layout.
Returns
The execution result.
Return values
MPI_SUCCESSsuccess
othersfailure
See also
MPI_DEV_setChnLayout()
INT32 MPI_DEV_getDevAttr ( MPI_DEV  idx,
MPI_DEV_ATTR_S p_dev_attr 
)

Get the attributes of a video device.

Parameters
[in]idxIndex of the video device that is to retrieve setting.
[out]p_dev_attrPointer to the video device attribute.
Returns
The execution result.
Return values
MPI_SUCCESSsuccess
othersfailure
See also
MPI_DEV_setDevAttr()
INT32 MPI_DEV_getIspMvHist ( MPI_WIN  idx,
uint8_t  cfg_idx,
MPI_ISP_MV_HIST_S stat 
)

Get ISP MV histogram.

Parameters
[in]idxIndex of the video window that is to retrieve attribute.
[in]cfg_idxconfiguration index of target video window.
[out]statISP MV histogram.
Returns
The execution result.
Return values
MPI_SUCCESSsuccess.
MPI_ERR_DEV_NULL_POINTERinput pointer is NULL.
MPI_ERR_DEV_INVALID_WINinvalid video window index.
MPI_ERR_DEV_INVALID_CHNinvalid video channel index.
MPI_ERR_DEV_INVALID_DEVinvalid device index.
MPI_ERR_DEV_INVALID_PARAMinvalid parameters.
MPI_ERR_DEV_NOT_EXISTdevice/channel not exist.
MPI_FAILUREunexpected fail.
INT32 MPI_DEV_getIspMvHistCfg ( MPI_WIN  idx,
uint8_t  cfg_idx,
MPI_ISP_MV_HIST_CFG_S cfg 
)

Get ISP MV histogram configuration.

Parameters
[in]idxIndex of the video window that is to retrieve setting.
[in]cfg_idxconfiguration index of target video window.
[out]cfgISP MV histogram configuration.
Returns
The execution result.
Return values
MPI_SUCCESSsuccess.
MPI_ERR_DEV_NULL_POINTERinput pointer is NULL.
MPI_ERR_DEV_INVALID_WINinvalid video window index.
MPI_ERR_DEV_INVALID_CHNinvalid video channel index.
MPI_ERR_DEV_INVALID_DEVinvalid device index.
MPI_ERR_DEV_INVALID_PARAMinvalid parameters.
MPI_ERR_DEV_NOT_EXISTdevice/channel not exist.
MPI_FAILUREunexpected fail.
See also
MPI_DEV_addIspMvHistCfg()
INT32 MPI_DEV_getIspVar ( MPI_WIN  idx,
uint8_t  cfg_idx,
MPI_ISP_VAR_S stat 
)

Get ISP variance.

Parameters
[in]idxIndex of the video window.
[in]cfg_idxconfiguration index of target video window.
[out]statISP variance.
Returns
The execution result.
Return values
MPI_SUCCESSsuccess.
MPI_ERR_DEV_NULL_POINTERinput pointer is NULL.
MPI_ERR_DEV_INVALID_WINinvalid video window index.
MPI_ERR_DEV_INVALID_CHNinvalid video channel index.
MPI_ERR_DEV_INVALID_DEVinvalid device index.
MPI_ERR_DEV_INVALID_PARAMinvalid parameters.
MPI_ERR_DEV_NOT_EXISTdevice/channel not exist.
MPI_FAILUREunexpected fail.
INT32 MPI_DEV_getIspVarCfg ( MPI_WIN  idx,
uint8_t  cfg_idx,
MPI_ISP_VAR_CFG_S cfg 
)

Get ISP variance configuration.

Parameters
[in]idxIndex of the video window.
[in]cfg_idxconfiguration index of target video window.
[out]cfgISP variance configuration.
Returns
The execution result
Return values
MPI_SUCCESSsuccess.
MPI_ERR_DEV_NULL_POINTERinput pointer is NULL.
MPI_ERR_DEV_INVALID_WINinvalid video window index.
MPI_ERR_DEV_INVALID_CHNinvalid video channel index.
MPI_ERR_DEV_INVALID_DEVinvalid device index.
MPI_ERR_DEV_INVALID_PARAMinvalid parameters.
MPI_ERR_DEV_NOT_EXISTdevice/channel not exist.
MPI_FAILUREunexpected fail.
See also
MPI_DEV_addIspVarCfg()
INT32 MPI_DEV_getIspYAvg ( MPI_WIN  idx,
uint8_t  cfg_idx,
MPI_ISP_Y_AVG stat 
)

Get ISP Y average.

Parameters
[in]idxIndex of the video window.
[in]cfg_idxconfiguration index of target video window.
[out]statISP Y average.
Returns
The execution result.
Return values
MPI_SUCCESSsuccess.
MPI_ERR_DEV_NULL_POINTERinput pointer is NULL.
MPI_ERR_DEV_INVALID_WINinvalid video window index.
MPI_ERR_DEV_INVALID_CHNinvalid video channel index.
MPI_ERR_DEV_INVALID_DEVinvalid device index.
MPI_ERR_DEV_INVALID_PARAMinvalid parameters.
MPI_ERR_DEV_NOT_EXISTdevice/channel not exist.
MPI_FAILUREunexpected fail.
INT32 MPI_DEV_getIspYAvgCfg ( MPI_WIN  idx,
uint8_t  cfg_idx,
MPI_ISP_Y_AVG_CFG_S cfg 
)

Get ISP Y average configuration.

Parameters
[in]idxIndex of the video window.
[in]cfg_idxconfiguration index of target video window.
[out]cfgISP Y average configuration.
Returns
The execution result.
Return values
MPI_SUCCESSsuccess.
MPI_ERR_DEV_NULL_POINTERinput pointer is NULL.
MPI_ERR_DEV_INVALID_WINinvalid video window index.
MPI_ERR_DEV_INVALID_CHNinvalid video channel index.
MPI_ERR_DEV_INVALID_DEVinvalid device index.
MPI_ERR_DEV_INVALID_PARAMinvalid parameters.
MPI_ERR_DEV_NOT_EXISTdevice/channel not exist.
MPI_FAILUREunexpected fail.
See also
MPI_DEV_addIspYAvgCfg()
INT32 MPI_DEV_getLdcAttr ( MPI_WIN  idx,
MPI_LDC_ATTR_S p_ldc_attr 
)

Get lens distortion correction attribute.

Parameters
[in]idxIndex of the video window that is to retrieve setting.
[out]p_ldc_attrlens distortion correction attribute.
Returns
The execution result.
Return values
MPI_SUCCESSsuccess
othersfailure
See also
MPI_DEV_setLdcAttr()
INT32 MPI_DEV_getPanningAttr ( MPI_WIN  idx,
MPI_PANNING_ATTR_S p_panning_attr 
)

Get fisheye panning attribute.

Parameters
[in]idxIndex of the video window that is to retrieves setting.
[out]p_panning_attrPointer to fisheye panning attribute.
Returns
The execution result.
Return values
MPI_SUCCESSsuccess
othersfailure
See also
MPI_DEV_setPanningAttr()
INT32 MPI_DEV_getPanoramaAttr ( MPI_WIN  idx,
MPI_PANORAMA_ATTR_S p_panorama_attr 
)

Get fisheye panorama attribute.

Parameters
[in]idxIndex of the video window that is to retrieve setting.
[out]p_panorama_attrPointer to fisheye panorama attribute.
Returns
The execution result.
Return values
MPI_SUCCESSsuccess
othersfailure
See also
MPI_DEV_setPanoramaAttr()
INT32 MPI_DEV_getPathAttr ( MPI_PATH  idx,
MPI_PATH_ATTR_S p_path_attr 
)

Get the input path attributes.

Parameters
[in]idxIndex of the input path that is to retrieve setting.
[out]p_path_attrPointer to the input path attribute.
Returns
The execution result.
Return values
MPI_SUCCESSsuccess
othersfailure
See also
MPI_DEV_setPathAttr()
INT32 MPI_DEV_getStitchAttr ( MPI_WIN  idx,
MPI_STITCH_ATTR_S p_stitch_attr 
)

Get content adaptive stitching attribute.

Parameters
[in]idxIndex of the video window that is to retrieve setting.
[out]p_stitch_attrcontent adaptive stitching attribute.
Returns
The execution result.
Return values
MPI_SUCCESSsuccess
othersfailure
See also
MPI_DEV_setStitchAttr()
INT32 MPI_DEV_getSurroundAttr ( MPI_WIN  idx,
MPI_SURROUND_ATTR_S p_surround_attr 
)

Get fisheye surround attribute.

Parameters
[in]idxIndex of the video window that is to retrieve setting.
[out]p_surround_attrPointer to fisheye surround attribute.
Returns
The execution result.
Return values
MPI_SUCCESSsuccess
othersfailure
See also
MPI_DEV_setSurroundAttr()
INT32 MPI_DEV_getWindowAttr ( MPI_WIN  idx,
MPI_WIN_ATTR_S p_window_attr 
)

Get the video window attribute.

Parameters
[in]idxIndex of the video window that is to retrieve setting.
[out]p_window_attrPointer to the video window attribute.
Returns
The execution result.
Return values
MPI_SUCCESSsuccess
othersfailure
See also
MPI_DEV_setWindowAttr()
INT32 MPI_DEV_getWindowRoi ( MPI_WIN  idx,
MPI_RECT_S p_roi 
)

Get the video window ROI.

Parameters
[in]idxIndex of the video window that is to retrieve setting.
[out]p_roiPointer to the video window roi.
Returns
The execution result.
Return values
MPI_SUCCESSsuccess
othersfailure
See also
MPI_DEV_setWindowRoi()
INT32 MPI_DEV_getWinFrame ( MPI_WIN  idx,
MPI_VIDEO_FRAME_INFO_S frame_info,
int32_t  time_ms 
)

Get a window's snapshot.

If the time it takes for the snapshot exceeds time_ms, it will return a fail status to the user.

Parameters
[in]idxvideo window index
[in,out]frame_infostructure of video frame
[in]time_mstimeout value (unit: ms)
Returns
execution result
Return values
MPI_SUCCESSsuccess.
MPI_ERR_DEV_NULL_POINTERinput pointer is NULL.
MPI_ERR_DEV_INVALID_WINinvalid video window index.
MPI_ERR_DEV_INVALID_CHNinvalid video channel index.
MPI_ERR_DEV_INVALID_DEVinvalid device index.
MPI_FAILUREunexpected fail.
-EAGAINTimeout has occurred. Please try again later.
-EFAULTUnexpected error - fail to copy to/from user or bad address
-EINTRMutex lock was interrupted
-ENOMEMVB fails to allocate memory for snapshot
-ENODATAISP is not running
-EOPNOTSUPPResolution not supported
See also
MPI_DEV_releaseWinFrame()
INT32 MPI_DEV_queryChnState ( MPI_CHN  idx,
MPI_CHN_STAT_S stat 
)

Query a video channel state.

Parameters
[in]idxIndex of the video channel that is to query.
[out]statVideo channel state.
Returns
The execution result
Return values
MPI_SUCCESSsuccess.
MPI_ERR_DEV_NULL_POINTERinput pointer is NULL.
MPI_ERR_DEV_INVALID_WINinvalid video window index.
MPI_ERR_DEV_INVALID_CHNinvalid video channel index.
MPI_ERR_DEV_INVALID_DEVinvalid device index.
MPI_ERR_DEV_NOT_EXISTdevice/channel not exist.
MPI_FAILUREunexpected fail.
INT32 MPI_DEV_releaseWinFrame ( MPI_WIN  idx,
MPI_VIDEO_FRAME_INFO_S frame_info 
)

Release window snapshot.

Parameters
[in]idxvideo window index
[in]frame_infostructure of video frame info that contains snapshot's width, height, image type, etc
Returns
execution result
Return values
MPI_SUCCESSsuccess.
MPI_ERR_DEV_NULL_POINTERinput pointer is NULL.
MPI_ERR_DEV_INVALID_WINinvalid video window index.
MPI_ERR_DEV_INVALID_CHNinvalid video channel index.
MPI_ERR_DEV_INVALID_DEVinvalid device index.
MPI_FAILUREunexpected fail.
See also
MPI_DEV_getWinFrame()
INT32 MPI_DEV_rmIspMvHistCfg ( MPI_WIN  idx,
uint8_t  cfg_idx 
)

Remove ISP MV histogram configuration.

Parameters
[in]idxIndex of the video window to be removed.
[in]cfg_idxconfiguration index of target video window.
Returns
The execution result.
Return values
MPI_SUCCESSsuccess.
MPI_ERR_DEV_INVALID_WINinvalid video window index.
MPI_ERR_DEV_INVALID_CHNinvalid video channel index.
MPI_ERR_DEV_INVALID_DEVinvalid device index.
MPI_ERR_DEV_INVALID_PARAMinvalid parameters.
MPI_ERR_DEV_NOT_EXISTdevice/channel not exist.
MPI_FAILUREunexpected fail.
Note
  • Because the number of added configuration is MPI_MAX_ISP_MV_HIST_CFG_NUM which currently is 1, statistics get after removing cfg is undefined.
See also
MPI_DEV_addIspMvHistCfg()
INT32 MPI_DEV_rmIspVarCfg ( MPI_WIN  idx,
uint8_t  cfg_idx 
)

Remove ISP variance configuration.

Parameters
[in]idxIndex of the video window that is to be removed.
[in]cfg_idxconfiguration index of target video window.
Returns
The execution result.
Return values
MPI_SUCCESSsuccess.
MPI_ERR_DEV_INVALID_WINinvalid video window index.
MPI_ERR_DEV_INVALID_CHNinvalid video channel index.
MPI_ERR_DEV_INVALID_DEVinvalid device index.
MPI_ERR_DEV_INVALID_PARAMinvalid parameters.
MPI_ERR_DEV_NOT_EXISTdevice/channel not exist.
MPI_FAILUREunexpected fail.
Note
  • Because the number of added configuration is MPI_MAX_ISP_VAR_CFG_NUM which currently is 1, statistics get after removing cfg is undefined.
See also
MPI_DEV_addIspVarCfg()
INT32 MPI_DEV_rmIspYAvgCfg ( MPI_WIN  idx,
uint8_t  cfg_idx 
)

Remove ISP Y average configuration.

Parameters
[in]idxIndex of the video window.
[in]cfg_idxconfiguration index of video window to be removed.
Returns
The execution result.
Return values
MPI_SUCCESSsuccess.
MPI_ERR_DEV_INVALID_WINinvalid video window index.
MPI_ERR_DEV_INVALID_CHNinvalid video channel index.
MPI_ERR_DEV_INVALID_DEVinvalid device index.
MPI_ERR_DEV_INVALID_PARAMinvalid parameters.
MPI_ERR_DEV_NOT_EXISTdevice/channel not exist.
MPI_FAILUREunexpected fail.
See also
MPI_DEV_addIspYAvgCfg()
INT32 MPI_DEV_setChnAttr ( MPI_CHN  idx,
const MPI_CHN_ATTR_S p_chn_attr 
)

Set the video channel attribute.

Parameters
[in]idxindex of the video channel that is to be configured.
[in]p_chn_attrPointer to the video channel attribute.
Returns
The execution result.
Return values
MPI_SUCCESSsuccess
othersfailure
Note
  • Video channel should be created before modifing attributes.
See also
MPI_DEV_getChnAttr()
MPI_DEV_setChnLayout()
INT32 MPI_DEV_setChnLayout ( MPI_CHN  idx,
const MPI_CHN_LAYOUT_S p_chn_layout 
)

Set the video channel layout.

Parameters
[in]idxIndex of the video channel that is to be configured.
[in]p_chn_layoutPointer to the video channel layout.
Returns
The execution result.
Return values
MPI_SUCCESSsuccess
othersfailure
See also
MPI_DEV_getChnLayout()
INT32 MPI_DEV_setDevAttr ( MPI_DEV  idx,
const MPI_DEV_ATTR_S p_dev_attr 
)

Set the attributes of a video device.

Parameters
[in]idxIndex of the video device that is to be configured.
[in]p_dev_attrPointer to the video device attribute.
Returns
The execution result.
Return values
MPI_SUCCESSsuccess
othersfailure
Note
  • Device attribute cannot be modified when it is running.
See also
MPI_DEV_getDevAttr()
INT32 MPI_DEV_setLdcAttr ( MPI_WIN  idx,
const MPI_LDC_ATTR_S p_ldc_attr 
)

Set lens distortion correction attribute.

All windows with LDC view share the same parameters. Specify this parameters in window (0, 0, 0) at once, and do not set the attribute for other windows.

Parameters
[in]idxIndex of the video window that is to be configured. It should be always MPI_VIDEO_WIN(0, 0, 0).
[in]p_ldc_attrPointer to lens distortion correction attribute.
Returns
The execution result.
Return values
MPI_SUCCESSsuccess
othersfailure
See also
MPI_WIN
MPI_DEV_getLdcAttr()
INT32 MPI_DEV_setPanningAttr ( MPI_WIN  idx,
const MPI_PANNING_ATTR_S p_panning_attr 
)

Set fisheye panning attribute.

All windows with Panning view share the same parameters. Specify this parameters in window (0, 0, 0) at once, and do not set the attribute for other windows.

Parameters
[in]idxIndex of the video window that is to be configured. It should be always MPI_VIDEO_WIN(0, 0, 0).
[in]p_panning_attrPointer to fisheye panning attribute.
Returns
The execution result.
Return values
MPI_SUCCESSsuccess
othersfailure
See also
MPI_DEV_getPanningAttr()
INT32 MPI_DEV_setPanoramaAttr ( MPI_WIN  idx,
const MPI_PANORAMA_ATTR_S p_panorama_attr 
)

Set fisheye panorama attribute.

All windows with Panorama view share the same parameters. Specify this parameters in window (0, 0, 0) at once, and do not set the attribute for other windows.

Parameters
[in]idxIndex of the video window that is to be configured. It should be always MPI_VIDEO_WIN(0, 0, 0).
[in]p_panorama_attrPointer to fisheye panorama attribute.
Returns
The execution result.
Return values
MPI_SUCCESSsuccess
othersfailure
See also
MPI_DEV_getPanoramaAttr()
INT32 MPI_DEV_setPathAttr ( MPI_PATH  idx,
const MPI_PATH_ATTR_S p_path_attr 
)

Set the input path attributes.

Parameters
[in]idxIndex of the input path that is to be configured.
[in]p_path_attrPointer to the input path attribute.
Returns
The execution result.
Return values
MPI_SUCCESSsuccess
othersfailure
See also
MPI_DEV_getPathAttr()
INT32 MPI_DEV_setStitchAttr ( MPI_WIN  idx,
const MPI_STITCH_ATTR_S p_stitch_attr 
)

Set content adaptive stitching attribute.

All windows with Stitch view share the same parameters. Specify this parameters in window (0, 0, 0) at once, and do not set the attribute for other windows.

Parameters
[in]idxIndex of the video window that is to be configured. It should be always MPI_VIDEO_WIN(0, 0, 0).
[in]p_stitch_attrPointer to content adaptive stitching attribute.
Returns
The execution result.
Return values
MPI_SUCCESSsuccess
othersfailure
See also
MPI_WIN
MPI_DEV_getStitchAttr()
INT32 MPI_DEV_setSurroundAttr ( MPI_WIN  idx,
const MPI_SURROUND_ATTR_S p_surround_attr 
)

Set fisheye surround attribute.

All windows with Surround view share the same parameters. Specify this parameters in window (0, 0, 0) at once, and do not set the attribute for other windows.

Parameters
[in]idxIndex of the video window that is to be configured.
[in]p_surround_attrPointer to fisheye surround attribute.
Returns
The execution result.
Return values
MPI_SUCCESSsuccess
othersfailure
See also
MPI_DEV_getSurroundAttr()
INT32 MPI_DEV_setWindowAttr ( MPI_WIN  idx,
const MPI_WIN_ATTR_S p_window_attr 
)

Set the video window attribute.

Parameters
[in]idxIndex of the video window that is to be configured.
[in]p_window_attrPointer to the video window attribute.
Returns
The execution result.
Return values
MPI_SUCCESSsuccess
othersfailure
Note
  • Attributes mirror and flip follow the setting on windows 0. The request of modifing mirror and flip to other windows will be ignored.
  • User should use MPI_DEV_setWindowRoi() to modify the window ROI.
See also
MPI_DEV_getWindowAttr()
MPI_DEV_setWindowRoi()
INT32 MPI_DEV_setWindowRoi ( MPI_WIN  idx,
const MPI_RECT_S p_roi 
)

Set the video window ROI.

Parameters
[in]idxIndex of the video window that is to be configured.
[in]p_roiPointer to the video window ROI.
Returns
The execution result.
Return values
MPI_SUCCESSsuccess
othersfailure
See also
MPI_DEV_getWindowRoi()
MPI_DEV_setWindowAttr()
INT32 MPI_DEV_startAllChn ( MPI_DEV  idx)

Start all video channels.

Activate all of video channels that have been created.

Parameters
[in]idxIndex of the video device that is to be activated.
Returns
The execution result.
Return values
MPI_SUCCESSsuccess
othersfailure
Note
  • All video channels should not be activated before calling this function.
See also
MPI_DEV_stopAllChn()
MPI_DEV_startChn()
INT32 MPI_DEV_startChn ( MPI_CHN  idx)

Start a video channel.

Parameters
[in]idxIndex of the video channel that is to be activated.
Returns
The execution result.
Return values
MPI_SUCCESSsuccess
othersfailure
Note
  • Video channel cannot be activated multiple times.
See also
MPI_DEV_stopChn()
MPI_ENC_bindToVideoChn()
INT32 MPI_DEV_startDev ( MPI_DEV  idx)

Start the video device.

After activated video device, it starts to receive and process the singal sent from associates input path.

Parameters
[in]idxIndex of the video device that is to be activated.
Returns
The execution result.
Return values
MPI_SUCCESSsuccess
othersfailure
Note
  • Video device cannot be activated multiple times.
See also
MPI_DEV_stopDev()
INT32 MPI_DEV_stopAllChn ( MPI_DEV  idx)

Stop all video channels that are running.

Suspend all of the video channels that have been created.

Parameters
[in]idxIndex of the video device that is to be suspended.
Returns
The execution result.
Return values
MPI_SUCCESSsuccess
othersfailure
Note
  • All video channels should be activated before calling this function.
See also
MPI_DEV_startAllChn()
INT32 MPI_DEV_stopChn ( MPI_CHN  idx)

Stop a video channel.

Parameters
[in]idxIndex of the video channel that is to be suspended.
Returns
The execution result.
Return values
MPI_SUCCESSsuccess
othersfailure
Note
  • Video channel cannot be suspended multiple times.
See also
MPI_DEV_startChn()
INT32 MPI_DEV_stopDev ( MPI_DEV  idx)

Stop a video device.

After suspended video device, it stops to receive the signal from image sensor(s).

Parameters
[in]idxindex of the video device that is to be suspended.
Returns
The execution result.
Return values
MPI_SUCCESSsuccess
othersfailure
Note
  • Video device cannot be suspended multiple times.
See also
MPI_DEV_startDev()
INT32 MPI_DEV_waitIspStat ( MPI_WIN  idx)

Wait until ISP statistics is ready.

Parameters
[in]idxIndex of the video window to wait for.
Returns
The execution result.
Return values
MPI_SUCCESSsuccess.
MPI_ERR_DEV_NULL_POINTERinput pointer is NULL.
MPI_ERR_DEV_INVALID_WINinvalid video window index.
MPI_ERR_DEV_INVALID_CHNinvalid video channel index.
MPI_ERR_DEV_INVALID_DEVinvalid device index.
MPI_ERR_DEV_INVALID_PARAMinvalid parameters.
MPI_ERR_DEV_NOT_EXISTdevice/channel not exist. //FIXME: to check
MPI_FAILUREunexpected fail.
INT32 MPI_DEV_waitWin ( MPI_WIN  idx,
uint32_t *  timestamp,
int32_t  timeout 
)

Wait until processing done of a video window.

Parameters
[in]idxIndex of the video window to wait for.
[out]timestampTimestamp of the video window just processed.
[in]timeoutWaiting timeout in millisecond. (currently no effect)
Returns
The execution result.
Return values
MPI_SUCCESSsuccess.
MPI_ERR_DEV_NULL_POINTERinput pointer is NULL.
MPI_ERR_DEV_INVALID_WINinvalid video window index.
MPI_ERR_DEV_INVALID_CHNinvalid video channel index.
MPI_ERR_DEV_INVALID_DEVinvalid device index.
MPI_ERR_DEV_INVALID_PARAMinvalid parameters.
MPI_ERR_DEV_NOT_EXISTdevice/channel not exist. //FIXME: to check
MPI_FAILUREunexpected fail.