PDK API Guide for J721E
MSC Configuration

Introduction

This is MSC Configuration file

Files

file  msc_cfg.h
 Defines the structures / control operations that could be used to configure / control MSC module.
 

Data Structures

struct  Msc_ScConfig
 Individual Scalar configuration. More...
 
struct  Msc_Config
 Structure for complete MSC Configuration. More...
 
struct  Msc_ErrEventParams
 Structure for error event parameters Used to register callback for the given set of events. More...
 
struct  Msc_Coeff
 Structure used for setting scalar coefficients. More...
 

Functions

static void Msc_configInit (Msc_Config *mscCfg)
 This function should be used to initialize variable of type Msc_Config. More...
 
static void Msc_coeffInit (Msc_Coeff *coeffCfg)
 This function should be used to initialize variable of type Msc_Coeff. More...
 
static void Msc_ConfigInit (Msc_Config *mscCfg)
 

Typedefs

typedef void(* Msc_ErrEventCbFxn) (Fvid2_Handle handle, uint32_t errEvents, void *appData)
 Prototype for the Error Event for MSC. The callback for the MSC error events can be registered using Msc_ErrEventParams. One of the parameter in this is call back. Driver calls this callback when error occurs. More...
 

Macros

#define MSC_MAX_OUTPUT   (10U)
 Maximum number of scalar output supported in MSC. More...
 
#define MSC_MAX_TAP   (5U)
 Maximum number of filter tap supported in the scalar. More...
 
#define MSC_MAX_SP_COEFF_SET   (2U)
 Maximum number of single phase coefficients set. More...
 
#define MSC_MAX_MP_COEFF_SET   (4U)
 Maximum number of Multi phase coefficients set. More...
 

MSC Instance Id's

There are two parallel threads/instances of MSC supported in HW This instances id is used to select the instance/thread of the MSC

#define VPAC_MSC_INST_ID_0   (0U)
 MSC Instance/Thread ID 0. More...
 
#define VPAC_MSC_INST_ID_1   (1U)
 MSC Instance/Thread ID 1. More...
 
#define VHWA_M2M_MSC_MAX_INST   (2U)
 Maximum supported instance for MSC. More...
 

MSC Coefficient shifts

Macros for selecting coefficient shift amount The scalar uses 10bit signed filter coefficient. The precision of these coefficients can be changed by selecting number of bits for integer and fraction portion in the coefficients. This enum is used for configuring the precision of the 10-bit signed filter coefficients by selecting the amount of coefficient shift.

#define MSC_COEFF_SHIFT_5   (5U)
 Coefficient shift by 5bits, 5bit fraction. More...
 
#define MSC_COEFF_SHIFT_6   (6U)
 Coefficient shift by 6bits, 6bit fraction. More...
 
#define MSC_COEFF_SHIFT_7   (7U)
 Coefficient shift by 7bits, 7bit fraction. More...
 
#define MSC_COEFF_SHIFT_8   (8U)
 Coefficient shift by 8bits, 8bit fraction. More...
 
#define MSC_COEFF_SHIFT_9   (9U)
 Coefficient shift by 9bits, 9bit fraction. More...
 

MSC Multiphase Coefficient select

Macros for selecting coefficient set for multiphase operation There are four sets for 5tap/32-phase coefficient set. This enum is used for selecting coefficient set for each scalar.

For 5tap/64-phase filter mode, only coefficients set 0 and 2 are used.

#define MSC_MULTI_32PHASE_COEFF_SET_0   (0U)
 Coefficient Set 0 for 32phase coefficients. More...
 
#define MSC_MULTI_32PHASE_COEFF_SET_1   (1U)
 Coefficient Set 1 for 32phase coefficients. More...
 
#define MSC_MULTI_32PHASE_COEFF_SET_2   (2U)
 Coefficient Set 2 for 32phase coefficients. More...
 
#define MSC_MULTI_32PHASE_COEFF_SET_3   (3U)
 Coefficient Set 3 for 32phase coefficients. More...
 
#define MSC_MULTI_64PHASE_COEFF_SET_0   (0U)
 Coefficient Set 0 for 64phase coefficients. More...
 
#define MSC_MULTI_64PHASE_COEFF_SET_2   (2U)
 Coefficient Set 2 for 64phase coefficients. More...
 

MSC Tap select

Macros for selecting number of taps Scalar can be configured to use either 3tap,4tap or 5tap filter. This is used in the scalar input. Unused coefficients should be set to 0.

