Interpolated Control (VIC) Port Reference Guide
Example 2: Noncontinuous Frame Display for 525/60 Format
Video Port Configuration ExamplesA-12 SPRU629
/* –––––––––––––––––––––––––––––––––––––––––– */
/* Define vertical synchronization for field2 */
/* –––––––––––––––––––––––––––––––––––––––––– */
#define VD_VSYNC_XSTART2 360
#define VD_VSYNC_YSTART2 266
#define VD_VSYNC_XSTOP2 360
#define VD_VSYNC_YSTOP2 269
/* –––––––––––––––––––––––––––––––––––––––– */
/* Define image offsets for both the fields */
/* which are zero in this example */
/* –––––––––––––––––––––––––––––––––––––––– */
#define VD_IMG_HOFF1 0
#define VD_IMG_VOFF1 0
#define VD_IMG_HOFF2 0
#define VD_IMG_VOFF2 0
/* ––––––––––––––––––––––––––––––––––––––––––––––––– */
/* Define image active vertical and horizontal sizes */
/* ––––––––––––––––––––––––––––––––––––––––––––––––– */
#define VD_IMG_HSIZE1 720 /* field1 horizontal image size */
#define VD_IMG_VSIZE1 244 /* field1 vertical image size */
#define VD_IMG_HSIZE2 720 /* field2 horizontal image size */
#define VD_IMG_VSIZE2 243 /* field2 vertical image size */
/* Manipulate field1 and field2 image sizes */
#define VD_IMAGE_SIZE1 (VD_IMG_HSIZE1 * VD_IMG_VSIZE1)
#define VD_IMAGE_SIZE2 (VD_IMG_HSIZE2 * VD_IMG_VSIZE2)
/* Define threshold values in double–words. Both fields should */
/* have same threshold value */
#define VD_VDTHRLD1 (VD_IMG_HSIZE1/8) /* line length in */
#define VD_VDTHRLD2 VD_VDTHRLD1 /* double–words */
/* Define number of events to be generated for field1 and field2 */
#define VD_DISPEVT1 (VD_IMAGE_SIZE1 / (VD_VDTHRLD1 * 8))
#define VD_DISPEVT2 (VD_IMAGE_SIZE2 / (VD_VDTHRLD2 * 8))
#define DISPLAY_FRAME_COUNT 5 /* in this example */
/* –––––––––––––––––––––––––––––––––––––––––––– */
/* EDMA parameters for display Y event that are */
/* specific to this example. */
/* –––––––––––––––––––––––––––––––––––––––––––– */
#define VD_Y_EDMA_ELECNT (VD_VDTHRLD1 * 2) /* VD_VDTHRLDn is in double–words
and 32–bit element size */
#define VD_Y_EDMA_FRMCNT ((VD_DISPEVT1 + VD_DISPEVT2) *
DISPLAY_FRAME_COUNT)