vprocss
Xilinx SDK Drivers API Documentation
Data Structures | Macros | Enumerations | Functions
xvprocss.h File Reference

Overview

Video Processing Subsystem Overview

Video Subsystem is a collection of IP cores bounded together by software to provide an abstract view of the processing pipe. It hides all the complexities of programming the underlying cores from end user.

Subsystem Driver Features

Video Subsystem supports following features

Subsystem Configurations

Two types of configurations are supported via GUI in IPI

Number of processing cores that get included in the design will depend upon the configuration selected. Static configuration parameters are stored in vprocss_g.c file that gets generated when compiling the board support package (BSP). A table is defined where each entry contains configuration information for the instances of the subsystem in the design. This information includes the elected configuration, sub-cores used and their device ID, base addresses of memory mapped devices, user specified DDR address for buffer management and address range available for subsystem frame/field buffers.

Full configuration mode includes following sub-cores in HW

Stream mode configuration mode includes following sub-cores in HW

The subsystem driver itself always includes the full software stack irrespective of the configuration selected. Generic API's are provided to interact with the subsystem and/or with the included sub-cores. At run-time the subsystem will query the static configuration and configures itself for supported use cases

Subsystem Driver Description

Subsystem driver is built upon layer 1&2 device drivers of included sub-cores Layer 1 provides API's to peek/poke registers at HW level. Layer 2 provides API's that abstract sub-core functionality, providing an easy to use feature interface

Pre-Requisite's

Subsystem Driver Usage

The subsystem driver in itself is a dormant driver that needs application SW to make use of provided API's to configure it at boot-up. Thereafter application SW is responsible to monitor the system for external impetus and call the subsystem API's to communicate the change and trigger the reconfiguration of internal data processing pipe (refer API XVprocSs_ConfigureSubsystem()) AXI Stream configuration for input/output interface is derived from the Xilinx video common driver and only the resolutions listed therein are supported at this time

Memory Requirement

For full configuration mode DDR memory is used to store video frame buffers Subsystem uses 5 frame buffers for Progressive input and 3 field buffers for interlaced input. Amount of memory required by the subsystem can be calculated by below equation

BytesPerComp

The location of these buffers in the memory is system dependent and as such must be determined by the system designer and the application code is responsible to program the base address of the buffer memory prior to initializing the subsystem. API to use is defined below

Interrupt Service

Currently no interrupts are available from the subsystem. User application is responsible for triggering processing pipe update when any change in subsystem configuration is performed at application level

Virtual Memory

This driver supports Virtual Memory. The RTOS is responsible for calculating the correct device base address in Virtual Memory space.

Threads

This driver is not thread safe. Any needs for threads or thread mutual exclusion must be satisfied by the layer above this driver.

Asserts

Asserts are used within all Xilinx drivers to enforce constraints on argument values. Asserts can be turned off on a system-wide basis by defining, at compile time, the NDEBUG identifier. By default, asserts are turned on and it is recommended that application developers leave asserts on during development.

MODIFICATION HISTORY:
Ver   Who    Date     Changes
----- ---- -------- -------------------------------------------------------
1.00  rco   08/28/15  Initial Release
 

Data Structures

struct  XVprocSs_ContextData
 
struct  XSubCore
 
struct  XVprocSs_Config
 
struct  XVprocSs
 

Macros

#define XVprocSs_GetSubsystemTopology(XVprocSsPtr)   ((XVprocSsPtr)->Config.Topology)
 
#define XVprocSs_IsConfigModeMax(XVprocSsPtr)   ((XVprocSsPtr)->Config.Topology == XVPROCSS_TOPOLOGY_FULL_FLEDGED)
 
#define XVprocSs_IsConfigModeSscalerOnly(XVprocSsPtr)   ((XVprocSsPtr)->Config.Topology == XVPROCSS_TOPOLOGY_SCALER_ONLY)
 
#define XVprocSs_IsPipModeOn(XVprocSsPtr)    ((XVprocSsPtr)->CtxtData.PipEn)
 
#define XVprocSs_IsZoomModeOn(XVprocSsPtr)    ((XVprocSsPtr)->CtxtData.ZoomEn)
 
#define XVprocSs_GetPipZoomWinHStepSize(XVprocSsPtr)   ((XVprocSsPtr)->CtxtData.PixelHStepSize)
 
#define XVprocSs_ResetPipModeFlag(XVprocSsPtr)   ((XVprocSsPtr)->CtxtData.PipEn = FALSE)
 
#define XVprocSs_ResetZoomModeFlag(XVprocSsPtr)   ((XVprocSsPtr)->CtxtData.ZoomEn = FALSE)
 
#define XVprocSs_SetStreamColorFormat(Stream, ColorFormat)   ((Stream)->ColorFormatId = ColorFormat)
 