#define MSC_TAP_SEL_3TAPS   (0U)
 Selects the three tap filter. More...
 
#define MSC_TAP_SEL_4TAPS   (1U)
 Selects the 4 tap filter. More...
 
#define MSC_TAP_SEL_5TAPS   (2U)
 Selects the 5 tap filter. More...
 

MSC Single Phase Coefficient select

Enum for selecting coefficients set for single phase operation. There are two dedicated single phase coefficients. In addition to this, one of the entry from 5tap/32phase coefficient set 0 can be used for single phase coefficients.

#define MSC_SINGLE_PHASE_SP_COEFF_0   (0U)
 Use Dedicated Single phase coef-0. More...
 
#define MSC_SINGLE_PHASE_SP_COEFF_1   (1U)
 Use Dedicated Single phase coef-1. More...
 
#define MSC_SINGLE_PHASE_MP_COEFF0_0   (2U)
 Use 0th entry of multiphase coefficient. More...
 
#define MSC_SINGLE_PHASE_MP_COEFF0_1   (3U)
 Use 1th entry of multiphase coefficient. More...
 
#define MSC_SINGLE_PHASE_MP_COEFF0_2   (4U)
 Use 2th entry of multiphase coefficient. More...
 
#define MSC_SINGLE_PHASE_MP_COEFF0_3   (5U)
 Use 3th entry of multiphase coefficient. More...
 
#define MSC_SINGLE_PHASE_MP_COEFF0_4   (6U)
 Use 4th entry of multiphase coefficient. More...
 
#define MSC_SINGLE_PHASE_MP_COEFF0_5   (7U)
 Use 5th entry of multiphase coefficient. More...
 
#define MSC_SINGLE_PHASE_MP_COEFF0_6   (8U)
 Use 6th entry of multiphase coefficient. More...
 
#define MSC_SINGLE_PHASE_MP_COEFF0_7   (9U)
 Use 7th entry of multiphase coefficient. More...
 
#define MSC_SINGLE_PHASE_MP_COEFF0_8   (10U)
 Use 8th entry of multiphase coefficient. More...
 
#define MSC_SINGLE_PHASE_MP_COEFF0_9   (11U)
 Use 9th entry of multiphase coefficient. More...
 
#define MSC_SINGLE_PHASE_MP_COEFF0_10   (12U)
 Use 10th entry of multiphase coefficient. More...
 
#define MSC_SINGLE_PHASE_MP_COEFF0_11   (13U)
 Use 11th entry of multiphase coefficient. More...
 
#define MSC_SINGLE_PHASE_MP_COEFF0_12   (14U)
 Use 12th entry of multiphase coefficient. More...
 
#define MSC_SINGLE_PHASE_MP_COEFF0_13   (15U)
 Use 13th entry of multiphase coefficient. More...
 
#define MSC_SINGLE_PHASE_MP_COEFF0_14   (16U)
 Use 14th entry of multiphase coefficient. More...
 
#define MSC_SINGLE_PHASE_MP_COEFF0_15   (17U)
 Use 15th entry of multiphase coefficient. More...
 

MSC Phase mode select

Enum for selecting phase mode for scaling operation It could be either 64phase or 32phase. The same phase mode is used for horizontal and vertical direction.

#define MSC_PHASE_MODE_64PHASE   (0U)
 
#define MSC_PHASE_MODE_32PHASE   (1U)
 

MSC Filter mode select

Enum for selecting either single phase or multi phase filter.

#define MSC_FILTER_MODE_SINGLE_PHASE   (0U)
 
#define MSC_FILTER_MODE_MULTI_PHASE   (1U)
 

MSC Error Events

Enum to define MSC Error events, for which MSC callback could be registered.

Caution: These macro values are directly used by driver for enabling events.

#define VHWA_MSC_VBUSM_RD_ERR   (0x4U)
 Back mapped pixel co-ordinate goes out of the pre-computed input pixel bounding box. More...
 
#define VHWA_MSC_SL2_WR_ERR   (0x8U)
 

Macro Definition Documentation

◆ MSC_MAX_OUTPUT

#define MSC_MAX_OUTPUT   (10U)

Maximum number of scalar output supported in MSC.

◆ MSC_MAX_TAP

#define MSC_MAX_TAP   (5U)

Maximum number of filter tap supported in the scalar.

◆ MSC_MAX_SP_COEFF_SET

