4.4. Data Types

The data types related to video input are defined as follows. For the differences between processors, see the supporting capabilities of each processor.

4.4.1. VI_MAX_PHY_DEV_NUM

【Description】

Define the maximum number of VI physical devices.

【Syntax】

#define VI_MAX_PHY_DEV_NUM 3

【Note】

None.

【Related Data Type and Interface】

None.

4.4.2. VI_MAX_VIR_DEV_NUM

【Description】

Define the maximum number of VI virtual devices.

【Syntax】

#define VI_MAX_VIR_DEV_NUM 2

【Note】

None.

【Related Data Type and Interface】

None.

4.4.3. VI_MAX_DEV_NUM

【Description】

Defines the maximum number of VI devices.

【Syntax】

#define VI_MAX_DEV_NUM (VI_MAX_PHY_DEV_NUM + VI_MAX_VIR_DEV_NUM)

【Note】

None.

【Related Data Type and Interface】

None.

4.4.4. VI_MAX_PHY_PIPE_NUM

【Description】

Defines the maximum number of VI physical PIPE.

【Syntax】

#define VI_MAX_PHY_PIPE_NUM 5

【Note】

None.

【Related Data Type and Interface】

None.

4.4.5. VI_MAX_VIR_PIPE_NUM

【Description】

Define the maximum number of VI virtual PIPE.

【Syntax】

#define VI_MAX_VIR_PIPE_NUM 0

【Note】

None.

【Related Data Type and Interface】

None.

4.4.6. VI_MAX_PIPE_NUM

【Description】

Define the maximum number of VI PIPE.

【Syntax】

#define VI_MAX_PIPE_NUM (VI_MAX_PHY_PIPE_NUM + VI_MAX_VIR_PIPE_NUM)

【Note】

None.

【Related Data Type and Interface】

None.

4.4.7. VI_MAX_VIR_CHN_NUM

【Description】

Define the maximum number of VI virtual channels.

【Syntax】

#define VI_MAX_VIR_CHN_NUM 2

【Note】

None.

【Related Data Type and Interface】

None.

4.4.8. VI_MAX_PHY_CHN_NUM

【Description】

Defines the maximum number of VI physical channels.

【Syntax】

#define VI_MAX_PHY_CHN_NUM 3

【Note】

None.

【Related Data Type and Interface】

None.

4.4.9. VI_MAX_EXT_CHN_NUM

【Description】

Define the maximum number of VI extended channels.

【Syntax】

#define VI_MAX_EXT_CHN_NUM 3

【Note】

None.

【Related Data Type and Interface】

None.

4.4.10. VI_MAX_CHN_NUM

【Description】

Defines the total number of VI physical channels and extended channels.

【Syntax】

#define VI_MAX_CHN_NUM (VI_MAX_PHY_CHN_NUM + VI_MAX_EXT_CHN_NUM)

【Note】

None.

【Related Data Type and Interface】

None.

4.4.11. VI_EXT_CHN_START

【Description】

Define the VI extended channel startup.

【Syntax】

#define VI_EXT_CHN_START VI_MAX_CHN_NUM

【Note】

None.

【Related Data Type and Interface】

None.

4.4.12. VI_MAX_EXTCHN_BIND_PER_CHN

【Description】

Define the maximum number of extended channels bound to each VI channel.

【Syntax】

#define VI_MAX_EXTCHN_BIND_PER_CHN 1

【Note】

None.

【Related Data Type and Interface】

None.

4.4.13. VI_PIPE1_MAX_WIDTH

【Description】

Maximum width of images for processing with VI PIPE1

【Syntax】

#define VI_PIPE1_MAX_WIDTH 4096

【Note】

None.

【Related Data Type and Interface】

None.

4.4.14. VI_PIXEL_FORMAT

【Description】

VI Pixel format.

【Syntax】

#define VI_PIXEL_FORMAT PIXEL_FORMAT_NV21

【Note】

None.

【Related Data Type and Interface】

None.

4.4.15. CVI_VI_VPSS_EXTRA_BUF

【Description】

Define the number of extra buffers for VI VPSS.

【Syntax】

#define CVI_VI_VPSS_EXTRA_BUF 0

【Note】

None.

【Related Data Type and Interface】

None.

4.4.16. CVI_VI_CHN_0_BUF

【Description】

Define the number of buffers for VI channel 0.

【Syntax】

#define CVI_VI_CHN_0_BUF (2 + CVI_VI_VPSS_EXTRA_BUF)

【Note】

None.

【Related Data Type and Interface】

None.

4.4.17. CVI_VI_CHN_1_BUF

【Description】

Define the number of buffers for VI channel 1.

【Syntax】

#define CVI_VI_CHN_1_BUF (2 + CVI_VI_VPSS_EXTRA_BUF)

【Note】

None.

【Related Data Type and Interface】

None.

4.4.18. CVI_VI_CHN_2_BUF

【Description】

Define the number of buffers for VI channel 2.

【Syntax】

#define CVI_VI_CHN_2_BUF (2 + CVI_VI_VPSS_EXTRA_BUF)

【Note】

None.

【Related Data Type and Interface】

None.

4.4.19. CVI_VI_CHN_3_BUF

【Description】

Define the number of buffers for VI channel 3.

【Syntax】

#define CVI_VI_CHN_3_BUF (2 + CVI_VI_VPSS_EXTRA_BUF)

【Note】

None.

【Related Data Type and Interface】

None.

4.4.20. VI_CMP_PARAM_SIZE

【Description】

Define the size of the VI comparison parameters.

【Syntax】

#define VI_CMP_PARAM_SIZE 152

【Note】

None.

【Related Data Type and Interface】

None.

4.4.21. VI_MAX_ADCHN_NUM

【Description】

Maximum number of analog-to-digital channels for VI.

【Syntax】

#define VI_MAX_ADCHN_NUM 4

【Note】

None.

【Related Data Type and Interface】

None.

4.4.22. VI_COMPMASK_NUM

【Description】

Compare the number of masks for VI.

【Syntax】

#define VI_COMPMASK_NUM 2

【Note】

None.

【Related Data Type and Interface】

None.

4.4.23. VI_SHARPEN_GAIN_NUM

【Description】

Number of sharpening gain parameters for VI.

