PDK API Guide for J721E
VISS Interface

Introduction

Interface file for VISS M2M FVID2 driver

Files

file  vhwa_m2mViss.h
 Defines the structures / control operations that could be used to configure / control VISS M2M driver.
 

Data Structures

struct  Vhwa_M2mVissInitParams
 Init Parameters for VISS M2M Driver. More...
 
struct  Vhwa_M2mVissCreateArgs
 
struct  Vhwa_M2mVissSl2Params
 
struct  Vhwa_M2mVissOutputParams
 
struct  Vhwa_M2mVissParams
 Connfiguration parameters of VISS. More...
 
struct  Vhwa_M2mVissConfigAppBuff
 

Functions

static void Vhwa_m2mVissInitParamsInit (Vhwa_M2mVissInitParams *prms)
 This function should be used to initialize variable of type Vhwa_M2mVissInitParams. More...
 
static void Vhwa_m2mVissCreateArgsInit (Vhwa_M2mVissCreateArgs *prms)
 This function should be used to initialize variable of type Vhwa_M2mVissCreateArgs. More...
 
static void Vhwa_m2mVissParamsInit (Vhwa_M2mVissParams *prms)
 This function should be used to initialize variable of type Vhwa_M2mVissParams. More...
 
static void Vhwa_m2mVissSl2ParamsInit (Vhwa_M2mVissSl2Params *prms)
 This function should be used to initialize variable of type Vhwa_M2mVissSl2Params. More...
 
int32_t Vhwa_m2mVissInit (Vhwa_M2mVissInitParams *initPrms)
 Function to initialize VISS with provided init parameters. More...
 
void Vhwa_m2mVissDeInit (void)
 Function to deinitialize, cleans up the internal data structures. More...
 
int32_t Vhwa_m2mVissAllocSl2 (const Vhwa_M2mVissSl2Params *sl2AllocPrms)
 Function to allocate Sl2 memory for the output buffers. More...
 
void Vhwa_m2mVissFreeSl2 (void)
 Function to free allocated SL2. More...
 

Macros

#define VHWA_M2M_VISS_DRV_INST0   (0U)
 VISS Driver Instance ID. More...
 
#define VHWA_M2M_VISS_DRV_MAX_INST   (1U)
 Maximum VISS driver Instances. More...
 
#define VHWA_M2M_VISS_MAX_HANDLES   (8u)
 Max Number of handles supported by VISS M2M Driver. More...
 
#define VHWA_M2M_VISS_INPUT_IDX0   (0U)
 
#define VHWA_M2M_VISS_INPUT_IDX1   (1U)
 
#define VHWA_M2M_VISS_INPUT_IDX2   (2U)
 
#define VHWA_M2M_VISS_MAX_INPUTS   (3U)
 

Ioctls for the VISS memory to memory driver

Input/Output control MACRO's for VISS memory to memory module

#define IOCTL_VHWA_M2M_VISS_SET_PARAMS   (VHWA_IOCTL_M2M_VISS_IOCTL_BASE)
 IOCTL for setting VISS configuration. This IOCTL is used to select the number input, outputs and any internal path related configuration, it has flags to enable/disable, which alters blanking requirement. It is not used for confiugring individual VISS sub-modules. Typically used just after the create to select inputs, outputs and paths. Refer to Vhwa_M2mVissParams. More...
 
#define IOCTL_VHWA_M2M_VISS_REGISTER_ERR_CB
 IOCTL for enabling error events and registering callbacks for the same. Refer to Ldc_ErrEventParams. More...
 
#define IOCTL_VHWA_M2M_VISS_SET_HTS_LIMIT
 IOCTL for enabling and setting HTS limiter. This is used to slowed down the HTS by introducing clock cycles between internal start signals. Refer to Vhwa_HtsLimiter. More...
 
#define IOCTL_VHWA_M2M_VISS_SYNC_START
 IOCTL to sync start each module This IOCTL doesn't configure any register and only enable pipeline to start processing. More...
 
