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

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

?? g726demo.c

?? G.726協(xié)議的C源碼
?? C
字號:
/*                                                           21/Mar/2000 V1.2  ============================================================================  G726DEMO.C  ~~~~~~~~~~  Description:  ~~~~~~~~~~~~  Demonstration program for UGST/ITU-T G.726 module (the same as the Blue   Book G.726). Takes the input file and processes by the G.726 codec,   depending on user's option: for encoding, input must be in either A   or mu law (G711), for decoding, in ADPCM format. The modules called have   been originally written in Fortran, and were translated into C by the   converter f2c, version of October 15, 1990 at 19:58:17.  Input data is supposed to be aligned at word boundaries, i.e.,  organized in 16-bit words, following the operating system normal  organization (low-byte first for VMS and DOS; high byte first  for most Unix systems). G711 compressed data is supposed to be  in the 8 LEAST significant bits of the word and the ADPCM data  is in the LEAST 5 bits. Both are without sign extension.  Output data will be generated in the same format as decribed  above for the input data.  Usage:  ~~~~~~  $ G726demo [-options] Law Transf Rate InpFile OutFile   [BlockSize [1stBlock [NoOfBlocks [Reset]]]]  where:   Law       is the law desired (either A or u)  Transf     is the desired conversion on the input file:              [lolo], (A/u)log -> ADPCM -> (A/u) log	      [load], (A/u)log -> ADPCM	      [adlo], ADPCM    -> (A/u) log  Rate       is the number of ADPCM bits per sample:              [5],[40] -> 5 bits per sample (40 kbit/s)	      [4],[32] -> 4 bits per sample (32 kbit/s)	      [3],[24] -> 3 bits per sample (24 kbit/s)	      [2],[16] -> 2 bits per sample (16 kbit/s)  InpFile     is the name of the file to be processed;  OutFile     is the name with the processed data;  BlockSize   is the block size, in number of samples  1stBlock    is the number of the first block of the input file              to be processed;  NoOfBlocks  is the number of blocks to be processed, starting on              block "1stBlock"  Reset       is the optional reset. If specified as 1, the              coder and decoder will be reset at the very beginning of	      the processings. If 0, the processing will start with	      the variables at a unknown state. It defaults to 1	      (reset ON).  Options:  -noreset    don't apply reset to the encoder/decoder  -?/-help    print help message          Example:  $ G726demo u lolo  4 voice.ref voice.rel 256 3 45 *OR*  $ G726demo u lolo 32 voice.ref voice.rel 256 3 45    The command above takes the samples in file "voice.ref", already  in mu law format, processes the data through the G726 encoder  and decoder at a rate of 32 bkit/s,  saving them into the file  "voice.rel". The processing starts  at block 3 for 45 blocks,  each block being 256 samples wide.  Original authors:  ~~~~~~~~~~~~~~~~~  Simao Ferraz de Campos Neto   EMail : simao@cpqd.ansp.br (32k)  Fernando Tofolli Queiroz      EMail : tdfernan@cpqd.ansp.br (extension)  CPqD/Telebras                 Rd. Mogi Mirim-Campinas Km.118  DDS/Pr.11                     13.088-061 - Campinas - SP (Brazil)  History:  ~~~~~~~~  28/Feb/1994 v1.0 Release of 1st version of this demo program                   based on the g721demo of the STL92. G.726                   functionality added by Fernando Toffoli Queiroz                   <tdfernan@cpqd.ansp.br>; usage routine and                   portability tests by Simao.  22/Feb/1996 v1.1 Removed compilation warnings, included headers as                   suggested by Kirchherr (FI/DBP Telekom) to run under		   OpenVMS/AXP <simao@ctd.comsat.com>  21/Mar/2000 v1.2 Changed memory allocation of floating point buffers                   tmp_buf[], inp_buf[] and out_buf[] from static to                   dynamic, to prevent memory invasion		   when block sizes larger than 256 are specified.                    Corrected bug that made incorrect calculation on                   total number of blocks to process when the block                   size is not a multiple of the file                   size. <simao.campos@labs.comsat.com>============================================================================ *//* ..... General definitions for UGST demo programs ..... */#include "ugstdemo.h"/* ..... General include ..... */#include <stdio.h>#include <string.h>#include <stdlib.h>#include <ctype.h>#include <math.h>#if defined(VMS)#include <stat.h>#else				/* Unix/DOS */#include <sys/stat.h>#endif/* ..... G.726 module as include functions ..... */#include "g726.h"/* ------------------------------------------------------------------------- void display_usage(void); ~~~~~~~~~~~~~~~~~~ Display proper usage for the demo program. Generated automatically from program documentation. History: ~~~~~~~~ 8.Mar.94 v1.0 Created. -------------------------------------------------------------------------*/#define P(x) printf xvoid            display_usage(){  P(("G726DEMO - Version 1.2 of 21/Mar/2000 \n\n"));  P(("> Description:\n"));  P(("   Demonstration program for UGST/ITU-T G.726 module. Takes the\n"));  P(("   input file and processes by the G.726 codec,\n"));  P(("   depending on user's option: for encoding, input must be in\n"));  P(("   either A or mu law (G711), for decoding, in ADPCM format. The\n"));  P(("   modules called have been originally written in Fortran, and were\n"));  P(("   translated into C by the converter f2c, version of October 15,1990\n"));  P(("\n"));  P(("   Input data is supposed to be aligned at word boundaries, i.e.,\n"));  P(("   organized in 16-bit words, following the operating system normal\n"));  P(("   organization (low-byte first for VMS and DOS; high byte first\n"));  P(("   for most Unix systems). G711 compressed data is supposed to be\n"));  P(("   in the 8 LEAST significant bits of the word and the ADPCM data\n"));  P(("   is in the LEAST 5 bits. Both are without sign extension.\n"));  P(("\n"));  P(("   Output data will be generated in the same format as decribed\n"));  P(("   above for the input data.\n"));  P(("\n"));  P(("> Usage:\n"));  P(("$ G726demo [-options] Law Transf Rate InpFile OutFile \n"));  P(("           [BlockSize [1stBlock [NoOfBlocks [Reset]]]]\n"));  P((" where:\n"));  P((" Law         is the law desired (either A or u)\n"));  P((" Transf      is the desired conversion on the input file:\n"));  P(("              [lolo], (A/u)log -> ADPCM -> (A/u) log\n"));  P(("              [load], (A/u)log -> ADPCM  \n"));  P(("              [adlo], ADPCM    -> (A/u) log\n"));  P((" Rate        is the number of ADPCM bits per sample:\n"));  P(("              [5],[40] -> 5 bits per sample (40 kbit/s)\n"));  P(("              [4],[32] -> 4 bits per sample (32 kbit/s)\n"));  P(("              [3],[24] -> 3 bits per sample (24 kbit/s)\n"));  P(("              [2],[16] -> 2 bits per sample (16 kbit/s)\n"));  P((" InpFile     is the name of the file to be processed;\n"));  P((" OutFile     is the name with the processed data;\n"));  P((" BlockSize   is the block size, in number of samples\n"));  P((" 1stBlock    is the number of the first block of the input file\n"));  P(("             to be processed;\n"));  P((" NoOfBlocks  is the number of blocks to be processed, starting on\n"));  P(("             block \"1stBlock\"\n"));  P((" Reset       is the optional reset. If specified as 1, the\n"));  P(("             coder and decoder will be  reset at the very\n"));  P(("             beginning of the processings. If 0, the\n"));  P(("             processing will start with the variables  at a\n"));  P(("             unknown state. It defaults to 1 (reset ON). \n"));  P((" Options: \n"));  P((" -noreset    don't apply reset to the encoder/decoder\n"));  P((" -? or -help print this help message\n"));  P(("\n"));  /* Quit program */  exit(-128);}#undef P/* .................... End of display_usage() ........................... *//*   **************************************************************************   ***                                                                    ***   ***        Demo-Program for testing the correct implementation         ***   ***               and to show how to use the programs                  ***   ***                                                                    ***   ***************************************************************************/int main(argc, argv)  int             argc;  char           *argv[];{  G726_state      encoder_state, decoder_state;  long            N = 256, N1 = 1, N2 = 0, cur_blk, smpno;  short           *tmp_buf, *inp_buf, *out_buf, reset=1;  short           inp_type, out_type, rate;  /* Progress indication */  static char     quiet=0, funny[9] = "|/-\\|/-\\";/* File variables */  char            FileIn[80], FileOut[80], law[4], lilo[8];  FILE           *Fi, *Fo;  int             inp, out;  long            start_byte;#ifdef VMS  char            mrs[15];#endif/* * ......... PARAMETERS FOR PROCESSING ......... */  /* GETTING OPTIONS */  if (argc < 2)    display_usage();  else  {    while (argc > 1 && argv[1][0] == '-')      if (strcmp(argv[1], "-noreset") == 0)      {	/* No reset */	reset = 0;	/* Update argc/argv to next valid option/argument */	argv++;	argc--;      }      else if (strcmp(argv[1], "-q") == 0)      {	/* Don't print progress indicator */	quiet = 1;	/* Move argv over the option to the next argument */	argv++;	argc--;      }      else if (strcmp(argv[1], "-?") == 0 || strcmp(argv[1], "-help") == 0)      {	/* Print help */	display_usage();      }      else      {	fprintf(stderr, "ERROR! Invalid option \"%s\" in command line\n\n",		argv[1]);	display_usage();      }  }  /* Now get regular parameters */  GET_PAR_S(1, "_Law (A,u): ................... ", law);  GET_PAR_S(2, "_Operation (lolo,load,adlo): .. ", lilo);  GET_PAR_I(3, "_Rate or bits/ADPCM sample: ... ", rate);  GET_PAR_S(4, "_Input File: .................. ", FileIn);  GET_PAR_S(5, "_Output File: ................. ", FileOut);  FIND_PAR_L(6, "_Block Size: .................. ", N, 256);  FIND_PAR_L(7, "_Starting Block: .............. ", N1, 1);  FIND_PAR_L(8, "_No. of Blocks: ............... ", N2, 0);  FIND_PAR_I(9, "_Reset (YES=1, NO=0): ......... ", reset, 1);  /* Find starting byte in file */  start_byte = sizeof(short) * (long) (--N1) * (long) N;  /* Check if is to process the whole file */  if (N2 == 0)  {    struct stat     st;    /* ... find the input file size ... */    stat(FileIn, &st);    N2 = ceil((st.st_size - start_byte) / (double)(N * sizeof(short)));  }  /* Classification of the conversion desired */  inp_type = toupper(lilo[1]) == 'O' ? IS_LOG : IS_ADPCM;  out_type = toupper(lilo[3]) == 'O' ? IS_LOG : IS_ADPCM;  if ((out_type == IS_ADPCM) && (inp_type == IS_ADPCM))    HARAKIRI("Bad conversion chosen (lolo,load,adlo)! Aborted...\n", 8);  /* Classification of law */  if (toupper(law[0]) == (char) 'A')    law[0] = '1';  else if (toupper(law[0]) == (char) 'U')    law[0] = '0';  else    HARAKIRI(" Invalid law (A or u)! Aborted...\n", 7);  /* Classification of rate */  if (rate > 5)  {    if (rate == 40)      rate = 5;    else if (rate == 32)      rate = 4;    else if (rate == 24)      rate = 3;    else if (rate == 16)      rate = 2;    else    {      HARAKIRI(" Invalid rate (5/4/3/2) or (40/32/24/16)! Aborted...\n", 9);    }  }/* * ...... MEMORY ALLOCATION ......... */  if ((inp_buf = (short *) calloc(N, sizeof(short))) == NULL)      HARAKIRI("Error in memory allocation!\n",1);  if ((out_buf = (short *) calloc(N, sizeof(short))) == NULL)      HARAKIRI("Error in memory allocation!\n",1);  if ((tmp_buf = (short *) calloc(N, sizeof(short))) == NULL)      HARAKIRI("Error in memory allocation!\n",1);/* * ......... FILE PREPARATION ......... */  /* Opening input file; abort if there's any problem */  if ((Fi = fopen(FileIn, "rb")) == NULL)    KILL(FileIn, 2);  inp = fileno(Fi);  /* Creates output file */#ifdef VMS  sprintf(mrs, "mrs=%d", 512);#endif  if ((Fo = fopen(FileOut, WB)) == NULL)    KILL(FileOut, 3);  out = fileno(Fo);  /* Move pointer to 1st block of interest */  if (fseek(Fi, start_byte, 0) < 0l)    KILL(FileIn, 4);/* * ......... PROCESSING ACCORDING TO ITU-T G.726 ......... */  for (cur_blk = 0; cur_blk < N2; cur_blk++)  {    /* Print progress flag */    if (!quiet)      fprintf(stderr, "%c\r", funny[cur_blk % 8]);    /* Read a block of samples */    if ((smpno = fread(inp_buf, sizeof(short), N, Fi)) < 0)      KILL(FileIn, 5);    /* Check if reset is needed */    reset = (reset == 1 && cur_blk == 0) ? 1 : 0;    /* Carry out the desired operation */    if (inp_type == IS_LOG && out_type == IS_ADPCM)    {      G726_encode(inp_buf, out_buf, smpno, law, rate, reset, &encoder_state);    }    else if (inp_type == IS_ADPCM && out_type == IS_LOG)    {      G726_decode(inp_buf, out_buf, smpno, law, rate, reset, &decoder_state);    }    else if (inp_type == IS_LOG && out_type == IS_LOG)    {      G726_encode(inp_buf, tmp_buf, smpno, law, rate, reset, &encoder_state);      G726_decode(tmp_buf, out_buf, smpno, law, rate, reset, &decoder_state);    }    /* Write ADPCM output word */    if ((smpno = fwrite(out_buf, sizeof(short), smpno, Fo)) < 0)      KILL(FileOut, 6);  }/* * ......... FINALIZATIONS ......... */  /* Close input and output files */  fclose(Fi);  fclose(Fo);  /* Exit with success for non-vms systems */#ifndef VMS  return (0);#endif}/* ............................. end of main() ............................. */

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
成人爱爱电影网址| 99免费精品在线观看| 91福利视频久久久久| 亚洲精品免费在线| 欧美午夜不卡视频| 天天综合日日夜夜精品| 日韩精品自拍偷拍| 久久国产精品99精品国产| 91视频在线观看| 宅男噜噜噜66一区二区66| 日韩经典一区二区| 亚洲精品在线观看网站| 国产米奇在线777精品观看| 亚洲国产精品成人综合| 99re在线视频这里只有精品| 夜夜爽夜夜爽精品视频| 4438成人网| 国产精品一级在线| 一区二区三区日韩欧美| 欧美一区二区三区男人的天堂| 精品亚洲免费视频| 亚洲视频香蕉人妖| 日韩午夜中文字幕| 不卡的av电影| 麻豆一区二区三| 自拍偷拍国产精品| 91精品国产aⅴ一区二区| 国产精品一区二区三区网站| 亚洲人成影院在线观看| 欧美群妇大交群中文字幕| 国产一区二区三区免费| 一区二区三区资源| 久久综合九色综合97婷婷女人 | 激情六月婷婷久久| 国产精品女主播av| 欧美久久免费观看| av在线播放一区二区三区| 日本91福利区| 一区二区三区视频在线观看 | 欧美一区二区三区成人| 成人高清av在线| 久久99久久久久| 亚洲最大色网站| 欧美激情中文字幕| 7777精品伊人久久久大香线蕉最新版 | 久久毛片高清国产| 欧美日韩国产电影| 99精品视频一区二区| 九九九精品视频| 午夜日韩在线电影| 亚洲欧洲在线观看av| 精品动漫一区二区三区在线观看| 欧美在线不卡一区| 成人午夜又粗又硬又大| 久久成人精品无人区| 亚洲va国产天堂va久久en| 中文字幕在线观看一区二区| 精品免费视频.| 日韩欧美一二三区| 欧美二区乱c少妇| 精品国产在天天线2019| 欧美系列一区二区| 色女孩综合影院| 成人av资源站| 丰满亚洲少妇av| 国产精品一级片在线观看| 久久国产精品色| 精品午夜久久福利影院| 日本午夜精品视频在线观看| 亚洲成人免费观看| 亚洲国产精品久久久久秋霞影院 | 91福利在线播放| 91丨porny丨户外露出| 99re66热这里只有精品3直播| 国产成人h网站| 国产精品18久久久久久久久| 国产久卡久卡久卡久卡视频精品| 麻豆一区二区在线| 精品一区二区综合| 极品美女销魂一区二区三区| 久久福利视频一区二区| 精品亚洲国产成人av制服丝袜| 美女一区二区视频| 精品亚洲欧美一区| 国产精品影视在线| av在线不卡网| 91视频你懂的| 欧美日韩中文另类| 51久久夜色精品国产麻豆| 日韩免费观看高清完整版| 日韩精品中午字幕| 国产午夜三级一区二区三| 国产精品污网站| 亚洲女人的天堂| 肉色丝袜一区二区| 极品少妇xxxx精品少妇| 丁香网亚洲国际| 色久综合一二码| 亚洲久本草在线中文字幕| 亚洲欧美日韩国产一区二区三区| 亚洲精品视频一区二区| 午夜成人免费电影| 久久99精品久久只有精品| 国产99久久久久久免费看农村| 不卡av免费在线观看| 欧美三级乱人伦电影| 日韩欧美国产不卡| 亚洲欧洲精品天堂一级| 亚洲超丰满肉感bbw| 国产一区二区三区免费看| 99v久久综合狠狠综合久久| 欧美精品777| 国产偷国产偷精品高清尤物| 亚洲色图都市小说| 久久精品国产亚洲高清剧情介绍| 国产+成+人+亚洲欧洲自线| 色综合久久中文字幕| 91精品国产综合久久精品性色| 久久久久久久久伊人| 亚洲蜜桃精久久久久久久| 免费高清不卡av| av电影在线观看完整版一区二区| 欧美三级视频在线| 国产欧美一区二区精品久导航| 一区二区三区成人在线视频| 久久成人精品无人区| 色猫猫国产区一区二在线视频| 精品噜噜噜噜久久久久久久久试看| 中国色在线观看另类| 日韩电影在线免费| 色婷婷综合在线| 亚洲精品一区二区三区蜜桃下载 | 亚洲成人av资源| 成人综合激情网| 欧美一级免费观看| 亚洲男人都懂的| 国产91精品在线观看| 91精品婷婷国产综合久久竹菊| 中文字幕视频一区| 国产一区二区三区免费看| 91麻豆精品国产自产在线观看一区| 国产精品三级电影| 国产曰批免费观看久久久| 欧美乱熟臀69xxxxxx| 亚洲欧美自拍偷拍| 国产精品夜夜嗨| 日韩精品专区在线影院观看| 性做久久久久久久免费看| 91女厕偷拍女厕偷拍高清| 中文字幕精品在线不卡| 国内精品久久久久影院薰衣草| 欧美精品第1页| 亚洲国产精品久久人人爱| 色综合久久中文字幕| 国产欧美日韩精品a在线观看| 久久99蜜桃精品| 欧美一区二区女人| 日韩不卡一二三区| 欧美日韩国产成人在线免费| 一区二区三区不卡视频在线观看| 不卡视频在线看| 国产精品成人免费在线| 国产91精品一区二区麻豆网站| 久久色在线视频| 国产成人免费在线观看| 久久在线观看免费| 国产美女一区二区| 国产日产欧美一区| 高清不卡在线观看av| 中文字幕巨乱亚洲| 91婷婷韩国欧美一区二区| 18欧美乱大交hd1984| 色婷婷久久综合| 一区二区三区中文在线观看| 色婷婷亚洲精品| 亚洲成人你懂的| 日韩无一区二区| 国产一区二区三区香蕉| 国产亚洲污的网站| av欧美精品.com| 亚洲精品免费一二三区| 欧美日韩国产精品成人| 免费成人av资源网| 久久综合色之久久综合| 国产成人av在线影院| 亚洲欧美电影一区二区| 欧美影院精品一区| 久久精品免费观看| 欧美激情在线看| 欧美亚洲一区二区在线| 天天射综合影视| 久久九九影视网| 99久久精品免费看国产| 亚洲国产成人91porn| 日韩免费观看高清完整版在线观看 | 日韩写真欧美这视频| 国产精品亚洲视频| 一区二区三区精品在线| 日韩亚洲欧美一区二区三区| 大桥未久av一区二区三区中文|