This header file contains identifiers and register-level driver functions (or macros), that can be used to access the Xilinx Chroma Resampler (Cresample) core instance.
The Chroma Resampler core converts between chroma sub-sampling formats of 4:4:4, 4:2:2,and 4:2:0. There are a total of six conversions available for the three supported sub-sampling formats. Conversion is achieved using a FIR filter approach. Some conversions require filtering in only the horizontal dimension, only the vertical dimension, or both. Interpolation operations are implemented using a two-phase polyphase FIR filter. Decimation operations are implemented using a low-pass FIR filter to suppress chroma aliasing.
Features of Chroma Resampler core are
Initialization & Configuration
The device driver enables higher layer software (e.g., an application) to communicate to the Cresample core.
XCresample_CfgInitialize() API is used to initialize the Cresample core. The user needs to first call the XCresample_LookupConfig() API which returns the Configuration structure pointer which is passed as a parameter to the XCresample_CfgInitialize() API.
Interrupts
The driver provides an interrupt handler XCresample_IntrHandler for handling the interrupt from the Cresample core. The users of this driver have to register this handler with the interrupt system and provide the callback functions by using XCresample_SetCallBack API.
Virtual Memory
This driver supports Virtual Memory. The RTOS is responsible for calculating the correct device base address in Virtual Memory space.
Threads
This driver is not thread safe. Any needs for threads or thread mutual exclusion must be satisfied by the layer above this driver.
Asserts
Asserts are used within all Xilinx drivers to enforce constraints on argument values. Asserts can be turned off on a system-wide basis by defining, at compile time, the NDEBUG identifier. By default, asserts are turned on and it is recommended that users leave asserts on during development.
Building the driver
The Cresample driver is composed of several source files. This allows the user to build and link only those parts of the driver that are necessary.*
MODIFICATION HISTORY:
Ver Who Date Changes ----- ------- -------- ------------------------------------------------------- 2.00a vy 04/24/12 Updated for version 2.00.a Converted from xio.h to xil_io.h, translating basic type, MB cache functions, exceptions and assertion to xil_io format. 1.00a vy 10/22/10 Initial version 3.0 adk 19/12/13 Updated as per the New Tcl API's. 4.0 adk 03/12/14 Changed the file name cresample.h to xcresample.h. Macros of register offsets, bit definitions, ReadReg and WriteReg macros which are the part of xcresample_hw.h.were moved to xcresample_hw.h. Removed file inclusion of Xil_io.h.
Removed the following functional macros: CRESAMPLE_Enable, CRESAMPLE_Disable, CRESAMPLE_RegUpdateEnable, CRESAMPLE_RegUpdateDisable, CRESAMPLE_Reset, CRESAMPLE_ClearReset, CRESAMPLe_AutoSyncReset. Defined the following functional macros: XCresample_Enable, XCresample_Disable, XCresample_RegUpdateEnable,XCresample_RegUpdateDisable XCresample_Reset, XCresample_ClearReset, XCresample_SyncReset, XCresample_IntrDisable, XCresample_IntrEnable, XCresample_StatusGetPending XCresample_IntrGetPending, XCresample_IntrClear. Declared following structures: XCresample_Config and XCresample of Chroma Resampler.
Defined the following range macros: XCRE_VSIZE_FIRST, XCRE_VSIZE_LAST, XCRE_HSIZE_FIRST, XCRE_HSIZE_FIRST, XCRE_HSIZE_LAST, XCRE_PARITY_ODD, XCRE_PARITY_EVEN, XCRE_COEF_FIRST, XCRE_COEF_LAST, XCRE_OFFSET_DIFF, XCRE_NUM_OF_PHASES, XCRE_NUM_HCOEFS, and XCRE_NUM_VCOEFS.
Modifications in the file xcresample_hw.h are: Added the register offsets and bit masks for the registers and added backward compatibility for macros.
Modifications in the file xcresample.c are: 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.
Modifications in the file xcresample_intr.c are: Implemented XCresample_IntrHandler and XCresample_SetCallBack functions.
Modifications in the file xcresample_selftest.c are: Implemented XCresample_SelfTest function.
Modifications in the file xcresample_sinit.c are: Implemented XCresample_LookupConfig function.
Copyright @ 1995-2014 Xilinx, Inc. All rights reserved.