Software Drivers

xcresample.h File Reference

#include "xil_assert.h"
#include "xstatus.h"
#include "xcresample_hw.h"

Classes

struct  XCresample_Config
struct  XCresample
struct  XHorizontal_Coeffs
struct  XVertical_Coeffs

Active size ranges

#define XCRE_ACT_SIZE_FIRST   32
#define XCRE_ACT_SIZE_LAST   7680

Parity valid values

#define XCRE_PARITY_ODD   1
#define XCRE_PARITY_EVEN   0

Coefficient ranges

#define XCRE_COEF_FIRST   -2.0
#define XCRE_COEF_LAST   2.0
#define XCRE_OFFSET_DIFF   4

Number of phases

#define XCRE_NUM_OF_PHASES   2

Number of coefficients

#define XCRE_NUM_HCOEFS   24
#define XCRE_NUM_VCOEFS   8

Interrupt types for setting up callbacks

enum  { XCRE_HANDLER_PROCSTART = 1, XCRE_HANDLER_FRAMEDONE, XCRE_HANDLER_ERROR }

Defines

#define XCRESAMPLE_H_
#define XCresample_Enable(InstancePtr)
#define XCresample_Disable(InstancePtr)
#define XCresample_Start   XCresample_Enable
#define XCresample_Stop   XCresample_Disable
#define XCresample_RegUpdateEnable(InstancePtr)
#define XCresample_RegUpdateDisable(InstancePtr)
#define XCresample_SyncReset(InstancePtr)
#define XCresample_Reset(InstancePtr)
#define XCresample_IntrEnable(InstancePtr, IntrType)
#define XCresample_IntrDisable(InstancePtr, IntrType)
#define XCresample_StatusGetPending(InstancePtr)
#define XCresample_IntrGetPending(InstancePtr)
#define XCresample_IntrClear(InstancePtr, IntrType)

Typedefs

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

Functions

int XCresample_CfgInitialize (XCresample *InstancePtr, XCresample_Config *CfgPtr, u32 EffectiveAddr)
u32 XCresample_GetVersion (XCresample *InstancePtr)
void XCresample_EnableDbgByPass (XCresample *InstancePtr)
int XCresample_IsDbgByPassEnabled (XCresample *InstancePtr)
void XCresample_DisableDbgBypass (XCresample *InstancePtr)
void XCresample_EnableDbgTestPattern (XCresample *InstancePtr)
int XCresample_IsDbgTestPatternEnabled (XCresample *InstancePtr)
void XCresample_DisableDbgTestPattern (XCresample *InstancePtr)
u32 XCresample_GetDbgFrameCount (XCresample *InstancePtr)
u32 XCresample_GetDbgLineCount (XCresample *InstancePtr)
u32 XCresample_GetDbgPixelCount (XCresample *InstancePtr)
void XCresample_SetActiveSize (XCresample *InstancePtr, u16 HSize, u16 VSize)
void XCresample_GetActiveSize (XCresample *InstancePtr, u16 *HSize, u16 *VSize)
void XCresample_SetFieldParity (XCresample *InstancePtr, u8 FieldParity)
void XCresample_SetChromaParity (XCresample *InstancePtr, u8 ChromaParity)
u8 XCresample_GetFieldParity (XCresample *InstancePtr)
u8 XCresample_GetChromaParity (XCresample *InstancePtr)
void XCresample_SetHCoefs (XCresample *InstancePtr, XHorizontal_Coeffs *Coeff, u32 Phases)
void XCresample_SetVCoefs (XCresample *InstancePtr, XVertical_Coeffs *Coeff, u32 Phases)
void XCresample_GetHCoefs (XCresample *InstancePtr, XHorizontal_Coeffs *Coeff)
void XCresample_GetVCoefs (XCresample *InstancePtr, XVertical_Coeffs *Coeff)
XCresample_ConfigXCresample_LookupConfig (u16 DeviceId)
int XCresample_SelfTest (XCresample *InstancePtr)
int XCresample_SetCallBack (XCresample *InstancePtr, u32 HandlerType, void *CallBackFunc, void *CallBackRef)
void XCresample_IntrHandler (void *InstancePtr)
void XCresample_Clear_HCoef_Values (XCresample *InstancePtr)
void XCresample_Clear_VCoef_Values (XCresample *InstancePtr)


Define Documentation

#define XCRE_ACT_SIZE_FIRST   32

Active Size starting value

#define XCRE_ACT_SIZE_LAST   7680

Active Size ending value

#define XCRE_COEF_FIRST   -2.0

Coefficient start value

#define XCRE_COEF_LAST   2.0

Coefficient end value

#define XCRE_NUM_HCOEFS   24

Number of horizontal coefficients

#define XCRE_NUM_OF_PHASES   2

Number of phases

#define XCRE_NUM_VCOEFS   8

Number of vertical coefficients

#define XCRE_OFFSET_DIFF   4

Coefficient offset difference

#define XCRE_PARITY_EVEN   0

For even (or bottom) field it is 0

#define XCRE_PARITY_ODD   1

For odd (or top) field it is 1

