亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? tskprocess.c

?? DM642EVM H.263編碼例程
?? 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 "cellh263enc.h"  
#include "cellh263dec.h"  
#include "appmain.h"
#include "appThreads.h"
#include "tskProcess.h"

static unsigned char  y[FRAME_BUF_SIZE];
static unsigned char  cb[FRAME_BUF_SIZE/2];
static unsigned char  cr[FRAME_BUF_SIZE/2];
static unsigned char* yuvFrame[3] = { y, cb, cr};
static unsigned char  bitBuf[BIT_BUF_SIZE];
             

/* ======================================================================== */
/* H.263 encoder parameters for the test case                               */
/* ======================================================================== */
static volatile IH263ENC_Params h263encParams = {
sizeof(IH263ENC_Params),
    4096,                   
    25,                     
    132,                     
    4,
    4,
    31,                                          
    H263_SRCFMT_4CIF,        
    15                       
};

static ICELL_Obj  loopbackChanCells[] = {
    {
        sizeof(ICELL_Obj),
    	NULL, 
    	&H263ENC_CELLFXNS,
    	NULL,
    	(IALG_Fxns *)&H263ENC_IH263ENC,
    	(IALG_Params *)&h263encParams,
    	NULL,
    	0, 
    	NULL,
    	1,
    	NULL,
    	1
    }, 
    {
        sizeof(ICELL_Obj),
    	NULL, 
    	&H263DEC_CELLFXNS,
    	NULL,
    	(IALG_Fxns *)&H263DEC_IH263DEC,
    	NULL,
    	NULL,
    	0, 
    	NULL,
    	1,
    	NULL,
    	1
    } 

};


/*Varibale to modify the bitrate on the fly*/
volatile Bool bitRateChanged = FALSE;
volatile int bitRateTarget;

ThrProcess thrProcess;

void tskProcessInit()
{
	int chanNum;
	Bool rc;
	ICELL_Obj  *cell;
	ICC_Handle  inputIcc;
    ICC_Handle  outputIcc;
    thrProcess.bufIntermediate = bitBuf; 
    for (chanNum = 0; chanNum < PROCESSNUMCHANNELS ; chanNum++) 
    {


    /*------------------------------------------------------------*/ 
    /*  register the cells: define what will be input buffers and */
    /*  what will be output buffers for each cell.                */
    /*------------------------------------------------------------*/
                
        /*-----------------------------------------------------------*/
        /* Setup a default cell used to initialize the actual cells  */
        /*-----------------------------------------------------------*/
        ICELL_Obj    defaultCell = ICELL_DEFAULT;

        /*-----------------------------------------------------------*/
        /* Register the cell for H263 encoder                        */
        /*-----------------------------------------------------------*/
        cell = &thrProcess.cellList[ (chanNum * PROCESSNUMCHANNELS ) + CELLH263ENC];
        *cell                = defaultCell;
        cell->name           = "H263ENC";
        cell->cellFxns       = &H263ENC_CELLFXNS;            
        cell->algFxns        = (IALG_Fxns *)&H263ENC_IH263ENC;
        cell->algParams      = (IALG_Params *)&h263encParams;
        cell->scrBucketIndex = THRPROCESSSCRBUCKET;

        /*-----------------------------------------------------------*/
        /* Create the inputICC: object used as input interface to the*/ 
        /* enocoder cell                                                  */
        /*-----------------------------------------------------------*/
        inputIcc  = (ICC_Handle)ICC_linearCreate( 
                               thrProcess.bufInput[ chanNum ], 
                               sizeof(unsigned char*)*3);
        UTL_assert( inputIcc != NULL);

		/*-----------------------------------------------------------*/
        /* Create the outputICC: object used as output interface to  */ 
        /* enocoder cell                                             */
        /*-----------------------------------------------------------*/


        outputIcc = (ICC_Handle)ICC_linearCreate( 
                                            thrProcess.bufIntermediate,
                                            sizeof(BIT_BUF_SIZE));
        UTL_assert( outputIcc != NULL);

        /*------------------------------------------------------------*/
        /* Only one input and one output ICC are needed.              */
        /*------------------------------------------------------------*/
        rc = CHAN_regCell( cell, &inputIcc, 1, &outputIcc, 1 );
 
        
        /*------------------------------------------------------------*/
        /* Register the decoder cell                                  */
        /*------------------------------------------------------------*/
        cell = &thrProcess.cellList[ (chanNum * PROCESSNUMCHANNELS ) + CELLH263DEC];
        *cell                = defaultCell;
        cell->name           = "H263DEC";
        cell->cellFxns       = &H263DEC_CELLFXNS;            
        cell->algFxns        = (IALG_Fxns *)&H263DEC_IH263DEC;
        cell->algParams      = NULL;
        cell->scrBucketIndex = THRPROCESSSCRBUCKET;

   		/*-----------------------------------------------------------*/
        /* The input ICC for the decoder will be same as outputICC of*/
        /* the encoder. This is used to pass the generated bitstream *
        /* from encoder cell to decoder cell                         */ 
        /*-----------------------------------------------------------*/

        inputIcc  = outputIcc;
        UTL_assert( inputIcc != NULL);


		/*-----------------------------------------------------------*/
        /* Create the outputICC: object used as output interface to  */ 
        /* enocoder cell                                             */
        /*-----------------------------------------------------------*/
         outputIcc = (ICC_Handle)ICC_linearCreate( 
                                            thrProcess.bufOutput[chanNum],
                                            sizeof(unsigned char*)*3);
         UTL_assert( outputIcc != NULL);

        /*------------------------------------------------------------*/
        /* Only one input and one output ICC are needed.              */
        /*------------------------------------------------------------*/
        rc = CHAN_regCell( cell, &inputIcc, 1, &outputIcc, 1 );
        
        thrProcess.cellList[ (chanNum * PROCESSNUMCELLS) + CELLH263ENC].algParams = 
            (IALG_Params *)&h263encParams;
    
        UTL_logDebug1("Channel Number: %d", chanNum);
        UTL_assert( rc == TRUE );

    }

                  
}                   


