ycrcb2rgb: Ycrcb2rgb_v7_1

| ycrcb2rgb Xilinx SDK Drivers API Documentation

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

Data Structures | Macros | Typedefs | Functions
Ycrcb2rgb_v7_1

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

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

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

## Control Registers
Control Registers offset for YCRCB2RGB core.
#define | XYCC_CONTROL_OFFSET 0x000
| Control offset. More...
#define | XYCC_STATUS_OFFSET 0x004
| Status offset. More...
#define | XYCC_ERROR_OFFSET 0x008
| Error offset. More...
#define | XYCC_IRQ_EN_OFFSET 0x00C
| IRQ Enable offset. More...
#define | XYCC_VERSION_OFFSET 0x010
| Version offset. More...
#define | XYCC_SYSDEBUG0_OFFSET 0x014
| System Debug 0 offset. More...
#define | XYCC_SYSDEBUG1_OFFSET 0x018
| System Debug 1 offset. More...
#define | XYCC_SYSDEBUG2_OFFSET 0x01C
| System Debug 2 offset. More...

## Timing Control Registers
Timing control registers offset for YCRCB2RGB core.
#define | XYCC_ACTIVE_SIZE_OFFSET 0x020
| Active Size (V x H) offset. More...

## Core Specific Registers
Core specific registers offset
#define | XYCC_RGBMAX_OFFSET 0x100
| RGB Clipping offset. More...
#define | XYCC_RGBMIN_OFFSET 0x104
| RGB Clamping offset. More...
#define | XYCC_ROFFSET_OFFSET 0x108
| R Offset offset. More...
#define | XYCC_GOFFSET_OFFSET 0x10C
| G Offset offset. More...
#define | XYCC_BOFFSET_OFFSET 0x110
| B Offset offset. More...
#define | XYCC_ACOEF_OFFSET 0x114
| A Coefficient offset. More...
#define | XYCC_BCOEF_OFFSET 0x118
| B Coefficient offset. More...
#define | XYCC_CCOEF_OFFSET 0x11C
| C Coefficient offset. More...
#define | XYCC_DCOEF_OFFSET 0x120
| D Coefficient offset. More...

## Control Register Bit Masks
Control Register bit definition for YCRCB2RGB core.
#define | XYCC_CTL_SW_EN_MASK 0x00000001
| Software Enable Mask. More...
#define | XYCC_CTL_RUE_MASK 0x00000002
| Register Update Enable Mask. More...
#define | XYCC_CTL_BPE_MASK 0x00000010
| Bypass Mask. More...
#define | XYCC_CTL_TPE_MASK 0x00000020
| Test Pattern Mask. More...
#define | XYCC_CTL_AUTORESET_MASK 0x40000000
| Software Reset - Auto-synchronize to SOF Mask. More...
#define | XYCC_CTL_RESET_MASK 0x80000000
| Software Reset - Instantaneous Mask. More...

## Slave Error Bit Masks
#define | XYCC_ERR_EOL_EARLY_MASK 0x000000001
| Error: End of line Early Mask. More...
#define | XYCC_ERR_EOL_LATE_MASK 0x000000002
| Error: End of line Late Mask. More...
#define | XYCC_ERR_SOF_EARLY_MASK 0x000000004
| Error: Start of frame Early Mask. More...
#define | XYCC_ERR_SOF_LATE_MASK 0x000000008
| Error: Start of frame Late Mask. More...