#define XVprocSs_SetStreamColorDepth(Stream, ColorDepth)   ((Stream)->ColorDepth = ColorDepth)
 

Enumerations

enum  XVPROCSS_SUBCORE_ID
 
enum  XVprocSs_ColorChannel
 

Functions

void XVprocSs_SetFrameBufBaseaddr (XVprocSs *InstancePtr, u32 addr)
 
XVprocSs_ConfigXVprocSs_LookupConfig (u32 DeviceId)
 
int XVprocSs_CfgInitialize (XVprocSs *InstancePtr, XVprocSs_Config *CfgPtr, u32 EffectiveAddr)
 
void XVprocSs_Start (XVprocSs *InstancePtr)
 
void XVprocSs_Stop (XVprocSs *InstancePtr)
 
void XVprocSs_Reset (XVprocSs *InstancePtr)
 
int XVprocSs_SetVidStreamIn (XVprocSs *InstancePtr, const XVidC_VideoStream *StrmIn)
 
int XVprocSs_SetVidStreamOut (XVprocSs *InstancePtr, const XVidC_VideoStream *StrmOut)
 
int XVprocSs_SetStreamResolution (XVidC_VideoStream *StreamPtr, const XVidC_VideoMode VmId)
 
int XVprocSs_SetSubsystemConfig (XVprocSs *InstancePtr)
 
void XVprocSs_SetZoomMode (XVprocSs *InstancePtr, u8 OnOff)
 
void XVprocSs_SetPipMode (XVprocSs *InstancePtr, u8 OnOff)
 
void XVprocSs_SetZoomPipWindow (XVprocSs *InstancePtr, XVprocSs_Win mode, XVidC_VideoWindow *win)
 
void XVprocSs_GetZoomPipWindow (XVprocSs *InstancePtr, XVprocSs_Win mode, XVidC_VideoWindow *win)
 
void XVprocSs_UpdateZoomPipWindow (XVprocSs *InstancePtr)
 
s32 XVprocSs_GetPictureBrightness (XVprocSs *InstancePtr)
 
void XVprocSs_SetPictureBrightness (XVprocSs *InstancePtr, s32 NewValue)
 
s32 XVprocSs_GetPictureContrast (XVprocSs *InstancePtr)
 
void XVprocSs_SetPictureContrast (XVprocSs *InstancePtr, s32 NewValue)
 
s32 XVprocSs_GetPictureSaturation (XVprocSs *InstancePtr)
 
void XVprocSs_SetPictureSaturation (XVprocSs *InstancePtr, s32 NewValue)
 
s32 XVprocSs_GetPictureGain (XVprocSs *InstancePtr, XVprocSs_ColorChannel ChId)
 
void XVprocSs_SetPictureGain (XVprocSs *InstancePtr, XVprocSs_ColorChannel ChId, s32 NewValue)
 
XVidC_ColorStd XVprocSs_GetPictureColorStdIn (XVprocSs *InstancePtr)
 
void XVprocSs_SetPictureColorStdIn (XVprocSs *InstancePtr, XVidC_ColorStd NewVal)
 
XVidC_ColorStd XVprocSs_GetPictureColorStdOut (XVprocSs *InstancePtr)
 
void XVprocSs_SetPictureColorStdOut (XVprocSs *InstancePtr, XVidC_ColorStd NewVal)
 
XVidC_ColorRange XVprocSs_GetPictureColorRange (XVprocSs *InstancePtr)
 
void XVprocSs_SetPictureColorRange (XVprocSs *InstancePtr, XVidC_ColorRange NewVal)
 
int XVprocSs_SetPictureActiveWindow (XVprocSs *InstancePtr, XVidC_VideoWindow *Win)
 
void XVprocSs_SetPIPBackgroundColor (XVprocSs *InstancePtr, XLboxColorId ColorId)
 
void XVprocSs_LoadScalerCoeff (XVprocSs *InstancePtr, u32 CoreId, u16 num_phases, u16 num_taps, const short *Coeff)
 
void XVprocSs_LoadChromaResamplerCoeff (XVprocSs *InstancePtr, u32 CoreId, u16 num_taps, const short *Coeff)
 
void XVprocSs_ReportSubsystemConfig (XVprocSs *InstancePtr)
 
void XVprocSs_ReportSubsystemCoreInfo (XVprocSs *InstancePtr)
 
void XVprocSs_ReportSubcoreStatus (XVprocSs *InstancePtr, u32 SubcoreId)
 
void XVprocSs_SetUserTimerHandler (XVprocSs *InstancePtr, XVidC_DelayHandler CallbackFunc, void *CallbackRef)
 

Macro Definition Documentation