#define XCresample_Disable ( InstancePtr   ) 

Value:

XCresample_WriteReg((InstancePtr)->Config.BaseAddress, \
                                        (XCRE_CONTROL_OFFSET), \
                ((XCresample_ReadReg((InstancePtr)->Config.BaseAddress, \
                        (XCRE_CONTROL_OFFSET))) & (~(XCRE_CTL_SW_EN_MASK))))
This macro disables the Chroma Resampler core.

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

#define XCresample_Enable ( InstancePtr   ) 

Value:

XCresample_WriteReg((InstancePtr)->Config.BaseAddress, \
                                        (XCRE_CONTROL_OFFSET), \
                ((XCresample_ReadReg((InstancePtr)->Config.BaseAddress, \
                        (XCRE_CONTROL_OFFSET))) | (XCRE_CTL_SW_EN_MASK)))
This macro enables the Chroma Resampler core.

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

#define XCRESAMPLE_H_

Prevent circular inclusions by using protection macros

#define XCresample_IntrClear ( InstancePtr,
IntrType   ) 

Value:

XCresample_WriteReg((InstancePtr)->Config.BaseAddress, \
                                        (XCRE_STATUS_OFFSET), \
                        ((IntrType) & ((u32)(XCRE_IXR_ALLINTR_MASK))))
This macro clears/acknowledges pending interrupts of the Cresample core in the Status register. Bit positions of 1 will be cleared.

Parameters:
InstancePtr is a pointer to the XCresample instance to be worked on.
IntrType is 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)

#define XCresample_IntrDisable ( InstancePtr,
IntrType   ) 

Value:

XCresample_WriteReg((InstancePtr)->Config.BaseAddress, \
                (XCRE_IRQ_EN_OFFSET), \
                ((XCresample_ReadReg((InstancePtr)->Config.BaseAddress, \
                        (XCRE_IRQ_EN_OFFSET))) \
                                & ((~(IntrType)) & (XCRE_IXR_ALLINTR_MASK))))
This macro disables individual interrupts of the Cresample core by updating the IRQ_ENABLE register.

Parameters:
InstancePtr is a pointer to the XCresample instance to be worked on.
IntrType is 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)

#define XCresample_IntrEnable ( InstancePtr,
IntrType   ) 

Value:

XCresample_WriteReg((InstancePtr)->Config.BaseAddress, \
                                        (XCRE_IRQ_EN_OFFSET), \
                        (((IntrType) & (XCRE_IXR_ALLINTR_MASK)) | \
                (XCresample_ReadReg((InstancePtr)->Config.BaseAddress, \
                        (XCRE_IRQ_EN_OFFSET)))))
This macro enables individual interrupts of the Cresample core by updating the IRQ_ENABLE register.

Parameters:
InstancePtr is a pointer to the XCresample instance to be worked on.
IntrType is 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)

#define XCresample_IntrGetPending ( InstancePtr   ) 

Value:

XCresample_ReadReg((InstancePtr)->Config.BaseAddress, \
                (XCRE_IRQ_EN_OFFSET)) & \
                ((XCresample_ReadReg((InstancePtr)->Config.BaseAddress, \
                (XCRE_STATUS_OFFSET))) & ((u32)(XCRE_IXR_ALLINTR_MASK)))
This macro returns the pending interrupts of the Cresample core for the interrupts that have been enabled.

Parameters:
InstancePtr is 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)

#define XCresample_RegUpdateDisable ( InstancePtr   ) 

Value:

XCresample_WriteReg((InstancePtr)->Config.BaseAddress, \
                                        (XCRE_CONTROL_OFFSET), \
                ((XCresample_ReadReg((InstancePtr)->Config.BaseAddress, \
                        (XCRE_CONTROL_OFFSET))) & (u32)(~(XCRE_CTL_RUE_MASK))))
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:
InstancePtr is a pointer to the XCresample instance to be worked on.
Returns:
None.
Note:
C-style signature: void XCresample_RegUpdateDisable(XCresample *InstancePtr)

#define XCresample_RegUpdateEnable ( InstancePtr   ) 

Value:

XCresample_WriteReg((InstancePtr)->Config.BaseAddress, \
                                        (XCRE_CONTROL_OFFSET), \
                ((XCresample_ReadReg((InstancePtr)->Config.BaseAddress, \
                        (XCRE_CONTROL_OFFSET))) | (XCRE_CTL_RUE_MASK)))
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:
InstancePtr is a pointer to the XCresample instance to be worked on.
Returns:
None.
Note:
C-style signature: void XCresample_RegUpdateEnable(XCresample *InstancePtr)

#define XCresample_Reset ( InstancePtr   ) 

Value:

XCresample_WriteReg((InstancePtr)->Config.BaseAddress, \
                (XCRE_CONTROL_OFFSET), (XCRE_CTL_RESET_MASK))
This macro resets the Chroma Resampler core. This reset effects the core immediately, and may cause image tearing.

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

#define XCresample_Start   XCresample_Enable

This macro enables/starts the Chroma Resampler core.

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

