vprocss
Vitis Drivers API Documentation
Overview

Enumerations

enum  XVPROCSS_VDMA_CH_UPDATE
 This typedef enumerates the VDMA channel that needs update. More...
 

Functions

void XVprocSs_VdmaStart (XVprocSs *XVprocSsPtr)
 This Function Starts the VDMA (Video Direct Memory Access) engine for the given Video Processing Subsystem instance. More...
 
void XVprocSs_VdmaStop (XVprocSs *XVprocSsPtr)
 This Function Stops the VDMA (Video Direct Memory Access) engine for the given Video Processing Subsystem instance. More...
 
void XVprocSs_VdmaReset (XVprocSs *XVprocSsPtr)
 This function resets Read and Write channels. More...
 
int XVprocSs_VdmaWriteSetup (XVprocSs *XVprocSsPtr, UINTPTR WrBaseAddress, XVidC_VideoWindow *window, u32 FrameWidth, u32 FrameHeight, u32 PixelWidthInBits)
 This function sets up the write channel. More...
 
int XVprocSs_VdmaReadSetup (XVprocSs *XVprocSsPtr, UINTPTR RdBaseAddress, XVidC_VideoWindow *window, u32 FrameWidth, u32 FrameHeight, u32 PixelWidthInBits)
 This function sets up the read channel. More...
 
int XVprocSs_VdmaStartTransfer (XVprocSs *XVprocSsPtr)
 This function starts the transfer on Read/Write channels. More...
 
void XVprocSs_VdmaSetWinToDnScaleMode (XVprocSs *XVprocSsPtr, u32 updateCh)
 This function configures the VDMA RD/WR channel for down scale mode. More...
 
void XVprocSs_VdmaSetWinToUpScaleMode (XVprocSs *XVprocSsPtr, u32 updateCh)
 This function configures the VDMA RD/WR channel for UP scale (or 1:1) mode. More...
 
void XVprocSs_VdmaDbgReportStatus (XVprocSs *XVprocSsPtr, u32 PixelWidthInBits)
 XVprocSs_VdmaDbgReportStatus - Used for reporting the status of the VDMA IP. More...
 
int XVprocSs_SubcoreInitResetAxis (XVprocSs *XVprocSsPtr)
 This function initializes the included sub-core to it's static configuration. More...
 
int XVprocSs_SubcoreInitResetAximm (XVprocSs *XVprocSsPtr)
 This function initializes the included sub-core to it's static configuration. More...
 
int XVprocSs_SubcoreInitRouter (XVprocSs *XVprocSsPtr)
 This function initializes the included sub-core to it's static configuration. More...
 
int XVprocSs_SubcoreInitCsc (XVprocSs *XVprocSsPtr)
 This function initializes the included sub-core to it's static configuration. More...
 
int XVprocSs_SubcoreInitHScaler (XVprocSs *XVprocSsPtr)
 This function initializes the included sub-core to it's static configuration. More...
 
int XVprocSs_SubcoreInitVScaler (XVprocSs *XVprocSsPtr)
 This function initializes the included sub-core to it's static configuration. More...
 
int XVprocSs_SubcoreInitHCrsmplr (XVprocSs *XVprocSsPtr)
 This function initializes the included sub-core to it's static configuration. More...
 
int XVprocSs_SubcoreInitVCrsmpleIn (XVprocSs *XVprocSsPtr)
 This function initializes the included sub-core to it's static configuration. More...
 
int XVprocSs_SubcoreInitVCrsmpleOut (XVprocSs *XVprocSsPtr)
 This function initializes the included sub-core to it's static configuration. More...
 
int XVprocSs_SubcoreInitLetterbox (XVprocSs *XVprocSsPtr)
 This function initializes the included sub-core to it's static configuration. More...
 
int XVprocSs_SubcoreInitVdma (XVprocSs *XVprocSsPtr)
 This function initializes the included sub-core to it's static configuration. More...
 
int XVprocSs_SubcoreInitDeinterlacer (XVprocSs *XVprocSsPtr)
 This function initializes the included sub-core to it's static configuration. More...
 
int XVprocSs_BuildRoutingTable (XVprocSs *XVprocSsPtr)
 This function examines the subsystem Input/Output Stream configuration and builds a routing table for the supported use-case. More...
 
