ycrcb2rgb
Xilinx SDK Drivers API Documentation
xycrcb2rgb.h File Reference

Data Structures

struct  XYCrCb2Rgb_Config
 This typedef contains configuration information for a YCrCb2Rgb core. More...
 
struct  XYCrCb2Rgb
 The XYCrCb2Rgb driver instance data structure. More...
 
struct  XYCrCb2Rgb_Coef_Inputs
 YCrCb2Rgb input coefficient. More...
 
struct  XYCrCb2Rgb_Coef_Outputs
 YCrCb2Rgb output coefficient. More...
 
struct  XYCrCb2Rgb_Coefficients
 YCrCb2Rgb coefficients. More...
 

Macros

#define XYCRCB2RGB_H_
 Prevent circular inclusions by using protection macros. More...
 
#define XYCrCb2Rgb_Enable(InstancePtr)
 This macro enables the YCrCb2Rgb core. More...
 
#define XYCrCb2Rgb_Disable(InstancePtr)
 This macro disables the YCrCb2Rgb core. More...
 
#define XYCrCb2Rgb_Start   XYCrCb2Rgb_Enable
 This macro starts the YCrCb2Rgb core. More...
 
#define XYCrCb2Rgb_Stop   XYCrCb2Rgb_Disable
 This macro stops the YCrCb2Rgb core. More...
 
#define XYCrCb2Rgb_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 XYCrCb2Rgb_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 XYCrCb2Rgb_SyncReset(InstancePtr)
 This macro resets a the YCrCb2Rgb core, but differs from XYCrCb2Rgb_Reset() in that it automatically synchronizes to the VBlank_in input of the core to prevent tearing. More...
 
#define XYCrCb2Rgb_Reset(InstancePtr)
 This macro resets the YCrCb2Rgb core. More...
 
#define XYCrCb2Rgb_IntrEnable(InstancePtr, IntrType)
 This function macro enables individual interrupts of the YCRCB2RGB core by updating the IRQ_ENABLE register. More...
 
#define XYCrCb2Rgb_IntrDisable(InstancePtr, IntrType)
 This function macro disables individual interrupts of the YCRCB2RGB core by updating the IRQ_ENABLE register. More...
 
#define XYCrCb2Rgb_StatusGetPending(InstancePtr)
 This function macro returns the pending interrupt status of the YCRCB2RGB core read from the Status register. More...
 
#define XYCrCb2Rgb_IntrGetPending(InstancePtr)
 This function macro returns the pending interrupts of the YCRCB2RGB core for the interrupts that have been enabled. More...
 
#define XYCrCb2Rgb_IntrClear(InstancePtr, IntrType)
 This function macro clears/acknowledges pending interrupts of the YCRCB2RGB core in the Status register. More...
 
#define XYCrCb2Rgb_Max(Num1, Num2)   (((Num1) > (Num2)) ? (Num1) : (Num2))
 This macro identifies maximum number from given numbers. More...
 
#define XYCC_ACT_SIZE_FIRST   32
 Active Size (VxH) range macros. More...
 
#define XYCC_ACT_SIZE_LAST   8192
 Ending value for H/V. More...
 
#define XYCC_RGBMAX_MIN_FIRST   0
 RGBMAX, RGBMIN range macros. More...
 
#define XYCC_RGBMAX_MIN_LAST   255
 Ending value for RGBMAX/RGBMIN. More...
 
#define XYCC_RGBOFFSET_FIRST   0
 ROFFSET, GOFFSET, BOFFSET range macros. More...
 
#define XYCC_RGBOFFSET_LAST   255
 Ending value for ROFFSET/ GOFFSET/BOFFSET. More...
 

Typedefs

typedef void(* XYCrCb2Rgb_CallBack) (void *CallBackRef)
 Callback type for all interrupts except error interrupt. More...
 