/*-------------------------------------------------------*/
/* Create the channel instance : the cell algorithms will*/
/* be instantiated                                       */
/*-------------------------------------------------------*/
void tskProcessStart() 
{
		int chanNum;
		Bool rc;
		for (chanNum = 0; chanNum < PROCESSNUMCHANNELS ; chanNum++) 
		{
		
			/*------------------------------------------------------------*/
    		/* Open the channel: this causes the algorithms to be created */
            /*------------------------------------------------------------*/
			rc = CHAN_open( &thrProcess.chanList[ chanNum ], 
			                &thrProcess.cellList[ chanNum * PROCESSNUMCELLS ], 
			                PROCESSNUMCELLS ,
			                NULL );
		
		}
		UTL_assert( rc == TRUE );
}


/*-------------------------------------------------------*/
/* The task will handle the processing part :            */
/* -Will get the message from the Input task with input  */
/*  frame pointers                                       */
/* -Will execute the channel to encode followed by decode*/
/* -Will pass the decoded frame pointers to output task  */
/*-------------------------------------------------------*/

void tskProcess()
{
    int i;
    int chanNum;
    Bool rc;
    ScomBufChannels *pMsgBuf;  
    unsigned char *frame;          

    
    SCOM_Handle fromInputtoProc,fromProctoInput,fromProctoOut;
    fromInputtoProc = SCOM_open("INTOPROC");
    fromProctoInput = SCOM_open("PROCTOIN");
    fromProctoOut   = SCOM_open("PROCTOOUT");
    while(1)
    {
        for(i = 0; i<PROCESSNUMCHANNELS; i++) 
        {
        
 	     	/*-----------------------------------------------------------*/
	  		/* Wait for the message from  input task to recieve captured */
  			/* frame to be cycled through encoding and decoding.
   			/*-----------------------------------------------------------*/
	 	    pMsgBuf = SCOM_getMsg(fromInputtoProc, SYS_FOREVER);
	 	    frame = (char *)pMsgBuf->bufChannel;
	 	     
			for( chanNum = 0; chanNum < PROCESSNUMCHANNELS; chanNum++ ) 
	 	    {
	
				CHAN_Handle chanHandle = &thrProcess.chanList[ chanNum ];
	
	            /*------------------------------------------------------*/
	            /* Check if the change in the bitrate has been requested*/
	            /* Copy desired bitrate in the encoder params structure */
	            /* Call contol function to set the modified  params     */
	            /*------------------------------------------------------*/
	            if(bitRateChanged) 
	           	{
	               h263encParams.bitRate = bitRateTarget;
	 	     	   H263ENC_cellControl(&(chanHandle->cellSet[CELLH263ENC]),IH263ENC_SETPARAMS, (void *)&h263encParams);
	 	     	   bitRateChanged = FALSE;
	 	     	}
		            
	            
	            /*----------------------------------------------------------*/
	            /* Set the input ICC buffer for H263ENC cell for each channel*/
	            /*----------------------------------------------------------*/
	            ICC_setBuf(chanHandle->cellSet[CELLH263ENC].inputIcc[0],
	                       frame, 
	                       sizeof(unsigned char*)*3);
	
	            /*-------------------------------------------------------*/
	            // Set the output ICC buffer for H263DEC cell for each channel
	            /*-------------------------------------------------------*/
	            ICC_setBuf(chanHandle->cellSet[CELLH263DEC].outputIcc[0],
	                       yuvFrame,
	                       sizeof(unsigned char*)*3);
	
	            /*-------------------------------------------------------*/
	            // start the stopwatch
	            /*-------------------------------------------------------*/
	            UTL_stsStart( stsTime1 );  
	            
	            /*-------------------------------------------------------*/
	            // execute the channel
	            /*-------------------------------------------------------*/
	            rc = CHAN_execute( chanHandle, NULL );
	            UTL_assert( rc == TRUE );
	            
	            /*-------------------------------------------------------*/
	            // elapsed time goes to this STS
	            /*-------------------------------------------------------*/
	            UTL_stsStop( stsTime1 );    
	        }
	   		
	   		/*-----------------------------------------------------------*/
	   		/* Send the message to the input task to continue with next frame
	   		/*-----------------------------------------------------------*/
	   		SCOM_putMsg(fromProctoInput,&(thrProcess.scomMsgRx));  	   	
	   		
	   		/*-----------------------------------------------------------*/
	   		/* Send message to output task with pointers to decoded frame*/
	   		/*-----------------------------------------------------------*/
	   		thrProcess.scomMsgTx.bufChannel=yuvFrame;
	   		SCOM_putMsg(fromProctoOut,&(thrProcess.scomMsgTx));

 		}
 	}	                                                 
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产亚洲精品福利| 亚洲综合一二三区| 在线观看www91| 成人黄色免费短视频| 激情五月婷婷综合网| 中文字幕中文在线不卡住| 精品久久国产老人久久综合| 在线电影欧美成精品| 欧美日韩情趣电影| 色94色欧美sute亚洲13| 国产1区2区3区精品美女| 国产美女一区二区三区| 久久er精品视频| 国内精品伊人久久久久av影院| 麻豆久久一区二区| 午夜久久久影院| 亚洲永久精品国产| 日韩一级高清毛片| 欧美无人高清视频在线观看| 免费在线观看一区二区三区| 中文字幕欧美激情| 日韩女优av电影在线观看| 欧美一区二区三区在线视频| 91精品久久久久久久91蜜桃| 欧美精三区欧美精三区| 777色狠狠一区二区三区| 欧美三级韩国三级日本一级| 成人综合激情网| 成人黄色在线网站| 91尤物视频在线观看| 91性感美女视频| 欧美唯美清纯偷拍| 在线不卡一区二区| 精品久久五月天| 国产校园另类小说区| 国产精品每日更新在线播放网址| 欧美国产日本韩| 中文字幕亚洲视频| 中文字幕高清一区| 亚洲精品中文在线观看| 亚洲综合小说图片| 国产suv精品一区二区883| 99视频超级精品| 午夜影院久久久| 久久99国产乱子伦精品免费| 国产伦精品一区二区三区视频青涩 | 国产精品一区二区免费不卡 | 欧美日韩国产免费一区二区| 成人免费视频播放| 亚洲成人在线网站| 国产日产欧产精品推荐色| 久久久久久久久久久久电影| 国产欧美一区二区精品仙草咪| 国产欧美一区二区三区在线看蜜臀 | 丰满少妇在线播放bd日韩电影| 日本精品一区二区三区高清| 精品少妇一区二区三区在线播放| 欧美国产一区二区在线观看| 午夜不卡av在线| 国产精品1024| 欧美视频一区二区三区在线观看| 国产日韩视频一区二区三区| 午夜精品一区二区三区三上悠亚| 国产精品888| 欧美精品少妇一区二区三区| 中文乱码免费一区二区| 免费看欧美女人艹b| 色综合一区二区三区| 久久婷婷成人综合色| 亚洲综合色成人| 国产成人在线观看| 7777精品伊人久久久大香线蕉的| 欧美激情在线观看视频免费| 日韩不卡一区二区三区| 91免费精品国自产拍在线不卡| 久久丝袜美腿综合| 青青草国产成人av片免费| 色美美综合视频| 国产天堂亚洲国产碰碰| 日本va欧美va瓶| 欧美手机在线视频| 中文字幕亚洲视频| 国产精品一区二区在线看| 91精品久久久久久久久99蜜臂| 亚洲欧美激情视频在线观看一区二区三区| 精品一区二区三区在线观看| 欧美日韩国产精品成人| 一区二区三区中文字幕电影 | 91在线视频播放| 国产日韩欧美精品在线| 精品一区二区三区在线观看| 日韩一区二区三区三四区视频在线观看| 亚洲欧美另类久久久精品2019| 成人精品高清在线| 久久久www免费人成精品| 久久国产日韩欧美精品| 欧美一区二区三区免费在线看| 亚洲福利视频一区| 色狠狠一区二区| 亚洲女爱视频在线| eeuss鲁片一区二区三区在线看| 久久久久久夜精品精品免费| 国产专区综合网| 欧美精品一区二区在线播放 | 日韩三级免费观看| 日本亚洲欧美天堂免费| 制服丝袜亚洲色图| 日韩精品一级二级| 欧美一区二区三区四区视频| 日本中文字幕一区| 6080日韩午夜伦伦午夜伦| 日本在线播放一区二区三区| 欧美久久久久久久久久| 麻豆高清免费国产一区| 精品伦理精品一区| 精品一区二区三区免费视频| 国产亚洲欧美色| 国产传媒一区在线| 中文字幕成人在线观看| 一本一道综合狠狠老| 亚洲国产色一区| 日韩限制级电影在线观看| 久久成人久久爱| 久久久99精品免费观看| 国产91综合一区在线观看| 国产精品久99| 在线精品视频一区二区| 日韩av电影一区| 精品电影一区二区三区| 国产夫妻精品视频| 中文字幕亚洲一区二区va在线| 在线观看91精品国产入口| 成人av电影在线网| 国产精品不卡视频| 欧美亚洲尤物久久| 久久av资源网| 国产精品久久一级| 欧美视频中文一区二区三区在线观看| 肉色丝袜一区二区| 久久久久久久综合| 在线中文字幕一区| 秋霞午夜鲁丝一区二区老狼| 亚洲国产成人在线| 在线精品观看国产| 国产综合色精品一区二区三区| 国产精品你懂的在线| 欧美日韩视频在线第一区| 精品一区二区三区日韩| 亚洲精品成人悠悠色影视| 欧美精品 国产精品| 国产激情偷乱视频一区二区三区| 成人免费一区二区三区视频 | 欧美精品一区男女天堂| 色婷婷久久久久swag精品| 国产在线精品一区二区夜色| 一区二区三区日韩欧美| 久久久国产精品不卡| 欧美日韩亚洲国产综合| 国产91在线观看丝袜| 日产国产高清一区二区三区| 1000精品久久久久久久久| 日韩久久久精品| 91免费国产在线| 国产精品亚洲人在线观看| 亚洲va欧美va人人爽| 国产精品国产三级国产有无不卡| 欧美一区二区女人| 91网站最新网址| 国产精品资源在线| 性久久久久久久| 国产精品高潮久久久久无| 日韩三级免费观看| 日本精品一区二区三区高清| 国产一区美女在线| 亚洲一二三区不卡| 中文字幕亚洲在| 欧美成人r级一区二区三区| 91视视频在线直接观看在线看网页在线看| 亚洲黄色免费电影| 精品国产免费人成电影在线观看四季| av不卡在线播放| 蜜桃一区二区三区四区| 亚洲高清免费观看| 国产精品久久久久久福利一牛影视| 欧美精品1区2区3区| 欧洲精品一区二区三区在线观看| 国产一区二区三区黄视频| 亚洲一二三专区| 国产精品国产馆在线真实露脸| 欧美精品一区二区三区久久久 | 国产亚洲一区字幕| 5858s免费视频成人| 91美女视频网站| 丁香天五香天堂综合| 另类欧美日韩国产在线| 亚洲综合在线免费观看| 久久日韩精品一区二区五区| 欧美一级久久久久久久大片| 91成人在线精品| 91理论电影在线观看|