v_vcresampler
Vitis Drivers API Documentation
xv_vcresampler.h File Reference

Data Structures

struct  XV_vcresampler_Config
 This typedef contains configuration information for the vertical chroma resampler core. More...
 
struct  XV_vcresampler
 Driver instance data. More...
 

Functions

int XV_vcresampler_Initialize (XV_vcresampler *InstancePtr, u16 DeviceId)
 Initializes the XV_vcresampler instance. More...
 
XV_vcresampler_ConfigXV_vcresampler_LookupConfig (u16 DeviceId)
 Looks up the configuration for a specific XV_vcresampler device instance. More...
 
int XV_vcresampler_CfgInitialize (XV_vcresampler *InstancePtr, XV_vcresampler_Config *ConfigPtr, UINTPTR EffectiveAddr)
 Initializes a specific XV_vcresampler instance with the provided configuration and base address. More...
 
void XV_vcresampler_Start (XV_vcresampler *InstancePtr)
 Starts the VC resampler hardware. More...
 
u32 XV_vcresampler_IsDone (XV_vcresampler *InstancePtr)
 Checks if the VC Resampler core has completed its operation. More...
 
u32 XV_vcresampler_IsIdle (XV_vcresampler *InstancePtr)
 Checks if the XV_vcresampler core is idle. More...
 
u32 XV_vcresampler_IsReady (XV_vcresampler *InstancePtr)
 Checks if the XV_vcresampler instance is ready for the next input. More...
 
void XV_vcresampler_EnableAutoRestart (XV_vcresampler *InstancePtr)
 This function enables auto-restart for the XV_vcresampler instance. More...
 
void XV_vcresampler_DisableAutoRestart (XV_vcresampler *InstancePtr)
 This function disables auto-restart for the XV_vcresampler instance. More...
 
void XV_vcresampler_Set_HwReg_width (XV_vcresampler *InstancePtr, u32 Data)
 This function sets the hardware register width. More...
 
u32 XV_vcresampler_Get_HwReg_width (XV_vcresampler *InstancePtr)
 This function gets the hardware register width. More...
 
void XV_vcresampler_Set_HwReg_height (XV_vcresampler *InstancePtr, u32 Data)
 This function sets the hardware register height. More...
 
u32 XV_vcresampler_Get_HwReg_height (XV_vcresampler *InstancePtr)
 This function gets the hardware register height. More...
 
void XV_vcresampler_Set_HwReg_input_video_format (XV_vcresampler *InstancePtr, u32 Data)
 This function sets the input video format. More...
 
u32 XV_vcresampler_Get_HwReg_input_video_format (XV_vcresampler *InstancePtr)
 This function gets the input video format. More...
 
void XV_vcresampler_Set_HwReg_output_video_format (XV_vcresampler *InstancePtr, u32 Data)
 This function sets the output video format. More...
 
u32 XV_vcresampler_Get_HwReg_output_video_format (XV_vcresampler *InstancePtr)
 This function gets the output video format. More...
 
void XV_vcresampler_Set_HwReg_coefs_0_0 (XV_vcresampler *InstancePtr, u32 Data)
 This function sets the coefficients for the resampler. More...
 
u32 XV_vcresampler_Get_HwReg_coefs_0_0 (XV_vcresampler *InstancePtr)
 This function gets the coefficients for the resampler. More...
 
void XV_vcresampler_InterruptGlobalEnable (XV_vcresampler *InstancePtr)
 This function enables global interrupts. More...
 
void XV_vcresampler_InterruptGlobalDisable (XV_vcresampler *InstancePtr)
 This function disables global interrupts. More...
 
void XV_vcresampler_InterruptEnable (XV_vcresampler *InstancePtr, u32 Mask)
 This function enables specific interrupts. More...
 
void XV_vcresampler_InterruptDisable (XV_vcresampler *InstancePtr, u32 Mask)
 Disable specific interrupts for the VC Resampler core. More...
 
void XV_vcresampler_InterruptClear (XV_vcresampler *InstancePtr, u32 Mask)
 Clears specific interrupt(s) for the VC resampler hardware. More...
 
u32 XV_vcresampler_InterruptGetEnabled (XV_vcresampler *InstancePtr)
 Retrieves the interrupt enable register value for the VC resampler instance. More...
 
