cresample
Xilinx SDK Drivers API Documentation
Cresample_v4_1

Data Structures

struct  XCresample_Config
 This typedef contains configuration information for a Video device. More...
 
struct  XCresample
 The XCresample driver instance data structure. More...
 
struct  XHorizontal_Coeffs
 The XCoeffs is a structure contains predefined fixed coefficient values for Horizontal filter of two phases (phase 0 and phase 1). More...
 
struct  XVertical_Coeffs
 The XCoeffs is a structure contains predefined fixed coefficient values for Vertical filter of two phases (phase 0 and phase 1). More...
 

Macros

#define XCRESAMPLE_H_
 Prevent circular inclusions by using protection macros. More...
 
#define XCresample_Enable(InstancePtr)
 This macro enables the Chroma Resampler core. More...
 
#define XCresample_Disable(InstancePtr)
 This macro disables the Chroma Resampler core. More...
 
#define XCresample_Start   XCresample_Enable
 This macro enables/starts the Chroma Resampler core. More...
 
#define XCresample_Stop   XCresample_Disable
 This macro disables/stops the Chroma Resampler core. More...
 
#define XCresample_RegUpdateEnable(InstancePtr)
 This macro commits all the register value changes made so far by the software to the Chroma Resampler core. More...
 
#define XCresample_RegUpdateDisable(InstancePtr)
 This macro prevents the Chroma Resampler core from committing recent changes made so far by the software. More...
 
#define XCresample_SyncReset(InstancePtr)
 This macro resets a Chroma Resampler core instance, but differs from XCresample_Reset() in that it automatically synchronizes to the SOF input of the core to prevent tearing. More...
 
#define XCresample_Reset(InstancePtr)
 This macro resets the Chroma Resampler core. More...
 
#define XCresample_IntrEnable(InstancePtr, IntrType)
 This macro enables individual interrupts of the Cresample core by updating the IRQ_ENABLE register. More...
 
#define XCresample_IntrDisable(InstancePtr, IntrType)
 This macro disables individual interrupts of the Cresample core by updating the IRQ_ENABLE register. More...
 
#define XCresample_StatusGetPending(InstancePtr)
 This macro returns the pending interrupt status of the Cresample core read from the Status register. More...
 
#define XCresample_IntrGetPending(InstancePtr)
 This macro returns the pending interrupts of the Cresample core for the interrupts that have been enabled. More...
 
#define XCresample_IntrClear(InstancePtr, IntrType)
 This macro clears/acknowledges pending interrupts of the Cresample core in the Status register. More...
 
#define XCRESAMPLE_HW_H_
 Prevent circular inclusions by using protection macros. More...
 
#define XCRE_ACTIVE_SIZE_OFFSET   0x0020
 Horizontal and vertical active frame size. More...
 
#define XCRE_ENCODING_OFFSET   0x0028
 Frame encoding. More...
 
#define XCRE_COEF00_HPHASE0_OFFSET   0x0100
 Coefficient 00 of horizontal phase 0 filter. More...
 
#define XCRE_COEF01_HPHASE0_OFFSET   0x0104
 Coefficient 01 of horizontal phase 0 filter. More...
 
#define XCRE_COEF02_HPHASE0_OFFSET   0x0108
 Coefficient 02 of horizontal phase 0 filter. More...
 
#define XCRE_COEF03_HPHASE0_OFFSET   0x010C
 Coefficient 03 of horizontal phase 0 filter. More...
 
#define XCRE_COEF04_HPHASE0_OFFSET   0x0110
 Coefficient 04 of horizontal phase 0 filter. More...
 
#define XCRE_COEF05_HPHASE0_OFFSET   0x0114
 Coefficient 05 of horizontal phase 0 filter. More...
 
#define XCRE_COEF06_HPHASE0_OFFSET   0x0118
 Coefficient 06 of horizontal phase 0 filter. More...
 
#define XCRE_COEF07_HPHASE0_OFFSET   0x011C
 Coefficient 07 of horizontal phase 0 filter. More...
 
#define XCRE_COEF08_HPHASE0_OFFSET   0x0120
 Coefficient 08 of horizontal phase 0 filter. More...
 
#define XCRE_COEF09_HPHASE0_OFFSET   0x0124
 Coefficient 09 of horizontal phase 0 filter. More...
 
#define XCRE_COEF10_HPHASE0_OFFSET   0x0128
 Coefficient 10 of horizontal phase 0 filter. More...
 
#define XCRE_COEF11_HPHASE0_OFFSET   0x012C
 Coefficient 11 of horizontal phase 0 filter. More...
 
#define XCRE_COEF12_HPHASE0_OFFSET   0x0130
 Coefficient 12 of horizontal phase 0 filter. More...
 
#define XCRE_COEF13_HPHASE0_OFFSET   0x0134
 Coefficient 13 of horizontal phase 0 filter. More...
 
#define XCRE_COEF14_HPHASE0_OFFSET   0x0138
 Coefficient 14 of horizontal phase 0 filter. More...
 
#define XCRE_COEF15_HPHASE0_OFFSET   0x013C
 Coefficient 15 of horizontal phase 0 filter. More...
 
#define XCRE_COEF16_HPHASE0_OFFSET   0x0140
 Coefficient 16 of horizontal phase 0 filter. More...
 
#define XCRE_COEF17_HPHASE0_OFFSET   0x0144
 Coefficient 17 of horizontal phase 0 filter. More...
 
#define XCRE_COEF18_HPHASE0_OFFSET   0x0148
 Coefficient 18 of horizontal phase 0 filter. More...
 
#define XCRE_COEF19_HPHASE0_OFFSET   0x014C
 Coefficient 19 of horizontal phase 0 filter. More...
 
#define XCRE_COEF20_HPHASE0_OFFSET   0x0150
 Coefficient 20 of horizontal phase 0 filter. More...
 
#define XCRE_COEF21_HPHASE0_OFFSET   0x0154
 Coefficient 21 of horizontal phase 0 filter. More...
 
#define XCRE_COEF22_HPHASE0_OFFSET   0x0158
 Coefficient 22 of horizontal phase 0 filter. More...
 
#define XCRE_COEF23_HPHASE0_OFFSET   0x015C
 Coefficient 23 of horizontal phase 0 filter. More...
 
#define XCRE_COEF00_HPHASE1_OFFSET   0x0160
 Coefficient 00 of horizontal phase 1 filter. More...
 
#define XCRE_COEF01_HPHASE1_OFFSET   0x0164
 Coefficient 01 of horizontal phase 1 filter. More...
 
#define XCRE_COEF02_HPHASE1_OFFSET   0x0168
 Coefficient 02 of horizontal phase 1 filter. More...
 
#define XCRE_COEF03_HPHASE1_OFFSET   0x016C
 Coefficient 03 of horizontal phase 1 filter. More...
 
#define XCRE_COEF04_HPHASE1_OFFSET   0x0170
 Coefficient 04 of horizontal phase 1 filter. More...
 
#define XCRE_COEF05_HPHASE1_OFFSET   0x0174
 Coefficient 05 of horizontal phase 1 filter. More...
 
#define XCRE_COEF06_HPHASE1_OFFSET   0x0178
 Coefficient 06 of horizontal phase 1 filter. More...
 
#define XCRE_COEF07_HPHASE1_OFFSET   0x017C
 Coefficient 07 of horizontal phase 1 filter. More...
 
#define XCRE_COEF08_HPHASE1_OFFSET   0x0180
 Coefficient 08 of horizontal phase 1 filter. More...
 
#define XCRE_COEF09_HPHASE1_OFFSET   0x0184
 Coefficient 09 of horizontal phase 1 filter. More...
 
#define XCRE_COEF10_HPHASE1_OFFSET   0x0188
 Coefficient 10 of horizontal phase 1 filter. More...
 
#define XCRE_COEF11_HPHASE1_OFFSET   0x018C
 Coefficient 11 of horizontal phase 1 filter. More...
 
#define XCRE_COEF12_HPHASE1_OFFSET   0x0190
 Coefficient 12 of horizontal phase 1 filter. More...
 
#define XCRE_COEF13_HPHASE1_OFFSET   0x0194
 Coefficient 13 of horizontal phase 1 filter. More...
 
#define XCRE_COEF14_HPHASE1_OFFSET   0x0198
 Coefficient 14 of horizontal phase 1 filter. More...
 
#define XCRE_COEF15_HPHASE1_OFFSET   0x019C
 Coefficient 15 of horizontal phase 1 filter. More...
 
#define XCRE_COEF16_HPHASE1_OFFSET   0x01A0
 Coefficient 16 of horizontal phase 1 filter. More...
 
#define XCRE_COEF17_HPHASE1_OFFSET   0x01A4
 Coefficient 17 of horizontal phase 1 filter. More...
 
#define XCRE_COEF18_HPHASE1_OFFSET   0x01A8
 Coefficient 18 of horizontal phase 1 filter. More...
 
#define XCRE_COEF19_HPHASE1_OFFSET   0x01AC
 Coefficient 19 of horizontal phase 1 filter. More...
 
#define XCRE_COEF20_HPHASE1_OFFSET   0x01B0
 Coefficient 20 of horizontal phase 1 filter. More...
 
