video_common: Added function to check whether the video format is interlaced.

Signed-off-by: Andrei-Liviu Simion <andrei.simion@xilinx.com>
This commit is contained in:
Andrei-Liviu Simion 2015-01-12 20:22:39 -08:00 committed by Nava kishore Manne
parent 4284fbe285
commit 75cca5dda4
2 changed files with 10 additions and 0 deletions

View file

@ -80,3 +80,12 @@ u32 XVid_GetPixelClockHz(XVid_VideoMode VmId)
return ClkHz;
}
XVid_VideoFormat XVid_IsVideoFormatInterlaced(XVid_VideoMode VmId)
{
if (XVid_VideoTimingModes[VmId].Timing.F1PVTotal == 0) {
return XVID_VM_PROGRESSIVE;
}
return XVID_VM_INTERLACED;
}

View file

@ -340,5 +340,6 @@ extern const XVid_VideoTimingMode XVid_VideoTimingModes[XVID_VM_NUM_SUPPORTED];
/**************************** Function Prototypes *****************************/
u32 XVid_GetPixelClockHz(XVid_VideoMode VmId);
XVid_VideoFormat XVid_IsVideoFormatInterlaced(XVid_VideoMode VmId);
#endif /* XVID_H_ */