6.3. API Reference

This function module provides the following APIs to users:


6.3.1. CVI_VPSS_SetMode

Description

Set VPSS Mode. SetVPSS single modeoruserdual mode.

Syntax

CVI_S32 CVI_VPSS_SetMode(const VPSS_MODE_S *pstVPSSMode); 

Parameters

Parameter Name

Description

Input/Output

pstVPSSMode

VPSS Mode AttributePointer.

Input

Return Value

Return Value

Description

0

Success.

Non-zero

Failure; see Error Codes.

Requirements

  • Header files: cvi_comm_vpss.h, cvi_vpss.h

  • Library files: libvpss.a

Note

thisAPIneed tois VPSS ModuleInitializeitemCallInterface

Example

VPSS_MODE_S stVPSSMode = {.enMode = VPSS_MODE_SINGLE, .aenInput[0] = VPSS_INPUT_MEM}; CVI_S32 s32Ret = CVI_SUCCESS s32Ret = CVI_VPSS_SetMode(&stVPSSMode); if (s32Ret != CVI_SUCCESS) {  VPSS_UT_PRT("CVI_VPSS_SetMode failed with %#x!\n", s32Ret);  return s32Ret } 

Related Topics


6.3.2. CVI_VPSS_GetMode

Description

Get VPSS Mode.

Syntax

CVI_S32 CVI_VPSS_GetMode(VPSS_MODE_S *pstVPSSMode); 

Parameters

Parameter Name

Description

Input/Output

pstVPSSMode

VPSS Mode AttributePointer.

Output

Return Value

Return Value

Description

0

Success.

Non-zero

Failure; see Error Codes.

Requirements

  • Header files: cvi_comm_vpss.h, cvi_vpss.h

  • Library files: libvpss.a

Note

None.

Example

None.

Related Topics


6.3.3. CVI_VPSS_CreateGrp

Description

Create a VPSS GROUP

Syntax

CVI_S32 CVI_VPSS_CreateGrp(VPSS_GRP VpssGrp, const VPSS_GRP_ATTR_S *pstGrpAttr); 

Parameters

Parameter Name

Description

Input/Output

VpssGrp

VPSS GROUP number.

Value range: [0, VPSS_MAX_GRP_NUM).

Input

pstGrpAttr

VPSS GROUP AttributePointer.

Input

Return Value

Return Value

Description

0

Success.

Non-zero

Failure; see Error Codes.

Requirements

  • Header files: cvi_comm_vpss.h, cvi_vpss.h

  • Library files: libvpss.a

Note

  • UsebeforefirstCreate VPSS_GRP_ATTR_S

Example

VPSS_GRP_ATTR_S stVpssGrpAttr; VPSS_CHN VpssChn = VPSS_CHN0; CVI_BOOL abChnEnable[VPSS_MAX_PHY_CHN_NUM] = {0}; VPSS_CHN_ATTR_S astVpssChnAttr[VPSS_MAX_PHY_CHN_NUM]; CVI_S32 s32Ret = CVI_SUCCESS; VPSS_CROP_INFO_S pstCropInfo; stVpssGrpAttr.stFrameRate.s32SrcFrameRate = -1; stVpssGrpAttr.stFrameRate.s32DstFrameRate = -1; stVpssGrpAttr.enPixelFormat = PIXEL_FORMAT_YUV_PLANAR_420; stVpssGrpAttr.u32MaxW = stSize.u32Width; stVpssGrpAttr.u32MaxH = stSize.u32Height; astVpssChnAttr[VpssChn].u32Width = 800; astVpssChnAttr[VpssChn].u32Height = 600; astVpssChnAttr[VpssChn].enChnMode = VPSS_CHN_MODE_USER; astVpssChnAttr[VpssChn].enVideoFormat = VIDEO_FORMAT_LINEAR; astVpssChnAttr[VpssChn].enPixelFormat = PIXEL_FORMAT_BGR_888_PLANAR; astVpssChnAttr[VpssChn].stFrameRate.s32SrcFrameRate = 30; astVpssChnAttr[VpssChn].stFrameRate.s32DstFrameRate = 30; astVpssChnAttr[VpssChn].u32Depth = 0; astVpssChnAttr[VpssChn].bMirror = CVI_FALSE; astVpssChnAttr[VpssChn].bFlip = CVI_FALSE; astVpssChnAttr[VpssChn].stAspectRatio.enMode = ASPECT_RATIO_NONE; /*start vpss*/ VPSS_CHN VpssChn; s32Ret = CVI_VPSS_CreateGrp(0, &stVpssGrpAttr); if (s32Ret != CVI_SUCCESS) {  SAMPLE_PRT("CVI_VPSS_CreateGrp failed with %#x!\n", s32Ret);  return CVI_FAILURE; } s32Ret = CVI_VPSS_SetChnAttr(0, 0, &astVpssChnAttr[0]); if (s32Ret != CVI_SUCCESS) {  SAMPLE_PRT("CVI_VPSS_SetChnAttr failed with %#x\n", s32Ret);  return CVI_FAILURE; } s32Ret = CVI_VPSS_EnableChn(0, 0); if (s32Ret != CVI_SUCCESS) {  SAMPLE_PRT("CVI_VPSS_EnableChn failed with %#x\n", s32Ret);  return CVI_FAILURE; } s32Ret = CVI_VPSS_StartGrp(0); if (s32Ret != CVI_SUCCESS) {  SAMPLE_PRT("CVI_VPSS_StartGrp failed with %#x\n", s32Ret);  return CVI_FAILURE; } s32Ret = CVI_VPSS_GetGrpCrop(0, &pstCropInfo); if (s32Ret != CVI_SUCCESS) {  SAMPLE_PRT("CVI_VPSS_ GetGrpCrop failed with %#x\n", s32Ret);  return CVI_FAILURE; } pstCropInfo.stCropRect.s32X = 0; pstCropInfo.stCropRect.s32Y = 0; pstCropInfo.stCropRect.u32Width = 600; pstCropInfo.stCropRect.u32Height = 600; s32Ret = CVI_VPSS_SetGrpCrop(0, &pstCropInfo); if (s32Ret != CVI_SUCCESS) {  SAMPLE_PRT("CVI_VPSS_ SetGrpCrop failed with %#x\n", s32Ret);  return CVI_FAILURE; } s32Ret = CVI_VPSS_DisableChn(0, 0); if (s32Ret != CVI_SUCCESS) {  SAMPLE_PRT("failed with %#x!\n", s32Ret);  return CVI_FAILURE; } s32Ret = CVI_VPSS_StopGrp(VpssGrp); if (s32Ret != CVI_SUCCESS) {  SAMPLE_PRT("failed with %#x!\n", s32Ret);  return CVI_FAILURE; } s32Ret = CVI_VPSS_DestroyGrp(VpssGrp); if (s32Ret != CVI_SUCCESS) {  SAMPLE_PRT("failed with %#x!\n", s32Ret);  return CVI_FAILURE; } 

Related Topics


6.3.4. CVI_VPSS_DestroyGrp

Description

Destroy a VPSS GROUP

Syntax

CVI_S32 CVI_VPSS_DestroyGrp (VPSS_GRP VpssGrp); 

Parameters

Parameter Name

Description

Input/Output

VpssGrp

VPSS GROUP number.

Value Range:[0, VPSS_MAX_GRP_NUM).

Input

Return Value

Return Value

Description

0

Success.

Non-zero

Failure; see Error Codes.

