| v_hscaler Vitis Drivers API Documentation

- Overview
- Data Structures
- APIs
- File List

Data Structures
Overview

## Data Structures
struct | XV_Hscaler_l2
| H Scaler Layer 2 data. More...

## Hw Configuration
The following constants define the scaler HW MAX configuration
enum | XV_HSCALER_TYPE
| This typedef enumerates the Scaler Type. More...
enum | XV_HSCALER_TAPS
| This typedef enumerates the supported taps. More...
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...
#define | XV_HSCALER_MAX_H_TAPS (12)
#define | XV_HSCALER_MAX_H_PHASES (64)
#define | XV_HSCALER_MAX_LINE_WIDTH (8192)
#define | XV_HscalerIs422Enabled(InstancePtr) ((InstancePtr)->Hsc.Config.Is422Enabled)
| This macro checks if Hscaler instance is enabled for 4:2:2 processing. More...
#define | XV_HscalerIs420Enabled(InstancePtr) ((InstancePtr)->Hsc.Config.Is420Enabled)
| This macro checks if Hscaler instance is enabled for 4:2:0 processing. More...
#define | XV_HscalerIsCscEnabled(InstancePtr) ((InstancePtr)->Hsc.Config.IsCscEnabled)
| This macro checks if Hscaler instance is enabled for color space conversion. More...

## Macro Definition Documentation

#define XV_HscalerIs420Enabled | ( |  | InstancePtr | ) | ((InstancePtr)->Hsc.Config.Is420Enabled)

This macro checks if Hscaler instance is enabled for 4:2:0 processing.

Parameters

  InstancePtr | is pointer to Hscaler core layer 2

Returns
  Returns 1 if condition is TRUE or 0 if FALSE

Referenced by XV_HScalerDbgReportStatus(), and XV_HScalerValidateConfig().

#define XV_HscalerIs422Enabled | ( |  | InstancePtr | ) | ((InstancePtr)->Hsc.Config.Is422Enabled)

This macro checks if Hscaler instance is enabled for 4:2:2 processing.

Parameters

  InstancePtr | is pointer to Hscaler core layer 2

Returns
  Returns 1 if condition is TRUE or 0 if FALSE

Referenced by XV_HScalerDbgReportStatus(), and XV_HScalerValidateConfig().

#define XV_HscalerIsCscEnabled | ( |  | InstancePtr | ) | ((InstancePtr)->Hsc.Config.IsCscEnabled)

This macro checks if Hscaler instance is enabled for color space conversion.

Parameters

  InstancePtr | is pointer to Hscaler core layer 2

Returns
  Returns 1 if condition is TRUE or 0 if FALSE

Referenced by XV_HScalerDbgReportStatus(), and XV_HScalerValidateConfig().

## Enumeration Type Documentation

enum XV_HSCALER_TAPS

This typedef enumerates the supported taps.

enum XV_HSCALER_TYPE

This typedef enumerates the Scaler Type.

## Function Documentation

void XV_HScalerDbgReportStatus | ( | XV_Hscaler_l2 * | InstancePtr | ) |

This function prints H Scaler status on the console.

Parameters

  InstancePtr | is the instance pointer to the core instance.

Returns
  None

References XV_hscaler_Config::BaseAddress, XV_hscaler::Config, XV_hscaler_Config::NumTaps, XV_hscaler_Config::PhaseShift, XV_hscaler_Config::ScalerType, XV_HscalerIs420Enabled, XV_HscalerIs422Enabled, and XV_HscalerIsCscEnabled.

int XV_HScalerInitialize | ( | XV_Hscaler_l2 * | InstancePtr,
|  | u16 | DeviceId
| ) |  |

This function initializes the core instance.

Parameters

  InstancePtr | is a pointer to core instance to be worked upon
  DeviceId | is instance id of the core

Returns
  XST_SUCCESS if device is found and initialized XST_DEVICE_NOT_FOUND if device is not found

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

  InstancePtr | is a pointer to the core instance to be worked on.
  num_phases | is the number of phases in coefficient table
  num_taps | is the number of taps in coefficient table
  Coeff | is 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

  InstancePtr | is a pointer to the core instance to be worked on.
  HeightIn | is the input stream height
  WidthIn | is the input stream width
  WidthOut | is the output stream width
  ColorFormatIn | is the input stream color format
  ColorFormatOut | is 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, and XV_HScalerValidateConfig().

void XV_HScalerStart | ( | XV_Hscaler_l2 * | InstancePtr | ) |

This function starts the horizontal scaler core.

Parameters

  InstancePtr | is a pointer to the core instance to be worked on.

Returns
  None

void XV_HScalerStop | ( | XV_Hscaler_l2 * | InstancePtr | ) |

This function stops the horizontal scaler core.

Parameters

  InstancePtr | is a pointer to the core instance to be worked on.

Returns
  None

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

  InstancePtr | is a pointer to the core instance to be worked on.
  cformat | is the input stream color format
  cformatOut | is 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().