#define XCresample_StatusGetPending ( InstancePtr   ) 

Value:

XCresample_ReadReg((InstancePtr)->Config.BaseAddress, \
                (XCRE_STATUS)) & (XCRE_IXR_ALLINTR_MASK)
This macro returns the pending interrupt status of the Cresample core read from the Status register.

Parameters:
InstancePtr is 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)

#define XCresample_Stop   XCresample_Disable

This macro disables/stops the Chroma Resampler core.

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

#define XCresample_SyncReset ( InstancePtr   ) 

Value:

XCresample_WriteReg((InstancePtr)->Config.BaseAddress, \
                (XCRE_CONTROL_OFFSET), (XCRE_CTL_AUTORESET_MASK))
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:
InstancePtr is a pointer to the XCresample instance to be worked on.
Returns:
None.
Note:
C-style signature: void XCresample_SyncReset(XCresample *InstancePtr)


Typedef Documentation

typedef void(*) XCresample_CallBack(void *CallBackRef)

Callback type for all interrupts except error interrupt.

Parameters:
CallBackRef is 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.

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

Callback type for Error interrupt.

Parameters:
CallBackRef is 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.
ErrorMask is 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

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

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

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:
InstancePtr is a pointer to the XCresample instance.
CfgPtr is a reference to a structure containing information about a specific Chroma Resampler driver.
EffectiveAddr is 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.

void XCresample_Clear_HCoef_Values ( XCresample InstancePtr  ) 

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

Parameters:
InstancePtr is a pointer to the XCresample instance.
Returns:
None.
Note:
None.

void XCresample_Clear_VCoef_Values ( XCresample InstancePtr  ) 

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

Parameters:
InstancePtr is a pointer to the XCresample instance.
Returns:
None.
Note:
None.

void XCresample_DisableDbgBypass ( XCresample InstancePtr  ) 

This function disables bypass mode of the Chroma Resampler core.

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

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.

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

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.

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

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.

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

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.

Parameters:
InstancePtr is a pointer to the XCresample instance.
HSize is a pointer to 16-bit variable in which the number of Active Pixels per Scan Line is returned (Range is 32 to 7680).
VSize is 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.

u8 XCresample_GetChromaParity ( XCresample InstancePtr  ) 

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

Parameters:
InstancePtr is 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.

u32 XCresample_GetDbgFrameCount ( XCresample InstancePtr  ) 

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

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

u32 XCresample_GetDbgLineCount ( XCresample InstancePtr  ) 

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

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

u32 XCresample_GetDbgPixelCount ( XCresample InstancePtr  ) 

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

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

u8 XCresample_GetFieldParity ( XCresample InstancePtr  ) 

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

Parameters:
InstancePtr is 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.

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.

Parameters:
InstancePtr is a pointer to the XCresample instance.
Coeff is 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.

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.

Parameters:
InstancePtr is a pointer to the XCresample instance.
Coeff is 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.

u32 XCresample_GetVersion ( XCresample InstancePtr  ) 

This function returns the version of the Chroma Resampler core.

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

void XCresample_IntrHandler ( void *  InstancePtr  ) 

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:
InstancePtr is a pointer to the XCresample instance that just interrupted.
Returns:
None.
Note:
Interrupt interface should be enabled.

int XCresample_IsDbgByPassEnabled ( XCresample InstancePtr  ) 

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

Parameters:
InstancePtr is 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.

int XCresample_IsDbgTestPatternEnabled ( XCresample InstancePtr  ) 

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

Parameters:
InstancePtr is 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.

XCresample_Config* XCresample_LookupConfig ( u16  DeviceId  ) 

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:
DeviceId is 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.

int XCresample_SelfTest ( XCresample InstancePtr  ) 

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

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

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

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

Parameters:
InstancePtr is a pointer to the XCresample instance.
HSize specifies the number of Active Pixels per Scan Line that needs to be set (Range is 32 to 7680).
VSize specifies the number of Active Lines per Frame that needs to be set (Range is 32 to 7680).
Returns:
None.
Note:
None.

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

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:
InstancePtr is a pointer to the XCresample instance to be worked on.
HandlerType specifies which callback is to be attached.
CallBackFunc is the address of the callback function.
CallBackRef is 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.

void XCresample_SetChromaParity ( XCresample InstancePtr,
u8  ChromaParity 
)

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

Parameters:
InstancePtr is a pointer to the XCresample instance.
ChromaParity specifies 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.

void XCresample_SetFieldParity ( XCresample InstancePtr,
u8  FieldParity 
)

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

Parameters:
InstancePtr is a pointer to the XCresample instance.
FieldParity specifies 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.

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.

Parameters:
InstancePtr is a pointer to the XCresample instance.
Coeff is 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).
Phases specifies 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.

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.

Parameters:
InstancePtr is a pointer to the XCresample instance.
Coeff is a pointer to the structure XHorizontal_Coeffs which has vertical coefficients of both phases (Phase 0 and Phase 1) which needs to be set.
Phases specifies 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.

Copyright @ 1995-2014 Xilinx, Inc. All rights reserved.