## Interrupt Register Bit Masks
Interrupt Register bit definition for YCRCB2RGB core. It is applicable for STATUS and IRQ_ENABLE Registers.
#define | XYCC_IXR_PROCS_MASK 0x00000001
| Process Started Mask. More...
#define | XYCC_IXR_EOF_MASK 0x00000002
| End-Of-Frame Mask. More...
#define | XYCC_IXR_SE_MASK 0x00010000
| Slave Error Mask. More...
#define | XYCC_IXR_ALLINTR_MASK 0x00010003
| Interrupt All Error Mask (ORing (of All Interrupt Mask) More...

## Version Register Bit Masks and Shifts
#define | XYCC_VER_REV_NUM_MASK 0x000000FF
| Revision Number Mask. More...
#define | XYCC_VER_PID_MASK 0x00000F00
| Patch ID Mask. More...
#define | XYCC_VER_REV_MASK 0x0000F000
| Revision Mask. More...
#define | XYCC_VER_MINOR_MASK 0x00FF0000
| Minor Mask. More...
#define | XYCC_VER_MAJOR_MASK 0xFF000000
| Major Mask. More...
#define | XYCC_VER_MAJOR_SHIFT 24
| Major Shift. More...
#define | XYCC_VER_MINOR_SHIFT 16
| Minor Shift. More...
#define | XYCC_VER_REV_SHIFT 12
| Revision Shift. More...
#define | XYCC_VER_INTERNAL_SHIFT 8
| Internal Shift. More...

## Active Size Register Bit Masks and Shifts
#define | XYCC_ACTSIZE_NUM_PIXEL_MASK 0x00001FFF
| The number of pixels in source image. More...
#define | XYCC_ACTSIZE_NUM_LINE_MASK 0x1FFF0000
| The number of lines in source image. More...
#define | XYCC_ACTSIZE_NUM_LINE_SHIFT 16
| Shift for number of lines. More...

## RGBMAX Register Bit Mask
#define | XYCC_RGBMAX_MASK 0x0000FFFF
| Clipping Mask. More...

## RGBMIN Register Bit Mask
#define | XYCC_RGBMIN_MASK 0x0000FFFF
| Clamping Mask. More...

## ROFFSET Register Bit Mask
#define | XYCC_ROFFSET_MASK 0xFFFFFFFF
| Red offset compensation Mask. More...

## GOFFSET Register Bit Mask
#define | XYCC_GOFFSET_MASK 0xFFFFFFFF
| Green offset compensation Mask. More...

## BOFFSET Register Bit Mask
#define | XYCC_BOFFSET_MASK 0xFFFFFFFF
| Blue offset compensation Mask. More...

## A ,B, C , D Coefficient Register Bit Mask
#define | XYCC_COEF_MASK 0x0003FFFF
| Coefficients Mask. More...

## General purpose Bit Mask and Shifts
#define | XYCC_8_BIT_MASK 0x000000FF
| 8-bit Mask More...
#define | XYCC_16_BIT_MASK 0x0000FFFF
| 16-Bit Mask More...
#define | XYCC_16_BIT_COEF_SHIFT 16
| 16-Bit Coefficient Shift More...

## Data widths in bits per color.
#define | XYCC_DATA_WIDTH_8 8
| 8-bit Data Width. More...
#define | XYCC_DATA_WIDTH_10 10
| 10-bit Data Width. More...
#define | XYCC_DATA_WIDTH_12 12
| 12-bit Data Width. More...
#define | XYCC_DATA_WIDTH_16 16
| 16-bit Data Width. More...

## Backward Compatibility Macros
To support backward compatibility, following macros definition are re-defined.
#define | YCC_CONTROL XYCC_CONTROL_OFFSET
#define | YCC_STATUS XYCC_STATUS_OFFSET
#define | YCC_ERROR XYCC_ERROR_OFFSET
#define | YCC_IRQ_EN XYCC_IRQ_EN_OFFSET
#define | YCC_VERSION XYCC_VERSION_OFFSET
#define | YCC_SYSDEBUG0 XYCC_SYSDEBUG0_OFFSET
#define | YCC_SYSDEBUG1 XYCC_SYSDEBUG1_OFFSET
#define | YCC_SYSDEBUG2 XYCC_SYSDEBUG2_OFFSET
#define | YCC_ACTIVE_SIZE XYCC_ACTIVE_SIZE_OFFSET
#define | XYCC_RGBMAX XYCC_RGBMAX_OFFSET
#define | XYCC_RGBMIN XYCC_RGBMIN_OFFSET
#define | XYCC_ROFFSET XYCC_ROFFSET_OFFSET
#define | XYCC_GOFFSET XYCC_GOFFSET_OFFSET
#define | XYCC_BOFFSET XYCC_BOFFSET_OFFSET
#define | XYCC_ACOEF XYCC_ACOEF_OFFSET
#define | XYCC_BCOEF XYCC_BCOEF_OFFSET
#define | XYCC_CCOEF XYCC_CCOEF_OFFSET
#define | XYCC_DCOEF XYCC_DCOEF_OFFSET
#define | YCC_CTL_EN_MASK XYCC_CTL_EN_MASK
#define | YCC_CTL_RUE_MASK XYCC_CTL_RUE_MASK
#define | YCC_RST_RESET XYCC_CTL_RESET_MASK
#define | YCC_RST_AUTORESET XYCC_CTL_AUTORESET_MASK
#define | YCC_In32 XYCrCb2Rgb_In32
#define | YCC_Out32 XYCrCb2Rgb_Out32
#define | XYCC_ReadReg XYCrCb2Rgb_ReadReg
#define | XYCC_WriteReg XYCrCb2Rgb_WriteReg

## Interrupt Registers
Interrupt status register generates a interrupt if the corresponding bits of interrupt enable register bits are set.
#define | XYCC_ISR_OFFSET XYCC_STATUS_OFFSET
| Interrupt Status Offset. More...
#define | XYCC_IER_OFFSET XYCC_IRQ_EN_OFFSET
| Interrupt Enable Offset. More...

## Macro Definition Documentation

#define XYCC_16_BIT_COEF_SHIFT 16

16-Bit Coefficient Shift

Referenced by XYCrCb2Rgb_GetCoefs(), and XYCrCb2Rgb_SetCoefs().

#define XYCC_16_BIT_MASK 0x0000FFFF

16-Bit Mask

Referenced by XYCrCb2Rgb_GetRGBMax(), and XYCrCb2Rgb_GetRGBMin().

#define XYCC_8_BIT_MASK 0x000000FF

8-bit Mask

#define XYCC_ACOEF_OFFSET 0x114

A Coefficient offset.

Referenced by XYCrCb2Rgb_GetCoefs(), and XYCrCb2Rgb_SetCoefs().

#define XYCC_ACT_SIZE_FIRST 32

Active Size (VxH) range macros.

Starting value for H/V

Referenced by XYCrCb2Rgb_SetActiveSize().

#define XYCC_ACT_SIZE_LAST 8192

Ending value for H/V.

Referenced by XYCrCb2Rgb_SetActiveSize().

#define XYCC_ACTIVE_SIZE_OFFSET 0x020

Active Size (V x H) offset.

Referenced by XYCrCb2Rgb_GetActiveSize(), XYCrCb2Rgb_SetActiveSize(), and XYCrCb2Rgb_Setup().

#define XYCC_ACTSIZE_NUM_LINE_MASK 0x1FFF0000

The number of lines in source image.

Referenced by XYCrCb2Rgb_GetActiveSize().

#define XYCC_ACTSIZE_NUM_LINE_SHIFT 16

Shift for number of lines.

Referenced by XYCrCb2Rgb_GetActiveSize(), XYCrCb2Rgb_SetActiveSize(), and XYCrCb2Rgb_Setup().

#define XYCC_ACTSIZE_NUM_PIXEL_MASK 0x00001FFF

The number of pixels in source image.

Referenced by XYCrCb2Rgb_GetActiveSize(), and XYCrCb2Rgb_Setup().

#define XYCC_BCOEF_OFFSET 0x118

B Coefficient offset.

Referenced by XYCrCb2Rgb_GetCoefs(), and XYCrCb2Rgb_SetCoefs().

#define XYCC_BOFFSET_MASK 0xFFFFFFFF

Blue offset compensation Mask.

#define XYCC_BOFFSET_OFFSET 0x110

B Offset offset.

Referenced by XYCrCb2Rgb_GetBOffset(), and XYCrCb2Rgb_SetBOffset().

#define XYCC_CCOEF_OFFSET 0x11C

C Coefficient offset.

Referenced by XYCrCb2Rgb_GetCoefs(), and XYCrCb2Rgb_SetCoefs().

#define XYCC_COEF_MASK 0x0003FFFF

Coefficients Mask.

#define XYCC_CONTROL_OFFSET 0x000

Control offset.

Referenced by XYCrCb2Rgb_DisableDbgBypass(), XYCrCb2Rgb_DisableDbgTestPattern(), XYCrCb2Rgb_EnableDbgByPass(), XYCrCb2Rgb_EnableDbgTestPattern(), XYCrCb2Rgb_IsDbgByPassEnabled(), and XYCrCb2Rgb_IsDbgTestPatternEnabled().

#define XYCC_CTL_AUTORESET_MASK 0x40000000

Software Reset - Auto-synchronize to SOF Mask.

#define XYCC_CTL_BPE_MASK 0x00000010

Bypass Mask.

Referenced by XYCrCb2Rgb_DisableDbgBypass(), XYCrCb2Rgb_EnableDbgByPass(), and XYCrCb2Rgb_IsDbgByPassEnabled().

#define XYCC_CTL_RESET_MASK 0x80000000

Software Reset - Instantaneous Mask.

#define XYCC_CTL_RUE_MASK 0x00000002

Register Update Enable Mask.

#define XYCC_CTL_SW_EN_MASK 0x00000001

Software Enable Mask.

#define XYCC_CTL_TPE_MASK 0x00000020

Test Pattern Mask.

Referenced by XYCrCb2Rgb_DisableDbgTestPattern(), XYCrCb2Rgb_EnableDbgTestPattern(), and XYCrCb2Rgb_IsDbgTestPatternEnabled().

#define XYCC_DATA_WIDTH_10 10

10-bit Data Width.

Referenced by XYCrCb2Rgb_Coefficient_Translation(), and XYCrCb2Rgb_Select_Standard().

#define XYCC_DATA_WIDTH_12 12

12-bit Data Width.

Referenced by XYCrCb2Rgb_Coefficient_Translation(), and XYCrCb2Rgb_Select_Standard().

#define XYCC_DATA_WIDTH_16 16

16-bit Data Width.

Referenced by XYCrCb2Rgb_Coefficient_Translation(), and XYCrCb2Rgb_Select_Standard().

#define XYCC_DATA_WIDTH_8 8

8-bit Data Width.

Referenced by XYCrCb2Rgb_Coefficient_Translation(), XYCrCb2Rgb_Select_Standard(), and YCrCb2Rgb_Update_Example().

#define XYCC_DCOEF_OFFSET 0x120

D Coefficient offset.

Referenced by XYCrCb2Rgb_GetCoefs(), and XYCrCb2Rgb_SetCoefs().

#define XYCC_ERR_EOL_EARLY_MASK 0x000000001

Error: End of line Early Mask.

#define XYCC_ERR_EOL_LATE_MASK 0x000000002

Error: End of line Late Mask.

#define XYCC_ERR_SOF_EARLY_MASK 0x000000004

Error: Start of frame Early Mask.

#define XYCC_ERR_SOF_LATE_MASK 0x000000008

Error: Start of frame Late Mask.

#define XYCC_ERROR_OFFSET 0x008

Error offset.

#define XYCC_GOFFSET_MASK 0xFFFFFFFF

Green offset compensation Mask.

#define XYCC_GOFFSET_OFFSET 0x10C

G Offset offset.

Referenced by XYCrCb2Rgb_GetGOffset(), and XYCrCb2Rgb_SetGOffset().

#define XYCC_IER_OFFSET XYCC_IRQ_EN_OFFSET

Interrupt Enable Offset.

#define XYCC_IRQ_EN_OFFSET 0x00C

IRQ Enable offset.

#define XYCC_ISR_OFFSET XYCC_STATUS_OFFSET

Interrupt Status Offset.

#define XYCC_IXR_ALLINTR_MASK 0x00010003

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

#define XYCC_IXR_EOF_MASK 0x00000002

End-Of-Frame Mask.

Referenced by XYCrCb2Rgb_IntrHandler().

#define XYCC_IXR_PROCS_MASK 0x00000001

Process Started Mask.

Referenced by XYCrCb2Rgb_IntrHandler().

#define XYCC_IXR_SE_MASK 0x00010000

Slave Error Mask.

Referenced by XYCrCb2Rgb_IntrHandler().

#define XYCC_RGBMAX_MASK 0x0000FFFF

Clipping Mask.

#define XYCC_RGBMAX_MIN_FIRST 0

RGBMAX, RGBMIN range macros.

Starting value for RGBMAX/RGBMIN

#define XYCC_RGBMAX_MIN_LAST 255

Ending value for RGBMAX/RGBMIN.

Referenced by XYCrCb2Rgb_SetRGBMax(), and XYCrCb2Rgb_SetRGBMin().

#define XYCC_RGBMAX_OFFSET 0x100

RGB Clipping offset.

Referenced by XYCrCb2Rgb_GetRGBMax(), and XYCrCb2Rgb_SetRGBMax().

#define XYCC_RGBMIN_MASK 0x0000FFFF

Clamping Mask.

#define XYCC_RGBMIN_OFFSET 0x104

RGB Clamping offset.

Referenced by XYCrCb2Rgb_GetRGBMin(), and XYCrCb2Rgb_SetRGBMin().

#define XYCC_RGBOFFSET_FIRST 0

ROFFSET, GOFFSET, BOFFSET range macros.

Starting value for ROFFSET/ GOFFSET/BOFFSET

#define XYCC_RGBOFFSET_LAST 255

Ending value for ROFFSET/ GOFFSET/BOFFSET.

Referenced by XYCrCb2Rgb_SetBOffset(), XYCrCb2Rgb_SetGOffset(), and XYCrCb2Rgb_SetROffset().

#define XYCC_ROFFSET_MASK 0xFFFFFFFF

Red offset compensation Mask.

#define XYCC_ROFFSET_OFFSET 0x108

R Offset offset.

Referenced by XYCrCb2Rgb_GetROffset(), and XYCrCb2Rgb_SetROffset().

#define XYCC_STATUS_OFFSET 0x004

Status offset.

#define XYCC_SYSDEBUG0_OFFSET 0x014

System Debug 0 offset.

Referenced by XYCrCb2Rgb_GetDbgFrameCount().

#define XYCC_SYSDEBUG1_OFFSET 0x018

System Debug 1 offset.

Referenced by XYCrCb2Rgb_GetDbgLineCount().

#define XYCC_SYSDEBUG2_OFFSET 0x01C

System Debug 2 offset.

Referenced by XYCrCb2Rgb_GetDbgPixelCount().

#define XYCC_VER_INTERNAL_SHIFT 8

Internal Shift.

#define XYCC_VER_MAJOR_MASK 0xFF000000

Major Mask.

#define XYCC_VER_MAJOR_SHIFT 24

Major Shift.

#define XYCC_VER_MINOR_MASK 0x00FF0000

Minor Mask.

#define XYCC_VER_MINOR_SHIFT 16

Minor Shift.

#define XYCC_VER_PID_MASK 0x00000F00

Patch ID Mask.

#define XYCC_VER_REV_MASK 0x0000F000

Revision Mask.

#define XYCC_VER_REV_NUM_MASK 0x000000FF

Revision Number Mask.

#define XYCC_VER_REV_SHIFT 12

Revision Shift.

#define XYCC_VERSION_OFFSET 0x010

Version offset.

Referenced by XYCrCb2Rgb_GetVersion(), and XYCrCb2Rgb_SelfTest().

#define XYCrCb2Rgb_Disable | ( |  | InstancePtr | ) |

Value:
XYCrCb2Rgb_WriteReg((InstancePtr)->Config.BaseAddress, \
(XYCC_CONTROL_OFFSET), \
(XYCrCb2Rgb_ReadReg((InstancePtr)->Config.BaseAddress, \
(XYCC_CONTROL_OFFSET)) & (~(XYCC_CTL_SW_EN_MASK))))
XYCrCb2Rgb_WriteReg
#define XYCrCb2Rgb_WriteReg(BaseAddress, RegOffset, Data)
This function macro writes the given register.
Definition: xycrcb2rgb_hw.h:343
XYCC_CONTROL_OFFSET
#define XYCC_CONTROL_OFFSET
Control offset.
Definition: xycrcb2rgb_hw.h:70
XYCC_CTL_SW_EN_MASK
#define XYCC_CTL_SW_EN_MASK
Software Enable Mask.
Definition: xycrcb2rgb_hw.h:111
XYCrCb2Rgb_ReadReg
#define XYCrCb2Rgb_ReadReg(BaseAddress, RegOffset)
This function macro reads the given register.
Definition: xycrcb2rgb_hw.h:323

This macro disables the YCrCb2Rgb core.

Parameters

  InstancePtr | is a pointer to the XYCrCb2Rgb instance.

Returns
  None.

Note
  C-style signature: void XYCrCb2Rgb_Disable(*XYCrCb2Rgb InstancePtr)

#define XYCrCb2Rgb_Enable | ( |  | InstancePtr | ) |

Value:
XYCrCb2Rgb_WriteReg((InstancePtr)->Config.BaseAddress, \
(XYCC_CONTROL_OFFSET), \
XYCrCb2Rgb_ReadReg((InstancePtr)->Config.BaseAddress, \
(XYCC_CONTROL_OFFSET)) | (XYCC_CTL_SW_EN_MASK))
XYCrCb2Rgb_WriteReg
#define XYCrCb2Rgb_WriteReg(BaseAddress, RegOffset, Data)
This function macro writes the given register.
Definition: xycrcb2rgb_hw.h:343
XYCC_CONTROL_OFFSET
#define XYCC_CONTROL_OFFSET
Control offset.
Definition: xycrcb2rgb_hw.h:70
XYCC_CTL_SW_EN_MASK
#define XYCC_CTL_SW_EN_MASK
Software Enable Mask.
Definition: xycrcb2rgb_hw.h:111
XYCrCb2Rgb_ReadReg
#define XYCrCb2Rgb_ReadReg(BaseAddress, RegOffset)
This function macro reads the given register.
Definition: xycrcb2rgb_hw.h:323

This macro enables the YCrCb2Rgb core.

Parameters

  InstancePtr | is a pointer to the XYCrCb2Rgb instance.

Returns
  None.

Note
  C-style signature: void XYCrCb2Rgb_Enable(*XYCrCb2Rgb InstancePtr)

Referenced by YCrCb2Rgb_Update_Example().

#define XYCRCB2RGB_H_

Prevent circular inclusions by using protection macros.

#define XYCRCB2RGB_HW_H_

Prevent circular inclusions by using protection macros.

#define XYCrCb2Rgb_In32 Xil_In32

Input operation.

#define XYCrCb2Rgb_IntrClear | ( |  | InstancePtr,
|  |  | IntrType
| ) |  |

