34. CSC

34.1. Functional Description

thefunctionprovidecolordomainconversionwhen onesomerelatedimagequalitysettings, throughsettingshue, luma, saturation, contrast, colordomainconversionstandardrulerangetype, enterandaffectsimage effect, andno need toknowknowconversionmatrix calculateprocess, whenthenalsocanmakeusepersondirectthroughsettingsconversionmatrix coeffandoffset, enterandaffectsimagequalityeffect

34.2. API Reference

34.2.1. CVI_ISP_SetCSCAttr

[Description]

SetCSCattribute parameters

[Syntax]

CVI_S32 CVI_ISP_SetCSCAttr(VI_PIPE ViPipe, const ISP_CSC_ATTR_S *pstCSCAttr);

[Parameters]

Parameter Name

Description

Input/Output

ViPipe

VI_PIPE No.

Input

pstCSCAttr

CSCattribute parameters

Input

[Return Value]

Return Value

Description

0

Success

Non-zero

Failure, whose value is Error Code.

[Requirements]

  • Header File: cvi_isp.h, cvi_comm_isp.h

  • Library File: libisp.so

[Note]

None

[Example]

VI_PIPE ViPipe = 0;
ISP_CSC_ATTR_S stAttr;
CVI_ISP_GetCSCAttr(ViPipe, &stAttr);
stAttr.enOpType = OP_TYPE_AUTO;
CVI_ISP_SetCSCAttr(ViPipe, &stAttr);

[Related Topics]

34.2.2. CVI_ISP_GetCSCAttr

[Description]

GetCSCattribute parameters

[Syntax]

CVI_S32 CVI_ISP_GetCSCAttr(VI_PIPE ViPipe, ISP_CSC_ATTR_S *pstCSCAttr);

[Parameters]

Parameter Name

Description

Input/Output

ViPipe

VI_PIPE No.

Input

pstCSCAttr

CSCattribute parameters

output

[Return Value]

Return Value

Description

0

Success

Non-zero

Failure, whose value is Error Code.

[Requirements]

  • Header File: cvi_isp.h, cvi_comm_isp.h

  • Library File: libisp.so

[Note]

None

[Example]

None

[Related Topics]

34.3. Data Types

34.3.1. ISP_CSC_ATTR_S

[Description]

Define CSCattribute parameters

[Definition]

typedef struct _ISP_CSC_ATTR_S {
        CVI_BOOL Enable; /*Rw; Range:[0, 1]*/
        ISP_CSC_COLORGAMUT enColorGamut;
        CVI_U8 UpdateInterval; /*Rw; Range:[0, 255]*/
        CVI_U8 Hue; /*Rw; Range:[0, 100]*/
        CVI_U8 Luma; /*Rw; Range:[0, 100]*/
        CVI_U8 Contrast; /*Rw; Range:[0, 100]*/
        CVI_U8 Saturation; /*Rw; Range:[0, 100]*/
        ISP_CSC_MATRX_S stUserMatrx;
} ISP_CSC_ATTR_S;

[Members]

Member Name

Description

Enable

module enable switch

Value Range: [0, 1]

Data Types: CVI_BOOL

enColorGamut

colordomainconversiontypeselect

0: ISP_CSC_COLORGAMUT_BT601

1: ISP_CSC_COLORGAMUT_BT709

2: ISP_CSC_COLORGAMUT_BT2020

3: ISP_CSC_COLORGAMUT_USER

Data Types: ISP_CSC_COLORGAMUT

UpdateInterval

affects the parameter update interval,the larger the value, the slower the image changes,the better the performance.

Value Range: [0, 255]

Data Types: CVI_U8

Hue

Adjustchrominance

Value Range: [0, 100]

Data Types: CVI_U8

Luma

Adjustbrightness

Value Range: [0, 100]

Data Types: CVI_U8

Contrast

Adjustforratiodegree

Value Range: [0, 100]

Data Types: CVI_U8

Saturation

Adjustsaturation

Value Range: [0, 100]

Data Types: CVI_U8

stUserMatrx

customcolordomainconversionmatrix

Data Types: ISP_CSC_MATRX_S

[Precautions]

None

[Related Data Types and Interfaces]

34.3.2. ISP_CSC_MATRX_S

[Description]

Define customconversionmatrix

[Definition]

typedef struct _ISP_CSC_MATRX_S {
        CVI_S16 userCscCoef[CSC_MATRIX_SIZE]; /*Rw; Range:[-8192, 8191]*/
        CVI_S16 userCscOffset[CSC_OFFSET_SIZE]; /*Rw; Range:[-256, 255]*/
} ISP_CSC_MATRX_S;

[Members]

Member Name

Description

userCscCoef

3*3color gamut conversion matrix coefficients

Value Range: [-8192, 8191]

Data Types: CVI_S16

userCscOffset

outputoffset

Value Range: [-256, 255]

Data Types: CVI_S16

[Precautions]

None

[Related Data Types and Interfaces]