typedef void(* XYCrCb2Rgb_ErrorCallBack) (void *CallBackRef, u32 ErrorMask)
 Callback type for error interrupt. More...
 

Enumerations

Handler Types
enum  { XYCC_HANDLER_PROCSTART = 1, XYCC_HANDLER_FRAMEDONE, XYCC_HANDLER_ERROR }
 These constants specify different types of handler and used to differentiate interrupt requests from core. More...
 
Standard Types
enum  XYcc_Standards {
  XYCC_STANDARD_ITU_601_SD = 0, XYCC_STANDARD_ITU_709_NTSC, XYCC_STANDARD_ITU_709_PAL, XYCC_STANDARD_YUV,
  XYCC_STANDARD_CUSTOM
}
 These constants specify different types of standards used to represent standard color encoding. More...
 
Output Ranges
enum  XYcc_OutputRanges { XYCC_TV_16_TO_240 = 0, XYCC_STUDIO_16_TO_235, XYCC_GRAPHICS_0_TO_255 }
 These constants specify different ranges used for studio equipment, television and computer graphics respectively. More...
 

Functions

XYCrCb2Rgb_ConfigXYCrCb2Rgb_LookupConfig (u16 DeviceId)
 This function returns a reference to an XYCrCb2Rgb_Config structure based on the unique core id, DeviceId. More...
 
int XYCrCb2Rgb_CfgInitialize (XYCrCb2Rgb *InstancePtr, XYCrCb2Rgb_Config *CfgPtr, u32 EffectiveAddr)
 This function initializes the YCrCb2Rgb core. More...
 
