PDK API Guide for J721E
LDC Configuration

Introduction

This is LDC Configuration file

Files

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

Data Structures

struct  Ldc_LutCfg
 All LUT Parameters. More...
 
struct  Ldc_PerspectiveTransformCfg
 Perspective transformation parameters. More...
 
struct  Ldc_RegionConfig
 LDC Region configuration parameters. More...
 
struct  Ldc_Config
 All configuration Parameters for LDC. More...
 
struct  Ldc_RdBwLimitConfig
 Bandwidth limit configuration for Read DMA. This condiguration is directly set in the register, so will be used by all handles/opens. More...
 
struct  Ldc_ErrEventParams
 Structure for error event parameters Used to register callback for the given set of events. More...
 
struct  Ldc_RemapLutCfg
 Structure for Remap Lut Configuration. More...
 

Functions

static void Ldc_ConfigInit (Ldc_Config *ldcCfg)
 This function should be used to initialize variable of type Ldc_Config. More...
 

Typedefs

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

Macros

#define LDC_MAX_OUTPUT   (2u)
 
#define LDC_MESH_BUF_ADDR_ALIGN   (0x10u)
 Alignment requirement for LDC Mesh Table. More...
 
#define LDC_MAX_HORZ_REGIONS   (3U)
 Maximum number of horizontal regions supported by LDC. More...
 
#define LDC_MAX_VERT_REGIONS   (3U)
 Maximum number of horizontal regions supported by LDC. More...
 
#define LDC_MAX_REGIONS
 Maximum number of regions supported by LDC. More...
 
#define LDC_REMAP_LUT_SIZE   (513u)
 

Ioctls for the LDCmodule

Input/Output control MACRO's for LDC module

#define IOCTL_LDC_SET_LUMA_TONEMAP_LUT_CFG
 IOCTL for setting Luma Lut. struct Ldc_RemapLutCfg is as argument. More...
 
#define IOCTL_LDC_SET_CHROMA_TONEMAP_LUT_CFG
 IOCTL for setting Chroma Lut. struct Ldc_RemapLutCfg is as argument. More...
 

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_LDC_LUMA_INTRP_BICUBIC   (0U)
 Bicubic interpolation is used for Luma. More...
 
#define VHWA_LDC_LUMA_INTRP_BILINEAR   (1U)
 Interpolation Max, used for error checking. More...
 
#define VHWA_LDC_LUMA_INTRP_MAX   (2U)
 

LDC Downscaling factor for LUT

Enum to define down scaling factor for LUT.

#define VHWA_LDC_LUT_DS_FACTOR_1   (0U)
 no downsampling More...
 
#define VHWA_LDC_LUT_DS_FACTOR_2   (1U)
 Down sampling by 4. More...
 
#define VHWA_LDC_LUT_DS_FACTOR_4   (2U)
 Down sampling by 8. More...
 
#define VHWA_LDC_LUT_DS_FACTOR_8   (3U)
 Down sampling by 16. More...
 
#define VHWA_LDC_LUT_DS_FACTOR_16   (4U)
 Down sampling by 32. More...
 
#define VHWA_LDC_LUT_DS_FACTOR_32   (5U)
 Down sampling by 64. More...
 
#define VHWA_LDC_LUT_DS_FACTOR_64   (6U)
 Down sampling by 128. More...
 
#define VHWA_LDC_LUT_DS_FACTOR_128   (7U)
 Downscaling factor MAX, used for error checking. More...
 
#define VHWA_LDC_LUT_DS_FACTOR_MAX   (8U)
 

Burst Length for LDC Read DMA

Enum to define max burst length for the Read Dma of LDC.

#define VHWA_LDC_MAX_BURST_LENGTH_16   (0U)
 Max Burst length of 16. More...
 
#define VHWA_LDC_MAX_BURST_LENGTH_8   (1U)
 Max Burst length of 4. More...
 
#define VHWA_LDC_MAX_BURST_LENGTH_4   (2U)
 Max Burst length of 2. More...
 
#define VHWA_LDC_MAX_BURST_LENGTH_2   (3U)
 LDC Burst Length max, used for error checking. More...
 