【Syntax】

#define VI_SHARPEN_GAIN_NUM 32

【Note】

None.

【Related Data Type and Interface】

None.

4.4.24. VI_AUTO_ISO_STRENGTH_NUM

【Description】

Number of automatic ISO strength parameters for VI.

【Syntax】

#define VI_AUTO_ISO_STRENGTH_NUM 16

【Note】

None.

【Related Data Type and Interface】

None.

4.4.25. VI_INVALID_CHN

【Description】

Invalid video input channel number for VI.

【Syntax】

#define VI_INVALID_CHN -1

【Note】

None.

【Related Data Type and Interface】

None.

4.4.26. VI_DATA_TYPE_E

【Description】

VI input data type enumeration.

【Syntax】

typedef enum _VI_DATA_TYPE_E {
   VI_DATA_TYPE_YUV = 0,
   VI_DATA_TYPE_RGB,
   VI_DATA_TYPE_YUV_EARLY,
   VI_DATA_TYPE_BUTT
} VI_DATA_TYPE_E;

【Member】

Member

Description

VI_DATA_TYPE_YUV

The data type is YUV

VI_DATA_TYPE_RGB

The data type is RGB

VI_DATA_TYPE_YUV_EARLY

The data type is YUV (Interrupt in advance)

【Note】

None.

【Related Data Type and Interface】

None.

4.4.27. VI_DEV_ATTR_S

【Description】

Define the properties of the VI device.

【Syntax】

typedef struct _VI_DEV_ATTR_S {
   VI_INTF_MODE_E enIntfMode;
   VI_WORK_MODE_E enWorkMode;
   VI_SCAN_MODE_E enScanMode;
   CVI_S32 as32AdChnId[VI_MAX_ADCHN_NUM];
   VI_YUV_DATA_SEQ_E enDataSeq;
   VI_SYNC_CFG_S stSynCfg;
   VI_DATA_TYPE_E enInputDataType;
   SIZE_S stSize;
   VI_WDR_ATTR_S stWDRAttr;
   BAYER_FORMAT_E enBayerFormat;
   CVI_U32 chn_num;
   CVI_U32 snrFps;
   CVI_U64 phy_addr;
   CVI_U32 phy_size;
   CVI_BOOL isMux;
   CVI_U8 switchGpioIdx;
   CVI_U8 switchGpioPin;
   CVI_U8 switchGPioPol;
   CVI_BOOL disEnableSbm;
   CVI_BOOL isFrmCtrl;
   CVI_U8 dstFrm;
} VI_DEV_ATTR_S;

【Member】

Member

Description

enIntfMode

Sensor interface mode.

enWorkMode

1, 2, 4-channel composite working mode.

enScanMode

Input scanning mode (progressive, interlaced).

as32AdChnId[VI_MAX_ADCHN_NUM]

The Value range is [-1, 3], and it is recommended to set it to the default value of -1 uniformly. This parameter is meaningless.

enDataSeq

Input data order (only applicable to YUV format).

stSynCfg

Synchronous timing configuration, which must be configured in BT.601 mode and is invalid in other modes.

enInputDataType

Input data type, which is generally RGB for Sensor input and YUV for AD input

stSize

The VI device can set the height and width of the image to be captured. Minimum and Maximum widths and heights of captured images:

width : [VI_DEV_MIN_WIDTH,VI_DEV_MAX_WIDTH]

height: [VI_DEV_MIN_HEIGHT,VI_DEV_MAX_HEIGHT]

stWDRAttr

WDR property

enBayerFormat

The Bayer format of the device, which must be set when the inputDataType is RGB

chn_num

Total chn numbers

snrFps

The frame rate of the sensor

phy_addr

, If it is not 0, the VI uses the physical address assigned by the user, and the validity of the physical address must be ensured before use

phy_size

only ALIOS/DUAL OS support, The physical address memory size used.

isMux

whether multi sensor use same dev

switchGpioIdx

only ALIOS/DUAL OS support. gpio bank, -1 means not use gpio

switchGpioPin

gpio pin, -1 means not use gpio

switchGPioPol

gpio value[0,1], -1 means not use gpio

disEnableSbm

Sns timing support SBM or not

isFrmCtrl

only ALIOS/DUAL OS support. whether to enable frame ctrl

dstFrm

only ALIOS/DUAL OS support. set dst frm for switch

【Note】

  • The u32Width in stSize must be equal to the width of the actual input image,

    and the u32Height must be equal to the height of the actual input image,

    otherwise there no image will be output.

【Related Data Type and Interface】

None.

4.4.28. VI_DEV_BIND_PIPE_S

【Description】

Define the binding relationship between VI DEV and PIPE.

【Syntax】

typedef struct _VI_DEV_BIND_PIPE_S {
   CVI_U32 u32Num; /* RW;Range [1,VI_MAX_PIPE_NUM] */
   VI_PIPE PipeId[VI_MAX_PIPE_NUM]; /* RW;Array of pipe ID */
} VI_DEV_BIND_PIPE_S;

【Member】

Member

Description

U32Num

Number of PIPEs bound to this VI Dev,

Value range: [1, VI_MAX_PIPE_NUM]

PipeId

The PIPE ID bound to the VI Dev.

【Note】

None.

【Related Data Type and Interface】

None.

4.4.29. VI_PIPE_ATTR_S

【Description】

Define VI PIPE properties.

【Syntax】

typedef struct _VI_PIPE_ATTR_S {
   VI_PIPE_BYPASS_MODE_E enPipeBypassMode;
   CVI_BOOL bYuvSkip; /* RW;YUV skip enable */
   CVI_BOOL bIspBypass; /* RW;ISP bypass enable */
   CVI_U32 u32MaxW; /* RW;Range[VI_PIPE_MIN_WIDTH,VI_PIPE_MAX_WIDTH];Maximum width */
   CVI_U32 u32MaxH; /* RW;Range[VI_PIPE_MIN_HEIGHT,VI_PIPE_MAX_HEIGHT];Maximum height */
   PIXEL_FORMAT_E enPixFmt; /* RW;Pixel format */
   COMPRESS_MODE_E enCompressMode; /* RW;Compress mode.*/
   DATA_BITWIDTH_E enBitWidth; /* RW;Bit width*/
   CVI_BOOL bNrEn; /* RW;3DNR enable */
   CVI_BOOL bSharpenEn; /* RW;Sharpen enable*/
   FRAME_RATE_CTRL_S stFrameRate; /* RW;Frame rate */
   CVI_BOOL bDiscardProPic;
   CVI_BOOL bYuvBypassPath;
        CVI_BOOL b3dnrBypass; /* RW;ISP 3dnr bypass enable */
} VI_PIPE_ATTR_S;