Requirements

  • Header files: cvi_comm_vpss.h, cvi_vpss.h

  • Library files: libvpss.a

Note

  • CallthisInterfacebefore,must firstCallCVI_VPSS_StopGrp Disablethis GROUP

  • thisnumberwillReleasethisgrpunderthehasvb_jobs

Example

See CVI_VPSS_CreateGrp

Related Topics

CVI_VPSS_CreateGrp


6.3.5. CVI_VPSS_GetAvailableGrp

Description

GetacanVPSSgroupnumber.

Syntax

VPSS_GRP CVI_VPSS_GetAvailableGrp(CVI_VOID); 

Parameters

None

Return Value

Return Value

Description

>=0

Validgroupnumber.

-1

Nonecangroupnumber.

Requirements

  • Header files: cvi_comm_vpss.h, cvi_vpss.h

  • Library files: libvpss.a

Note

  • CallthisInterfaceGettoaValidgroupnumberaftermustCreategroup.

Example

None

Related Topics

CVI_VPSS_CreateGrp


6.3.6. CVI_VPSS_GetGrpAttr

Description

Get VPSS GROUP Attribute.

Syntax

CVI_S32 CVI_VPSS_GetGrpAttr (VPSS_GRP VpssGrp, VPSS_GRP_ATTR_S *pstGrpAttr); 

Parameters

Parameter Name

Description

Input/Output

VpssGrp

VPSS GROUP number.

Value Range:[0, VPSS_MAX_GRP_NUM).

Input

pstGrpAttr

VPSS GROUP AttributePointer.

Output

Return Value

Return Value

Description

0

Success.

Non-zero

Failure; see Error Codes.

Requirements

  • Header files: cvi_comm_vpss.h, cvi_vpss.h

  • Library files: libvpss.a

Note

  • The group must already be created

  • GROUP Attributemustvalid,wherepartstaticAttributenotcandynamicSet,specificSeeVPSS_GRP_ATTR_S

Example

See CVI_VPSS_CreateGrp

Related Topics

CVI_VPSS_CreateGrp


6.3.7. CVI_VPSS_SetGrpAttr

Description

SetVPSS GROUP Attribute.

Syntax

CVI_S32 CVI_VPSS_SetGrpAttr (VPSS_GRP VpssGrp, const VPSS_GRP_ATTR_S *pstGrpAttr); 

Parameters

Parameter Name

Description

Input/Output

VpssGrp

VPSS GROUP number.

Value Range:[0, VPSS_MAX_GRP_NUM).

Input

pstGrpAttr

VPSS GROUP AttributePointer.

Input

Return Value

Return Value

Description

0

Success.

Non-zero

Failure; see Error Codes.

Requirements

  • Header files: cvi_comm_vpss.h, cvi_vpss.h

  • Library files: libvpss.a

Note

  • The group must already be created

  • GROUP Attributemustvalid,wherepartstaticAttributenotcandynamicSet,specificSeeVPSS_GRP_ATTR_S

Example

See CVI_VPSS_CreateGrp

Related Topics

CVI_VPSS_CreateGrp


6.3.8. CVI_VPSS_StartGrp

Description

EnableVPSS GROUP.

Syntax

CVI_S32 CVI_VPSS_StartGrp (VPSS_GRP VpssGrp); 

Parameters

Parameter Name

Description

Input/Output

VpssGrp

VPSS GROUP number.

Value Range:[0, VPSS_MAX_GRP_NUM).

Input

Return Value

Return Value

Description

0

Success.

Non-zero

Failure; see Error Codes.

Requirements

  • Header files: cvi_comm_vpss.h, cvi_vpss.h

  • Library files: libvpss.a

Note

  • The group must already be created

  • Calling this function repeatedly to set the same group returns success

Example

See CVI_VPSS_CreateGrp

Related Topics

CVI_VPSS_CreateGrp


6.3.9. CVI_VPSS_StopGrp

Description

DisableVPSS GROUP.

Syntax

CVI_S32 CVI_VPSS_StopGrp (VPSS_GRP VpssGrp); 

Parameters

Parameter Name

Description

Input/Output

VpssGrp

VPSS GROUP number.

Value Range:[0, VPSS_MAX_GRP_NUM).

Input

Return Value

Return Value

Description

0

Success.

Non-zero

Failure; see Error Codes.

Requirements

  • Header files: cvi_comm_vpss.h, cvi_vpss.h

  • Library files: libvpss.a

Note

  • The group must already be created, notwillReturnFailure

  • repeatDisablesameone VPSS GROUP ReturnSuccess

Example

See CVI_VPSS_CreateGrp

Related Topics

CVI_VPSS_CreateGrp


6.3.10. CVI_VPSS_ResetGrp

Description

bitsVPSS GROUP.

Syntax

CVI_S32 CVI_VPSS_ResetGrp (VPSS_GRP VpssGrp); 

Parameters

Parameter Name

Description

Input/Output

VpssGrp

VPSS GROUP number.

Value Range:[0, VPSS_MAX_GRP_NUM).

Input

Return Value

Return Value

Description

0

Success.

Non-zero

Failure; see Error Codes.

Requirements

  • Header files: cvi_comm_vpss.h, cvi_vpss.h

  • Library files: libvpss.a

Note

The group must already be created

Example

See CVI_VPSS_CreateGrp

Related Topics

CVI_VPSS_CreateGrp


6.3.11. CVI_VPSS_GetGrpProcAmpCtrl

Description

Geta VPSS GROUP ColorControlFunctionDescription.

Syntax

CVI_S32 CVI_VPSS_GetGrpProcAmpCtrl(VPSS_GRP VpssGrp, PROC_AMP_E type, PROC_AMP_CTRL_S *ctrl); 

Parameters

Parameter Name

Description

Input/Output

VpssGrp

VPSS GROUP number.

Value Range:[0, VPSS_MAX_GRP_NUM).

Input

type

Proc Amp(ColorControl)type

Input

ctrl

DefinitionProcAmpspecific, includingmin, max, step, defaultetc.

Output

Return Value

Return Value

Description

0

Success.

Non-zero

Failure; see Error Codes.

Requirements

  • Header files: cvi_comm_vpss.h, cvi_vpss.h

  • Library files: libvpss.a

Note

Example

PROC_AMP_CTRL_S stAmpCtrl; CVI_S32 tmp;  if (CVI_VPSS_GetGrpProcAmp(0, PROC_AMP_BRIGHTNESS, &tmp) != CVI_SUCCESS) {  CVI_TRACE_LOG(CVI_DBG_ERR, "CVI_VPSS_GetGrpProcAmp NG on grp0!\n");  return CVI_FAILURE;  }  if (CVI_VPSS_GetGrpProcAmpCtrl(0, PROC_AMP_BRIGHTNESS, &stAmpCtrl) != CVI_SUCCESS) {  CVI_TRACE_LOG(CVI_DBG_ERR, "CVI_VPSS_GetGrpProcAmpCtrl NG on grp0!\n");  return CVI_FAILURE;  }  if (CVI_VPSS_SetGrpProcAmp(0, PROC_AMP_BRIGHTNESS, stAmpCtrl.maximum) != CVI_SUCCESS) {  CVI_TRACE_LOG(CVI_DBG_ERR, "CVI_VPSS_SetGrpProcAmp NG on grp0!\n");  return CVI_FAILURE;  } 

Related Topics


6.3.12. CVI_VPSS_GetGrpProcAmp

Description

