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

? 歡迎來(lái)到蟲(chóng)蟲(chóng)下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲(chóng)蟲(chóng)下載站

?? thraudioproc.c

?? DM642平臺(tái)上的H.264源碼(可實(shí)時(shí)運(yùn)行)
?? C
字號(hào):
/*
 *  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.
 *  
 */
/* "@(#) ReferenceFrameworks 2.10.00.11 04-30-03 (swat-d15)" */
/*
 *  ======== thrAudioproc.c ========
 *
 *  Static and dynamic initialization of thread Audioproc,
 *  and its runtime procedure
 */
#include <std.h>
#include <pip.h>

#include <utl.h>            /* debug/diagnostics utility functions */

#include "appResources.h"   /* application-wide common info */
#include "appThreads.h"     /* thread-wide common info */
#include "thrAudioproc.h"   /* definition o
//#pragma DATA_SECTION(byteAudio,  ".AUDIOf thrAudioproc objects */
#include "g72x.h"   		/* definition of g.721 functions*/


//static unsigned short byteAudio[MAX_BUFFER_NUM][20];//FRAMELEN/4=20,壓縮率為4倍;
AUDIOBUFFER AudioEncBuf[2];
AUDIOBUFFER AudioDecBuf[2];
/*
 *  Static part of thread initialization
 */
struct g72x_state state_en;
struct g72x_state state_de;


int sizeAudio,codBufNum,decBufNum;
unsigned short deNum,deCnt;       /* in samples */

extern unsigned short codNum;
extern unsigned short *pAudioEncBuf;
extern unsigned short *pAudioDecBuf;//解碼空閑區(qū)指針
/* 
 *  Initialization of the thread resources structure:
 *  NULL for algorithm handles, addresses of appropriate 
 *  pipe objects for input and output pipes,
 *  NULL for globally visible temporary pointers to pipe frames,
 *  addresses of intermediate buffers for this thread,
 *  and everything else thread-specific.
 */
ThrAudioproc thrAudioproc[ NUMCHANNELS ] = {
    { /* channel #0 */
          
        /* input pipe(s) */
        &pipRx,                /* pipIn */

        /* output pipe(s) */
        &pipTx,                /* pipOut */

        /* buffer(s) */
        bufAudioproc,           /* bufInterm */
    
        /* everything else private for the thread */
        
    }, /* end channel # 0 */
};

/* 
 *  FIR filter coefficients: each channel runs a different instance of
 *  the FIR algorithm, and we initialize each instance with a different
 *  filter, i.e. with a different set of coefficients. In this example,
 *  channel #0 is a low-pass filter, and channel #1 is a hi-pass filter.
 */

/*
 *  Dynamic part of thread initialization
 */

/*
 *  ========= thrAudioprocInit ========
 *  Initialization of data structures for the thread(s), called from 
 *  appThreads.c:thrInit() at init time.
 *
 *  Here we create one instance of FIR algorithm per channel and
 *  one instance of VOL algorithm per channel. In a loop, we create
 *  parameters for algorithm instance for each channel by using the 
 *  default parameters and modifying fields that are different.
 *  (If the parameters are the same across channels, they can be
 *  created outside of the loop.)
 */
Void thrAudioprocInit( Void ) 
{
    
   g72x_init_state(&state_en);
   g72x_init_state(&state_de);
   memset(&AudioEncBuf[0].byteAudio[0][0],0x00,sizeof(AudioEncBuf));
   memset(&AudioDecBuf[0].byteAudio[0][0],0x00,sizeof(AudioDecBuf));
   pAudioEncBuf=&AudioEncBuf[0].byteAudio[0][0];
   pAudioDecBuf=&AudioDecBuf[0].byteAudio[0][0];
   codBufNum=0;
   decBufNum=0;
   codNum=0;
   deNum=0;
   deCnt=0;
   sizeAudio=80;
   
     
}    

/*
 *  Runtime thread code, invoked by the appropriate SWI object
 *  every time the object is posted
 */

/*
 *  ========= thrAudioprocRun ========
 *  The "body" of the swiAudioproc0, swiAudioproc1,... threads.
 *
 *  The single argument of this function is the channel number:
 *  0, 1, 2 etc. up to NUM_CHANNELS - 1. All the SWI objects
 *  that invoke this function pass the channel number as the
 *  argument. 
 *
 *  Based on the channel number, the thread -- the procedure --
 *  decides which thread resource object to access.
 */