#define XVprocSs_GetPipZoomWinHStepSize (   XVprocSsPtr)    ((XVprocSsPtr)->CtxtData.PixelHStepSize)

This macro returns the Pip/Zoom window horizontal increment size.

Parameters
XVprocSsPtris a pointer to the Video Processing subsystem instance
Returns
Pixel H Step size

Referenced by XVprocSs_ReportSubsystemConfig().

#define XVprocSs_GetSubsystemTopology (   XVprocSsPtr)    ((XVprocSsPtr)->Config.Topology)

This macro returns the subsystem topology.

Parameters
XVprocSsPtris a pointer to the Video Processing subsystem instance
Returns
XVPROCSS_TOPOLOGY_FULL_FLEDGED or XVPROCSS_TOPOLOGY_SCALER_ONLY

Referenced by XVprocSs_CfgInitialize(), XVprocSs_ReportSubsystemConfig(), and XVprocSs_SetSubsystemConfig().

#define XVPROCSS_H

< prevent circular inclusions by using protection macros

#define XVprocSs_IsConfigModeMax (   XVprocSsPtr)    ((XVprocSsPtr)->Config.Topology == XVPROCSS_TOPOLOGY_FULL_FLEDGED)

This macro checks if subsystem is in Maximum (Full_Fledged) configuration.

Parameters
XVprocSsPtris a pointer to the Video Processing subsystem instance
Returns
Return 1 if condition is TRUE or 0 if FALSE

Referenced by XVprocSs_GetZoomPipWindow(), XVprocSs_ReportSubsystemConfig(), XVprocSs_SetPipMode(), XVprocSs_SetZoomMode(), XVprocSs_SetZoomPipWindow(), and XVprocSs_UpdateZoomPipWindow().

#define XVprocSs_IsConfigModeSscalerOnly (   XVprocSsPtr)    ((XVprocSsPtr)->Config.Topology == XVPROCSS_TOPOLOGY_SCALER_ONLY)

This macro checks if subsystem configuration is in Stream Mode (Scaler Only)

Parameters
XVprocSsPtris pointer to the Video Processing subsystem instance
Returns
Returns 1 if condition is TRUE or 0 if FALSE
#define XVprocSs_IsPipModeOn (   XVprocSsPtr)    ((XVprocSsPtr)->CtxtData.PipEn)

This macro returns the current state of PIP Mode stored in subsystem internal scratch pad memory.

Parameters
XVprocSsPtris a pointer to the Video Processing subsystem instance
Returns
Returns 1 if PIP mode is ON or 0 if OFF

Referenced by XVprocSs_ReportSubsystemConfig(), XVprocSs_SetupRouterDataFlow(), and XVprocSs_UpdateZoomPipWindow().

#define XVprocSs_IsZoomModeOn (   XVprocSsPtr)    ((XVprocSsPtr)->CtxtData.ZoomEn)

This macro returns the current state of Zoom Mode stored in subsystem internal scratch pad memory.

Parameters
XVprocSsPtris a pointer to the Video Processing subsystem instance
Returns
Returns 1 if ZOOM mode is ON or 0 if OFF

Referenced by XVprocSs_ReportSubsystemConfig(), and XVprocSs_SetupRouterDataFlow().

#define XVprocSs_ResetPipModeFlag (   XVprocSsPtr)    ((XVprocSsPtr)->CtxtData.PipEn = FALSE)

This macro clears the PIP mode flag stored in subsystem internal scratch pad memory.

This call has no side-effect

Parameters
XVprocSsPtris a pointer to the Video Processing subsystem instance
Returns
None
#define XVprocSs_ResetZoomModeFlag (   XVprocSsPtr)    ((XVprocSsPtr)->CtxtData.ZoomEn = FALSE)

This macro clears the ZOOM mode flag stored in subsystem internal scratch pad memory.

This call has no side-effect

Parameters
XVprocSsPtris pointer to the Video Processing subsystem instance
Returns
None
#define XVprocSs_SetStreamColorDepth (   Stream,
  ColorDepth 
)    ((Stream)->ColorDepth = ColorDepth)

This macro sets the specified stream's color depth.

It can be used to update input or output stream. This call has no side-effect in isolation For change to take effect user must trigger processing path reconfiguration by calling XVprocSs_ConfigureSubsystem()

Parameters
Streamis a pointer to the Subsystem Input or Output Stream
ColorDepthis the requested color depth
Returns
None
#define XVprocSs_SetStreamColorFormat (   Stream,
  ColorFormat 
)    ((Stream)->ColorFormatId = ColorFormat)

This macro sets the specified stream's color format.

It can be used to update input or output stream. This call has no side-effect in isolation. For change to take effect user must trigger processing path reconfiguration by calling XVprocSs_ConfigureSubsystem()