Geta VPSS GROUPColorControlAttribute.

Syntax

CVI_S32 CVI_VPSS_GetGrpProcAmp(VPSS_GRP VpssGrp, PROC_AMP_E type, CVI_S32 *value); 

Parameters

Parameter Name

Description

Input/Output

VpssGrp

VPSS GROUP number.

Value Range:[0, VPSS_MAX_GRP_NUM).

Input

type

Proc Amp(ColorControl)type

Input

value

ProcAmpSet

Output

Return Value

Return Value

Description

0

Success.

Non-zero

Failure; see Error Codes.

Requirements

  • Header files: cvi_comm_vpss.h, cvi_vpss.h

  • Library files: libvpss.a

Note

None.

Example

See CVI_VPSS_GetGrpProcAmpCtrl

Related Topics


6.3.13. CVI_VPSS_SetGrpProcAmp

Description

Seta VPSS GROUPColorControlAttribute.

Syntax

CVI_S32 CVI_VPSS_SetGrpProcAmp(VPSS_GRP VpssGrp, PROC_AMP_E type, const CVI_S32 value); 

Parameters

Parameter Name

Description

Input/Output

VpssGrp

VPSS GROUP number.

Value Range:[0, VPSS_MAX_GRP_NUM).

Input

type

ProcAmp(ColorControl)type

Input

value

ProcAmpSet

Input

Return Value

Return Value

Description

0

Success.

Non-zero

Failure; see Error Codes.

Requirements

  • Header files: cvi_comm_vpss.h, cvi_vpss.h

  • Library files: libvpss.a

Note

None.

Example

See CVI_VPSS_GetGrpProcAmpCtrl

Related Topics


6.3.14. CVI_VPSS_GetAllProcAmp

Description

Setthehas VPSS GROUPColorControlAttribute.

Syntax

CVI_S32 CVI_VPSS_GetAllProcAmp(struct vpss_all_proc_amp_cfg *cfg); 

Parameters

Parameter Name

Description

Input/Output

cfg

ColorControlAttribute

Output

Return Value

Return Value

Description

0

Success.

Non-zero

Failure; see Error Codes.

Requirements

  • Header files: cvi_comm_vpss.h, cvi_vpss.h

  • Library files: libvpss.a

Note

None.

Example

None.

Related Topics


6.3.15. CVI_VPSS_SetGrpParamfromBin

Description

According toBinSeta VPSS GROUPAttribute.

Syntax

CVI_S32 CVI_VPSS_SetGrpParamfromBin(VPSS_GRP VpssGrp, CVI_U8 scene); 

Parameters

Parameter Name

Description

Input/Output

VpssGrp

VPSS GROUP number.

Value Range:[0, VPSS_MAX_GRP_NUM).

Input

scene

theVPSSInput BinsceneSet

Input

Return Value

Return Value

Description

0

Success.

Non-zero

Failure; see Error Codes.

Requirements

  • Header files: cvi_comm_vpss.h, cvi_vpss.h

  • Library files: libvpss.a

Note

  • When using a new PQ bin, the group must already be created

  • If PQ bindoes not exist, thenUsedefaultParameter

  • beforeonlySupportProcAmp(Brightness, Contrast, Hue, Saturation)Set

Example

VPSS_GRP_ATTR_S stVpssGrpAttr; VPSS_CHN VpssChn = VPSS_CHN0; CVI_BOOL abChnEnable[VPSS_MAX_PHY_CHN_NUM] = {0}; VPSS_CHN_ATTR_S astVpssChnAttr[VPSS_MAX_PHY_CHN_NUM]; CVI_S32 s32Ret = CVI_SUCCESS; VPSS_CROP_INFO_S pstCropInfo; stVpssGrpAttr.stFrameRate.s32SrcFrameRate = -1; stVpssGrpAttr.stFrameRate.s32DstFrameRate = -1; stVpssGrpAttr.enPixelFormat = PIXEL_FORMAT_YUV_PLANAR_420; stVpssGrpAttr.u32MaxW = stSize.u32Width; stVpssGrpAttr.u32MaxH = stSize.u32Height; astVpssChnAttr[VpssChn].u32Width = 800; astVpssChnAttr[VpssChn].u32Height = 600; astVpssChnAttr[VpssChn].enChnMode = VPSS_CHN_MODE_USER; astVpssChnAttr[VpssChn].enVideoFormat = VIDEO_FORMAT_LINEAR; astVpssChnAttr[VpssChn].enPixelFormat = PIXEL_FORMAT_BGR_888_PLANAR; astVpssChnAttr[VpssChn].stFrameRate.s32SrcFrameRate = 30; astVpssChnAttr[VpssChn].stFrameRate.s32DstFrameRate = 30; astVpssChnAttr[VpssChn].u32Depth = 0; astVpssChnAttr[VpssChn].bMirror = CVI_FALSE; astVpssChnAttr[VpssChn].bFlip = CVI_FALSE; astVpssChnAttr[VpssChn].stAspectRatio.enMode = ASPECT_RATIO_NONE; /*start vpss*/ VPSS_CHN VpssChn; s32Ret = CVI_VPSS_CreateGrp(0, &stVpssGrpAttr); if (s32Ret != CVI_SUCCESS) {  SAMPLE_PRT("CVI_VPSS_CreateGrp failed with %#x!\n", s32Ret);  return CVI_FAILURE; } /*vpss grp0套用场景0*/ s32Ret = CVI_VPSS_SetGrpParamfromBin(0, 0); if (s32Ret != CVI_SUCCESS) {  SAMPLE_PRT("CVI_VPSS_SetGrpParamfromBin failed with %#x!\n", s32Ret);  return CVI_FAILURE; } 

Related Topics


6.3.16. CVI_VPSS_GetBinScene

Description

According toBintosceneSet.

Syntax

CVI_S32 CVI_VPSS_GetBinScene(VPSS_GRP VpssGrp, CVI_U8 *scene); 

Parameters

Parameter Name

Description

Input/Output

VpssGrp

VPSS GROUP number.

Value Range:[0, VPSS_MAX_GRP_NUM).

Input

scene

BinsceneSet

Output

Return Value

Return Value

Description

0

Success.

Non-zero

Failure; see Error Codes.

Requirements

  • Header files: cvi_comm_vpss.h, cvi_vpss.h

  • Library files: libvpss.a

Note

  • When using a new PQ bin, the group must already be created

Example

None

Related Topics

None


6.3.17. CVI_VPSS_GetChnAttr

Description

Get VPSS Channel attributes.

Syntax

CVI_S32 CVI_VPSS_GetChnAttr (VPSS_GRP VpssGrp, VPSS_CHN VpssChn, VPSS_CHN_ATTR_S *pstChnAttr) 

Parameters

Parameter Name

Description

Input/Output

VpssGrp

VPSS GROUP number.

Value range: [0, VPSS_MAX_GRP_NUM).

Input

VpssChn

VPSS Channel number

Value Range:[0, VPSS_MAX_PHY_CHN_NUM)

Input

pstChnAttr

VPSS Channel attributes

Output

Return Value

Return Value

Description

0

Success.

Non-zero

Failure; see Error Codes.

Requirements

  • Header files: cvi_comm_vpss.h, cvi_vpss.h

  • Library files: libvpss.a

Note

The group must already be created

Example

See CVI_VPSS_CreateGrp

Related Topics

CVI_VPSS_CreateGrp


6.3.18. CVI_VPSS_SetChnAttr

Description

