deinterlacer
Xilinx SDK Drivers API Documentation
Deinterlacer_v3_2

Data Structures

struct  XDeint_Config
 Deinterlacer core configuration structure. More...
 
struct  XDeint
 The XDeint driver instance data. More...
 

Macros

#define XDEINT_H
 Prevent circular inclusions by using protection macros. More...
 
#define XDeint_Enable(InstancePtr)
 This macro enables the Deinterlacer algorithms. More...
 
#define XDeint_Disable(InstancePtr)
 This macro disables the Deinterlacer algorithms. More...
 
#define XDeint_Start(InstancePtr)
 This macro enables the Deinterlacer core to accept video. More...
 
#define XDeint_Stop(InstancePtr)
 This macro halts the Deinterlacer core on the next frame boundary. More...
 
#define XDeint_Reset(InstancePtr)
 This macro soft resets the Deinterlacer to its default mode. More...
 
#define XDeint_InReset(InstancePtr)
 This macro returns the current soft-reset state. More...
 
#define XDeint_RegUpdateReq(InstancePtr)
 This macro tells the Deinterlacer core to pick up all the register value changes made so far by the software at the next frame boundary. More...
 
#define XDeint_IntrEnable(InstancePtr, IntrType)
 This macro enables the given individual interrupt(s) on the Deinterlacer core. More...
 
#define XDeint_IntrDisable(InstancePtr, IntrType)
 This macro disables the given individual interrupt(s) on the Deinterlacer core. More...
 
#define XDeint_IntrGetPending(InstancePtr)
 This macro returns the pending interrupts of the Deinterlacer core. More...
 
#define XDeint_IntrClear(InstancePtr, IntrType)
 This macro clears/acknowledges pending interrupts of the Deinterlacer core. More...
 
#define XDeint_SetRGB(InstancePtr)
 This macro sets the Deinterlacer's color space to RGB. More...
 
#define XDeint_SetYUV(InstancePtr)
 This macro sets the Deinterlacer's color space to YUV. More...
 
#define XDeint_SetAlgorithm(InstancePtr, Alg)
 This macro sets the Deinterlacer's processing algorithm. More...
 
#define XDeint_GetColorSpace(InstancePtr)
 This macro gets the Deinterlacer's color space. More...
 
#define XDeint_GetAlgorithm(InstancePtr)
 This macro gets the Deinterlacer's processing algorithm. More...
 
#define XDEINT_HW_H
 Prevent circular inclusions by using protection macros. More...
 
#define XDEINT_RESET_RESET_MASK   0x00000001
 Software Reset. More...
 
#define XDEINT_FADE_RATIO   1048576
 Fade ratio. More...
 
#define XDEINT_I_H
 Prevent circular inclusions by using protection macros. More...
 

Typedefs

typedef void(* XDeint_CallBack )(u32 status)
 Callback type for all interrupts. More...
 

Functions

int XDeint_ConfigInitialize (XDeint *InstancePtr, XDeint_Config *CfgPtr, u32 EffectiveAddr)
 This function initializes the Deinterlacer core. More...
 
void XDeint_SetFramestore (XDeint *InstancePtr, u32 FieldAddr1, u32 FieldAddr2, u32 FieldAddr3, u32 FrameSize)
 This function sets the input field buffer addresses of the Deinterlacer core. More...
 
void XDeint_SetVideo (XDeint *InstancePtr, u32 Packing, u32 Color, u32 Order, u32 PSF)
 This function sets the video format of the Deinterlacer core. More...
 
void XDeint_SetThresholds (XDeint *InstancePtr, u32 ThresholdT1, u32 ThresholdT2)
 This function sets the threshold used by the motion adaptive kernel of the Deinterlacer core. More...
 
void XDeint_SetPulldown (XDeint *InstancePtr, u32 Enable_32, u32 Enable_22)
 This function sets the pull down controller of the Deinterlacer core. More...
 
u32 XDeint_GetVersion (XDeint *InstancePtr)
 This function returns the contents of Version register. More...
 
void XDeint_SetSize (XDeint *InstancePtr, u32 Width, u32 Height)
 This function sets the input frame size of the Deinterlacer core. More...
 
void XDeint_GetVideo (XDeint *InstancePtr, u32 *Packing, u32 *Color, u32 *Order, u32 *PSF)
 This function gets the video format of the Deinterlacer core. More...
 
void XDeint_GetPulldown (XDeint *InstancePtr, u32 *Enable_32, u32 *Enable_22)
 This function gets the pull down controller of the Deinterlacer core. More...
 
void XDeint_GetSize (XDeint *InstancePtr, u32 *Width, u32 *Height)
 This function gets the input frame size of the Deinterlacer core. More...
 
void XDeint_GetThresholds (XDeint *InstancePtr, u32 *ThresholdT1, u32 *ThresholdT2)
 This function gets the threshold used by the motion adaptive kernel. More...
 
void XDeint_GetFramestore (XDeint *InstancePtr, u32 *FieldAddr1, u32 *FieldAddr2, u32 *FieldAddr3, u32 *FrameSize)
 This function gets input field buffer addresses of an Deinterlacer core. More...
 
XDeint_ConfigXDeint_LookupConfig (u16 DeviceId)
 This function returns a reference to an XDeint_Config structure based on the unique device id, DeviceId. More...
 
void XDeint_IntrHandler (void *InstancePtr)
 This function is the interrupt handler for the Deinterlacer core. More...
 
int XDeint_SetCallBack (XDeint *InstancePtr, void *CallBackFunc)
 This routine installs an asynchronous callback function. More...
 
int XDeint_Selftest (XDeint *InstancePtr)
 This function reads Version register of Deinterlacer core and compares with zero as part of self test. More...
 

Variables

XDeint_Config XDeint_ConfigTable []
 The configuration table for Video Deinterlacers devices. More...
 

Interrupt types for setting up callbacks

#define XDEINT_HANDLER
 Internal Register update done. More...
 

Register Offsets:

#define XDEINT_CONTROL_OFFSET   0x000
 Deinterlacer Main Control. More...
 
#define XDEINT_MODE_OFFSET   0x004
 Deinterlacer internal Modes. More...
 
#define XDEINT_IER_OFFSET   0x008
 Interrupt Enable Control. More...
 
#define XDEINT_ISR_OFFSET   0x00C
 Interrupt Enable Status. More...
 
#define XDEINT_HEIGHT_OFFSET   0x010
 Height. More...
 
#define XDEINT_WIDTH_OFFSET   0x014
 Width. More...
 
#define XDEINT_THRESH1_OFFSET   0x018
 T1 Threshold. More...
 
#define XDEINT_THRESH2_OFFSET   0x01C
 T2 Threshold. More...
 
#define XDEINT_XFADE_OFFSET   0x020
 Cross Fade Ration. More...
 
#define XDEINT_BUFFER0_OFFSET   0x024
 VFBC Field Buffer 0 Base. More...
 
#define XDEINT_BUFFER1_OFFSET   0x028
 VFBC Field Buffer 1 Base. More...
 
