MODIFICATION HISTORY:
Ver Who Date Changes ----- ------ -------- ---------------------------------------------------- 1.00a gaborz 08/04/11 Updated for CRESAMPLE V1.0 2.00a vyc 04/24/12 Updated for CRESAMPLE V2.00.a 2.00a vyc 07/25/12 Switched from Xuu3232 to u32 2.00a vyc 10/16/12 Switch order of functions to remove compile warning 4.0 adk 03/12/14 Changed the filename cresample.c to xcresample.c. The Following functions are removed: clear_coef_values, configure_444_to_422, configure_422_to_444, configure_422_to_420, configure_420_to_422, configure_444_to_420 and configure_420_to_444. Implemented the following functions : StubCallBack, StubErrorCallBack, XCresample_CfgInitialize, XCresample_GetVersion, XCresample_EnableDbgByPass, XCresample_IsDbgByPassEnabled, XCresample_DisableDbgByPass, XCresample_SetDbgTestPattern, XCresample_IsDbgTestPatternEnabled, XCresample_DisableDbgTestPattern XCresample_GetDbgFrameCount, XCresample_GetDbgLineCount, XCresample_GetDbgPixelCount, XCresample_SetActiveSize, XCresample_GetActiveSize, XCresample_SetFieldParity, XCresample_GetFieldParity, XCresample_SetChromaParity, XCresample_GetChromaParity XCresample_SetHCoefs, XCresample_GetHCoefs, XCresample_SetVCoefs, XCresample_GetVCoefs, XCresample_Clear_HCoef_Values, and XCresample_Clear_VCoef_Values.
#include "xcresample.h"
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.
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. |
void XCresample_Clear_HCoef_Values | ( | XCresample * | InstancePtr | ) |
This function clears all horizontal coefficients of the Chroma Resampler core which are previously set.
InstancePtr | is a pointer to the XCresample instance. |
void XCresample_Clear_VCoef_Values | ( | XCresample * | InstancePtr | ) |
This function clears all vertical coefficients of a the Chroma Resampler which are previously set.
InstancePtr | is a pointer to the XCresample instance. |
void XCresample_DisableDbgBypass | ( | XCresample * | InstancePtr | ) |
This function disables bypass mode of the Chroma Resampler core.
InstancePtr | is a pointer to the XCresample instance to be worked on. |
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.
InstancePtr | is a pointer to the XCresample instance to be worked on. |
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.
InstancePtr | is a pointer to the XCresample instance to be worked on. |
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.
InstancePtr | is a pointer to the XCresample instance to be worked on. |
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.
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). |
u8 XCresample_GetChromaParity | ( | XCresample * | InstancePtr | ) |
This function returns the value of chroma parity of the Chroma Resampler core from Encoding register.
InstancePtr | is a pointer to the XCresample instance. |
u32 XCresample_GetDbgFrameCount | ( | XCresample * | InstancePtr | ) |
This function returns the number of frames processed since power-up or last time the core is reset.
InstancePtr | is a pointer to the XCresample instance. |
u32 XCresample_GetDbgLineCount | ( | XCresample * | InstancePtr | ) |
This function returns the number of lines processed since power-up or last time the core is reset.
InstancePtr | is a pointer to the XCresample instance. |
u32 XCresample_GetDbgPixelCount | ( | XCresample * | InstancePtr | ) |
This function returns the number of pixels processed since power-up or last time the core is reset.
InstancePtr | is a pointer to the XCresample instance. |
u8 XCresample_GetFieldParity | ( | XCresample * | InstancePtr | ) |
This function returns the field parity value of the Chroma Resampler core from Encoding register.
InstancePtr | is a pointer to the XCresample instance. |
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.
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). |
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.
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). |
u32 XCresample_GetVersion | ( | XCresample * | InstancePtr | ) |
This function returns the version of the Chroma Resampler core.
InstancePtr | is a pointer to the XCresample instance. |
int XCresample_IsDbgByPassEnabled | ( | XCresample * | InstancePtr | ) |
This function returns the current bypass mode settings from Control register of the Chroma Resampler core.
InstancePtr | is a pointer to the XCresample instance to be worked on. |
int XCresample_IsDbgTestPatternEnabled | ( | XCresample * | InstancePtr | ) |
This function returns the test-pattern mode (enabled or not) from Control register of the Chroma Resampler core.
InstancePtr | is a pointer to the XCresample instance to be worked on. |
void XCresample_SetActiveSize | ( | XCresample * | InstancePtr, | |
u16 | HSize, | |||
u16 | VSize | |||
) |
This function sets the active H/V sizes in the Active Size register.
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). |
void XCresample_SetChromaParity | ( | XCresample * | InstancePtr, | |
u8 | ChromaParity | |||
) |
This functions sets the Chroma parity value of the Chroma Resampler core in the Encoding register.
InstancePtr | is a pointer to the XCresample instance. | |
ChromaParity | specifies the parity value which needs to be set.(0 or 1).
|
void XCresample_SetFieldParity | ( | XCresample * | InstancePtr, | |
u8 | FieldParity | |||
) |
This functions sets the field parity value of the Chroma Resampler core in the Encoding register.
InstancePtr | is a pointer to the XCresample instance. | |
FieldParity | specifies the parity value which needs to be set.(0 or 1).
|
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.
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.
|
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.
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.
|
Copyright @ 1995-2014 Xilinx, Inc. All rights reserved.