Parameters
Streamis a pointer to the Subsystem Input or Output Stream
ColorFormatis the requested color format
Returns
None

Enumeration Type Documentation

This typedef enumerates supported Color Channels.

This typedef enumerates supported subsystem configuration topology.

This typedef enumerates supported scaling modes.

Subsystem sub-core layer 2 header files Layer 2 includes Layer-1.

This typedef enumerates the AXIS Switch Port for Sub-Core connection

This typedef enumerates types of Windows (Sub-frames) available in the Subsystem.

Function Documentation

int XVprocSs_CfgInitialize ( XVprocSs InstancePtr,
XVprocSs_Config CfgPtr,
u32  EffectiveAddr 
)

This function initializes the video subsystem and included sub-cores.

This function must be called prior to using the subsystem. Initialization includes setting up the instance data for top level as well as all included sub-core therein, and ensuring the hardware is in a known stable state.

Parameters
InstancePtris a pointer to the Subsystem instance to be worked on.
CfgPtrpoints to the configuration structure associated with the subsystem instance.
EffectiveAddris 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 if initialization is successful else XST_FAILURE

References XVprocSs_Config::BaseAddress, XVprocSs_Config::ColorDepth, XVprocSs::Config, XVprocSs::CscPtr, XVprocSs::CtxtData, XVprocSs_ContextData::DeintBufAddr, XVprocSs::DeintPtr, XVprocSs::FrameBufBaseaddr, XVprocSs::HcrsmplrPtr, XVprocSs::HscalerPtr, XVprocSs::IsReady, XVprocSs::LboxPtr, XVprocSs_Config::MaxHeight, XVprocSs_Config::MaxWidth, XVprocSs_Config::NumVidComponents, RESET_MASK_IP_AXIMM, XVprocSs::RouterPtr, XVprocSs::RstAximmPtr, XVprocSs::RstAxisPtr, XVprocSs::VcrsmplrInPtr, XVprocSs::VcrsmplrOutPtr, XVprocSs::VdmaPtr, XVprocSs::VscalerPtr, XVprocSs_GetSubsystemTopology, XVprocSs_Reset(), XVprocSs_SubcoreInitCsc(), XVprocSs_SubcoreInitDeinterlacer(), XVprocSs_SubcoreInitHCrsmplr(), XVprocSs_SubcoreInitHScaler(), XVprocSs_SubcoreInitLetterbox(), XVprocSs_SubcoreInitResetAximm(), XVprocSs_SubcoreInitResetAxis(), XVprocSs_SubcoreInitRouter(), XVprocSs_SubcoreInitVCrsmpleIn(), XVprocSs_SubcoreInitVCrsmpleOut(), XVprocSs_SubcoreInitVdma(), and XVprocSs_SubcoreInitVScaler().

s32 XVprocSs_GetPictureBrightness ( XVprocSs InstancePtr)

This function returns picture brighntess setting.

Parameters
InstancePtris a pointer to the Subsystem instance to be worked on.
Returns
current value (0-100), if csc subcore is included

References XVprocSs::CscL2Reg, and XVprocSs::CscPtr.

XVidC_ColorRange XVprocSs_GetPictureColorRange ( XVprocSs InstancePtr)

This function returns picture color range for output.

Parameters
InstancePtris a pointer to the Subsystem instance to be worked on.
Returns
Current set output range, if csc core is included
  • XVIDC_CR_16_235
  • XVIDC_CR_16_240
  • XVIDC_CR_0_255 Else XVIDC_CR_UNKNOWN_RANGE

References XVprocSs::CscL2Reg, and XVprocSs::CscPtr.

XVidC_ColorStd XVprocSs_GetPictureColorStdIn ( XVprocSs InstancePtr)

This function returns picture color standard setting for input.

Parameters
InstancePtris a pointer to the Subsystem instance to be worked on.
Returns
Current set color standard, if csc core is included
  • XVIDC_BT_2020
  • XVIDC_BT_709
  • XVIDC_BT_601 Else XVIDC_BT_UNKNOWN

References XVprocSs::CscL2Reg, and XVprocSs::CscPtr.

XVidC_ColorStd XVprocSs_GetPictureColorStdOut ( XVprocSs InstancePtr)

This function returns picture color standard setting for output.

Parameters
InstancePtris a pointer to the Subsystem instance to be worked on.
Returns
Current set color standard, if csc core is included
  • XVIDC_BT_2020
  • XVIDC_BT_709
  • XVIDC_BT_601 Else XVIDC_BT_UNKNOWN

References XVprocSs::CscL2Reg, and XVprocSs::CscPtr.

s32 XVprocSs_GetPictureContrast ( XVprocSs InstancePtr)

This function returns picture contrast setting.