#define XDEINT_BUFFER2_OFFSET   0x02C
 VFBC Field Buffer 2 Base. More...
 
#define XDEINT_BUFSIZE_OFFSET   0x030
 VFBC Field Buffer Page size in 32bit Words. More...
 
#define XDEINT_VER_OFFSET   0x0F0
 Hardware Version ID. More...
 
#define XDEINT_RESET_OFFSET   0x100
 Soft Reset. More...
 

Interrupt Status/Enable Register bit definitions:

#define XDEINT_IXR_UPDATE_MASK   0x00000001
 Internal Register update done. More...
 
#define XDEINT_IXR_LOCKED_MASK   0x00000002
 Deinterlacer is locked to incoming video. More...
 
#define XDEINT_IXR_UNLOCKED_MASK   0x00000004
 Deinterlacer has lost lock to incoming video. More...
 
#define XDEINT_IXR_ERROR_MASK   0x00000008
 Deinterlacer internal FIFO error. More...
 
#define XDEINT_IXR_PULL_ON_MASK   0x00000010
 Pull down activated. More...
 
#define XDEINT_IXR_PULL_OFF_MASK   0x00000020
 Pull down cancelled. More...
 
#define XDEINT_IXR_FRAME_MASK   0x00000040
 Frame Tick. More...
 
#define XDEINT_IXR_FS_CFG_ERROR_MASK   0x00000100
 Frame store Write setup error. More...
 
#define XDEINT_IXR_FS_WR_ERROR_MASK   0x00000200
 Frame store Write FIFO overflow. More...
 
#define XDEINT_IXR_FS_RD_FIELD_ERROR_MASK   0x00000400
 Frame store Read Field under run. More...
 
#define XDEINT_IXR_FS_RD_FRAME_ERROR_MASK   0x00000800
 Frame store Read Frame under run. More...
 
#define XDEINT_IXR_ALLINTR_MASK
 Mask for all interrupts. More...
 

Error Status/ bit definitions:

#define XDEINT_STS_ERROR   0x00000008
 Deinterlacer internal FIFO error. More...
 
#define XDEINT_STS_FS_CFG_ERROR   0x00000100
 Frame store Write setup error. More...
 
#define XDEINT_STS_FS_WR_ERROR   0x00000200
 Frame store Write FIFO overflow. More...
 
#define XDEINT_STS_FS_RD_FIELD_ERROR   0x00000400
 Frame store Read Field under run. More...
 
#define XDEINT_STS_FS_RD_FRAME_ERROR   0x00000800
 Frame store Read Frame under run. More...
 

Deinterlacer Control Fields:

#define XDEINT_VER_MAJOR_MASK   0xFF000000
 Major Version. More...
 
#define XDEINT_VER_MAJOR_SHIFT   24
 Major Bit Shift. More...
 
#define XDEINT_VER_MINOR_MASK   0x00F00000
 Minor Version. More...
 
#define XDEINT_VER_MINOR_SHIFT   20
 Minor Bit Shift. More...
 
#define XDEINT_VER_REV_MASK   0x000F0000
 Revision Version. More...
 
#define XDEINT_VER_REV_SHIFT   16
 Revision Bit Shift. More...
 
#define XDEINT_CTL_UPDATE_REQ   0x00000001
 Queue a register update request. More...
 
#define XDEINT_CTL_ENABLE   0x00000002
 Enable/Disable Deinterlacer algorithms. More...
 
#define XDEINT_CTL_ACCEPT_VIDEO   0x00000004
 Accept Video into the Deinterlacer. More...
 

Deinterlacer Mode Fields:

#define XDEINT_MODE_ALGORITHM_0   0x00000001
 Deinterlacer algorithm. More...
 
#define XDEINT_MODE_ALGORITHM_1   0x00000002
 Deinterlacer algorithm. More...
 
#define XDEINT_MODE_COL   0x00000004
 Color Space. More...
 
#define XDEINT_MODE_PACKING_0   0x00000008
 XSVI Packing. More...
 
#define XDEINT_MODE_PACKING_1   0x00000010
 XSVI Packing. More...
 
#define XDEINT_MODE_FIELD_ORDER   0x00000020
 First field order. More...
 
#define XDEINT_MODE_PSF_ENABLE   0x00000040
 PSF pass through enable. More...
 
#define XDEINT_MODE_PULL_32_ENABLE   0x00000080
 Pull down 3:2 control enable. More...
 
#define XDEINT_MODE_PULL_22_ENABLE   0x00000100
 Pull down 2:2 control enable. More...
 
#define XDEINT_MODE_PULL_22_FIELDP   0x00000200
 Pull down 2:2 Field Precedence. More...
 
#define XDEINT_MODE_COLOUR_YUV   0x00000000
 Deinterlacer color space. More...
 
#define XDEINT_MODE_COLOUR_RGB   0x00000004
 Deinterlacer color space. More...
 
#define XDEINT_MODE_ALGORITHM_RAW   0x00000000
 Deinterlacer algorithm option 0. More...
 
#define XDEINT_MODE_ALGORITHM_DIAG   0x00000001
 Deinterlacer algorithm option 1. More...
 
#define XDEINT_MODE_ALGORITHM_MOTION   0x00000002
 Deinterlacer algorithm option 2. More...
 
#define XDEINT_MODE_ALGORITHM_FULL   0x00000003
 Deinterlacer algorithm option 3. More...
 
#define XDEINT_MODE_PACKING_420   0x00000000
 XSVI Packing mode 420. More...
 
#define XDEINT_MODE_PACKING_422   0x00000008
 XSVI Packing mode 422. More...
 
#define XDEINT_MODE_PACKING_444   0x00000010
 XSVI Packing mode 444. More...
 
#define XDEINT_MODE_FIELD_EVEN_FIRST   0x00000020
 First field of frame contains even video lines. More...
 
#define XDEINT_MODE_FIELD_ODD_FIRST   0x00000000
 First field of frame contains odd video lines. More...
 
#define XDEINT_MODE_ALGORITHM_MASK   0x00000003
 Deinterlacer algorithm. More...
 
#define XDEINT_MODE_COL_MASK   0x00000004
 Color Space. More...
 
#define XDEINT_MODE_PACKING_MASK   0x00000018
 XSVI Packing. More...
 
#define XDEINT_MODE_FIELD_ORDER_MASK   0x00000020
 First field order. More...
 
#define XDEINT_MODE_PSF_ENABLE_MASK   0x00000040
 PSF pass through enable. More...
 
#define XDEINT_MODE_PULL_ENABLE_MASK   0x00000180
 Pull down control enable. More...
 

Deinterlacer height bit definitions:

#define XDEINT_HEIGHT_MASK   0x000007FF
 Deinterlacer height. More...
 

Deinterlacer width bit definitions:

#define XDEINT_WIDTH_MASK   0x000007FF
 Deinterlacer width. More...
 

Deinterlacer Threshold T1 /T2 bit definitions:

