Software Drivers

RGB2YCRCB

This header file contains identifiers and register-level driver functions (or macros), range macros, structure typedefs that can be used to access the Xilinx Rgb2YCrCb core instance.

The RGB to YCrCb Color-Space Convertor core is a simplified 3x3 matrix multiplier converts three input color samples to three output samples in a single clock cycle. The core supports four common format conversions as well as a custom mode that allows for a user-defined transform. The core is capable of a maximum resolution of 7680 columns by 7680 rows with 8, 10, 12, or 16 bits per pixel.

Initialization & Configuration

The device driver enables higher layer software (e.g., an application) to communicate to the RGB2YCRCB core.

XRgb2YCrCb_CfgInitialize() API is used to initialize the RGB2YCRCB core. The user needs to first call the XRgb2YCrCb_LookupConfig() API which returns the Configuration structure pointer which is passed as a parameter to the XRgb2YCrCb_CfgInitialize() API.

Interrupts

The driver provides an interrupt handler XRgb2YCrCb_IntrHandler for handling the interrupt from the RGB2YCRCB core. The users of this driver have to register this handler with the interrupt system and provide the callback functions by using XRgb2YCrCb_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 XRgb2YCrCb 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
 ----- ------ -------- -------------------------------------------------------
 5.00a tb     02/27/12 Updated for RGB2YCRCB V5.00.a
 5.01a bao    12/28/12 Converted from xio.h to xil_io.h, translating basic
                       types, MB cache functions, exceptions and assertions
                       to xil_io format.
 6.0   adk    19/12/13 Updated as per the New Tcl API's.
 7.0   adk    01/07/14 Changed the file name from "rgb2ycrcb.h" to
                       "xrgb2ycrcb.h".
                       Moved register offsets and bit definitions from
                       rgb2ycrcb.h file to xrgb2ycrcb_hw.h file.

                       Removed RGB_TIMING_STATUS register offset because this
                       register is not present in latest product guide.

                       Removed following function macros:
                       RGB_Enable, RGB_Disable, RGB_RegUpdateEnable,
                       RGB_RegUpdateDisable, RGB_Reset, RGB_ClearReset,
                       RGB_AutoSyncReset.

                       Removed following functions:
                       RGB_select_standard, RGB_coefficient_translation,
                       RGB_set_coefficients, RGB_get_coefficients.

                       Added following handler types as enum:
                       XRGB_HANDLER_PROCSTART, XRGB_HANDLER_FRAMEDONE,
                       XRGB_HANDLER_ERROR.

                       Added following standard types as enum:
                       XRGB_STANDARD_ITU_601_SD, XRGB_STANDARD_ITU_709_NTSC,
                       XRGB_STANDARD_ITU_709_PAL, XRGB_STANDARD_YUV,
                       XRGB_STANDARD_CUSTOM.

                       Added following output ranges as enum:
                       XRGB_TV_16_TO_240, XRGB_STUDIO_16_TO_235,
                       XRGB_GRAPHICS_0_TO_255.

                       Added range macros for ActiveSize, YMAX, YMIN, YOFFSET,
                       CBMAX, CBMIN, CBOFFSET, CRMAX, CRMIN, CROFFSET
                       registers.

                       Added following function macros:
                       XRgb2YCrCb_IntrEnable, XRgb2YCrCb_SyncReset,
                       XRgb2YCrCb_IntrDisable, XRgb2YCrCb_StatusGetPending,
                       XRgb2YCrCb_IntrGetPending, XRgb2YCrCb_IntrClear,
                       XRgb2YCrCb_RegUpdateEnable,
                       XRgb2YCrCb_RegUpdateDisable, XRgb2YCrCb_Reset,
                       XRgb2YCrCb_Enable, XRgb2YCrCb_Disable,
                       XRgb2YCrCb_Start, XRgb2YCrCb_Stop.

                       Added core and configuration structure.
                       Renamed rgb_coef_inputs -> XRgb2YCrCb_Coef_Inputs and
                       rgb_coef_outputs - > XRgb2YCrCb_Coef_Outputs.

                       Added callback functions typedef.

                       Implemented XRgb2YCrCb_LookupConfig in
                       xrgb2ycrcb_sinit.c
                       Implemented XRgb2YCrCb_SelfTest in
                       xrgb2ycrcb_selftest.c
                       Implemented XRgb2YCrCb_IntrHandler,
                       XRgb2YCrCb_SetCallBack in xrgb2ycrcb_intr.c.

                       Implemented following functions in xrgb2ycrcb.c:
                       XRgb2YCrCb_CfgInitialize, XRgb2YCrCb_EnableDbgByPass,
                       XRgb2YCrCb_IsDbgByPassEnabled,
                       XRgb2YCrCb_DisableDbgBypass,
                       XRgb2YCrCb_EnableDbgTestPattern,
                       XRgb2YCrCb_IsDbgTestPatternEnabled,
                       XRgb2YCrCb_DisableDbgTestPattern,
                       XRgb2YCrCb_GetVersion, XRgb2YCrCb_GetDbgFrameCount,
                       XRgb2YCrCb_GetDbgLineCount,
                       XRgb2YCrCb_GetDbgPixelCount, XRgb2YCrCb_Setup,
                       XRgb2YCrCb_SetActiveSize, XRgb2YCrCb_GetActiveSize,
                       XRgb2YCrCb_SetYMax, XRgb2YCrCb_GetYMax,
                       XRgb2YCrCb_SetYMin, XRgb2YCrCb_GetYMin,
                       XRgb2YCrCb_SetCbMax, XRgb2YCrCb_GetCbMax,
                       XRgb2YCrCb_SetCbMin, XRgb2YCrCb_GetCbMin,
                       XRgb2YCrCb_SetCrMax, XRgb2YCrCb_GetCrMax,
                       XRgb2YCrCb_SetCrMin, XRgb2YCrCb_GetCrMin,
                       XRgb2YCrCb_SetYOffset, XRgb2YCrCb_GetYOffset,
                       XRgb2YCrCb_SetCbOffset, XRgb2YCrCb_GetCbOffset,
                       XRgb2YCrCb_SetCrOffset, XRgb2YCrCb_GetCrOffset,
                       XRgb2YCrCb_SetCoefs, XRgb2YCrCb_GetCoefs,
                       XRgb2YCrCb_Select_Standard,
                       XRgb2YCrCb_Coefficient_Translation,
                       XRgb2YCrCb_Select_OutputRange.
*
Copyright @ 1995-2014 Xilinx, Inc. All rights reserved.