#define XCRE_COEF21_HPHASE1_OFFSET   0x01B4
 Coefficient 21 of horizontal phase 1 filter. More...
 
#define XCRE_COEF22_HPHASE1_OFFSET   0x01B8
 Coefficient 22 of horizontal phase 1 filter. More...
 
#define XCRE_COEF23_HPHASE1_OFFSET   0x01BC
 Coefficient 23 of horizontal phase 1 filter. More...
 
#define XCRE_COEF00_VPHASE0_OFFSET   0x01C0
 Coefficient 00 of vertical phase 0 filter. More...
 
#define XCRE_COEF01_VPHASE0_OFFSET   0x01C4
 Coefficient 01 of vertical phase 0 filter. More...
 
#define XCRE_COEF02_VPHASE0_OFFSET   0x01C8
 Coefficient 02 of vertical phase 0 filter. More...
 
#define XCRE_COEF03_VPHASE0_OFFSET   0x01CC
 Coefficient 03 of vertical phase 0 filter. More...
 
#define XCRE_COEF04_VPHASE0_OFFSET   0x01D0
 Coefficient 04 of vertical phase 0 filter. More...
 
#define XCRE_COEF05_VPHASE0_OFFSET   0x01D4
 Coefficient 05 of vertical phase 0 filter. More...
 
#define XCRE_COEF06_VPHASE0_OFFSET   0x01D8
 Coefficient 06 of vertical phase 0 filter. More...
 
#define XCRE_COEF07_VPHASE0_OFFSET   0x01DC
 Coefficient 07 of vertical phase 0 filter. More...
 
#define XCRE_COEF00_VPHASE1_OFFSET   0x01E0
 Coefficient 00 of vertical phase 1 filter. More...
 
#define XCRE_COEF01_VPHASE1_OFFSET   0x01E4
 Coefficient 01 of vertical phase 1 filter. More...
 
#define XCRE_COEF02_VPHASE1_OFFSET   0x01E8
 Coefficient 02 of vertical phase 1 filter. More...
 
#define XCRE_COEF03_VPHASE1_OFFSET   0x01EC
 Coefficient 03 of vertical phase 1 filter. More...
 
#define XCRE_COEF04_VPHASE1_OFFSET   0x01F0
 Coefficient 04 of vertical phase 1 filter. More...
 
#define XCRE_COEF05_VPHASE1_OFFSET   0x01F4
 Coefficient 05 of vertical phase 1 filter. More...
 
#define XCRE_COEF06_VPHASE1_OFFSET   0x01F8
 Coefficient 06 of vertical phase 1 filter. More...
 
#define XCRE_COEF07_VPHASE1_OFFSET   0x01FC
 Coefficient 07 of vertical phase 1 filter. More...
 

Typedefs

typedef void(* XCresample_CallBack) (void *CallBackRef)
 Callback type for all interrupts except error interrupt. More...
 
typedef void(* XCresample_ErrorCallBack) (void *CallBackRef, u32 ErrorMask)
 Callback type for Error interrupt. More...
 

Functions

int XCresample_CfgInitialize (XCresample *InstancePtr, XCresample_Config *CfgPtr, u32 EffectiveAddr)
 This function initializes the Cresample core. More...
 
void XCresample_EnableDbgByPass (XCresample *InstancePtr)
 This function enables the bypass mode by setting bypass bit of the Control register to switch the core to bypass mode if debug feature is enabled in the core. More...
 
int XCresample_IsDbgByPassEnabled (XCresample *InstancePtr)
 This function returns the current bypass mode settings from Control register of the Chroma Resampler core. More...
 
void XCresample_DisableDbgBypass (XCresample *InstancePtr)
 This function disables bypass mode of the Chroma Resampler core. More...
 
void XCresample_EnableDbgTestPattern (XCresample *InstancePtr)
 This function enables the test-pattern mode if debug feature is enabled by setting test-pattern bit of the Control register of the Chroma Resampler core. More...
 
int XCresample_IsDbgTestPatternEnabled (XCresample *InstancePtr)
 This function returns the test-pattern mode (enabled or not) from Control register of the Chroma Resampler core. More...
 
void XCresample_DisableDbgTestPattern (XCresample *InstancePtr)
 This function disables debug test pattern mode in Control register of the Chroma Resampler core, if Debug feature is enabled. More...
 
u32 XCresample_GetVersion (XCresample *InstancePtr)
 This function returns the version of the Chroma Resampler core. More...
 
u32 XCresample_GetDbgFrameCount (XCresample *InstancePtr)
 This function returns the number of frames processed since power-up or last time the core is reset. More...
 
u32 XCresample_GetDbgLineCount (XCresample *InstancePtr)
 This function returns the number of lines processed since power-up or last time the core is reset. More...
 
u32 XCresample_GetDbgPixelCount (XCresample *InstancePtr)
 This function returns the number of pixels processed since power-up or last time the core is reset. More...
 
void XCresample_SetActiveSize (XCresample *InstancePtr, u16 HSize, u16 VSize)
 This function sets the active H/V sizes in the Active Size register. More...
 
void XCresample_GetActiveSize (XCresample *InstancePtr, u16 *HSize, u16 *VSize)
 This function gets the number of Active Pixels per Scan line and number of Active Lines per Frame from the Active Size register. More...
 
void XCresample_SetFieldParity (XCresample *InstancePtr, u8 FieldParity)
 This functions sets the field parity value of the Chroma Resampler core in the Encoding register. More...
 
u8 XCresample_GetFieldParity (XCresample *InstancePtr)
 This function returns the field parity value of the Chroma Resampler core from Encoding register. More...
 
void XCresample_SetChromaParity (XCresample *InstancePtr, u8 ChromaParity)
 This functions sets the Chroma parity value of the Chroma Resampler core in the Encoding register. More...
 
u8 XCresample_GetChromaParity (XCresample *InstancePtr)
 This function returns the value of chroma parity of the Chroma Resampler core from Encoding register. More...
 
void XCresample_SetHCoefs (XCresample *InstancePtr, XHorizontal_Coeffs *Coeff, u32 Phases)
 This function sets the horizontal coefficient values of the Chroma Resampler core for phase 0 or phase 1 or both phases. More...
 
void XCresample_GetHCoefs (XCresample *InstancePtr, XHorizontal_Coeffs *Coeff)
 This function gets the coefficient values from all the Horizontal Coefficient registers of phase0 and phase1 of the Chroma Resampler core. More...
 
void XCresample_SetVCoefs (XCresample *InstancePtr, XVertical_Coeffs *Coeff, u32 Phases)
 This function sets the vertical coefficient values of the Chroma Resampler for phase 0 or for phase 1 or for both phases. More...
 
void XCresample_GetVCoefs (XCresample *InstancePtr, XVertical_Coeffs *Coeff)
 This function gets the vertical coefficient values of the Chroma Resampler core from all Vertical Coefficient registers of phase0 and phase1. More...
 
void XCresample_Clear_HCoef_Values (XCresample *InstancePtr)
 This function clears all horizontal coefficients of the Chroma Resampler core which are previously set. More...
 
void XCresample_Clear_VCoef_Values (XCresample *InstancePtr)
 This function clears all vertical coefficients of a the Chroma Resampler which are previously set. More...
 
XCresample_ConfigXCresample_LookupConfig (u16 DeviceId)
 This function returns a reference to an XCresample_Config structure based on the unique device id, DeviceId. More...
 
int XCresample_SelfTest (XCresample *InstancePtr)
 This function reads version register of Chroma Resampler core and compares with zero as part of self test. More...
 
int XCresample_SetCallBack (XCresample *InstancePtr, u32 HandlerType, void *CallBackFunc, void *CallBackRef)
 This routine installs an asynchronous callback function for the given HandlerType: More...
 
void XCresample_IntrHandler (void *InstancePtr)
 This function is the interrupt handler for the Chroma Resampler driver. More...
 

Interrupt types for setting up callbacks

enum  { XCRE_HANDLER_PROCSTART = 1, XCRE_HANDLER_FRAMEDONE, XCRE_HANDLER_ERROR }
 These constants specify different types of handler and used to differentiate interrupt requests from core. More...
 

Active size ranges

#define XCRE_ACT_SIZE_FIRST   32
 Active Size starting value. More...
 
#define XCRE_ACT_SIZE_LAST   7680
 Active Size ending value. More...
 

Parity valid values

#define XCRE_PARITY_ODD   1
 For odd (or top) field it is 1. More...
 
#define XCRE_PARITY_EVEN   0
 For even (or bottom) field it is 0. More...
 

Coefficient ranges

#define XCRE_COEF_FIRST   -2.0
 Coefficient start value. More...
 
#define XCRE_COEF_LAST   2.0
 Coefficient end value. More...
 
#define XCRE_OFFSET_DIFF   4
 Coefficient offset difference. More...
 

Number of phases

#define XCRE_NUM_OF_PHASES   2
 Number of phases. More...
 

Number of coefficients

#define XCRE_NUM_HCOEFS   24
 Number of horizontal coefficients. More...
 
#define XCRE_NUM_VCOEFS   8
 Number of vertical coefficients. More...
 

register offsets

