DM642 Study Notes (program notes)

Source: Internet
Author: User
Tags image line

Early November 2010 DM642 study notes

 

the use of Rite-Hite Innovative Experimental Box (ICETEK-DM642-IDK-M), mainly in the video processing part of the program notes and study questions ideas and some immature ideas ~ ~

experimental 5.6-5.19 video driver application

notes for the DM642 video driver:

/*

* Copyright 2003 by Texas Instruments Incorporated.

* All rights reserved. property of Texas Instruments Incorporated.

* Restricted rights to use, duplicate or disclose this code is

* Granted through contract.

*

*/

/* "@ (#) DDK 1.10.00.23 07-02-03 (DDK-B12)" */

#include <std.h>//If you use C language, this file must be used as the first header file

#include <tsk.h>

#include <sem.h>

#include <gio.h>

#include <csl_dat.h>

#include <csl_cache.h>//use the CSL Library, to use some of the header files, you can refer to the CSL

#include <fvid.h>//video driver header file

#include <edc.h>

#include <vport.h>

#include <vportcap.h>

#include <vportdis.h>

#include <saa7105.h>

#include <saa7115.h>

#include <evmdm642.h>//chip header file

#include "colorbar.h"//If the color scroll bar is displayed, this header file is required;

#include "Evmdm642_vcapparams.h"

#include "Evmdm642_vdisparams.h"

/* heap IDs defined in the BIOS configuration file */

extern Int externalheap;//?? Dsp/bios????? ¨??

/*

* ======== Main ========

*/

Main ()

{

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

/* Open CSL DAT module for fast copy */

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

Csl_init (); To call a function in any CSL library, you must first call the function here

Cache_clean (cache_l2all, 0, 0); Clean cache mode

Cache_setl2mode (Cache_256kcache); Setting the cache mode

Cache_enablecaching (cache_emifa_ce00); Enable Emifa CE0 Space

Cache_enablecaching (CACHE_EMIFA_CE01); Enable Emifa CE1 Space

Dat_open (Dat_chaany, Dat_pri_low, dat_open_2d); Open Data transfer

}

/*

* ======== Tskvideoloopback ========

* Video loopback function.

*/

void Tskvideoloopback ()

{

Int i;

int m_nwork;

INT status;

Fvid_handle Dischan; Set device handle

Int frames = 0;

Fvid_frame *disframebuf;

Int Numlinesdis = evmdm642_vdisparamschan.imgvsizefld1;

Sets the number of lines displayed, VGA is 480,pal to 576

Int numlinescap =EVMDM642_VCAPPARAMSCHAN.FLDYSTOP1-//Set number of acquisition rows

evmdm642_vcapparamschan.fldystrt1+1;

/* Determine whether the display area is large, or the collection area is large, take its small person */

Int numlines = (Numlinesdis > Numlinescap)? Numlinescap:numlinesdis;

#ifdef _loopback

Fvid_handle Capchan;

/* Set the number of pixels to display per line, pal to 720*/

Int numpixels = Evmdm642_vcapparamschan.fldxstop1-

evmdm642_vcapparamschan.fldxstrt1+1;

Fvid_frame *capframebuf;

/* Set the total pixels of the captured image line */

Int Caplinepitch = Evmdm642_vcapparamschan.fldxstop1-

evmdm642_vcapparamschan.fldxstrt1+1;

/* Set the total pixels to display the image line */

Int dislinepitch = evmdm642_vdisparamschan.imghsizefld1;

#ifdef _PIP

Vportcap_params evmdm642_vcapparamschan2 = Evmdm642_vcapparamschan;

Fvid_handle capChan2;

Fvid_frame *capframebuf2;

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.