Value:
XYCrCb2Rgb_WriteReg((InstancePtr)->Config.BaseAddress, \
(XYCC_STATUS_OFFSET), \
(IntrType) & (XYCC_IXR_ALLINTR_MASK))
XYCC_IXR_ALLINTR_MASK
#define XYCC_IXR_ALLINTR_MASK
Interrupt All Error Mask (ORing (of All Interrupt Mask)
Definition: xycrcb2rgb_hw.h:153
XYCrCb2Rgb_WriteReg
#define XYCrCb2Rgb_WriteReg(BaseAddress, RegOffset, Data)
This function macro writes the given register.
Definition: xycrcb2rgb_hw.h:343
XYCC_STATUS_OFFSET
#define XYCC_STATUS_OFFSET
Status offset.
Definition: xycrcb2rgb_hw.h:71

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

Bit positions of 1 will be cleared.

Parameters

  InstancePtr | is a pointer to the YCRCB2RGB core instance to be worked on.
  IntrType | is the pending interrupts to clear/acknowledge. Use OR'ing of XYCC_IXR_*_MASK constants defined in xycrcb2rgb_hw.h to create this parameter value.

Returns
  None.

Note
  C-style signature: void XYCrCb2Rgb_IntrClear(XYCC *InstancePtr, u32 IntrType)

Referenced by XYCrCb2Rgb_IntrHandler().

#define XYCrCb2Rgb_IntrDisable | ( |  | InstancePtr,
|  |  | IntrType
| ) |  |

Value:
XYCrCb2Rgb_WriteReg((InstancePtr)->Config.BaseAddress, \
(XYCC_IRQ_EN_OFFSET),\
XYCrCb2Rgb_ReadReg((InstancePtr)->Config.BaseAddress, \
(XYCC_IRQ_EN_OFFSET)) & \
((~(IntrType)) & (XYCC_IXR_ALLINTR_MASK)))
XYCC_IXR_ALLINTR_MASK
#define XYCC_IXR_ALLINTR_MASK
Interrupt All Error Mask (ORing (of All Interrupt Mask)
Definition: xycrcb2rgb_hw.h:153
XYCrCb2Rgb_WriteReg
#define XYCrCb2Rgb_WriteReg(BaseAddress, RegOffset, Data)
This function macro writes the given register.
Definition: xycrcb2rgb_hw.h:343
XYCC_IRQ_EN_OFFSET
#define XYCC_IRQ_EN_OFFSET
IRQ Enable offset.
Definition: xycrcb2rgb_hw.h:73
XYCrCb2Rgb_ReadReg
#define XYCrCb2Rgb_ReadReg(BaseAddress, RegOffset)
This function macro reads the given register.
Definition: xycrcb2rgb_hw.h:323

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

Parameters

  InstancePtr | is a pointer to the YCrCb2Rgb core instance to be worked on.
  IntrType | is 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 XYCC_IXR_*_MASK bits defined in xycrcb2rgb_hw.h.

Returns
  None

Note
  C-style signature: void XYCrCb2Rgb_IntrDisable(XYCrCb2Rgb *InstancePtr, u32 IntrType)

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

#define XYCrCb2Rgb_IntrEnable | ( |  | InstancePtr,
|  |  | IntrType
| ) |  |