【Member】

Member

Description

enPipeBypassMode

Bypass mode for VI PIPE.

bYuvSkip

Whether to turn off downsampling and CSC.

CVI_FALSE: yuv skip unenable

CVI_TRUE: yuv skip enable

bIspBypass

Whether the ISP is bypassed.

CVI_FALSE: ISP working properly.

CVI_TRUE: ISP bypass, do not run ISP.

u32MaxW

The input image width. This is a static attribute set when the PIPE is created and cannot be changed.

Value range under online mode:: [VI_PIPE_ONLINE_MIN_WIDTH, VI_PIPE_ONLINE_MAX_WIDTH]

Value range under offline mode: [VI_PIPE_OFFLINE_MIN_WIDTH, VI_PIPE_OFFLINE_MAX_WIDTH]

u32MaxH

The input image height.

Value range:

Value range under online mode: [VI_PIPE_ONLINE_MIN_HEIGHT, VI_PIPE_ONLINE_MAX_HEIGHT]

Value range under offline mode: [VI_PIPE_OFFLINE_MIN_HEIGHT, VI_PIPE_OFFLINE_MAX_HEIGHT]

enPixFmt

Pixel format.

enCompressMode

Data compression format.

enBitWidth

The bit width of the input image.

Set during PIPE creation and cannot be changed, only valid when pixel format enPixFmt is a YUV pixel format.

bNrEn

NR enable switch.

CVI_FALSE: unenable;

CVI_TRUE: enable

bSharpenEn

Sharpen enable switch.

stFrameRate

Frame rate control.

bDiscardProPic

Whether to discard long exposure frames.

bYuvBypassPath

Whether to switch to YUV pass-through mode

b3dnrBypass

only ALIOS/DUAL OS support.Is 3dnr bypass enable

【Note】

None.

【Related Data Type and Interface】

None.

4.4.30. VI_DUMP_TYPE_E

【Description】

Enumerate dump types.

【Syntax】

typedef enum _VI_DUMP_TYPE_E {
   VI_DUMP_TYPE_RAW = 0,
   VI_DUMP_TYPE_YUV = 1,
   VI_DUMP_TYPE_IR = 2,
   VI_DUMP_TYPE_BUTT
} VI_DUMP_TYPE_E;

【Member】

Member

Description

VI_DUMP_TYPE_RAW

Dump RAW data

VI_DUMP_TYPE_YUV

Dump YUV data

VI_DUMP_TYPE_IR

Dump IR Component data.

【Note】

  • Does not support Dump IR data

  • To Dump YUV, run CVI_VI_GetChnFrame

【Related Data Type and Interface】

None.

4.4.31. VI_DUMP_ATTR_S

【Description】

Define the PIPE dump property.

【Syntax】

typedef struct _VI_DUMP_ATTR_S {
   CVI_BOOL bEnable; /* RW;Whether dump is enable */
   CVI_U32 u32Depth; /* RW;Range [0,8];Depth */
   VI_DUMP_TYPE_E enDumpType;
} VI_DUMP_ATTR_S;

【Member】

Member

Description

benable

Whether to enable dump.

u32depth

Queue depth for dumping data. Value range: [0, 8]

endumptype

Dumping data type.

【Note】

None.

【Related Data Type and Interface】

  • CVI_VI_SetPipeDumpAttr

  • CVI_VI_GetPipeDumpAttr

4.4.32. VI_CHN_ATTR_S

【Description】

Define VI channel properties.

【Syntax】

typedef struct _VI_CHN_ATTR_S {
   SIZE_S stSize; /* RW;Channel out put size */
   PIXEL_FORMAT_E enPixelFormat; /* RW;Pixel format */
   DYNAMIC_RANGE_E enDynamicRange; /* RW;Dynamic Range */
   VIDEO_FORMAT_E enVideoFormat; /* RW;Video format */
   COMPRESS_MODE_E enCompressMode; /* RW;256B Segment compress or no compress. */
   CVI_BOOL bMirror; /* RW;Mirror enable */
   CVI_BOOL bFlip; /* RW;Flip enable */
   CVI_U32 u32Depth; /* RW;Range [0,8];Depth */
   FRAME_RATE_CTRL_S stFrameRate; /* RW;Frame rate */
   CVI_U32 u32BindVbPool; /*chn bind vb*/
} VI_CHN_ATTR_S;

【Member】

Member

Description

stSize

Target image size.

The minimum and maximum width and height of the target image:

Height in online mode [VI_PHYCHN_ONLINE_MIN_HEIGHT, VI_PHYCHN_ONLINE_MAX_HEIGHT]

Height in offline mode [VI_PHYCHN_OFFLINE_MIN_HEIGHT, VI_PHYCHN_OFFLINE_MAX_HEIGHT]

Width in online mode [VI_PHYCHN_ONLINE_MIN_WIDTH, VI_PHYCHN_ONLINE_MAX_WIDTH]

Width in offline mode [VI_PHYCHN_OFFLINE_MIN_WIDTH, VI_PHYCHN_OFFLINE_MAX_WIDTH]

enPixelFormat

Target image pixel format.

enDynamicRange

The dynamic range of the target image.

enVideoFormat

Video data format of the target image.

enCompressMode

Compression format of the target image.

bMirror

Mirror enable switch.

CVI_FALSE: disable;

CVI_TRUE: enable

bFlip

Flip enable switch

CVI_FALSE: disable;

CVI_TRUE: enable

u32Depth

User polling depth for getting images.

stFrameRate

Frame rate control.

Source frame rate range: (0, 240], and -1.

When the source frame rate is -1, the target frame rate must be set to -1 (no frame rate control), and in other cases, the target frame rate cannot be greater than the source frame rate.

u32BindVbPool