u32 XV_vcresampler_InterruptGetStatus (XV_vcresampler *InstancePtr)
 XV_vcresampler_InterruptGetStatus - Retrieves the interrupt status of the VC resampler instance. More...
 

Function Documentation

int XV_vcresampler_CfgInitialize ( XV_vcresampler InstancePtr,
XV_vcresampler_Config ConfigPtr,
UINTPTR  EffectiveAddr 
)

Initializes a specific XV_vcresampler instance with the provided configuration and base address.

Parameters
InstancePtrPointer to the XV_vcresampler instance to be initialized.
ConfigPtrPointer to the configuration structure for the XV_vcresampler.
EffectiveAddrBase address for the hardware instance.
Returns
XST_SUCCESS if initialization is successful.

References XV_vcresampler_Config::BaseAddress, XV_vcresampler::Config, and XV_vcresampler::IsReady.

Referenced by XV_vcresampler_Initialize().

void XV_vcresampler_DisableAutoRestart ( XV_vcresampler InstancePtr)

This function disables auto-restart for the XV_vcresampler instance.

Parameters
InstancePtrPointer to the XV_vcresampler instance.
Returns
None.

References XV_vcresampler_Config::BaseAddress, XV_vcresampler::Config, XV_vcresampler::IsReady, and XV_VCRESAMPLER_CTRL_ADDR_AP_CTRL.

Referenced by XV_VCrsmplStop().

void XV_vcresampler_EnableAutoRestart ( XV_vcresampler InstancePtr)

This function enables auto-restart for the XV_vcresampler instance.

Parameters
InstancePtrPointer to the XV_vcresampler instance.
Returns
None.

References XV_vcresampler_Config::BaseAddress, XV_vcresampler::Config, XV_vcresampler::IsReady, and XV_VCRESAMPLER_CTRL_ADDR_AP_CTRL.

Referenced by XV_VCrsmplStart().

u32 XV_vcresampler_Get_HwReg_coefs_0_0 ( XV_vcresampler InstancePtr)

This function gets the coefficients for the resampler.

Parameters
InstancePtrPointer to the XV_vcresampler instance.
Returns
Coefficients data.

References XV_vcresampler_Config::BaseAddress, XV_vcresampler::Config, and XV_vcresampler::IsReady.

u32 XV_vcresampler_Get_HwReg_height ( XV_vcresampler InstancePtr)

This function gets the hardware register height.

Parameters
InstancePtrPointer to the XV_vcresampler instance.
Returns
Height data.

References XV_vcresampler_Config::BaseAddress, XV_vcresampler::Config, and XV_vcresampler::IsReady.

Referenced by XV_VCrsmplDbgReportStatus().

u32 XV_vcresampler_Get_HwReg_input_video_format ( XV_vcresampler InstancePtr)

This function gets the input video format.

Parameters
InstancePtrPointer to the XV_vcresampler instance.
Returns
Input video format data.

References XV_vcresampler_Config::BaseAddress, XV_vcresampler::Config, and XV_vcresampler::IsReady.

Referenced by XV_VCrsmplDbgReportStatus().

u32 XV_vcresampler_Get_HwReg_output_video_format ( XV_vcresampler InstancePtr)

This function gets the output video format.

Parameters
InstancePtrPointer to the XV_vcresampler instance.
Returns
Output video format data.

References XV_vcresampler_Config::BaseAddress, XV_vcresampler::Config, and XV_vcresampler::IsReady.

Referenced by XV_VCrsmplDbgReportStatus().

u32 XV_vcresampler_Get_HwReg_width ( XV_vcresampler InstancePtr)

This function gets the hardware register width.

Parameters
InstancePtrPointer to the XV_vcresampler instance.
Returns
Width data.

References XV_vcresampler_Config::BaseAddress, XV_vcresampler::Config, and XV_vcresampler::IsReady.

Referenced by XV_VCrsmplDbgReportStatus().

int XV_vcresampler_Initialize ( XV_vcresampler InstancePtr,
u16  DeviceId 
)

Initializes the XV_vcresampler instance.

This function looks up the configuration for the given DeviceId, and initializes the XV_vcresampler instance with the configuration. If the configuration is not found, the function sets the instance as not ready and returns an error code.

Parameters
InstancePtrPointer to the XV_vcresampler instance to be initialized.
DeviceIdDevice ID of the hardware instance to initialize.
Returns
  • XST_SUCCESS if initialization was successful.
  • XST_DEVICE_NOT_FOUND if the configuration for the given DeviceId was not found.