Set VPSS Channel attributes.

Syntax

CVI_S32 CVI_VPSS_SetChnAttr (VPSS_GRP VpssGrp, VPSS_CHN VpssChn, const VPSS_CHN_ATTR_S *pstChnAttr) 

Parameters

Parameter Name

Description

Input/Output

VpssGrp

VPSS GROUP number.

Value range: [0, VPSS_MAX_GRP_NUM).

Input

VpssChn

VPSS Channel number

Value Range:[0, VPSS_MAX_PHY_CHN_NUM)

Input

pstChnAttr

VPSS Channel attributes

Input

Return Value

Return Value

Description

0

Success.

Non-zero

Failure; see Error Codes.

Requirements

  • Header files: cvi_comm_vpss.h, cvi_vpss.h

  • Library files: libvpss.a

Note

The group must already be created

Example

See CVI_VPSS_CreateGrp

Related Topics

CVI_VPSS_CreateGrp


6.3.19. CVI_VPSS_EnableChn

Description

Enable VPSS Channel.

Syntax

CVI_S32 CVI_VPSS_EnableChn(VPSS_GRP VpssGrp, VPSS_CHN VpssChn); 

Parameters

Parameter Name

Description

Input/Output

VpssGrp

VPSS GROUP number.

Value range: [0, VPSS_MAX_GRP_NUM).

Input

VpssChn

VPSS Channel number

Value Range:[0, VPSS_MAX_PHY_CHN_NUM)

Input

Return Value

Return Value

Description

0

Success.

Non-zero

Failure; see Error Codes.

Requirements

  • Header files: cvi_comm_vpss.h, cvi_vpss.h

  • Library files: libvpss.a

Note

  • The group must already be created

  • multiplesecondaryEnableReturnSuccess

Example

See CVI_VPSS_CreateGrp

Related Topics

CVI_VPSS_CreateGrp


6.3.20. CVI_VPSS_DisableChn

Description

Disable VPSS Channel.

Syntax

CVI_S32 CVI_VPSS_DisableChn (VPSS_GRP VpssGrp, VPSS_CHN VpssChn) 

Parameters

Parameter Name

Description

Input/Output

VpssGrp

VPSS GROUP number.

Value range: [0, VPSS_MAX_GRP_NUM).

Input

VpssChn

VPSS Channel number.

Value Range:[0, VPSS_MAX_PHY_CHN_NUM).

Input

Return Value

Return Value

Description

0

Success.

Non-zero

Failure; see Error Codes.

Requirements

  • Header files: cvi_comm_vpss.h, cvi_vpss.h

  • Library files: libvpss.a

Note

  • The group must already be created

  • repeatDisableReturnSuccess

Example

See CVI_VPSS_CreateGrp

Related Topics

CVI_VPSS_CreateGrp


6.3.21. CVI_VPSS_SetGrpCrop

Description

Set VPSS CROP FunctionAttribute.

Syntax

CVI_S32 CVI_VPSS_SetGrpCrop (VPSS_GRP VpssGrp, const VPSS_CROP_INFO_S *pstCropInfo); 

Parameters

Parameter Name

Description

Input/Output

VpssGrp

VPSS GROUP number.

Value Range:[0, VPSS_MAX_GRP_NUM).

Input

pstCropInfo

CROP FunctionParameter.

Input

Return Value

Return Value

Description

0

Success.

Non-zero

Failure; see Error Codes.

Requirements

  • Header files: cvi_comm_vpss.h, cvi_vpss.h

  • Library files: libvpss.a

Note

  • The group must already be created

  • The CROP region cannot be smaller than the VPSS minimum size or exceed the maximum size; otherwise, failure is returned.

  • OnlineNot supportedgroupCrop

  • EnableDIScaseunder, thisSetInvalid

Example

See CVI_VPSS_CreateGrp

Related Topics

CVI_VPSS_CreateGrp


6.3.22. CVI_VPSS_GetGrpCrop

Description

Get VPSS CROP FunctionAttribute.

Syntax

CVI_S32 CVI_VPSS_GetGrpCrop (VPSS_GRP VpssGrp, VPSS_CROP_INFO_S *pstCropInfo); 

Parameters

Parameter Name

Description

Input/Output

VpssGrp

VPSS GROUP number.

Value Range:[0, VPSS_MAX_GRP_NUM).

Input

pstCropInfo

CROP FunctionParameter.

Output

Return Value

Return Value

Description

0

Success.

Non-zero

Failure; see Error Codes.

Requirements

  • Header files: cvi_comm_vpss.h, cvi_vpss.h

  • Library files: libvpss.a

Note

The group must already be created

Example

See CVI_VPSS_CreateGrp

Related Topics

CVI_VPSS_CreateGrp


6.3.23. CVI_VPSS_SendFrame

Description

Userto VPSS SendData

Syntax

CVI_S32 CVI_VPSS_SendFrame (VPSS_GRP VpssGrp, const VIDEO_FRAME_INFO_S *pstVideoFrame, 

CVI_S32 s32MilliSec);

Parameters

Parameter Name

Description

Input/Output

VpssGrp

VPSS GROUP number.

Value Range:[0, VPSS_MAX_GRP_NUM).

Input

pstVideoFrame

pendingSendImageInformation. specificDescriptionSeeSystem Controlsection.

Input

s32MilliSec

beforeversioncurrentlynotto.

Input

Return Value

Return Value

Description

0

Success.

Non-zero

Failure; see Error Codes.

Requirements

  • Header files: cvi_comm_vpss.h, cvi_vpss.h

  • Library files: libvpss.a

Note

  • The group must already be createdandalreadyboot, notwillReturnFailure

Example

None

Related Topics

None


6.3.24. CVI_VPSS_GetChnFrame

Description

UserfromChannelGetoneFrameprocessingcompleteImage

Syntax

CVI_S32 CVI_VPSS_GetChnFrame(VPSS_GRP VpssGrp, VPSS_CHN VpssChn, VIDEO_FRAME_INFO_S *pstFrameInfo, CVI_S32 s32MilliSec); 

Parameters

Parameter Name

Description

Input/Output

VpssGrp

VPSS GROUP number.

Value Range:[0, VPSS_MAX_GRP_NUM).

Input

VpssChn

VPSS Channel number

Value Range:[0, VPSS_MAX_CHN_NUM).

Input

pstVideoFrame

Image information to be sent. For details, see the "System Control" chapter.

Output

s32MilliSec

Timeouttime.

Input

Return Value

Return Value

Description

0

Success.

Non-zero

Failure; see Error Codes.

Requirements

  • Header files: cvi_comm_vpss.h, cvi_vpss.h

  • Library files: libvpss.a

Note

  • The group must already be created

  • thisnumberwillGetImageInformationsaveinpstvideoFrameinside, andincludingImageVirtual addressandPhysicalAddress

Example