#define IOCTL_VHWA_M2M_VISS_GET_PERFORMANCE
 IOCTL for getting module's performance numbers for the last frame submitted. More...
 
#define IOCTL_VHWA_M2M_VISS_GET_BUFF_INFO
 Get Config UDMA buffer information. More...
 
#define IOCTL_VHWA_M2M_VISS_SET_BUFF_INFO
 Set Config UDMA buffer information. More...
 
#define VHWA_M2M_VISS_OUT_YUV420_12B_IDX   (0U)
 
#define VHWA_M2M_VISS_OUT_GREY_12B_IDX   (0U)
 
#define VHWA_M2M_VISS_OUT_COLOR_12B_IDX   (0U)
 
#define VHWA_M2M_VISS_OUT_LUMA_12B_IDX   (0U)
 
#define VHWA_M2M_VISS_OUT_YUV422_12B_IDX   (0U)
 
#define VHWA_M2M_VISS_OUT_CFA_C1_12B_IDX   (1U)
 
#define VHWA_M2M_VISS_OUT_CHROMA_12B_IDX   (1U)
 
#define VHWA_M2M_VISS_OUT_YUV420_8B_IDX   (2U)
 
#define VHWA_M2M_VISS_OUT_YUV422_8B_IDX   (2U)
 
#define VHWA_M2M_VISS_OUT_RGB888_8B_IDX   (2U)
 
#define VHWA_M2M_VISS_OUT_GREY_8B_IDX   (2U)
 
#define VHWA_M2M_VISS_OUT_COLOR_8B_IDX   (2U)
 
#define VHWA_M2M_VISS_OUT_CFA_C2_12B_IDX   (2U)
 
#define VHWA_M2M_VISS_OUT_LUMA_8B_IDX   (2U)
 
#define VHWA_M2M_VISS_OUT_RED_8B_IDX   (2U)
 
#define VHWA_M2M_VISS_OUT_CFA_C3_12B_IDX   (3U)
 
#define VHWA_M2M_VISS_OUT_CHROMA_8B_IDX   (3U)
 
#define VHWA_M2M_VISS_OUT_GREEN_8B_IDX   (3U)
 
#define VHWA_M2M_VISS_OUT_SATURA_8B_IDX   (4U)
 
#define VHWA_M2M_VISS_OUT_CFA_C4_12B_IDX   (4U)
 
#define VHWA_M2M_VISS_OUT_BLUE_8B_IDX   (4U)
 
#define VHWA_M2M_VISS_OUT_H3A_IDX   (5U)
 
#define VHWA_M2M_VISS_MAX_OUTPUTS   (6U)
 

VISS input mode

Decides the number of input channels required, essentially decides the merge mode.

Caution: This macro values are used for internal calculations.

#define VHWA_M2M_VISS_MODE_SINGLE_FRAME_INPUT   (1U)
 
#define VHWA_M2M_VISS_MODE_TWO_FRAME_MERGE   (2U)
 
#define VHWA_M2M_VISS_MODE_THREE_FRAME_MERGE   (3U)
 
#define VHWA_M2M_VISS_MODE_MAX   (4U)
 

LDC Luma Interpolation type

Enum to define Luma interpolation type. For all other components, i.e. chroma or bayer, bilinear interpolation is used.

#define VHWA_M2M_VISS_EE_DISABLE   (0x0U)
 
#define VHWA_M2M_VISS_EE_ON_LUMA12   (0x1U)
 
#define VHWA_M2M_VISS_EE_ON_LUMA8   (0x2U)
 
#define VHWA_M2M_VISS_EE_MAX   (0xFFFFU)
 

Macro Definition Documentation

◆ IOCTL_VHWA_M2M_VISS_SET_PARAMS

#define IOCTL_VHWA_M2M_VISS_SET_PARAMS   (VHWA_IOCTL_M2M_VISS_IOCTL_BASE)