void XVprocSs_ProgRouterMux (XVprocSs *XVprocSsPtr)
 This function traverses the computed routing table and sets up the AXIS switch registers, to route the stream through processing cores, in the order defined in the routing map. More...
 
void XVprocSs_SetupRouterDataFlow (XVprocSs *XVprocSsPtr)
 This function traverses the routing map built earlier and configures each sub-core in the processing path per its location in the chain. More...
 
XVprocSs_ConfigXVprocSs_LookupConfig (u32 DeviceId)
 This function looks for the device configuration based on the unique device ID. More...
 

Enumeration Type Documentation

This typedef enumerates the VDMA channel that needs update.

Function Documentation

int XVprocSs_BuildRoutingTable ( XVprocSs XVprocSsPtr)

This function examines the subsystem Input/Output Stream configuration and builds a routing table for the supported use-case.

The computed routing table is stored in the scratch pad memory

Parameters
XVprocSsPtris a pointer to the Subsystem instance to be worked on.
Returns
XST_SUCCESS if routing table can be created else XST_FAILURE

References XVprocSs_ContextData::CscIn, XVprocSs_ContextData::CscOut, XVprocSs::CtxtData, XVprocSs_ContextData::HcrIn, XVprocSs_ContextData::HcrOut, XVprocSs_ContextData::RtngTable, XVprocSs_ContextData::RtrNumCores, XVprocSs_ContextData::ScaleMode, XVprocSs_ContextData::StrmCformat, XVprocSs::VdmaPtr, XVprocSs::VidIn, XVprocSs_ContextData::VidInHeight, XVprocSs_ContextData::VidInWidth, XVprocSs::VidOut, XVPROCSS_EVT_CFG_MAX, and XVprocSs_LogWrite().

XVprocSs_Config* XVprocSs_LookupConfig ( u32  DeviceId)

This function looks for the device configuration based on the unique device ID.

The table XVprocSs_ConfigTable[] contains the configuration information for each instance of the device in the system.

Parameters
DeviceIdis the unique device ID of the device being looked up
Returns
A pointer to the configuration table entry corresponding to the given device ID, or NULL if no match is found

Referenced by XSys_Init().

void XVprocSs_ProgRouterMux ( XVprocSs XVprocSsPtr)

This function traverses the computed routing table and sets up the AXIS switch registers, to route the stream through processing cores, in the order defined in the routing map.

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

References XVprocSs::CtxtData, XVprocSs::RouterPtr, XVprocSs_ContextData::RtngTable, XVprocSs_ContextData::RtrNumCores, XVPROCSS_EVT_CFG_MAX, and XVprocSs_LogWrite().

int XVprocSs_SubcoreInitCsc ( XVprocSs XVprocSsPtr)

This function initializes the included sub-core to it's static configuration.

Parameters
XVprocSsPtris a pointer to the Subsystem instance to be worked on.
Returns
XST_SUCCESS/XST_FAILURE

References XSubCore::AddrOffset, XVprocSs_Config::BaseAddress, XVprocSs::Config, XVprocSs_Config::Csc, XVprocSs::CscPtr, XSubCore::DeviceId, XVprocSs_Config::HighAddress, XVPROCSS_EVT_CFG_CSC, and XVprocSs_LogWrite().

Referenced by XVprocSs_CfgInitialize().

int XVprocSs_SubcoreInitDeinterlacer ( XVprocSs XVprocSsPtr)

This function initializes the included sub-core to it's static configuration.

Parameters
XVprocSsPtris a pointer to the Subsystem instance to be worked on.
Returns
XST_SUCCESS/XST_FAILURE

References XSubCore::AddrOffset, XVprocSs_Config::BaseAddress, XVprocSs::Config, XVprocSs_Config::Deint, XVprocSs::DeintPtr, XSubCore::DeviceId, XVprocSs_Config::HighAddress, XVPROCSS_EVT_CFG_DEINT, and XVprocSs_LogWrite().

Referenced by XVprocSs_CfgInitialize().

int XVprocSs_SubcoreInitHCrsmplr ( XVprocSs XVprocSsPtr)

This function initializes the included sub-core to it's static configuration.

Parameters
XVprocSsPtris a pointer to the Subsystem instance to be worked on.
Returns
XST_SUCCESS/XST_FAILURE