VIDEO_FRAME_INFO_S pstVideoFrame; FILE *fp; size_t image_size; unsigned char ptr[image_size]; int count = 0; CVI_VPSS_GetChnFrame(0, 0, &pstVideoFrame, 5000); image_size = pstVideoFrame.stVFrame.u32Width * pstVideoFrame.stVFrame.u32Height * 3; pstVideoFrame. stVFrame.u64VirAddr[i] = CVI_SYS_Mmap(pstVideoFrame -> stVFrame .u64PhyAddr[0], image_size); for (int i = 0; i < 3; i++) {  memcpy(&ptr[count], (const CVI_VOID *)pstVideoFrame.stVFrame.u64VirAddr[i], pstVideoFrame.stVFrame.u32Length[i]);  count += pstVideoFrame.stVFrame.u32Length[i]; } fp = fopen("/tmp/dump.bin", "w"); if (fp == CVI_NULL) {  CVI_TRACE_VPSS(CVI_DBG_ERR, "open data file error\n");  return CVI_FAILURE; } fwrite(ptr, image_size, 1, fp); fclose(fp); CVI_SYS_Munmap(pstVideoFrame. stVFrame.u64VirAddr[i], image_size); if (CVI_VPSS_ReleaseChnFrame(0, 0, &pstVideoFrame) != 0)  SAMPLE_PRT("CVI_VI_ReleaseChnFrame NG\n"); 

Related Topics

CVI_VPSS_ReleaseChnFrame


6.3.25. CVI_VPSS_SendChnFrame

Description

UsertoVPSSspecifiedChannelData. canthistoreachimageconnect.

Syntax

CVI_S32 CVI_VPSS_SendChnFrame (VPSS_GRP VpssGrp, VPSS_CHN VpssChn, const VIDEO_FRAME_INFO_S *pstVideoFrame, CVI_S32 s32MilliSec); 

Parameters

Parameter Name

Description

Input/Output

VpssGrp

VPSS GROUP number.

Value Range:[0, VPSS_MAX_GRP_NUM).

Input

VpssChn

VPSS Channel number

Value Range:[0, VPSS_MAX_CHN_NUM)

Input

pstVideoFrame

pendingSendImageInformation. specific DescriptionSee“System Control”section

Input

s32MilliSec

beforeversioncurrentlynotto

Input

Return Value

Return Value

Description

0

Success.

Non-zero

Failure; see Error Codes.

Requirements

  • Header files: cvi_comm_vpss.h, cvi_vpss.h

  • Library files: libvpss.a

Note

  • Group/Chnmust already be created

Example

None

Related Topics

None


6.3.26. CVI_VPSS_ReleaseChnFrame

Description

UserReleaseoneFrameChannelprocessingcompleteImage

Syntax

CVI_S32 CVI_VPSS_ReleaseChnFrame (VPSS_GRP VpssGrp, VPSS_CHN VpssChn, VIDEO_FRAME_INFO_S *pstFrameInfo); 

Parameters

Parameter Name

Description

Input/Output

VpssGrp

VPSS GROUP number.

Value Range:[0, VPSS_MAX_GRP_NUM).

Input

VpssChn

VPSS Channel number

Value Range:[0, VPSS_MAX_CHN_NUM).

Input

pstVideoFrame

Image information to be sent. For details, see the "System Control" chapter.

Input

Return Value

Return Value

Description

0

Success.

Non-zero

Failure; see Error Codes.

Requirements

  • Header files: cvi_comm_vpss.h, cvi_vpss.h

  • Library files: libvpss.a

Note

thisInterfacewith CVI_VPSS_GetChnFrame work withUse

Example

See CVI_VPSS_GetChnFrame

Related Topics

CVI_VPSS_GetChnFrame


6.3.27. CVI_VPSS_SetChnCrop

Description

Set VPSS ChannelCropFunctionAttribute

Syntax

CVI_S32 CVI_VPSS_SetChnCrop(VPSS_GRP VpssGrp, VPSS_CHN VpssChn, const VPSS_CROP_INFO_S *pstCropInfo) 

Parameters

Parameter Name

Description

Input/Output

VpssGrp

VPSS GROUP number.

Value Range:[0, VPSS_MAX_GRP_NUM).

Input

VpssChn

VPSS Channel number

Value Range:[0, VPSS_MAX_CHN_NUM).

Input/Output

pstCropInfo

Image information to be sent. For details, see the "System Control" chapter.

Input

Return Value

Return Value

Description

0

Success.

Non-zero

Failure; see Error Codes.

Requirements

  • Header files: cvi_comm_vpss.h, cvi_vpss.h

  • Library files: libvpss.a

Note

  • Groupmustalready created

  • The CROP region cannot be smaller than the VPSS minimum size or exceed the maximum size; otherwise, failure is returned.

  • thisnumberSetisvpssOutputChannelImage, whileGrpCropSetisvpssInputImage

Example

None

Related Topics

CVI_VPSS_GetChnCrop


6.3.28. CVI_VPSS_GetChnCrop

Description

Get VPSS ChannelCropFunctionAttribute

Syntax

CVI_S32 CVI_VPSS_GetChnCrop(VPSS_GRP VpssGrp, VPSS_CHN VpssChn, VPSS_CROP_INFO_S *pstCropInfo) 

Parameters

Parameter Name

Description

Input/Output

VpssGrp

VPSS GROUP number.

Value Range:[0, VPSS_MAX_GRP_NUM).

Input

VpssChn

VPSS Channel number

Value Range:[0, VPSS_MAX_CHN_NUM).

Input

pstCropInfo

CROP FunctionParameter.

Output

Return Value

Return Value

Description

0

Success.

Non-zero

Failure; see Error Codes.

Requirements

  • Header files: cvi_comm_vpss.h, cvi_vpss.h

  • Library files: libvpss.a

Note

  • Groupmustalready created

  • thisnumberGetisvpssOutputChannelImageCropInformation, while CVI_VPSS_GetGrpCrop GetisvpssInputImageCropInformation

Example

None

Related Topics

CVI_VPSS_SetChnCrop


6.3.29. CVI_VPSS_SetChnRotation

Description

Set VPSSChannelRotationAttribute.

Syntax

CVI_S32 CVI_VPSS_SetChnRotation(VPSS_GRP VpssGrp, VPSS_CHN VpssChn, ROTATION_E enRotation); 

Parameters

Parameter Name

Description

Input/Output

VpssGrp

VPSS GROUP number.

Value range: [0, VPSS_MAX_GRP_NUM).

Input

VpssChn

VPSS Channel number

Value range: [0, VPSS_MAX_CHN_NUM).

Input

enRotation

RotationAttribute. See ROTATION_E Description.

Input

Return Value

Return Value

Description

0

Success.

Non-zero

Failure; see Error Codes.

Requirements

  • Header files: cvi_vpss.h, cvi_comm_vpss.h

  • Library files: libvpss.a

Note

  • Before using this interface, call CVI_VPSS_SetChnAttr, otherwise, it reportsFailure.

  • This attribute can be set only after setting the channel attributes.

  • CV184xNot supported180°Rotation, 180°Rotationcanmirror+flipimplement.

  • onlySupportNV12, NV21andYUV400threeFormatRotation.

  • Rotationafter, ChannelOutputImageSizecancanoccur.
    For example1920x1080InputImage, Rotation90after, actualOutputis1088x1920.
    becauseRotationneed to64pixelsAlignment, thewithwillgenerateInvalidRegion, If afterendforconnectvooruservenc, afterendModulewillautomaticCropValidpart, If isGetChnFrame,ValidRegioninVIDEO_FRAME_SStructures16OffsetTop, s16OffsetBottom, s16OffsetLeft, s16OffsetRightspecified.

Example

None

Related Topics

None


6.3.30. CVI_VPSS_GetChnRotation

Description

Get VPSSChannelRotationAttribute.

Syntax

CVI_S32 CVI_VPSS_GetChnRotation(VPSS_GRP VpssGrp, VPSS_CHN VpssChn, ROTATION_E *penRotation); 

Parameters

Parameter Name

Description