Parameters
InstancePtris a pointer to the Subsystem instance to be worked on.
Returns
current value (0-100), if csc subcore is included

References XVprocSs::CscL2Reg, and XVprocSs::CscPtr.

s32 XVprocSs_GetPictureGain ( XVprocSs InstancePtr,
XVprocSs_ColorChannel  ChId 
)

This function returns picture gain setting for the specified color channel.

Parameters
InstancePtris a pointer to the Subsystem instance to be worked on.
ChIdis the color channel id for which gain is requested
Returns
current value (0-100), if csc subcore is included

References XVprocSs::CscL2Reg, and XVprocSs::CscPtr.

s32 XVprocSs_GetPictureSaturation ( XVprocSs InstancePtr)

This function returns picture saturation setting.

Parameters
InstancePtris a pointer to the Subsystem instance to be worked on.
Returns
current value (0-100), if csc subcore is included

References XVprocSs::CscL2Reg, and XVprocSs::CscPtr.

void XVprocSs_GetZoomPipWindow ( XVprocSs InstancePtr,
XVprocSs_Win  mode,
XVidC_VideoWindow *  win 
)

This function reads the user defined Zoom/Pip window from scratch pad memory.

Parameters
InstancePtris a pointer to the Subsystem instance to be worked on.
modeis feature (PIP or ZOOM) whose window coordinates are to be retrieved
winis structure that will contain read window coordinates and size
Note
For Zoom mode RD client window is read from scratch pad memory For Pip mode WR client window is read from scratch pad memory This function is not applicable in Subsystem Stream Mode Configuration

References XVprocSs::CtxtData, XVprocSs_ContextData::RdWindow, XVprocSs_ContextData::WrWindow, and XVprocSs_IsConfigModeMax.

Referenced by XVprocSs_ReportSubsystemConfig().

void XVprocSs_LoadChromaResamplerCoeff ( XVprocSs InstancePtr,
u32  CoreId,
u16  num_taps,
const short *  Coeff 
)

This function enables user to load external filter coefficients for Chroma Resampler cores, independently for H & V.

Parameters
InstancePtris a pointer to the Subsystem instance to be worked on.
CoreIdis the resampler core to be worked on
  • XVPROCSS_SUBCORE_CR_H
  • XVPROCSS_SUBCORE_CR_V_IN
  • XVPROCSS_SUBCORE_CR_V_OUT
num_tapsis the taps of the resampler hw instance
Coeffis the pointer to the filter table to be loaded
Returns
None
Note
Applicable only if Resampler cores are included in the subsystem

References XVprocSs::HcrL2Reg, XVprocSs::HcrsmplrPtr, XVprocSs::VcrInL2Reg, XVprocSs::VcrOutL2Reg, XVprocSs::VcrsmplrInPtr, and XVprocSs::VcrsmplrOutPtr.

void XVprocSs_LoadScalerCoeff ( XVprocSs InstancePtr,
u32  CoreId,
u16  num_phases,
u16  num_taps,
const short *  Coeff 
)

This function enables user to load external filter coefficients for Scaler cores, independently for H & V.

Parameters
InstancePtris a pointer to the Subsystem instance to be worked on.
CoreIdis the Scaler core to be worked on
  • XVPROCSS_SUBCORE_SCALER_V
  • XVPROCSS_SUBCORE_SCALER_H
num_phasesis the number of phases supported by Scaler
num_tapsis the effective taps to be used by Scaler
Coeffis the pointer to the filter table to be loaded
Returns
None
Note
Applicable only if Scaler cores are included in the subsystem

References XVprocSs::HscalerPtr, XVprocSs::HscL2Reg, XVprocSs::VscalerPtr, and XVprocSs::VscL2Reg.

void XVprocSs_ReportSubcoreStatus ( XVprocSs InstancePtr,
u32  SubcoreId 
)

This function reports the status of specified sub-core.

Parameters
InstancePtris a pointer to the Subsystem instance to be worked on.
SubcoreIdis the subcore index from the below list
  • XVPROCSS_SUBCORE_SCALER_V
  • XVPROCSS_SUBCORE_SCALER_H
  • XVPROCSS_SUBCORE_VDMA
  • XVPROCSS_SUBCORE_LBOX
  • XVPROCSS_SUBCORE_CR_H
  • XVPROCSS_SUBCORE_CR_V_IN
  • XVPROCSS_SUBCORE_CR_V_OUT
  • XVPROCSS_SUBCORE_CSC
  • XVPROCSS_SUBCORE_DEINT
Returns
None

References XVprocSs::CscPtr, XVprocSs::CtxtData, XVprocSs::DeintPtr, XVprocSs::HcrsmplrPtr, XVprocSs::HscalerPtr, XVprocSs::LboxPtr, XVprocSs_ContextData::PixelWidthInBits, XVprocSs::VcrsmplrInPtr, XVprocSs::VcrsmplrOutPtr, XVprocSs::VdmaPtr, and XVprocSs::VscalerPtr.