#define VHWA_LDC_MAX_BURST_LENGTH_MAX   (4U)
 

LDC Error Events

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

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

#define VHWA_LDC_PIX_IBLK_OUTOFBOUND_ERR   (0x1U)
 Back mapped pixel co-ordinate goes out of the pre-computed input pixel bounding box. More...
 
#define VHWA_LDC_MESH_IBLK_OUTOFBOUND   (0x2U)
 Input Pixel block memory overflow. More...
 
#define VHWA_LDC_PIX_IBLK_MEMOVF   (0x4U)
 Mesh block memory overflow. More...
 
#define VHWA_LDC_MESH_IBLK_MEMOVF   (0x8U)
 Back mapped input co-ordinate goes out of input frame range. More...
 
#define VHWA_LDC_IFR_OUTOFBOUND   (0x10U)
 Affine and perspective transform precision overflow error. More...
 
#define VHWA_LDC_INT_SZOVF   (0x20U)
 Error on SL2 VBSUM Write interface. More...
 
#define VHWA_LDC_SL2_WR_ERR   (0x80U)
 Error on Input VBUSM Read interface. More...
 
#define VHWA_LDC_VBUSM_RD_ERR   (0x100U)
 

Macro Definition Documentation

◆ IOCTL_LDC_SET_LUMA_TONEMAP_LUT_CFG

#define IOCTL_LDC_SET_LUMA_TONEMAP_LUT_CFG
Value:
0x0U)
#define VHWA_IOCTL_LDC_IOCTL_BASE
Definition: vhwa_common.h:122

IOCTL for setting Luma Lut. struct Ldc_RemapLutCfg is as argument.

Returns
FVID2_SOK on success, else error code.

◆ IOCTL_LDC_SET_CHROMA_TONEMAP_LUT_CFG

#define IOCTL_LDC_SET_CHROMA_TONEMAP_LUT_CFG
Value:
0x1U)
#define VHWA_IOCTL_LDC_IOCTL_BASE
Definition: vhwa_common.h:122

IOCTL for setting Chroma Lut. struct Ldc_RemapLutCfg is as argument.

Returns
FVID2_SOK on success, else error code.

◆ LDC_MAX_OUTPUT

#define LDC_MAX_OUTPUT   (2u)

◆ LDC_MESH_BUF_ADDR_ALIGN

#define LDC_MESH_BUF_ADDR_ALIGN   (0x10u)

Alignment requirement for LDC Mesh Table.

◆ LDC_MAX_HORZ_REGIONS

#define LDC_MAX_HORZ_REGIONS   (3U)

Maximum number of horizontal regions supported by LDC.

◆ LDC_MAX_VERT_REGIONS

#define LDC_MAX_VERT_REGIONS   (3U)

Maximum number of horizontal regions supported by LDC.

◆ LDC_MAX_REGIONS

#define LDC_MAX_REGIONS
Value:
LDC_MAX_VERT_REGIONS)
#define LDC_MAX_HORZ_REGIONS
Maximum number of horizontal regions supported by LDC.
Definition: ldc_cfg.h:107

Maximum number of regions supported by LDC.

◆ LDC_REMAP_LUT_SIZE

#define LDC_REMAP_LUT_SIZE   (513u)

◆ VHWA_LDC_LUMA_INTRP_BICUBIC

#define VHWA_LDC_LUMA_INTRP_BICUBIC   (0U)

Bicubic interpolation is used for Luma.

<Bilinear interpolation is used for Luma

◆ VHWA_LDC_LUMA_INTRP_BILINEAR

#define VHWA_LDC_LUMA_INTRP_BILINEAR   (1U)

Interpolation Max, used for error checking.

◆ VHWA_LDC_LUMA_INTRP_MAX

#define VHWA_LDC_LUMA_INTRP_MAX   (2U)

◆ VHWA_LDC_LUT_DS_FACTOR_1

#define VHWA_LDC_LUT_DS_FACTOR_1   (0U)

no downsampling

<Down sampling by 2

◆ VHWA_LDC_LUT_DS_FACTOR_2

#define VHWA_LDC_LUT_DS_FACTOR_2   (1U)

Down sampling by 4.