Input/Output

VpssGrp

VPSS GROUP number.

Value range: [0, VPSS_MAX_GRP_NUM).

Input

VpssChn

VPSS Channel number

Value range: [0, VPSS_MAX_CHN_NUM).

Input

penRotation

RotationAttributePointer. OutputSee ROTATION_E Description.

Output

Return Value

Return Value

Description

0

Success.

Non-zero

Failure; see Error Codes.

Requirements

  • Header files: cvi_vpss.h, cvi_comm_vpss.h

  • Library files: libvpss.a

Note

Example

None

Related Topics

CVI_VPSS_SetChnRotation


6.3.31. CVI_VPSS_SetChnLDCAttr

Description

Set VPSSChannelLens distortion correction attributes.

Syntax

CVI_S32 CVI_VPSS_SetChnLDCAttr(VPSS_GRP VpssGrp, VPSS_CHN VpssChn, const VPSS_LDC_ATTR_S *pstLDCAttr); 

Parameters

Parameter Name

Description

Input/Output

VpssGrp

VPSS GROUP number.

Value range: [0, VPSS_MAX_GRP_NUM).

Input

VpssChn

VPSS Channel number

Value Range:[0, VPSS_MAX_CHN_NUM)

Input

pstLDCAttr

Lens distortion correction attributes.

Input

Return Value

Return Value

Description

0

Success.

Non-zero

Failure; see Error Codes.

Requirements

  • Header files: cvi_vpss.h, cvi_comm_vpss.h

  • Library files: libvpss.a

Note

  • Before using this interface, call CVI_VPSS_SetChnAttr, otherwise, it reportsFailure.

  • This attribute can be set only after setting the channel attributes.

  • onlySupportNV21andYUV400twoFormatRotation.

Example

None

Related Topics

CVI_VPSS_GetChnLDCAttr

VPSS_LDC_ATTR_S


6.3.32. CVI_VPSS_GetChnLDCAttr

Description

Get VPSSChannelLens distortion correction attributes.

Syntax

CVI_S32 CVI_VPSS_GetChnLDCAttr(VPSS_GRP VpssGrp, VPSS_CHN VpssChn, VPSS_LDC_ATTR_S *pstLDCAttr); 

Parameters

Parameter Name

Description

Input/Output

VpssGrp

VPSS GROUP number.

Value range: [0, VPSS_MAX_GRP_NUM).

Input

VpssChn

VPSS Channel number

Value Range:[0, VPSS_MAX_CHN_NUM)

Input

pstLDCAttr

Lens distortion correction attributes.

Output

Return Value

Return Value

Description

0

Success.

Non-zero

Failure; see Error Codes.

Requirements

  • Header files: cvi_vpss.h, cvi_comm_vpss.h

  • Library files: libvpss.a

Note

Example

None

Related Topics

CVI_VPSS_SetChnLDCAttr

VPSS_LDC_ATTR_S


6.3.33. CVI_VPSS_GetChnFd

Description

GetVPSSChannelforshouldDeviceFilehandle.

Syntax

CVI_S32 CVI_VPSS_GetChnFd(VPSS_GRP VpssGrp, VPSS_CHN VpssChn); 

Parameters

Parameter Name

Description

Input/Output

VpssGrp

VPSS GROUP number.

Value range: [0, VPSS_MAX_GRP_NUM).

Input

VpssChn

VPSS Channel number

Value Range:[0, VPSS_MAX_CHN_NUM)

Input

Return Value

Return Value

Description

currentlynumbervalue

Success.

currentlynumbervalue

Invalidvalue.

Requirements

  • Header files: cvi_vpss.h, cvi_comm_vpss.h

  • Library files: libvpss.a

Note

None

Example

None

Related Topics

None


6.3.34. CVI_VPSS_CloseFd

Description

CloseVPSSDeviceChannelFilehandle.

Syntax

CVI_S32 CVI_VPSS_CloseFd(CVI_VOID); 

Parameters

None

Return Value

Return Value

Description

0

Success.

Non-zero

Failure; see Error Codes.

Requirements

  • Header files: cvi_vpss.h, cvi_comm_vpss.h

  • Library files: libvpss.a

Note

thisInterfaceCallafter, VPSSother MMFInterfaceeffective.

Example

None

Related Topics

CVI_VPSS_GetChnFd


6.3.35. CVI_VPSS_AttachVbPool

Description

will VPSS Channelbind to a video bufferVBpoolin.

Syntax

CVI_S32 CVI_VPSS_AttachVbPool(VPSS_GRP VpssGrp, VPSS_CHN VpssChn, VB_POOL hVbPool); 

Parameters

Parameter Name

Description

Input/Output

VpssGrp

VPSS GROUP number.

Value range: [0, VPSS_MAX_GRP_NUM).

Input

VpssChn

VPSS Channel number

Value range: [0, VPSS_MAX_CHN_NUM).

Input

hVbPool

Video buffer VB pool information.

Input

Return Value

Return Value

Description

0

Success.

Non-zero

Failure; see Error Codes.

Requirements

  • Header files: cvi_vpss.h, cvi_comm_vpss.h

  • Library files: libvpss.a

Note

  • The group must already be created

  • Calling this function repeatedly to set the same group returns success

  • When currentgroupBindVB pooltime, only need tothenonesecondaryInterfaceCVI_VPSS_AttachVbPool

  • correctConfigurationneed toBindtoVB poolthat iscan.

  • hVbPool must be a valid pool ID for a created VB pool.

  • inCallCVI_VPSS_DetachVbPoolafter, DestroyCreateVBbefore,
    need toVBnothasbeVPSSafterendBindModuleUse,
    canthroughsleeporClearafterendModuleChannelcacheMethodfirstVB Release, thenDestroycacheVB pool.
  • VBSizeAccording toVPSSChannelOutputImagecalculate, specificcalculateformulaReference cvi_buffer.h.

Example

None

Related Topics


6.3.36. CVI_VPSS_DetachVbPool

Description

will VPSS Channelunbind from a video bufferVBunbind from the pool.

Syntax

CVI_S32 CVI_VPSS_DetachVbPool(VPSS_GRP VpssGrp, VPSS_CHN VpssChn); 

Parameters

Parameter Name

Description

Input/Output

VpssGrp

VPSS GROUP number.

Value range: [0, VPSS_MAX_GRP_NUM).

Input

VpssChn

VPSS Channel number

Value Range:[0, VPSS_MAX_CHN_NUM)

Input

Return Value

Return Value

Description

0

Success.

Non-zero

Failure; see Error Codes.

Requirements

  • Header files: cvi_vpss.h, cvi_comm_vpss.h

  • Library files: libvpss.a

Note

  • The group must already be created

Example

None

Related Topics


6.3.37. CVI_VPSS_SetChnAlign

Description

Set VPSS ChannelOutputframeWidthNumber of alignment bytes.

Syntax

CVI_S32 CVI_VPSS_SetChnAlign(VPSS_GRP VpssGrp, VPSS_CHN VpssChn,  CVI_U32 u32Align); 

Parameters

Parameter Name

Description

Input/Output

VpssGrp

VPSS GROUP number.

Value range: [0, VPSS_MAX_GRP_NUM).

Input

VpssChn

VPSS Channel number

Value range: [0, VPSS_MAX_CHN_NUM).

Input

u32Align

Number of alignment bytes.

Input

Return Value

Return Value

Description

0

Success.

Non-zero

Failure; see Error Codes.