VB pool ID bound to the channel

【Note】

  • Currently, VI does not support frame rate control

【Related Data Type and Interface】

  • CVI_VI_SetChnAttr

  • CVI_VI_GetChnAttr

4.4.33. VI_CROP_INFO_S

【Description】

Define the VI CROP information structure.

【Syntax】

typedef struct _VI_CROP_INFO_S {
   CVI_BOOL bEnable; /* RW;CROP enable*/
   VI_CROP_COORDINATE_E enCropCoordinate; /* RW;Coordinate mode of the crop start point*/
   RECT_S stCropRect; /* RW;CROP rectangular*/
} VI_CROP_INFO_S;

【Member】

Member

Description

bEnable

CROP enable switch

enCropCoordinate

CROP starting point coordinate mode.

stCropRect

Rectangular area of CROP.

【Note】

None.

【Related Data Type and Interface】

None.

4.4.34. VI_DEV_TIMING_ATTR_S

【Description】

User defined timing properties.

【Syntax】

typedef struct _VI_DEV_TIMING_ATTR_S {
   CVI_BOOL bEnable; /* RW;Whether enable VI generate timing */
   CVI_S32 s32FrmRate; /* RW;Generate timing Frame rate*/
} VI_DEV_TIMING_ATTR_S;

【Member】

Member

Description

bEnable

User defined timing enable switch.

s32FrmRate

The frame rate of the user-defined timing.

【Note】

  • When the user-defined timing is enabled, if the frame rate set by the user exceeds the maximum frame rate of the device, the system will automatically take the maximum frame rate of the device as the effective value.

【Related Data Type and Interface】

  • CVI_VI_SetDevTimingAttr

4.4.35. VI_PIPE_STATUS_S

【Description】

Define the status information of VI pipe.

【Syntax】

typedef struct _VI_PIPE_STATUS_S {
   CVI_BOOL bEnable; /* RO;Whether this pipe is enabled */
   CVI_U32 u32IntCnt; /* RO;The video frame interrupt count */
   CVI_U32 u32FrameRate; /* RO;Current frame rate */
   CVI_U32 u32LostFrame; /* RO;Lost frame count */
   CVI_U32 u32VbFail; /* RO;Video buffer malloc failure */
   SIZE_S stSize; /* RO;Current pipe output size */
} VI_PIPE_STATUS_S;

【Member】

Member

Description

bEnable

Whether the current pipe is enabled.

u32IntCnt

Interrupt count.

u32FrameRate

Real time frame rate of VI pipe.

u32LostFrame

Lost frame count.

u32VbFail

VB application failure count.

stSize

Current pipe output size

【Note】

None.

【Related Data Type and Interface】

None.

4.4.36. VI_CHN_STATUS_S

【Description】

Define the status information of VI channel.

【Syntax】

typedef struct _VI_CHN_STATUS_S {
   CVI_BOOL bEnable; /* RO;Whether this channel is enabled */
   CVI_U32 u32FrameRate; /* RO;current frame rate */
   CVI_U32 u32LostFrame; /* RO;Lost frame count */
   CVI_U32 u32VbFail; /* RO;Video buffer malloc failure */
   SIZE_S stSize; /* RO;chn output size */
} VI_CHN_STATUS_S;

【Member】

Member

Description

bEnable

Whether the current PIPE is enabled.

u32FrameRate

Real time frame rate of channel.

u32LostFrame

Lost frame count.

u32VbFail

VB application failure count.

stSize

Current channel output size.

【Note】

None.

【Related Data Type and Interface】

None.

4.4.37. VI_PIPE_FRAME_SOURCE_E

【Description】

Define the source type of VI PIPE data.

【Syntax】

typedef enum _VI_PIPE_FRAME_SOURCE_E {
   VI_PIPE_FRAME_SOURCE_DEV = 0, /* RW;Source from dev */
   VI_PIPE_FRAME_SOURCE_USER_FE, /* RW;User send to FE */
   VI_PIPE_FRAME_SOURCE_USER_BE, /* RW;User send to BE */
   VI_PIPE_FRAME_SOURCE_BUTT
} VI_PIPE_FRAME_SOURCE_E;

【Member】

Member

Description

vi_pipe_frame_source_dev

The data comes from the device.

vi_pipe_frame_source_user_fe

The data comes from the user’s data sent in from FE

vi_pipe_frame_source_user_be

The data comes from the user’s data sent in from BE

【Note】

  • Do not support data from BE.

【Related Data Type and Interface】

  • CVI_VI_SetPipeFrameSource

4.4.38. VI_LDC_ATTR_S

【Description】

Define VI lens distortion correction structure

【Syntax】

typedef struct _VI_LDC_ATTR_S {
   CVI_BOOL bEnable;
   LDC_ATTR_S stAttr;
} VI_LDC_ATTR_S;

【Member】

Member

Description

benable

LDC enable

stattr

LDC properties

【Note】

None.

【Related Data Type and Interface】

  • LDC_ATTR_S

  • CVI_VI_GetChnLDCAttr

  • CVI_VI_SetChnLDCAttr

4.4.39. VI_STATE_E

【Description】

Enumerate VI status information.

【Syntax】

typedef enum _VI_STATE {
   VI_RUNNING,
   VI_SUSPEND,
   VI_MAX,
} VI_STATE_E;

【Member】

Member

Description

VI_RUNNING

VI is running.

VI_SUSPEND

VI is in sleep mode.

【Note】

None.

【Related Data Type and Interface】

None.

4.4.40. VI_SYNC_CFG_S

【Description】

synchronization information about the BT.601 or DC timing.

【Syntax】

typedef struct _VI_SYNC_CFG_S {
   VI_VSYNC_E enVsync;
   VI_VSYNC_NEG_E enVsyncNeg;
   VI_HSYNC_E enHsync;
   VI_HSYNC_NEG_E enHsyncNeg;
   VI_VSYNC_VALID_E enVsyncValid;
   VI_VSYNC_VALID_NEG_E enVsyncValidNeg;
   VI_TIMING_BLANK_S stTimingBlank;
} VI_SYNC_CFG_S;

【Member】

Member

Description

enVsync

Configuration of Vertical Synchronization Signal

enVsyncNeg

The effective state of the vertical synchronization signal