#define MSC_MAX_SP_COEFF_SET   (2U)

Maximum number of single phase coefficients set.

◆ MSC_MAX_MP_COEFF_SET

#define MSC_MAX_MP_COEFF_SET   (4U)

Maximum number of Multi phase coefficients set.

◆ VPAC_MSC_INST_ID_0

#define VPAC_MSC_INST_ID_0   (0U)

MSC Instance/Thread ID 0.

◆ VPAC_MSC_INST_ID_1

#define VPAC_MSC_INST_ID_1   (1U)

MSC Instance/Thread ID 1.

◆ VHWA_M2M_MSC_MAX_INST

#define VHWA_M2M_MSC_MAX_INST   (2U)

Maximum supported instance for MSC.

◆ MSC_COEFF_SHIFT_5

#define MSC_COEFF_SHIFT_5   (5U)

Coefficient shift by 5bits, 5bit fraction.

◆ MSC_COEFF_SHIFT_6

#define MSC_COEFF_SHIFT_6   (6U)

Coefficient shift by 6bits, 6bit fraction.

◆ MSC_COEFF_SHIFT_7

#define MSC_COEFF_SHIFT_7   (7U)

Coefficient shift by 7bits, 7bit fraction.

◆ MSC_COEFF_SHIFT_8

#define MSC_COEFF_SHIFT_8   (8U)

Coefficient shift by 8bits, 8bit fraction.

◆ MSC_COEFF_SHIFT_9

#define MSC_COEFF_SHIFT_9   (9U)

Coefficient shift by 9bits, 9bit fraction.

◆ MSC_MULTI_32PHASE_COEFF_SET_0

#define MSC_MULTI_32PHASE_COEFF_SET_0   (0U)

Coefficient Set 0 for 32phase coefficients.

◆ MSC_MULTI_32PHASE_COEFF_SET_1

#define MSC_MULTI_32PHASE_COEFF_SET_1   (1U)

Coefficient Set 1 for 32phase coefficients.

◆ MSC_MULTI_32PHASE_COEFF_SET_2

#define MSC_MULTI_32PHASE_COEFF_SET_2   (2U)

Coefficient Set 2 for 32phase coefficients.

◆ MSC_MULTI_32PHASE_COEFF_SET_3

#define MSC_MULTI_32PHASE_COEFF_SET_3   (3U)

Coefficient Set 3 for 32phase coefficients.

◆ MSC_MULTI_64PHASE_COEFF_SET_0

#define MSC_MULTI_64PHASE_COEFF_SET_0   (0U)

Coefficient Set 0 for 64phase coefficients.

◆ MSC_MULTI_64PHASE_COEFF_SET_2

#define MSC_MULTI_64PHASE_COEFF_SET_2   (2U)

Coefficient Set 2 for 64phase coefficients.

◆ MSC_TAP_SEL_3TAPS

#define MSC_TAP_SEL_3TAPS   (0U)

Selects the three tap filter.

◆ MSC_TAP_SEL_4TAPS

#define MSC_TAP_SEL_4TAPS   (1U)

Selects the 4 tap filter.

◆ MSC_TAP_SEL_5TAPS

#define MSC_TAP_SEL_5TAPS   (2U)

Selects the 5 tap filter.

◆ MSC_SINGLE_PHASE_SP_COEFF_0

#define MSC_SINGLE_PHASE_SP_COEFF_0   (0U)

Use Dedicated Single phase coef-0.

◆ MSC_SINGLE_PHASE_SP_COEFF_1

#define MSC_SINGLE_PHASE_SP_COEFF_1   (1U)

Use Dedicated Single phase coef-1.

◆ MSC_SINGLE_PHASE_MP_COEFF0_0

#define MSC_SINGLE_PHASE_MP_COEFF0_0   (2U)

Use 0th entry of multiphase coefficient.

◆ MSC_SINGLE_PHASE_MP_COEFF0_1

#define MSC_SINGLE_PHASE_MP_COEFF0_1   (3U)

Use 1th entry of multiphase coefficient.

◆ MSC_SINGLE_PHASE_MP_COEFF0_2

#define MSC_SINGLE_PHASE_MP_COEFF0_2   (4U)

Use 2th entry of multiphase coefficient.

◆ MSC_SINGLE_PHASE_MP_COEFF0_3

#define MSC_SINGLE_PHASE_MP_COEFF0_3   (5U)

Use 3th entry of multiphase coefficient.