References XSubCore::AddrOffset, XVprocSs_Config::BaseAddress, XVprocSs::Config, XSubCore::DeviceId, XVprocSs_Config::HCrsmplr, XVprocSs::HcrsmplrPtr, XVprocSs_Config::HighAddress, XVPROCSS_EVT_CFG_HCR, and XVprocSs_LogWrite().

Referenced by XVprocSs_CfgInitialize().

int XVprocSs_SubcoreInitHScaler ( XVprocSs XVprocSsPtr)

This function initializes the included sub-core to it's static configuration.

Parameters
XVprocSsPtris a pointer to the Subsystem instance to be worked on.
Returns
XST_SUCCESS/XST_FAILURE

References XSubCore::AddrOffset, XVprocSs_Config::BaseAddress, XVprocSs::Config, XSubCore::DeviceId, XVprocSs_Config::HighAddress, XVprocSs_Config::Hscale, XVprocSs::HscalerPtr, XVPROCSS_EVT_CFG_HSCALER, and XVprocSs_LogWrite().

Referenced by XVprocSs_CfgInitialize().

int XVprocSs_SubcoreInitLetterbox ( XVprocSs XVprocSsPtr)

This function initializes the included sub-core to it's static configuration.

Parameters
XVprocSsPtris a pointer to the Subsystem instance to be worked on.
Returns
XST_SUCCESS/XST_FAILURE

References XSubCore::AddrOffset, XVprocSs_Config::BaseAddress, XVprocSs::Config, XSubCore::DeviceId, XVprocSs_Config::HighAddress, XVprocSs_Config::Lbox, XVprocSs::LboxPtr, XVPROCSS_EVT_INIT_LBOX, and XVprocSs_LogWrite().

Referenced by XVprocSs_CfgInitialize().

int XVprocSs_SubcoreInitResetAximm ( XVprocSs XVprocSsPtr)

This function initializes the included sub-core to it's static configuration.

Parameters
XVprocSsPtris a pointer to the Subsystem instance to be worked on.
Returns
XST_SUCCESS/XST_FAILURE

References XSubCore::AddrOffset, XVprocSs_Config::BaseAddress, XVprocSs::Config, XSubCore::DeviceId, XVprocSs_Config::HighAddress, XVprocSs_Config::RstAximm, XVprocSs::RstAximmPtr, XVPROCSS_EVT_INIT_RESAXIM, and XVprocSs_LogWrite().

Referenced by XVprocSs_CfgInitialize().

int XVprocSs_SubcoreInitResetAxis ( XVprocSs XVprocSsPtr)

This function initializes the included sub-core to it's static configuration.

Parameters
XVprocSsPtris a pointer to the Subsystem instance to be worked on.
Returns
XST_SUCCESS/XST_FAILURE

References XSubCore::AddrOffset, XVprocSs_Config::BaseAddress, XVprocSs::Config, XSubCore::DeviceId, XVprocSs_Config::HighAddress, XVprocSs_Config::RstAxis, XVprocSs::RstAxisPtr, XVPROCSS_EVT_INIT_RESAXIS, and XVprocSs_LogWrite().

Referenced by XVprocSs_CfgInitialize().

int XVprocSs_SubcoreInitRouter ( XVprocSs XVprocSsPtr)

This function initializes the included sub-core to it's static configuration.

Parameters
XVprocSsPtris a pointer to the Subsystem instance to be worked on.
Returns
XST_SUCCESS/XST_FAILURE

References XSubCore::AddrOffset, XVprocSs_Config::BaseAddress, XVprocSs::Config, XSubCore::DeviceId, XVprocSs_Config::HighAddress, XVprocSs_Config::Router, XVprocSs::RouterPtr, XVPROCSS_EVT_INIT_ROUTER, and XVprocSs_LogWrite().

Referenced by XVprocSs_CfgInitialize().

int XVprocSs_SubcoreInitVCrsmpleIn ( XVprocSs XVprocSsPtr)

This function initializes the included sub-core to it's static configuration.

Parameters
XVprocSsPtris a pointer to the Subsystem instance to be worked on.
Returns
XST_SUCCESS/XST_FAILURE

References XSubCore::AddrOffset, XVprocSs_Config::BaseAddress, XVprocSs::Config, XSubCore::DeviceId, XVprocSs_Config::HighAddress, XVprocSs_Config::VCrsmplrIn, XVprocSs::VcrsmplrInPtr, XVPROCSS_EVT_CFG_VCRI, and XVprocSs_LogWrite().

