⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 tskprocess.c

📁 合众达DEC643的视频例程 CCS 2.20.18 开发
💻 C
字号:
/*
 *  Copyright 2003 by Texas Instruments Incorporated.
 *  All rights reserved. Property of Texas Instruments Incorporated.
 *  Restricted rights to use, duplicate or disclose this code are
 *  granted through contract.
 *  
 */
#include <std.h>
#include <stdio.h>
#include <csl.h>
#include <csl_cache.h>
#include <csl_dat.h>
#include <chan.h>
#include <scom.h>
#include <utl.h>
#include "fvid.h" 
#include "appmain.h"
#include "appThreads.h"
#include "tskProcess.h"

unsigned char t1[720*576],t2[720*576],t3[720*576],t4[720*576];
unsigned char SobelData[720*576*2];
ScomBufChannels MsgProcess;

void tskProcess()
{
   
    ScomBufChannels *pMsgBuf;            
    unsigned char *Input;
    SCOM_Handle fromInputtoProc,fromProctoInput,\
    		fromProctoOut, fromOuttoProc;
    		
    fromInputtoProc = SCOM_open("INTOPROC");
    fromProctoInput = SCOM_open("PROCTOIN");
    fromProctoOut   = SCOM_open("PROCTOOUT");
    fromOuttoProc 	= SCOM_open("OUTTOPROC");
    
    while(1)
    {
 	    /*-----------------------------------------------------------*/
	  	/* Wait for the message from  input task to recieve captured */
  		/* frame to be cycled through encoding and decoding.         */
   		/*-----------------------------------------------------------*/
	 	pMsgBuf = SCOM_getMsg(fromInputtoProc, SYS_FOREVER); 
	 
	 	Input = pMsgBuf->bufChannel;

		IMG_sobel(Input,SobelData,720,576);	   
	   	/*-----------------------------------------------------------*/
	   	/* Send the message to the input task to continue with next frame*/
	   	/*-----------------------------------------------------------*/
	    SCOM_putMsg(fromProctoInput, NULL);  	   	
	   		
	   	/*-----------------------------------------------------------*/
	   	/* Send message to output task with pointers to decoded frame*/
	   	/*-----------------------------------------------------------*/
	    MsgProcess.bufChannel = SobelData;
	   	SCOM_putMsg(fromProctoOut,&MsgProcess);
	   	
	   	/*-----------------------------------------------------------*/
	   	/* Waiting for display one frame is completed				 */
	   	/*-----------------------------------------------------------*/
	   	SCOM_getMsg(fromOuttoProc, SYS_FOREVER); 
 	}	                                                 
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -