Interpolated Control (VIC) Port Reference Guide

Example 1: Noncontinuous Frame Capture for 525/60 Format
Video Port Configuration ExamplesA-2 SPRU629
A.1 Example 1: Noncontinuous Frame Capture for 525/60 Format
This is an example that explains how to configure the video port for 8-bit
BT.656 noncontinuous frame capture on channel A for 525/60 format. See
ITUR BT.656-4 and video port specification (Figures 411, 433, 434, and
Table 437) for more details on 525/60 format.
/**********************************************************/
/* Capture parameter definitions based on 525/60 format */
/**********************************************************/
#define VCA_HBLNK_SIZE 138 /* (858–720),horizontal blanking */
/* (EAV/SAV inclusive) */
#define VCA_VBLNK1_SIZE 19 /* (20–1),v.blanking for field1 */
#define VCA_VBLNK2_SIZE 19 /* (283–264),v.blanking for field2 */
#define VCA_IMG_HSIZE1 720 /* field1 horizontal image size */
#define VCA_IMG_VSIZE1 244 /* (263–20+1), fld1 vertical image size */
#define VCA_IMG_HSIZE2 720 /* field2 horizontal image size */
#define VCA_IMG_VSIZE2 243 /* (525–283+1), fld2 vertical image size */
/* Define field image sizes */
#define VCA_IMAGE_SIZE1 (VCA_IMG_HSIZE1 * VCA_IMG_VSIZE1)
#define VCA_IMAGE_SIZE2 (VCA_IMG_HSIZE2 * VCA_IMG_VSIZE2)
/* ––––––––––––––––––––––––––––––––––––––––––––––––––––––– */
/* Define channel A capture window co–ordinates for Field1 */
/* ––––––––––––––––––––––––––––––––––––––––––––––––––––––– */
/* HRST = 0, start of horizontal blanking */
#define VCA_XSTART1 (VCA_HBLNK_SIZE – 2/*EAV*/)
/* VRST = 1, end of vertical blanking */
#define VCA_YSTART1 1
#define VCA_XSTOP1 (VCA_XSTART1 + VCA_IMG_HSIZE1 – 1)
#define VCA_YSTOP1 (VCA_YSTART1 + VCA_IMG_VSIZE1 – 1)
/* ––––––––––––––––––––––––––––––––––––––––––––––––––––––– */
/* Define channel A capture window co–ordinates for Field2 */
/* ––––––––––––––––––––––––––––––––––––––––––––––––––––––– */
/* HRST = 0, start of horizontal blanking */
#define VCA_XSTART2 (VCA_HBLNK_SIZE – 2/*EAV*/)
/* VRST = 1, end of vertical blanking */
#define VCA_YSTART2 1
#define VCA_XSTOP2 (VCA_XSTART2 + VCA_IMG_HSIZE2 – 1)
#define VCA_YSTOP2 (VCA_YSTART2 + VCA_IMG_VSIZE2 – 1)
/* Define threshold values in double–words. Both fields should */
/* same threshold value) */
#define VCA_THRLD_FIELD1 (VCA_IMG_HSIZE1/8) /* line length in */
#define VCA_THRLD_FIELD2 VCA_THRLD_FIELD1 /* double–words */
/* Define number of events to be generated for field1 and field2 */
#define VCA_CAPEVT1 (VCA_IMAGE_SIZE1 / (VCA_VDTHRLD1 * 8))
#define VCA_CAPEVT2 (VCA_IMAGE_SIZE2 / (VCA_VDTHRLD2 * 8))
#define CAPCHA_FRAME_COUNT 5 /* in this example */