Value:
XYCrCb2Rgb_WriteReg((InstancePtr)->Config.BaseAddress, \
(XYCC_IRQ_EN_OFFSET), (((IntrType) & \
(XYCC_IXR_ALLINTR_MASK)) | \
(XYCrCb2Rgb_ReadReg((InstancePtr)->Config.BaseAddress, \
(XYCC_IRQ_EN_OFFSET)))))
XYCC_IXR_ALLINTR_MASK
#define XYCC_IXR_ALLINTR_MASK
Interrupt All Error Mask (ORing (of All Interrupt Mask)
Definition: xycrcb2rgb_hw.h:153
XYCrCb2Rgb_WriteReg
#define XYCrCb2Rgb_WriteReg(BaseAddress, RegOffset, Data)
This function macro writes the given register.
Definition: xycrcb2rgb_hw.h:343
XYCC_IRQ_EN_OFFSET
#define XYCC_IRQ_EN_OFFSET
IRQ Enable offset.
Definition: xycrcb2rgb_hw.h:73
XYCrCb2Rgb_ReadReg
#define XYCrCb2Rgb_ReadReg(BaseAddress, RegOffset)
This function macro reads the given register.
Definition: xycrcb2rgb_hw.h:323

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

Parameters

  InstancePtr | is a pointer to the YCrCb2Rgb core instance to be worked on.
  IntrType | is 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 XYCC_IXR_*_MASK bits defined in xycrcb2rgb_hw.h.

Returns
  None

Note
  C-style signature: void XYCrCb2Rgb_IntrEnable(XYCrCb2Rgb *InstancePtr, u32 IntrType)

The existing enabled interrupt(s) will remain enabled.

#define XYCrCb2Rgb_IntrGetPending | ( |  | InstancePtr | ) |

Value:
XYCrCb2Rgb_ReadReg((InstancePtr)->Config.BaseAddress, \
(XYCC_IRQ_EN_OFFSET)) & \
(XYCrCb2Rgb_ReadReg((InstancePtr)->Config.BaseAddress, \
(XYCC_STATUS_OFFSET)) & \
((u32)(XYCC_IXR_ALLINTR_MASK)))
XYCC_IXR_ALLINTR_MASK
#define XYCC_IXR_ALLINTR_MASK
Interrupt All Error Mask (ORing (of All Interrupt Mask)
Definition: xycrcb2rgb_hw.h:153
XYCC_IRQ_EN_OFFSET
#define XYCC_IRQ_EN_OFFSET
IRQ Enable offset.
Definition: xycrcb2rgb_hw.h:73
XYCrCb2Rgb_ReadReg
#define XYCrCb2Rgb_ReadReg(BaseAddress, RegOffset)
This function macro reads the given register.
Definition: xycrcb2rgb_hw.h:323
XYCC_STATUS_OFFSET
#define XYCC_STATUS_OFFSET
Status offset.
Definition: xycrcb2rgb_hw.h:71

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

Parameters

  InstancePtr | is a pointer to the YCrCb2Rgb core instance to be worked on.

Returns
  The pending interrupts of the YCRCB2RGB core. Use XYCC_IXR_*_MASK constants defined in xycrcb2rgb_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 XYCC_IntrGetPending(XYCC *InstancePtr)

Referenced by XYCrCb2Rgb_IntrHandler().

#define XYCrCb2Rgb_Max | ( |  | Num1,
|  |  | Num2
| ) |  | (((Num1) > (Num2)) ? (Num1) : (Num2))

This macro identifies maximum number from given numbers.

Parameters

  Num1 | is a a u32 number.
  Num2 | is a a u32 number.

Returns
  Maximum number from given two numbers.

Note
  C-style signature: u32 XYCrCb2Rgb_Max(u32 Num1, u32 Num2)

Referenced by XYCrCb2Rgb_Coefficient_Translation().

#define XYCrCb2Rgb_Out32 Xil_Out32

Output operation.

#define XYCrCb2Rgb_ReadReg | ( |  | BaseAddress,
|  |  | RegOffset
| ) |  | XYCrCb2Rgb_In32((BaseAddress) + (u32)(RegOffset))

This function macro reads the given register.

Parameters

  BaseAddress | is the base address of the YCRCB2RGB core.
  RegOffset | is the register offset of the register defined at top of this file.

Returns
  32-bit value of the register.

Note
  C-style signature: u32 XYCrCb2Rgb_ReadReg(u32 BaseAddress, u32 RegOffset).

Referenced by XYCrCb2Rgb_DisableDbgBypass(), XYCrCb2Rgb_DisableDbgTestPattern(), XYCrCb2Rgb_EnableDbgByPass(), XYCrCb2Rgb_EnableDbgTestPattern(), XYCrCb2Rgb_GetActiveSize(), XYCrCb2Rgb_GetBOffset(), XYCrCb2Rgb_GetCoefs(), XYCrCb2Rgb_GetDbgFrameCount(), XYCrCb2Rgb_GetDbgLineCount(), XYCrCb2Rgb_GetDbgPixelCount(), XYCrCb2Rgb_GetGOffset(), XYCrCb2Rgb_GetRGBMax(), XYCrCb2Rgb_GetRGBMin(), XYCrCb2Rgb_GetROffset(), XYCrCb2Rgb_GetVersion(), XYCrCb2Rgb_IsDbgByPassEnabled(), XYCrCb2Rgb_IsDbgTestPatternEnabled(), and XYCrCb2Rgb_SelfTest().

#define XYCrCb2Rgb_RegUpdateDisable | ( |  | InstancePtr | ) |

Value:
XYCrCb2Rgb_WriteReg((InstancePtr)->Config.BaseAddress, \
(XYCC_CONTROL_OFFSET), \
(XYCrCb2Rgb_ReadReg((InstancePtr)->Config.BaseAddress, \
(XYCC_CONTROL_OFFSET)) & (~(XYCC_CTL_RUE_MASK))))
XYCrCb2Rgb_WriteReg
#define XYCrCb2Rgb_WriteReg(BaseAddress, RegOffset, Data)
This function macro writes the given register.
Definition: xycrcb2rgb_hw.h:343
XYCC_CONTROL_OFFSET
#define XYCC_CONTROL_OFFSET
Control offset.
Definition: xycrcb2rgb_hw.h:70
XYCC_CTL_RUE_MASK
#define XYCC_CTL_RUE_MASK
Register Update Enable Mask.
Definition: xycrcb2rgb_hw.h:112
XYCrCb2Rgb_ReadReg
#define XYCrCb2Rgb_ReadReg(BaseAddress, RegOffset)
This function macro reads the given register.
Definition: xycrcb2rgb_hw.h:323

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

Parameters

  InstancePtr | is a pointer to the XYCrCb2Rgb instance.

Returns
  None.

Note
  C-style signature: void XYCrCb2Rgb_RegUpdateDisable(*XYCrCb2Rgb InstancePtr)

Referenced by XYCrCb2Rgb_Setup(), and YCrCb2Rgb_Update_Example().

#define XYCrCb2Rgb_RegUpdateEnable | ( |  | InstancePtr | ) |

Value:
XYCrCb2Rgb_WriteReg((InstancePtr)->Config.BaseAddress, \
(XYCC_CONTROL_OFFSET), \
(XYCrCb2Rgb_ReadReg((InstancePtr)->Config.BaseAddress, \
(XYCC_CONTROL_OFFSET)) | (XYCC_CTL_RUE_MASK)))
XYCrCb2Rgb_WriteReg
#define XYCrCb2Rgb_WriteReg(BaseAddress, RegOffset, Data)
This function macro writes the given register.
Definition: xycrcb2rgb_hw.h:343
XYCC_CONTROL_OFFSET
#define XYCC_CONTROL_OFFSET
Control offset.
Definition: xycrcb2rgb_hw.h:70
XYCC_CTL_RUE_MASK
#define XYCC_CTL_RUE_MASK
Register Update Enable Mask.
Definition: xycrcb2rgb_hw.h:112
XYCrCb2Rgb_ReadReg
#define XYCrCb2Rgb_ReadReg(BaseAddress, RegOffset)
This function macro reads the given register.
Definition: xycrcb2rgb_hw.h:323

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

Parameters

  InstancePtr | is a pointer to the XYCrCb2Rgb instance.

Returns
  None.

Note
  C-style signature: void XYCrCb2Rgb_RegUpdateEnable(*XYCrCb2Rgb InstancePtr)