References XV_vcresampler_Config::BaseAddress, XV_vcresampler::IsReady, XV_vcresampler_CfgInitialize(), and XV_vcresampler_LookupConfig().

Referenced by XV_VcrsmplInitialize().

void XV_vcresampler_InterruptClear ( XV_vcresampler InstancePtr,
u32  Mask 
)

Clears specific interrupt(s) for the VC resampler hardware.

This function writes the specified interrupt mask to the Interrupt Status Register (ISR) to clear the corresponding interrupt(s) for the VC resampler instance.

Parameters
InstancePtrPointer to the XV_vcresampler instance.
MaskBitmask indicating which interrupt(s) to clear.
Note
The InstancePtr must be initialized and ready before calling this function.

References XV_vcresampler_Config::BaseAddress, XV_vcresampler::Config, and XV_vcresampler::IsReady.

void XV_vcresampler_InterruptDisable ( XV_vcresampler InstancePtr,
u32  Mask 
)

Disable specific interrupts for the VC Resampler core.

This function disables the interrupts specified by the Mask parameter for the given VC Resampler instance. It reads the current interrupt enable register, clears the bits specified by Mask, and writes the updated value back to the register.

Parameters
InstancePtrPointer to the XV_vcresampler instance.
MaskBitmask of interrupts to disable.
Returns
None.
Note
The InstancePtr must be initialized and ready before calling this function.

References XV_vcresampler_Config::BaseAddress, XV_vcresampler::Config, and XV_vcresampler::IsReady.

void XV_vcresampler_InterruptEnable ( XV_vcresampler InstancePtr,
u32  Mask 
)

This function enables specific interrupts.

Parameters
InstancePtrPointer to the XV_vcresampler instance.
MaskInterrupt mask to enable.
Returns
None.

References XV_vcresampler_Config::BaseAddress, XV_vcresampler::Config, and XV_vcresampler::IsReady.

u32 XV_vcresampler_InterruptGetEnabled ( XV_vcresampler InstancePtr)

Retrieves the interrupt enable register value for the VC resampler instance.

This function checks that the provided instance pointer is valid and that the instance is ready. It then reads and returns the value of the interrupt enable register (IER) from the hardware.

Parameters
InstancePtrPointer to the XV_vcresampler instance.
Returns
The current value of the interrupt enable register.

References XV_vcresampler_Config::BaseAddress, XV_vcresampler::Config, and XV_vcresampler::IsReady.

u32 XV_vcresampler_InterruptGetStatus ( XV_vcresampler InstancePtr)

XV_vcresampler_InterruptGetStatus - Retrieves the interrupt status of the VC resampler instance.

Parameters
InstancePtr,:Pointer to the XV_vcresampler instance. Must not be NULL and must be initialized.
Returns
The current value of the Interrupt Status Register (ISR) for the VC resampler.

This function asserts the validity of the instance pointer and its readiness, then reads and returns the interrupt status register value.

References XV_vcresampler_Config::BaseAddress, XV_vcresampler::Config, and XV_vcresampler::IsReady.

void XV_vcresampler_InterruptGlobalDisable ( XV_vcresampler InstancePtr)

This function disables global interrupts.

Parameters
InstancePtrPointer to the XV_vcresampler instance.
Returns
None.

References XV_vcresampler_Config::BaseAddress, XV_vcresampler::Config, and XV_vcresampler::IsReady.

void XV_vcresampler_InterruptGlobalEnable ( XV_vcresampler InstancePtr)

This function enables global interrupts.

Parameters
InstancePtrPointer to the XV_vcresampler instance.
Returns
None.

References XV_vcresampler_Config::BaseAddress, XV_vcresampler::Config, and XV_vcresampler::IsReady.

u32 XV_vcresampler_IsDone ( XV_vcresampler InstancePtr)

Checks if the VC Resampler core has completed its operation.

Parameters
InstancePtrPointer to the XV_vcresampler instance.
Returns
  • 1 if the operation is done.
  • 0 if the operation is not done.

References XV_vcresampler_Config::BaseAddress, XV_vcresampler::Config, XV_vcresampler::IsReady, and XV_VCRESAMPLER_CTRL_ADDR_AP_CTRL.

Referenced by XV_VCrsmplDbgReportStatus().