void XVprocSs_ReportSubsystemConfig ( XVprocSs InstancePtr)
void XVprocSs_ReportSubsystemCoreInfo ( XVprocSs InstancePtr)

This function reports list of cores included in Video Processing Subsystem.

Parameters
InstancePtris a pointer to the Subsystem instance.
Returns
None

References XVprocSs::CscPtr, XVprocSs::DeintPtr, XVprocSs::HcrsmplrPtr, XVprocSs::HscalerPtr, XVprocSs::LboxPtr, XVprocSs::RouterPtr, XVprocSs::RstAximmPtr, XVprocSs::RstAxisPtr, XVprocSs::VcrsmplrInPtr, XVprocSs::VcrsmplrOutPtr, XVprocSs::VdmaPtr, and XVprocSs::VscalerPtr.

Referenced by XVprocSs_ReportSubsystemConfig().

void XVprocSs_Reset ( XVprocSs InstancePtr)

This function resets the video subsystem sub-cores.

There are 2 reset networks within the subsystem

  • For cores that are on AXIS interface
  • For cores that are on AXI-MM interface
Parameters
InstancePtris a pointer to the Subsystem instance to be worked on.
Returns
None

References XVprocSs::CtxtData, XVprocSs::DeintPtr, RESET_MASK_IP_AXIS, XVprocSs::RstAxisPtr, XVprocSs_ContextData::StartCore, and XVprocSs::VdmaPtr.

Referenced by XVprocSs_CfgInitialize().

void XVprocSs_SetFrameBufBaseaddr ( XVprocSs InstancePtr,
u32  addr 
)

This function sets the base address of the video frame buffers used by the subsystem instance.

Parameters
InstancePtris a pointer to the Subsystem instance to be worked on.
addris the base address of the video frame buffers
Returns
None

References XVprocSs::FrameBufBaseaddr.

int XVprocSs_SetPictureActiveWindow ( XVprocSs InstancePtr,
XVidC_VideoWindow *  Win 
)

This function sets picture active window.

Post this function call all further picture settings will apply only within the defined window. Active window gets reset everytime subsystem configuration changes

Parameters
InstancePtris a pointer to the Subsystem instance to be worked on.
Winis the pointer to window coordinates within which picture settings should be applied
Returns
XST_SUCCESS if window is valid else XST_FAILURE
Note
Applicable only if CSC core is included in the subsystem

References XVprocSs::CscPtr.

void XVprocSs_SetPictureBrightness ( XVprocSs InstancePtr,
s32  NewValue 
)

This function updates picture brighntess setting with specified value.

Parameters
InstancePtris a pointer to the Subsystem instance to be worked on.
NewValueis the new value to be written
  • Range: 0-100
Returns
None
Note
Applicable only if CSC core is included in the subsystem

References XVprocSs::CscL2Reg, and XVprocSs::CscPtr.

void XVprocSs_SetPictureColorRange ( XVprocSs InstancePtr,
XVidC_ColorRange  NewVal 
)

This function sets picture color range for output.

Parameters
InstancePtris a pointer to the Subsystem instance to be worked on.
NewValis the required color range
  • XVIDC_CR_16_235
  • XVIDC_CR_16_240
  • XVIDC_CR_0_255
Returns
None
Note
Applicable only if CSC core is included in the subsystem

References XVprocSs::CscL2Reg, and XVprocSs::CscPtr.

void XVprocSs_SetPictureColorStdIn ( XVprocSs InstancePtr,
XVidC_ColorStd  NewVal 
)

This function sets picture color standard setting for input.

Parameters
InstancePtris a pointer to the Subsystem instance to be worked on.
NewValis the required color standard
  • XVIDC_BT_2020
  • XVIDC_BT_709
  • XVIDC_BT_601
Returns
None
Note
Applicable only if CSC core is included in the subsystem

References XVprocSs::CscL2Reg, and XVprocSs::CscPtr.

void XVprocSs_SetPictureColorStdOut ( XVprocSs InstancePtr,
XVidC_ColorStd  NewVal 
)

This function sets picture color standard setting for output.

Parameters
InstancePtris a pointer to the Subsystem instance to be worked on.
NewValis the required color standard
  • XVIDC_BT_2020
  • XVIDC_BT_709
  • XVIDC_BT_601
Returns
None
Note
Applicable only if CSC core is included in the subsystem

References XVprocSs::CscL2Reg, and XVprocSs::CscPtr.

void XVprocSs_SetPictureContrast ( XVprocSs InstancePtr,
s32  NewValue 
)

