rgb2ycrcb: xrgb2ycrcb.h File Reference

| rgb2ycrcb Xilinx SDK Drivers API Documentation

- Overview
- Data Structures
- APIs
- File List
- Examples

Data Structures | Macros | Typedefs | Functions
xrgb2ycrcb.h File Reference

## Data Structures
struct | XRgb2YCrCb_Config
| This typedef contains configuration information for a Rgb2YCrCb core. More...
struct | XRgb2YCrCb
| The XRgb2YCrCb driver instance data structure. More...
struct | XRgb2YCrCb_Coef_Inputs
| Rgb2YCrCb input coefficient. More...
struct | XRgb2YCrCb_Coef_Outputs
| Rgb2YCrCb output coefficient. More...

## Macros
#define | XRGB2YCRCB_H_
| Prevent circular inclusions by using protection macros. More...
#define | XRgb2YCrCb_Enable(InstancePtr)
| This macro enables the Rgb2YCrCb device/core. More...
#define | XRgb2YCrCb_Disable(InstancePtr)
| This macro disables the Rgb2YCrCb device/core. More...
#define | XRgb2YCrCb_Start XRgb2YCrCb_Enable
| This function macro enables/starts the Rgb2YCrCb core. More...
#define | XRgb2YCrCb_Stop XRgb2YCrCb_Disable
| This function macro disables/stops the Rgb2YCrCb core. More...
#define | XRgb2YCrCb_RegUpdateEnable(InstancePtr)
| This macro enables copying from updated processor register values to the active set at the end of each AXI-Stream frame. More...
#define | XRgb2YCrCb_RegUpdateDisable(InstancePtr)
| This macro disables copying from updated processor register values to the active set at the end of each AXI-Stream frame. More...
#define | XRgb2YCrCb_SyncReset(InstancePtr)
| This macro resets the Rgb2YCrCb device, but differs from XRgb_Reset() in that it automatically synchronizes to the VBlank_in input of the core to prevent tearing. More...
#define | XRgb2YCrCb_Reset(InstancePtr)
| This macro resets the Rgb2YCrCb core. More...
#define | XRgb2YCrCb_IntrEnable(InstancePtr, IntrType)
| This function macro enables individual interrupts of the RGB2YCRCB core by updating the IRQ_ENABLE register. More...
#define | XRgb2YCrCb_IntrDisable(InstancePtr, IntrType)
| This function macro disables individual interrupts of the RGB2YCRCB core by updating the IRQ_ENABLE register. More...
#define | XRgb2YCrCb_StatusGetPending(InstancePtr)
| This function macro returns the pending interrupt status of the RGB2YCRCB core read from the Status register. More...
#define | XRgb2YCrCb_IntrGetPending(InstancePtr)
| This function macro returns the pending interrupts of the RGB2YCRCB core for the interrupts that have been enabled. More...
#define | XRgb2YCrCb_IntrClear(InstancePtr, IntrType)
| This function macro clears/acknowledges pending interrupts of the RGB2YCRCB core in the Status register. More...
Active size range macros
#define | XRGB_VSIZE_FIRST 32
| VSize starting value. More...
#define | XRGB_VSIZE_LAST 7680
| VSize ending value. More...
#define | XRGB_HSIZE_FIRST 32
| HSize starting value. More...
#define | XRGB_HSIZE_LAST 7680
| HSize ending value. More...
Ymax range macros
#define | XRGB_YMAX_FIRST 0
| Ymax starting value. More...
#define | XRGB_YMAX_LAST 255
| Ymax ending value. More...
Ymin range macros
#define | XRGB_YMIN_FIRST 0
| Ymin starting value. More...
#define | XRGB_YMIN_LAST 255
| Ymax ending value. More...
Yoffset range macros
#define | XRGB_YOFFSET_FIRST 0
| Yoffset starting value. More...
#define | XRGB_YOFFSET_LAST 255
| Yoffset ending value. More...
Cbmax range macros
#define | XRGB_CBMAX_FIRST 0
| Cbmax starting value. More...
#define | XRGB_CBMAX_LAST 255
| Cbmax ending value. More...
Cbmin range macros
#define | XRGB_CBMIN_FIRST 0
| Cbmin starting value. More...
#define | XRGB_CBMIN_LAST 255
| Cbmin ending value. More...
Cboffset range macros
#define | XRGB_CBOFFSET_FIRST 0
| Cboffset starting value. More...
#define | XRGB_CBOFFSET_LAST 255
| Cboffset ending value. More...
Crmax range macros
#define | XRGB_CRMAX_FIRST 0
| Crmax starting value. More...
#define | XRGB_CRMAX_LAST 255
| Crmax ending value. More...
Crmin range macros
#define | XRGB_CRMIN_FIRST 0
| Crmin starting value. More...
#define | XRGB_CRMIN_LAST 255
| Crmin ending value. More...
Croffset range macros
#define | XRGB_CROFFSET_FIRST 0
| Croffset starting value. More...
#define | XRGB_CROFFSET_LAST 255
| Croffset ending value. More...