#define XCRE_CONTROL_OFFSET   0x0000
 Control. More...
 
#define XCRE_STATUS_OFFSET   0x0004
 Status. More...
 
#define XCRE_ERROR_OFFSET   0x0008
 Error. More...
 
#define XCRE_IRQ_EN_OFFSET   0x000C
 IRQ enable. More...
 
#define XCRE_VERSION_OFFSET   0x0010
 Version. More...
 
#define XCRE_SYSDEBUG0_OFFSET   0x0014
 System debug 0. More...
 
#define XCRE_SYSDEBUG1_OFFSET   0x0018
 System debug 1. More...
 
#define XCRE_SYSDEBUG2_OFFSET   0x001C
 System debug 2. More...
 

Macro Definition Documentation

◆ XCRE_ACT_SIZE_FIRST

#define XCRE_ACT_SIZE_FIRST   32

#include <xcresample.h>

Active Size starting value.

Referenced by XCresample_SetActiveSize().

◆ XCRE_ACT_SIZE_LAST

#define XCRE_ACT_SIZE_LAST   7680

#include <xcresample.h>

Active Size ending value.

Referenced by XCresample_SetActiveSize().

◆ XCRE_ACTIVE_SIZE_OFFSET

#define XCRE_ACTIVE_SIZE_OFFSET   0x0020

#include <xcresample_hw.h>

Horizontal and vertical active frame size.

Referenced by XCresample_GetActiveSize(), and XCresample_SetActiveSize().

◆ XCRE_COEF00_HPHASE0_OFFSET

#define XCRE_COEF00_HPHASE0_OFFSET   0x0100

#include <xcresample_hw.h>

Coefficient 00 of horizontal phase 0 filter.

Referenced by XCresample_Clear_HCoef_Values(), XCresample_GetHCoefs(), and XCresample_SetHCoefs().

◆ XCRE_COEF00_HPHASE1_OFFSET

#define XCRE_COEF00_HPHASE1_OFFSET   0x0160

#include <xcresample_hw.h>

Coefficient 00 of horizontal phase 1 filter.

Referenced by XCresample_SetHCoefs().

◆ XCRE_COEF00_VPHASE0_OFFSET

#define XCRE_COEF00_VPHASE0_OFFSET   0x01C0

#include <xcresample_hw.h>

Coefficient 00 of vertical phase 0 filter.

Referenced by XCresample_Clear_VCoef_Values(), XCresample_GetVCoefs(), and XCresample_SetVCoefs().

◆ XCRE_COEF00_VPHASE1_OFFSET

#define XCRE_COEF00_VPHASE1_OFFSET   0x01E0

#include <xcresample_hw.h>

Coefficient 00 of vertical phase 1 filter.

Referenced by XCresample_SetVCoefs().

◆ XCRE_COEF01_HPHASE0_OFFSET

#define XCRE_COEF01_HPHASE0_OFFSET   0x0104

#include <xcresample_hw.h>

Coefficient 01 of horizontal phase 0 filter.

◆ XCRE_COEF01_HPHASE1_OFFSET

#define XCRE_COEF01_HPHASE1_OFFSET   0x0164

#include <xcresample_hw.h>

Coefficient 01 of horizontal phase 1 filter.

◆ XCRE_COEF01_VPHASE0_OFFSET

#define XCRE_COEF01_VPHASE0_OFFSET   0x01C4

#include <xcresample_hw.h>

Coefficient 01 of vertical phase 0 filter.

◆ XCRE_COEF01_VPHASE1_OFFSET

#define XCRE_COEF01_VPHASE1_OFFSET   0x01E4

#include <xcresample_hw.h>

Coefficient 01 of vertical phase 1 filter.

◆ XCRE_COEF02_HPHASE0_OFFSET

#define XCRE_COEF02_HPHASE0_OFFSET   0x0108

#include <xcresample_hw.h>

Coefficient 02 of horizontal phase 0 filter.

◆ XCRE_COEF02_HPHASE1_OFFSET

#define XCRE_COEF02_HPHASE1_OFFSET   0x0168

#include <xcresample_hw.h>

Coefficient 02 of horizontal phase 1 filter.

◆ XCRE_COEF02_VPHASE0_OFFSET

#define XCRE_COEF02_VPHASE0_OFFSET   0x01C8

#include <xcresample_hw.h>

Coefficient 02 of vertical phase 0 filter.

◆ XCRE_COEF02_VPHASE1_OFFSET

#define XCRE_COEF02_VPHASE1_OFFSET   0x01E8

#include <xcresample_hw.h>

Coefficient 02 of vertical phase 1 filter.

◆ XCRE_COEF03_HPHASE0_OFFSET

#define XCRE_COEF03_HPHASE0_OFFSET   0x010C

#include <xcresample_hw.h>

Coefficient 03 of horizontal phase 0 filter.

◆ XCRE_COEF03_HPHASE1_OFFSET

#define XCRE_COEF03_HPHASE1_OFFSET   0x016C

#include <xcresample_hw.h>

Coefficient 03 of horizontal phase 1 filter.

◆ XCRE_COEF03_VPHASE0_OFFSET

#define XCRE_COEF03_VPHASE0_OFFSET   0x01CC

#include <xcresample_hw.h>

Coefficient 03 of vertical phase 0 filter.

◆ XCRE_COEF03_VPHASE1_OFFSET

#define XCRE_COEF03_VPHASE1_OFFSET   0x01EC

#include <xcresample_hw.h>

Coefficient 03 of vertical phase 1 filter.

◆ XCRE_COEF04_HPHASE0_OFFSET

#define XCRE_COEF04_HPHASE0_OFFSET   0x0110

#include <xcresample_hw.h>

Coefficient 04 of horizontal phase 0 filter.

◆ XCRE_COEF04_HPHASE1_OFFSET

#define XCRE_COEF04_HPHASE1_OFFSET   0x0170

#include <xcresample_hw.h>

Coefficient 04 of horizontal phase 1 filter.

◆ XCRE_COEF04_VPHASE0_OFFSET

#define XCRE_COEF04_VPHASE0_OFFSET   0x01D0

#include <xcresample_hw.h>

Coefficient 04 of vertical phase 0 filter.

◆ XCRE_COEF04_VPHASE1_OFFSET

#define XCRE_COEF04_VPHASE1_OFFSET   0x01F0

#include <xcresample_hw.h>

Coefficient 04 of vertical phase 1 filter.

◆ XCRE_COEF05_HPHASE0_OFFSET

#define XCRE_COEF05_HPHASE0_OFFSET   0x0114

#include <xcresample_hw.h>

Coefficient 05 of horizontal phase 0 filter.

◆ XCRE_COEF05_HPHASE1_OFFSET

#define XCRE_COEF05_HPHASE1_OFFSET   0x0174

#include <xcresample_hw.h>

Coefficient 05 of horizontal phase 1 filter.

◆ XCRE_COEF05_VPHASE0_OFFSET

#define XCRE_COEF05_VPHASE0_OFFSET   0x01D4

#include <xcresample_hw.h>

Coefficient 05 of vertical phase 0 filter.

◆ XCRE_COEF05_VPHASE1_OFFSET

#define XCRE_COEF05_VPHASE1_OFFSET   0x01F4

#include <xcresample_hw.h>

Coefficient 05 of vertical phase 1 filter.

◆ XCRE_COEF06_HPHASE0_OFFSET

#define XCRE_COEF06_HPHASE0_OFFSET   0x0118

#include <xcresample_hw.h>

Coefficient 06 of horizontal phase 0 filter.

◆ XCRE_COEF06_HPHASE1_OFFSET

#define XCRE_COEF06_HPHASE1_OFFSET   0x0178

#include <xcresample_hw.h>

Coefficient 06 of horizontal phase 1 filter.

◆ XCRE_COEF06_VPHASE0_OFFSET

#define XCRE_COEF06_VPHASE0_OFFSET   0x01D8

#include <xcresample_hw.h>

Coefficient 06 of vertical phase 0 filter.

◆ XCRE_COEF06_VPHASE1_OFFSET

#define XCRE_COEF06_VPHASE1_OFFSET   0x01F8

#include <xcresample_hw.h>

Coefficient 06 of vertical phase 1 filter.

◆ XCRE_COEF07_HPHASE0_OFFSET

#define XCRE_COEF07_HPHASE0_OFFSET   0x011C

#include <xcresample_hw.h>

Coefficient 07 of horizontal phase 0 filter.

◆ XCRE_COEF07_HPHASE1_OFFSET

#define XCRE_COEF07_HPHASE1_OFFSET   0x017C

#include <xcresample_hw.h>

Coefficient 07 of horizontal phase 1 filter.

◆ XCRE_COEF07_VPHASE0_OFFSET

#define XCRE_COEF07_VPHASE0_OFFSET   0x01DC

#include <xcresample_hw.h>

Coefficient 07 of vertical phase 0 filter.

◆ XCRE_COEF07_VPHASE1_OFFSET

#define XCRE_COEF07_VPHASE1_OFFSET   0x01FC

#include <xcresample_hw.h>

Coefficient 07 of vertical phase 1 filter.

◆ XCRE_COEF08_HPHASE0_OFFSET

#define XCRE_COEF08_HPHASE0_OFFSET   0x0120