Referenced by XYCrCb2Rgb_Setup(), and YCrCb2Rgb_Update_Example().

#define XYCrCb2Rgb_Reset | ( |  | InstancePtr | ) |

Value:
XYCrCb2Rgb_WriteReg((InstancePtr)->Config.BaseAddress, \
(XYCC_CONTROL_OFFSET), (XYCC_CTL_RESET_MASK))
XYCrCb2Rgb_WriteReg
#define XYCrCb2Rgb_WriteReg(BaseAddress, RegOffset, Data)
This function macro writes the given register.
Definition: xycrcb2rgb_hw.h:343
XYCC_CTL_RESET_MASK
#define XYCC_CTL_RESET_MASK
Software Reset - Instantaneous Mask.
Definition: xycrcb2rgb_hw.h:122
XYCC_CONTROL_OFFSET
#define XYCC_CONTROL_OFFSET
Control offset.
Definition: xycrcb2rgb_hw.h:70

This macro resets the YCrCb2Rgb core.

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

Parameters

  InstancePtr | is a pointer to the XYCrCb2Rgb instance.

Returns
  None.

Note
  C-style signature: void XYCrCb2Rgb_Reset(XYCrCb2Rgb *InstancePtr)

Referenced by XYCrCb2Rgb_CfgInitialize().

#define XYCrCb2Rgb_Start XYCrCb2Rgb_Enable

This macro starts the YCrCb2Rgb core.

Parameters

  InstancePtr | is a pointer to the XYCrCb2Rgb instance.

Returns
  None.

Note
  C-style signature: void XYCrCb2Rgb_Start(*XYCrCb2Rgb InstancePtr)

#define XYCrCb2Rgb_StatusGetPending | ( |  | InstancePtr | ) |

Value:
XYCrCb2Rgb_ReadReg((InstancePtr)->Config.BaseAddress, \
(XYCC_STATUS_OFFSET)) & (XYCC_IXR_ALLINTR_MASK)
XYCC_IXR_ALLINTR_MASK
#define XYCC_IXR_ALLINTR_MASK
Interrupt All Error Mask (ORing (of All Interrupt Mask)
Definition: xycrcb2rgb_hw.h:153
XYCrCb2Rgb_ReadReg
#define XYCrCb2Rgb_ReadReg(BaseAddress, RegOffset)
This function macro reads the given register.
Definition: xycrcb2rgb_hw.h:323
XYCC_STATUS_OFFSET
#define XYCC_STATUS_OFFSET
Status offset.
Definition: xycrcb2rgb_hw.h:71

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

Parameters

  InstancePtr | is a pointer to the YCrCb2Rgb core instance to be worked on.

Returns
  The status of pending interrupts of the YCRCB2RGB core. Use XYCC_IXR_*_MASK constants defined in xycrcb2rgb_hw.h to interpret this value.

Note
  C-style signature: XYCrCb2Rgb_StatusGePending(XYCC *InstancePtr)

#define XYCrCb2Rgb_Stop XYCrCb2Rgb_Disable

This macro stops the YCrCb2Rgb core.

Parameters

  InstancePtr | is a pointer to the XYCrCb2Rgb instance.

Returns
  None.

Note
  C-style signature: void XYCrCb2Rgb_Stop(*XYCrCb2Rgb InstancePtr)

#define XYCrCb2Rgb_SyncReset | ( |  | InstancePtr | ) |

Value:
XYCrCb2Rgb_WriteReg((InstancePtr)->Config.BaseAddress, \
(XYCC_CONTROL_OFFSET), (XYCC_CTL_AUTORESET_MASK))
XYCrCb2Rgb_WriteReg
#define XYCrCb2Rgb_WriteReg(BaseAddress, RegOffset, Data)
This function macro writes the given register.
Definition: xycrcb2rgb_hw.h:343
XYCC_CONTROL_OFFSET
#define XYCC_CONTROL_OFFSET
Control offset.
Definition: xycrcb2rgb_hw.h:70
XYCC_CTL_AUTORESET_MASK
#define XYCC_CTL_AUTORESET_MASK
Software Reset - Auto-synchronize to SOF Mask.
Definition: xycrcb2rgb_hw.h:117

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.

On the next rising-edge of VBlank_in following a call to XYCrCb2Rgb_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

  InstancePtr | is a pointer to the XYCrCb2Rgb instance.

Returns
  None.

Note
  C-style signature: void XYCrCb2Rgb_SyncReset(*XYCrCb2Rgb InstancePtr)

#define XYCrCb2Rgb_WriteReg | ( |  | BaseAddress,
|  |  | RegOffset,
|  |  | Data
| ) |  | XYCrCb2Rgb_Out32((BaseAddress) + (u32)(RegOffset), (Data))

This function macro writes the given register.

Parameters

  BaseAddress | is base address of the YCRCB2RGB core.
  RegOffset | is the register offset of the register (defined at top of this file).
  Data | is the 32-bit value to write to the register.

Returns
  None.

Note
  C-style signature: void XYCrCb2Rgb_WriteReg(u32 BaseAddress, u32 RegOffset, u32 Data)

Referenced by XYCrCb2Rgb_DisableDbgBypass(), XYCrCb2Rgb_DisableDbgTestPattern(), XYCrCb2Rgb_EnableDbgByPass(), XYCrCb2Rgb_EnableDbgTestPattern(), XYCrCb2Rgb_SetActiveSize(), XYCrCb2Rgb_SetBOffset(), XYCrCb2Rgb_SetCoefs(), XYCrCb2Rgb_SetGOffset(), XYCrCb2Rgb_SetRGBMax(), XYCrCb2Rgb_SetRGBMin(), XYCrCb2Rgb_SetROffset(), and XYCrCb2Rgb_Setup().

## Typedef Documentation

typedef void(* XYCrCb2Rgb_CallBack)(void *CallBackRef)

Callback type for all interrupts except error interrupt.

Parameters

  CallBackRef | is 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(* XYCrCb2Rgb_ErrorCallBack)(void *CallBackRef, u32 ErrorMask)

Callback type for error interrupt.

Parameters

  CallBackRef | is 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.
  ErrorMask | is a bit mask indicating the cause of the error. Its value equals 'OR'ing one or more XYCC_IXR_*_MASK values defined in xycrcb2rgb_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
XYCC_HANDLER_PROCSTART | A processing start event interrupt type.
XYCC_HANDLER_FRAMEDONE | A frame done event interrupt type.
XYCC_HANDLER_ERROR | An error condition interrupt type.

enum XYcc_OutputRanges

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

Enumerator
XYCC_TV_16_TO_240 | 16 to 240, for Television.
XYCC_STUDIO_16_TO_235 | 16 to 235, for Studio Equipment.
XYCC_GRAPHICS_0_TO_255 | 0 to 255, for Computer Graphics.

enum XYcc_Standards

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

Enumerator
XYCC_STANDARD_ITU_601_SD | Standard ITU 601 SD.
XYCC_STANDARD_ITU_709_NTSC | Standard ITU 709 NTSC.
XYCC_STANDARD_ITU_709_PAL | Standard ITU 709 PAL.
XYCC_STANDARD_YUV | Standard YUV.
XYCC_STANDARD_CUSTOM | Standard Custom.

## Function Documentation

int XYCrCb2Rgb_CfgInitialize | ( | XYCrCb2Rgb * | InstancePtr,
|  | XYCrCb2Rgb_Config * | CfgPtr,
|  | u32 | EffectiveAddr
| ) |  |

This function initializes the YCrCb2Rgb core.

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

Parameters

  InstancePtr | is a pointer to the XYCrCb2Rgb instance.
  CfgPtr | is a reference to a structure containing information about a specific XYCrCb2Rgb driver.
  EffectiveAddr | is 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 XYCrCb2Rgb_Config::BaseAddress, XYCrCb2Rgb::Config, XYCrCb2Rgb::ErrCallBack, XYCrCb2Rgb::FrameDoneCallBack, XYCrCb2Rgb::IsReady, XYCrCb2Rgb::ProcStartCallBack, and XYCrCb2Rgb_Reset.

Referenced by XYCrCb2RgbSelfTestExample(), and YCrCb2Rgb_Update_Example().

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.

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

Parameters

  InstancePtr | is a pointer to the XYCrCb2Rgbb instance.
  CoefIn | specifies a pointer to a XYCrCb2Rgb_Coef_Inputs structure to be translated.
  CoefOut | specifies a pointer to a XYCrCb2Rgb_Coef_Outputs structure with translated values.
  DataWidth | specifies a valid range of [8,10,12,16] that needs to be set.
  MWidth | specifies a valid range from min(32, DataWidth + 17)

