v_hscaler
Vitis Drivers API Documentation
Overview

Functions

int XV_HScalerInitialize (XV_Hscaler_l2 *InstancePtr, u16 DeviceId)
 This function initializes the core instance. More...
 
void XV_HScalerStart (XV_Hscaler_l2 *InstancePtr)
 This function starts the horizontal scaler core. More...
 
void XV_HScalerStop (XV_Hscaler_l2 *InstancePtr)
 This function stops the horizontal scaler core. More...
 
void XV_HScalerLoadExtCoeff (XV_Hscaler_l2 *InstancePtr, u16 num_phases, u16 num_taps, const short *Coeff)
 This function loads user defined filter coefficients in the scaler coefficient storage. More...
 
int XV_HScalerSetup (XV_Hscaler_l2 *InstancePtr, u32 HeightIn, u32 WidthIn, u32 WidthOut, u32 ColorFormatIn, u32 ColorFormatOut)
 This function configures the scaler core registers with the specified configuration parameters of the axi stream. More...
 
void XV_HScalerDbgReportStatus (XV_Hscaler_l2 *InstancePtr)
 This function prints H Scaler status on the console. More...
 
int XV_HScalerValidateConfig (XV_Hscaler_l2 *InstancePtr, u32 cformatIn, u32 cformatOut)
 This function checks if the given input and output color formats are valid configuration parameters for this instance. More...
 

Variables

const short XV_hscaler_Lanczos2_taps6 [XV_HSCALER_MAX_H_PHASES][XV_HSCALER_TAPS_6]
 2D array containing precomputed filter coefficients for a 6-tap Lanczos2 horizontal scaler. More...
 
const short XV_hscaler_Lanczos2_taps6 [XV_HSCALER_MAX_H_PHASES][XV_HSCALER_TAPS_6]
 2D array containing precomputed filter coefficients for a 6-tap Lanczos2 horizontal scaler. More...
 

Function Documentation

int XV_HScalerInitialize ( XV_Hscaler_l2 InstancePtr,
u16  DeviceId 
)

This function initializes the core instance.

Parameters
InstancePtris a pointer to core instance to be worked upon
DeviceIdis instance id of the core
Returns
XST_SUCCESS if device is found and initialized XST_DEVICE_NOT_FOUND if device is not found

References XV_hscaler_Initialize().

void XV_HScalerLoadExtCoeff ( XV_Hscaler_l2 InstancePtr,
u16  num_phases,
u16  num_taps,
const short *  Coeff 
)

This function loads user defined filter coefficients in the scaler coefficient storage.

Parameters
InstancePtris a pointer to the core instance to be worked on.
num_phasesis the number of phases in coefficient table
num_tapsis the number of taps in coefficient table
Coeffis a pointer to user defined filter coefficients table
Returns
None

References XV_hscaler::Config, and XV_hscaler_Config::PhaseShift.

int XV_HScalerSetup ( XV_Hscaler_l2 InstancePtr,
u32  HeightIn,
u32  WidthIn,
u32  WidthOut,
u32  ColorFormatIn,
u32  ColorFormatOut 
)

This function configures the scaler core registers with the specified configuration parameters of the axi stream.

Parameters
InstancePtris a pointer to the core instance to be worked on.
HeightInis the input stream height
WidthInis the input stream width
WidthOutis the output stream width
ColorFormatInis the input stream color format
ColorFormatOutis the output stream color format
Returns
XST_SUCCESS if the requested setup parameters are valid XST_FAILURE otherwise

References XV_hscaler::Config, XV_hscaler_Config::PixPerClk, XV_hscaler_Config::ScalerType, XV_hscaler_Set_HwReg_ColorMode(), XV_hscaler_Set_HwReg_ColorModeOut(), XV_hscaler_Set_HwReg_Height(), XV_hscaler_Set_HwReg_PixelRate(), XV_hscaler_Set_HwReg_WidthIn(), XV_hscaler_Set_HwReg_WidthOut(), and XV_HScalerValidateConfig().

void XV_HScalerStart ( XV_Hscaler_l2 InstancePtr)

This function starts the horizontal scaler core.

Parameters
InstancePtris a pointer to the core instance to be worked on.
Returns
None

References XV_hscaler_EnableAutoRestart(), and XV_hscaler_Start().

void XV_HScalerStop ( XV_Hscaler_l2 InstancePtr)

This function stops the horizontal scaler core.

Parameters
InstancePtris a pointer to the core instance to be worked on.
Returns
None

References XV_hscaler_DisableAutoRestart().

int XV_HScalerValidateConfig ( XV_Hscaler_l2 InstancePtr,
u32  cformatIn,
u32  cformatOut 
)

This function checks if the given input and output color formats are valid configuration parameters for this instance.

Parameters
InstancePtris a pointer to the core instance to be worked on.
cformatInis the input stream color format.
cformatOutis the output stream color format.
Returns
TRUE if the requested setup parameters are valid, FALSE otherwise.

References XV_HscalerIs420Enabled, XV_HscalerIs422Enabled, and XV_HscalerIsCscEnabled.

Referenced by XV_HScalerSetup().

Variable Documentation

const short XV_hscaler_Lanczos2_taps6[XV_HSCALER_MAX_H_PHASES][XV_HSCALER_TAPS_6]

2D array containing precomputed filter coefficients for a 6-tap Lanczos2 horizontal scaler.

This constant array holds the coefficients for each phase of the horizontal scaling operation, using a 6-tap Lanczos2 filter. The array is indexed first by the phase (from 0 to XV_HSCALER_MAX_H_PHASES-1), and then by the tap index (from 0 to XV_HSCALER_TAPS_6-1).

These coefficients are used by the horizontal scaler hardware or software to perform high-quality image resampling with minimal artifacts.

See Also
XV_HSCALER_MAX_H_PHASES
XV_HSCALER_TAPS_6
const short XV_hscaler_Lanczos2_taps6[XV_HSCALER_MAX_H_PHASES][XV_HSCALER_TAPS_6]

2D array containing precomputed filter coefficients for a 6-tap Lanczos2 horizontal scaler.

This constant array holds the coefficients for each phase of the horizontal scaling operation, using a 6-tap Lanczos2 filter. The array is indexed first by the phase (from 0 to XV_HSCALER_MAX_H_PHASES-1), and then by the tap index (from 0 to XV_HSCALER_TAPS_6-1).

These coefficients are used by the horizontal scaler hardware or software to perform high-quality image resampling with minimal artifacts.

See Also
XV_HSCALER_MAX_H_PHASES
XV_HSCALER_TAPS_6