#include <xcresample_hw.h>

Coefficient 08 of horizontal phase 0 filter.

◆ XCRE_COEF08_HPHASE1_OFFSET

#define XCRE_COEF08_HPHASE1_OFFSET   0x0180

#include <xcresample_hw.h>

Coefficient 08 of horizontal phase 1 filter.

◆ XCRE_COEF09_HPHASE0_OFFSET

#define XCRE_COEF09_HPHASE0_OFFSET   0x0124

#include <xcresample_hw.h>

Coefficient 09 of horizontal phase 0 filter.

◆ XCRE_COEF09_HPHASE1_OFFSET

#define XCRE_COEF09_HPHASE1_OFFSET   0x0184

#include <xcresample_hw.h>

Coefficient 09 of horizontal phase 1 filter.

◆ XCRE_COEF10_HPHASE0_OFFSET

#define XCRE_COEF10_HPHASE0_OFFSET   0x0128

#include <xcresample_hw.h>

Coefficient 10 of horizontal phase 0 filter.

◆ XCRE_COEF10_HPHASE1_OFFSET

#define XCRE_COEF10_HPHASE1_OFFSET   0x0188

#include <xcresample_hw.h>

Coefficient 10 of horizontal phase 1 filter.

◆ XCRE_COEF11_HPHASE0_OFFSET

#define XCRE_COEF11_HPHASE0_OFFSET   0x012C

#include <xcresample_hw.h>

Coefficient 11 of horizontal phase 0 filter.

◆ XCRE_COEF11_HPHASE1_OFFSET

#define XCRE_COEF11_HPHASE1_OFFSET   0x018C

#include <xcresample_hw.h>

Coefficient 11 of horizontal phase 1 filter.

◆ XCRE_COEF12_HPHASE0_OFFSET

#define XCRE_COEF12_HPHASE0_OFFSET   0x0130

#include <xcresample_hw.h>

Coefficient 12 of horizontal phase 0 filter.

◆ XCRE_COEF12_HPHASE1_OFFSET

#define XCRE_COEF12_HPHASE1_OFFSET   0x0190

#include <xcresample_hw.h>

Coefficient 12 of horizontal phase 1 filter.

◆ XCRE_COEF13_HPHASE0_OFFSET

#define XCRE_COEF13_HPHASE0_OFFSET   0x0134

#include <xcresample_hw.h>

Coefficient 13 of horizontal phase 0 filter.

◆ XCRE_COEF13_HPHASE1_OFFSET

#define XCRE_COEF13_HPHASE1_OFFSET   0x0194

#include <xcresample_hw.h>

Coefficient 13 of horizontal phase 1 filter.

◆ XCRE_COEF14_HPHASE0_OFFSET

#define XCRE_COEF14_HPHASE0_OFFSET   0x0138

#include <xcresample_hw.h>

Coefficient 14 of horizontal phase 0 filter.

◆ XCRE_COEF14_HPHASE1_OFFSET

#define XCRE_COEF14_HPHASE1_OFFSET   0x0198

#include <xcresample_hw.h>

Coefficient 14 of horizontal phase 1 filter.

◆ XCRE_COEF15_HPHASE0_OFFSET

#define XCRE_COEF15_HPHASE0_OFFSET   0x013C

#include <xcresample_hw.h>

Coefficient 15 of horizontal phase 0 filter.

◆ XCRE_COEF15_HPHASE1_OFFSET

#define XCRE_COEF15_HPHASE1_OFFSET   0x019C

#include <xcresample_hw.h>

Coefficient 15 of horizontal phase 1 filter.

◆ XCRE_COEF16_HPHASE0_OFFSET

#define XCRE_COEF16_HPHASE0_OFFSET   0x0140

#include <xcresample_hw.h>

Coefficient 16 of horizontal phase 0 filter.

◆ XCRE_COEF16_HPHASE1_OFFSET

#define XCRE_COEF16_HPHASE1_OFFSET   0x01A0

#include <xcresample_hw.h>

Coefficient 16 of horizontal phase 1 filter.

◆ XCRE_COEF17_HPHASE0_OFFSET

#define XCRE_COEF17_HPHASE0_OFFSET   0x0144

#include <xcresample_hw.h>

Coefficient 17 of horizontal phase 0 filter.

◆ XCRE_COEF17_HPHASE1_OFFSET

#define XCRE_COEF17_HPHASE1_OFFSET   0x01A4

#include <xcresample_hw.h>

Coefficient 17 of horizontal phase 1 filter.

◆ XCRE_COEF18_HPHASE0_OFFSET

#define XCRE_COEF18_HPHASE0_OFFSET   0x0148

#include <xcresample_hw.h>

Coefficient 18 of horizontal phase 0 filter.

◆ XCRE_COEF18_HPHASE1_OFFSET

#define XCRE_COEF18_HPHASE1_OFFSET   0x01A8

#include <xcresample_hw.h>

Coefficient 18 of horizontal phase 1 filter.

◆ XCRE_COEF19_HPHASE0_OFFSET

#define XCRE_COEF19_HPHASE0_OFFSET   0x014C

#include <xcresample_hw.h>

Coefficient 19 of horizontal phase 0 filter.

◆ XCRE_COEF19_HPHASE1_OFFSET

#define XCRE_COEF19_HPHASE1_OFFSET   0x01AC

#include <xcresample_hw.h>

Coefficient 19 of horizontal phase 1 filter.

◆ XCRE_COEF20_HPHASE0_OFFSET

#define XCRE_COEF20_HPHASE0_OFFSET   0x0150

#include <xcresample_hw.h>

Coefficient 20 of horizontal phase 0 filter.

◆ XCRE_COEF20_HPHASE1_OFFSET

#define XCRE_COEF20_HPHASE1_OFFSET   0x01B0

#include <xcresample_hw.h>

Coefficient 20 of horizontal phase 1 filter.

◆ XCRE_COEF21_HPHASE0_OFFSET

#define XCRE_COEF21_HPHASE0_OFFSET   0x0154

#include <xcresample_hw.h>

Coefficient 21 of horizontal phase 0 filter.

◆ XCRE_COEF21_HPHASE1_OFFSET

#define XCRE_COEF21_HPHASE1_OFFSET   0x01B4

#include <xcresample_hw.h>

Coefficient 21 of horizontal phase 1 filter.

◆ XCRE_COEF22_HPHASE0_OFFSET

#define XCRE_COEF22_HPHASE0_OFFSET   0x0158

#include <xcresample_hw.h>

Coefficient 22 of horizontal phase 0 filter.

◆ XCRE_COEF22_HPHASE1_OFFSET

#define XCRE_COEF22_HPHASE1_OFFSET   0x01B8

#include <xcresample_hw.h>

Coefficient 22 of horizontal phase 1 filter.

◆ XCRE_COEF23_HPHASE0_OFFSET

#define XCRE_COEF23_HPHASE0_OFFSET   0x015C

#include <xcresample_hw.h>

Coefficient 23 of horizontal phase 0 filter.

◆ XCRE_COEF23_HPHASE1_OFFSET

#define XCRE_COEF23_HPHASE1_OFFSET   0x01BC

#include <xcresample_hw.h>

Coefficient 23 of horizontal phase 1 filter.

◆ XCRE_COEF_FIRST

#define XCRE_COEF_FIRST   -2.0

#include <xcresample.h>

Coefficient start value.

◆ XCRE_COEF_LAST

#define XCRE_COEF_LAST   2.0

#include <xcresample.h>

Coefficient end value.

◆ XCRE_CONTROL_OFFSET

◆ XCRE_ENCODING_OFFSET

#define XCRE_ENCODING_OFFSET   0x0028

◆ XCRE_ERROR_OFFSET

#define XCRE_ERROR_OFFSET   0x0008

#include <xcresample_hw.h>

Error.

◆ XCRE_IRQ_EN_OFFSET

#define XCRE_IRQ_EN_OFFSET   0x000C

#include <xcresample_hw.h>

IRQ enable.

◆ XCRE_NUM_HCOEFS

#define XCRE_NUM_HCOEFS   24

#include <xcresample.h>

Number of horizontal coefficients.

Referenced by XCresample_Clear_HCoef_Values(), and XCresample_GetHCoefs().

◆ XCRE_NUM_OF_PHASES

◆ XCRE_NUM_VCOEFS

#define XCRE_NUM_VCOEFS   8

#include <xcresample.h>

Number of vertical coefficients.

Referenced by XCresample_Clear_VCoef_Values(), and XCresample_GetVCoefs().

◆ XCRE_OFFSET_DIFF

#define XCRE_OFFSET_DIFF   4

#include <xcresample.h>

Coefficient offset difference.

Referenced by XCresample_Clear_HCoef_Values(), and XCresample_Clear_VCoef_Values().

◆ XCRE_PARITY_EVEN

#define XCRE_PARITY_EVEN   0

#include <xcresample.h>

For even (or bottom) field it is 0.

Referenced by XCresample_SetChromaParity(), and XCresample_SetFieldParity().

◆ XCRE_PARITY_ODD

#define XCRE_PARITY_ODD   1

#include <xcresample.h>

For odd (or top) field it is 1.

