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

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

?? player.c

?? G.711,G.723.1,G.726,G.729,GSM CODEC C/C++ code
?? C
?? 第 1 頁 / 共 2 頁
字號:
/*////////////////////////////////////////////////////////////////////////
//
// INTEL CORPORATION PROPRIETARY INFORMATION
// This software is supplied under the terms of a license agreement or
// nondisclosure agreement with Intel Corporation and may not be copied
// or disclosed except in accordance with the terms of that agreement.
// Copyright (c) 2005 Intel Corporation. All Rights Reserved.
//
//   Intel(R)  Integrated Performance Primitives
//
//     USC speech codec sample
//
// By downloading and installing this sample, you hereby agree that the
// accompanying Materials are being provided to you under the terms and
// conditions of the End User License Agreement for the Intel(R) Integrated
// Performance Primitives product previously accepted by you. Please refer
// to the file ipplic.htm located in the root directory of your Intel(R) IPP
// product installation for more information.
//
// Purpose: Speech sample. Main program file.
//
////////////////////////////////////////////////////////////////////////*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "ippcore.h"
#include "ipps.h"
#include "ippsc.h"

#ifdef USE_PLUGINS
#include "vm_shared_object.h"
#endif /*USE_PLUGINS*/

#include "usc.h"

#include "util.h"
#include "loadcodec.h"
#include "wavfile.h"
#include "usccodec.h"
#include "platform.h"

#define LOAD_CODEC_FAIL     1
#define FOPEN_FAIL          2
#define MEMORY_FAIL         3
#define UNKNOWN_FORMAT      4
#define USC_CALL_FAIL       5


#define COPYRIGHT_STRING "Copyright (c) 2005 Intel Corporation. All Rights Reserved."
MeasureIt measure;
int ProcessOneFrameOneChannel(USCParams *uscPrms, char *inputBuffer,
                              char *outputBuffer, int *pSrcLenUsed, int *pDstLenUsed, int channel)
{
   int frmlen, infrmLen, FrmDataLen;
   USC_PCMStream PCMStream;
   USC_Bitstream Bitstream;
   if(uscPrms->pInfo.params.direction==0) {
      /*Do the pre-procession of the frame*/
      infrmLen = USCEncoderPreProcessFrame(uscPrms, inputBuffer,
                                             outputBuffer,&PCMStream,&Bitstream);
      /*Encode one frame*/
      measure_start(&measure);
      FrmDataLen = USCCodecEncode(uscPrms, &PCMStream,&Bitstream,channel);
      measure_pause(&measure);
      if(FrmDataLen < 0) return USC_CALL_FAIL;
      infrmLen += FrmDataLen;
      /*Do the post-procession of the frame*/
      frmlen = USCEncoderPostProcessFrame(uscPrms, inputBuffer,
                                             outputBuffer,&PCMStream,&Bitstream);
      *pSrcLenUsed = infrmLen;
      *pDstLenUsed = frmlen;
   } else {
      /*Do the pre-procession of the frame*/
      infrmLen = USCDecoderPreProcessFrame(uscPrms, inputBuffer,
                                             outputBuffer,&Bitstream,&PCMStream);
      /*Decode one frame*/
      measure_start(&measure);
      FrmDataLen = USCCodecDecode(uscPrms, &Bitstream,&PCMStream,channel);
      measure_pause(&measure);
      if(FrmDataLen < 0) return USC_CALL_FAIL;
      infrmLen += FrmDataLen;
      /*Do the post-procession of the frame*/
      frmlen = USCDecoderPostProcessFrame(uscPrms, inputBuffer,
                                             outputBuffer,&Bitstream,&PCMStream);
      *pSrcLenUsed = infrmLen;
      *pDstLenUsed = frmlen;
   }
   return 0;
}
#define MAX_LEN(a,b) ((a)>(b))? (a):(b)
int ProcessOneChannel(LoadedCodec *codec, WaveFileParams *wfOutputParams, char *inputBuffer,
                              int inputLen, char *outputBuffer, int *pDuration, int *dstLen)
{
   int duration=0, outLen = 0, currLen;
   char *pInputBuffPtr = inputBuffer;
   int frmlen, infrmLen, cvtLen;
   int lLowBound;
   currLen = inputLen;

   USCCodecGetTerminationCondition(&codec->uscParams, &lLowBound);

   while(currLen > lLowBound) {
      ProcessOneFrameOneChannel(&codec->uscParams, pInputBuffPtr,
                              outputBuffer, &infrmLen, &frmlen,SINGLE_CHANNEL);
      /* Write encoded data to the output file*/
      cvtLen = frmlen;
      if((wfOutputParams->waveFmt.nFormatTag==ALAW_PCM)||(wfOutputParams->waveFmt.nFormatTag==MULAW_PCM)) {
         USC_CvtToLaw(&codec->uscParams, wfOutputParams->waveFmt.nFormatTag, outputBuffer, &cvtLen);
      }
      WavFileWrite(wfOutputParams, outputBuffer, cvtLen);
      /* Move pointer to the next position*/
      currLen -= infrmLen;
      pInputBuffPtr += infrmLen;
      duration += MAX_LEN(infrmLen,frmlen);
      outLen += frmlen;
   }

   *pDuration = duration;
   *dstLen = outLen;
   return 0;
}