enHsync

Configuration of horizontal synchronization signal

enHsyncNeg

The effective state of the horizontal synchronization signal

enVsyncValid

Configuration of effective signals for vertical synchronization

enVsyncValidNeg

The effective state of the vertical synchronization effective signal

stTimingBlank

Parameters related to timeing blank

【Note】

None.

【Related Data Type and Interface】

None.

4.4.41. VI_BT656_SYNC_CFG_S

【Description】

synchronization information about the BT.656.

【Syntax】

typedef struct _VI_BT656_SYNC_CFG_S {
   VI_BT656_FIXCODE_E enFixCode;
   VI_BT656_FIELD_POLAR_E enFieldPolar;
} VI_BT656_SYNC_CFG_S;

【Member】

Member

Description

enFixCode

Fixed code configuration

enFieldPolar

Configuration of field polarity

【Note】

None.

【Related Data Type and Interface】

None.

4.4.42. VI_PIPE_BYPASS_MODE_E

【Description】

VI pipeline bypass mode.

【Syntax】

typedef enum _VI_PIPE_BYPASS_MODE_E {
   VI_PIPE_BYPASS_NONE,
   VI_PIPE_BYPASS_FE,
   VI_PIPE_BYPASS_BE,
   VI_PIPE_BYPASS_BUTT
} VI_PIPE_BYPASS_MODE_E;

【Member】

Member

Description

VI_PIPE_BYPASS_NONE

VI pipeline no bypass

VI_PIPE_BYPASS_FE

VI pipeline fe bypass

VI_PIPE_BYPASS_BE

VI pipeline be bypas

【Note】

None.

【Related Data Type and Interface】

None.

4.4.43. VI_CROP_COORDINATE_E

【Description】

Different types of cropping coordinates.

【Syntax】

typedef enum _VI_CROP_COORDINATE_E {
   VI_CROP_RATIO_COOR = 0,
   VI_CROP_ABS_COOR,
   VI_CROP_BUTT
} VI_CROP_COORDINATE_E;

【Member】

Member

Description

VI_CROP_RATIO_COOR

Crop coordinates using ratio coordinates

VI_CROP_ABS_COOR

Crop coordinates using absolute coordinates

【Note】

None.

【Related Data Type and Interface】

None.

4.4.44. VI_MOD_PARAM_S

【Description】

VI module parameters.

【Syntax】

typedef struct _VI_MOD_PARAM_S {
   CVI_S32 s32DetectErrFrame;
   CVI_U32 u32DropErrFrame;
} VI_MOD_PARAM_S;

【Member】

Member

Description

s32DetectErrFrame

The number of error frames detected

u32DropErrFrame

The number of discarded error frames

【Note】

None.

【Related Data Type and Interface】

None.

4.4.45. VI_EARLY_INTERRUPT_S

【Description】

Parameters for early interruption.

【Syntax】

typedef struct _VI_EARLY_INTERRUPT_S {
   CVI_BOOL bEnable;
   CVI_U32 u32LineCnt;
} VI_EARLY_INTERRUPT_S;

【Member】

Member

Description

bEnable

Enable the early interrupt function or not

u32LineCnt

Early Interrupted line Count

【Note】

None.

【Related Data Type and Interface】

None.

4.4.46. MLSC_GAIN_LUT_S

【Description】

Gain lookup table.

【Syntax】

typedef struct _MLSC_GAIN_LUT_S {
   CVI_U16 *RGain;
   CVI_U16 *GGain;
   CVI_U16 *BGain;
} MLSC_GAIN_LUT_S;

【Member】

Member

Description

RGain

lut pointing to the red gain value

GGain

lut pointing to the green gain value

BGain

lut pointing to the blue gain value

【Note】

None.

【Related Data Type and Interface】

None.

4.4.47. VI_DUMP_REGISTER_TABLE_S

【Description】

Register to store data.

【Syntax】

typedef struct _VI_DUMP_REGISTER_TABLE_S {
         MLSC_GAIN_LUT_S MlscGainLut;
} VI_DUMP_REGISTER_TABLE_S;

【Member】

Member

Description

MlscGainLut

Gain lookup table

【Note】

None.

【Related Data Type and Interface】

None.

4.4.48. VI_PM_OPS_S

【Description】

Power management related operations.

【Syntax】

typedef struct _VI_PM_OPS_S {
   pfnViDevPmOps pfnSnsSuspend;
   pfnViDevPmOps pfnSnsResume;
   pfnViDevPmOps pfnMipiSuspend;
   pfnViDevPmOps pfnMipiResume;
} VI_PM_OPS_S;

【Member】

Member

Description

pfnSnsSuspend

Sensor suspend operation

pfnSnsResume

Sensor resume operation

pfnMipiSuspend

Mipi suspend operation

pfnMipiResume

Mipi resume operation

【Note】

None.

【Related Data Type and Interface】

None.

4.4.49. VI_SMOOTH_RAW_DUMP_INFO_S

【Description】

Continuous dump raw image information.

【Syntax】

typedef struct _VI_SMOOTH_RAW_DUMP_INFO_S {
   VI_PIPE ViPipe;
   RECT_S  stCropRect;
   CVI_U8  u8BlkCnt;
   CVI_U32 phy_size;
   CVI_U64 *phy_addr_list;
   CVI_U32 padding[2];
} VI_SMOOTH_RAW_DUMP_INFO_S;

【Member】

Member

Description

ViPipe

vi pipe。

stCropRect

Crop rectangular area

u8BlkCnt

The number of buffer blocks

phy_size

only ALIOS/DUAL OS support. The size of each buffer zone

phy_addr_list

Physical address list

padding

only ALIOS/DUAL OS support. Pad Field

【Note】

None.

【Related Data Type and Interface】

None.

4.4.50. VI_INTF_MODE_E

【Description】

Interface mode of video input.

【Syntax】

typedef enum _VI_INTF_MODE_E {
   VI_MODE_BT656 = 0,
   VI_MODE_BT601,
   VI_MODE_DIGITAL_CAMERA,
   VI_MODE_BT1120_STANDARD,
   VI_MODE_BT1120_INTERLEAVED,
   VI_MODE_MIPI,
   VI_MODE_MIPI_YUV420_NORMAL,
   VI_MODE_MIPI_YUV420_LEGACY,
   VI_MODE_MIPI_YUV422,
   VI_MODE_LVDS,
   VI_MODE_HISPI,
   VI_MODE_SLVS,
   VI_MODE_BUTT
} VI_INTF_MODE_E;