Returns
  RetVal, returns value with following bit information:
  - bit(0) = 1 = data width outside range [8, 10, 12, 16]
  - bit(1) = Acoef + Bcoef > 1.0
  - bit(2) = Y Offset outside data width range: [-2^DataWidth, (2^DataWidth)-1].
  - bit(3) = Cb Offset outside data width range: [-2^DataWidth, (2^DataWidth)-1].
  - bit(4) = Cr Offset outside data width range: [-2^DataWidth, (2^DataWidth)-1].
  - bit(5) = RGB Max outside data width range: [0, (2^DataWidth)-1].
  - bit(6) = RGB Min outside data width range: [0, (2^DataWidth)-1].

Note
  Floating point coefficients are represented in 17-bit fixed point format where 17 bits indicates integer portion (Mantissa) of the number exclusive of sign bit.

References XYCrCb2Rgb_Coef_Inputs::ACoef, XYCrCb2Rgb_Coef_Outputs::ACoef, XYCrCb2Rgb_Coef_Inputs::BCoef, XYCrCb2Rgb_Coef_Outputs::BCoef, XYCrCb2Rgb_Coef_Outputs::BOffset, XYCrCb2Rgb_Coef_Inputs::CbOffset, XYCrCb2Rgb_Coef_Inputs::CCoef, XYCrCb2Rgb_Coef_Outputs::CCoef, XYCrCb2Rgb_Coef_Inputs::CrOffset, XYCrCb2Rgb_Coef_Inputs::DCoef, XYCrCb2Rgb_Coef_Outputs::DCoef, XYCrCb2Rgb_Coef_Outputs::GOffset, XYCrCb2Rgb_Coef_Inputs::RgbMax, XYCrCb2Rgb_Coef_Outputs::RgbMax, XYCrCb2Rgb_Coef_Inputs::RgbMin, XYCrCb2Rgb_Coef_Outputs::RgbMin, XYCrCb2Rgb_Coef_Outputs::ROffset, XYCC_DATA_WIDTH_10, XYCC_DATA_WIDTH_12, XYCC_DATA_WIDTH_16, XYCC_DATA_WIDTH_8, XYCrCb2Rgb_Max, and XYCrCb2Rgb_Coef_Inputs::YOffset.

Referenced by YCrCb2Rgb_Update_Example().

void XYCrCb2Rgb_DisableDbgBypass | ( | XYCrCb2Rgb * | InstancePtr | ) |

This function disables Bypass mode of the core.

Parameters

  InstancePtr | is a pointer to the XYCrCb2Rgb instance.

Returns
  None.

Note
  Debug functionality should be enabled.

References XYCrCb2Rgb_Config::BaseAddress, XYCrCb2Rgb::Config, XYCrCb2Rgb_Config::HasDebug, XYCC_CONTROL_OFFSET, XYCC_CTL_BPE_MASK, XYCrCb2Rgb_ReadReg, and XYCrCb2Rgb_WriteReg.

void XYCrCb2Rgb_DisableDbgTestPattern | ( | XYCrCb2Rgb * | InstancePtr | ) |

This function disables debug test pattern mode.

Parameters

  InstancePtr | is a pointer to the XYCrCb2Rgb instance.

Returns
  None.

Note
  Debug functionality should be enabled.

References XYCrCb2Rgb_Config::BaseAddress, XYCrCb2Rgb::Config, XYCrCb2Rgb_Config::HasDebug, XYCC_CONTROL_OFFSET, XYCC_CTL_TPE_MASK, XYCrCb2Rgb_ReadReg, and XYCrCb2Rgb_WriteReg.

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.

Parameters

  InstancePtr | is a pointer to the XYCrCb2Rgb instance.

Returns
  None.

Note
  Debug functionality should be enabled.

References XYCrCb2Rgb_Config::BaseAddress, XYCrCb2Rgb::Config, XYCrCb2Rgb_Config::HasDebug, XYCC_CONTROL_OFFSET, XYCC_CTL_BPE_MASK, XYCrCb2Rgb_ReadReg, and XYCrCb2Rgb_WriteReg.

void XYCrCb2Rgb_EnableDbgTestPattern | ( | XYCrCb2Rgb * | InstancePtr | ) |

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

Parameters

  InstancePtr | is a pointer to the XYCrCb2Rgb instance.

Returns
  None.

Note
  Debug functionality should be enabled.

References XYCrCb2Rgb_Config::BaseAddress, XYCrCb2Rgb::Config, XYCrCb2Rgb_Config::HasDebug, XYCC_CONTROL_OFFSET, XYCC_CTL_TPE_MASK, XYCrCb2Rgb_ReadReg, and XYCrCb2Rgb_WriteReg.

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.

Parameters

  InstancePtr | is a pointer to the XYCrCb2Rgb instance.
  HSize | is a pointer to 16-bit variable in which the number of Active Pixels per scanline is returned within the range [32, 8192].
  VSize | is a pointer to 16-bit variable in which the number of Active Lines per frame is returned within the range [32, 8192].

Returns
  None.

Note
  None.

References XYCrCb2Rgb_Config::BaseAddress, XYCrCb2Rgb::Config, XYCC_ACTIVE_SIZE_OFFSET, XYCC_ACTSIZE_NUM_LINE_MASK, XYCC_ACTSIZE_NUM_LINE_SHIFT, XYCC_ACTSIZE_NUM_PIXEL_MASK, and XYCrCb2Rgb_ReadReg.

u32 XYCrCb2Rgb_GetBOffset | ( | XYCrCb2Rgb * | InstancePtr | ) |

This function gets offset compensation value from the Blue channel.

Parameters

  InstancePtr | is a pointer to the XYCrCb2Rgb instance.

Returns
  BOffset is a compensation value within the range [0, 255] from the Blue channel.

Note
  None.

References XYCrCb2Rgb_Config::BaseAddress, XYCrCb2Rgb::Config, XYCC_BOFFSET_OFFSET, and XYCrCb2Rgb_ReadReg.

void XYCrCb2Rgb_GetCoefs | ( | XYCrCb2Rgb * | InstancePtr,
|  | struct XYCrCb2Rgb_Coefficients * | Coef
| ) |  |

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

Parameters

  InstancePtr | is a pointer to the XYCrCb2Rgbb instance.
  Coef | specifies a pointer to XYCrCb2Rgb_Coefficients structure in which ACoef, BCoef, CCoef, DCoef members value will be updated within the range [0.0, 1.0].

Returns
  None.

Note
  Floating point coefficients are represented in 17-bit fixed point format where 17 bits indicates integer portion (Mantissa) of the number exclusive of sign bit.

References XYCrCb2Rgb_Coefficients::ACoef, XYCrCb2Rgb_Config::BaseAddress, XYCrCb2Rgb_Coefficients::BCoef, XYCrCb2Rgb_Coefficients::CCoef, XYCrCb2Rgb::Config, XYCrCb2Rgb_Coefficients::DCoef, XYCC_16_BIT_COEF_SHIFT, XYCC_ACOEF_OFFSET, XYCC_BCOEF_OFFSET, XYCC_CCOEF_OFFSET, XYCC_DCOEF_OFFSET, and XYCrCb2Rgb_ReadReg.