Void thrAudioEncode( Arg aChan )
{
    Sample *src;
    Int     chan;
    Int i;
    //unsigned short byteCode[20];

    /*
     *  cast 'Arg' types to 'Int'. This is required on 55x large data model
     *  since Arg is not the same size as Int and Ptr in that model.
     *  On all other devices (54x, 55x small, 6x) ArgToInt is a simple cast
     */
    chan = ArgToInt( aChan );

    /*
     *  Check that the preconditions are met, that is the in-pipe 
     *  has a ready-to-consume buffer of data and the out-pipe 
     *  has a free buffer, in other words that this thread has
     *  not been posted in error.
     */
    UTL_assert( PIP_getReaderNumFrames( thrAudioproc[chan].pipIn  ) > 0 );

    /* get the full buffer from the input pipe */
    PIP_get( thrAudioproc[chan].pipIn );
    src = (Sample *)PIP_getReaderAddr( thrAudioproc[chan].pipIn );
    /* get the size in samples (the function below returns it in words) */
    sizeAudio = sizeInSamples(PIP_getReaderSize( thrAudioproc[chan].pipIn )  );
    //sizeAudio =80;
    
#if 1
	//encode and pack
    for(i=0;i<sizeAudio;i++)
    {
		src[i]=g721_encoder(src[i],&state_en);
	//dst[i]=g721_decoder(code,&state_de);
	}
	if(codNum==0)
	{
		pAudioEncBuf=&AudioEncBuf[codBufNum].byteAudio[0][0];
		codBufNum=(codBufNum==0)?1:0;
	}
	pack_output(src,&AudioEncBuf[codBufNum].byteAudio[codNum][0],sizeAudio);
	AudioEncBuf[codBufNum].frameNum[0] =codNum;
	codNum=NEXT_BUFFER_NUM(codNum);
	//SWI_andn(&swiAudioproc1,0x0001);
#endif	
	
    /* Free the receive buffer, put the transmit buffer */
    PIP_free( thrAudioproc[chan].pipIn  );
	
}
	
Void thrAudioDecode( Arg aChan )
{
	Sample  *dst;
    Int     chan;
    Int i;
    Int j;
    
    /*
     *  cast 'Arg' types to 'Int'. This is required on 55x large data model
     *  since Arg is not the same size as Int and Ptr in that model.
     *  On all other devices (54x, 55x small, 6x) ArgToInt is a simple cast
     */
    chan = ArgToInt( aChan );

    /*
     *  Check that the preconditions are met, that is the in-pipe 
     *  has a ready-to-consume buffer of data and the out-pipe 
     *  has a free buffer, in other words that this thread has
     *  not been posted in error.
     */
    UTL_assert( PIP_getWriterNumFrames( thrAudioproc[chan].pipOut ) > 0 );

    /* get the empty buffer from the out-pipe */
    PIP_alloc( thrAudioproc[chan].pipOut );
    dst = (Sample *)PIP_getWriterAddr( thrAudioproc[chan].pipOut );	
	//decode and unpack
#if 1	 
	unpack_input(&AudioDecBuf[decBufNum].byteAudio[deNum][0],dst,80);
	deNum++;	
	if(deNum>deCnt)
	{
		pAudioDecBuf=&AudioDecBuf[decBufNum].byteAudio[0][0];
		memset(pAudioDecBuf,0x00,0x150);
		decBufNum=(decBufNum==0)?1:0;
		deCnt=AudioDecBuf[decBufNum].frameNum[0];
		deNum=0;	
	} 

    for(i=0;i<80;i++)
    {
		dst[i]=g721_decoder(dst[i],&state_de);
	}
	/* For mono codecs, clear last bit in each sample from destination buffer */
	#ifdef APPMONOCODEC
	for (i = 0; i <80; i++) 
	{
		dst[i] = dst[i] & 0xfffe;
	}
	#endif
	
#endif	
    /* Record the amount of actual data being sent */
    PIP_setWriterSize( thrAudioproc[chan].pipOut, sizeInWords(sizeAudio) );
    PIP_put ( thrAudioproc[chan].pipOut );
}