Referenced by XCresample_SetChromaParity(), and XCresample_SetFieldParity().

◆ XCRE_STATUS_OFFSET

#define XCRE_STATUS_OFFSET   0x0004

#include <xcresample_hw.h>

Status.

◆ XCRE_SYSDEBUG0_OFFSET

#define XCRE_SYSDEBUG0_OFFSET   0x0014

#include <xcresample_hw.h>

System debug 0.

Referenced by XCresample_GetDbgFrameCount().

◆ XCRE_SYSDEBUG1_OFFSET

#define XCRE_SYSDEBUG1_OFFSET   0x0018

#include <xcresample_hw.h>

System debug 1.

Referenced by XCresample_GetDbgLineCount().

◆ XCRE_SYSDEBUG2_OFFSET

#define XCRE_SYSDEBUG2_OFFSET   0x001C

#include <xcresample_hw.h>

System debug 2.

Referenced by XCresample_GetDbgPixelCount().

◆ XCRE_VERSION_OFFSET

#define XCRE_VERSION_OFFSET   0x0010

#include <xcresample_hw.h>

Version.

Referenced by XCresample_GetVersion(), and XCresample_SelfTest().

◆ XCresample_Disable

#define XCresample_Disable (   InstancePtr)

#include <xcresample.h>

Value:
XCresample_WriteReg((InstancePtr)->Config.BaseAddress, \
((XCresample_ReadReg((InstancePtr)->Config.BaseAddress, \
#define XCresample_ReadReg(BaseAddress, RegOffset)
This macro reads the given register.
Definition: xcresample_hw.h:660
#define XCresample_WriteReg(BaseAddress, RegOffset, Data)
This macro writes into the given register.
Definition: xcresample_hw.h:681
#define XCRE_CONTROL_OFFSET
Control.
Definition: xcresample_hw.h:70
#define XCRE_CTL_SW_EN_MASK
Enable mask.
Definition: xcresample_hw.h:416

This macro disables the Chroma Resampler core.

Parameters
InstancePtris a pointer to the XCresample instance to be worked on.
Returns
None.
Note
C-style signature: void XCresample_Disable(XCresample *InstancePtr)

◆ XCresample_Enable

#define XCresample_Enable (   InstancePtr)

#include <xcresample.h>

Value:
XCresample_WriteReg((InstancePtr)->Config.BaseAddress, \
((XCresample_ReadReg((InstancePtr)->Config.BaseAddress, \
#define XCresample_ReadReg(BaseAddress, RegOffset)
This macro reads the given register.
Definition: xcresample_hw.h:660
#define XCresample_WriteReg(BaseAddress, RegOffset, Data)
This macro writes into the given register.
Definition: xcresample_hw.h:681
#define XCRE_CONTROL_OFFSET
Control.
Definition: xcresample_hw.h:70
#define XCRE_CTL_SW_EN_MASK
Enable mask.
Definition: xcresample_hw.h:416

This macro enables the Chroma Resampler core.

Parameters
InstancePtris a pointer to the XCresample instance to be worked on.
Returns
None.
Note
C-style signature: void XCresample_Enable(XCresample *InstancePtr)

◆ XCRESAMPLE_H_

#define XCRESAMPLE_H_

#include <xcresample.h>

Prevent circular inclusions by using protection macros.

◆ XCRESAMPLE_HW_H_

#define XCRESAMPLE_HW_H_

#include <xcresample_hw.h>

Prevent circular inclusions by using protection macros.

◆ XCresample_IntrClear

#define XCresample_IntrClear (   InstancePtr,
  IntrType 
)

#include <xcresample.h>

Value:
XCresample_WriteReg((InstancePtr)->Config.BaseAddress, \
((IntrType) & ((u32)(XCRE_IXR_ALLINTR_MASK))))
#define XCRE_STATUS_OFFSET
Status.
Definition: xcresample_hw.h:71
#define XCresample_WriteReg(BaseAddress, RegOffset, Data)
This macro writes into the given register.
Definition: xcresample_hw.h:681
#define XCRE_IXR_ALLINTR_MASK
OR of all mask.
Definition: xcresample_hw.h:437

This macro clears/acknowledges pending interrupts of the Cresample core in the Status register.

Bit positions of 1 will be cleared.

Parameters
InstancePtris a pointer to the XCresample instance to be worked on.
IntrTypeis the pending interrupts to clear/acknowledge. Use OR'ing of XCRE_IXR_*_MASK constants defined in xcresample_hw.h to create this parameter value.
Returns
None
Note
C-style signature: void XCresample_IntrClear(XCresample *InstancePtr, u32 IntrType)

Referenced by XCresample_IntrHandler().

◆ XCresample_IntrDisable

#define XCresample_IntrDisable (   InstancePtr,
  IntrType 
)

#include <xcresample.h>

Value:
XCresample_WriteReg((InstancePtr)->Config.BaseAddress, \
((XCresample_ReadReg((InstancePtr)->Config.BaseAddress, \
& ((~(IntrType)) & (XCRE_IXR_ALLINTR_MASK))))
#define XCresample_ReadReg(BaseAddress, RegOffset)
This macro reads the given register.
Definition: xcresample_hw.h:660
#define XCresample_WriteReg(BaseAddress, RegOffset, Data)
This macro writes into the given register.
Definition: xcresample_hw.h:681
#define XCRE_IXR_ALLINTR_MASK
OR of all mask.
Definition: xcresample_hw.h:437
#define XCRE_IRQ_EN_OFFSET
IRQ enable.
Definition: xcresample_hw.h:73

This macro disables individual interrupts of the Cresample core by updating the IRQ_ENABLE register.

Parameters
InstancePtris a pointer to the XCresample instance to be worked on.
IntrTypeis the type of the interrupts to disable. Use OR'ing of XCRE_IXR_*_MASK constants defined in xcresample_hw.h to create this parameter value.
Returns
None
Note
Any other interrupt not covered by parameter IntrType, if enabled before this macro is called, will remain enabled. C-style signature: void XCresample_IntrDisable(XCresample *InstancePtr, u32 IntrType)

◆ XCresample_IntrEnable

#define XCresample_IntrEnable (   InstancePtr,
  IntrType 
)

#include <xcresample.h>

Value:
XCresample_WriteReg((InstancePtr)->Config.BaseAddress, \
(((IntrType) & (XCRE_IXR_ALLINTR_MASK)) | \
(XCresample_ReadReg((InstancePtr)->Config.BaseAddress, \
#define XCresample_ReadReg(BaseAddress, RegOffset)
This macro reads the given register.
Definition: xcresample_hw.h:660
#define XCresample_WriteReg(BaseAddress, RegOffset, Data)
This macro writes into the given register.
Definition: xcresample_hw.h:681
#define XCRE_IXR_ALLINTR_MASK
OR of all mask.
Definition: xcresample_hw.h:437
#define XCRE_IRQ_EN_OFFSET
IRQ enable.
Definition: xcresample_hw.h:73

This macro enables individual interrupts of the Cresample core by updating the IRQ_ENABLE register.

Parameters
InstancePtris a pointer to the XCresample instance to be worked on.
IntrTypeis the type of the interrupts to enable. Use OR'ing of XCRE_IXR_*_MASK constants defined in xcresample_hw.h to create this parameter value.
Returns
None
Note
The existing enabled interrupt(s) will remain enabled. C-style signature: void XCresample_IntrEnable(XCresample *InstancePtr, u32 IntrType)

◆ XCresample_IntrGetPending

#define XCresample_IntrGetPending (   InstancePtr)

#include <xcresample.h>

Value:
XCresample_ReadReg((InstancePtr)->Config.BaseAddress, \
((XCresample_ReadReg((InstancePtr)->Config.BaseAddress, \
#define XCresample_ReadReg(BaseAddress, RegOffset)
This macro reads the given register.
Definition: xcresample_hw.h:660
#define XCRE_STATUS_OFFSET
Status.
Definition: xcresample_hw.h:71
#define XCRE_IXR_ALLINTR_MASK
OR of all mask.
Definition: xcresample_hw.h:437
#define XCRE_IRQ_EN_OFFSET
IRQ enable.
Definition: xcresample_hw.h:73

This macro returns the pending interrupts of the Cresample core for the interrupts that have been enabled.

Parameters
InstancePtris a pointer to the XCresample instance to be worked on.
Returns
The pending interrupts of the Chroma Resampler. Use XCRE_IXR_*_MASK constants defined in xcresample_hw.h to interpret this value.
Note
C-style signature: u32 XCresample_IntrGetPending(XCresample *InstancePtr)

Referenced by XCresample_IntrHandler().

◆ XCresample_RegUpdateDisable

#define XCresample_RegUpdateDisable (   InstancePtr)

#include <xcresample.h>

Value:
XCresample_WriteReg((InstancePtr)->Config.BaseAddress, \
((XCresample_ReadReg((InstancePtr)->Config.BaseAddress, \
#define XCresample_ReadReg(BaseAddress, RegOffset)
This macro reads the given register.
Definition: xcresample_hw.h:660
#define XCresample_WriteReg(BaseAddress, RegOffset, Data)
This macro writes into the given register.
Definition: xcresample_hw.h:681
#define XCRE_CONTROL_OFFSET
Control.
Definition: xcresample_hw.h:70
#define XCRE_CTL_RUE_MASK
Register update mask.
Definition: xcresample_hw.h:417

This macro prevents the Chroma Resampler core from committing recent changes made so far by the software.

When disabled, changes to other configuration registers are stored, but do not effect the behavior of the core.

This macro only works when the Chroma Resampler core is enabled.

Parameters
InstancePtris a pointer to the XCresample instance to be worked on.
Returns
None.
Note
C-style signature: void XCresample_RegUpdateDisable(XCresample *InstancePtr)

◆ XCresample_RegUpdateEnable

#define XCresample_RegUpdateEnable (   InstancePtr)

#include <xcresample.h>

Value:
XCresample_WriteReg((InstancePtr)->Config.BaseAddress, \
((XCresample_ReadReg((InstancePtr)->Config.BaseAddress, \
#define XCresample_ReadReg(BaseAddress, RegOffset)
This macro reads the given register.
Definition: xcresample_hw.h:660
#define XCresample_WriteReg(BaseAddress, RegOffset, Data)
This macro writes into the given register.
Definition: xcresample_hw.h:681
#define XCRE_CONTROL_OFFSET
Control.
Definition: xcresample_hw.h:70
#define XCRE_CTL_RUE_MASK
Register update mask.
Definition: xcresample_hw.h:417

This macro commits all the register value changes made so far by the software to the Chroma Resampler core.

This macro only works when the Chroma Resampler core is enabled.

Parameters
InstancePtris a pointer to the XCresample instance to be worked on.
Returns
None.
Note
C-style signature: void XCresample_RegUpdateEnable(XCresample *InstancePtr)

◆ XCresample_Reset

#define XCresample_Reset (   InstancePtr)

#include <xcresample.h>

Value:
XCresample_WriteReg((InstancePtr)->Config.BaseAddress, \
#define XCresample_WriteReg(BaseAddress, RegOffset, Data)
This macro writes into the given register.
Definition: xcresample_hw.h:681
#define XCRE_CONTROL_OFFSET
Control.
Definition: xcresample_hw.h:70
#define XCRE_CTL_RESET_MASK
Software reset - instantaneous mask.
Definition: xcresample_hw.h:425

This macro resets the Chroma Resampler core.

This reset effects the core immediately, and may cause image tearing.

Parameters
InstancePtris a pointer to the XCresample instance to be worked on.
Returns
None.
Note
C-style signature: void XCresample_Reset(XCresample *InstancePtr)

◆ XCresample_Start

#define XCresample_Start   XCresample_Enable

#include <xcresample.h>

This macro enables/starts the Chroma Resampler core.

Parameters
InstancePtris a pointer to the XCresample instance to be worked on.
Returns
None.
Note
C-style signature: void XCresample_Start(XCresample *InstancePtr)

◆ XCresample_StatusGetPending

#define XCresample_StatusGetPending (   InstancePtr)

#include <xcresample.h>

Value:
XCresample_ReadReg((InstancePtr)->Config.BaseAddress, \
#define XCresample_ReadReg(BaseAddress, RegOffset)
This macro reads the given register.
Definition: xcresample_hw.h:660
#define XCRE_STATUS_OFFSET
Status.
Definition: xcresample_hw.h:71
#define XCRE_IXR_ALLINTR_MASK
OR of all mask.
Definition: xcresample_hw.h:437

This macro returns the pending interrupt status of the Cresample core read from the Status register.

Parameters
InstancePtris a pointer to the XCresample instance to be worked on.
Returns
The pending interrupts of the Chroma Resampler. Use XCRE_IXR_*_MASK constants defined in xcresample_hw.h to interpret this value.
Note
C-style signature: u32 XCresample_StatusGePending(XCresample *InstancePtr)

◆ XCresample_Stop

#define XCresample_Stop   XCresample_Disable

#include <xcresample.h>

This macro disables/stops the Chroma Resampler core.

Parameters
InstancePtris a pointer to the XCresample instance to be worked on.
Returns
None.
Note
C-style signature: void XCresample_Stop(XCresample *InstancePtr)

◆ XCresample_SyncReset

#define XCresample_SyncReset (   InstancePtr)

#include <xcresample.h>

Value:
XCresample_WriteReg((InstancePtr)->Config.BaseAddress, \
#define XCresample_WriteReg(BaseAddress, RegOffset, Data)
This macro writes into the given register.
Definition: xcresample_hw.h:681
#define XCRE_CONTROL_OFFSET
Control.
Definition: xcresample_hw.h:70
#define XCRE_CTL_AUTORESET_MASK
Software reset - Auto-synchronize to SOF mask.
Definition: xcresample_hw.h:420

This macro resets a Chroma Resampler core instance, but differs from XCresample_Reset() in that it automatically synchronizes to the SOF input of the core to prevent tearing.

On the next raising edge of SOF following a call to XCresample_SyncReset(), all of the core's configuration registers and outputs will be reset, then the reset flag will be immediately released, allowing the core to immediately resume default operation.

Parameters
InstancePtris a pointer to the XCresample instance to be worked on.
Returns
None.
Note
C-style signature: void XCresample_SyncReset(XCresample *InstancePtr)

Typedef Documentation

◆ XCresample_CallBack

typedef void(* XCresample_CallBack) (void *CallBackRef)

#include <xcresample.h>

Callback type for all interrupts except error interrupt.

Parameters
CallBackRefis a callback reference passed in by the upper layer when setting the callback functions, and passed back to the upper layer when the callback is invoked.

◆ XCresample_ErrorCallBack

typedef void(* XCresample_ErrorCallBack) (void *CallBackRef, u32 ErrorMask)

#include <xcresample.h>

Callback type for Error interrupt.

Parameters
CallBackRefis a callback reference passed in by the upper layer when setting the callback functions, and passed back to the upper layer when the callback is invoked.
ErrorMaskis a bit mask indicating the cause of the error. Its value equals 'OR'ing one or more XCRE_IXR_* values defined in xcresample_hw.h

Enumeration Type Documentation

◆ anonymous enum

anonymous enum

#include <xcresample.h>

These constants specify different types of handler and used to differentiate interrupt requests from core.

Enumerator
XCRE_HANDLER_PROCSTART 

A processing start event interrupt type.

XCRE_HANDLER_FRAMEDONE 

A frame done event interrupt type.

XCRE_HANDLER_ERROR 

An error condition interrupt type.

Function Documentation

◆ XCresample_CfgInitialize()

int XCresample_CfgInitialize ( XCresample InstancePtr,
XCresample_Config CfgPtr,
u32  EffectiveAddr 
)

#include <xcresample.c>

This function initializes the Cresample core.

This function must be called prior to using the Cresample core. Initialization of the Cresample includes setting up the instance data and ensuring the hardware is in a quiescent state.

Parameters
InstancePtris a pointer to the XCresample instance.
CfgPtris a reference to a structure containing information about a specific Chroma Resampler driver.
EffectiveAddris the device base address in the virtual memory address space. The caller is responsible for keeping the address mapping from EffectiveAddr to the device physical base address unchanged once this function is invoked. Unexpected errors may occur if the address mapping changes after this function is called. If address translation is not used, pass in the physical address instead.
Returns
- XST_SUCCESS if initialization was successful.
Note
None.

References XCresample_Config::BaseAddress, XCresample::Config, and XCresample::ProcStartCallBack.

Referenced by CresampleTypeConversion(), and XCresampleSelfTestExample().

◆ XCresample_Clear_HCoef_Values()

void XCresample_Clear_HCoef_Values ( XCresample InstancePtr)

#include <xcresample.c>

This function clears all horizontal coefficients of the Chroma Resampler core which are previously set.

Parameters
InstancePtris a pointer to the XCresample instance.
Returns
None.
Note
None.

References XCresample_Config::BaseAddress, XCresample::Config, XCRE_COEF00_HPHASE0_OFFSET, XCRE_NUM_HCOEFS, XCRE_NUM_OF_PHASES, XCRE_OFFSET_DIFF, and XCresample_WriteReg.

Referenced by CresampleTypeConversion(), and XCresample_SetHCoefs().

◆ XCresample_Clear_VCoef_Values()

void XCresample_Clear_VCoef_Values ( XCresample InstancePtr)

#include <xcresample.c>

This function clears all vertical coefficients of a the Chroma Resampler which are previously set.

Parameters
InstancePtris a pointer to the XCresample instance.
Returns
None.
Note
None.

References XCresample_Config::BaseAddress, XCresample::Config, XCRE_COEF00_VPHASE0_OFFSET, XCRE_NUM_OF_PHASES, XCRE_NUM_VCOEFS, XCRE_OFFSET_DIFF, and XCresample_WriteReg.

Referenced by CresampleTypeConversion(), and XCresample_SetVCoefs().

◆ XCresample_DisableDbgBypass()

void XCresample_DisableDbgBypass ( XCresample InstancePtr)

#include <xcresample.c>

This function disables bypass mode of the Chroma Resampler core.

Parameters
InstancePtris a pointer to the XCresample instance to be worked on.
Returns
None.
Note
Debug functionality should be enabled.

References XCresample_Config::BaseAddress, XCresample::Config, XCresample_Config::HasDebug, XCRE_CONTROL_OFFSET, XCRE_CTL_BPE_MASK, XCresample_ReadReg, and XCresample_WriteReg.

◆ XCresample_DisableDbgTestPattern()

void XCresample_DisableDbgTestPattern ( XCresample InstancePtr)

#include <xcresample.c>

This function disables debug test pattern mode in Control register of the Chroma Resampler core, if Debug feature is enabled.

Parameters
InstancePtris a pointer to the XCresample instance to be worked on.
Returns
None.
Note
Debug functionality should be enabled.

References XCresample_Config::BaseAddress, XCresample::Config, XCresample_Config::HasDebug, XCRE_CONTROL_OFFSET, XCRE_CTL_TPE_MASK, XCresample_ReadReg, and XCresample_WriteReg.

◆ XCresample_EnableDbgByPass()

void XCresample_EnableDbgByPass ( XCresample InstancePtr)

#include <xcresample.c>

This function enables the bypass mode by setting bypass bit of the Control register to switch the core to bypass mode if debug feature is enabled in the core.

Parameters
InstancePtris a pointer to the XCresample instance to be worked on.
Returns
None.
Note
Debug functionality should be enabled.

References XCresample_Config::BaseAddress, XCresample::Config, XCresample_Config::HasDebug, XCRE_CONTROL_OFFSET, XCRE_CTL_BPE_MASK, XCresample_ReadReg, and XCresample_WriteReg.

◆ XCresample_EnableDbgTestPattern()

void XCresample_EnableDbgTestPattern ( XCresample InstancePtr)

#include <xcresample.c>

This function enables the test-pattern mode if debug feature is enabled by setting test-pattern bit of the Control register of the Chroma Resampler core.

Parameters
InstancePtris a pointer to the XCresample instance to be worked on.
Returns
None.
Note
Debug functionality should be enabled.

References XCresample_Config::BaseAddress, XCresample::Config, XCresample_Config::HasDebug, XCRE_CONTROL_OFFSET, XCRE_CTL_TPE_MASK, XCresample_ReadReg, and XCresample_WriteReg.

◆ XCresample_GetActiveSize()

void XCresample_GetActiveSize ( XCresample InstancePtr,
u16 *  HSize,
u16 *  VSize 
)

#include <xcresample.c>

This function gets the number of Active Pixels per Scan line and number of Active Lines per Frame from the Active Size register.

Parameters
InstancePtris a pointer to the XCresample instance.
HSizeis a pointer to 16-bit variable in which the number of Active Pixels per Scan Line is returned (Range is 32 to 7680).
VSizeis a pointer to 16-bit variable in which the number of Active Lines per Frame is returned (Range is 32 to 7680).
Returns
None.
Note
None.

References XCresample_Config::BaseAddress, XCresample::Config, XCRE_ACTIVE_SIZE_OFFSET, XCRE_ACTSIZE_NUM_LINE_MASK, XCRE_ACTSIZE_NUM_LINE_SHIFT, XCRE_ACTSIZE_NUM_PIXEL_MASK, and XCresample_ReadReg.

◆ XCresample_GetChromaParity()

u8 XCresample_GetChromaParity ( XCresample InstancePtr)

#include <xcresample.c>

This function returns the value of chroma parity of the Chroma Resampler core from Encoding register.

Parameters
InstancePtris a pointer to the XCresample instance.
Returns
Chroma parity value is returned.
  • 0 - Chroma information on Odd or First line.
  • 1 - Chroma information on Even lines.
Note
None.

References XCresample_Config::BaseAddress, XCresample::Config, XCRE_ENCODING_CHROMA_MASK, XCRE_ENCODING_CHROMA_SHIFT, XCRE_ENCODING_OFFSET, and XCresample_ReadReg.

◆ XCresample_GetDbgFrameCount()

u32 XCresample_GetDbgFrameCount ( XCresample InstancePtr)

#include <xcresample.c>

This function returns the number of frames processed since power-up or last time the core is reset.

Parameters
InstancePtris a pointer to the XCresample instance.
Returns
FrameCount is the number of frames processed since power-up.
Note
Debug functionality should be enabled.

References XCresample_Config::BaseAddress, XCresample::Config, XCresample_Config::HasDebug, XCRE_SYSDEBUG0_OFFSET, and XCresample_ReadReg.

◆ XCresample_GetDbgLineCount()

u32 XCresample_GetDbgLineCount ( XCresample InstancePtr)

#include <xcresample.c>

This function returns the number of lines processed since power-up or last time the core is reset.

Parameters
InstancePtris a pointer to the XCresample instance.
Returns
LineCount is the number of lines processed since power-up.
Note
Debug functionality should be enabled.

References XCresample_Config::BaseAddress, XCresample::Config, XCresample_Config::HasDebug, XCRE_SYSDEBUG1_OFFSET, and XCresample_ReadReg.

◆ XCresample_GetDbgPixelCount()

u32 XCresample_GetDbgPixelCount ( XCresample InstancePtr)

#include <xcresample.c>

This function returns the number of pixels processed since power-up or last time the core is reset.

Parameters
InstancePtris a pointer to the XCresample instance.
Returns
PixelCount is the number of pixels processed since power-up.
Note
Debug functionality should be enabled.

References XCresample_Config::BaseAddress, XCresample::Config, XCresample_Config::HasDebug, XCRE_SYSDEBUG2_OFFSET, and XCresample_ReadReg.

◆ XCresample_GetFieldParity()

u8 XCresample_GetFieldParity ( XCresample InstancePtr)

#include <xcresample.c>

This function returns the field parity value of the Chroma Resampler core from Encoding register.

Parameters
InstancePtris a pointer to the XCresample instance.
Returns
Field parity value is returned. 0 - for even or bottom field. 1 - for odd or top field.
Note
None.

References XCresample_Config::BaseAddress, XCresample::Config, XCRE_ENCODING_FIELD_MASK, XCRE_ENCODING_FIELD_SHIFT, XCRE_ENCODING_OFFSET, and XCresample_ReadReg.

◆ XCresample_GetHCoefs()

void XCresample_GetHCoefs ( XCresample InstancePtr,
XHorizontal_Coeffs Coeff 
)

#include <xcresample.c>

This function gets the coefficient values from all the Horizontal Coefficient registers of phase0 and phase1 of the Chroma Resampler core.

Parameters
InstancePtris a pointer to the XCresample instance.
Coeffis a pointer to the structure XHorizontal_Coeffs which has horizontal coefficients of both phases.(Phase 0 and Phase 1) in which coefficients are updated. Range of coefficient values is [-2, 2).
Returns
None.
Note
For pre defined fixed coefficients filter values, ConvertType should be set with 1.

References XCresample_Config::BaseAddress, XCresample::Config, XCresample_Config::ConvertType, XHorizontal_Coeffs::HCoeff, XCRE_COEF00_HPHASE0_OFFSET, XCRE_NUM_HCOEFS, XCRE_NUM_OF_PHASES, and XCresample_ReadReg.

◆ XCresample_GetVCoefs()

void XCresample_GetVCoefs ( XCresample InstancePtr,
XVertical_Coeffs Coeff 
)

#include <xcresample.c>

This function gets the vertical coefficient values of the Chroma Resampler core from all Vertical Coefficient registers of phase0 and phase1.

Parameters
InstancePtris a pointer to the XCresample instance.
Coeffis a pointer to the structure XVertical_Coeffs which has vertical coefficients of both phases.(Phase 0 and Phase 1) in which coefficients are updated. Range of coefficient values is [-2, 2).
Returns
None.
Note
For pre defined fixed coefficients filter values, ConvertType should be set with 1.

References XCresample_Config::BaseAddress, XCresample::Config, XCresample_Config::ConvertType, XVertical_Coeffs::VCoeff, XCRE_COEF00_VPHASE0_OFFSET, XCRE_NUM_OF_PHASES, XCRE_NUM_VCOEFS, and XCresample_ReadReg.

◆ XCresample_GetVersion()

u32 XCresample_GetVersion ( XCresample InstancePtr)

#include <xcresample.c>

This function returns the version of the Chroma Resampler core.

Parameters
InstancePtris a pointer to the XCresample instance.
Returns
Content of Version register is returned..
Note
None.

References XCresample_Config::BaseAddress, XCresample::Config, XCRE_VERSION_OFFSET, and XCresample_ReadReg.

◆ XCresample_IntrHandler()

void XCresample_IntrHandler ( void *  InstancePtr)

#include <xcresample.h>

This function is the interrupt handler for the Chroma Resampler driver.

This handler reads the pending interrupt from the STATUS register, determines the source of the interrupts and calls the respective callbacks for the interrupts that are enabled in IRQ_ENABLE register, and finally clears the interrupts.

The application is responsible for connecting this function to the interrupt system. Application beyond this driver is also responsible for providing callbacks to handle interrupts and installing the callbacks using Xcresample_SetCallBack() during initialization phase.

Parameters
InstancePtris a pointer to the XCresample instance that just interrupted.
Returns
None.
Note
Interrupt interface should be enabled.

References XCresample::Config, XCresample::ErrCallBack, XCresample::ErrRef, XCresample::FrameDoneCallBack, XCresample::FrameDoneRef, XCresample_Config::HasIntcIf, XCresample::IsReady, XCresample::ProcStartCallBack, XCresample::ProcStartRef, XCRE_IXR_EOF_MASK, XCRE_IXR_PROCS_STARTED_MASK, XCRE_IXR_SE_MASK, XCresample_IntrClear, and XCresample_IntrGetPending.

◆ XCresample_IsDbgByPassEnabled()

int XCresample_IsDbgByPassEnabled ( XCresample InstancePtr)

#include <xcresample.c>

This function returns the current bypass mode settings from Control register of the Chroma Resampler core.

Parameters
InstancePtris a pointer to the XCresample instance to be worked on.
Returns
Core debug bypass mode.
  • TRUE = Bypass mode is enabled.
  • FALSE = Bypass mode is not enabled.
Note
Debug functionality should be enabled.

References XCresample_Config::BaseAddress, XCresample::Config, XCresample_Config::HasDebug, XCRE_CONTROL_OFFSET, XCRE_CTL_BPE_MASK, and XCresample_ReadReg.

◆ XCresample_IsDbgTestPatternEnabled()

int XCresample_IsDbgTestPatternEnabled ( XCresample InstancePtr)

#include <xcresample.c>

This function returns the test-pattern mode (enabled or not) from Control register of the Chroma Resampler core.

Parameters
InstancePtris a pointer to the XCresample instance to be worked on.
Returns
Test-pattern generator mode.
  • TRUE = Test-pattern mode is enabled.
  • FALSE = Test-pattern mode is not enabled.
Note
Debug functionality should be enabled.

References XCresample_Config::BaseAddress, XCresample::Config, XCresample_Config::HasDebug, XCRE_CONTROL_OFFSET, XCRE_CTL_TPE_MASK, and XCresample_ReadReg.

◆ XCresample_LookupConfig()

XCresample_Config * XCresample_LookupConfig ( u16  DeviceId)

#include <xcresample.h>

This function returns a reference to an XCresample_Config structure based on the unique device id, DeviceId.

The return value will refer to an entry in the device configuration table defined in the xcresample_g.c file.

Parameters
DeviceIdis the unique device ID of the device for the lookup operation.
Returns
XCresample_LookupConfig returns a reference to a config record in the configuration table (in xcresample_g.c) corresponding to DeviceId, or NULL if no match is found.
Note
None.

Referenced by CresampleTypeConversion(), and XCresampleSelfTestExample().

◆ XCresample_SelfTest()

int XCresample_SelfTest ( XCresample InstancePtr)

#include <xcresample.h>

This function reads version register of Chroma Resampler core and compares with zero as part of self test.

Parameters
InstancePtris a pointer to the XCresample instance.
Returns
  • XST_SUCCESS if the test is successful.
  • XST_FAILURE if the test is failed.
Note
None.

References XCresample_Config::BaseAddress, XCresample::Config, XCRE_VERSION_OFFSET, and XCresample_ReadReg.

Referenced by XCresampleSelfTestExample().

◆ XCresample_SetActiveSize()

void XCresample_SetActiveSize ( XCresample InstancePtr,
u16  HSize,
u16  VSize 
)

#include <xcresample.c>

This function sets the active H/V sizes in the Active Size register.

Parameters
InstancePtris a pointer to the XCresample instance.
HSizespecifies the number of Active Pixels per Scan Line that needs to be set (Range is 32 to 7680).
VSizespecifies the number of Active Lines per Frame that needs to be set (Range is 32 to 7680).
Returns
None.
Note
None.

References XCresample_Config::BaseAddress, XCresample::Config, XCRE_ACT_SIZE_FIRST, XCRE_ACT_SIZE_LAST, XCRE_ACTIVE_SIZE_OFFSET, XCRE_ACTSIZE_NUM_LINE_SHIFT, and XCresample_WriteReg.

◆ XCresample_SetCallBack()

int XCresample_SetCallBack ( XCresample InstancePtr,
u32  HandlerType,
void *  CallBackFunc,
void *  CallBackRef 
)

#include <xcresample.h>

This routine installs an asynchronous callback function for the given HandlerType:

HandlerType              Callback Function Type
-----------------------  --------------------------------------------------
XCRE_HANDLER_FRAMEDONE   FrameDoneCallBack
XCRE_HANDLER_PROCSTART   ProcStartCallBack
XCRE_HANDLER_ERROR       ErrCallBack
Parameters
InstancePtris a pointer to the XCresample instance to be worked on.
HandlerTypespecifies which callback is to be attached.
CallBackFuncis the address of the callback function.
CallBackRefis a user data item that will be passed to the callback function when it is invoked.
Returns
  • XST_SUCCESS when handler is installed.
  • XST_INVALID_PARAM when HandlerType is invalid.
Note
Invoking this function for a handler that already has been installed replaces it with the new handler.

References XCresample::ErrCallBack, XCresample::ErrRef, XCresample::FrameDoneCallBack, XCresample::FrameDoneRef, XCresample::IsReady, XCresample::ProcStartCallBack, XCresample::ProcStartRef, XCRE_HANDLER_ERROR, XCRE_HANDLER_FRAMEDONE, and XCRE_HANDLER_PROCSTART.

◆ XCresample_SetChromaParity()

void XCresample_SetChromaParity ( XCresample InstancePtr,
u8  ChromaParity 
)

#include <xcresample.c>

This functions sets the Chroma parity value of the Chroma Resampler core in the Encoding register.

Parameters
InstancePtris a pointer to the XCresample instance.
ChromaParityspecifies the parity value which needs to be set.(0 or 1).
  • 0 - Chroma information on Odd or First line.
  • 1 - Chroma information on Even lines.
Returns
None.
Note
None.

References XCresample_Config::BaseAddress, XCresample::Config, XCRE_ENCODING_CHROMA_MASK, XCRE_ENCODING_OFFSET, XCRE_PARITY_EVEN, XCRE_PARITY_ODD, XCresample_ReadReg, and XCresample_WriteReg.

◆ XCresample_SetFieldParity()

void XCresample_SetFieldParity ( XCresample InstancePtr,
u8  FieldParity 
)

#include <xcresample.c>

This functions sets the field parity value of the Chroma Resampler core in the Encoding register.

Parameters
InstancePtris a pointer to the XCresample instance.
FieldParityspecifies the parity value which needs to be set.(0 or 1).
  • 0 - for even or bottom field.
  • 1 - for odd or top field.
Returns
None.
Note
To this feature need to use interlaced video.

References XCresample_Config::BaseAddress, XCresample::Config, XCresample_Config::Interlaced, XCRE_ENCODING_FIELD_MASK, XCRE_ENCODING_OFFSET, XCRE_PARITY_EVEN, XCRE_PARITY_ODD, XCresample_ReadReg, and XCresample_WriteReg.

◆ XCresample_SetHCoefs()

void XCresample_SetHCoefs ( XCresample InstancePtr,
XHorizontal_Coeffs Coeff,
u32  Phases 
)

#include <xcresample.c>

This function sets the horizontal coefficient values of the Chroma Resampler core for phase 0 or phase 1 or both phases.

Parameters
InstancePtris a pointer to the XCresample instance.
Coeffis a pointer to the structure XHorizontal_Coeffs which has horizontal coefficients of both phases (Phase 0 and Phase 1) which needs to be set. Range of coefficient values is [-2, 2).
Phasesspecifies number of phases needs to be set.
  • 0 - Phase 0.
  • 1 - Phase 1.
  • 2 - Phase 0 and Phase 1.
Returns
None.
Note
For pre defined fixed coefficients filter values, ConvertType should be set with 1.

References XCresample::Config, XCresample_Config::ConvertType, XHorizontal_Coeffs::HCoeff, XCresample_Config::NumHTaps, XCRE_COEF00_HPHASE0_OFFSET, XCRE_COEF00_HPHASE1_OFFSET, XCRE_NUM_OF_PHASES, and XCresample_Clear_HCoef_Values().

Referenced by CresampleTypeConversion().

◆ XCresample_SetVCoefs()

void XCresample_SetVCoefs ( XCresample InstancePtr,
XVertical_Coeffs Coeff,
u32  Phases 
)

#include <xcresample.c>

This function sets the vertical coefficient values of the Chroma Resampler for phase 0 or for phase 1 or for both phases.

Parameters
InstancePtris a pointer to the XCresample instance.
Coeffis a pointer to the structure XHorizontal_Coeffs which has vertical coefficients of both phases (Phase 0 and Phase 1) which needs to be set.
Phasesspecifies number of phases needs to be set.
  • 0 - Phase 0.
  • 1 - Phase 1.
  • 2 - Phase 0 and Phase 1.
Returns
None.
Note
For pre defined fixed coefficients filter values, ConvertType should be set with 1.

References XCresample::Config, XCresample_Config::ConvertType, XCresample_Config::NumVTaps, XVertical_Coeffs::VCoeff, XCRE_COEF00_VPHASE0_OFFSET, XCRE_COEF00_VPHASE1_OFFSET, XCRE_NUM_OF_PHASES, and XCresample_Clear_VCoef_Values().

Referenced by CresampleTypeConversion().