This function updates picture contrast setting with specified value.

Parameters
InstancePtris a pointer to the Subsystem instance to be worked on.
NewValueis the new value to be written
  • Range: 0-100
Returns
None
Note
Applicable only if CSC core is included in the subsystem

References XVprocSs::CscL2Reg, and XVprocSs::CscPtr.

void XVprocSs_SetPictureGain ( XVprocSs InstancePtr,
XVprocSs_ColorChannel  ChId,
s32  NewValue 
)

This function updates picture gain setting with specified value.

Parameters
InstancePtris a pointer to the Subsystem instance to be worked on.
ChIdis the color channel id for which gain is to be updated
NewValueis the new value to be written
  • Range: 0-100
Returns
none
Note
Applicable only if CSC core is included in the subsystem

References XVprocSs::CscL2Reg, and XVprocSs::CscPtr.

void XVprocSs_SetPictureSaturation ( XVprocSs InstancePtr,
s32  NewValue 
)

This function updates picture saturation setting with specified value.

Parameters
InstancePtris a pointer to the Subsystem instance to be worked on.
NewValueis the new value to be written
  • Range: 0-100
Returns
None
Note
Applicable only if CSC core is included in the subsystem

References XVprocSs::CscL2Reg, and XVprocSs::CscPtr.

void XVprocSs_SetPIPBackgroundColor ( XVprocSs InstancePtr,
XLboxColorId  ColorId 
)

This function sets PIP background color.

Parameters
InstancePtris a pointer to the Subsystem instance to be worked on.
ColorIsis the requested background color
  • XLBOX_BKGND_BLACK
  • XLBOX_BKGND_WHITE
  • XLBOX_BKGND_RED
  • XLBOX_BKGND_GREEN
  • XLBOX_BKGND_BLUE
Returns
None
Note
Applicable only if Letterbox core is included in the subsystem

References XVprocSs::CtxtData, XVprocSs::LboxPtr, XVprocSs_ContextData::StrmCformat, and XVprocSs::VidIn.

void XVprocSs_SetPipMode ( XVprocSs InstancePtr,
u8  OnOff 
)

This function configures the video subsystem to enable/disable PIP feature If PIP mode is set to ON but user has not set window coordinates then half of input stream resolution at coordinates 0,0 is set as the default zoom window.

Parameters
InstancePtris a pointer to the Subsystem instance to be worked on.
OnOffis the action required
Returns
None
Note
User must call XVprocSs_ConfigureSubsystem() for change to take effect This call has not been added here such that it provides an opportunity to make the change during vertical blanking at system level. This behavior will change once shadow register support is available in sub-core IP's This function is not applicable in Subsystem Stream Mode Configuration

References XVprocSs::CtxtData, XVprocSs_ContextData::PipEn, XVprocSs_IsConfigModeMax, and XVprocSs_ContextData::ZoomEn.

int XVprocSs_SetStreamResolution ( XVidC_VideoStream *  StreamPtr,
const XVidC_VideoMode  VmId 
)

This function validates the video mode id against the supported resolutions and if successful extracts the timing information for the mode.

Parameters
StreamPtris a pointer to the video stream to be configured
VmIdis the Video Mode ID of the new resolution to be set
Returns
XST_SUCESS if successful else XST_FAILURE

Referenced by XVprocSs_SetVidStreamIn(), and XVprocSs_SetVidStreamOut().

int XVprocSs_SetSubsystemConfig ( XVprocSs InstancePtr)

This function is the entry point into the video processing subsystem driver processing path.

It will examine the instantiated subsystem configuration mode and the input and output stream configuration. Based on the available information control flow is determined and requisite sub-cores are configured to implement the supported use case

Parameters
InstancePtris a pointer to the Subsystem instance to be worked on.
Returns
XST_SUCCESS if successful else XST_FAILURE

References XVprocSs::VidIn, XVprocSs::VidOut, and XVprocSs_GetSubsystemTopology.

void XVprocSs_SetUserTimerHandler ( XVprocSs InstancePtr,
XVidC_DelayHandler  CallbackFunc,
void *  CallbackRef 
)

This function registers the user defined delay/sleep function with subsystem.

Parameters
InstancePtris a pointer to the Subsystem instance
CallbackFuncis the function pointer to the user defined delay function
CallbackRefis the pointer to timer instance used by the delay function
Returns
None

References XVprocSs::UsrDelayUs, and XVprocSs::UsrTmrPtr.

int XVprocSs_SetVidStreamIn ( XVprocSs InstancePtr,
const XVidC_VideoStream *  StrmIn 
)

This function configures the video subsystem input interface.

Parameters
InstancePtris a pointer to the Subsystem instance to be worked on.
StrmInis the pointer to input stream configuration
Returns
XST_SUCESS if successful else XST_FAILURE

