Software Drivers

xdeint.c File Reference


Detailed Description

This is main code of Xilinx Vide Deinterlacer device driver. Please see xdeint.h for more details of the driver.

 MODIFICATION HISTORY:

 Ver    Who     Date      Changes
 ----- ---- -------- -------------------------------------------------------
 1.00a rjh 07/10/11 First release
 2.00a rjh 18/01/12 Updated for v_deinterlacer 2.00
 

#include "xdeint.h"
#include "xenv.h"
#include "xil_assert.h"

Functions

int XDeint_ConfigInitialize (XDeint *InstancePtr, XDeint_Config *CfgPtr, u32 EffectiveAddr)
void XDeint_SetFramestore (XDeint *InstancePtr, u32 FieldAddr1, u32 FieldAddr2, u32 FieldAddr3, u32 FrameSize)
void XDeint_SetVideo (XDeint *InstancePtr, u32 Packing, u32 Colour, u32 Order, u32 PSF)
void XDeint_SetThresholds (XDeint *InstancePtr, u32 t1, u32 t2)
void XDeint_SetPulldown (XDeint *InstancePtr, u32 enable_32, u32 enable_22)
void XDeint_GetVersion (XDeint *InstancePtr, u16 *Major, u16 *Minor, u16 *Revision)
void XDeint_SetSize (XDeint *InstancePtr, u32 Width, u32 Height)


Function Documentation

int XDeint_ConfigInitialize XDeint InstancePtr,
XDeint_Config CfgPtr,
u32  EffectiveAddr
 

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

Parameters:
InstancePtr is a pointer to the Deinterlacer device instance to be worked on.
CfgPtr points to the configuration structure associated with the Deinterlacer device.
EffectiveAddr is the base address of the device. 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

void XDeint_GetVersion XDeint InstancePtr,
u16 *  Major,
u16 *  Minor,
u16 *  Revision
 

This function returns the version of a Deinterlacer device.

Parameters:
InstancePtr is a pointer to the Deinterlacer device instance to be worked on.
Major points to an unsigned 16-bit variable that will be assigned with the major version number after this function returns. Value range is from 0x0 to 0xF.
Minor points to an unsigned 16-bit variable that will be assigned with the minor version number after this function returns. Value range is from 0x00 to 0xFF.
Revision points to an unsigned 16-bit variable that will be assigned with the revision version number after this function returns. Value range is from 0xA to 0xF.
Returns:
None.
Note:
Example: Device version should read v2.01.c if major version number is 0x2, minor version number is 0x1, and revision version number is 0xC.

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

This function sets up input field buffer addresses of an Deinterlacer device.

Parameters:
InstancePtr is a pointer to the DEINT device 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
Returns:
None.

void XDeint_SetPulldown XDeint InstancePtr,
u32  enable_32,
u32  enable_22
 

This function sets up the pulldown controller

Parameters:
InstancePtr is a pointer to the DEINT device instance to be worked on.
enable 
Returns:
None.

void XDeint_SetSize XDeint InstancePtr,
u32  Width,
u32  Height
 

This function sets up the input frame size of the deinterlacer

Parameters:
InstancePtr is a pointer to the DEINT device instance to be worked on.
Width 
Height 
Returns:
None.

void XDeint_SetThresholds XDeint InstancePtr,
u32  t1,
u32  t2
 

This function sets up the threshold used by the motion adaptive kernel

Parameters:
InstancePtr is a pointer to the DEINT device instance to be worked on.
T1 is the lower threshold of the motion kernel
T2 is the upper threshold of the motion kernel
Returns:
None.

void XDeint_SetVideo XDeint InstancePtr,
u32  Packing,
u32  Colour,
u32  Order,
u32  PSF
 

This function sets up the video format

Parameters:
Packing selects the XSVI video packing mode.
Colour selects what colourspace to use
Order selects which field ordering is being used
psf enables psf (progressive segmented frame mode)
Returns:
None.
Copyright @ 1995-2014 Xilinx, Inc. All rights reserved.