#define XDEINT_THRESHOLD_MASK   0x000003FF
 Deinterlacer threshold. More...
 

Deinterlacer cross fade cycle bit definitions:

#define XDEINT_XFADE_MASK   0x0000FFFF
 Deinterlacer Cross fade cycle. More...
 

Deinterlacer Buffer cycle bit definitions:

#define XDEINT_BUF_SIZE_MASK   0x00FFFFFF
 Deinterlacer Buffer size mask. More...
 

Backward compatibility macros

#define XDEINT_CONTROL   XDEINT_CONTROL_OFFSET
 
#define XDEINT_MODE   XDEINT_MODE_OFFSET
 
#define XDEINT_IER   XDEINT_IER_OFFSET
 
#define XDEINT_ISR   XDEINT_ISR_OFFSET
 
#define XDEINT_HEIGHT   XDEINT_HEIGHT_OFFSET
 
#define XDEINT_WIDTH   XDEINT_WIDTH_OFFSET
 
#define XDEINT_T1   XDEINT_THRESH1_OFFSET
 
#define XDEINT_T2   XDEINT_THRESH2_OFFSET
 
#define XDEINT_XFADE   XDEINT_XFADE_OFFSET
 
#define XDEINT_FS_BASE0   XDEINT_BUFFER0_OFFSET
 
#define XDEINT_FS_BASE1   XDEINT_BUFFER1_OFFSET
 
#define XDEINT_FS_BASE2   XDEINT_BUFFER2_OFFSET
 
#define XDEINT_FS_WORDS   XDEINT_BUFSIZE_OFFSET
 
#define XDEINT_VER   XDEINT_VER_OFFSET
 
#define XDEINT_RESET   XDEINT_RESET_OFFSET
 

Core register I/O APIs:

#define XDeint_In32   Xil_In32
 
#define XDeint_Out32   Xil_Out32
 
#define XDeint_ReadReg(BaseAddress, RegOffset)   XDeint_In32((BaseAddress) + (u32)(RegOffset))
 This macro reads the given register. More...
 
#define XDeint_WriteReg(BaseAddress, RegOffset, Data)   XDeint_Out32((BaseAddress) + (u32)(RegOffset), (Data))
 This macro writes the given register. More...
 

Macro Definition Documentation

#define XDEINT_BUF_SIZE_MASK   0x00FFFFFF

Deinterlacer Buffer size mask.

#define XDEINT_BUFFER0_OFFSET   0x024

VFBC Field Buffer 0 Base.

Referenced by XDeint_GetFramestore(), and XDeint_SetFramestore().

#define XDEINT_BUFFER1_OFFSET   0x028

VFBC Field Buffer 1 Base.

Referenced by XDeint_GetFramestore(), and XDeint_SetFramestore().

#define XDEINT_BUFFER2_OFFSET   0x02C

VFBC Field Buffer 2 Base.

Referenced by XDeint_GetFramestore(), and XDeint_SetFramestore().

#define XDEINT_BUFSIZE_OFFSET   0x030

VFBC Field Buffer Page size in 32bit Words.

Referenced by XDeint_GetFramestore(), and XDeint_SetFramestore().

#define XDEINT_CONTROL_OFFSET   0x000

Deinterlacer Main Control.

#define XDEINT_CTL_ACCEPT_VIDEO   0x00000004

Accept Video into the Deinterlacer.

#define XDEINT_CTL_ENABLE   0x00000002

Enable/Disable Deinterlacer algorithms.

#define XDEINT_CTL_UPDATE_REQ   0x00000001

Queue a register update request.