Requirements

  • Header files: cvi_vpss.h, cvi_comm_vpss.h

  • Library files: libvpss.a

Note

  • mustinCVI_VPSS_SetChnAttrofafterCall, defaultis64 byteAlignment.

  • Setu32Align=1canmakeMemoryWidthandOutputresolutionWidthonecause.

Example

None

Related Topics

None


6.3.38. CVI_VPSS_GetChnAlign

Description

Get VPSS ChannelOutputframeWidthNumber of alignment bytes.

Syntax

CVI_S32 CVI_VPSS_GetChnAlign(VPSS_GRP VpssGrp, VPSS_CHN VpssChn,  CVI_U32 *pu32Align); 

Parameters

Parameter Name

Description

Input/Output

VpssGrp

VPSS GROUP number.

Value range: [0, VPSS_MAX_GRP_NUM).

Input

VpssChn

VPSS Channel number

Value range: [0, VPSS_MAX_CHN_NUM).

Input

pu32Align

Number of alignment bytes.

Output

Return Value

Return Value

Description

0

Success.

Non-zero

Failure; see Error Codes.

Requirements

  • Header files: cvi_vpss.h, cvi_comm_vpss.h

  • Library files: libvpss.a

Note

None

Example

None

Related Topics

None


6.3.39. CVI_VPSS_SetChnYRatio

Description

Set VPSS ChannelImageYcomponentRatio.

Syntax

CVI_S32 CVI_VPSS_SetChnYRatio(VPSS_GRP VpssGrp, VPSS_CHN VpssChn, CVI_FLOAT YRatio); 

Parameters

Parameter Name

Description

Input/Output

VpssGrp

VPSS GROUP number.

Value range: [0, VPSS_MAX_GRP_NUM).

Input

VpssChn

VPSS Channel number

Value range: [0, VPSS_MAX_CHN_NUM).

Input

YRatio

Ratio

Value Range:[0, 1].

Input

Return Value

Return Value

Description

0

Success.

Non-zero

Failure; see Error Codes.

Requirements

  • Header files: cvi_vpss.h, cvi_comm_vpss.h

  • Library files: libvpss.a

Note

  • mustinCVI_VPSS_SetChnAttrofafterCall, ChannelOutputFormatmustisYUV, defaultis100.

  • notcanandNormalize, ConvertFunctionat the same timeUse.

Example

None

Related Topics

None


6.3.40. CVI_VPSS_GetChnYRatio

Description

Get VPSS ChannelImageYcomponentRatio.

Syntax

CVI_S32 CVI_VPSS_GetChnYRatio(VPSS_GRP VpssGrp, VPSS_CHN VpssChn, CVI_FLOAT *pYRatio); 

Parameters

Parameter Name

Description

Input/Output

VpssGrp

VPSS GROUP number.

Value range: [0, VPSS_MAX_GRP_NUM).

Input

VpssChn

VPSS Channel number

Value range: [0, VPSS_MAX_CHN_NUM).

Input

YRatio

Ratio

Value Range:[0, 1].

Output

Return Value

Return Value

Description

0

Success.

Non-zero

Failure; see Error Codes.

Requirements

  • Header files: cvi_vpss.h, cvi_comm_vpss.h

  • Library files: libvpss.a

Note

None

Example

None

Related Topics

None


6.3.41. CVI_VPSS_SetChnScaleCoefLevel

Description

Set VPSS Channelimage scaling algorithm.

Syntax

CVI_S32 CVI_VPSS_SetChnScaleCoefLevel(VPSS_GRP VpssGrp, VPSS_CHN VpssChn,  VPSS_SCALE_COEF_E enCoef); 

Parameters

Parameter Name

Description

Input/Output

VpssGrp

VPSS GROUP number.

Value range: [0, VPSS_MAX_GRP_NUM).

Input

VpssChn

VPSS Channel number

Value range: [0, VPSS_MAX_CHN_NUM).

Input

enCoef

resizealgorithmEnumeration

Value Range:[0, VPSS_SCALE_COEF_MAX].

Input

Return Value

Return Value

Description

0

Success.

Non-zero

Failure; see Error Codes.

Requirements

  • Header files: cvi_vpss.h, cvi_comm_vpss.h

  • Library files: libvpss.a

Note

  • The group must already be created.

Example

None

Related Topics

None


6.3.42. CVI_VPSS_GetChnScaleCoefLevel

Description

Get VPSS Channelimage scaling algorithm.

Syntax

CVI_S32 CVI_VPSS_GetChnScaleCoefLevel(VPSS_GRP VpssGrp, VPSS_CHN VpssChn,  VPSS_SCALE_COEF_E *penCoef); 

Parameters

Parameter Name

Description

Input/Output

VpssGrp

VPSS GROUP number.

Value range: [0, VPSS_MAX_GRP_NUM).

Input

VpssChn

VPSS Channel number

Value range: [0, VPSS_MAX_CHN_NUM).

Input

penCoef

resizealgorithmEnumeration

Value Range:[0, VPSS_SCALE_COEF_MAX].

Output

Return Value

Return Value

Description

0

Success.

Non-zero

Failure; see Error Codes.

Requirements

  • Header files: cvi_vpss.h, cvi_comm_vpss.h

  • Library files: libvpss.a

Note

  • The group must already be created.

Example

None

Related Topics

None


6.3.43. CVI_VPSS_SetChnDrawRect

Description

Set VPSS ChannelframeAttribute.

Syntax

CVI_S32 CVI_VPSS_SetChnDrawRect(VPSS_GRP VpssGrp, VPSS_CHN VpssChn,  const VPSS_DRAW_RECT_S *pstDrawRect); 

Parameters

Parameter Name

Description

Input/Output

VpssGrp

VPSS GROUP number.

Value range: [0, VPSS_MAX_GRP_NUM).

Input

VpssChn

VPSS Channel number

Value range: [0, VPSS_MAX_CHN_NUM).

Input

pstDrawRect

Frame-drawing information.

Input

Return Value

Return Value

Description

0

Success.

Non-zero

Failure; see Error Codes.

Requirements

  • Header files: cvi_vpss.h, cvi_comm_vpss.h

  • Library files: libvpss.a

Note

  • The group must already be created.

Example

None

Related Topics

None


6.3.44. CVI_VPSS_GetChnDrawRect

Description

Get VPSS ChannelframeAttribute.

Syntax

CVI_S32 CVI_VPSS_GetChnDrawRect(VPSS_GRP VpssGrp, VPSS_CHN VpssChn, VPSS_DRAW_RECT_S *pstDrawRect); 

Parameters

Parameter Name

Description

Input/Output

VpssGrp

VPSS GROUP number.

Value range: [0, VPSS_MAX_GRP_NUM).

Input

VpssChn

VPSS Channel number

Value range: [0, VPSS_MAX_CHN_NUM).

Input

pstDrawRect

Frame-drawing information.

Output

Return Value

Return Value

Description

0

Success.

Non-zero

Failure; see Error Codes.

Requirements

  • Header files: cvi_vpss.h, cvi_comm_vpss.h

  • Library files: libvpss.a

Note

  • The group must already be created.

Example

None

Related Topics

None


6.3.45. CVI_VPSS_SetChnConvert

Description

Set VPSS ChannelImageDataConversionParameter.

Syntax

CVI_S32 CVI_VPSS_SetChnConvert(VPSS_GRP VpssGrp, VPSS_CHN VpssChn, const VPSS_CONVERT_S *pstConvert); 