## Typedefs
typedef void(* | XRgb2YCrCb_CallBack )(void *CallBackRef)
| Callback type for all interrupts except error interrupt. More...
typedef void(* | XRgb2YCrCb_ErrorCallBack )(void *CallBackRef, u32 ErrorMask)
| This data type defines a handler that an application defines to communicate with interrupt system to retrieve error information while processing video frame. More...

## Enumerations
Handler Types
enum | { XRGB_HANDLER_PROCSTART = 1, XRGB_HANDLER_FRAMEDONE, XRGB_HANDLER_ERROR }
| These constants specify different types of handler and used to differentiate interrupt requests from core. More...
Standard Types
enum | XRgb_Standards { XRGB_STANDARD_ITU_601_SD = 0, XRGB_STANDARD_ITU_709_NTSC, XRGB_STANDARD_ITU_709_PAL, XRGB_STANDARD_YUV, XRGB_STANDARD_CUSTOM }
| These constants specify different types of standards used to represent standard color encoding. More...
Output Ranges
enum | XRgb_OutputRanges { XRGB_TV_16_TO_240 = 0, XRGB_STUDIO_16_TO_235, XRGB_GRAPHICS_0_TO_255 }
| These constants specify different ranges used for studio equipment, television and computer graphics respectively. More...

