Texas Instruments TMS320C64x DSP User Manual

Page 279

Advertising
background image

Example 1: Noncontinuous Frame Capture for 525/60 Format

A-3

Video Port Configuration Examples

SPRU629

/* –––––––––––––––––––––––––––––––––––––––––––– */

/* EDMA parameters for capture Y event that are */

/* specific to this example. */

/* –––––––––––––––––––––––––––––––––––––––––––– */

#define VCA_Y_EDMA_ELECNT

(VCA_THRLD_FIELD1 * 2) /* because VCA_THRLD_FIELDn is

in double–words and element size is 32–bit */

#define VCA_Y_EDMA_FRMCNT

((VCA_CAPEVT1 + VCA_CAPEVT2) * CAPCHA_FRAME_COUNT)

/******************************************************************/

/* Description : 8–bit BT.656 non–continuous frame capture */

/* */

/* Some important field descriptions: */

/* */

/* CMODE = 000, 8–bit BT.656 mode */

/* CON = 0 */

/* FRAME = 1, capture frame */

/* CF2 = 0 */

/* CF1 = 0, (8–bit non–continuous frame capture) */

/* SCALE = 0, no scaling */

/* RESMPL= 0, no resampling */

/* 10BPK = X, not used in 8–bit capture */

/* EXC = 0, use EAV/SAV codes */

/* VRST = 1, end of vertical blanking */

/* HRST = 0, start of horizontal blanking */

/* FLDD = 0, 1st line EAV or FID input */

/* FINV = 0, no field invert */

/* RDFE = X, used in Raw mode only(Enable field identification) */

/* SSE = X, used in Raw mode only(Startup synch enable) */

/******************************************************************/

#include <csl_vp.h>

#include <csl_edma.h>

#include <csl_irq.h>

/*–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––– */

/* global variable declarations */

/* ––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––– */

VP_Handle vpCaptureHandle; /* handle of vp that to be configured */

Uint8 capChaAYSpace[]; /* buffer to store captured Y–data */

Uint8 capChaACbSpace[]; /* buffer to store captured Cb–data */

Uint8 capChaACrSpace[]; /* buffer to store captured Cb–data */

EDMA_Handle hEdmaVPCapChaAY;

EDMA_Handle hEdmaVPCapChaACb;

EDMA_Handle hEdmaVPCapChaACr;

Int32 edmaCapChaAYTccNum = 0; /* EDMA tcc for Y channel */

Int32 edmaCapChaACbTccNum = 0; /* EDMA tcc for Cb channel */

Int32 edmaCapChaACrTccNum = 0; /* EDMA tcc for Cb channel */

volatile Uint32 capChaAFrameCount = 0; /* no of frames captured */

Advertising