【Member】

Member

Description

VI_MODE_BT656

BT656 mode

VI_MODE_BT601

BT601 mode

VI_MODE_DIGITAL_CAMERA

digatal camera mode

VI_MODE_BT1120_STANDARD

BT.1120 progressive mode

VI_MODE_BT1120_INTERLEAVED

BT.1120 interstage mode

VI_MODE_MIPI

MIPI RAW mode

VI_MODE_MIPI_YUV420_NORMAL

MIPI YUV420 normal mode

VI_MODE_MIPI_YUV420_LEGACY

MIPI YUV420 legacy mode

VI_MODE_MIPI_YUV422

MIPI YUV422 mode

VI_MODE_LVDS

LVDS mode

VI_MODE_HISPI

HISPI mode

VI_MODE_SLVS

SLVS mode

【Note】

None.

【Related Data Type and Interface】

None.

4.4.51. VI_INPUT_MODE_E

【Description】

Input mode.

【Syntax】

typedef enum _VI_INPUT_MODE_E {
   VI_INPUT_MODE_BT656 = 0,
   VI_INPUT_MODE_BT601,
   VI_INPUT_MODE_DIGITAL_CAMERA,
   VI_INPUT_MODE_INTERLEAVED,
   VI_INPUT_MODE_MIPI,
   VI_INPUT_MODE_LVDS,
   VI_INPUT_MODE_HISPI,
   VI_INPUT_MODE_SLVS,
   VI_INPUT_MODE_BUTT
} VI_INPUT_MODE_E;

【Member】

Member

Description

VI_INPUT_MODE_BT656

BT656 mode

VI_INPUT_MODE_BT601

BT601 mode

VI_INPUT_MODE_DIGITAL_CAMERA

digatal camera mode

VI_INPUT_MODE_INTERLEAVED

interstage mode

VI_INPUT_MODE_MIPI

MIPI mode

VI_INPUT_MODE_LVDS

LVDS mode

VI_INPUT_MODE_HISPI

HiSPi mode

VI_INPUT_MODE_SLVS

SLVS mode

【Note】

None.

【Related Data Type and Interface】

None.

4.4.52. VI_WORK_MODE_E

【Description】

Work mode.

【Syntax】

typedef enum _VI_WORK_MODE_E {
   VI_WORK_MODE_1Multiplex = 0,
   VI_WORK_MODE_2Multiplex,
   VI_WORK_MODE_3Multiplex,
   VI_WORK_MODE_4Multiplex,
   VI_WORK_MODE_BUTT
} VI_WORK_MODE_E;

【Member】

Member

Description

VI_WORK_MODE_1Multiplex

1 Multiplex mode

VI_WORK_MODE_2Multiplex

2 Multiplex mode

VI_WORK_MODE_3Multiplex

3 Multiplex mode

VI_WORK_MODE_4Multiplex

4 Multiplex mode

【Note】

None.

【Related Data Type and Interface】

None.

4.4.53. VI_SCAN_MODE_E

【Description】

whether an input picture is interlaced or progressive.

【Syntax】

typedef enum _VI_SCAN_MODE_E {
   VI_SCAN_INTERLACED = 0,
   VI_SCAN_PROGRESSIVE,
   VI_SCAN_BUTT
} VI_SCAN_MODE_E;

【Member】

Member

Description

VI_SCAN_INTERLACED

interlaced mode

VI_SCAN_PROGRESSIVE

progressive mode

【Note】

None.

【Related Data Type and Interface】

None.

4.4.54. VI_YUV_DATA_SEQ_E

【Description】

Sequence of YUV data.

【Syntax】

typedef enum _VI_YUV_DATA_SEQ_E {
   VI_DATA_SEQ_VUVU = 0,
   VI_DATA_SEQ_UVUV,
   VI_DATA_SEQ_UYVY,
   VI_DATA_SEQ_VYUY,
   VI_DATA_SEQ_YUYV,
   VI_DATA_SEQ_YVYU,
   VI_DATA_SEQ_BUTT
} VI_YUV_DATA_SEQ_E;

【Member】

Member

Description

VI_DATA_SEQ_VUVU

The input sequence of the second component(only contains u and v) in BT.1120 mode is VUVU

VI_DATA_SEQ_UVUV

The input sequence of the second component(only contains u and v) in BT.1120 mode is UVUV

VI_DATA_SEQ_UYVY

The input sequence of YUV is UYVY

VI_DATA_SEQ_VYUY

The input sequence of YUV is VYUY

VI_DATA_SEQ_YUYV

The input sequence of YUV is YUYV

VI_DATA_SEQ_YVYU

The input sequence of YUV is YVYU

【Note】

None.

【Related Data Type and Interface】

None.

4.4.55. VI_CLK_EDGE_E

【Description】

Clock edge mode.

【Syntax】

typedef enum _VI_CLK_EDGE_E {
   VI_CLK_EDGE_SINGLE_UP = 0,
   VI_CLK_EDGE_SINGLE_DOWN,
   VI_CLK_EDGE_BUTT
} VI_CLK_EDGE_E;

【Member】

Member

Description

VI_CLK_EDGE_SINGLE_UP

single-edge mode and in rising edge

VI_CLK_EDGE_SINGLE_DOWN

single-edge mode and in falling edge

【Note】

None.

【Related Data Type and Interface】

None.

4.4.56. VI_COMPONENT_MODE_E

【Description】

Component mode.

【Syntax】

typedef enum _VI_COMPONENT_MODE_E {
   VI_COMPONENT_MODE_SINGLE = 0,
   VI_COMPONENT_MODE_DOUBLE,
   VI_COMPONENT_MODE_BUTT
} VI_COMPONENT_MODE_E;

【Member】

Member

Description

VI_COMPONENT_MODE_SINGLE

single component mode

VI_COMPONENT_MODE_DOUBLE

double component mode

【Note】

None.

【Related Data Type and Interface】

None.

4.4.57. VI_COMBINE_MODE_E

【Description】

Y/C composite or separation mode.

【Syntax】

typedef enum _VI_COMBINE_MODE_E {
   VI_COMBINE_COMPOSITE = 0,
   VI_COMBINE_SEPARATE,
   VI_COMBINE_BUTT
} VI_COMBINE_MODE_E;

【Member】

Member

Description

VI_COMBINE_COMPOSITE

Composite mode

VI_COMBINE_SEPARATE

Separate mode

【Note】

None.

【Related Data Type and Interface】

None.

4.4.58. VI_VSYNC_E

【Description】

Attribute of the vertical synchronization signal.

【Syntax】

typedef enum _VI_VSYNC_E {
   VI_VSYNC_FIELD = 0,
   VI_VSYNC_PULSE,
   VI_VSYNC_BUTT
} VI_VSYNC_E;

【Member】

Member

Description

VI_VSYNC_FIELD

Field/toggle mode:a signal reversal means a new frame or a field

VI_VSYNC_PULSE

Pusle/effective mode:a pusle or an effective signal means a new frame or a field

【Note】

None.

【Related Data Type and Interface】

None.

4.4.59. VI_VSYNC_NEG_E

【Description】

Attribute of the vertical synchronization signal.

【Syntax】

typedef enum _VI_VSYNC_NEG_E {
   VI_VSYNC_NEG_HIGH = 0,
   VI_VSYNC_NEG_LOW,
   VI_VSYNC_NEG_BUTT
} VI_VSYNC_NEG_E;

【Member】

Member

Description

VI_VSYNC_NEG_HIGH

if VIU_VSYNC_E = VIU_VSYNC_FIELD,then the v-sync signal of even field is high-level,if VIU_VSYNC_E = VIU_VSYNC_PULSE,then the v-sync pulse is positive pulse.

VI_VSYNC_NEG_LOW

if VIU_VSYNC_E = VIU_VSYNC_FIELD,then the v-sync signal of even field is low-level,if VIU_VSYNC_E = VIU_VSYNC_PULSE,then the v-sync pulse is negative pulse.

【Note】

None.

【Related Data Type and Interface】

None.

4.4.60. VI_HSYNC_E

【Description】

Attribute of the horizontal synchronization signal.

【Syntax】

typedef enum _VI_HSYNC_E {
   VI_HSYNC_VALID_SINGNAL = 0,
   VI_HSYNC_PULSE,
   VI_HSYNC_BUTT
} VI_HSYNC_E;

【Member】

Member

Description

VI_HSYNC_VALID_SINGNAL

the h-sync is valid signal mode

VI_HSYNC_PULSE

the h-sync is pulse mode, a new pulse means the beginning of a new line

【Note】

None.

【Related Data Type and Interface】

None.

4.4.61. VI_HSYNC_NEG_E

【Description】

Polarity of the horizontal synchronization signal.

【Syntax】

typedef enum _VI_HSYNC_NEG_E {
   VI_HSYNC_NEG_HIGH = 0,
   VI_HSYNC_NEG_LOW,
   VI_HSYNC_NEG_BUTT
} VI_HSYNC_NEG_E;

【Member】

Member

Description

VI_HSYNC_NEG_HIGH

if VI_HSYNC_E = VI_HSYNC_VALID_SINGNAL,then the valid h-sync signal is high-level;if VI_HSYNC_E = VI_HSYNC_PULSE,then the h-sync pulse is positive pulse

VI_HSYNC_NEG_LOW

if VI_HSYNC_E = VI_HSYNC_VALID_SINGNAL,then the valid h-sync signal is low-level;if VI_HSYNC_E = VI_HSYNC_PULSE,then the h-sync pulse is negative pulse

【Note】

None.

【Related Data Type and Interface】

None.

4.4.62. VI_VSYNC_VALID_E

【Description】

Attribute of the valid vertical synchronization signal.

【Syntax】

typedef enum _VI_VSYNC_VALID_E {
   VI_VSYNC_NORM_PULSE = 0,
   VI_VSYNC_VALID_SIGNAL,
   VI_VSYNC_VALID_BUTT
} VI_VSYNC_VALID_E;

【Member】

Member

Description

VI_VSYNC_NORM_PULSE

the v-sync is pusle mode, a pusle means a new frame or field

VI_VSYNC_VALID_SIGNAL

the v-sync is effective mode, a effective signal means a new frame or field

【Note】

None.

【Related Data Type and Interface】

None.

4.4.63. VI_VSYNC_VALID_NEG_E

【Description】

Polarity of the valid vertical synchronization signal.

【Syntax】

typedef enum _VI_VSYNC_VALID_NEG_E {
   VI_VSYNC_VALID_NEG_HIGH = 0,
   VI_VSYNC_VALID_NEG_LOW,
   VI_VSYNC_VALID_NEG_BUTT
} VI_VSYNC_VALID_NEG_E;

【Member】

Member

Description

VI_VSYNC_VALID_NEG_HIGH

if VI_VSYNC_VALID_E = VI_VSYNC_NORM_PULSE,a positive pulse means v-sync pulse;if VI_VSYNC_VALID_E = VI_VSYNC_VALID_SIGNAL,the valid v-sync signal is high-level

VI_VSYNC_VALID_NEG_LOW

if VI_VSYNC_VALID_E = VI_VSYNC_NORM_PULSE,a negative pulse means v-sync pulse;if VI_VSYNC_VALID_E = VI_VSYNC_VALID_SIGNAL,the valid v-sync signal is low-level

【Note】

None.

【Related Data Type and Interface】

None.

4.4.64. VI_WDR_ATTR_S

【Description】

Attribute of wdr.

【Syntax】

typedef struct _VI_WDR_ATTR_S {
   WDR_MODE_E enWDRMode;
   CVI_U32 u32CacheLine;
   CVI_BOOL bSyntheticWDR;
} VI_WDR_ATTR_S;

【Member】

Member

Description

enWDRMode

WDR mode

u32CacheLine

WDR cache line

bSyntheticWDR

Synthetic WDR mode

【Note】

None.

【Related Data Type and Interface】

None.

4.4.65. VI_TIMING_BLANK_S

【Description】

Blank information of the input timing.

【Syntax】