## Functions
XRgb2YCrCb_Config * | XRgb2YCrCb_LookupConfig (u16 DeviceId)
| This function returns a reference to an XRgb2YCrCb_Config structure based on the unique core id, DeviceId. More...
int | XRgb2YCrCb_CfgInitialize (XRgb2YCrCb *InstancePtr, XRgb2YCrCb_Config *CfgPtr, u32 EffectiveAddr)
| This function initializes the Rgb2YCrCb core. More...
void | XRgb2YCrCb_EnableDbgByPass (XRgb2YCrCb *InstancePtr)
| This function sets the bypass bit of control register to switch the core to bypass mode if debug is enabled in the IP. More...
int | XRgb2YCrCb_IsDbgByPassEnabled (XRgb2YCrCb *InstancePtr)
| This function returns the current bypass mode of a core. More...
void | XRgb2YCrCb_DisableDbgBypass (XRgb2YCrCb *InstancePtr)
| This function disables Bypass mode. More...
void | XRgb2YCrCb_EnableDbgTestPattern (XRgb2YCrCb *InstancePtr)
| This function switches the core to test-pattern generator mode if debug feature is enabled. More...
int | XRgb2YCrCb_IsDbgTestPatternEnabled (XRgb2YCrCb *InstancePtr)
| This function returns the test-pattern generator mode (enabled or not), if debug feature is enabled. More...
void | XRgb2YCrCb_DisableDbgTestPattern (XRgb2YCrCb *InstancePtr)
| This function disables debug test pattern mode. More...
u32 | XRgb2YCrCb_GetVersion (XRgb2YCrCb *InstancePtr)
| This function facilitates software identification of exact version of the RGB2YCrCb hardware (h/w). More...
u32 | XRgb2YCrCb_GetDbgFrameCount (XRgb2YCrCb *InstancePtr)
| This function returns the frame count, the number of frames processed since power-up. More...
u32 | XRgb2YCrCb_GetDbgLineCount (XRgb2YCrCb *InstancePtr)
| This function returns Line count, the number of lines processed since power-up. More...
u32 | XRgb2YCrCb_GetDbgPixelCount (XRgb2YCrCb *InstancePtr)
| This function returns the pixel count, the number of pixels processed since power up. More...
void | XRgb2YCrCb_Setup (XRgb2YCrCb *InstancePtr)
| This function sets up double buffered ACTIVE_SIZE register and enables the register update. More...
void | XRgb2YCrCb_SetActiveSize (XRgb2YCrCb *InstancePtr, u16 HSize, u16 VSize)
| This function sets active H/V sizes in the active size register. More...
void | XRgb2YCrCb_GetActiveSize (XRgb2YCrCb *InstancePtr, u16 *HSize, u16 *VSize)
| This function gets the active H/V sizes of the Rgb2YCrCb core from active size register. More...
void | XRgb2YCrCb_SetYMax (XRgb2YCrCb *InstancePtr, u32 YMax)
| This function sets the maximum value allowed on the Luma (Y) channel of the output. More...
u32 | XRgb2YCrCb_GetYMax (XRgb2YCrCb *InstancePtr)
| This function returns the maximum value of the Luma (Y) channel of the output. More...
void | XRgb2YCrCb_SetYMin (XRgb2YCrCb *InstancePtr, u32 YMin)
| This function sets the minimum value allowed on the Luma (Y) channel of the output. More...
u32 | XRgb2YCrCb_GetYMin (XRgb2YCrCb *InstancePtr)
| This function returns the minimum value of the Luma (Y) channel of the output. More...
void | XRgb2YCrCb_SetCbMax (XRgb2YCrCb *InstancePtr, u32 CbMax)
| This function sets the maximum value allowed on the Cb Chroma channel of the output. More...
u32 | XRgb2YCrCb_GetCbMax (XRgb2YCrCb *InstancePtr)
| This function returns the maximum value on the Cb Chroma channel of the output. More...
void | XRgb2YCrCb_SetCbMin (XRgb2YCrCb *InstancePtr, u32 CbMin)
| This function sets the minimum value allowed on the Cb Chroma channel of the output. More...
u32 | XRgb2YCrCb_GetCbMin (XRgb2YCrCb *InstancePtr)
| This function returns the minimum value on the Cb Chroma channel of the output. More...
void | XRgb2YCrCb_SetCrMax (XRgb2YCrCb *InstancePtr, u32 CrMax)
| This function sets the maximum value allowed on the Cr Chroma channel of the output. More...
u32 | XRgb2YCrCb_GetCrMax (XRgb2YCrCb *InstancePtr)
| This function returns the maximum value on the Cr Chroma channel of the output. More...
void | XRgb2YCrCb_SetCrMin (XRgb2YCrCb *InstancePtr, u32 CrMin)
| This function sets the minimum value allowed on the Cr Chroma channel of the output. More...
u32 | XRgb2YCrCb_GetCrMin (XRgb2YCrCb *InstancePtr)
| This function returns the minimum value on the Cr Chroma channel of the output. More...
void | XRgb2YCrCb_SetYOffset (XRgb2YCrCb *InstancePtr, u32 YOffset)
| This function sets the offset compensation value for the Luma (Y) channel. More...
u32 | XRgb2YCrCb_GetYOffset (XRgb2YCrCb *InstancePtr)
| This function returns the offset compensation value for the Luma (Y) channel. More...
void | XRgb2YCrCb_SetCbOffset (XRgb2YCrCb *InstancePtr, u32 CbOffset)
| This function sets the offset compensation value for the Cb Chroma channel. More...
u32 | XRgb2YCrCb_GetCbOffset (XRgb2YCrCb *InstancePtr)
| This function returns the offset compensation value for the Cb Chroma channel. More...
void | XRgb2YCrCb_SetCrOffset (XRgb2YCrCb *InstancePtr, u32 CrOffset)
| This function sets the offset compensation value for the Cr Chroma channel. More...
u32 | XRgb2YCrCb_GetCrOffset (XRgb2YCrCb *InstancePtr)
| This function returns the offset compensation value of the Cr Chroma channel. More...
void | XRgb2YCrCb_SetCoefs (XRgb2YCrCb *InstancePtr, double ACoef, double BCoef, double CCoef, double DCoef)
| This function sets A, B, C and D coefficients. More...
void | XRgb2YCrCb_GetCoefs (XRgb2YCrCb *InstancePtr, double *ACoef, double *BCoef, double *CCoef, double *DCoef)
| This function returns A, B, C and D coefficients. More...
void | XRgb2YCrCb_Select_Standard (XRgb2YCrCb *InstancePtr, enum XRgb_Standards StandardSel, enum XRgb_OutputRanges InputRange, u32 DataWidth, struct XRgb2YCrCb_Coef_Inputs *CoefIn)
| This function populates an XRgb2YCrCb_Coef_Inputs structure with the values from the selected video standard. More...
u32 | XRgb2YCrCb_Coefficient_Translation (XRgb2YCrCb *InstancePtr, struct XRgb2YCrCb_Coef_Inputs *CoefIn, struct XRgb2YCrCb_Coef_Outputs *CoefOut, u32 DataWidth)
| This function translates the XRgb2YCrCb_Coef_Inputs structure into the XRgb2YCrCb_Coef_Outputs structure that can be used to program the core's registers. More...
void | XRgb2YCrCb_Select_OutputRange (XRgb2YCrCb *InstancePtr, enum XRgb_OutputRanges Range)
| This function governs the range of outputs Y, Cr and Cb by affecting the conversion coefficients as well as the clipping and clamping values. More...
int | XRgb2YCrCb_SelfTest (XRgb2YCrCb *InstancePtr)
| This function reads version register of RGB2YCRCB core and compares with zero as part of self test. More...
void | XRgb2YCrCb_IntrHandler (void *InstancePtr)
| This function is the interrupt handler for the RGB2YCRCB driver. More...
int | XRgb2YCrCb_SetCallBack (XRgb2YCrCb *InstancePtr, u32 HandlerType, void *CallBackFunc, void *CallBackRef)
| This routine installs an asynchronous callback function for the given HandlerType: More...