IOCTL for setting VISS configuration. This IOCTL is used to select the number input, outputs and any internal path related configuration, it has flags to enable/disable, which alters blanking requirement. It is not used for confiugring individual VISS sub-modules. Typically used just after the create to select inputs, outputs and paths. Refer to Vhwa_M2mVissParams.

Returns
FVID2_SOK on success, else error code.

◆ IOCTL_VHWA_M2M_VISS_REGISTER_ERR_CB

#define IOCTL_VHWA_M2M_VISS_REGISTER_ERR_CB
Value:
( \
IOCTL_VHWA_M2M_VISS_SET_PARAMS + 1U)

IOCTL for enabling error events and registering callbacks for the same. Refer to Ldc_ErrEventParams.

Returns
FVID2_SOK on success, else error code.

◆ IOCTL_VHWA_M2M_VISS_SET_HTS_LIMIT

#define IOCTL_VHWA_M2M_VISS_SET_HTS_LIMIT
Value:
( \
IOCTL_VHWA_M2M_VISS_REGISTER_ERR_CB + 1U)

IOCTL for enabling and setting HTS limiter. This is used to slowed down the HTS by introducing clock cycles between internal start signals. Refer to Vhwa_HtsLimiter.

Returns
FVID2_SOK on success, else error code.

◆ IOCTL_VHWA_M2M_VISS_SYNC_START

#define IOCTL_VHWA_M2M_VISS_SYNC_START
Value:
( \
IOCTL_VHWA_M2M_VISS_SET_HTS_LIMIT + 1U)

IOCTL to sync start each module This IOCTL doesn't configure any register and only enable pipeline to start processing.

Returns
FVID2_SOK on success, else error code.

◆ IOCTL_VHWA_M2M_VISS_GET_PERFORMANCE

#define IOCTL_VHWA_M2M_VISS_GET_PERFORMANCE
Value:
( \
IOCTL_VHWA_M2M_VISS_SYNC_START + 1U)

IOCTL for getting module's performance numbers for the last frame submitted.

Returns
FVID2_SOK on success, else error code.

◆ IOCTL_VHWA_M2M_VISS_GET_BUFF_INFO

#define IOCTL_VHWA_M2M_VISS_GET_BUFF_INFO
Value:
( \
IOCTL_VHWA_M2M_VISS_GET_PERFORMANCE + 1U)

Get Config UDMA buffer information.

Returns
FVID2_SOK on success, else error code.

◆ IOCTL_VHWA_M2M_VISS_SET_BUFF_INFO

#define IOCTL_VHWA_M2M_VISS_SET_BUFF_INFO
Value:
( \
IOCTL_VHWA_M2M_VISS_GET_BUFF_INFO + 1U)

Set Config UDMA buffer information.

Returns
FVID2_SOK on success, else error code.

◆ VHWA_M2M_VISS_DRV_INST0

#define VHWA_M2M_VISS_DRV_INST0   (0U)

VISS Driver Instance ID.

◆ VHWA_M2M_VISS_DRV_MAX_INST

#define VHWA_M2M_VISS_DRV_MAX_INST   (1U)

Maximum VISS driver Instances.

◆ VHWA_M2M_VISS_MAX_HANDLES

#define VHWA_M2M_VISS_MAX_HANDLES   (8u)

Max Number of handles supported by VISS M2M Driver.

◆ VHWA_M2M_VISS_INPUT_IDX0

#define VHWA_M2M_VISS_INPUT_IDX0   (0U)

◆ VHWA_M2M_VISS_INPUT_IDX1

#define VHWA_M2M_VISS_INPUT_IDX1   (1U)

◆ VHWA_M2M_VISS_INPUT_IDX2

#define VHWA_M2M_VISS_INPUT_IDX2   (2U)

◆ VHWA_M2M_VISS_MAX_INPUTS

#define VHWA_M2M_VISS_MAX_INPUTS   (3U)

◆ VHWA_M2M_VISS_OUT_YUV420_12B_IDX

