video_common: Added XVidC_IsInterlaced.
This function checks if a video timing with a supplied ID from the video mode table is interlaced or not. Signed-off-by: Andrei-Liviu Simion <andrei.simion@xilinx.com>
This commit is contained in:
parent
156f41affc
commit
767e6749ee
2 changed files with 28 additions and 2 deletions
|
@ -116,9 +116,10 @@ u32 XVidC_GetPixelClockHzByVmId(XVidC_VideoMode VmId)
|
|||
|
||||
/******************************************************************************/
|
||||
/**
|
||||
* This function check input video mode is interlaced/progressive.
|
||||
* This function checks if the input video mode is interlaced/progressive based
|
||||
* on its ID from the video timings table.
|
||||
*
|
||||
* @param VmId specifies the resolution id.
|
||||
* @param VmId specifies the resolution ID from the video timings table.
|
||||
*
|
||||
* @return Video format.
|
||||
* - XVIDC_VF_PROGRESSIVE
|
||||
|
@ -136,6 +137,30 @@ XVidC_VideoFormat XVidC_GetVideoFormat(XVidC_VideoMode VmId)
|
|||
return (XVIDC_VF_INTERLACED);
|
||||
}
|
||||
|
||||
/******************************************************************************/
|
||||
/**
|
||||
* This function checks if the input video mode is interlaced based on its ID
|
||||
* from the video timings table.
|
||||
*
|
||||
* @param VmId specifies the resolution ID from the video timings table.
|
||||
*
|
||||
* @return
|
||||
* - 1 if the video timing with the supplied table ID is
|
||||
* interlaced.
|
||||
* - 0 if the video timing is progressive.
|
||||
*
|
||||
* @note None.
|
||||
*
|
||||
*******************************************************************************/
|
||||
u8 XVidC_IsInterlaced(XVidC_VideoMode VmId)
|
||||
{
|
||||
if (XVidC_GetVideoFormat(VmId) == XVIDC_VF_INTERLACED) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/******************************************************************************/
|
||||
/**
|
||||
* This function returns the Video Mode ID that matches the detected input
|
||||
|
|
|
@ -370,6 +370,7 @@ typedef void (*XVidC_DelayHandler)(void *TimerPtr, u32 Delay);
|
|||
u32 XVidC_GetPixelClockHzByHVFr(u32 HTotal, u32 VTotal, u8 FrameRate);
|
||||
u32 XVidC_GetPixelClockHzByVmId(XVidC_VideoMode VmId);
|
||||
XVidC_VideoFormat XVidC_GetVideoFormat(XVidC_VideoMode VmId);
|
||||
u8 XVidC_IsInterlaced(XVidC_VideoMode VmId);
|
||||
XVidC_VideoMode XVidC_GetVideoModeId(u32 Width, u32 Height, u32 FrameRate,
|
||||
u8 IsInterlaced);
|
||||
const XVidC_VideoTimingMode* XVidC_GetVideoModeData(XVidC_VideoMode VmId);
|
||||
|
|
Loading…
Add table
Reference in a new issue