Referenced by XVprocSs_CfgInitialize().

int XVprocSs_SubcoreInitVCrsmpleOut ( XVprocSs XVprocSsPtr)

This function initializes the included sub-core to it's static configuration.

Parameters
XVprocSsPtris a pointer to the Subsystem instance to be worked on.
Returns
XST_SUCCESS/XST_FAILURE

References XSubCore::AddrOffset, XVprocSs_Config::BaseAddress, XVprocSs::Config, XSubCore::DeviceId, XVprocSs_Config::HighAddress, XVprocSs_Config::VCrsmplrOut, XVprocSs::VcrsmplrOutPtr, XVPROCSS_EVT_CFG_VCRO, and XVprocSs_LogWrite().

Referenced by XVprocSs_CfgInitialize().

int XVprocSs_SubcoreInitVdma ( XVprocSs XVprocSsPtr)

This function initializes the included sub-core to it's static configuration.

Parameters
XVprocSsPtris a pointer to the Subsystem instance to be worked on.
Returns
XST_SUCCESS/XST_FAILURE

References XSubCore::AddrOffset, XVprocSs_Config::BaseAddress, XVprocSs::Config, XSubCore::DeviceId, XVprocSs_Config::HighAddress, XVprocSs_Config::Vdma, XVprocSs::VdmaPtr, XVPROCSS_EVT_INIT_VDMA, and XVprocSs_LogWrite().

Referenced by XVprocSs_CfgInitialize().

int XVprocSs_SubcoreInitVScaler ( XVprocSs XVprocSsPtr)

This function initializes the included sub-core to it's static configuration.

Parameters
XVprocSsPtris a pointer to the Subsystem instance to be worked on.
Returns
XST_SUCCESS/XST_FAILURE

References XSubCore::AddrOffset, XVprocSs_Config::BaseAddress, XVprocSs::Config, XSubCore::DeviceId, XVprocSs_Config::HighAddress, XVprocSs_Config::Vscale, XVprocSs::VscalerPtr, XVPROCSS_EVT_CFG_VSCALER, and XVprocSs_LogWrite().

Referenced by XVprocSs_CfgInitialize().

void XVprocSs_VdmaDbgReportStatus ( XVprocSs XVprocSsPtr,
u32  PixelWidthInBits 
)

XVprocSs_VdmaDbgReportStatus - Used for reporting the status of the VDMA IP.

This function prints debug information about the current status of the VDMA (Video Direct Memory Access) associated with the given XVprocSs instance. It reports both the read and write channel settings, including height, width, and stride, with values interpreted according to the specified pixel width in bits. The function also clears DMA channel errors and dumps relevant register values for both channels.

Parameters
XVprocSsPtr,:Pointer to the XVprocSs instance containing the VDMA pointer.
PixelWidthInBits,:The width of a pixel in bits, used to calculate bytes per pixel and interpret register values.
Returns
: None.

References XVprocSs::VdmaPtr.

Referenced by XVprocSs_ReportSubcoreStatus().

int XVprocSs_VdmaReadSetup ( XVprocSs XVprocSsPtr,
UINTPTR  RdBaseAddress,
XVidC_VideoWindow *  window,
u32  FrameWidth,
u32  FrameHeight,
u32  PixelWidthInBits 
)

This function sets up the read channel.

Parameters
XVprocSsPtris the pointer to the VPSS instance.
RdBaseAddressis the address in DDR where frame buffers are located
windowis pointer to sub-frame window
FrameWidthis the active width of the stream to be read
FrameHeightis the active height of the stream to be read
PixelWidthInBitsis Bits Per Pixel required for the stream
Returns
XST_SUCCESS if the setup is successful, XST_FAILURE otherwise.
Note
None.

References XVprocSs::VdmaPtr, XVPROCSS_EVT_CFGERR_VDMA, and XVprocSs_LogWrite().

Referenced by XVprocSs_VdmaSetWinToDnScaleMode(), and XVprocSs_VdmaSetWinToUpScaleMode().

void XVprocSs_VdmaReset ( XVprocSs XVprocSsPtr)

This function resets Read and Write channels.

Parameters
XVprocSsPtris the pointer to the VPSS instance
Returns
None

References XVprocSs::VdmaPtr, XVPROCSS_EVT_OPERR_VDMA, and XVprocSs_LogWrite().

Referenced by XVprocSs_Reset().

