![]() |
vprocss
Xilinx SDK Drivers API Documentation
|
Please see xvprocss.h for more details of the driver.
MODIFICATION HISTORY:
Ver Who Date Changes ----- ---- -------- ------------------------------------------------------- 1.00 rco 08/28/15 Initial Release
VDMA Alignment required step size | |
The following constants define various Zoom/Pip window horizontal step sizes that keeps the VDMA access aligned to aximm interface width, based on Pixels/Clock and Color Depth of the configured subsystem. This is required as current version of VDMA does not support DRE if interface width is >64bits. Software has to align the hsize and stride for all possible configurations supported by the subsystem. Current subsystem version supports the following
| |
void | XVprocSs_ReportSubsystemCoreInfo (XVprocSs *InstancePtr) |
void | XVprocSs_SetUserTimerHandler (XVprocSs *InstancePtr, XVidC_DelayHandler CallbackFunc, void *CallbackRef) |
void | XVprocSs_SetFrameBufBaseaddr (XVprocSs *InstancePtr, u32 addr) |
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) |
void | XVprocSs_UpdateZoomPipWindow (XVprocSs *InstancePtr) |
void | XVprocSs_SetZoomPipWindow (XVprocSs *InstancePtr, XVprocSs_Win mode, XVidC_VideoWindow *win) |
void | XVprocSs_GetZoomPipWindow (XVprocSs *InstancePtr, XVprocSs_Win mode, XVidC_VideoWindow *win) |
void | XVprocSs_SetZoomMode (XVprocSs *InstancePtr, u8 OnOff) |
void | XVprocSs_SetPipMode (XVprocSs *InstancePtr, u8 OnOff) |
int | XVprocSs_SetSubsystemConfig (XVprocSs *InstancePtr) |
void | XVprocSs_ReportSubsystemConfig (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) |
XVidC_ColorStd | XVprocSs_GetPictureColorStdOut (XVprocSs *InstancePtr) |
void | XVprocSs_SetPictureColorStdIn (XVprocSs *InstancePtr, XVidC_ColorStd NewVal) |
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_ReportSubcoreStatus (XVprocSs *InstancePtr, u32 SubcoreId) |
#define RESET_MASK_IP_AXIMM (0x01) |
Reset line for AXI-MM blocks.
Referenced by XVprocSs_CfgInitialize().
#define RESET_MASK_IP_AXIS (0x02) |
Reset line for all video IP blocks.
Referenced by XVprocSs_Reset().
#define RESET_MASK_VIDEO_IN (0x01) |
Reset line going out of subsystem.
Referenced by XVprocSs_Start().
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.
InstancePtr | is a pointer to the Subsystem instance to be worked on. |
CfgPtr | points to the configuration structure associated with the subsystem instance. |
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. |
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.
InstancePtr | is a pointer to the Subsystem instance to be worked on. |
References XVprocSs::CscL2Reg, and XVprocSs::CscPtr.
XVidC_ColorRange XVprocSs_GetPictureColorRange | ( | XVprocSs * | InstancePtr | ) |
This function returns picture color range for output.
InstancePtr | is a pointer to the Subsystem instance to be worked on. |
References XVprocSs::CscL2Reg, and XVprocSs::CscPtr.
XVidC_ColorStd XVprocSs_GetPictureColorStdIn | ( | XVprocSs * | InstancePtr | ) |
This function returns picture color standard setting for input.
InstancePtr | is a pointer to the Subsystem instance to be worked on. |
References XVprocSs::CscL2Reg, and XVprocSs::CscPtr.
XVidC_ColorStd XVprocSs_GetPictureColorStdOut | ( | XVprocSs * | InstancePtr | ) |
This function returns picture color standard setting for output.
InstancePtr | is a pointer to the Subsystem instance to be worked on. |
References XVprocSs::CscL2Reg, and XVprocSs::CscPtr.
s32 XVprocSs_GetPictureContrast | ( | XVprocSs * | InstancePtr | ) |
This function returns picture contrast setting.
InstancePtr | is a pointer to the Subsystem instance to be worked on. |
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.
InstancePtr | is a pointer to the Subsystem instance to be worked on. |
ChId | is the color channel id for which gain is requested |
References XVprocSs::CscL2Reg, and XVprocSs::CscPtr.
s32 XVprocSs_GetPictureSaturation | ( | XVprocSs * | InstancePtr | ) |
This function returns picture saturation setting.
InstancePtr | is a pointer to the Subsystem instance to be worked on. |
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.
InstancePtr | is a pointer to the Subsystem instance to be worked on. |
mode | is feature (PIP or ZOOM) whose window coordinates are to be retrieved |
win | is structure that will contain read window coordinates and size |
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.
InstancePtr | is a pointer to the Subsystem instance to be worked on. |
CoreId | is the resampler core to be worked on
|
num_taps | is the taps of the resampler hw instance |
Coeff | is the pointer to the filter table to be loaded |
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.
InstancePtr | is a pointer to the Subsystem instance to be worked on. |
CoreId | is the Scaler core to be worked on
|
num_phases | is the number of phases supported by Scaler |
num_taps | is the effective taps to be used by Scaler |
Coeff | is the pointer to the filter table to be loaded |
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.
InstancePtr | is a pointer to the Subsystem instance to be worked on. |
SubcoreId | is the subcore index from the below list
|
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 | ) |
This function reports the subsystem HW and input/output stream configuration.
InstancePtr | is a pointer to the Subsystem instance to be worked on. |
References XVprocSs_Config::ColorDepth, XVprocSs::Config, XVprocSs_Config::MaxHeight, XVprocSs_Config::MaxWidth, XVprocSs_Config::NumVidComponents, XVprocSs_Config::PixPerClock, XVprocSs::VidIn, XVprocSs::VidOut, XVprocSs_GetPipZoomWinHStepSize, XVprocSs_GetSubsystemTopology, XVprocSs_GetZoomPipWindow(), XVprocSs_IsConfigModeMax, XVprocSs_IsPipModeOn, XVprocSs_IsZoomModeOn, and XVprocSs_ReportSubsystemCoreInfo().
void XVprocSs_ReportSubsystemCoreInfo | ( | XVprocSs * | InstancePtr | ) |
This function reports list of cores included in Video Processing Subsystem.
InstancePtr | is a pointer to the Subsystem instance. |
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
InstancePtr | is a pointer to the Subsystem instance to be worked on. |
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.
InstancePtr | is a pointer to the Subsystem instance to be worked on. |
addr | is the base address of the video frame buffers |
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
InstancePtr | is a pointer to the Subsystem instance to be worked on. |
Win | is the pointer to window coordinates within which picture settings should be applied |
References XVprocSs::CscPtr.
void XVprocSs_SetPictureBrightness | ( | XVprocSs * | InstancePtr, |
s32 | NewValue | ||
) |
This function updates picture brighntess setting with specified value.
InstancePtr | is a pointer to the Subsystem instance to be worked on. |
NewValue | is the new value to be written
|
References XVprocSs::CscL2Reg, and XVprocSs::CscPtr.
void XVprocSs_SetPictureColorRange | ( | XVprocSs * | InstancePtr, |
XVidC_ColorRange | NewVal | ||
) |
This function sets picture color range for output.
InstancePtr | is a pointer to the Subsystem instance to be worked on. |
NewVal | is the required color range
|
References XVprocSs::CscL2Reg, and XVprocSs::CscPtr.
void XVprocSs_SetPictureColorStdIn | ( | XVprocSs * | InstancePtr, |
XVidC_ColorStd | NewVal | ||
) |
This function sets picture color standard setting for input.
InstancePtr | is a pointer to the Subsystem instance to be worked on. |
NewVal | is the required color standard
|
References XVprocSs::CscL2Reg, and XVprocSs::CscPtr.
void XVprocSs_SetPictureColorStdOut | ( | XVprocSs * | InstancePtr, |
XVidC_ColorStd | NewVal | ||
) |
This function sets picture color standard setting for output.
InstancePtr | is a pointer to the Subsystem instance to be worked on. |
NewVal | is the required color standard
|
References XVprocSs::CscL2Reg, and XVprocSs::CscPtr.
void XVprocSs_SetPictureContrast | ( | XVprocSs * | InstancePtr, |
s32 | NewValue | ||
) |
This function updates picture contrast setting with specified value.
InstancePtr | is a pointer to the Subsystem instance to be worked on. |
NewValue | is the new value to be written
|
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.
InstancePtr | is a pointer to the Subsystem instance to be worked on. |
ChId | is the color channel id for which gain is to be updated |
NewValue | is the new value to be written
|
References XVprocSs::CscL2Reg, and XVprocSs::CscPtr.
void XVprocSs_SetPictureSaturation | ( | XVprocSs * | InstancePtr, |
s32 | NewValue | ||
) |
This function updates picture saturation setting with specified value.
InstancePtr | is a pointer to the Subsystem instance to be worked on. |
NewValue | is the new value to be written
|
References XVprocSs::CscL2Reg, and XVprocSs::CscPtr.
void XVprocSs_SetPIPBackgroundColor | ( | XVprocSs * | InstancePtr, |
XLboxColorId | ColorId | ||
) |
This function sets PIP background color.
InstancePtr | is a pointer to the Subsystem instance to be worked on. |
ColorIs | is the requested background color
|
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.
InstancePtr | is a pointer to the Subsystem instance to be worked on. |
OnOff | is the action required |
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.
StreamPtr | is a pointer to the video stream to be configured |
VmId | is the Video Mode ID of the new resolution to be set |
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
InstancePtr | is a pointer to the Subsystem instance to be worked on. |
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.
InstancePtr | is a pointer to the Subsystem instance |
CallbackFunc | is the function pointer to the user defined delay function |
CallbackRef | is the pointer to timer instance used by the delay function |
References XVprocSs::UsrDelayUs, and XVprocSs::UsrTmrPtr.
int XVprocSs_SetVidStreamIn | ( | XVprocSs * | InstancePtr, |
const XVidC_VideoStream * | StrmIn | ||
) |
This function configures the video subsystem input interface.
InstancePtr | is a pointer to the Subsystem instance to be worked on. |
StrmIn | is the pointer to input stream configuration |
References XVprocSs::VidIn, and XVprocSs_SetStreamResolution().
int XVprocSs_SetVidStreamOut | ( | XVprocSs * | InstancePtr, |
const XVidC_VideoStream * | StrmOut | ||
) |
This function configures the video subsystem output interface.
InstancePtr | is a pointer to the Subsystem instance to be worked on. |
StrmOut | is the pointer to input stream configuration |
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.
InstancePtr | is a pointer to the Subsystem instance to be worked on. |
OnOff | is the action required |
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
InstancePtr | is a pointer to the Subsystem instance to be worked on. |
mode | is feature to be updated PIP or ZOOM |
win | is structure that contains window coordinates and size |
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
InstancePtr | is a pointer to the Subsystem instance to be worked on. |
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.
InstancePtr | is a pointer to the Subsystem instance to be worked on. |
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
InstancePtr | is a pointer to the Subsystem instance to be worked on. |
References XVprocSs::CtxtData, XVprocSs::LboxPtr, XVprocSs::VdmaPtr, XVprocSs::VidOut, XVprocSs_ContextData::WrWindow, XVprocSs_IsConfigModeMax, and XVprocSs_IsPipModeOn.
XVprocSs_SubCores subcoreRepo |
Define Driver instance of all sub-core included in the design.