◆ MSC_SINGLE_PHASE_MP_COEFF0_4

#define MSC_SINGLE_PHASE_MP_COEFF0_4   (6U)

Use 4th entry of multiphase coefficient.

◆ MSC_SINGLE_PHASE_MP_COEFF0_5

#define MSC_SINGLE_PHASE_MP_COEFF0_5   (7U)

Use 5th entry of multiphase coefficient.

◆ MSC_SINGLE_PHASE_MP_COEFF0_6

#define MSC_SINGLE_PHASE_MP_COEFF0_6   (8U)

Use 6th entry of multiphase coefficient.

◆ MSC_SINGLE_PHASE_MP_COEFF0_7

#define MSC_SINGLE_PHASE_MP_COEFF0_7   (9U)

Use 7th entry of multiphase coefficient.

◆ MSC_SINGLE_PHASE_MP_COEFF0_8

#define MSC_SINGLE_PHASE_MP_COEFF0_8   (10U)

Use 8th entry of multiphase coefficient.

◆ MSC_SINGLE_PHASE_MP_COEFF0_9

#define MSC_SINGLE_PHASE_MP_COEFF0_9   (11U)

Use 9th entry of multiphase coefficient.

◆ MSC_SINGLE_PHASE_MP_COEFF0_10

#define MSC_SINGLE_PHASE_MP_COEFF0_10   (12U)

Use 10th entry of multiphase coefficient.

◆ MSC_SINGLE_PHASE_MP_COEFF0_11

#define MSC_SINGLE_PHASE_MP_COEFF0_11   (13U)

Use 11th entry of multiphase coefficient.

◆ MSC_SINGLE_PHASE_MP_COEFF0_12

#define MSC_SINGLE_PHASE_MP_COEFF0_12   (14U)

Use 12th entry of multiphase coefficient.

◆ MSC_SINGLE_PHASE_MP_COEFF0_13

#define MSC_SINGLE_PHASE_MP_COEFF0_13   (15U)

Use 13th entry of multiphase coefficient.

◆ MSC_SINGLE_PHASE_MP_COEFF0_14

#define MSC_SINGLE_PHASE_MP_COEFF0_14   (16U)

Use 14th entry of multiphase coefficient.

◆ MSC_SINGLE_PHASE_MP_COEFF0_15

#define MSC_SINGLE_PHASE_MP_COEFF0_15   (17U)

Use 15th entry of multiphase coefficient.

◆ MSC_PHASE_MODE_64PHASE

#define MSC_PHASE_MODE_64PHASE   (0U)

◆ MSC_PHASE_MODE_32PHASE

#define MSC_PHASE_MODE_32PHASE   (1U)

◆ MSC_FILTER_MODE_SINGLE_PHASE

#define MSC_FILTER_MODE_SINGLE_PHASE   (0U)

◆ MSC_FILTER_MODE_MULTI_PHASE

#define MSC_FILTER_MODE_MULTI_PHASE   (1U)

◆ VHWA_MSC_VBUSM_RD_ERR

#define VHWA_MSC_VBUSM_RD_ERR   (0x4U)

Back mapped pixel co-ordinate goes out of the pre-computed input pixel bounding box.

<<Error on Input VBUSM Read interface Error on SL2 VBSUM Write interface

◆ VHWA_MSC_SL2_WR_ERR

#define VHWA_MSC_SL2_WR_ERR   (0x8U)

Typedef Documentation

◆ Msc_ErrEventCbFxn

typedef void(* Msc_ErrEventCbFxn) (Fvid2_Handle handle, uint32_t errEvents, void *appData)

Prototype for the Error Event for MSC. The callback for the MSC error events can be registered using Msc_ErrEventParams. One of the parameter in this is call back. Driver calls this callback when error occurs.

Parameters
handleFVID2 driver handle, for which error has occurred.
errEventsError Events occured, Refer to Msc_ErrorEvents for valid values.
Returns
None.

Function Documentation

◆ Msc_configInit()

static void Msc_configInit ( Msc_Config mscCfg)
inlinestatic

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

Parameters
mscCfgA pointer of type Msc_Config
Returns
None

◆ Msc_coeffInit()

static void Msc_coeffInit ( Msc_Coeff coeffCfg)
inlinestatic

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

Parameters
coeffCfgA pointer of type Msc_Coeff
Returns
None

◆ Msc_ConfigInit()

static void Msc_ConfigInit ( Msc_Config mscCfg)
inlinestatic