References XVprocSs::VidIn, and XVprocSs_SetStreamResolution().

int XVprocSs_SetVidStreamOut ( XVprocSs InstancePtr,
const XVidC_VideoStream *  StrmOut 
)

This function configures the video subsystem output interface.

Parameters
InstancePtris a pointer to the Subsystem instance to be worked on.
StrmOutis the pointer to input stream configuration
Returns
XST_SUCESS if successful else XST_FAILURE

References XVprocSs::VidOut, and XVprocSs_SetStreamResolution().

void XVprocSs_SetZoomMode ( XVprocSs InstancePtr,
u8  OnOff 
)

This function configures the video subsystem to enable/disable ZOOM feature If ZOOM mode is set to ON but user has not set window coordinates then quarter of input stream resolution at coordinates 0,0 is set as the default zoom window.

Parameters
InstancePtris a pointer to the Subsystem instance to be worked on.
OnOffis the action required
Returns
None
Note
User must call XVprocSs_ConfigureSubsystem() for change to take effect This call has not been added here such that it provides an opportunity to make the change during vertical blanking at system level. This behavior will change once shadow register support is available in sub-core IP's This function is not applicable in Subsystem Stream Mode Configuration

References XVprocSs::CtxtData, XVprocSs_ContextData::PipEn, XVprocSs_IsConfigModeMax, and XVprocSs_ContextData::ZoomEn.

void XVprocSs_SetZoomPipWindow ( XVprocSs InstancePtr,
XVprocSs_Win  mode,
XVidC_VideoWindow *  win 
)

This function allows user to set the Zoom or PIP window.

Scratch pad memory is updated with the new window information

Parameters
InstancePtris a pointer to the Subsystem instance to be worked on.
modeis feature to be updated PIP or ZOOM
winis structure that contains window coordinates and size
Returns
None
Note
For Zoom mode RD client window is written in scratch pad memory For Pip mode WR client window is written in scratch pad memory This function is not applicable in Subsystem Stream Mode Configuration

References XVprocSs::Config, XVprocSs::CtxtData, XVprocSs_ContextData::PixelHStepSize, XVprocSs_Config::PixPerClock, XVprocSs_ContextData::RdWindow, XVprocSs::VdmaPtr, XVprocSs_ContextData::WrWindow, and XVprocSs_IsConfigModeMax.

void XVprocSs_Start ( XVprocSs InstancePtr)

This function starts the video subsystem including all sub-cores that are included in the processing pipeline for a given use-case.

Video pipe is started from back to front

Parameters
InstancePtris a pointer to the Subsystem instance to be worked on.
Returns
None
Note
Cores are started only if the corresponding start flag in the scratch pad memory is set. This allows to selectively start only those cores included in the processing chain

References XVprocSs::CscPtr, XVprocSs::CtxtData, XVprocSs::DeintPtr, XVprocSs::HcrsmplrPtr, XVprocSs::HscalerPtr, XVprocSs::LboxPtr, RESET_MASK_VIDEO_IN, XVprocSs::RstAxisPtr, XVprocSs_ContextData::StartCore, XVprocSs::VcrsmplrInPtr, XVprocSs::VcrsmplrOutPtr, XVprocSs::VdmaPtr, and XVprocSs::VscalerPtr.

Referenced by XVprocSs_SetupRouterDataFlow().

void XVprocSs_Stop ( XVprocSs InstancePtr)

This function stops the video subsystem including all sub-cores Stop the video pipe starting from front to back.

Parameters
InstancePtris a pointer to the Subsystem instance to be worked on.
Returns
None

References XVprocSs::CscPtr, XVprocSs::DeintPtr, XVprocSs::HcrsmplrPtr, XVprocSs::HscalerPtr, XVprocSs::LboxPtr, XVprocSs::VcrsmplrInPtr, XVprocSs::VcrsmplrOutPtr, XVprocSs::VdmaPtr, and XVprocSs::VscalerPtr.

void XVprocSs_UpdateZoomPipWindow ( XVprocSs InstancePtr)

This function updates the Pip/Zoom window currently on screen in-place.

This implies the video is not blanked and the new coordinates will update instantly as the function executes

Parameters
InstancePtris a pointer to the Subsystem instance to be worked on.
Returns
None
Note
This function must be called only after the respective mode (PIP/Zoom) has been enabled and user wants to move window to a new location This function is not applicable in Subsystem Stream Mode Configuration

References XVprocSs::CtxtData, XVprocSs::LboxPtr, XVprocSs::VdmaPtr, XVprocSs::VidOut, XVprocSs_ContextData::WrWindow, XVprocSs_IsConfigModeMax, and XVprocSs_IsPipModeOn.