Software Drivers

xenhance.c File Reference


Detailed Description

This file contains the implementation of the interface functions for Enhance core. Refer to the header file xenhance.h for more detailed information.

 MODIFICATION HISTORY:

 Ver   Who  Date     Changes
 ----- --- -------- ---------------------------------------------------
 2.00a vc  12/14/10 Updated for ENHANCE V2.0
 3.00a rc  09/11/11 Updated for ENHANCE V3.0
 4.00a vyc 04/24/12 Updated for ENHANCE V4.00.a
                    Converted from xio.h to xil_io.h, translating
                    basic type, MB cache functions, exceptions and
                    assertion to xil_io format.
 5.00a vyc 06/19/13 Updated for ENHANCE V8.0
                    New edge enhancement algorithm and registers
                    Noise reduction support added
 6.0   adk 19/12/13 Updated as per the New Tcl API's
 7.0   adk 02/19/14 Changed the filename from enhance.c to xenhance.c.
                    Modified the following functions
                    XENHANCE_CfgInitialize -> XEnhance_CfgInitialize
                    XENHANCE_Setup -> XEnhance_Setup

                    Implemented the following functions:
                    XEnhance_GetVersion, XEnhance_EnableDbgByPass
                    XEnhance_IsDbgByPassEnabled, XEnhance_DisableDbgBypass
                    XEnhance_EnableDbgTestPattern,
                    XEnhance_IsDbgTestPatternEnabled
                    XEnhance_DisableDbgTestPattern
                    XEnhance_GetDbgFrameCount, XEnhance_GetDbgLineCount,
                    XEnhance_GetDbgPixelCount, XEnhance_SetActiveSize,
                    XEnhance_GetActiveSize, XEnhance_SetNoiseThreshold,
                    XEnhance_GetNoiseThreshold, XEnhance_SetEdgeStrength,
                    XEnhance_GetEdgeStrength, XEnhance_SetHaloSuppress
                    XEnhance_GetHaloSuppress.
 

#include "xenhance.h"

Functions

int XEnhance_CfgInitialize (XEnhance *InstancePtr, XEnhance_Config *CfgPtr, u32 EffectiveAddr)
void XEnhance_Setup (XEnhance *InstancePtr)
void XEnhance_EnableDbgByPass (XEnhance *InstancePtr)
int XEnhance_IsDbgByPassEnabled (XEnhance *InstancePtr)
void XEnhance_DisableDbgBypass (XEnhance *InstancePtr)
void XEnhance_EnableDbgTestPattern (XEnhance *InstancePtr)
int XEnhance_IsDbgTestPatternEnabled (XEnhance *InstancePtr)
void XEnhance_DisableDbgTestPattern (XEnhance *InstancePtr)
u32 XEnhance_GetVersion (XEnhance *InstancePtr)
u32 XEnhance_GetDbgFrameCount (XEnhance *InstancePtr)
u32 XEnhance_GetDbgLineCount (XEnhance *InstancePtr)
u32 XEnhance_GetDbgPixelCount (XEnhance *InstancePtr)
void XEnhance_SetActiveSize (XEnhance *InstancePtr, u16 HSize, u16 VSize)
void XEnhance_GetActiveSize (XEnhance *InstancePtr, u16 *HSize, u16 *VSize)
void XEnhance_SetNoiseThreshold (XEnhance *InstancePtr, u32 Threshold)
u32 XEnhance_GetNoiseThreshold (XEnhance *InstancePtr)
void XEnhance_SetEdgeStrength (XEnhance *InstancePtr, u32 Strength)
u32 XEnhance_GetEdgeStrength (XEnhance *InstancePtr)
void XEnhance_SetHaloSuppress (XEnhance *InstancePtr, u32 Suppress)
u32 XEnhance_GetHaloSuppress (XEnhance *InstancePtr)


Function Documentation

int XEnhance_CfgInitialize ( XEnhance InstancePtr,
XEnhance_Config CfgPtr,
u32  EffectiveAddr 
)

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

Parameters:
InstancePtr is a pointer to XEnhance instance to be worked on.
CfgPtr is a reference to a configuration structure containing information about the Enhance 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.
Returns:
  • XST_SUCCESS if initialization was successful.
Note:
None.

void XEnhance_DisableDbgBypass ( XEnhance InstancePtr  ) 

This function disables Bypass mode of the Enhance core.

Parameters:
InstancePtr is a pointer to XEnhance instance to be worked on.
Returns:
None.
Note:
Debug functionality should be enabled.

void XEnhance_DisableDbgTestPattern ( XEnhance InstancePtr  ) 

This function disables the test Pattern mode of the Enhance core.

Parameters:
InstancePtr is a pointer to XEnhance instance to be worked on.
Returns:
None.
Note:
Debug functionality should be enabled.

void XEnhance_EnableDbgByPass ( XEnhance InstancePtr  ) 

This sets the bypass bit of the control register to switch the core to bypass mode if debug is enabled in the Enhance core.

Parameters:
InstancePtr is a pointer to XEnhance instance to be worked on.
Returns:
None.
Note:
Debug functionality should be enabled..

void XEnhance_EnableDbgTestPattern ( XEnhance InstancePtr  ) 

This function sets the test-pattern mode of the Enhance core if debug features is enabled.

Parameters:
InstancePtr is a pointer to XEnhance instance to be worked on.
Returns:
None.
Note:
Debug functionality should be enabled.

void XEnhance_GetActiveSize ( XEnhance InstancePtr,
u16 *  HSize,
u16 *  VSize 
)