◆ VHWA_LDC_LUT_DS_FACTOR_4

#define VHWA_LDC_LUT_DS_FACTOR_4   (2U)

Down sampling by 8.

◆ VHWA_LDC_LUT_DS_FACTOR_8

#define VHWA_LDC_LUT_DS_FACTOR_8   (3U)

Down sampling by 16.

◆ VHWA_LDC_LUT_DS_FACTOR_16

#define VHWA_LDC_LUT_DS_FACTOR_16   (4U)

Down sampling by 32.

◆ VHWA_LDC_LUT_DS_FACTOR_32

#define VHWA_LDC_LUT_DS_FACTOR_32   (5U)

Down sampling by 64.

◆ VHWA_LDC_LUT_DS_FACTOR_64

#define VHWA_LDC_LUT_DS_FACTOR_64   (6U)

Down sampling by 128.

◆ VHWA_LDC_LUT_DS_FACTOR_128

#define VHWA_LDC_LUT_DS_FACTOR_128   (7U)

Downscaling factor MAX, used for error checking.

◆ VHWA_LDC_LUT_DS_FACTOR_MAX

#define VHWA_LDC_LUT_DS_FACTOR_MAX   (8U)

◆ VHWA_LDC_MAX_BURST_LENGTH_16

#define VHWA_LDC_MAX_BURST_LENGTH_16   (0U)

Max Burst length of 16.

<Max Burst length of 8

◆ VHWA_LDC_MAX_BURST_LENGTH_8

#define VHWA_LDC_MAX_BURST_LENGTH_8   (1U)

Max Burst length of 4.

◆ VHWA_LDC_MAX_BURST_LENGTH_4

#define VHWA_LDC_MAX_BURST_LENGTH_4   (2U)

Max Burst length of 2.

◆ VHWA_LDC_MAX_BURST_LENGTH_2

#define VHWA_LDC_MAX_BURST_LENGTH_2   (3U)

LDC Burst Length max, used for error checking.

◆ VHWA_LDC_MAX_BURST_LENGTH_MAX

#define VHWA_LDC_MAX_BURST_LENGTH_MAX   (4U)

◆ VHWA_LDC_PIX_IBLK_OUTOFBOUND_ERR

#define VHWA_LDC_PIX_IBLK_OUTOFBOUND_ERR   (0x1U)

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

<Block mesh co-ordinate goes out of the pre-computed mesh bounding box

◆ VHWA_LDC_MESH_IBLK_OUTOFBOUND

#define VHWA_LDC_MESH_IBLK_OUTOFBOUND   (0x2U)

Input Pixel block memory overflow.

◆ VHWA_LDC_PIX_IBLK_MEMOVF

#define VHWA_LDC_PIX_IBLK_MEMOVF   (0x4U)

Mesh block memory overflow.

◆ VHWA_LDC_MESH_IBLK_MEMOVF

#define VHWA_LDC_MESH_IBLK_MEMOVF   (0x8U)

Back mapped input co-ordinate goes out of input frame range.

◆ VHWA_LDC_IFR_OUTOFBOUND

#define VHWA_LDC_IFR_OUTOFBOUND   (0x10U)

Affine and perspective transform precision overflow error.

◆ VHWA_LDC_INT_SZOVF

#define VHWA_LDC_INT_SZOVF   (0x20U)

Error on SL2 VBSUM Write interface.

◆ VHWA_LDC_SL2_WR_ERR

#define VHWA_LDC_SL2_WR_ERR   (0x80U)

Error on Input VBUSM Read interface.

◆ VHWA_LDC_VBUSM_RD_ERR

#define VHWA_LDC_VBUSM_RD_ERR   (0x100U)

Typedef Documentation

◆ Ldc_ErrEventCbFxn

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

Prototype for the Error Event for LDC. The callback for the LDC error events can be registered using Ldc_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 Ldc_ErrorEvents for valid values.
Returns
None.

Function Documentation

◆ Ldc_ConfigInit()

static void Ldc_ConfigInit ( Ldc_Config ldcCfg)
inlinestatic

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

Ldc_ConfigInit

Parameters
ldcCfgA pointer of type Ldc_Config
Returns
None