?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品99久久久久久似苏梦涵 | 青青草国产成人99久久| av一区二区三区| 一色屋精品亚洲香蕉网站| 99久久精品免费看| 夜夜嗨av一区二区三区网页 | 老司机精品视频导航| 日韩欧美国产一区二区三区| 精品在线观看视频| 欧美激情一区三区| 欧洲一区在线电影| 奇米一区二区三区av| 久久先锋影音av鲁色资源网| 成人h动漫精品一区二区| 亚洲免费观看在线观看| 制服丝袜成人动漫| 国产乱对白刺激视频不卡| 国产精品大尺度| 欧美日韩激情一区| 国产美女一区二区三区| 国产精品―色哟哟| 欧美精品在线一区二区三区| 国内外精品视频| 亚洲男人的天堂网| 日韩欧美一区中文| 99精品偷自拍| 九色综合狠狠综合久久| 自拍偷自拍亚洲精品播放| 欧美乱妇23p| 国产成人综合网站| 亚洲第一福利一区| 久久精品一区二区三区不卡| 91香蕉视频黄| 精品一区二区三区在线播放| 亚洲欧美怡红院| 日韩色视频在线观看| 91丝袜美腿高跟国产极品老师| 奇米亚洲午夜久久精品| 中文字幕在线视频一区| 在线不卡中文字幕播放| 99精品黄色片免费大全| 久久99国内精品| 亚洲尤物视频在线| 国产精品人妖ts系列视频| 欧美一级欧美一级在线播放| 色综合天天天天做夜夜夜夜做| 另类小说图片综合网| 一区二区三国产精华液| 欧美韩国日本不卡| 日韩你懂的电影在线观看| 在线观看中文字幕不卡| 粉嫩在线一区二区三区视频| 青青草视频一区| 一区二区三区精密机械公司| 亚洲国产精品二十页| 欧美成人精品高清在线播放 | 日韩精品三区四区| 亚洲丝袜精品丝袜在线| 久久久精品国产免费观看同学| 777精品伊人久久久久大香线蕉| 成人a区在线观看| 国产精品亚洲第一区在线暖暖韩国| 五月婷婷久久综合| 亚洲第一福利视频在线| 亚洲卡通欧美制服中文| 亚洲丝袜另类动漫二区| 欧美激情一区二区三区在线| 2欧美一区二区三区在线观看视频| 欧美日本精品一区二区三区| 在线精品国精品国产尤物884a| av电影天堂一区二区在线| 成人免费看片app下载| 国产精品中文字幕一区二区三区| 免费在线观看精品| 日本一区中文字幕| 免费成人在线视频观看| 日本欧美一区二区三区| 日本不卡在线视频| 秋霞电影一区二区| 麻豆高清免费国产一区| 久久成人免费电影| 精品在线视频一区| 国产一区二区三区美女| 国产成人精品亚洲日本在线桃色| 国产一区欧美二区| 国产aⅴ综合色| 成人高清视频在线| 91色.com| 欧美手机在线视频| 欧美一区二区久久久| 精品日韩一区二区| 国产亚洲精品精华液| 国产欧美一区二区精品秋霞影院| 国产喂奶挤奶一区二区三区| 中文字幕欧美三区| 亚洲美女偷拍久久| 五月综合激情婷婷六月色窝| 免费成人美女在线观看.| 激情综合网av| 成人av在线播放网站| 色婷婷国产精品久久包臀| 欧美日韩在线播放三区四区| 日韩精品中文字幕在线一区| 国产亚洲欧洲一区高清在线观看| 国产精品高潮久久久久无| 亚洲国产va精品久久久不卡综合| 日韩成人免费电影| 国产美女精品人人做人人爽| 99久久国产综合精品色伊| 欧美日免费三级在线| 欧美videos大乳护士334| 国产精品丝袜黑色高跟| 香蕉成人伊视频在线观看| 久久成人久久爱| 一本色道久久加勒比精品| 欧美一级视频精品观看| 中文字幕欧美激情| 午夜激情久久久| 成人免费毛片片v| 欧美一区二区三区视频免费播放| 国产午夜精品在线观看| 亚洲图片欧美色图| 国产成人自拍在线| 欧美日韩国产不卡| 国产精品久久久久久久岛一牛影视 | 中文字幕一区二区三区在线不卡 | 欧美一区二视频| 国产精品电影一区二区| 免费成人在线网站| 91看片淫黄大片一级在线观看| 欧美一级xxx| 亚洲与欧洲av电影| 成人国产精品视频| 精品国精品国产| 亚洲国产视频网站| 国产成人自拍高清视频在线免费播放| 色婷婷国产精品综合在线观看| 久久众筹精品私拍模特| 午夜欧美在线一二页| 99久久伊人精品| 欧美激情艳妇裸体舞| 激情综合色综合久久| 欧美一区二区在线看| 亚洲一区二区高清| 91在线观看地址| 国产精品视频一二| 国产成人在线看| 欧美xxxx在线观看| 奇米一区二区三区| 欧美肥大bbwbbw高潮| 亚洲一区二区三区视频在线| 丁香啪啪综合成人亚洲小说 | 色久优优欧美色久优优| 国产丝袜欧美中文另类| 黄页视频在线91| 欧美美女视频在线观看| 亚洲主播在线播放| 色综合色综合色综合| 91黄色免费网站| 91精品免费在线观看| 亚洲成人先锋电影| 欧美午夜免费电影| 成人欧美一区二区三区黑人麻豆| 国产不卡视频在线播放| 久久夜色精品一区| 精品一区二区三区不卡| 欧美成人福利视频| 久久av资源站| 精品国产91久久久久久久妲己 | 国产成人高清在线| 国产亚洲污的网站| 成人精品免费视频| 中文字幕第一区综合| 成人ar影院免费观看视频| 国产精品国产三级国产普通话蜜臀| 成人v精品蜜桃久久一区| 亚洲色图欧美在线| 在线观看av不卡| 日韩中文字幕91| 日韩欧美亚洲一区二区| 国产一区二区伦理片| 国产午夜精品在线观看| 成人国产精品免费网站| 一区二区三区成人| 51午夜精品国产| 久久99精品国产麻豆婷婷| 欧美精品一区二区精品网| 国产电影精品久久禁18| 国产精品久久久久久久久久免费看 | 2017欧美狠狠色| 处破女av一区二区| 亚洲欧美成aⅴ人在线观看| 欧美午夜精品久久久久久孕妇| 肉色丝袜一区二区| 久久亚洲欧美国产精品乐播| 99综合影院在线| 亚洲成人一二三| 久久精品欧美日韩| 91黄色免费网站| 精彩视频一区二区三区|