#include "xdeint_hw.h"
#include "xstatus.h"
#include "xil_assert.h"
Classes | |
struct | XDeint_Config |
struct | XDeint |
Interrupt types for setting up callbacks | |
#define | XDEINT_HANDLER |
Defines | |
#define | XDEINT_H |
#define | XDeint_Enable(InstancePtr) |
#define | XDeint_Disable(InstancePtr) |
#define | XDeint_Start(InstancePtr) |
#define | XDeint_Stop(InstancePtr) |
#define | XDeint_Reset(InstancePtr) |
#define | XDeint_InReset(InstancePtr) |
#define | XDeint_RegUpdateReq(InstancePtr) |
#define | XDeint_IntrEnable(InstancePtr, IntrType) |
#define | XDeint_IntrDisable(InstancePtr, IntrType) |
#define | XDeint_IntrGetPending(InstancePtr) |
#define | XDeint_IntrClear(InstancePtr, IntrType) |
#define | XDeint_SetRGB(InstancePtr) |
#define | XDeint_SetYUV(InstancePtr) |
#define | XDeint_SetAlgorithm(InstancePtr, Alg) |
#define | XDeint_GetColorSpace(InstancePtr) |
#define | XDeint_GetAlgorithm(InstancePtr) |
Typedefs | |
typedef void(*) | XDeint_CallBack (u32 status) |
Functions | |
int | XDeint_ConfigInitialize (XDeint *InstancePtr, XDeint_Config *CfgPtr, u32 EffectiveAddr) |
XDeint_Config * | XDeint_LookupConfig (u16 DeviceId) |
void | XDeint_SetFramestore (XDeint *InstancePtr, u32 FieldAddr1, u32 FieldAddr2, u32 FieldAddr3, u32 FrameSize) |
void | XDeint_SetSize (XDeint *InstancePtr, u32 Width, u32 Height) |
void | XDeint_SetPulldown (XDeint *InstancePtr, u32 Enable_32, u32 Enable_22) |
void | XDeint_SetThresholds (XDeint *InstancePtr, u32 ThresholdT1, u32 ThresholdT2) |
void | XDeint_SetVideo (XDeint *InstancePtr, u32 Packing, u32 Color, u32 Order, u32 PSF) |
void | XDeint_IntrHandler (void *InstancePtr) |
int | XDeint_SetCallBack (XDeint *InstancePtr, void *CallBackFunc) |
void | XDeint_GetVideo (XDeint *InstancePtr, u32 *Packing, u32 *Color, u32 *Order, u32 *PSF) |
void | XDeint_GetPulldown (XDeint *InstancePtr, u32 *Enable_32, u32 *Enable_22) |
void | XDeint_GetSize (XDeint *InstancePtr, u32 *Width, u32 *Height) |
void | XDeint_GetThresholds (XDeint *InstancePtr, u32 *ThresholdT1, u32 *ThresholdT2) |
void | XDeint_GetFramestore (XDeint *InstancePtr, u32 *FieldAddr1, u32 *FieldAddr2, u32 *FieldAddr3, u32 *FrameSize) |
u32 | XDeint_GetVersion (XDeint *InstancePtr) |
int | XDeint_Selftest (XDeint *InstancePtr) |
#define XDeint_Disable | ( | InstancePtr | ) |
Value:
XDeint_WriteReg((InstancePtr)->Config.BaseAddress, \ (XDEINT_CONTROL_OFFSET), \ XDeint_ReadReg((InstancePtr)->Config.BaseAddress, \ (XDEINT_CONTROL_OFFSET)) & (~(XDEINT_CTL_ENABLE)))
InstancePtr | is a pointer to XDeint instance to be worked on. |
#define XDeint_Enable | ( | InstancePtr | ) |
Value:
XDeint_WriteReg((InstancePtr)->Config.BaseAddress, \ (XDEINT_CONTROL_OFFSET), \ XDeint_ReadReg((InstancePtr)->Config.BaseAddress, \ (XDEINT_CONTROL_OFFSET)) | (XDEINT_CTL_ENABLE))
InstancePtr | is a pointer to XDeint instance to be worked on. |
#define XDeint_GetAlgorithm | ( | InstancePtr | ) |
Value:
XDeint_ReadReg((InstancePtr)->Config.BaseAddress, \ (XDEINT_MODE_OFFSET)) & (XDEINT_MODE_ALGORITHM_FULL)
InstancePtr | is a pointer to XDeint instance to be worked on. |
#define XDeint_GetColorSpace | ( | InstancePtr | ) |
Value:
XDeint_ReadReg((InstancePtr)->Config.BaseAddress, \ (XDEINT_MODE_OFFSET)) & (XDEINT_MODE_COL)
InstancePtr | is a pointer to XDeint instance to be worked on. |
#define XDEINT_H |
Prevent circular inclusions by using protection macros
#define XDEINT_HANDLER |
Internal Register update done
#define XDeint_InReset | ( | InstancePtr | ) |
Value:
(XDeint_ReadReg((InstancePtr)->Config.BaseAddress, \ (XDEINT_RESET_OFFSET)) & (XDEINT_RESET_RESET_MASK))
InstancePtr | is a pointer to XDeint instance to be worked on. |
#define XDeint_IntrClear | ( | InstancePtr, | |||
IntrType | ) |
Value:
XDeint_WriteReg((InstancePtr)->Config.BaseAddress, \ (XDEINT_ISR_OFFSET), (IntrType) & \ (XDeint_IntrGetPending(InstancePtr)))
InstancePtr | is a pointer to XDeint instance to be worked on. | |
IntrType | is the pending interrupts to clear/acknowledge. Use OR'ing of XDEINT_IXR_*_MASK constants defined in xdeint_hw.h to create this parameter value. |
#define XDeint_IntrDisable | ( | InstancePtr, | |||
IntrType | ) |
Value:
XDeint_WriteReg((InstancePtr)->Config.BaseAddress, \ (XDEINT_IER_OFFSET), ((~(IntrType)) & \ (XDEINT_IXR_ALLINTR_MASK)) & \ XDeint_ReadReg((InstancePtr)->Config.BaseAddress, (XDEINT_IER_OFFSET)))
InstancePtr | is a pointer to XDeint instance to be worked on. | |
IntrType | is 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. |
#define XDeint_IntrEnable | ( | InstancePtr, | |||
IntrType | ) |
Value:
XDeint_WriteReg((InstancePtr)->Config.BaseAddress, \ (XDEINT_IER_OFFSET), ((IntrType) & \ (XDEINT_IXR_ALLINTR_MASK)) | \ XDeint_ReadReg((InstancePtr)->Config.BaseAddress, (XDEINT_IER_OFFSET)))
InstancePtr | is a pointer to XDeint instance to be worked on. | |
IntrType | is 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. |
#define XDeint_IntrGetPending | ( | InstancePtr | ) |
Value:
XDeint_ReadReg((InstancePtr)->Config.BaseAddress, \ (XDEINT_IER_OFFSET)) & \ (XDeint_ReadReg((InstancePtr)->Config.BaseAddress, \ (XDEINT_ISR_OFFSET)) & (XDEINT_IXR_ALLINTR_MASK))
InstancePtr | is a pointer to XDeint instance to be worked on. |
#define XDeint_RegUpdateReq | ( | InstancePtr | ) |
Value:
XDeint_WriteReg((InstancePtr)->Config.BaseAddress, \ (XDEINT_CONTROL_OFFSET), \ XDeint_ReadReg((InstancePtr)->Config.BaseAddress, \ (XDEINT_CONTROL_OFFSET)) | (XDEINT_CTL_UPDATE_REQ))
InstancePtr | is a pointer to XDeint instance to be worked on. |
#define XDeint_Reset | ( | InstancePtr | ) |
Value:
XDeint_WriteReg((InstancePtr)->Config.BaseAddress, \ (XDEINT_RESET_OFFSET), (u32)(XDEINT_RESET_RESET_MASK))
InstancePtr | is a pointer to XDeint instance to be worked on. |
#define XDeint_SetAlgorithm | ( | InstancePtr, | |||
Alg | ) |
Value:
XDeint_WriteReg((InstancePtr)->Config.BaseAddress, \ (XDEINT_MODE_OFFSET), \ (XDeint_ReadReg((InstancePtr)->Config.BaseAddress, \ (XDEINT_MODE_OFFSET)) & \ (~(XDEINT_MODE_ALGORITHM_FULL))) | \ (Alg))
InstancePtr | is a pointer to XDeint instance to be worked on. | |
Alg | is a algorithm setting from XDEINT_MODE_ALGORITHM_???? |
#define XDeint_SetRGB | ( | InstancePtr | ) |
Value:
XDeint_WriteReg((InstancePtr)->Config.BaseAddress, \ (XDEINT_MODE_OFFSET), \ XDeint_ReadReg((InstancePtr)->Config.BaseAddress, \ (XDEINT_MODE_OFFSET)) | (XDEINT_MODE_COLOUR_RGB))
InstancePtr | is a pointer to XDeint instance to be worked on. |
#define XDeint_SetYUV | ( | InstancePtr | ) |
Value:
XDeint_WriteReg((InstancePtr)->Config.BaseAddress, \ (XDEINT_MODE_OFFSET), \ XDeint_ReadReg((InstancePtr)->Config.BaseAddress, \ (XDEINT_MODE_OFFSET)) & (~(XDEINT_MODE_COLOUR_RGB)))
InstancePtr | is a pointer to XDeint instance to be worked on. |
#define XDeint_Start | ( | InstancePtr | ) |
Value:
XDeint_WriteReg((InstancePtr)->Config.BaseAddress, \ (XDEINT_CONTROL_OFFSET), \ XDeint_ReadReg((InstancePtr)->Config.BaseAddress, \ (XDEINT_CONTROL_OFFSET)) | (XDEINT_CTL_ACCEPT_VIDEO))
InstancePtr | is a pointer to XDeint instance to be worked on. |
#define XDeint_Stop | ( | InstancePtr | ) |
Value:
XDeint_WriteReg((InstancePtr)->Config.BaseAddress, \ (XDEINT_CONTROL_OFFSET), \ XDeint_ReadReg((InstancePtr)->Config.BaseAddress, \ (XDEINT_CONTROL_OFFSET)) & \ (~(XDEINT_CTL_ACCEPT_VIDEO)))
InstancePtr | is a pointer to XDeint instance to be worked on. |
typedef void(*) XDeint_CallBack(u32 status) |
Callback type for all interrupts
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.
InstancePtr | is a pointer to XDeint instance to be worked on. | |
CfgPtr | points to the configuration structure associated with the Deinterlacer core. | |
EffectiveAddr | is 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. |
void XDeint_GetFramestore | ( | XDeint * | InstancePtr, | |
u32 * | FieldAddr1, | |||
u32 * | FieldAddr2, | |||
u32 * | FieldAddr3, | |||
u32 * | FrameSize | |||
) |
This function gets input field buffer addresses of an Deinterlacer core.
InstancePtr | is a pointer to XDeint instance to be worked on. | |
FieldAddr1 | is the pointer to the 1st input field buffer. | |
FieldAddr2 | is the pointer to the 2nd input field buffer. | |
FieldAddr3 | is the pointer to the 3rd input field buffer. | |
FrameSize | is the pointer to size in 32bit words of a single field buffer. |
void XDeint_GetPulldown | ( | XDeint * | InstancePtr, | |
u32 * | Enable_32, | |||
u32 * | Enable_22 | |||
) |
This function gets the pull down controller of the Deinterlacer core.
InstancePtr | is a pointer to XDeint instance to be worked on. | |
Enable_32 | is a pointer which holds status of Enable_32 mode.
| |
Enable_22 | is a pointer which holds status of Enable_22 mode.
|
void XDeint_GetSize | ( | XDeint * | InstancePtr, | |
u32 * | Width, | |||
u32 * | Height | |||
) |
This function gets the input frame size of the Deinterlacer core.
InstancePtr | is a pointer to XDeint instance to be worked on. | |
Width | is pointer to the width of the frame. | |
Height | is pointer to the height of the frame. |
void XDeint_GetThresholds | ( | XDeint * | InstancePtr, | |
u32 * | ThresholdT1, | |||
u32 * | ThresholdT2 | |||
) |
This function gets the threshold used by the motion adaptive kernel.
InstancePtr | is a pointer to XDeint instance to be worked on. | |
ThresholdT1 | is the pointer to lower threshold of the motion kernel. | |
ThresholdT2 | is the pointer to upper threshold of the motion kernel. |
u32 XDeint_GetVersion | ( | XDeint * | InstancePtr | ) |
This function returns the contents of Version register.
InstancePtr | is a pointer to XDeint instance to be worked on. |
void XDeint_GetVideo | ( | XDeint * | InstancePtr, | |
u32 * | Packing, | |||
u32 * | Color, | |||
u32 * | Order, | |||
u32 * | PSF | |||
) |
This function gets the video format of the Deinterlacer core.
InstancePtr | is a pointer to XDeint instance to be worked on. | |
Packing | is a pointer to 32 bit variable which holds Packaging format.
| |
Color | is a pointer to 32 bit varaible which holds color value.
| |
Order | is a pointer to 32 bit varaible which holds Field order.
| |
PSF | is a pointer to 32 bit variable which says whether Psf enabled or disabled.
|
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.
InstancePtr | is a pointer to XDeint instance to be worked on. |
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.
DeviceId | is the unique device ID of the device for the lookup operation. |
int XDeint_Selftest | ( | XDeint * | InstancePtr | ) |
This function reads Version register of Deinterlacer core and compares with zero as part of self test.
InstancePtr | is a pointer to XDeint instance to be worked on. |
int XDeint_SetCallBack | ( | XDeint * | InstancePtr, | |
void * | CallBackFunc | |||
) |
This routine installs an asynchronous callback function.
InstancePtr | is a pointer to XDeint instance to be worked on. | |
CallBackFunc | is the address of the callback function. |
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.
InstancePtr | is a pointer to XDeint instance to be worked on. | |
FieldAddr1 | is the address of the 1st input field buffer. | |
FieldAddr2 | is the address of the 2nd input field buffer. | |
FieldAddr3 | is the address of the 3rd input field buffer. | |
FrameSize | is the size in 32bit words of a single field buffer. |
void XDeint_SetPulldown | ( | XDeint * | InstancePtr, | |
u32 | Enable_32, | |||
u32 | Enable_22 | |||
) |
This function sets the pull down controller of the Deinterlacer core.
InstancePtr | is a pointer to XDeint instance to be worked on. | |
Enable_32 | allows detectors to automatically control Deinterlacer core.
| |
Enable_22 | allows detectors to automatically control Deinterlacer core.
|
void XDeint_SetSize | ( | XDeint * | InstancePtr, | |
u32 | Width, | |||
u32 | Height | |||
) |
This function sets the input frame size of the Deinterlacer core.
InstancePtr | is a pointer to XDeint instance to be worked on. | |
Width | is the width of the frame. | |
Height | is the height of the frame. |
void XDeint_SetThresholds | ( | XDeint * | InstancePtr, | |
u32 | ThresholdT1, | |||
u32 | ThresholdT2 | |||
) |
This function sets the threshold used by the motion adaptive kernel of the Deinterlacer core.
InstancePtr | is a pointer to XDeint instance to be worked on. | |
ThresholdT1 | is the lower threshold of the motion kernel. | |
ThresholdT2 | is the upper threshold of the motion kernel. |
void XDeint_SetVideo | ( | XDeint * | InstancePtr, | |
u32 | Packing, | |||
u32 | Color, | |||
u32 | Order, | |||
u32 | PSF | |||
) |
This function sets the video format of the Deinterlacer core.
InstancePtr | is a pointer to XDeint instance to be worked on. | |
Packing | selects the XSVI video packing mode.
| |
Color | selects what color space to use.
| |
Order | selects which field ordering is being used.
| |
PSF | enables psf (progressive segmented frame mode).
|
Copyright @ 1995-2014 Xilinx, Inc. All rights reserved.