rgb2ycrcb
Xilinx SDK Drivers API Documentation
Rgb2ycrcb_v7_1

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...
 
#define XRGB2YCRCB_HW_H_
 Prevent circular inclusions by using protection macros. More...
 
#define XRgb2YCrCb_In32   Xil_In32
 Input operation. More...
 
#define XRgb2YCrCb_Out32   Xil_Out32
 Output operation. More...
 
#define XRgb2YCrCb_ReadReg(BaseAddress, RegOffset)   XRgb2YCrCb_In32((BaseAddress) + (u32)(RegOffset))
 This function macro reads the given register. More...
 
#define XRgb2YCrCb_WriteReg(BaseAddress, RegOffset, Data)   XRgb2YCrCb_Out32((BaseAddress) + (u32)(RegOffset),(u32)(Data))
 This function macro writes the given register. 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...
 

Functions

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...
 
XRgb2YCrCb_ConfigXRgb2YCrCb_LookupConfig (u16 DeviceId)
 This function returns a reference to an XRgb2YCrCb_Config structure based on the unique core id, DeviceId. 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...
 

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...
 

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...
 

Control Registers

Control registers offset for RGB2YCRCB core.

#define XRGB_CONTROL_OFFSET   0x000
 Control offset. More...
 
#define XRGB_STATUS_OFFSET   0x004
 Status offset. More...
 
#define XRGB_ERROR_OFFSET   0x008
 Error offset. More...
 
#define XRGB_IRQ_EN_OFFSET   0x00C
 IRQ Enable offset. More...
 
#define XRGB_VERSION_OFFSET   0x010
 Version offset. More...
 
#define XRGB_SYSDEBUG0_OFFSET   0x014
 System Debug 0 offset. More...
 
#define XRGB_SYSDEBUG1_OFFSET   0x018
 System Debug 1 offset. More...
 
#define XRGB_SYSDEBUG2_OFFSET   0x01C
 System Debug 2 offset. More...
 

Timing Control Registers

Timing control registers offset for RGB2YCRCB core.

#define XRGB_ACTIVE_SIZE_OFFSET   0x020
 Active Size (V x H) offset. More...
 

Core Specific Registers

Core specific registers offset.

#define XRGB_YMAX_OFFSET   0x100
 Luma Clipping offset. More...
 
#define XRGB_YMIN_OFFSET   0x104
 Luma Clamping offset. More...
 
#define XRGB_CBMAX_OFFSET   0x108
 Cb Clipping offset. More...
 
#define XRGB_CBMIN_OFFSET   0x10C
 Cb Clamping offset. More...
 
#define XRGB_CRMAX_OFFSET   0x110
 Cr Clipping offset. More...
 
#define XRGB_CRMIN_OFFSET   0x114
 Cr Clamping offset. More...
 
#define XRGB_YOFFSET_OFFSET   0x118
 Luma Offset offset. More...
 
#define XRGB_CBOFFSET_OFFSET   0x11C
 Cb Offset offset. More...
 
#define XRGB_CROFFSET_OFFSET   0x120
 Cr Offset offset. More...
 
#define XRGB_ACOEF_OFFSET   0x124
 A Coefficient offset. More...
 
#define XRGB_BCOEF_OFFSET   0x128
 B Coefficient offset. More...
 
#define XRGB_CCOEF_OFFSET   0x12C
 C Coefficient offset. More...
 
#define XRGB_DCOEF_OFFSET   0x130
 D Coefficient offset. More...
 

Control Register Bit Masks

Control Register bit definition for RGB2YCRCB core.

#define XRGB_CTL_SW_EN_MASK   0x00000001
 Software Enable Mask. More...
 
#define XRGB_CTL_RUE_MASK   0x00000002
 Register Update Enable Mask. More...
 
#define XRGB_CTL_BPE_MASK   0x00000010
 Bypass Mask. More...
 
#define XRGB_CTL_TPE_MASK   0x00000020
 Test Pattern Mask. More...
 
#define XRGB_CTL_AUTORESET_MASK   0x40000000
 Software Reset - Auto-synchronize to SOF Mask. More...
 
#define XRGB_CTL_RESET_MASK   0x80000000
 Software Reset - Instantaneous Mask. More...
 

Slave Error Bit Masks

#define XRGB_ERR_EOL_EARLY_MASK   0x000000001
 Error: End of line Early Mask. More...
 
#define XRGB_ERR_EOL_LATE_MASK   0x000000002
 Error: End of line Late Mask. More...
 
#define XRGB_ERR_SOF_EARLY_MASK   0x000000004
 Error: Start of frame Early Mask. More...
 
#define XRGB_ERR_SOF_LATE_MASK   0x000000008
 Error: Start of frame Late Mask. More...
 

Interrupt Register Bit Masks

Interrupt Register bit definition for RGB2YCRCB core.

It is applicable for STATUS and IRQ_ENABLE Registers.

#define XRGB_IXR_PROC_STARTED_MASK   0x00000001
 Process Started Mask. More...
 
#define XRGB_IXR_EOF_MASK   0x00000002
 End-Of-Frame Mask. More...
 
#define XRGB_IXR_SE_MASK   0x00010000
 Slave Error Mask. More...
 