Parameters

Parameter Name

Description

Input/Output

VpssGrp

VPSS GROUP number.

Value range: [0, VPSS_MAX_GRP_NUM).

Input

VpssChn

VPSS Channel number

Value range: [0, VPSS_MAX_CHN_NUM).

Input

pstConvert

ConversionParameter.

Input

Return Value

Return Value

Description

0

Success.

Non-zero

Failure; see Error Codes.

Requirements

  • Header files: cvi_vpss.h, cvi_comm_vpss.h

  • Library files: libvpss.a

Note

  • The group must already be created.

Example

None

Related Topics

None


6.3.46. CVI_VPSS_GetChnConvert

Description

Get VPSS ChannelImageDataConversionParameter.

Syntax

CVI_S32 CVI_VPSS_GetChnConvert(VPSS_GRP VpssGrp, VPSS_CHN VpssChn, VPSS_CONVERT_S *pstConvert); 

Parameters

Parameter Name

Description

Input/Output

VpssGrp

VPSS GROUP number.

Value range: [0, VPSS_MAX_GRP_NUM).

Input

VpssChn

VPSS Channel number

Value range: [0, VPSS_MAX_CHN_NUM).

Input

pstConvert

ConversionParameter.

Output

Return Value

Return Value

Description

0

Success.

Non-zero

Failure; see Error Codes.

Requirements

  • Header files: cvi_vpss.h, cvi_comm_vpss.h

  • Library files: libvpss.a

Note

  • The group must already be created.

Example

None

Related Topics

None


6.3.47. CVI_VPSS_SetChnBufWrapAttr

Description

Setlow-latency bufferingAttribute.

Syntax

CVI_S32 CVI_VPSS_SetChnBufWrapAttr(VPSS_GRP VpssGrp, VPSS_CHN VpssChn, const VPSS_CHN_BUF_WRAP_S *pstVpssChnBufWrap); 

Parameters

Parameter Name

Description

Input/Output

VpssGrp

VPSS GROUP number.

Value range: [0, VPSS_MAX_GRP_NUM).

Input

VpssChn

VPSS Channel number

Value Range:[0, VPSS_MAX_CHN_NUM)

Input

pstVpssChnBufWrap

ChannelbufferbufferingAttribute Structurebody.

Input

Return Value

Return Value

Description

0

Success.

Non-zero

Failure; see Error Codes.

Requirements

  • Header files: cvi_vpss.h, cvi_comm_vpss.h

  • Library files: libvpss.a

Note

  • The group must already be created

  • ChannelEnableStatusunderNot supported.

  • mustinalreadySetChannel attributesbeforeprovideundercanSetthisInterface.

  • Not supportedsemi-planar422 Image, Not supportedFlip.

  • Channellow-latency bufferingEnabletime, ChannelGet, Brightness, Rotation, CoverEx, OverlayEx, arbitraryangleRotation, LDCwillInvalid

  • inlow-latency bufferingChannelEncodingsceneunder, EncodingNot supportedsoftwareFrame.

Example

None

Related Topics


6.3.48. CVI_VPSS_GetChnBufWrapAttr

Description

Getlow-latency bufferingAttribute.

Syntax

CVI_S32 CVI_VPSS_GetChnBufWrapAttr(VPSS_GRP VpssGrp, VPSS_CHN VpssChn, VPSS_CHN_BUF_WRAP_S *pstVpssChnBufWrap); 

Parameters

Parameter Name

Description

Input/Output

VpssGrp

VPSS GROUP number.

Value range: [0, VPSS_MAX_GRP_NUM).

Input

VpssChn

VPSS Channel number

Value range: [0, VPSS_MAX_CHN_NUM).

Input

pstVpssChnBufWrap

ChannelbufferbufferingAttribute Structurebody.

Output

Return Value

Return Value

Description

0

Success.

Non-zero

Failure; see Error Codes.

Requirements

  • Header files: cvi_vpss.h, cvi_comm_vpss.h

  • Library files: libvpss.a

Note

  • The group must already be created

Example

None

Related Topics


6.3.49. CVI_VPSS_GetWrapBufferSize

Description

Getlow-latency bufferingrequiredcacheSize.

Syntax

CVI_U32 CVI_VPSS_GetWrapBufferSize(CVI_U32 u32Width, CVI_U32 u32Height, PIXEL_FORMAT_E enPixelFormat, CVI_U32 u32BufLine, CVI_U32 u32BufDepth); 

Parameters

Parameter Name

Description

Input/Output

u32Width

ImageWidth

Input

u32Height

ImageHeight

Input

enPixelFormat

ImagePixel format

Input

u32BufLine

singleitembufferingcachelinenumber

Input

u32BufDepth

bufferingcacheCount

Input

Return Value

Return Value

Description

0

Success.

Non-zero

Failure; see Error Codes.

Requirements

  • Header files: cvi_vpss.h, cvi_comm_vpss.h

  • Library files: libvpss.a

Note

None

Example

None

Related Topics

None


6.3.50. CVI_VPSS_ShowChn

Description

DisplayVPSS ChannelImage.

Syntax

CVI_S32 CVI_VPSS_ShowChn(VPSS_GRP VpssGrp, VPSS_CHN VpssChn); 

Parameters

Parameter Name

Description

Input/Output

VpssGrp

VPSS GROUP number.

Value range: [0, VPSS_MAX_GRP_NUM).

Input

VpssChn

VPSS Channel number

Value range: [0, VPSS_MAX_CHN_NUM).

Input

Return Value

Return Value

Description

0

Success.

Non-zero

Failure; see Error Codes.

Requirements

  • Header files: cvi_vpss.h, cvi_comm_vpss.h

  • Library files: libvpss.a

Note

  • The group must already be created.

Example

None

Related Topics

None


6.3.51. CVI_VPSS_HideChn

Description

hideVPSS ChannelImage.

Syntax

CVI_S32 CVI_VPSS_HideChn(VPSS_GRP VpssGrp, VPSS_CHN VpssChn); 

Parameters

Parameter Name

Description

Input/Output

VpssGrp

VPSS GROUP number.

Value range: [0, VPSS_MAX_GRP_NUM).

Input

VpssChn

VPSS Channel number

Value range: [0, VPSS_MAX_CHN_NUM).

Input

Return Value

Return Value

Description

0

Success.

Non-zero

Failure; see Error Codes.

Requirements

  • Header files: cvi_vpss.h, cvi_comm_vpss.h

  • Library files: libvpss.a

Note

  • The group must already be created, CallthisInterfaceafterImagefull.

Example

None

Related Topics

None


6.3.52. CVI_VPSS_Suspend

Description

vpss, onlydualsystemSDKSupport.

Syntax

CVI_S32 CVI_VPSS_Suspend(void); 

Parameters

None

Return Value

Return Value

Description

0

Success.

Non-zero

Failure; see Error Codes.

Requirements

  • Header files: cvi_comm_vpss.h, cvi_vpss.h

  • Library files: libvpss.a

Note

None

Example

None

Related Topics


6.3.53. CVI_VPSS_Resume

Description

vpss, onlydualsystemSDKSupport.

Syntax

CVI_S32 CVI_VPSS_Resume(void); 

Parameters

None

Return Value

Return Value

Description

0

Success.

Non-zero

Failure; see Error Codes.

Requirements

  • Header files: cvi_comm_vpss.h, cvi_vpss.h

  • Library files: libvpss.a

Note

None

Example

None

Related Topics