#if defined( _WIN32_WCE )
#define WINCE_CMDLINE_SIZE 512
#define WINCE_EXENAME_SIZE 128
#define WINCE_NCMD_PARAMS   16
int parseCmndLine( char* exename, const char* cmndline, char* line, int linelen, char** argv, int argvlen ) {
   int i;
   char* token;
   char* seps = " ,";                     /* argement separators */
   int argc = 1;                          /* number of parameters */
   for (i=0; i<argvlen; i++) argv[i] = NULL;
   argv[0] = exename;                     /* the first standard argument */
   memset( line, 0, linelen );
   strncpy( line, cmndline, linelen-1 );
   token = strtok( line, seps );          /* the first true argument */
   while( token != NULL && argc <= argvlen ) {
      argv[argc++] = token;
      token = strtok( NULL, seps );
   }
   return argc;
}

int WINAPI WinMain( HINSTANCE hinst, HINSTANCE xxx, LPWSTR lpCmdLine, int yyy )
{
   char line[WINCE_CMDLINE_SIZE];                     /* to copy command line */
   char* argvv[WINCE_NCMD_PARAMS];
   char** argv=argvv;

   wchar_t wexename[WINCE_EXENAME_SIZE];
   char exename[WINCE_EXENAME_SIZE];
   char cmdline[WINCE_CMDLINE_SIZE];

   /* simulate argc and argv parameters */
   int argc;
#else /*Other OS*/
int main(int argc, char *argv[])
{
#endif /*_WIN32_WCE*/
   int lCallResult, encode;
   int PCMType = -1;
   LoadedCodec codec;
   WaveFileParams wfInputParams;
   WaveFileParams wfOutputParams;
   CommandLineParams clParams;
   char *inputBuffer=NULL;
   char *outputBuffer=NULL;
   int currLen, duration;
   const  IppLibraryVersion *verIppSC;
   float spSeconds;
   FILE *f_log=NULL;

#if defined( _WIN32_WCE )

   GetModuleFileName( hinst, wexename, WINCE_EXENAME_SIZE );
   sprintf( exename, "%ls", wexename );
   sprintf( cmdline, "%ls", lpCmdLine );
   argc = parseCmndLine( exename, cmdline, line, WINCE_CMDLINE_SIZE, argv, WINCE_NCMD_PARAMS );

#endif
   /*
      Dynamic re-linkage from PX to target IPP library,
      need only if codec was linked with ippmerged lib
   */

   ippStaticInit();

#ifdef USE_PLUGINS
   codec.handleCodecDLL = NULL;
   codec.handleFormatDLL = NULL;
#endif /*USE_PLUGINS*/

   SetCommandLineByDefault(&clParams);
   /*Get params from comman line.*/
   ReadCommandLine(&clParams, argc, argv);
   if(clParams.puttologfile) {
      f_log=fopen(clParams.logFileName,"a");
      if(f_log==NULL) {
         printf("Cannot open %s log file for writing\n",clParams.logFileName);
         printf("Log file ignored.\n");
         clParams.puttologfile = 0;
      }
   }

   if(clParams.optionReport) {
      verIppSC = ippscGetLibVersion();
      if(clParams.puttologfile) {
         fprintf(f_log,"%s\n",COPYRIGHT_STRING);
         fprintf(f_log,"Intel Unified Speech Codec interface based console player\n");
         fprintf(f_log,"The Intel(R) IPPSC library used:  %d.%d.%d Build %d, name %s\n",
             verIppSC->major,verIppSC->minor,verIppSC->majorBuild,verIppSC->build,verIppSC->Name);
      } else {
         printf("%s\n",COPYRIGHT_STRING);
         printf("Intel Unified Speech Codec interface based console player\n");
         printf("The Intel(R) IPPSC library used:  %d.%d.%d Build %d, name %s\n",
             verIppSC->major,verIppSC->minor,verIppSC->majorBuild,verIppSC->build,verIppSC->Name);
      }
   }

   if(clParams.enumerate) {
      EnumerateStaticLinkedCodecs(f_log);
      if(f_log) fclose(f_log);
      return 0;
   }

   if((!clParams.inputFileName[0]) ||(!clParams.outputFileName[0])) {
      PrintUsage();
      return 0;
   }
   /*Open inpuit file and read header*/
   InitWavFile(&wfInputParams);
   lCallResult = OpenWavFile(&wfInputParams, clParams.inputFileName, FILE_READ);
   if(lCallResult==-1) {
      if(clParams.puttologfile) {
         fprintf(f_log,"Cannot open %s file for reading\n",clParams.inputFileName);
      } else {
         printf("Cannot open %s file for reading\n",clParams.inputFileName);
      }
      if(f_log) fclose(f_log);
      return FOPEN_FAIL;
   }
   /*Read WAVE file header*/
   lCallResult = WavFileReadHeader(&wfInputParams);
   if(lCallResult<0) {
      if(clParams.puttologfile) {
         if(lCallResult==-1) fprintf(f_log,"Couldn't read from the %s file\n",clParams.inputFileName);
         if(lCallResult==-2) fprintf(f_log,"File %s isn't in RIFF format\n",clParams.inputFileName);
         if(lCallResult==-3) fprintf(f_log,"File %s is in RIFF format but not in a WAVE foramt\n",
                                       clParams.inputFileName);
      } else {
         if(lCallResult==-1) printf("Couldn't read from the %s file\n",clParams.inputFileName);
         if(lCallResult==-2) printf("File %s isn't in RIFF format\n",clParams.inputFileName);
         if(lCallResult==-3) printf("File %s is in RIFF format but not in a WAVE foramt\n",
                                       clParams.inputFileName);

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久九九久久九九| 97久久超碰国产精品| 国产人久久人人人人爽| 欧美最猛性xxxxx直播| 国产一区二区免费视频| 亚洲国产精品麻豆| 国产精品国产a| ww亚洲ww在线观看国产| 欧美日韩高清在线播放| 99久久99久久久精品齐齐| 成人免费看片app下载| 中文字幕精品一区二区精品绿巨人 | 一区二区在线电影| www国产精品av| 日韩一区二区精品| 欧美日韩国产首页在线观看| 91年精品国产| www.欧美日韩国产在线| 国产最新精品免费| 日韩不卡免费视频| 视频一区二区三区在线| 亚洲精品视频免费观看| 中文字幕一区二区三| 国产调教视频一区| 精品日韩欧美在线| 日韩欧美国产综合一区| 51精品国自产在线| 69久久夜色精品国产69蝌蚪网| 在线观看欧美黄色| 欧美性受xxxx黑人xyx性爽| 99久久婷婷国产综合精品电影| 国产精品91一区二区| 欧美福利视频一区| 日韩精品电影一区亚洲| 在线观看视频欧美| www.欧美日韩| 成人国产免费视频| 成人午夜激情片| 国产露脸91国语对白| 久久99久久99小草精品免视看| 天堂一区二区在线免费观看| 视频一区二区中文字幕| 日韩av一级电影| 热久久免费视频| 蜜桃传媒麻豆第一区在线观看| 免费欧美高清视频| 激情综合网最新| 国产精品77777| 成人午夜电影网站| 不卡视频在线观看| 色婷婷久久99综合精品jk白丝| 91成人在线观看喷潮| 欧美日韩高清影院| 欧美大度的电影原声| 久久精品免视看| 成人欧美一区二区三区白人| 亚洲啪啪综合av一区二区三区| 一区二区三区国产豹纹内裤在线| 一区二区三区四区蜜桃| 偷拍自拍另类欧美| 狠狠色综合色综合网络| 国产成人av网站| 91丨九色丨蝌蚪富婆spa| 欧美男人的天堂一二区| 久久综合色之久久综合| 亚洲特黄一级片| 日韩精品电影在线| 国产成人综合视频| 欧美在线小视频| 日韩美女一区二区三区四区| 国产欧美一区视频| 亚洲自拍偷拍网站| 激情欧美日韩一区二区| 99re成人在线| 欧美一区欧美二区| 日本一区二区免费在线观看视频 | 精品伦理精品一区| 国产精品高清亚洲| 午夜免费久久看| 国产精品18久久久久久久久久久久 | 国产成人精品www牛牛影视| 欧美综合视频在线观看| 欧美va亚洲va| 亚洲综合免费观看高清在线观看| 午夜精品久久久久久久| 国产精品12区| 欧美精品一二三四| 国产精品伦一区| 青青草国产成人99久久| 99re亚洲国产精品| 久久―日本道色综合久久| 性做久久久久久免费观看| 丁香六月久久综合狠狠色| 欧美二区在线观看| 国产精品久久午夜夜伦鲁鲁| 日产国产高清一区二区三区| 成人国产精品视频| 精品福利一区二区三区免费视频| 夜夜揉揉日日人人青青一国产精品| 国内成人免费视频| 欧美三级视频在线| 成人免费一区二区三区在线观看| 美日韩一区二区| 欧美视频精品在线| 亚洲欧美在线视频| 国产成人鲁色资源国产91色综| 欧美日本高清视频在线观看| 成人欧美一区二区三区白人 | 国产欧美日韩久久| 麻豆一区二区三| 欧美猛男男办公室激情| 亚洲综合久久久| 91亚洲男人天堂| 亚洲国产电影在线观看| 狠狠色丁香久久婷婷综合_中| 欧美精品vⅰdeose4hd| 亚洲免费av观看| 91蝌蚪porny九色| 亚洲天堂中文字幕| 99精品热视频| 国产精品白丝在线| 成人免费av网站| 亚洲国产精品国自产拍av| 国产一区二区三区免费看| 日韩欧美国产三级| 老汉av免费一区二区三区| 日韩亚洲欧美中文三级| 日本 国产 欧美色综合| 日韩一级片在线播放| 免费人成在线不卡| 欧美mv日韩mv国产网站app| 青青草原综合久久大伊人精品优势| 欧美色涩在线第一页| 午夜久久电影网| 777xxx欧美| 欧美aⅴ一区二区三区视频| 91精品在线观看入口| 开心九九激情九九欧美日韩精美视频电影| 欧美三级电影一区| 天堂精品中文字幕在线| 欧美一级夜夜爽| 国产一区二区毛片| 国产人成一区二区三区影院| 成人小视频在线观看| 中文字幕一区av| 色视频一区二区| 日韩av一区二区在线影视| 精品国产乱码久久久久久闺蜜 | 欧美视频一区二区三区四区| 香蕉成人伊视频在线观看| 日韩一级二级三级精品视频| 精品午夜久久福利影院| 中文一区在线播放| 色综合色狠狠天天综合色| 亚洲最快最全在线视频| 在线电影国产精品| 国产一区二区三区在线观看精品| 国产女同性恋一区二区| 日本道色综合久久| 奇米影视一区二区三区小说| 日韩欧美一级二级| 懂色av噜噜一区二区三区av| 亚洲人妖av一区二区| 欧美精品少妇一区二区三区| 精东粉嫩av免费一区二区三区| 欧美激情中文不卡| 欧美在线免费视屏| 久草中文综合在线| 亚洲视频一区在线| 日韩视频在线永久播放| 成人av网站免费观看| 日韩精品高清不卡| 欧美激情一区在线| 在线播放国产精品二区一二区四区| 激情综合色综合久久| 一区二区三区四区不卡在线| 日韩视频一区二区三区在线播放| 岛国一区二区三区| 午夜精品福利在线| 中文字幕电影一区| 欧美丰满美乳xxx高潮www| 成人av网站在线| 免费观看在线色综合| 日韩伦理免费电影| 日韩免费性生活视频播放| 色网综合在线观看| 国产在线播放一区三区四| 怡红院av一区二区三区| 久久伊人中文字幕| 欧美日韩在线播放| gogogo免费视频观看亚洲一| 麻豆精品视频在线观看免费| 亚洲最快最全在线视频| 国产精品视频一二三| 精品少妇一区二区三区在线视频| 色婷婷综合五月| 成人丝袜视频网| 激情成人午夜视频| 日韩福利视频网| 一区二区三区免费观看|