#define XRGB_IXR_ALLINTR_MASK   0x00010003
 Interrupt All Error Mask (ORing (of All Interrupt Mask) More...
 

Version Register Bit Masks and Shifts

Version Register bit definition for RGB2YCRCB core.

#define XRGB_VER_REV_NUM_MASK   0x000000FF
 Revision Number Mask. More...
 
#define XRGB_VER_PID_MASK   0x00000F00
 Patch ID Mask. More...
 
#define XRGB_VER_REV_MASK   0x0000F000
 Revision Mask. More...
 
#define XRGB_VER_MINOR_MASK   0x00FF0000
 Minor Mask. More...
 
#define XRGB_VER_MAJOR_MASK   0xFF000000
 Major Mask. More...
 
#define XRGB_VER_MAJOR_SHIFT   24
 Major Shift. More...
 
#define XRGB_VER_MINOR_SHIFT   16
 Minor Shift. More...
 
#define XGMA_VER_REV_SHIFT   12
 Revision Shift. More...
 
#define XRGB_VER_INTERNAL_SHIFT   8
 Internal Shift. More...
 

ActiveSize Register Bit Masks and Shift

#define XRGB_ACTSIZE_NUM_PIXEL_MASK   0x00001FFF
 The number of pixels in source image. More...
 
#define XRGB_ACTSIZE_NUM_LINE_MASK   0x1FFF0000
 The number of lines in source image. More...
 
#define XRGB_ACTSIZE_NUM_LINE_SHIFT   16
 Shift for number of lines. More...
 

YMax Register Bit Mask

#define XRGB_YMAX_MASK   0x0000FFFF
 Luma clipping value Mask. More...
 

YMin Register Bit Mask

#define XRGB_YMIN_MASK   0x0000FFFF
 Luma clamping value Mask. More...
 

CBMax Register Bit Mask

#define XRGB_CBMAX_MASK   0x0000FFFF
 Chroma Cb clipping value Mask. More...
 

CBMin Register Bit Mask

#define XRGB_CBMIN_MASK   0x0000FFFF
 Chroma Cb clamping value mask. More...
 

CRMax Register Bit Mask

#define XRGB_CRMAX_MASK   0x0000FFFF
 Chroma Cr clipping value Mask. More...
 

CRMin Register Bit Mask

#define XRGB_CRMIN_MASK   0x0000FFFF
 Chroma Cr clamping value Mask. More...
 

YOffset Register Bit Mask

#define XRGB_YOFFSET_MASK   0x0001FFFF
 Luma offset compensation value Mask. More...
 

CbOffset Register Bit Mask

#define XRGB_CBOFFSET_MASK   0x0001FFFF
 Chroma(Cb) offset compensation value Mask. More...
 

CrOffset Register Bit Mask

#define XRGB_CROFFSET_MASK   0x0001FFFF
 Chroma(Cr) offset compensation value Mask. More...
 

ACOEF, BCOEF, CCOEF, DCOEF Register Bit Mask

#define XRGB_COEFF_MASK   0x0001FFFF
 Matrix Conversion Coefficient value mask. More...
 

General purpose Bit Mask and Shifts

#define XRGB_8_BIT_MASK   0x000000FF
 8-Bit mask More...
 
#define XRGB_16_BIT_MASK   0x0000FFFF
 16-Bit mask More...
 
#define XRGB_16_BIT_COEF_SHIFT   16
 16-Bit Coefficient shift More...
 

Data widths in bits per color.

#define XRGB_DATA_WIDTH_8   8
 8-bit Data Width More...
 
#define XRGB_DATA_WIDTH_10   10
 10-bit Data Width More...
 
#define XRGB_DATA_WIDTH_12   12
 12-bit Data Width More...
 
#define XRGB_DATA_WIDTH_16   16
 16-bit Data Width More...
 

Backward Compatibility Macros

To support backward compatibility, following macro definitions are re-defined.

#define RGB_CONTROL   XRGB_CONTROL_OFFSET
 
#define RGB_STATUS   XRGB_STATUS_OFFSET
 
#define RGB_ERROR   XRGB_ERROR_OFFSET
 
#define RGB_IRQ_EN   XRGB_IRQ_EN_OFFSET
 
#define RGB_VERSION   XRGB_VERSION_OFFSET
 
#define RGB_SYSDEBUG0   XRGB_SYSDEBUG0_OFFSET
 
#define RGB_SYSDEBUG1   XRGB_SYSDEBUG1_OFFSET
 
#define RGB_SYSDEBUG2   XRGB_SYSDEBUG2_OFFSET
 
#define RGB_ACTIVE_SIZE   XRGB_ACTIVE_SIZE_OFFSET
 
#define RGB_YMAX   XRGB_YMAX_OFFSET
 
#define RGB_YMIN   XRGB_YMIN_OFFSET
 
#define RGB_CBMAX   XRGB_CBMAX_OFFSET
 
#define RGB_CBMIN   XRGB_CBMIN_OFFSET
 
#define RGB_CRMAX   XRGB_CRMAX_OFFSET
 
#define RGB_CRMIN   XRGB_CRMIN_OFFSET
 
#define RGB_YOFFSET   XRGB_YOFFSET_OFFSET
 
#define RGB_CBOFFSET   XRGB_CBOFFSET_OFFSET
 
#define RGB_CROFFSET   XRGB_CROFFSET_OFFSET
 
#define RGB_ACOEF   XRGB_ACOEF_OFFSET
 
#define RGB_BCOEF   XRGB_BCOEF_OFFSET
 
#define RGB_CCOEF   XRGB_CCOEF_OFFSET
 
#define RGB_DCOEF   XRGB_DCOEF_OFFSET
 
#define RGB_CTL_EN_MASK   XRGB_CTL_EN_MASK
 
#define RGB_CTL_RUE_MASK   XRGB_CTL_RUE_MASK
 
#define RGB_RST_RESET   XRGB_CTL_RESET_MASK
 
#define RGB_RST_AUTORESET   XRGB_CTL_AUTORESET_MASK
 
#define RGB_In32   XRgb2YCrCb_In32
 
#define RGB_Out32   XRgb2YCrCb_Out32
 

Interrupt Registers

Interrupt status register generates a interrupt if the corresponding bits of interrupt enable register bits are set.

#define XRGB_ISR_OFFSET   XRGB_STATUS_OFFSET
 Interrupt Status Offset. More...
 
#define XRGB_IER_OFFSET   XRGB_IRQ_EN_OFFSET
 Interrupt Enable Offset. More...
 

Macro Definition Documentation

#define XGMA_VER_REV_SHIFT   12

Revision Shift.

#define XRgb2YCrCb_Disable (   InstancePtr)
Value:
XRgb2YCrCb_WriteReg((InstancePtr)->Config.BaseAddress, \
((XRgb2YCrCb_ReadReg((InstancePtr)->Config.BaseAddress, \
#define XRGB_CONTROL_OFFSET
Control offset.
Definition: xrgb2ycrcb_hw.h:70
#define XRGB_CTL_SW_EN_MASK
Software Enable Mask.
Definition: xrgb2ycrcb_hw.h:115
#define XRgb2YCrCb_WriteReg(BaseAddress, RegOffset, Data)
This function macro writes the given register.
Definition: xrgb2ycrcb_hw.h:375
#define XRgb2YCrCb_ReadReg(BaseAddress, RegOffset)
This function macro reads the given register.
Definition: xrgb2ycrcb_hw.h:355

This macro disables the Rgb2YCrCb device/core.

Parameters
InstancePtris a pointer to the Rgb2YCrCb core instance to be worked on.
Returns
None.
Note
C-style signature: void XRgb2YCrCb_Disable(XRgb2YCrCb *InstancePtr)
#define XRgb2YCrCb_Enable (   InstancePtr)
Value:
XRgb2YCrCb_WriteReg((InstancePtr)->Config.BaseAddress, \
((XRgb2YCrCb_ReadReg((InstancePtr)->Config.BaseAddress, \
#define XRGB_CONTROL_OFFSET
Control offset.
Definition: xrgb2ycrcb_hw.h:70
#define XRGB_CTL_SW_EN_MASK
Software Enable Mask.
Definition: xrgb2ycrcb_hw.h:115
#define XRgb2YCrCb_WriteReg(BaseAddress, RegOffset, Data)
This function macro writes the given register.
Definition: xrgb2ycrcb_hw.h:375
#define XRgb2YCrCb_ReadReg(BaseAddress, RegOffset)
This function macro reads the given register.
Definition: xrgb2ycrcb_hw.h:355

This macro enables the Rgb2YCrCb device/core.

Parameters
InstancePtris a pointer to the Rgb2YCrCb core instance to be worked on.
Returns
None.
Note
C-style signature: void XRgb2YCrCb_Enable(XRgb2YCrCb *InstancePtr)

Referenced by Rgb2YCrCb_Update_Example().

#define XRGB2YCRCB_H_

Prevent circular inclusions by using protection macros.

#define XRGB2YCRCB_HW_H_

Prevent circular inclusions by using protection macros.

#define XRgb2YCrCb_In32   Xil_In32

Input operation.

#define XRgb2YCrCb_IntrClear (   InstancePtr,
  IntrType 
)
Value:
XRgb2YCrCb_WriteReg((InstancePtr)->Config.BaseAddress, \
(XRGB_STATUS_OFFSET), ((IntrType) & \
#define XRgb2YCrCb_WriteReg(BaseAddress, RegOffset, Data)
This function macro writes the given register.
Definition: xrgb2ycrcb_hw.h:375
#define XRGB_IXR_ALLINTR_MASK
Interrupt All Error Mask (ORing (of All Interrupt Mask)
Definition: xrgb2ycrcb_hw.h:163
#define XRGB_STATUS_OFFSET
Status offset.
Definition: xrgb2ycrcb_hw.h:71

This function macro clears/acknowledges pending interrupts of the RGB2YCRCB core in the Status register.

Bit positions of 1 will be cleared.

Parameters
InstancePtris a pointer to the Rgb2YCrCb core instance to be worked on.
IntrTypeis the pending interrupts to clear/acknowledge. Use OR'ing of XRGB_IXR_*_MASK constants defined in xrgb2ycrcb_hw.h to create this parameter value.
Returns
None.
Note
C-style signature: void XRgb2YCrCb_IntrClear(XRgb2YCrCb *InstancePtr, u32 IntrType)

Referenced by XRgb2YCrCb_IntrHandler().

#define XRgb2YCrCb_IntrDisable (   InstancePtr,
  IntrType 
)
Value:
XRgb2YCrCb_WriteReg((InstancePtr)->Config.BaseAddress, \
((XRgb2YCrCb_ReadReg((InstancePtr)->Config.BaseAddress, \
(XRGB_IRQ_EN_OFFSET))) & ((~(IntrType)) & \
#define XRgb2YCrCb_WriteReg(BaseAddress, RegOffset, Data)
This function macro writes the given register.
Definition: xrgb2ycrcb_hw.h:375
#define XRGB_IRQ_EN_OFFSET
IRQ Enable offset.
Definition: xrgb2ycrcb_hw.h:73
#define XRGB_IXR_ALLINTR_MASK
Interrupt All Error Mask (ORing (of All Interrupt Mask)
Definition: xrgb2ycrcb_hw.h:163
#define XRgb2YCrCb_ReadReg(BaseAddress, RegOffset)
This function macro reads the given register.
Definition: xrgb2ycrcb_hw.h:355

This function macro disables individual interrupts of the RGB2YCRCB core by updating the IRQ_ENABLE register.

Parameters
InstancePtris a pointer to the Rgb2YCrCb core instance to be worked on.
IntrTypeis the bit-mask of the interrupts to be disabled. Bit positions of 1 will be disabled. Bit positions of 0 will keep the previous setting. This mask is formed by OR'ing XRGB_IXR_*_MASK bits defined in xrgb2ycrcb_hw.h.
Returns
None.
Note
C-style signature: void XRgb2YCrCb_IntrDisable(XRgb2YCrCb *InstancePtr, u32 IntrType)

Any other interrupt not covered by parameter IntrType, if enabled before this macro is called, will remain enabled.

#define XRgb2YCrCb_IntrEnable (   InstancePtr,
  IntrType 
)
Value:
XRgb2YCrCb_WriteReg((InstancePtr)->Config.BaseAddress, \
(XRGB_IRQ_EN_OFFSET), (((IntrType) & \
(XRgb2YCrCb_ReadReg((InstancePtr)->Config.BaseAddress, \
#define XRgb2YCrCb_WriteReg(BaseAddress, RegOffset, Data)
This function macro writes the given register.
Definition: xrgb2ycrcb_hw.h:375
#define XRGB_IRQ_EN_OFFSET
IRQ Enable offset.
Definition: xrgb2ycrcb_hw.h:73
#define XRGB_IXR_ALLINTR_MASK
Interrupt All Error Mask (ORing (of All Interrupt Mask)
Definition: xrgb2ycrcb_hw.h:163
#define XRgb2YCrCb_ReadReg(BaseAddress, RegOffset)
This function macro reads the given register.
Definition: xrgb2ycrcb_hw.h:355

This function macro enables individual interrupts of the RGB2YCRCB core by updating the IRQ_ENABLE register.

Parameters
InstancePtris a pointer to the Rgb2YCrCb core instance to be worked on.
IntrTypeis the bit-mask of the interrupts to be enabled. Bit positions of 1 will be enabled. Bit positions of 0 will keep the previous setting. This mask is formed by OR'ing XRGB_IXR_*_MASK bits defined in xrgb2ycrcb_hw.h.
Returns
None.
Note
C-style signature: void XRgb2YCrCb_IntrEnable(XRgb2YCrCb *InstancePtr, u32 IntrType)

The existing enabled interrupt(s) will remain enabled.

#define XRgb2YCrCb_IntrGetPending (   InstancePtr)
Value:
XRgb2YCrCb_ReadReg((InstancePtr)->Config.BaseAddress, \
((XRgb2YCrCb_ReadReg((InstancePtr)->Config.BaseAddress, \
#define XRGB_IRQ_EN_OFFSET
IRQ Enable offset.
Definition: xrgb2ycrcb_hw.h:73
#define XRGB_IXR_ALLINTR_MASK
Interrupt All Error Mask (ORing (of All Interrupt Mask)
Definition: xrgb2ycrcb_hw.h:163
#define XRGB_STATUS_OFFSET
Status offset.
Definition: xrgb2ycrcb_hw.h:71
#define XRgb2YCrCb_ReadReg(BaseAddress, RegOffset)
This function macro reads the given register.
Definition: xrgb2ycrcb_hw.h:355

This function macro returns the pending interrupts of the RGB2YCRCB core for the interrupts that have been enabled.

Parameters
InstancePtris a pointer to the Rgb2YCrCb core instance to be worked on.
Returns
The pending interrupts of the Rgb2YCrCb core. Use XRGB_IXR_*_MASK constants defined in xrgb2ycrcb_hw.h to interpret this value. The returned value is a logical AND of the contents of the STATUS Register and the IRQ_ENABLE Register.
Note
C-style signature: u32 XRgb2YCrCb_IntrGetPending(XRgb2YCrCb *InstancePtr)

Referenced by XRgb2YCrCb_IntrHandler().

#define XRgb2YCrCb_Out32   Xil_Out32

Output operation.

#define XRgb2YCrCb_ReadReg (   BaseAddress,
  RegOffset 
)    XRgb2YCrCb_In32((BaseAddress) + (u32)(RegOffset))
#define XRgb2YCrCb_RegUpdateDisable (   InstancePtr)
Value:
XRgb2YCrCb_WriteReg((InstancePtr)->Config.BaseAddress, \
((XRgb2YCrCb_ReadReg((InstancePtr)->Config.BaseAddress, \
#define XRGB_CTL_RUE_MASK
Register Update Enable Mask.
Definition: xrgb2ycrcb_hw.h:116
#define XRGB_CONTROL_OFFSET
Control offset.
Definition: xrgb2ycrcb_hw.h:70
#define XRgb2YCrCb_WriteReg(BaseAddress, RegOffset, Data)
This function macro writes the given register.
Definition: xrgb2ycrcb_hw.h:375
#define XRgb2YCrCb_ReadReg(BaseAddress, RegOffset)
This function macro reads the given register.
Definition: xrgb2ycrcb_hw.h:355

This macro disables copying from updated processor register values to the active set at the end of each AXI-Stream frame.

Parameters
InstancePtris a pointer to the Rgb2YCrCb core instance to be worked on.
Returns
None.
Note
C-style signature: void XRgb2YCrCb_RegUpdateDisable(XRgb2YCrCb *InstancePtr)

Referenced by Rgb2YCrCb_Update_Example(), and XRgb2YCrCb_Setup().

#define XRgb2YCrCb_RegUpdateEnable (   InstancePtr)
Value:
XRgb2YCrCb_WriteReg((InstancePtr)->Config.BaseAddress, \
((XRgb2YCrCb_ReadReg((InstancePtr)->Config.BaseAddress, \
#define XRGB_CTL_RUE_MASK
Register Update Enable Mask.
Definition: xrgb2ycrcb_hw.h:116
#define XRGB_CONTROL_OFFSET
Control offset.
Definition: xrgb2ycrcb_hw.h:70
#define XRgb2YCrCb_WriteReg(BaseAddress, RegOffset, Data)
This function macro writes the given register.
Definition: xrgb2ycrcb_hw.h:375
#define XRgb2YCrCb_ReadReg(BaseAddress, RegOffset)
This function macro reads the given register.
Definition: xrgb2ycrcb_hw.h:355

This macro enables copying from updated processor register values to the active set at the end of each AXI-Stream frame.

Parameters
InstancePtris a pointer to the Rgb2YCrCb core instance to be worked on.
Returns
None.
Note
C-style signature: void XRgb2YCrCb_RegUpdateEnable(XRgb2YCrCb *InstancePtr)

Referenced by Rgb2YCrCb_Update_Example(), and XRgb2YCrCb_Setup().

#define XRgb2YCrCb_Reset (   InstancePtr)
Value:
XRgb2YCrCb_WriteReg((InstancePtr)->Config.BaseAddress, \
#define XRGB_CONTROL_OFFSET
Control offset.
Definition: xrgb2ycrcb_hw.h:70
#define XRGB_CTL_RESET_MASK
Software Reset - Instantaneous Mask.
Definition: xrgb2ycrcb_hw.h:126
#define XRgb2YCrCb_WriteReg(BaseAddress, RegOffset, Data)
This function macro writes the given register.
Definition: xrgb2ycrcb_hw.h:375

This macro resets the Rgb2YCrCb core.

This reset effects the core immediately, and may cause image tearing.

Parameters
InstancePtris a pointer to the Rgb2YCrCb core instance to be worked on.
Returns
None.
Note
C-style signature: void XRgb2YCrCb_Reset(XRgb2YCrCb *InstancePtr)

Referenced by XRgb2YCrCb_CfgInitialize().

#define XRgb2YCrCb_Start   XRgb2YCrCb_Enable

This function macro enables/starts the Rgb2YCrCb core.

Parameters
InstancePtris a pointer to the Rgb2YCrCb instance to be worked on
Returns
None.
Note
C-style signature: void XRgb2YCrCb_Start(XRgb2YCrCb *InstancePtr)
#define XRgb2YCrCb_StatusGetPending (   InstancePtr)
Value:
XRgb2YCrCb_ReadReg((InstancePtr)->Config.BaseAddress, \
#define XRGB_IXR_ALLINTR_MASK
Interrupt All Error Mask (ORing (of All Interrupt Mask)
Definition: xrgb2ycrcb_hw.h:163
#define XRGB_STATUS_OFFSET
Status offset.
Definition: xrgb2ycrcb_hw.h:71
#define XRgb2YCrCb_ReadReg(BaseAddress, RegOffset)
This function macro reads the given register.
Definition: xrgb2ycrcb_hw.h:355

This function macro returns the pending interrupt status of the RGB2YCRCB core read from the Status register.

Parameters
InstancePtris a pointer to the Rgb2YCrCb core instance to be worked on.
Returns
The status of pending interrupts of the Rgb2YCrCb core. Use XRGB_IXR_*_MASK constants defined in xrgb2ycrcb_hw.h to interpret this value.
Note
C-style signature: u32 XRgb2YCrCb_StatusGePending(XRgb2YCrCb *InstancePtr)
#define XRgb2YCrCb_Stop   XRgb2YCrCb_Disable

This function macro disables/stops the Rgb2YCrCb core.

Parameters
InstancePtris a pointer to the Rgb2YCrCb instance to be worked on
Returns
None.
Note
C-style signature: void XRgb2YCrCb_Stop(XRgb2YCrCb *InstancePtr)
#define XRgb2YCrCb_SyncReset (   InstancePtr)
Value:
XRgb2YCrCb_WriteReg((InstancePtr)->Config.BaseAddress, \
#define XRGB_CTL_AUTORESET_MASK
Software Reset - Auto-synchronize to SOF Mask.
Definition: xrgb2ycrcb_hw.h:121
#define XRGB_CONTROL_OFFSET
Control offset.
Definition: xrgb2ycrcb_hw.h:70
#define XRgb2YCrCb_WriteReg(BaseAddress, RegOffset, Data)
This function macro writes the given register.
Definition: xrgb2ycrcb_hw.h:375

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.

On the next rising-edge of VBlank_in following a call to XRgb2YCrCb_SyncReset(), all of the core's configuration registers and outputs will be reset, then the reset flag will be immediately released, allowing the core to immediately resume default operation.

Parameters
InstancePtris a pointer to the Rgb2YCrCb core instance to be worked on.
Returns
None.
Note
C-style signature: void XRgb2YCrCb_SyncReset(XRgb2YCrCb *InstancePtr)
#define XRgb2YCrCb_WriteReg (   BaseAddress,
  RegOffset,
  Data 
)    XRgb2YCrCb_Out32((BaseAddress) + (u32)(RegOffset),(u32)(Data))

This function macro writes the given register.

Parameters
BaseAddressis the Xilinx base address of the RGB2YCRCB core.
RegOffsetis the register offset of the register (defined at top of this file).
Datais the 32-bit value to write to the register.
Returns
None.
Note
C-style signature: void XRgb2YCrCb_WriteReg(u32 BaseAddress, u32 RegOffset, u32 Data)

Referenced by XRgb2YCrCb_DisableDbgBypass(), XRgb2YCrCb_DisableDbgTestPattern(), XRgb2YCrCb_EnableDbgByPass(), XRgb2YCrCb_EnableDbgTestPattern(), XRgb2YCrCb_SetActiveSize(), XRgb2YCrCb_SetCbMax(), XRgb2YCrCb_SetCbMin(), XRgb2YCrCb_SetCbOffset(), XRgb2YCrCb_SetCoefs(), XRgb2YCrCb_SetCrMax(), XRgb2YCrCb_SetCrMin(), XRgb2YCrCb_SetCrOffset(), XRgb2YCrCb_Setup(), XRgb2YCrCb_SetYMax(), XRgb2YCrCb_SetYMin(), and XRgb2YCrCb_SetYOffset().

#define XRGB_16_BIT_COEF_SHIFT   16

16-Bit Coefficient shift

Referenced by XRgb2YCrCb_GetCoefs(), and XRgb2YCrCb_SetCoefs().

#define XRGB_8_BIT_MASK   0x000000FF

8-Bit mask

#define XRGB_ACOEF_OFFSET   0x124

A Coefficient offset.

Referenced by XRgb2YCrCb_GetCoefs(), and XRgb2YCrCb_SetCoefs().

#define XRGB_ACTIVE_SIZE_OFFSET   0x020

Active Size (V x H) offset.

Referenced by XRgb2YCrCb_GetActiveSize(), XRgb2YCrCb_SetActiveSize(), and XRgb2YCrCb_Setup().

#define XRGB_ACTSIZE_NUM_LINE_MASK   0x1FFF0000

The number of lines in source image.

Referenced by XRgb2YCrCb_GetActiveSize(), and XRgb2YCrCb_Setup().

#define XRGB_ACTSIZE_NUM_LINE_SHIFT   16

Shift for number of lines.

Referenced by XRgb2YCrCb_GetActiveSize(), XRgb2YCrCb_SetActiveSize(), and XRgb2YCrCb_Setup().

#define XRGB_ACTSIZE_NUM_PIXEL_MASK   0x00001FFF

The number of pixels in source image.

Referenced by XRgb2YCrCb_GetActiveSize(), and XRgb2YCrCb_Setup().

#define XRGB_BCOEF_OFFSET   0x128

B Coefficient offset.

Referenced by XRgb2YCrCb_GetCoefs(), and XRgb2YCrCb_SetCoefs().

#define XRGB_CBMAX_FIRST   0

Cbmax starting value.

#define XRGB_CBMAX_LAST   255

Cbmax ending value.

Referenced by XRgb2YCrCb_SetCbMax().

#define XRGB_CBMAX_MASK   0x0000FFFF

Chroma Cb clipping value Mask.

#define XRGB_CBMAX_OFFSET   0x108

Cb Clipping offset.

Referenced by XRgb2YCrCb_GetCbMax(), and XRgb2YCrCb_SetCbMax().

#define XRGB_CBMIN_FIRST   0

Cbmin starting value.

#define XRGB_CBMIN_LAST   255

Cbmin ending value.

Referenced by XRgb2YCrCb_SetCbMin().

#define XRGB_CBMIN_MASK   0x0000FFFF

Chroma Cb clamping value mask.

#define XRGB_CBMIN_OFFSET   0x10C

Cb Clamping offset.

Referenced by XRgb2YCrCb_GetCbMin(), and XRgb2YCrCb_SetCbMin().

#define XRGB_CBOFFSET_FIRST   0

Cboffset starting value.

#define XRGB_CBOFFSET_LAST   255

Cboffset ending value.

Referenced by XRgb2YCrCb_SetCbOffset().

#define XRGB_CBOFFSET_MASK   0x0001FFFF

Chroma(Cb) offset compensation value Mask.

#define XRGB_CBOFFSET_OFFSET   0x11C

Cb Offset offset.

Referenced by XRgb2YCrCb_GetCbOffset(), and XRgb2YCrCb_SetCbOffset().

#define XRGB_CCOEF_OFFSET   0x12C

C Coefficient offset.

Referenced by XRgb2YCrCb_GetCoefs(), and XRgb2YCrCb_SetCoefs().

#define XRGB_COEFF_MASK   0x0001FFFF

Matrix Conversion Coefficient value mask.

#define XRGB_CRMAX_FIRST   0

Crmax starting value.

#define XRGB_CRMAX_LAST   255

Crmax ending value.

Referenced by XRgb2YCrCb_SetCrMax().

#define XRGB_CRMAX_MASK   0x0000FFFF

Chroma Cr clipping value Mask.

#define XRGB_CRMAX_OFFSET   0x110

Cr Clipping offset.

Referenced by XRgb2YCrCb_GetCrMax(), and XRgb2YCrCb_SetCrMax().

#define XRGB_CRMIN_FIRST   0

Crmin starting value.

#define XRGB_CRMIN_LAST   255

Crmin ending value.

Referenced by XRgb2YCrCb_SetCrMin().

#define XRGB_CRMIN_MASK   0x0000FFFF

Chroma Cr clamping value Mask.

#define XRGB_CRMIN_OFFSET   0x114

Cr Clamping offset.

Referenced by XRgb2YCrCb_GetCrMin(), and XRgb2YCrCb_SetCrMin().

#define XRGB_CROFFSET_FIRST   0

Croffset starting value.

#define XRGB_CROFFSET_LAST   255

Croffset ending value.

Referenced by XRgb2YCrCb_SetCrOffset().

#define XRGB_CROFFSET_MASK   0x0001FFFF

Chroma(Cr) offset compensation value Mask.

#define XRGB_CROFFSET_OFFSET   0x120

Cr Offset offset.

Referenced by XRgb2YCrCb_GetCrOffset(), and XRgb2YCrCb_SetCrOffset().

#define XRGB_CTL_AUTORESET_MASK   0x40000000

Software Reset - Auto-synchronize to SOF Mask.

#define XRGB_CTL_BPE_MASK   0x00000010
#define XRGB_CTL_RESET_MASK   0x80000000

Software Reset - Instantaneous Mask.

#define XRGB_CTL_RUE_MASK   0x00000002

Register Update Enable Mask.

#define XRGB_CTL_SW_EN_MASK   0x00000001

Software Enable Mask.

#define XRGB_CTL_TPE_MASK   0x00000020
#define XRGB_DATA_WIDTH_10   10
#define XRGB_DATA_WIDTH_12   12
#define XRGB_DATA_WIDTH_16   16
#define XRGB_DATA_WIDTH_8   8
#define XRGB_DCOEF_OFFSET   0x130

D Coefficient offset.

Referenced by XRgb2YCrCb_GetCoefs(), and XRgb2YCrCb_SetCoefs().

#define XRGB_ERR_EOL_EARLY_MASK   0x000000001

Error: End of line Early Mask.

#define XRGB_ERR_EOL_LATE_MASK   0x000000002

Error: End of line Late Mask.

#define XRGB_ERR_SOF_EARLY_MASK   0x000000004

Error: Start of frame Early Mask.

#define XRGB_ERR_SOF_LATE_MASK   0x000000008

Error: Start of frame Late Mask.

#define XRGB_ERROR_OFFSET   0x008

Error offset.

#define XRGB_HSIZE_FIRST   32

HSize starting value.

Referenced by XRgb2YCrCb_SetActiveSize().

#define XRGB_HSIZE_LAST   7680

HSize ending value.

Referenced by XRgb2YCrCb_SetActiveSize().

#define XRGB_IER_OFFSET   XRGB_IRQ_EN_OFFSET

Interrupt Enable Offset.

#define XRGB_IRQ_EN_OFFSET   0x00C

IRQ Enable offset.

#define XRGB_ISR_OFFSET   XRGB_STATUS_OFFSET

Interrupt Status Offset.

#define XRGB_IXR_ALLINTR_MASK   0x00010003

Interrupt All Error Mask (ORing (of All Interrupt Mask)

#define XRGB_IXR_EOF_MASK   0x00000002

End-Of-Frame Mask.

Referenced by XRgb2YCrCb_IntrHandler().

#define XRGB_IXR_PROC_STARTED_MASK   0x00000001

Process Started Mask.

Referenced by XRgb2YCrCb_IntrHandler().

#define XRGB_IXR_SE_MASK   0x00010000

Slave Error Mask.

Referenced by XRgb2YCrCb_IntrHandler().

#define XRGB_STATUS_OFFSET   0x004

Status offset.

#define XRGB_SYSDEBUG0_OFFSET   0x014

System Debug 0 offset.

Referenced by XRgb2YCrCb_GetDbgFrameCount().

#define XRGB_SYSDEBUG1_OFFSET   0x018

System Debug 1 offset.

Referenced by XRgb2YCrCb_GetDbgLineCount().

#define XRGB_SYSDEBUG2_OFFSET   0x01C

System Debug 2 offset.

Referenced by XRgb2YCrCb_GetDbgPixelCount().

#define XRGB_VER_INTERNAL_SHIFT   8

Internal Shift.

#define XRGB_VER_MAJOR_MASK   0xFF000000

Major Mask.

#define XRGB_VER_MAJOR_SHIFT   24

Major Shift.

#define XRGB_VER_MINOR_MASK   0x00FF0000

Minor Mask.

#define XRGB_VER_MINOR_SHIFT   16

Minor Shift.

#define XRGB_VER_PID_MASK   0x00000F00

Patch ID Mask.

#define XRGB_VER_REV_MASK   0x0000F000

Revision Mask.

#define XRGB_VER_REV_NUM_MASK   0x000000FF

Revision Number Mask.

#define XRGB_VERSION_OFFSET   0x010

Version offset.

Referenced by XRgb2YCrCb_GetVersion(), and XRgb2YCrCb_SelfTest().

#define XRGB_VSIZE_FIRST   32

VSize starting value.

Referenced by XRgb2YCrCb_SetActiveSize().

#define XRGB_VSIZE_LAST   7680

VSize ending value.

Referenced by XRgb2YCrCb_SetActiveSize().

#define XRGB_YMAX_FIRST   0

Ymax starting value.

#define XRGB_YMAX_LAST   255

Ymax ending value.

Referenced by XRgb2YCrCb_SetYMax().

#define XRGB_YMAX_MASK   0x0000FFFF

Luma clipping value Mask.

#define XRGB_YMAX_OFFSET   0x100

Luma Clipping offset.

Referenced by XRgb2YCrCb_GetYMax(), and XRgb2YCrCb_SetYMax().

#define XRGB_YMIN_FIRST   0

Ymin starting value.

#define XRGB_YMIN_LAST   255

Ymax ending value.

Referenced by XRgb2YCrCb_SetYMin().

#define XRGB_YMIN_MASK   0x0000FFFF

Luma clamping value Mask.

#define XRGB_YMIN_OFFSET   0x104

Luma Clamping offset.

Referenced by XRgb2YCrCb_GetYMin(), and XRgb2YCrCb_SetYMin().

#define XRGB_YOFFSET_FIRST   0

Yoffset starting value.

#define XRGB_YOFFSET_LAST   255

Yoffset ending value.

Referenced by XRgb2YCrCb_SetYOffset().

#define XRGB_YOFFSET_MASK   0x0001FFFF

Luma offset compensation value Mask.

#define XRGB_YOFFSET_OFFSET   0x118

Luma Offset offset.

Referenced by XRgb2YCrCb_GetYOffset(), and XRgb2YCrCb_SetYOffset().

Typedef Documentation

typedef void(* XRgb2YCrCb_CallBack)(void *CallBackRef)

Callback type for all interrupts except error interrupt.

Parameters
CallBackRefis a callback reference passed in by the upper layer when setting the callback functions, and passed back to the upper layer when the callback is invoked.
Returns
None.
Note
None.
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.

Parameters
CallBackRefis a callback reference passed in by the upper layer when setting the callback functions, and passed back to the upper layer when the callback is invoked.
ErrorMaskis a bit mask indicating the cause of the error. Its value equals 'OR'ing one or more XRGB_IXR_*_MASK values defined in xrgb2ycrcb_hw.h.
Returns
None.
Note
None.

Enumeration Type Documentation

anonymous enum

These constants specify different types of handler and used to differentiate interrupt requests from core.

Enumerator
XRGB_HANDLER_PROCSTART 

A processing start event interrupt type.

XRGB_HANDLER_FRAMEDONE 

A frame done event interrupt type.

XRGB_HANDLER_ERROR 

An error condition interrupt type.

These constants specify different ranges used for studio equipment, television and computer graphics respectively.

Enumerator
XRGB_TV_16_TO_240 

16 to 240, for Television.

XRGB_STUDIO_16_TO_235 

16 to 235, for Studio Equipment.

XRGB_GRAPHICS_0_TO_255 

0 to 255, for Computer Graphics.

These constants specify different types of standards used to represent standard color encoding.

Enumerator
XRGB_STANDARD_ITU_601_SD 

Standard ITU 601 SD.

XRGB_STANDARD_ITU_709_NTSC 

Standard ITU 709 NTSC.

XRGB_STANDARD_ITU_709_PAL 

Standard ITU 709 PAL.

XRGB_STANDARD_YUV 

Standard YUV.

XRGB_STANDARD_CUSTOM 

Standard Custom.

Function Documentation

int XRgb2YCrCb_CfgInitialize ( XRgb2YCrCb InstancePtr,
XRgb2YCrCb_Config CfgPtr,
u32  EffectiveAddr 
)

This function initializes the Rgb2YCrCb core.

This function must be called prior to using the Rgb2YCrCb core. Initialization of the Rgb2YCrCb includes setting up the instance data and ensuring the hardware is in a quiescent state.

Parameters
InstancePtris a pointer to the XRgb2YCrCb instance.
CfgPtris a reference to a structure containing information about a specific XRgb2YCrCb driver.
EffectiveAddris the core base address in the virtual memory address space. The caller is responsible for keeping the address mapping from EffectiveAddr to the core 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.
Returns
- XST_SUCCESS if initialization was successful.
Note
None.

References XRgb2YCrCb_Config::BaseAddress, XRgb2YCrCb::Config, XRgb2YCrCb::ErrCallBack, XRgb2YCrCb::FrameDoneCallBack, XRgb2YCrCb::IsReady, XRgb2YCrCb::ProcStartCallBack, and XRgb2YCrCb_Reset.

Referenced by Rgb2YCrCb_Update_Example(), and XRgb2YCrCbSelfTestExample().

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.

The XRgb2YCrCb_Coef_Inputs structure uses the same values as the core's GUIs. The XRgb2YCrCb_Coef_Outputs structure uses the values that can be programmed into the core's registers.

Parameters
InstancePtris a pointer to the XRgb2YCrCb instance.
CoefInspecifies a pointer to a XRgb2YCrCb_Coef_Inputs structure to be translated.
CoefOutspecifies a pointer to a XRgb2YCrCb_Coef_Outputs structure with translated values.
DataWidthspecifies a valid range of [8,10,12,16] that needs to be set.
Returns
RetVal, returns the 32-bit value with following bit information:
  • bit(0)= ACoef + BCoef > 1.0.
  • bit(1)= Y Offset outside data width range as [-2^Data_Width, (2^Data_Width)-1].
  • bit(2)= Cb Offset outside data width range as [-2^Data_Width, (2^Data_Width)-1].
  • bit(3)= Cr Offset outside data width range as [-2^Data_Width, (2^Data_Width)-1].
  • bit(4)= Y Max outside data width range as [0, (2^Data_Width)-1].
  • bit(5)= Y Min outside data width range as [0, (2^Data_Width)-1].
  • bit(6)= Cb Max outside data width range as [0, (2^Data_Width)-1].
  • bit(7)= Cb Min outside data width range as [0, (2^Data_Width)-1].
  • bit(8)= Cr Max outside data width range as [0, (2^Data_Width)-1].
  • bit(9)= Cr Min outside data width range as [0, (2^Data_Width)-1].
Note
None.

References XRgb2YCrCb_Coef_Inputs::ACoef, XRgb2YCrCb_Coef_Outputs::ACoef, XRgb2YCrCb_Coef_Inputs::BCoef, XRgb2YCrCb_Coef_Outputs::BCoef, XRgb2YCrCb_Coef_Inputs::CbMax, XRgb2YCrCb_Coef_Outputs::CbMax, XRgb2YCrCb_Coef_Inputs::CbMin, XRgb2YCrCb_Coef_Outputs::CbMin, XRgb2YCrCb_Coef_Inputs::CbOffset, XRgb2YCrCb_Coef_Outputs::CbOffset, XRgb2YCrCb_Coef_Inputs::CCoef, XRgb2YCrCb_Coef_Outputs::CCoef, XRgb2YCrCb_Coef_Inputs::CrMax, XRgb2YCrCb_Coef_Outputs::CrMax, XRgb2YCrCb_Coef_Inputs::CrMin, XRgb2YCrCb_Coef_Outputs::CrMin, XRgb2YCrCb_Coef_Inputs::CrOffset, XRgb2YCrCb_Coef_Outputs::CrOffset, XRgb2YCrCb_Coef_Inputs::DCoef, XRgb2YCrCb_Coef_Outputs::DCoef, XRGB_DATA_WIDTH_10, XRGB_DATA_WIDTH_12, XRGB_DATA_WIDTH_16, XRGB_DATA_WIDTH_8, XRgb2YCrCb_Coef_Inputs::YMax, XRgb2YCrCb_Coef_Outputs::YMax, XRgb2YCrCb_Coef_Inputs::YMin, XRgb2YCrCb_Coef_Outputs::YMin, XRgb2YCrCb_Coef_Inputs::YOffset, and XRgb2YCrCb_Coef_Outputs::YOffset.

Referenced by Rgb2YCrCb_Update_Example().

void XRgb2YCrCb_DisableDbgBypass ( XRgb2YCrCb InstancePtr)

This function disables Bypass mode.

Parameters
InstancePtris a pointer to the XRgb2YCrCb core instance to be worked on.
Returns
None.
Note
Debug functionality should be enabled.

References XRgb2YCrCb_Config::BaseAddress, XRgb2YCrCb::Config, XRgb2YCrCb_ReadReg, XRgb2YCrCb_WriteReg, XRGB_CONTROL_OFFSET, and XRGB_CTL_BPE_MASK.

void XRgb2YCrCb_DisableDbgTestPattern ( XRgb2YCrCb InstancePtr)

This function disables debug test pattern mode.

Parameters
InstancePtris a pointer to the XRgb2YCrCb core instance to be worked on.
Returns
None.
Note
Debug functionality should be enabled.

References XRgb2YCrCb_Config::BaseAddress, XRgb2YCrCb::Config, XRgb2YCrCb_Config::HasDebug, XRgb2YCrCb_ReadReg, XRgb2YCrCb_WriteReg, XRGB_CONTROL_OFFSET, and XRGB_CTL_TPE_MASK.

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.

Parameters
InstancePtris a pointer to the XRgb2YCrCb instance.
Returns
None.
Note
Debug functionality should be enabled.

References XRgb2YCrCb_Config::BaseAddress, XRgb2YCrCb::Config, XRgb2YCrCb_Config::HasDebug, XRgb2YCrCb_ReadReg, XRgb2YCrCb_WriteReg, XRGB_CONTROL_OFFSET, and XRGB_CTL_BPE_MASK.

void XRgb2YCrCb_EnableDbgTestPattern ( XRgb2YCrCb InstancePtr)

This function switches the core to test-pattern generator mode if debug feature is enabled.

Parameters
InstancePtris a pointer to the XRgb2YCrCb instance.
Returns
None.
Note
Debug functionality should be enabled.

References XRgb2YCrCb_Config::BaseAddress, XRgb2YCrCb::Config, XRgb2YCrCb_Config::HasDebug, XRgb2YCrCb_ReadReg, XRgb2YCrCb_WriteReg, XRGB_CONTROL_OFFSET, and XRGB_CTL_TPE_MASK.

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.

Parameters
InstancePtris a pointer to the XRgb2YCrCb instance.
HSizeis a pointer to 16-bit variable in which the number of Active Pixels per scanline is returned within the range [32, 7680].
VSizeis a pointer to 16-bit variable in which the number of Active Lines per frame is returned within the range [32, 7680].
Returns
None.
Note
None.

References XRgb2YCrCb_Config::BaseAddress, XRgb2YCrCb::Config, XRgb2YCrCb_ReadReg, XRGB_ACTIVE_SIZE_OFFSET, XRGB_ACTSIZE_NUM_LINE_MASK, XRGB_ACTSIZE_NUM_LINE_SHIFT, and XRGB_ACTSIZE_NUM_PIXEL_MASK.

u32 XRgb2YCrCb_GetCbMax ( XRgb2YCrCb InstancePtr)

This function returns the maximum value on the Cb Chroma channel of the output.

Parameters
InstancePtris a pointer to the XRgb2YCrCb instance.
Returns
CbMax, maximum value within range [0, 255] of the Cb Chroma Channel.
Note
None.

References XRgb2YCrCb_Config::BaseAddress, XRgb2YCrCb_Coef_Outputs::CbMax, XRgb2YCrCb::Config, XRgb2YCrCb_ReadReg, XRGB_16_BIT_MASK, and XRGB_CBMAX_OFFSET.

u32 XRgb2YCrCb_GetCbMin ( XRgb2YCrCb InstancePtr)

This function returns the minimum value on the Cb Chroma channel of the output.

Parameters
InstancePtris a pointer to the XRgb2YCrCb instance.
Returns
CbMin, minimum value within range [0, 255] on the Cb Chroma Channel.
Note
None.

References XRgb2YCrCb_Config::BaseAddress, XRgb2YCrCb_Coef_Outputs::CbMin, XRgb2YCrCb::Config, XRgb2YCrCb_ReadReg, XRGB_16_BIT_MASK, and XRGB_CBMIN_OFFSET.

u32 XRgb2YCrCb_GetCbOffset ( XRgb2YCrCb InstancePtr)

This function returns the offset compensation value for the Cb Chroma channel.

Parameters
InstancePtris a pointer to the XRgb2YCrCb instance.
Returns
CbOffset is the compensation value within range [0, 255] for the Cb Chroma channel.
Note
None.

References XRgb2YCrCb_Config::BaseAddress, XRgb2YCrCb_Coef_Outputs::CbOffset, XRgb2YCrCb::Config, XRgb2YCrCb_ReadReg, XRGB_16_BIT_MASK, and XRGB_CBOFFSET_OFFSET.

void XRgb2YCrCb_GetCoefs ( XRgb2YCrCb InstancePtr,
double *  ACoef,
double *  BCoef,
double *  CCoef,
double *  DCoef 
)

This function returns A, B, C and D coefficients.

Parameters
InstancePtris a pointer to the XRgb2YCrCb instance.
ACoefis a pointer to double variable in which A coefficient is returned within the range [0.0 to 1.0].
BCoefis a pointer to double variable in which B coefficient is returned within the range [0.0 to 1.0].
CCoefis a pointer to double variable in which C coefficient is returned within the range [0.0 to 1.0].
DCoefis a pointer to double variable in which D coefficient is returned within the range [0.0 to 1.0].
Returns
None.
Note
None.

References XRgb2YCrCb_Config::BaseAddress, XRgb2YCrCb::Config, XRgb2YCrCb_ReadReg, XRGB_16_BIT_COEF_SHIFT, XRGB_ACOEF_OFFSET, XRGB_BCOEF_OFFSET, XRGB_CCOEF_OFFSET, and XRGB_DCOEF_OFFSET.

u32 XRgb2YCrCb_GetCrMax ( XRgb2YCrCb InstancePtr)

This function returns the maximum value on the Cr Chroma channel of the output.

Parameters
InstancePtris a pointer to the XRgb2YCrCb instance.
Returns
CrMax, maximum value within range [0, 255] on the Cr Chroma Channel.
Note
None.

References XRgb2YCrCb_Config::BaseAddress, XRgb2YCrCb::Config, XRgb2YCrCb_Coef_Outputs::CrMax, XRgb2YCrCb_ReadReg, XRGB_16_BIT_MASK, and XRGB_CRMAX_OFFSET.

u32 XRgb2YCrCb_GetCrMin ( XRgb2YCrCb InstancePtr)

This function returns the minimum value on the Cr Chroma channel of the output.

Parameters
InstancePtris a pointer to the XRgb2YCrCb instance.
Returns
CrMin, minimum value within range [0, 255] on the Cr Chroma Channel.
Note
None.

References XRgb2YCrCb_Config::BaseAddress, XRgb2YCrCb::Config, XRgb2YCrCb_Coef_Outputs::CrMin, XRgb2YCrCb_ReadReg, XRGB_16_BIT_MASK, and XRGB_CRMIN_OFFSET.

u32 XRgb2YCrCb_GetCrOffset ( XRgb2YCrCb InstancePtr)

This function returns the offset compensation value of the Cr Chroma channel.

Parameters
InstancePtris a pointer to the XRgb2YCrCb instance.
Returns
CrOffset is the compensation value within range [0, 255] of the Cr Chroma channel.
Note
None.

References XRgb2YCrCb_Config::BaseAddress, XRgb2YCrCb::Config, XRgb2YCrCb_Coef_Outputs::CrOffset, XRgb2YCrCb_ReadReg, XRGB_16_BIT_MASK, and XRGB_CROFFSET_OFFSET.

u32 XRgb2YCrCb_GetDbgFrameCount ( XRgb2YCrCb InstancePtr)

This function returns the frame count, the number of frames processed since power-up.

This is available only if the debugging feature is enabled.

Parameters
InstancePtris a pointer to the XRgb2YCrCb instance.
Returns
DbgFrameCount, number of frames processed since power-up.
Note
The SYSDEBUG0, or Frame Throughput Monitor register indicates the number of frames processed since power-up or the last time the core was reset. The SYSDEBUG registers can be useful to identify external memory / frame buffer/ throughput bottlenecks in a video system. Debug functionality should be enabled.

References XRgb2YCrCb_Config::BaseAddress, XRgb2YCrCb::Config, XRgb2YCrCb_Config::HasDebug, XRgb2YCrCb_ReadReg, and XRGB_SYSDEBUG0_OFFSET.

u32 XRgb2YCrCb_GetDbgLineCount ( XRgb2YCrCb InstancePtr)

This function returns Line count, the number of lines processed since power-up.

This is available only if the debugging feature is enabled.

Parameters
InstancePtris a pointer to the XRgb2YCrCb instance.
Returns
DbgLineCount, number of lines processed since power-up.
Note
The SYSDEBUG1 or Line Throughput Monitor register indicates the number of lines processed since power-up or the last time the core was reset. The SYSDEBUG registers can be useful to identify external memory / Frame buffer / throughput bottlenecks in a video system. Debug functionality should be enabled.

References XRgb2YCrCb_Config::BaseAddress, XRgb2YCrCb::Config, XRgb2YCrCb_Config::HasDebug, XRgb2YCrCb_ReadReg, and XRGB_SYSDEBUG1_OFFSET.

u32 XRgb2YCrCb_GetDbgPixelCount ( XRgb2YCrCb InstancePtr)

This function returns the pixel count, the number of pixels processed since power up.

This is available only if the debugging feature is enabled.

Parameters
InstancePtris a pointer to the XRgb2YCrCb instance.
Returns
DbgPixelCount, number of pixels processed since power-up.
Note
The SYSDEBUG2, or Pixel Throughput Monitor register indicates the number of pixel processed since power-up or the last time the core was reset. The SYSDEBUG registers can be useful to identify external memory / Frame buffer / throughput bottlenecks in a video system. Debug functionality should be enabled.

References XRgb2YCrCb_Config::BaseAddress, XRgb2YCrCb::Config, XRgb2YCrCb_Config::HasDebug, XRgb2YCrCb_ReadReg, and XRGB_SYSDEBUG2_OFFSET.

u32 XRgb2YCrCb_GetVersion ( XRgb2YCrCb InstancePtr)

This function facilitates software identification of exact version of the RGB2YCrCb hardware (h/w).

Parameters
InstancePtris a pointer to the XRgb2YCrCb instance.
Returns
Version, contents of a Version register.
Note
None.

References XRgb2YCrCb_Config::BaseAddress, XRgb2YCrCb::Config, XRgb2YCrCb_ReadReg, and XRGB_VERSION_OFFSET.

u32 XRgb2YCrCb_GetYMax ( XRgb2YCrCb InstancePtr)

This function returns the maximum value of the Luma (Y) channel of the output.

Parameters
InstancePtris a pointer to the XRgb2YCrCb instance.
Returns
YMax, Maximum value within range [0, 255] of the Luma channel.
Note
None.

References XRgb2YCrCb_Config::BaseAddress, XRgb2YCrCb::Config, XRgb2YCrCb_ReadReg, XRGB_16_BIT_MASK, XRGB_YMAX_OFFSET, and XRgb2YCrCb_Coef_Outputs::YMax.

u32 XRgb2YCrCb_GetYMin ( XRgb2YCrCb InstancePtr)

This function returns the minimum value of the Luma (Y) channel of the output.

Parameters
InstancePtris a pointer to the XRgb2YCrCb instance.
Returns
YMin, minimum value within range [0, 255] of the Luma channel.
Note
None.

References XRgb2YCrCb_Config::BaseAddress, XRgb2YCrCb::Config, XRgb2YCrCb_ReadReg, XRGB_16_BIT_MASK, XRGB_YMIN_OFFSET, and XRgb2YCrCb_Coef_Outputs::YMin.

u32 XRgb2YCrCb_GetYOffset ( XRgb2YCrCb InstancePtr)

This function returns the offset compensation value for the Luma (Y) channel.

Parameters
InstancePtris a pointer to the XRgb2YCrCb instance.
Returns
YOffset is compensation value within range [0, 255] for the Luma (Y) channel.
Note
None.

References XRgb2YCrCb_Config::BaseAddress, XRgb2YCrCb::Config, XRgb2YCrCb_ReadReg, XRGB_16_BIT_MASK, XRGB_YOFFSET_OFFSET, and XRgb2YCrCb_Coef_Outputs::YOffset.

void XRgb2YCrCb_IntrHandler ( void *  InstancePtr)

This function is the interrupt handler for the RGB2YCRCB driver.

This handler reads the pending interrupt from the IER(IRQ_ENABLE register) or ISR (STATUS register), determines the source of the interrupts, calls according callbacks, and finally clears the interrupts.

The application is responsible for connecting this function to the interrupt system. Application beyond this driver is also responsible for providing callbacks to handle interrupts and installing the callbacks using XRgb2YCrCb_SetCallBack() during initialization phase.

Parameters
InstancePtris a pointer to the XRgb2YCrCb instance that just interrupted.
Returns
None.
Note
Interrupt interface (HasIntcIf) should be enabled.

References XRgb2YCrCb::Config, XRgb2YCrCb::ErrCallBack, XRgb2YCrCb::ErrRef, XRgb2YCrCb::FrameDoneCallBack, XRgb2YCrCb::FrameDoneRef, XRgb2YCrCb_Config::HasIntcIf, XRgb2YCrCb::IsReady, XRgb2YCrCb::ProcStartCallBack, XRgb2YCrCb::ProcStartRef, XRgb2YCrCb_IntrClear, XRgb2YCrCb_IntrGetPending, XRGB_IXR_EOF_MASK, XRGB_IXR_PROC_STARTED_MASK, and XRGB_IXR_SE_MASK.

int XRgb2YCrCb_IsDbgByPassEnabled ( XRgb2YCrCb InstancePtr)

This function returns the current bypass mode of a core.

Parameters
InstancePtris a pointer to the XRgb2YCrCb instance.
Returns
  • TRUE if ByPass mode is enabled.
  • FALSE if ByPpass mode is not enabled.
Note
Debug functionality should be enabled.

References XRgb2YCrCb_Config::BaseAddress, XRgb2YCrCb::Config, XRgb2YCrCb_Config::HasDebug, XRgb2YCrCb_ReadReg, XRGB_CONTROL_OFFSET, and XRGB_CTL_BPE_MASK.

int XRgb2YCrCb_IsDbgTestPatternEnabled ( XRgb2YCrCb InstancePtr)

This function returns the test-pattern generator mode (enabled or not), if debug feature is enabled.

Parameters
InstancePtris a pointer to the XRgb2YCrCb instance.
Returns
  • TRUE if Test-pattern mode is enabled.
  • FALSE if Test-pattern mode is not enabled.
Note
Debug functionality should be enabled.

References XRgb2YCrCb_Config::BaseAddress, XRgb2YCrCb::Config, XRgb2YCrCb_ReadReg, XRGB_CONTROL_OFFSET, and XRGB_CTL_TPE_MASK.

XRgb2YCrCb_Config * XRgb2YCrCb_LookupConfig ( u16  DeviceId)

This function returns a reference to an XRgb2YCrCb_Config structure based on the unique core id, DeviceId.

The return value will refer to an entry in the core configuration table defined in the xrgb2ycrcb_g.c file.

Parameters
DeviceIdis the unique core ID of the core for the lookup operation.
Returns
XRgb2YCrCb_LookupConfig returns a reference to a config record in the configuration table (in xrgb2ycrcb_g.c) corresponding to DeviceId, or NULL if no match is found.
Note
None.

Referenced by Rgb2YCrCb_Update_Example(), and XRgb2YCrCbSelfTestExample().

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.

Parameters
InstancePtris a pointer to the XRgb2YCrCb instance.
Rangeneeds to be set from the enum XRgb_OutputRanges values as: 0 = XRGB_TV_16_TO_240, 1 = XRGB_STUDIO_16_TO_235, 2 = XRGB_GRAPHICS_0_TO_255.
Returns
None.
Note
None.

References XRGB_GRAPHICS_0_TO_255, XRGB_STUDIO_16_TO_235, and XRGB_TV_16_TO_240.

Referenced by Rgb2YCrCb_Update_Example().

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.

Parameters
InstancePtris a pointer to the XRgb2YCrCb instance.
StandardSelneeds to be set from enum XRgb_Standards value as : 0 = XRGB_STANDARD_ITU_601_SD 1 = XRGB_STANDARD_ITU_709_NTSC 2 = XRGB_STANDARD_ITU_709_PAL 3 = XRGB_STANDARD_YUV.
InputRangeneeds to be set from enum OutputRanges value as: 0 = XRGB_TV_16_TO_240, 1 = XRGB_STUDIO_16_TO_235, 2 = XRGB_GRAPHICS_0_TO_255.
DataWidthspecifies the valid range of [8,10,12,16] that needs to be set.
CoefInspecifies a pointer to a XRgb2YCrCb_Coef_Inputs structure which is populated with the values from selected video standard.
Returns
None.
Note
None.

References XRgb2YCrCb_Coef_Inputs::ACoef, XRgb2YCrCb_Coef_Outputs::ACoef, XRgb2YCrCb_Coef_Inputs::BCoef, XRgb2YCrCb_Coef_Outputs::BCoef, XRgb2YCrCb_Coef_Inputs::CbMax, XRgb2YCrCb_Coef_Inputs::CbMin, XRgb2YCrCb_Coef_Inputs::CbOffset, XRgb2YCrCb_Coef_Inputs::CCoef, XRgb2YCrCb_Coef_Outputs::CCoef, XRgb2YCrCb_Coef_Inputs::CrMax, XRgb2YCrCb_Coef_Inputs::CrMin, XRgb2YCrCb_Coef_Inputs::CrOffset, XRgb2YCrCb_Coef_Inputs::DCoef, XRgb2YCrCb_Coef_Outputs::DCoef, XRGB_DATA_WIDTH_10, XRGB_DATA_WIDTH_12, XRGB_DATA_WIDTH_16, XRGB_DATA_WIDTH_8, XRGB_GRAPHICS_0_TO_255, XRGB_STANDARD_CUSTOM, XRgb2YCrCb_Coef_Inputs::YMax, XRgb2YCrCb_Coef_Inputs::YMin, XRgb2YCrCb_Coef_Inputs::YOffset, and XRgb2YCrCb_Coef_Outputs::YOffset.

Referenced by Rgb2YCrCb_Update_Example().

int XRgb2YCrCb_SelfTest ( XRgb2YCrCb InstancePtr)

This function reads version register of RGB2YCRCB core and compares with zero as part of self test.

Parameters
InstancePtris a pointer to the XRgb2YCrCb instance.
Returns
  • XST_SUCCESS if the version register read test was successful.
  • XST_FAILURE if the version register read test failed.
Note
None.

References XRgb2YCrCb_Config::BaseAddress, XRgb2YCrCb::Config, XRgb2YCrCb_ReadReg, and XRGB_VERSION_OFFSET.

Referenced by XRgb2YCrCbSelfTestExample().

void XRgb2YCrCb_SetActiveSize ( XRgb2YCrCb InstancePtr,
u16  HSize,
u16  VSize 
)

This function sets active H/V sizes in the active size register.

Parameters
InstancePtris a pointer to the XRgb2YCrCb instance.
HSizespecifies the number of Active Pixels per scanline that needs to be set within the range [32, 7680].
VSizespecifies the number of Active Lines per frame that needs to be set within the range [32, 7680].
Returns
None.
Note
None.

References XRgb2YCrCb_Config::BaseAddress, XRgb2YCrCb::Config, XRgb2YCrCb_WriteReg, XRGB_ACTIVE_SIZE_OFFSET, XRGB_ACTSIZE_NUM_LINE_SHIFT, XRGB_HSIZE_FIRST, XRGB_HSIZE_LAST, XRGB_VSIZE_FIRST, and XRGB_VSIZE_LAST.

Referenced by Rgb2YCrCb_Update_Example().

int XRgb2YCrCb_SetCallBack ( XRgb2YCrCb InstancePtr,
u32  HandlerType,
void *  CallBackFunc,
void *  CallBackRef 
)

This routine installs an asynchronous callback function for the given HandlerType:

 HandlerType              Callback Function Type
 -----------------------  --------------------------------------------------
 XRGB_HANDLER_PROCSTART   ProcStartCallBack
 XRGB_HANDLER_FRAMEDONE   FrameDoneCallBack
 XRGB_HANDLER_ERROR       ErrCallBack
Parameters
InstancePtris a pointer to the XRgb2YCrCb instance to be worked on.
HandlerTypespecifies which callback is to be attached.
CallBackFuncis the address of the callback function.
CallBackRefis a user data item that will be passed to the callback function when it is invoked.
Returns
  • XST_SUCCESS when handler is installed.
  • XST_INVALID_PARAM when HandlerType is invalid.
Note
Invoking this function for a handler that already has been installed replaces it with the new handler.

References XRgb2YCrCb::ErrCallBack, XRgb2YCrCb::ErrRef, XRgb2YCrCb::FrameDoneCallBack, XRgb2YCrCb::FrameDoneRef, XRgb2YCrCb::IsReady, XRgb2YCrCb::ProcStartCallBack, XRgb2YCrCb::ProcStartRef, XRGB_HANDLER_ERROR, XRGB_HANDLER_FRAMEDONE, and XRGB_HANDLER_PROCSTART.

void XRgb2YCrCb_SetCbMax ( XRgb2YCrCb InstancePtr,
u32  CbMax 
)

This function sets the maximum value allowed on the Cb Chroma channel of the output.

Parameters
InstancePtris a pointer to the XRgb2YCrCb instance.
CbMaxspecifies the maximum value within range [0, 255] of Cb Chroma channel that needs to be set.
Returns
None.
Note
None.

References XRgb2YCrCb_Config::BaseAddress, XRgb2YCrCb::Config, XRgb2YCrCb_WriteReg, XRGB_CBMAX_LAST, and XRGB_CBMAX_OFFSET.

Referenced by Rgb2YCrCb_Update_Example().

void XRgb2YCrCb_SetCbMin ( XRgb2YCrCb InstancePtr,
u32  CbMin 
)

This function sets the minimum value allowed on the Cb Chroma channel of the output.

Parameters
InstancePtris a pointer to the XRgb2YCrCb instance.
CbMinspecifies the maximum value within range [0, 255] of Cb Chroma channel needs to set.
Returns
None.
Note
None.

References XRgb2YCrCb_Config::BaseAddress, XRgb2YCrCb::Config, XRgb2YCrCb_WriteReg, XRGB_CBMIN_LAST, and XRGB_CBMIN_OFFSET.

Referenced by Rgb2YCrCb_Update_Example().

void XRgb2YCrCb_SetCbOffset ( XRgb2YCrCb InstancePtr,
u32  CbOffset 
)

This function sets the offset compensation value for the Cb Chroma channel.

Parameters
InstancePtris a pointer to the XRgb2YCrCb instance.
CbOffsetspecifies the compensation value within range [0, 255] of Cb Chroma channel that needs to be set.
Returns
None.
Note
None.

References XRgb2YCrCb_Config::BaseAddress, XRgb2YCrCb::Config, XRgb2YCrCb_WriteReg, XRGB_CBOFFSET_LAST, and XRGB_CBOFFSET_OFFSET.

Referenced by Rgb2YCrCb_Update_Example().

void XRgb2YCrCb_SetCoefs ( XRgb2YCrCb InstancePtr,
double  ACoef,
double  BCoef,
double  CCoef,
double  DCoef 
)

This function sets A, B, C and D coefficients.

Parameters
InstancePtris a pointer to the XRgb2YCrCb instance.
ACoefspecifies the A coefficient value within the range [0.0 to 1.0] that needs to be set.
BCoefspecifies the B coefficient value within the range [0.0 to 1.0] that needs to be set.
CCoefspecifies the C coefficient value within the range [0.0 to 1.0] that needs to be set.
DCoefspecifies the D coefficient value within the range [0.0 to 1.0] that needs to be set.
Returns
None.
Note
None.

References XRgb2YCrCb_Config::BaseAddress, XRgb2YCrCb::Config, XRgb2YCrCb_WriteReg, XRGB_16_BIT_COEF_SHIFT, XRGB_ACOEF_OFFSET, XRGB_BCOEF_OFFSET, XRGB_CCOEF_OFFSET, and XRGB_DCOEF_OFFSET.

Referenced by Rgb2YCrCb_Update_Example().

void XRgb2YCrCb_SetCrMax ( XRgb2YCrCb InstancePtr,
u32  CrMax 
)

This function sets the maximum value allowed on the Cr Chroma channel of the output.

Parameters
InstancePtris a pointer to the XRgb2YCrCb instance.
CrMaxspecifies the maximum value within range [0, 255] of Cr Chroma channel that needs to be set.
Returns
None.
Note
None.

References XRgb2YCrCb_Config::BaseAddress, XRgb2YCrCb::Config, XRgb2YCrCb_WriteReg, XRGB_CRMAX_LAST, and XRGB_CRMAX_OFFSET.

Referenced by Rgb2YCrCb_Update_Example().

void XRgb2YCrCb_SetCrMin ( XRgb2YCrCb InstancePtr,
u32  CrMin 
)

This function sets the minimum value allowed on the Cr Chroma channel of the output.

Parameters
InstancePtris a pointer to the XRgb2YCrCb instance.
CrMinspecifies the minimum value within range [0, 255] of Cr Chroma channel that needs to be set.
Returns
None.
Note
None.

References XRgb2YCrCb_Config::BaseAddress, XRgb2YCrCb::Config, XRgb2YCrCb_WriteReg, XRGB_CRMIN_LAST, and XRGB_CRMIN_OFFSET.

Referenced by Rgb2YCrCb_Update_Example().

void XRgb2YCrCb_SetCrOffset ( XRgb2YCrCb InstancePtr,
u32  CrOffset 
)

This function sets the offset compensation value for the Cr Chroma channel.

Parameters
InstancePtris a pointer to the XRgb2YCrCb instance.
CrOffsetspecifies the compensation value within range [0, 255] of Cr Chroma channel that needs to be set.
Returns
None.
Note
None.

References XRgb2YCrCb_Config::BaseAddress, XRgb2YCrCb::Config, XRgb2YCrCb_WriteReg, XRGB_CROFFSET_LAST, and XRGB_CROFFSET_OFFSET.

Referenced by Rgb2YCrCb_Update_Example().

void XRgb2YCrCb_Setup ( XRgb2YCrCb InstancePtr)

This function sets up double buffered ACTIVE_SIZE register and enables the register update.

Parameters
InstancePtris a pointer to the XRgb2YCrCb instance.
Returns
None.
Note
None.

References XRgb2YCrCb_Config::BaseAddress, XRgb2YCrCb::Config, XRgb2YCrCb::HSize, XRgb2YCrCb::VSize, XRgb2YCrCb_RegUpdateDisable, XRgb2YCrCb_RegUpdateEnable, XRgb2YCrCb_WriteReg, XRGB_ACTIVE_SIZE_OFFSET, XRGB_ACTSIZE_NUM_LINE_MASK, XRGB_ACTSIZE_NUM_LINE_SHIFT, and XRGB_ACTSIZE_NUM_PIXEL_MASK.

void XRgb2YCrCb_SetYMax ( XRgb2YCrCb InstancePtr,
u32  YMax 
)

This function sets the maximum value allowed on the Luma (Y) channel of the output.

Parameters
InstancePtris a pointer to the XRgb2YCrCb instance.
YMaxspecifies the maximum value within range [0, 255] of Luma channel that needs to be set.
Returns
None.
Note
None.

References XRgb2YCrCb_Config::BaseAddress, XRgb2YCrCb::Config, XRgb2YCrCb_WriteReg, XRGB_YMAX_LAST, and XRGB_YMAX_OFFSET.

Referenced by Rgb2YCrCb_Update_Example().

void XRgb2YCrCb_SetYMin ( XRgb2YCrCb InstancePtr,
u32  YMin 
)

This function sets the minimum value allowed on the Luma (Y) channel of the output.

Parameters
InstancePtris a pointer to the XRgb2YCrCb instance.
YMinspecifies the minimum value within range [0, 255] of Luma channel that needs to be set.
Returns
None.
Note
None.

References XRgb2YCrCb_Config::BaseAddress, XRgb2YCrCb::Config, XRgb2YCrCb_WriteReg, XRGB_YMIN_LAST, and XRGB_YMIN_OFFSET.

Referenced by Rgb2YCrCb_Update_Example().

void XRgb2YCrCb_SetYOffset ( XRgb2YCrCb InstancePtr,
u32  YOffset 
)

This function sets the offset compensation value for the Luma (Y) channel.

Parameters
InstancePtris a pointer to the XRgb2YCrCb instance.
YOffsetspecifies the compensation value within range [0, 255] of Luma channel that needs to be set.
Returns
None.
Note
None.

References XRgb2YCrCb_Config::BaseAddress, XRgb2YCrCb::Config, XRgb2YCrCb_WriteReg, XRGB_YOFFSET_LAST, and XRGB_YOFFSET_OFFSET.

Referenced by Rgb2YCrCb_Update_Example().