#define VHWA_M2M_VISS_OUT_YUV420_12B_IDX   (0U)

◆ VHWA_M2M_VISS_OUT_GREY_12B_IDX

#define VHWA_M2M_VISS_OUT_GREY_12B_IDX   (0U)

◆ VHWA_M2M_VISS_OUT_COLOR_12B_IDX

#define VHWA_M2M_VISS_OUT_COLOR_12B_IDX   (0U)

◆ VHWA_M2M_VISS_OUT_LUMA_12B_IDX

#define VHWA_M2M_VISS_OUT_LUMA_12B_IDX   (0U)

◆ VHWA_M2M_VISS_OUT_YUV422_12B_IDX

#define VHWA_M2M_VISS_OUT_YUV422_12B_IDX   (0U)

◆ VHWA_M2M_VISS_OUT_CFA_C1_12B_IDX

#define VHWA_M2M_VISS_OUT_CFA_C1_12B_IDX   (1U)

◆ VHWA_M2M_VISS_OUT_CHROMA_12B_IDX

#define VHWA_M2M_VISS_OUT_CHROMA_12B_IDX   (1U)

◆ VHWA_M2M_VISS_OUT_YUV420_8B_IDX

#define VHWA_M2M_VISS_OUT_YUV420_8B_IDX   (2U)

◆ VHWA_M2M_VISS_OUT_YUV422_8B_IDX

#define VHWA_M2M_VISS_OUT_YUV422_8B_IDX   (2U)

◆ VHWA_M2M_VISS_OUT_RGB888_8B_IDX

#define VHWA_M2M_VISS_OUT_RGB888_8B_IDX   (2U)

◆ VHWA_M2M_VISS_OUT_GREY_8B_IDX

#define VHWA_M2M_VISS_OUT_GREY_8B_IDX   (2U)

◆ VHWA_M2M_VISS_OUT_COLOR_8B_IDX

#define VHWA_M2M_VISS_OUT_COLOR_8B_IDX   (2U)

◆ VHWA_M2M_VISS_OUT_CFA_C2_12B_IDX

#define VHWA_M2M_VISS_OUT_CFA_C2_12B_IDX   (2U)

◆ VHWA_M2M_VISS_OUT_LUMA_8B_IDX

#define VHWA_M2M_VISS_OUT_LUMA_8B_IDX   (2U)

◆ VHWA_M2M_VISS_OUT_RED_8B_IDX

#define VHWA_M2M_VISS_OUT_RED_8B_IDX   (2U)

◆ VHWA_M2M_VISS_OUT_CFA_C3_12B_IDX

#define VHWA_M2M_VISS_OUT_CFA_C3_12B_IDX   (3U)

◆ VHWA_M2M_VISS_OUT_CHROMA_8B_IDX

#define VHWA_M2M_VISS_OUT_CHROMA_8B_IDX   (3U)

◆ VHWA_M2M_VISS_OUT_GREEN_8B_IDX

#define VHWA_M2M_VISS_OUT_GREEN_8B_IDX   (3U)

◆ VHWA_M2M_VISS_OUT_SATURA_8B_IDX

#define VHWA_M2M_VISS_OUT_SATURA_8B_IDX   (4U)

◆ VHWA_M2M_VISS_OUT_CFA_C4_12B_IDX

#define VHWA_M2M_VISS_OUT_CFA_C4_12B_IDX   (4U)

◆ VHWA_M2M_VISS_OUT_BLUE_8B_IDX

#define VHWA_M2M_VISS_OUT_BLUE_8B_IDX   (4U)

◆ VHWA_M2M_VISS_OUT_H3A_IDX

#define VHWA_M2M_VISS_OUT_H3A_IDX   (5U)

◆ VHWA_M2M_VISS_MAX_OUTPUTS

#define VHWA_M2M_VISS_MAX_OUTPUTS   (6U)

◆ VHWA_M2M_VISS_MODE_SINGLE_FRAME_INPUT