u32 XV_vcresampler_IsIdle ( XV_vcresampler InstancePtr)

Checks if the XV_vcresampler core is idle.

Parameters
InstancePtris a pointer to the XV_vcresampler instance.
Returns
Returns 1 if the core is idle, 0 otherwise.

References XV_vcresampler_Config::BaseAddress, XV_vcresampler::Config, XV_vcresampler::IsReady, and XV_VCRESAMPLER_CTRL_ADDR_AP_CTRL.

Referenced by XV_VCrsmplDbgReportStatus().

u32 XV_vcresampler_IsReady ( XV_vcresampler InstancePtr)

Checks if the XV_vcresampler instance is ready for the next input.

Parameters
InstancePtris a pointer to the XV_vcresampler instance.
Returns
1 if the core is ready for the next input, 0 otherwise.

References XV_vcresampler_Config::BaseAddress, XV_vcresampler::Config, XV_vcresampler::IsReady, and XV_VCRESAMPLER_CTRL_ADDR_AP_CTRL.

Referenced by XV_VCrsmplDbgReportStatus().

XV_vcresampler_Config* XV_vcresampler_LookupConfig ( u16  DeviceId)

Looks up the configuration for a specific XV_vcresampler device instance.

This function searches the XV_vcresampler_ConfigTable for a configuration structure that matches the provided DeviceId. If a match is found, a pointer to the configuration structure is returned; otherwise, NULL is returned.

Parameters
DeviceIdThe unique identifier for the XV_vcresampler device instance.
Returns
Pointer to the XV_vcresampler_Config structure if found, or NULL if no match is found.

Referenced by XV_vcresampler_Initialize().

void XV_vcresampler_Set_HwReg_coefs_0_0 ( XV_vcresampler InstancePtr,
u32  Data 
)

This function sets the coefficients for the resampler.

Parameters
InstancePtrPointer to the XV_vcresampler instance.
DataCoefficients data to set.
Returns
None.

References XV_vcresampler_Config::BaseAddress, XV_vcresampler::Config, and XV_vcresampler::IsReady.

void XV_vcresampler_Set_HwReg_height ( XV_vcresampler InstancePtr,
u32  Data 
)

This function sets the hardware register height.

Parameters
InstancePtrPointer to the XV_vcresampler instance.
DataHeight data to set.
Returns
None.

References XV_vcresampler_Config::BaseAddress, XV_vcresampler::Config, and XV_vcresampler::IsReady.

Referenced by XV_VCrsmplSetActiveSize().

void XV_vcresampler_Set_HwReg_input_video_format ( XV_vcresampler InstancePtr,
u32  Data 
)

This function sets the input video format.

Parameters
InstancePtrPointer to the XV_vcresampler instance.
DataInput video format data to set.
Returns
None.

References XV_vcresampler_Config::BaseAddress, XV_vcresampler::Config, and XV_vcresampler::IsReady.

Referenced by XV_VCrsmplSetFormat().

void XV_vcresampler_Set_HwReg_output_video_format ( XV_vcresampler InstancePtr,
u32  Data 
)

This function sets the output video format.

Parameters
InstancePtrPointer to the XV_vcresampler instance.
DataOutput video format data to set.
Returns
None.

References XV_vcresampler_Config::BaseAddress, XV_vcresampler::Config, and XV_vcresampler::IsReady.

Referenced by XV_VCrsmplSetFormat().

void XV_vcresampler_Set_HwReg_width ( XV_vcresampler InstancePtr,
u32  Data 
)

This function sets the hardware register width.

Parameters
InstancePtrPointer to the XV_vcresampler instance.
DataWidth data to set.
Returns
None.

References XV_vcresampler_Config::BaseAddress, XV_vcresampler::Config, and XV_vcresampler::IsReady.

Referenced by XV_VCrsmplSetActiveSize().

void XV_vcresampler_Start ( XV_vcresampler InstancePtr)

Starts the VC resampler hardware.

This function asserts the validity of the instance pointer and its readiness, then writes to the control register to start the hardware operation.

Parameters
InstancePtris a pointer to the XV_vcresampler instance.
Returns
None.

References XV_vcresampler_Config::BaseAddress, XV_vcresampler::Config, XV_vcresampler::IsReady, and XV_VCRESAMPLER_CTRL_ADDR_AP_CTRL.

Referenced by XV_VCrsmplStart().