Texas Instruments TMS320C64x DSP User Manual
Page 284

Example 1: Noncontinuous Frame Capture for 525/60 Format
Video Port Configuration Examples
A-8
SPRU629
/* Configure Cb EDMA channel to move data from CbSRCA
*/
/* (FIFO) to Cb–data buffer, capChaACbSpace
*/
configVPCapEDMAChannel(&hEdmaVPCapChaACb, UEvent,
&edmaCapChaACbTccNum,
vpCaptureHandle–>cbsrcaAddr,
(Uint32)capChaACbSpace,
VCA_Y_EDMA_FRMCNT,
VCA_Y_EDMA_ELECNT/2); /* (1/2) of Y–samples
*/
/* Configure Cr EDMA channel to move data from CrSRCA
*/
/* (FIFO) to Cr–data buffer, capChaACrSpace
*/
configVPCapEDMAChannel(&hEdmaVPCapChaACr, VEvent,
&edmaCapChaACrTccNum,
vpCaptureHandle–>crsrcaAddr,
(Uint32)capChaACrSpace,
VCA_Y_EDMA_FRMCNT,
VCA_Y_EDMA_ELECNT/2); /* (1/2) of Y–samples
*/
/* Enable three EDMA channels
*/
EDMA_enableChannel(hEdmaVPCapChaAY);
EDMA_enableChannel(hEdmaVPCapChaACb);
EDMA_enableChannel(hEdmaVPCapChaACr);
}
/*–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––– */
/* Function : configVPCapEDMAChannel */
/* */
/* Input(s) : edmaHandle – pointer to EDMA handle. */
/* eventId – EDMA eventId. */
/* tccNum – pointer to transfer complete number. */
/* srcAddr – source address for EDMA transfer. */
/* dstAddr – destination address for EDMA transfer */
/* frameCount – frame count. */
/* elementCount – element count(32–bit element size). */
/* */
/* Output(s): edmaHandle – edma Handle of the given event. */
/* tccNum – transfer complete code for the given */
/* event. */
/* */
/* Description : Configures the given VP capture EDMA channel. */
/* The source address update is fixed address mode */
/* because the captured data is read from the FIFO. */
/* In this example, the destination address mode is */
/* auto–increment. But, in real–time applications */
/* there is lot of flexibility in the way capture */
/* buffers can be managed like ping–pong and round */
/* robin,
…
etc. */
/*–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––– */