This function gets the number of Active Pixel per Scan line and number of Active Lines per Frame from the Active Frame Size register.

Parameters:
InstancePtr is a pointer to XEnhance instance to be worked on.
HSize is a pointer to 16-bit variable in which the number of Active Pixels per Scan Line is returned. (Range is 32 to 7680).
VSize is a pointer to 16-bit variable in which the number of Active Lines per Frame is returned. (Range is 32 to 7680).
Returns:
None.
Note:
None.

u32 XEnhance_GetDbgFrameCount ( XEnhance InstancePtr  ) 

This function gets number of frames processed since power-up or last time the core is reset.

Parameters:
InstancePtr is a pointer to XEnhance instance to be worked on.
Returns:
FrameCount is the number of frames processed since power-up.
Note:
Debug functionality should be enabled.

u32 XEnhance_GetDbgLineCount ( XEnhance InstancePtr  ) 

This function gets the number of lines processed since power-up or last time the core is reset.

Parameters:
InstancePtr is a pointer to XEnhance instance to be worked on.
Returns:
LineCount is the number of lines processed since power-up.
Note:
Debug functionality should be enabled.

u32 XEnhance_GetDbgPixelCount ( XEnhance InstancePtr  ) 

This function gets the number of pixels processed since power-up or last time the core is reset.

Parameters:
InstancePtr is a pointer to XEnhance instance to be worked on.
Returns:
PixelCount is the number of pixels processed since power-up.
Note:
Debug functionality should be enabled.

u32 XEnhance_GetEdgeStrength ( XEnhance InstancePtr  ) 

This function gets the Edge Strength value for the Enhance core.

Parameters:
InstancePtr is a pointer to XEnhance instance to be worked on.
Returns:
The amount of edge enhancement that can be controlled.
Note:
None.

u32 XEnhance_GetHaloSuppress ( XEnhance InstancePtr  ) 

This function gets the Halo Suppress value for the Enhance core.

Parameters:
InstancePtr is a pointer to XEnhance instance to be worked on.
Returns:
The amount of halo suppression that can be controlled.
Note:
None.

u32 XEnhance_GetNoiseThreshold ( XEnhance InstancePtr  ) 

This function gets the Noise Threshold value for the Enhance core.

Parameters:
InstancePtr is a pointer to XEnhance instance to be worked on.
Returns:
The amount of noise reduction that can be controlled.
Note:
None.

u32 XEnhance_GetVersion ( XEnhance InstancePtr  ) 

This function returns the contents of Version register.

Parameters:
InstancePtr is a pointer to XEnhance instance to be worked on.
Returns:
Returns the contents of the Version register.
Note:
None.

int XEnhance_IsDbgByPassEnabled ( XEnhance InstancePtr  ) 

This function gets the current status of the bypass setting of the Enhance core.

Parameters:
InstancePtr is a pointer to XEnhance instance to be worked on.
Returns:
Core debug bypass mode.
  • TRUE = Bypass mode is enabled.
  • FALSE = Bypass mode is not enabled.
Note:
Debug functionality should be enabled.

int XEnhance_IsDbgTestPatternEnabled ( XEnhance InstancePtr  ) 

This function gets the test-pattern mode if debug feature is enabled.

Parameters:
InstancePtr is a pointer to XEnhance instance to be worked on.
Returns:
Test-pattern generator mode.
  • TRUE = Test-pattern mode is enabled.
  • FALSE = Test-pattern mode is not enabled.
Note:
Debug functionality should be enabled.

void XEnhance_SetActiveSize ( XEnhance InstancePtr,
u16  HSize,
u16  VSize 
)

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

Parameters:
InstancePtr is a pointer to XEnhance instance to be worked on.
HSize is number of Active Pixels per scan line to be set. Range of HSize is 32 to 7680.
VSize is number of Active Lines per frame to be set. Range of VSize is 32 to 7680.
Returns:
None.
Note:
None.

void XEnhance_SetEdgeStrength ( XEnhance InstancePtr,
u32  Strength 
)

This function sets the Edge Strength value for the Enhance core. i.e. The amount of edge enhancement can be controlled through the programmable Enhance Strength parameter.

Parameters:
InstancePtr is a pointer to XEnhance instance to be worked on.
Strength is the value to set the Edge Strength of the core.
Returns:
None.
Note:
The larger the strength, the stronger the edge enhancement.

void XEnhance_SetHaloSuppress ( XEnhance InstancePtr,
u32  Suppress 
)

This function sets the Halo Suppress value for the Enhance core. i.e. The amount of halo suppression can be controlled through the programmable Halo Suppress parameter.

Parameters:
InstancePtr is a pointer to XEnhance instance to be worked on.
Suppress is the value to set the Suppression value.
Returns:
None.
Note:
None.

void XEnhance_SetNoiseThreshold ( XEnhance InstancePtr,
u32  Threshold 
)

This function sets the Noise Threshold value for the Enhance core The amount of noise reduction can be controlled through Noise Threshold parameter.

Parameters:
InstancePtr is a pointer to XEnhance instance to be worked on.
Threshold is the value to set the Noise Threshold.
Returns:
None.
Note:
None.

void XEnhance_Setup ( XEnhance InstancePtr  ) 

This function sets the input/output frame size in Active Size register and enables the register update.

Parameters:
InstancePtr is a pointer to XEnhance instance to be worked on.
Returns:
None.
Note:
None.

Copyright @ 1995-2014 Xilinx, Inc. All rights reserved.