#define XDeint_Disable (   InstancePtr)
Value:
XDeint_WriteReg((InstancePtr)->Config.BaseAddress, \
XDeint_ReadReg((InstancePtr)->Config.BaseAddress, \
#define XDEINT_CTL_ENABLE
Enable/Disable Deinterlacer algorithms.
Definition: xdeint_hw.h:209
#define XDEINT_CONTROL_OFFSET
Deinterlacer Main Control.
Definition: xdeint_hw.h:75
#define XDeint_ReadReg(BaseAddress, RegOffset)
This macro reads the given register.
Definition: xdeint_hw.h:392
#define XDeint_WriteReg(BaseAddress, RegOffset, Data)
This macro writes the given register.
Definition: xdeint_hw.h:410

This macro disables the Deinterlacer algorithms.

Parameters
InstancePtris a pointer to XDeint instance to be worked on.
Returns
None.
Note
C-style signature: void XDeint_Disable(XDeint *InstancePtr)

Referenced by XDeint_ConfigInitialize().

#define XDeint_Enable (   InstancePtr)
Value:
XDeint_WriteReg((InstancePtr)->Config.BaseAddress, \
XDeint_ReadReg((InstancePtr)->Config.BaseAddress, \
#define XDEINT_CTL_ENABLE
Enable/Disable Deinterlacer algorithms.
Definition: xdeint_hw.h:209
#define XDEINT_CONTROL_OFFSET
Deinterlacer Main Control.
Definition: xdeint_hw.h:75
#define XDeint_ReadReg(BaseAddress, RegOffset)
This macro reads the given register.
Definition: xdeint_hw.h:392
#define XDeint_WriteReg(BaseAddress, RegOffset, Data)
This macro writes the given register.
Definition: xdeint_hw.h:410

This macro enables the Deinterlacer algorithms.

Parameters
InstancePtris a pointer to XDeint instance to be worked on.
Returns
None.
Note
C-style signature: void XDeint_Enable(XDeint *InstancePtr)
#define XDEINT_FADE_RATIO   1048576

Fade ratio.

Referenced by XDeint_SetThresholds().

#define XDeint_GetAlgorithm (   InstancePtr)
Value:
XDeint_ReadReg((InstancePtr)->Config.BaseAddress, \
#define XDEINT_MODE_ALGORITHM_FULL
Deinterlacer algorithm option 3.
Definition: xdeint_hw.h:267
#define XDeint_ReadReg(BaseAddress, RegOffset)
This macro reads the given register.
Definition: xdeint_hw.h:392
#define XDEINT_MODE_OFFSET
Deinterlacer internal Modes.
Definition: xdeint_hw.h:78

This macro gets the Deinterlacer's processing algorithm.

Parameters
InstancePtris a pointer to XDeint instance to be worked on.
Returns
Returns algorithm for deinterlacing method.
  • 0x00000000 = Pure field interpolating technique is used.
  • 0x00000001 = Diagonal engine is used.
  • 0x00000002 = Motion adaptive engine is used.
  • 0x00000003 = Motion and Diagonal engines are used.
Note
C-style signature: u32 XDeint_GetAlgorithm(XDeint *InstancePtr)
#define XDeint_GetColorSpace (   InstancePtr)
Value:
XDeint_ReadReg((InstancePtr)->Config.BaseAddress, \
#define XDEINT_MODE_COL
Color Space.
Definition: xdeint_hw.h:226
#define XDeint_ReadReg(BaseAddress, RegOffset)
This macro reads the given register.
Definition: xdeint_hw.h:392
#define XDEINT_MODE_OFFSET
Deinterlacer internal Modes.
Definition: xdeint_hw.h:78

This macro gets the Deinterlacer's color space.

Parameters
InstancePtris a pointer to XDeint instance to be worked on.
Returns
Returns the color space. 0x00000004 - RGB color space, 0x00000000 - YUV color space.
Note
C-style signature: u32 XDeint_GetColorSpace(XDeint *InstancePtr)
#define XDEINT_H

Prevent circular inclusions by using protection macros.

#define XDEINT_HANDLER

Internal Register update done.

#define XDEINT_HEIGHT_MASK   0x000007FF

Deinterlacer height.

Referenced by XDeint_GetSize().

#define XDEINT_HEIGHT_OFFSET   0x010

Height.

Referenced by XDeint_GetSize(), and XDeint_SetSize().

#define XDEINT_HW_H

Prevent circular inclusions by using protection macros.

#define XDEINT_I_H

Prevent circular inclusions by using protection macros.

#define XDEINT_IER_OFFSET   0x008

Interrupt Enable Control.

#define XDeint_InReset (   InstancePtr)
Value:
(XDeint_ReadReg((InstancePtr)->Config.BaseAddress, \
#define XDeint_ReadReg(BaseAddress, RegOffset)
This macro reads the given register.
Definition: xdeint_hw.h:392
#define XDEINT_RESET_RESET_MASK
Software Reset.
Definition: xdeint_hw.h:186
#define XDEINT_RESET_OFFSET
Soft Reset.
Definition: xdeint_hw.h:103

This macro returns the current soft-reset state.

Parameters
InstancePtris a pointer to XDeint instance to be worked on.
Returns
1=In Reset, 0=Ready.
Note
C-style signature: u32 XDeint_InReset(XDeint *InstancePtr)

Referenced by XDeint_ConfigInitialize().

#define XDeint_IntrClear (   InstancePtr,
  IntrType 
)
Value:
XDeint_WriteReg((InstancePtr)->Config.BaseAddress, \
(XDEINT_ISR_OFFSET), (IntrType) & \
(XDeint_IntrGetPending(InstancePtr)))
#define XDEINT_ISR_OFFSET
Interrupt Enable Status.
Definition: xdeint_hw.h:84
#define XDeint_WriteReg(BaseAddress, RegOffset, Data)
This macro writes the given register.
Definition: xdeint_hw.h:410
#define XDeint_IntrGetPending(InstancePtr)
This macro returns the pending interrupts of the Deinterlacer core.
Definition: xdeint.h:367

This macro clears/acknowledges pending interrupts of the Deinterlacer core.

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

Referenced by XDeint_IntrHandler().

#define XDeint_IntrDisable (   InstancePtr,
  IntrType 
)
Value:
XDeint_WriteReg((InstancePtr)->Config.BaseAddress, \
(XDEINT_IER_OFFSET), ((~(IntrType)) & \
XDeint_ReadReg((InstancePtr)->Config.BaseAddress, (XDEINT_IER_OFFSET)))
#define XDEINT_IXR_ALLINTR_MASK
Mask for all interrupts.
Definition: xdeint_hw.h:149
#define XDeint_ReadReg(BaseAddress, RegOffset)
This macro reads the given register.
Definition: xdeint_hw.h:392
#define XDeint_WriteReg(BaseAddress, RegOffset, Data)
This macro writes the given register.
Definition: xdeint_hw.h:410
#define XDEINT_IER_OFFSET
Interrupt Enable Control.
Definition: xdeint_hw.h:81

This macro disables the given individual interrupt(s) on the Deinterlacer core.

Parameters
InstancePtris a pointer to XDeint instance to be worked on.
IntrTypeis the bit-mask of the interrupts to be enabled. Bit positions of 1 will be disabled. Bit post ions of 0 will keep the previous setting.This mask is formed by OR'ing XDEINT_IXR_*_MASK constants defined in xdeint_hw.h to create this parameter value.
Returns
None.
Note
Any other interrupt not covered by parameter IntrType, if enabled before this macro is called, will remain enabled.

C-style signature: void XDeint_IntrDisable(XDeint *InstancePtr, u32 IntrType)

#define XDeint_IntrEnable (   InstancePtr,
  IntrType 
)
Value:
XDeint_WriteReg((InstancePtr)->Config.BaseAddress, \
(XDEINT_IER_OFFSET), ((IntrType) & \
XDeint_ReadReg((InstancePtr)->Config.BaseAddress, (XDEINT_IER_OFFSET)))
#define XDEINT_IXR_ALLINTR_MASK
Mask for all interrupts.
Definition: xdeint_hw.h:149
#define XDeint_ReadReg(BaseAddress, RegOffset)
This macro reads the given register.
Definition: xdeint_hw.h:392
#define XDeint_WriteReg(BaseAddress, RegOffset, Data)
This macro writes the given register.
Definition: xdeint_hw.h:410
#define XDEINT_IER_OFFSET
Interrupt Enable Control.
Definition: xdeint_hw.h:81

This macro enables the given individual interrupt(s) on the Deinterlacer core.

Parameters
InstancePtris a pointer to XDeint instance to be worked on.
IntrTypeis the bit-mask of the interrupts to be enabled. Bit positions of 1 will be enabled. Bit post ions of 0 will keep the previous setting.This mask is formed by OR'ing XDEINT_IXR_*_MASK constants defined in xdeint_hw.h to create this parameter value.
Returns
None.
Note
The existing enabled interrupt(s) will remain enabled.
    C-style signature:
    void XDeint_IntrEnable(XDeint *InstancePtr, u32 IntrType)
#define XDeint_IntrGetPending (   InstancePtr)
Value:
XDeint_ReadReg((InstancePtr)->Config.BaseAddress, \
(XDeint_ReadReg((InstancePtr)->Config.BaseAddress, \
#define XDEINT_ISR_OFFSET
Interrupt Enable Status.
Definition: xdeint_hw.h:84
#define XDEINT_IXR_ALLINTR_MASK
Mask for all interrupts.
Definition: xdeint_hw.h:149
#define XDeint_ReadReg(BaseAddress, RegOffset)
This macro reads the given register.
Definition: xdeint_hw.h:392
#define XDEINT_IER_OFFSET
Interrupt Enable Control.
Definition: xdeint_hw.h:81

This macro returns the pending interrupts of the Deinterlacer core.

Parameters
InstancePtris a pointer to XDeint instance to be worked on.
Returns
The pending interrupts of the Deinterlacer core. Use XDEINT_IXR_*_MASK constants defined in xdeint_hw.h to interpret this value.
Note
C-style signature: u32 XDeint_IntrGetPending(XDeint *InstancePtr)

Referenced by XDeint_IntrHandler().

#define XDEINT_ISR_OFFSET   0x00C

Interrupt Enable Status.

#define XDEINT_IXR_ALLINTR_MASK
Value:
#define XDEINT_IXR_FS_CFG_ERROR_MASK
Frame store Write setup error.
Definition: xdeint_hw.h:136
#define XDEINT_IXR_UNLOCKED_MASK
Deinterlacer has lost lock to incoming video.
Definition: xdeint_hw.h:117
#define XDEINT_IXR_PULL_OFF_MASK
Pull down cancelled.
Definition: xdeint_hw.h:132
#define XDEINT_IXR_PULL_ON_MASK
Pull down activated.
Definition: xdeint_hw.h:129
#define XDEINT_IXR_UPDATE_MASK
Internal Register update done.
Definition: xdeint_hw.h:109
#define XDEINT_IXR_FS_RD_FRAME_ERROR_MASK
Frame store Read Frame under run.
Definition: xdeint_hw.h:145
#define XDEINT_IXR_FS_RD_FIELD_ERROR_MASK
Frame store Read Field under run.
Definition: xdeint_hw.h:142
#define XDEINT_IXR_FRAME_MASK
Frame Tick.
Definition: xdeint_hw.h:135
#define XDEINT_IXR_ERROR_MASK
Deinterlacer internal FIFO error.
Definition: xdeint_hw.h:124
#define XDEINT_IXR_LOCKED_MASK
Deinterlacer is locked to incoming video.
Definition: xdeint_hw.h:112
#define XDEINT_IXR_FS_WR_ERROR_MASK
Frame store Write FIFO overflow.
Definition: xdeint_hw.h:139

Mask for all interrupts.

#define XDEINT_IXR_ERROR_MASK   0x00000008

Deinterlacer internal FIFO error.

#define XDEINT_IXR_FRAME_MASK   0x00000040

Frame Tick.

#define XDEINT_IXR_FS_CFG_ERROR_MASK   0x00000100

Frame store Write setup error.

#define XDEINT_IXR_FS_RD_FIELD_ERROR_MASK   0x00000400

Frame store Read Field under run.

#define XDEINT_IXR_FS_RD_FRAME_ERROR_MASK   0x00000800

Frame store Read Frame under run.

#define XDEINT_IXR_FS_WR_ERROR_MASK   0x00000200

Frame store Write FIFO overflow.

#define XDEINT_IXR_LOCKED_MASK   0x00000002

Deinterlacer is locked to incoming video.

#define XDEINT_IXR_PULL_OFF_MASK   0x00000020

Pull down cancelled.

#define XDEINT_IXR_PULL_ON_MASK   0x00000010

Pull down activated.

#define XDEINT_IXR_UNLOCKED_MASK   0x00000004

Deinterlacer has lost lock to incoming video.

#define XDEINT_IXR_UPDATE_MASK   0x00000001

Internal Register update done.

#define XDEINT_MODE_ALGORITHM_0   0x00000001

Deinterlacer algorithm.

#define XDEINT_MODE_ALGORITHM_1   0x00000002

Deinterlacer algorithm.

#define XDEINT_MODE_ALGORITHM_DIAG   0x00000001

Deinterlacer algorithm option 1.

#define XDEINT_MODE_ALGORITHM_FULL   0x00000003

Deinterlacer algorithm option 3.

#define XDEINT_MODE_ALGORITHM_MASK   0x00000003

Deinterlacer algorithm.

#define XDEINT_MODE_ALGORITHM_MOTION   0x00000002

Deinterlacer algorithm option 2.

#define XDEINT_MODE_ALGORITHM_RAW   0x00000000

Deinterlacer algorithm option 0.

#define XDEINT_MODE_COL   0x00000004

Color Space.

#define XDEINT_MODE_COL_MASK   0x00000004

Color Space.

Referenced by XDeint_GetVideo(), and XDeint_SetVideo().

#define XDEINT_MODE_COLOUR_RGB   0x00000004

Deinterlacer color space.

#define XDEINT_MODE_COLOUR_YUV   0x00000000

Deinterlacer color space.

#define XDEINT_MODE_FIELD_EVEN_FIRST   0x00000020

First field of frame contains even video lines.

#define XDEINT_MODE_FIELD_ODD_FIRST   0x00000000

First field of frame contains odd video lines.

#define XDEINT_MODE_FIELD_ORDER   0x00000020

First field order.

#define XDEINT_MODE_FIELD_ORDER_MASK   0x00000020

First field order.

Referenced by XDeint_GetVideo(), and XDeint_SetVideo().

#define XDEINT_MODE_OFFSET   0x004

Deinterlacer internal Modes.

Referenced by XDeint_GetPulldown(), XDeint_GetVideo(), XDeint_SetPulldown(), and XDeint_SetVideo().

#define XDEINT_MODE_PACKING_0   0x00000008

XSVI Packing.

#define XDEINT_MODE_PACKING_1   0x00000010

XSVI Packing.

#define XDEINT_MODE_PACKING_420   0x00000000

XSVI Packing mode 420.

#define XDEINT_MODE_PACKING_422   0x00000008

XSVI Packing mode 422.

#define XDEINT_MODE_PACKING_444   0x00000010

XSVI Packing mode 444.

#define XDEINT_MODE_PACKING_MASK   0x00000018

XSVI Packing.

Referenced by XDeint_GetVideo(), and XDeint_SetVideo().

#define XDEINT_MODE_PSF_ENABLE   0x00000040

PSF pass through enable.

#define XDEINT_MODE_PSF_ENABLE_MASK   0x00000040

PSF pass through enable.

Referenced by XDeint_GetVideo(), and XDeint_SetVideo().

#define XDEINT_MODE_PULL_22_ENABLE   0x00000100

Pull down 2:2 control enable.

Referenced by XDeint_GetPulldown(), and XDeint_SetPulldown().

#define XDEINT_MODE_PULL_22_FIELDP   0x00000200

Pull down 2:2 Field Precedence.

#define XDEINT_MODE_PULL_32_ENABLE   0x00000080

Pull down 3:2 control enable.

Referenced by XDeint_GetPulldown(), and XDeint_SetPulldown().

#define XDEINT_MODE_PULL_ENABLE_MASK   0x00000180

Pull down control enable.

#define XDeint_ReadReg (   BaseAddress,
  RegOffset 
)    XDeint_In32((BaseAddress) + (u32)(RegOffset))

This macro reads the given register.

Parameters
BaseAddressis the base address of the core.
RegOffsetis the register offset to be read.
Returns
The 32-bit value of the register.
Note
C-style signature: u32 XDeint_ReadReg(u32 BaseAddress, u32 RegOffset)

Referenced by XDeint_GetFramestore(), XDeint_GetPulldown(), XDeint_GetSize(), XDeint_GetThresholds(), XDeint_GetVersion(), XDeint_GetVideo(), XDeint_Selftest(), XDeint_SetPulldown(), and XDeint_SetVideo().

#define XDeint_RegUpdateReq (   InstancePtr)
Value:
XDeint_WriteReg((InstancePtr)->Config.BaseAddress, \
XDeint_ReadReg((InstancePtr)->Config.BaseAddress, \
#define XDEINT_CONTROL_OFFSET
Deinterlacer Main Control.
Definition: xdeint_hw.h:75
#define XDeint_ReadReg(BaseAddress, RegOffset)
This macro reads the given register.
Definition: xdeint_hw.h:392
#define XDeint_WriteReg(BaseAddress, RegOffset, Data)
This macro writes the given register.
Definition: xdeint_hw.h:410
#define XDEINT_CTL_UPDATE_REQ
Queue a register update request.
Definition: xdeint_hw.h:206

This macro tells the Deinterlacer core to pick up all the register value changes made so far by the software at the next frame boundary.

Parameters
InstancePtris a pointer to XDeint instance to be worked on.
Returns
None.
Note
C-style signature: void XDeint_RegUpdateReq(XDeint *InstancePtr)
#define XDeint_Reset (   InstancePtr)
Value:
XDeint_WriteReg((InstancePtr)->Config.BaseAddress, \
#define XDEINT_RESET_RESET_MASK
Software Reset.
Definition: xdeint_hw.h:186
#define XDeint_WriteReg(BaseAddress, RegOffset, Data)
This macro writes the given register.
Definition: xdeint_hw.h:410
#define XDEINT_RESET_OFFSET
Soft Reset.
Definition: xdeint_hw.h:103

This macro soft resets the Deinterlacer to its default mode.

This register will clear once the reset is complete. Software should poll here until the reset has completed. NOTE : Attempting to alter CPU registers during a soft reset will result in no register changes due to the CPU interface being reset.

Parameters
InstancePtris a pointer to XDeint instance to be worked on.
Returns
None.
Note
C-style signature: void XDeint_Reset(XDeint *InstancePtr)

Referenced by XDeint_ConfigInitialize().

#define XDEINT_RESET_OFFSET   0x100

Soft Reset.

#define XDEINT_RESET_RESET_MASK   0x00000001

Software Reset.

#define XDeint_SetAlgorithm (   InstancePtr,
  Alg 
)
Value:
XDeint_WriteReg((InstancePtr)->Config.BaseAddress, \
(XDeint_ReadReg((InstancePtr)->Config.BaseAddress, \
(Alg))
#define XDEINT_MODE_ALGORITHM_FULL
Deinterlacer algorithm option 3.
Definition: xdeint_hw.h:267
#define XDeint_ReadReg(BaseAddress, RegOffset)
This macro reads the given register.
Definition: xdeint_hw.h:392
#define XDeint_WriteReg(BaseAddress, RegOffset, Data)
This macro writes the given register.
Definition: xdeint_hw.h:410
#define XDEINT_MODE_OFFSET
Deinterlacer internal Modes.
Definition: xdeint_hw.h:78

This macro sets the Deinterlacer's processing algorithm.

Parameters
InstancePtris a pointer to XDeint instance to be worked on.
Algis a algorithm setting from XDEINT_MODE_ALGORITHM_????
Returns
None.
    @note C-style signature:
    void XDeint_SetAlgorithm(XDeint *InstancePtr, u32 Alg)
#define XDeint_SetRGB (   InstancePtr)
Value:
XDeint_WriteReg((InstancePtr)->Config.BaseAddress, \
XDeint_ReadReg((InstancePtr)->Config.BaseAddress, \
#define XDEINT_MODE_COLOUR_RGB
Deinterlacer color space.
Definition: xdeint_hw.h:249
#define XDeint_ReadReg(BaseAddress, RegOffset)
This macro reads the given register.
Definition: xdeint_hw.h:392
#define XDeint_WriteReg(BaseAddress, RegOffset, Data)
This macro writes the given register.
Definition: xdeint_hw.h:410
#define XDEINT_MODE_OFFSET
Deinterlacer internal Modes.
Definition: xdeint_hw.h:78

This macro sets the Deinterlacer's color space to RGB.

Parameters
InstancePtris a pointer to XDeint instance to be worked on.
Returns
None.
Note
C-style signature: void XDeint_SetRGB(XDeint *InstancePtr)
#define XDeint_SetYUV (   InstancePtr)
Value:
XDeint_WriteReg((InstancePtr)->Config.BaseAddress, \
XDeint_ReadReg((InstancePtr)->Config.BaseAddress, \
#define XDEINT_MODE_COLOUR_RGB
Deinterlacer color space.
Definition: xdeint_hw.h:249
#define XDeint_ReadReg(BaseAddress, RegOffset)
This macro reads the given register.
Definition: xdeint_hw.h:392
#define XDeint_WriteReg(BaseAddress, RegOffset, Data)
This macro writes the given register.
Definition: xdeint_hw.h:410
#define XDEINT_MODE_OFFSET
Deinterlacer internal Modes.
Definition: xdeint_hw.h:78

This macro sets the Deinterlacer's color space to YUV.

Parameters
InstancePtris a pointer to XDeint instance to be worked on.
Returns
None.
Note
C-style signature: void XDeint_SetYUV(XDeint *InstancePtr)
#define XDeint_Start (   InstancePtr)
Value:
XDeint_WriteReg((InstancePtr)->Config.BaseAddress, \
XDeint_ReadReg((InstancePtr)->Config.BaseAddress, \
#define XDEINT_CONTROL_OFFSET
Deinterlacer Main Control.
Definition: xdeint_hw.h:75
#define XDeint_ReadReg(BaseAddress, RegOffset)
This macro reads the given register.
Definition: xdeint_hw.h:392
#define XDeint_WriteReg(BaseAddress, RegOffset, Data)
This macro writes the given register.
Definition: xdeint_hw.h:410
#define XDEINT_CTL_ACCEPT_VIDEO
Accept Video into the Deinterlacer.
Definition: xdeint_hw.h:212

This macro enables the Deinterlacer core to accept video.

Parameters
InstancePtris a pointer to XDeint instance to be worked on.
Returns
None.
Note
C-style signature: void XDeint_Start(XDeint *InstancePtr)
#define XDeint_Stop (   InstancePtr)
Value:
XDeint_WriteReg((InstancePtr)->Config.BaseAddress, \
XDeint_ReadReg((InstancePtr)->Config.BaseAddress, \
#define XDEINT_CONTROL_OFFSET
Deinterlacer Main Control.
Definition: xdeint_hw.h:75
#define XDeint_ReadReg(BaseAddress, RegOffset)
This macro reads the given register.
Definition: xdeint_hw.h:392
#define XDeint_WriteReg(BaseAddress, RegOffset, Data)
This macro writes the given register.
Definition: xdeint_hw.h:410
#define XDEINT_CTL_ACCEPT_VIDEO
Accept Video into the Deinterlacer.
Definition: xdeint_hw.h:212

This macro halts the Deinterlacer core on the next frame boundary.

Parameters
InstancePtris a pointer to XDeint instance to be worked on.
Returns
None.
Note
C-style signature: void XDeint_Stop(XDeint *InstancePtr)
#define XDEINT_STS_ERROR   0x00000008

Deinterlacer internal FIFO error.

#define XDEINT_STS_FS_CFG_ERROR   0x00000100

Frame store Write setup error.

#define XDEINT_STS_FS_RD_FIELD_ERROR   0x00000400

Frame store Read Field under run.

#define XDEINT_STS_FS_RD_FRAME_ERROR   0x00000800

Frame store Read Frame under run.

#define XDEINT_STS_FS_WR_ERROR   0x00000200

Frame store Write FIFO overflow.

#define XDEINT_THRESH1_OFFSET   0x018

T1 Threshold.

Referenced by XDeint_GetThresholds(), and XDeint_SetThresholds().

#define XDEINT_THRESH2_OFFSET   0x01C

T2 Threshold.

Referenced by XDeint_GetThresholds(), and XDeint_SetThresholds().

#define XDEINT_THRESHOLD_MASK   0x000003FF

Deinterlacer threshold.

Referenced by XDeint_GetThresholds().

#define XDEINT_VER_MAJOR_MASK   0xFF000000

Major Version.

#define XDEINT_VER_MAJOR_SHIFT   24

Major Bit Shift.

#define XDEINT_VER_MINOR_MASK   0x00F00000

Minor Version.

#define XDEINT_VER_MINOR_SHIFT   20

Minor Bit Shift.

#define XDEINT_VER_OFFSET   0x0F0

Hardware Version ID.

Referenced by XDeint_GetVersion(), and XDeint_Selftest().

#define XDEINT_VER_REV_MASK   0x000F0000

Revision Version.

#define XDEINT_VER_REV_SHIFT   16

Revision Bit Shift.

#define XDEINT_WIDTH_MASK   0x000007FF

Deinterlacer width.

Referenced by XDeint_GetSize().

#define XDEINT_WIDTH_OFFSET   0x014

Width.

Referenced by XDeint_GetSize(), and XDeint_SetSize().

#define XDeint_WriteReg (   BaseAddress,
  RegOffset,
  Data 
)    XDeint_Out32((BaseAddress) + (u32)(RegOffset), (Data))

This macro writes the given register.

Parameters
BaseAddressis the base address of the core.
RegOffsetis the register offset to be written.
Datais the 32-bit value to write to the register.
Returns
None.
Note
C-style signature: void XDeint_WriteReg(u32 BaseAddress, u32 RegOffset, u32 Data)

Referenced by XDeint_SetFramestore(), XDeint_SetPulldown(), XDeint_SetSize(), XDeint_SetThresholds(), and XDeint_SetVideo().

#define XDEINT_XFADE_MASK   0x0000FFFF

Deinterlacer Cross fade cycle.

#define XDEINT_XFADE_OFFSET   0x020

Cross Fade Ration.

Referenced by XDeint_SetThresholds().

Typedef Documentation

typedef void(* XDeint_CallBack)(u32 status)

Callback type for all interrupts.

Function Documentation

int XDeint_ConfigInitialize ( XDeint InstancePtr,
XDeint_Config CfgPtr,
u32  EffectiveAddr 
)

This function initializes the Deinterlacer core.

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

Parameters
InstancePtris a pointer to XDeint instance to be worked on.
CfgPtrpoints to the configuration structure associated with the Deinterlacer core.
EffectiveAddris the base address of the core. If address translation is being used, then this parameter must reflect the virtual base address. Otherwise, the physical address should be used.
Returns
  • XST_SUCCESS if initialization was successful.
Note
None.

References XDeint_Config::BaseAddress, XDeint::Config, XDeint::IntCallBack, XDeint::IsReady, XDeint_Disable, XDeint_InReset, and XDeint_Reset.

Referenced by XDeintSelfTestExample().

void XDeint_GetFramestore ( XDeint InstancePtr,
u32 *  FieldAddr1,
u32 *  FieldAddr2,
u32 *  FieldAddr3,
u32 *  FrameSize 
)

This function gets input field buffer addresses of an Deinterlacer core.

Parameters
InstancePtris a pointer to XDeint instance to be worked on.
FieldAddr1is the pointer to the 1st input field buffer.
FieldAddr2is the pointer to the 2nd input field buffer.
FieldAddr3is the pointer to the 3rd input field buffer.
FrameSizeis the pointer to size in 32bit words of a single field buffer.
Returns
None.
Note
None.

References XDeint::IsReady, XDEINT_BUFFER0_OFFSET, XDEINT_BUFFER1_OFFSET, XDEINT_BUFFER2_OFFSET, XDEINT_BUFSIZE_OFFSET, and XDeint_ReadReg.

void XDeint_GetPulldown ( XDeint InstancePtr,
u32 *  Enable_32,
u32 *  Enable_22 
)

This function gets the pull down controller of the Deinterlacer core.

Parameters
InstancePtris a pointer to XDeint instance to be worked on.
Enable_32is a pointer which holds status of Enable_32 mode.
  • FALSE = Disabled.
  • TRUE = Enabled.
Enable_22is a pointer which holds status of Enable_22 mode.
  • FALSE = Disabled.
  • TRUE = Enabled.
Returns
None.
Note
None.

References XDeint::IsReady, XDEINT_MODE_OFFSET, XDEINT_MODE_PULL_22_ENABLE, XDEINT_MODE_PULL_32_ENABLE, and XDeint_ReadReg.

void XDeint_GetSize ( XDeint InstancePtr,
u32 *  Width,
u32 *  Height 
)

This function gets the input frame size of the Deinterlacer core.

Parameters
InstancePtris a pointer to XDeint instance to be worked on.
Widthis pointer to the width of the frame.
Heightis pointer to the height of the frame.
Returns
None.
Note
None.

References XDeint::IsReady, XDEINT_HEIGHT_MASK, XDEINT_HEIGHT_OFFSET, XDeint_ReadReg, XDEINT_WIDTH_MASK, and XDEINT_WIDTH_OFFSET.

void XDeint_GetThresholds ( XDeint InstancePtr,
u32 *  ThresholdT1,
u32 *  ThresholdT2 
)

This function gets the threshold used by the motion adaptive kernel.

Parameters
InstancePtris a pointer to XDeint instance to be worked on.
ThresholdT1is the pointer to lower threshold of the motion kernel.
ThresholdT2is the pointer to upper threshold of the motion kernel.
Returns
None.

References XDeint::IsReady, XDeint_ReadReg, XDEINT_THRESH1_OFFSET, XDEINT_THRESH2_OFFSET, and XDEINT_THRESHOLD_MASK.

u32 XDeint_GetVersion ( XDeint InstancePtr)

This function returns the contents of Version register.

Parameters
InstancePtris a pointer to XDeint instance to be worked on.
Returns
Returns the contents of the version register.
Note
None.

References XDeint_Config::BaseAddress, XDeint::Config, XDeint_ReadReg, and XDEINT_VER_OFFSET.

void XDeint_GetVideo ( XDeint InstancePtr,
u32 *  Packing,
u32 *  Color,
u32 *  Order,
u32 *  PSF 
)

This function gets the video format of the Deinterlacer core.

Parameters
InstancePtris a pointer to XDeint instance to be worked on.
Packingis a pointer to 32 bit variable which holds Packaging format.
  • 0 4:2:0 Packging is used.
    • XDEINT_MODE_PACKING_0 4:2:2 Packging is used.
    • XDEINT_MODE_PACKING_1 4:4:4 Packging is used.
Coloris a pointer to 32 bit varaible which holds color value.
  • 0 YUV color space is used.
    • XDEINT_MODE_COL RGB color space is used.
Orderis a pointer to 32 bit varaible which holds Field order.
  • 0 the field order maps to PAL/HD/3G.
    • XDEINT_MODE_FIELD_ORDER the field order maps to NTSC/480i
PSFis a pointer to 32 bit variable which says whether Psf enabled or disabled.
  • XDEINT_MODE_PSF_ENABLE for psf enable.
Returns
None.
Note
None.

References XDeint::IsReady, XDEINT_MODE_COL_MASK, XDEINT_MODE_FIELD_ORDER_MASK, XDEINT_MODE_OFFSET, XDEINT_MODE_PACKING_MASK, XDEINT_MODE_PSF_ENABLE_MASK, and XDeint_ReadReg.

void XDeint_IntrHandler ( void *  InstancePtr)

This function is the interrupt handler for the Deinterlacer core.

This handler reads the pending interrupt from the IER/ISR, determines the source of the interrupts, calls according callback, 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 XDeint_SetCallBack() during initialization phase.

Parameters
InstancePtris a pointer to XDeint instance to be worked on.
Returns
None.
Note
The Error interrupt callback invoked in case an error interrupt or spurious interrupt happens should reset the Deinterlacer core that just interrupted.

References XDeint::IntCallBack, XDeint::IsReady, XDeint_IntrClear, and XDeint_IntrGetPending.

XDeint_Config * XDeint_LookupConfig ( u16  DeviceId)

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

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

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

References XDeint_ConfigTable.

Referenced by XDeintSelfTestExample().

int XDeint_Selftest ( XDeint InstancePtr)

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

Parameters
InstancePtris a pointer to XDeint instance to be worked on.
Returns
  • XST_SUCCESS if the test was successful.
  • XST_FAILURE if the test failed.

References XDeint_ReadReg, and XDEINT_VER_OFFSET.

Referenced by XDeintSelfTestExample().

int XDeint_SetCallBack ( XDeint InstancePtr,
void *  CallBackFunc 
)

This routine installs an asynchronous callback function.

Parameters
InstancePtris a pointer to XDeint instance to be worked on.
CallBackFuncis the address of the callback function.
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 XDeint::IntCallBack, and XDeint::IsReady.

void XDeint_SetFramestore ( XDeint InstancePtr,
u32  FieldAddr1,
u32  FieldAddr2,
u32  FieldAddr3,
u32  FrameSize 
)

This function sets the input field buffer addresses of the Deinterlacer core.

Parameters
InstancePtris a pointer to XDeint instance to be worked on.
FieldAddr1is the address of the 1st input field buffer.
FieldAddr2is the address of the 2nd input field buffer.
FieldAddr3is the address of the 3rd input field buffer.
FrameSizeis the size in 32bit words of a single field buffer.
Returns
None.
Note
None.

References XDeint::IsReady, XDEINT_BUFFER0_OFFSET, XDEINT_BUFFER1_OFFSET, XDEINT_BUFFER2_OFFSET, XDEINT_BUFSIZE_OFFSET, and XDeint_WriteReg.

void XDeint_SetPulldown ( XDeint InstancePtr,
u32  Enable_32,
u32  Enable_22 
)

This function sets the pull down controller of the Deinterlacer core.

Parameters
InstancePtris a pointer to XDeint instance to be worked on.
Enable_32allows detectors to automatically control Deinterlacer core.
  • 1 Pull down enable 3:2
Enable_22allows detectors to automatically control Deinterlacer core.
  • 1 Pull down enable 2:2
Returns
None.
Note
None.

References XDeint::IsReady, XDEINT_MODE_OFFSET, XDEINT_MODE_PULL_22_ENABLE, XDEINT_MODE_PULL_32_ENABLE, XDeint_ReadReg, and XDeint_WriteReg.

void XDeint_SetSize ( XDeint InstancePtr,
u32  Width,
u32  Height 
)

This function sets the input frame size of the Deinterlacer core.

Parameters
InstancePtris a pointer to XDeint instance to be worked on.
Widthis the width of the frame.
Heightis the height of the frame.
Returns
None.
Note
None.

References XDeint::IsReady, XDEINT_HEIGHT_OFFSET, XDEINT_WIDTH_OFFSET, and XDeint_WriteReg.

void XDeint_SetThresholds ( XDeint InstancePtr,
u32  ThresholdT1,
u32  ThresholdT2 
)

This function sets the threshold used by the motion adaptive kernel of the Deinterlacer core.

Parameters
InstancePtris a pointer to XDeint instance to be worked on.
ThresholdT1is the lower threshold of the motion kernel.
ThresholdT2is the upper threshold of the motion kernel.
Returns
None.
Note
None.

References XDeint::IsReady, XDEINT_FADE_RATIO, XDEINT_THRESH1_OFFSET, XDEINT_THRESH2_OFFSET, XDeint_WriteReg, and XDEINT_XFADE_OFFSET.

void XDeint_SetVideo ( XDeint InstancePtr,
u32  Packing,
u32  Color,
u32  Order,
u32  PSF 
)

This function sets the video format of the Deinterlacer core.

Parameters
InstancePtris a pointer to XDeint instance to be worked on.
Packingselects the XSVI video packing mode.
  • 0 4:2:0 Packging is used.
  • XDEINT_MODE_PACKING_0 4:2:2 Packging is used.
  • XDEINT_MODE_PACKING_1 4:4:4 Packging is used.
Colorselects what color space to use.
  • 0 YUV color space is used.
  • XDEINT_MODE_COL RGB color space is used.
Orderselects which field ordering is being used.
  • 0 the field order maps to PAL/HD/3G.
  • XDEINT_MODE_FIELD_ORDER the field order maps to NTSC/480i
PSFenables psf (progressive segmented frame mode).
  • XDEINT_MODE_PSF_ENABLE for psf enable.
Returns
None.
Note
None.

References XDeint::IsReady, XDEINT_MODE_COL_MASK, XDEINT_MODE_FIELD_ORDER_MASK, XDEINT_MODE_OFFSET, XDEINT_MODE_PACKING_MASK, XDEINT_MODE_PSF_ENABLE_MASK, XDeint_ReadReg, and XDeint_WriteReg.

Variable Documentation

XDeint_Config XDeint_ConfigTable[]
Initial value:
= {
{
XPAR_FMC_SENSOR_INPUT_V_DEINTERLACER_1_DEVICE_ID,
XPAR_FMC_SENSOR_INPUT_V_DEINTERLACER_1__BASEADDR
}
}

The configuration table for Video Deinterlacers devices.

Referenced by XDeint_LookupConfig().