#define VHWA_M2M_VISS_MODE_SINGLE_FRAME_INPUT   (1U)

< VISS Single Frame Input Mode VISS Two Frame Merge Mode

◆ VHWA_M2M_VISS_MODE_TWO_FRAME_MERGE

#define VHWA_M2M_VISS_MODE_TWO_FRAME_MERGE   (2U)

VISS Three Frame Merge Mode

◆ VHWA_M2M_VISS_MODE_THREE_FRAME_MERGE

#define VHWA_M2M_VISS_MODE_THREE_FRAME_MERGE   (3U)

Max VISS Mode

◆ VHWA_M2M_VISS_MODE_MAX

#define VHWA_M2M_VISS_MODE_MAX   (4U)

◆ VHWA_M2M_VISS_EE_DISABLE

#define VHWA_M2M_VISS_EE_DISABLE   (0x0U)

< Edge Enhancer is disabled Edge Enhancer is enabled on Luma12 bit output for HV

◆ VHWA_M2M_VISS_EE_ON_LUMA12

#define VHWA_M2M_VISS_EE_ON_LUMA12   (0x1U)

Edge Enhancer is enabled on Luma8 bit output for HV

◆ VHWA_M2M_VISS_EE_ON_LUMA8

#define VHWA_M2M_VISS_EE_ON_LUMA8   (0x2U)

Max value, used for error checking

◆ VHWA_M2M_VISS_EE_MAX

#define VHWA_M2M_VISS_EE_MAX   (0xFFFFU)

Function Documentation

◆ Vhwa_m2mVissInitParamsInit()

static void Vhwa_m2mVissInitParamsInit ( Vhwa_M2mVissInitParams prms)
inlinestatic

This function should be used to initialize variable of type Vhwa_M2mVissInitParams.

Parameters
prmsA pointer of type Vhwa_M2mVissInitParams
Returns
None

◆ Vhwa_m2mVissCreateArgsInit()

static void Vhwa_m2mVissCreateArgsInit ( Vhwa_M2mVissCreateArgs prms)
inlinestatic

This function should be used to initialize variable of type Vhwa_M2mVissCreateArgs.

Parameters
prmsA pointer of type Vhwa_M2mVissCreateArgs
Returns
None

◆ Vhwa_m2mVissParamsInit()

static void Vhwa_m2mVissParamsInit ( Vhwa_M2mVissParams prms)
inlinestatic

This function should be used to initialize variable of type Vhwa_M2mVissParams.

Parameters
prmsA pointer of type Vhwa_M2mVissParams
Returns
None

◆ Vhwa_m2mVissSl2ParamsInit()

static void Vhwa_m2mVissSl2ParamsInit ( Vhwa_M2mVissSl2Params prms)
inlinestatic

This function should be used to initialize variable of type Vhwa_M2mVissSl2Params.

Parameters
prmsA pointer of type Vhwa_M2mVissSl2Params
Returns
None

◆ Vhwa_m2mVissInit()

int32_t Vhwa_m2mVissInit ( Vhwa_M2mVissInitParams initPrms)

Function to initialize VISS with provided init parameters.

Parameters
initPrmsInit Parameters containing base address and utc channel parameters This parameter should not be 0.
Returns
Returns 0 on success else returns error value

◆ Vhwa_m2mVissDeInit()

void Vhwa_m2mVissDeInit ( void  )

Function to deinitialize, cleans up the internal data structures.

◆ Vhwa_m2mVissAllocSl2()

int32_t Vhwa_m2mVissAllocSl2 ( const Vhwa_M2mVissSl2Params sl2AllocPrms)

Function to allocate Sl2 memory for the output buffers.

Parameters
sl2AllocPrmsPointer to a Vhwa_M2mVissSl2Params structure containing the SL2 allocation parameters
Returns
FVID2_SOK if successful, else suitable error code

◆ Vhwa_m2mVissFreeSl2()

void Vhwa_m2mVissFreeSl2 ( void  )

Function to free allocated SL2.