u32 XYCrCb2Rgb_GetDbgFrameCount | ( | XYCrCb2Rgb * | 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

  InstancePtr | is a pointer to the XYCrCb2Rgb instance.

Returns
  DbgFrameCount, number of frames processed since power-up.

Note
  Debug functionality should be enabled.

References XYCrCb2Rgb_Config::BaseAddress, XYCrCb2Rgb::Config, XYCrCb2Rgb_Config::HasDebug, XYCC_SYSDEBUG0_OFFSET, and XYCrCb2Rgb_ReadReg.

u32 XYCrCb2Rgb_GetDbgLineCount | ( | XYCrCb2Rgb * | 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

  InstancePtr | is a pointer to the XYCrCb2Rgb instance.

Returns
  DbgLineCount, number of lines processed since power-up.

Note
  Debug functionality should be enabled.

References XYCrCb2Rgb_Config::BaseAddress, XYCrCb2Rgb::Config, XYCrCb2Rgb_Config::HasDebug, XYCC_SYSDEBUG1_OFFSET, and XYCrCb2Rgb_ReadReg.

u32 XYCrCb2Rgb_GetDbgPixelCount | ( | XYCrCb2Rgb * | 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

  InstancePtr | is a pointer to the XYCrCb2Rgb instance.

Returns
  DbgPixelCount, number of pixels processed since power-up.

Note
  Debug functionality should be enabled.

References XYCrCb2Rgb_Config::BaseAddress, XYCrCb2Rgb::Config, XYCrCb2Rgb_Config::HasDebug, XYCC_SYSDEBUG2_OFFSET, and XYCrCb2Rgb_ReadReg.

u32 XYCrCb2Rgb_GetGOffset | ( | XYCrCb2Rgb * | InstancePtr | ) |

This function gets offset compensation value from the Green channel.

Parameters

  InstancePtr | is a pointer to the XYCrCb2Rgb instance.

Returns
  GOffset is a compensation value within the range [0, 255] from the Green channel.

Note
  None.

References XYCrCb2Rgb_Config::BaseAddress, XYCrCb2Rgb::Config, XYCC_GOFFSET_OFFSET, and XYCrCb2Rgb_ReadReg.

u32 XYCrCb2Rgb_GetRGBMax | ( | XYCrCb2Rgb * | InstancePtr | ) |

This function gets the maximum value on RGB channels of the output.

Parameters

  InstancePtr | is a pointer to the XYCrCb2Rgb instance.

Returns
  RGBMax is the maximum value within the range [0, 255] from RGB channels of the output.

Note
  Clipping functionality should be enabled.

References XYCrCb2Rgb_Config::BaseAddress, XYCrCb2Rgb::Config, XYCrCb2Rgb_Config::HasClip, XYCC_16_BIT_MASK, XYCC_RGBMAX_OFFSET, and XYCrCb2Rgb_ReadReg.

u32 XYCrCb2Rgb_GetRGBMin | ( | XYCrCb2Rgb * | InstancePtr | ) |

This function gets the minimum value on RGB channels of the output.

Parameters

  InstancePtr | is a pointer to the XYCrCb2Rgb instance.

Returns
  RGBMin is the minimum value within the range [0, 255] from RGB channels of the output.

Note
  Clamping functionality should be enabled.

References XYCrCb2Rgb_Config::BaseAddress, XYCrCb2Rgb::Config, XYCrCb2Rgb_Config::HasClamp, XYCC_16_BIT_MASK, XYCC_RGBMIN_OFFSET, and XYCrCb2Rgb_ReadReg.

u32 XYCrCb2Rgb_GetROffset | ( | XYCrCb2Rgb * | InstancePtr | ) |

This function gets offset compensation value from the Red channel.

Parameters

  InstancePtr | is a pointer to the XYCrCb2Rgb instance.

Returns
  ROffset is a compensation value within the range [0, 255] from the Red channel.

Note
  None.

References XYCrCb2Rgb_Config::BaseAddress, XYCrCb2Rgb::Config, XYCC_ROFFSET_OFFSET, and XYCrCb2Rgb_ReadReg.

u32 XYCrCb2Rgb_GetVersion | ( | XYCrCb2Rgb * | InstancePtr | ) |

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

Parameters

  InstancePtr | is a pointer to the XYCrCb2Rgb instance.

Returns
  Version, contents of a Version register.

Note
  None.

References XYCrCb2Rgb_Config::BaseAddress, XYCrCb2Rgb::Config, XYCC_VERSION_OFFSET, and XYCrCb2Rgb_ReadReg.

void XYCrCb2Rgb_IntrHandler | ( | void * | InstancePtr | ) |

This function is the interrupt handler for the YCRCB2RGB core.

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 XYCrCb2Rgb_SetCallBack() during initialization phase.

Parameters

  InstancePtr | is a pointer to the XYCrCb2Rgb instance that just interrupted.

Returns
  None.

Note
  Interrupt interface (HasIntcIf) should be enabled.

References XYCrCb2Rgb::Config, XYCrCb2Rgb::ErrCallBack, XYCrCb2Rgb::ErrRef, XYCrCb2Rgb::FrameDoneCallBack, XYCrCb2Rgb::FrameDoneRef, XYCrCb2Rgb_Config::HasIntcIf, XYCrCb2Rgb::IsReady, XYCrCb2Rgb::ProcStartCallBack, XYCrCb2Rgb::ProcStartRef, XYCC_IXR_EOF_MASK, XYCC_IXR_PROCS_MASK, XYCC_IXR_SE_MASK, XYCrCb2Rgb_IntrClear, and XYCrCb2Rgb_IntrGetPending.

int XYCrCb2Rgb_IsDbgByPassEnabled | ( | XYCrCb2Rgb * | InstancePtr | ) |

This function returns the current bypass mode of the core.

Parameters

  InstancePtr | is a pointer to the XYCrCb2Rgb instance.

Returns
  - TRUE if Bypass mode is enabled.
  - FALSE if Bypass mode is not enabled.

Note
  Debug functionality should be enabled.

References XYCrCb2Rgb_Config::BaseAddress, XYCrCb2Rgb::Config, XYCrCb2Rgb_Config::HasDebug, XYCC_CONTROL_OFFSET, XYCC_CTL_BPE_MASK, and XYCrCb2Rgb_ReadReg.

int XYCrCb2Rgb_IsDbgTestPatternEnabled | ( | XYCrCb2Rgb * | InstancePtr | ) |

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

Parameters

  InstancePtr | is a pointer to the XYCrCb2Rgb instance.

Returns
  - TRUE if Test-pattern mode is enabled.
  - FALSE if Test-pattern mode is not enabled.

Note
  Debug functionality should be enabled.

References XYCrCb2Rgb_Config::BaseAddress, XYCrCb2Rgb::Config, XYCrCb2Rgb_Config::HasDebug, XYCC_CONTROL_OFFSET, XYCC_CTL_TPE_MASK, and XYCrCb2Rgb_ReadReg.

XYCrCb2Rgb_Config * XYCrCb2Rgb_LookupConfig | ( | u16 | DeviceId | ) |

This function returns a reference to an XYCrCb2Rgb_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 xycrcb2rgb_g.c file.

Parameters

  DeviceId | is the unique core ID of the core for the lookup operation.

Returns
  XYCrCb2Rgb_LookupConfig returns a reference to a config record in the configuration table (in xycrcb2rgb_g.c) corresponding to DeviceId, or NULL if no match is found.

Note
  None.

Referenced by XYCrCb2RgbSelfTestExample(), and YCrCb2Rgb_Update_Example().

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.

Parameters

  InstancePtr | is a pointer to the XYCrCb2Rgb instance.
  Range | needs to be set from the enum XYcc_OutputRanges values as: 0 = XYCC_TV_16_TO_240, 1 = XYCC_STUDIO_16_TO_235, 2 = XYCC_GRAPHICS_0_TO_255.

Returns
  None.

Note
  None.

References XYCrCb2Rgb::OutputRange, XYCC_GRAPHICS_0_TO_255, XYCC_STUDIO_16_TO_235, and XYCC_TV_16_TO_240.

Referenced by YCrCb2Rgb_Update_Example().

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.

Parameters

  InstancePtr | is a pointer to the XYCrCb2Rgbb instance.
  StandardSel | needs to be set from enum XYcc_Standards value as : 0 = XYCC_STANDARD_ITU_601_SD 1 = XYCC_STANDARD_ITU_709_NTSC 2 = XYCC_STANDARD_ITU_709_PAL 3 = XYCC_STANDARD_YUV.
  InputRange | needs to be set from enum XYcc_OutputRanges value as: 0 = XYCC_TV_16_TO_240, 1 = XYCC_STUDIO_16_TO_235, 2 = XYCC_GRAPHICS_0_TO_255.
  DataWidth | specifies the valid range of [8,10,12,16] that needs to be set.
  CoefIn | specifies a pointer to a XYCrCb2Rgb_Coef_Inputs structure which is populated with the values from selected video standard.

Returns
  None.

Note
  Floating point coefficients are represented in 17-bit fixed point format where 17 bits indicates integer portion (Mantissa) of the number exclusive of sign bit.

References XYCrCb2Rgb_Coef_Inputs::ACoef, XYCrCb2Rgb_Coef_Inputs::BCoef, XYCrCb2Rgb_Coef_Inputs::CbOffset, XYCrCb2Rgb_Coef_Inputs::CCoef, XYCrCb2Rgb_Coef_Inputs::CrOffset, XYCrCb2Rgb_Coef_Inputs::DCoef, XYCrCb2Rgb_Coef_Inputs::RgbMax, XYCrCb2Rgb_Coef_Inputs::RgbMin, XYCC_DATA_WIDTH_10, XYCC_DATA_WIDTH_12, XYCC_DATA_WIDTH_16, XYCC_DATA_WIDTH_8, XYCC_GRAPHICS_0_TO_255, XYCC_STANDARD_CUSTOM, and XYCrCb2Rgb_Coef_Inputs::YOffset.

Referenced by YCrCb2Rgb_Update_Example().

int XYCrCb2Rgb_SelfTest | ( | XYCrCb2Rgb * | InstancePtr | ) |

This function reads Version register of YCRCB2RGB core and compares with zero as part of self test.

Parameters

  InstancePtr | is a pointer to the XCrCb2Rgb instance.

Returns
  - XST_SUCCESS if the Version register read test was successful.
  - XST_FAILURE if the Version register read test failed.

Note
  None.

References XYCrCb2Rgb_Config::BaseAddress, XYCrCb2Rgb::Config, XYCC_VERSION_OFFSET, and XYCrCb2Rgb_ReadReg.

Referenced by XYCrCb2RgbSelfTestExample().

void XYCrCb2Rgb_SetActiveSize | ( | XYCrCb2Rgb * | InstancePtr,
|  | u16 | HSize,
|  | u16 | VSize
| ) |  |

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

Parameters

  InstancePtr | is a pointer to the XYCrCb2Rgb instance.
  HSize | specifies the number of Active Pixels per scanline that needs to be set within the range [32, 8192].
  VSize | specifies the number of Active Lines per frame that needs to be set within the range [32, 8192].

Returns
  None.

Note
  None.

References XYCrCb2Rgb_Config::BaseAddress, XYCrCb2Rgb::Config, XYCC_ACT_SIZE_FIRST, XYCC_ACT_SIZE_LAST, XYCC_ACTIVE_SIZE_OFFSET, XYCC_ACTSIZE_NUM_LINE_SHIFT, and XYCrCb2Rgb_WriteReg.

Referenced by YCrCb2Rgb_Update_Example().

void XYCrCb2Rgb_SetBOffset | ( | XYCrCb2Rgb * | InstancePtr,
|  | u32 | BOffset
| ) |  |

This function sets offset compensation value on the Blue channel.

Parameters

  InstancePtr | is a pointer to the XYCrCb2Rgb instance.
  BOffset | is a compensation value within the range [0, 255] to be set on the Blue channel.

Returns
  None.

Note
  None.

References XYCrCb2Rgb_Config::BaseAddress, XYCrCb2Rgb::Config, XYCC_BOFFSET_OFFSET, XYCC_RGBOFFSET_LAST, and XYCrCb2Rgb_WriteReg.

Referenced by YCrCb2Rgb_Update_Example().

int XYCrCb2Rgb_SetCallBack | ( | XYCrCb2Rgb * | InstancePtr,
|  | u32 | HandlerType,
|  | void * | CallBackFunc,
|  | void * | CallBackRef
| ) |  |

This routine installs an asynchronous callback function for the given HandlerTypes.

    HandlerType              Callback Function Type
    -----------------------  ---------------------------
    XYCC_HANDLER_PROCSTART   ProcStartCallBack.
    XYCC_HANDLER_FRAMEDONE   FrameDoneCallBack.
    XYCC_HANDLER_ERROR       ErrCallBack.

Parameters

  InstancePtr | is a pointer to the XYCrCb2Rgb instance to be worked on.
  HandlerType | specifies which callback is to be attached.
  CallBackFunc | is the address of the callback function.
  CallBackRef | is 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 XYCrCb2Rgb::ErrCallBack, XYCrCb2Rgb::ErrRef, XYCrCb2Rgb::FrameDoneCallBack, XYCrCb2Rgb::FrameDoneRef, XYCrCb2Rgb::IsReady, XYCrCb2Rgb::ProcStartCallBack, XYCrCb2Rgb::ProcStartRef, XYCC_HANDLER_ERROR, XYCC_HANDLER_FRAMEDONE, and XYCC_HANDLER_PROCSTART.

void XYCrCb2Rgb_SetCoefs | ( | XYCrCb2Rgb * | InstancePtr,
|  | struct XYCrCb2Rgb_Coefficients * | Coef
| ) |  |

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

Parameters

  InstancePtr | is a pointer to the XYCrCb2Rgb instance.
  Coef | specifies a pointer to XYCrCb2Rgb_Coefficients structure in which ACoef, BCoef, CCoef, DCoef members value within the range [0.0, 1.0] that needs to be set.

Returns
  None.

Note
  Floating point coefficients are represented in 17-bit fixed point format where 17 bits indicates integer portion (Mantissa) of the number exclusive of sign bit.

References XYCrCb2Rgb_Coefficients::ACoef, XYCrCb2Rgb_Config::BaseAddress, XYCrCb2Rgb_Coefficients::BCoef, XYCrCb2Rgb_Coefficients::CCoef, XYCrCb2Rgb::Config, XYCrCb2Rgb_Coefficients::DCoef, XYCC_16_BIT_COEF_SHIFT, XYCC_ACOEF_OFFSET, XYCC_BCOEF_OFFSET, XYCC_CCOEF_OFFSET, XYCC_DCOEF_OFFSET, and XYCrCb2Rgb_WriteReg.

Referenced by YCrCb2Rgb_Update_Example().

void XYCrCb2Rgb_SetGOffset | ( | XYCrCb2Rgb * | InstancePtr,
|  | u32 | GOffset
| ) |  |

This function sets offset compensation value on the Green channel.

Parameters

  InstancePtr | is a pointer to the XYCrCb2Rgb instance.
  GOffset | is a compensation value within the range [0, 255] to be set on the Green channel.

Returns
  None.

Note
  None.

References XYCrCb2Rgb_Config::BaseAddress, XYCrCb2Rgb::Config, XYCC_GOFFSET_OFFSET, XYCC_RGBOFFSET_LAST, and XYCrCb2Rgb_WriteReg.

Referenced by YCrCb2Rgb_Update_Example().

void XYCrCb2Rgb_SetRGBMax | ( | XYCrCb2Rgb * | InstancePtr,
|  | u32 | RGBMax
| ) |  |

This function sets the RGB maximum value on YCrCb2Rgb channels of the output.

Parameters

  InstancePtr | is a pointer to the XYCrCb2Rgb instance.
  RGBMax | is the maximum value within the range [0, 255] on the RGB channels of the output.

Returns
  None.

Note
  Clipping functionality should be enabled.

References XYCrCb2Rgb_Config::BaseAddress, XYCrCb2Rgb::Config, XYCrCb2Rgb_Config::HasClip, XYCC_RGBMAX_MIN_LAST, XYCC_RGBMAX_OFFSET, and XYCrCb2Rgb_WriteReg.

Referenced by YCrCb2Rgb_Update_Example().

void XYCrCb2Rgb_SetRGBMin | ( | XYCrCb2Rgb * | InstancePtr,
|  | u32 | RGBMin
| ) |  |

This function sets minimum value on RGB channels of the output.

Parameters

  InstancePtr | is a pointer to the XYCrCb2Rgb instance.
  RGBMin | is the minimum value within the range [0, 255] on RGB channels of the output.

Returns
  None.

Note
  Clamping functionality should be enabled.

References XYCrCb2Rgb_Config::BaseAddress, XYCrCb2Rgb::Config, XYCrCb2Rgb_Config::HasClamp, XYCC_RGBMAX_MIN_LAST, XYCC_RGBMIN_OFFSET, and XYCrCb2Rgb_WriteReg.

Referenced by YCrCb2Rgb_Update_Example().

void XYCrCb2Rgb_SetROffset | ( | XYCrCb2Rgb * | InstancePtr,
|  | u32 | ROffset
| ) |  |

This function sets offset compensation value on the Red channel.

Parameters

  InstancePtr | is a pointer to the XYCrCb2Rgb instance.
  ROffset | is compensation value within the range [0, 255] to be set on the Red channel.

Returns
  None.

Note
  None.

References XYCrCb2Rgb_Config::BaseAddress, XYCrCb2Rgb::Config, XYCC_RGBOFFSET_LAST, XYCC_ROFFSET_OFFSET, and XYCrCb2Rgb_WriteReg.

Referenced by YCrCb2Rgb_Update_Example().

void XYCrCb2Rgb_Setup | ( | XYCrCb2Rgb * | InstancePtr | ) |

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

Parameters

  InstancePtr | is a pointer to the XYCrCb2Rgb instance.

Returns
  None.

Note
  None.

References XYCrCb2Rgb_Config::BaseAddress, XYCrCb2Rgb::Config, XYCrCb2Rgb::HSize, XYCrCb2Rgb::VSize, XYCC_ACTIVE_SIZE_OFFSET, XYCC_ACTSIZE_NUM_LINE_SHIFT, XYCC_ACTSIZE_NUM_PIXEL_MASK, XYCrCb2Rgb_RegUpdateDisable, XYCrCb2Rgb_RegUpdateEnable, and XYCrCb2Rgb_WriteReg.