typedef struct _VI_TIMING_BLANK_S {
   CVI_U32 u32HsyncHfb;
   CVI_U32 u32HsyncAct;
   CVI_U32 u32HsyncHbb;
   CVI_U32 u32VsyncVfb;
   CVI_U32 u32VsyncVact;
   CVI_U32 u32VsyncVbb;
   CVI_U32 u32VsyncVbfb;
   CVI_U32 u32VsyncVbact;
   CVI_U32 u32VsyncVbbb;
} VI_TIMING_BLANK_S;

【Member】

Member

Description

u32HsyncHfb

Horizontal front blanking width

u32HsyncAct

Horizontal effetive width

u32HsyncHbb

Horizontal back blanking width

u32VsyncVfb

Vertical front blanking height of one frame or odd-field frame picture

u32VsyncVact

Vertical effetive width of one frame or odd-field frame picture

u32VsyncVbb

Vertical back blanking height of one frame or odd-field frame picture

u32VsyncVbfb

Even-field vertical front blanking height when input mode is interlace(invalid when progressive input mode)

u32VsyncVbact

Even-field vertical effetive width when input mode is interlace(invalid when progressive input mode)

u32VsyncVbbb

Even-field vertical back blanking height when input mode is interlace(invalid when progressive input mode)

【Note】

None.

【Related Data Type and Interface】

None.

4.4.66. VI_BT656_FIXCODE_E

【Description】

The highest bit of the BT.656 timing reference code.

【Syntax】

typedef enum _VI_BT656_FIXCODE_E {
   VI_BT656_FIXCODE_1 = 0,
   VI_BT656_FIXCODE_0,
   VI_BT656_FIXCODE_BUTT
} VI_BT656_FIXCODE_E;

【Member】

Member

Description

VI_BT656_FIXCODE_1

The highest bit of the EAV/SAV data over the BT.656 protocol is always 1

VI_BT656_FIXCODE_0

The highest bit of the EAV/SAV data over the BT.656 protocol is always 0

【Note】

None.

【Related Data Type and Interface】

None.

4.4.67. VI_BT656_FIELD_POLAR_E

【Description】

Polarity of the field indicator bit (F) of the BT.656 timing reference code.

【Syntax】

typedef struct _VI_BT656_FIELD_POLAR_E {
   VI_BT656_FIELD_POLAR_STD = 0,
   VI_BT656_FIELD_POLAR_NSTD,
   VI_BT656_FIELD_POLAR_BUTT
} VI_BT656_FIELD_POLAR_E;

【Member】

Member

Description

VI_BT656_FIELD_POLAR_STD

the standard BT.656 mode,the first filed F=0,the second filed F=1

VI_BT656_FIELD_POLAR_NSTD

the standard BT.656 mode,the first filed F=1,the second filed F=0

【Note】

None.

【Related Data Type and Interface】

None.

4.4.68. VI_DEV_ATTR_EX_S

【Description】

The extended attributes of VI device.

【Syntax】

typedef struct _VI_DEV_ATTR_EX_S {
   VI_INPUT_MODE_E enInputMode;
   VI_WORK_MODE_E enWorkMode;
   VI_COMBINE_MODE_E enCombineMode;
   VI_COMPONENT_MODE_E enComponentMode;
   VI_CLK_EDGE_E enClkEdge;
   CVI_U32 au32ComponentMask[VI_COMPMASK_NUM];
   VI_SCAN_MODE_E enScanMode;
   CVI_S32 as32AdChnId[VI_MAX_ADCHN_NUM];
   VI_YUV_DATA_SEQ_E enDataSeq;
   VI_SYNC_CFG_S stSynCfg;
   VI_BT656_SYNC_CFG_S stBT656SynCfg;
   VI_DATA_TYPE_E enInputDataType;
   CVI_BOOL bDataReverse;
   SIZE_S stSize;
   VI_WDR_ATTR_S stWDRAttr;
} VI_DEV_ATTR_EX_S;

【Member】

Member

Description

enInputMode

Input mode

enWorkMode

Work mode

enCombineMode

Y/C composite or separation mode

enComponentMode

Component mode (single-component or dual-component)

enClkEdge

Clock edge mode (sampling on the rising or falling edge)

au32ComponentMask

Component mask

enScanMode

Input scanning mode (progressive or interlaced)

as32AdChnId

AD channel ID. Typically, the default value -1 is recommended

enDataSeq

Input data sequence (only the YUV format is supported)

stSynCfg

Sync timing. This member must be configured in BT.601 mode or DC mode

stBT656SynCfg

Sync timing. This member must be configured in BT.656 mode

enInputDataType

VI input data type enumeration

bDataReverse

Data reverse

stSize

Input size

stWDRAttr

Attribute of WDR

【Note】

None.

【Related Data Type and Interface】

None.

4.4.69. VI_EXT_CHN_SOURCE_E

【Description】

VI extended channel data source type.

【Syntax】

typedef enum _VI_EXT_CHN_SOURCE_E {
   VI_EXT_CHN_SOURCE_TAIL,
   VI_EXT_CHN_SOURCE_HEAD,
   VI_EXT_CHN_SOURCE_BUTT
} VI_EXT_CHN_SOURCE_E;

【Member】

Member

Description

VI_EXT_CHN_SOURCE_TAIL

Tail source of VI external channel

VI_EXT_CHN_SOURCE_HEAD

HEAD source of VI external channel

【Note】

None.

【Related Data Type and Interface】

None.

4.4.70. VI_EXT_CHN_ATTR_S

【Description】

VI extended channel attribute structure.

【Syntax】

typedef struct _VI_EXT_CHN_ATTR_S {
   VI_EXT_CHN_SOURCE_E enSource;
   VI_CHN s32BindChn;
   SIZE_S stSize;
   PIXEL_FORMAT_E enPixelFormat;
   CVI_U32 u32Depth;
   FRAME_RATE_CTRL_S stFrameRate;
} VI_EXT_CHN_ATTR_S;

【Member】

Member

Description

enSource

extended channel data source

s32BindChn

The channel num which extend channel will bind to

stSize

Channel out put size

enPixelFormat

Pixel format

u32Depth

Depth

stFrameRate

Frame rate

【Note】

None.

【Related Data Type and Interface】

None.