void XYCrCb2Rgb_EnableDbgByPass (XYCrCb2Rgb *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 XYCrCb2Rgb_IsDbgByPassEnabled (XYCrCb2Rgb *InstancePtr)
 This function returns the current bypass mode of the core. More...
 
void XYCrCb2Rgb_DisableDbgBypass (XYCrCb2Rgb *InstancePtr)
 This function disables Bypass mode of the core. More...
 
void XYCrCb2Rgb_EnableDbgTestPattern (XYCrCb2Rgb *InstancePtr)
 This function switches the core to test-pattern generator mode if debug feature is enabled. More...
 
int XYCrCb2Rgb_IsDbgTestPatternEnabled (XYCrCb2Rgb *InstancePtr)
 This function returns the test-pattern generator mode (enabled or not), if debug feature is enabled. More...
 
void XYCrCb2Rgb_DisableDbgTestPattern (XYCrCb2Rgb *InstancePtr)
 This function disables debug test pattern mode. More...
 
u32 XYCrCb2Rgb_GetVersion (XYCrCb2Rgb *InstancePtr)
 This function facilitates software identification of exact version of the YCrCb2rGB hardware (h/w). More...
 
u32 XYCrCb2Rgb_GetDbgFrameCount (XYCrCb2Rgb *InstancePtr)
 This function returns the frame count, the number of frames processed since power-up. More...
 
u32 XYCrCb2Rgb_GetDbgLineCount (XYCrCb2Rgb *InstancePtr)
 This function returns Line count, the number of lines processed since power-up. More...
 
u32 XYCrCb2Rgb_GetDbgPixelCount (XYCrCb2Rgb *InstancePtr)
 This function returns the pixel count, the number of pixels processed since power up. More...
 
void XYCrCb2Rgb_Setup (XYCrCb2Rgb *InstancePtr)
 This function sets up double buffered active size register and enables the register update. More...
 
void XYCrCb2Rgb_SetActiveSize (XYCrCb2Rgb *InstancePtr, u16 HSize, u16 VSize)
 This function sets active H/V sizes in the active frame size register. More...
 
void XYCrCb2Rgb_GetActiveSize (XYCrCb2Rgb *InstancePtr, u16 *HSize, u16 *VSize)
 This function gets the active H/V sizes of the YCrCb2Rgb core from active size register. More...
 
void XYCrCb2Rgb_SetRGBMax (XYCrCb2Rgb *InstancePtr, u32 RGBMax)
 This function sets the RGB maximum value on YCrCb2Rgb channels of the output. More...
 
u32 XYCrCb2Rgb_GetRGBMax (XYCrCb2Rgb *InstancePtr)
 This function gets the maximum value on RGB channels of the output. More...
 
void XYCrCb2Rgb_SetRGBMin (XYCrCb2Rgb *InstancePtr, u32 RGBMin)
 This function sets minimum value on RGB channels of the output. More...
 
u32 XYCrCb2Rgb_GetRGBMin (XYCrCb2Rgb *InstancePtr)
 This function gets the minimum value on RGB channels of the output. More...
 
void XYCrCb2Rgb_SetROffset (XYCrCb2Rgb *InstancePtr, u32 ROffset)
 This function sets offset compensation value on the Red channel. More...
 
u32 XYCrCb2Rgb_GetROffset (XYCrCb2Rgb *InstancePtr)
 This function gets offset compensation value from the Red channel. More...
 
void XYCrCb2Rgb_SetGOffset (XYCrCb2Rgb *InstancePtr, u32 GOffset)
 This function sets offset compensation value on the Green channel. More...
 
u32 XYCrCb2Rgb_GetGOffset (XYCrCb2Rgb *InstancePtr)
 This function gets offset compensation value from the Green channel. More...
 
void XYCrCb2Rgb_SetBOffset (XYCrCb2Rgb *InstancePtr, u32 BOffset)
 This function sets offset compensation value on the Blue channel. More...
 
u32 XYCrCb2Rgb_GetBOffset (XYCrCb2Rgb *InstancePtr)
 This function gets offset compensation value from the Blue channel. More...
 
void XYCrCb2Rgb_SetCoefs (XYCrCb2Rgb *InstancePtr, struct XYCrCb2Rgb_Coefficients *Coef)
 This function sets A, B, C and D coefficients. More...
 
void XYCrCb2Rgb_GetCoefs (XYCrCb2Rgb *InstancePtr, struct XYCrCb2Rgb_Coefficients *Coef)
 This function returns A, B, C and D coefficients. More...
 
void XYCrCb2Rgb_Select_Standard (XYCrCb2Rgb *InstancePtr, enum XYcc_Standards StandardSel, enum XYcc_OutputRanges InputRange, u32 DataWidth, struct XYCrCb2Rgb_Coef_Inputs *CoefIn)
 This function populates an XYCrCb2Rgb_Coef_Inputs structure with the values from the selected video standard. More...
 
u32 XYCrCb2Rgb_Coefficient_Translation (XYCrCb2Rgb *InstancePtr, struct XYCrCb2Rgb_Coef_Inputs *CoefIn, struct XYCrCb2Rgb_Coef_Outputs *CoefOut, u32 DataWidth, u32 MWidth)
 This function translates the XYCrCb2Rgb_Coef_Inputs structure into the XYCrCb2Rgb_Coef_Outputs structure that can be used to program the core's registers. More...
 
void XYCrCb2Rgb_Select_OutputRange (XYCrCb2Rgb *InstancePtr, enum XYcc_OutputRanges Range)
 This function governs the range of outputs R, G and B by affecting the conversion coefficients as well as the clipping and clamping values. More...
 
int XYCrCb2Rgb_SelfTest (XYCrCb2Rgb *InstancePtr)
 This function reads Version register of YCRCB2RGB core and compares with zero as part of self test. More...
 
void XYCrCb2Rgb_IntrHandler (void *InstancePtr)
 This function is the interrupt handler for the YCRCB2RGB core. More...
 
int XYCrCb2Rgb_SetCallBack (XYCrCb2Rgb *InstancePtr, u32 HandlerType, void *CallBackFunc, void *CallBackRef)
 This routine installs an asynchronous callback function for the given HandlerTypes. More...