Texas Instruments TMS320C64x DSP Benutzerhandbuch

Seite von 306
Example 1: Noncontinuous Frame Capture for 525/60 Format
Video Port Configuration Examples
A-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
ITU–R BT.656-4 and video port specification (Figures 4–11, 4–33, 4–34, and
Table 4–37) 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                 
*/