void XVprocSs_VdmaSetWinToDnScaleMode ( XVprocSs XVprocSsPtr,
u32  updateCh 
)

This function configures the VDMA RD/WR channel for down scale mode.

Parameters
XVprocSsPtris the pointer to the VPSS instance.
updateChdefines VDMA channel (RD/WR or RD+WR) to update
Returns
None

References XVprocSs::CtxtData, XVprocSs::FrameBufBaseaddr, XVprocSs_ContextData::PixelWidthInBits, XVprocSs::VidOut, XVprocSs_GetZoomPipWindow(), XVprocSs_IsPipModeOn, XVprocSs_VdmaReadSetup(), and XVprocSs_VdmaWriteSetup().

Referenced by XVprocSs_SetupRouterDataFlow(), and XVprocSs_UpdateZoomPipWindow().

void XVprocSs_VdmaSetWinToUpScaleMode ( XVprocSs XVprocSsPtr,
u32  updateCh 
)

This function configures the VDMA RD/WR channel for UP scale (or 1:1) mode.

Parameters
XVprocSsPtris the pointer to the VPSS instance.
updateChdefines VDMA channel (RD/WR or RD+WR) to update
Returns
None

References XVprocSs::CtxtData, XVprocSs::FrameBufBaseaddr, XVprocSs_ContextData::PixelWidthInBits, XVprocSs_ContextData::VidInHeight, XVprocSs_ContextData::VidInWidth, XVprocSs_GetZoomPipWindow(), XVprocSs_IsZoomModeOn, XVprocSs_VdmaReadSetup(), and XVprocSs_VdmaWriteSetup().

Referenced by XVprocSs_SetupRouterDataFlow(), and XVprocSs_UpdateZoomPipWindow().

void XVprocSs_VdmaStart ( XVprocSs XVprocSsPtr)

This Function Starts the VDMA (Video Direct Memory Access) engine for the given Video Processing Subsystem instance.

This function initiates both the write and read channels of the VDMA associated with the specified XVprocSs instance. It checks if the VDMA pointer is valid before starting the DMA operations.

Parameters
XVprocSsPtrPointer to the XVprocSs instance containing the VDMA configuration.
Returns
None.

References XVprocSs::VdmaPtr.

int XVprocSs_VdmaStartTransfer ( XVprocSs XVprocSsPtr)

This function starts the transfer on Read/Write channels.

Both channels must have been configured before this call is made

Parameters
XVprocSsPtris the pointer to the VPSS instance.
Returns
XST_SUCCESS if the setup is successful, XST_FAILURE otherwise.
Note
Currently the return value is ignored at subsystem level.

References XVprocSs::VdmaPtr, XVPROCSS_EVT_OPERR_VDMA, and XVprocSs_LogWrite().

Referenced by XVprocSs_Start(), and XVprocSs_UpdateZoomPipWindow().

void XVprocSs_VdmaStop ( XVprocSs XVprocSsPtr)

This Function Stops the VDMA (Video Direct Memory Access) engine for the given Video Processing Subsystem instance.

This function stops both the write and read channels of the VDMA associated with the specified XVprocSs instance. It checks if the VDMA pointer is valid before starting the DMA operations.

Parameters
XVprocSsPtrPointer to the XVprocSs instance containing the VDMA configuration.
Returns
None.

References XVprocSs::VdmaPtr.

Referenced by XVprocSs_Stop().

int XVprocSs_VdmaWriteSetup ( XVprocSs XVprocSsPtr,
UINTPTR  WrBaseAddress,
XVidC_VideoWindow *  window,
u32  FrameWidth,
u32  FrameHeight,
u32  PixelWidthInBits 
)

This function sets up the write channel.

Parameters
XVprocSsPtris the pointer to the VPSS instance.
WrBaseAddressis the address in DDR where frame buffers are located
windowis pointer to sub-frame window
FrameWidthis the active width of the stream to be written
FrameHeightis the active height of the stream to be written
PixelWidthInBitsis Bits Per Pixel required for the stream
Returns
XST_SUCCESS if the setup is successful, XST_FAILURE otherwise.

References XVprocSs::VdmaPtr, XVPROCSS_EVT_CFGERR_VDMA, and XVprocSs_LogWrite().

Referenced by XVprocSs_VdmaSetWinToDnScaleMode(), and XVprocSs_VdmaSetWinToUpScaleMode().