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

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

?? spdemo.c

?? Reference Implementation of G.711 standard and other voice codecs
?? C
?? 第 1 頁 / 共 2 頁
字號:
/*                                                              v3.2 18.Jan.99  ============================================================================  SPDEMO.C  ~~~~~~~~~  Description:   ~~~~~~~~~~~~  DEMO program to show the use of the serialization/  parallelization functions.  A input file in the parallel format will be converted to serial  in the form of 16-bit words whose least significant bits will be  `1' or `0', as defined below. If the inclusion of a synchronism  bit is requested, then at the beginning of each data frame a  sync word (defined below) is added.                      Bit '0' is represented as '0x007F'                      Bit '1' is represented as '0x0081'                      A SYNC-word is defined as '0x6B21'  This bit definition was chosen to be compatible in the future   with the so called 'soft-bit'-format, where the  channel decoder  outputs probabilities that the  received bit is '0' or '1'.   The output bit-stream will then be a binary file where the first  word on the file is the SYNC-word, followed by LFRAME  words with the data bits (LFRAME=number of bits in one frame);  then the next SYNC-word, followed by the next frame, ... and so  on (if the sync word inclusion is selected).   Usage:  ~~~~~~  $ spdemo oper finp fout N N1 N2 resolution [sync [just]]  where:  oper ......... operation desired:                 ps input is in parallel format, output is serial                 sp input is a bit-stream file, output is parallel.  finp ......... input filename  fout ......... output filename  N ............ frame size  N1 ........... 1st frame to convert  N2 ........... number of frames from N1 on.  resolution ... number of bits per sample in input file.  sync ......... flag for using sync words:                 1: each frame begin with a SYNC_WORD in the                    output file; this is the DEFAULT.                 0: no SYNC_WORDs are used in the output file.  just ......... flag for choosing justification:                  left:  the parallel data is supposed to be right-		        justified; this is the DEFAULT.                 right: the parallel data is supposed to be left-                        justified;                 (PS: bit-stream 16-bit words are always right-justified!)  Options:  -n ............. number of frames to process  -start ......... first frame to start operation  -frame ......... payload size in no. of softbits  -res # ......... bit resolution for file (default 16)  -left .......... data is left-justified  -right ......... data is right-justified (the default)  -nosync ........ don't use sync headers  -sync .......... use sync headers  -q ............. quiet operation  -help, -? ...... display help message  Compilation:  ~~~~~~~~~~~~  VAX/VMS:   $ cc spdemo  $ link spdemo   $ spdemo   :== $scd_disk:[scd_dir]spdemo   $ spdemo   Turbo-C, Turbo-C++:   > tcc -ml spdemo  > spdemo   HighC (MetaWare, version R2.32):   > hc386 -ml spdemo.c    > run386 spdemo   Sun-C (BSD-Unix)  # cc -o spdemo spdemo.c  # spdemo          Original author:   ~~~~~~~~~~~~~~~~  Simao Ferraz de Campos Neto         CPqD/Telebras         		               DDS/Pr.11                             Phone : +55-192-39-6396  Rd. Mogi Mirim-Campinas Km.118        Fax   : +55-192-53-6125  13.088-061 - Campinas - SP (Brazil)   EMail : simao@cpqd.ansp.br                                            History  ~~~~~~~  20.Mar.92 v1.0 1st release to UGST.                 <tdsimao@venus.cpqd.ansp.br>  18.May.92 v1.1 Introduction of changes from v1.2 of ugst-utl.c.                 <tdsimao@venus.cpqd.ansp.br>  14.Apr.94 v1.2 Improved user interface  06.Jun.95 v2.0 Fixed for correct '1' and '0' softbit definition                 <simao.campos@comsat.com>  20.Aug.97 v3.0 Several changes: <simao.campos@comsat.com>                 - Modified code to recognize the G.192 bitstream format		 - Removed obsolete code portions (memory allocation for		   input & output files being both parallel - this is		   prevented by a previous piece of code!)  16.Jan.98 v3.1 Added conditional compile for Ultrix with cc <simao>  18.Jan.99 v3.2 Fixed bug in calculation of total no.of samples                  to process; fixed a bug in check_sync() which                 unnecessarily zeroed the frame length variable fr_len                 causing errors when the user specifies the frame length		 <simao>  ============================================================================*//* ..... Generic include files ..... */#include <stdio.h>                      /* Standard I/O Definitions */#include <stdlib.h>                     /* for atoi(), atol() */#include <string.h>                     /* for strstr() */#include <math.h>                       /* for ceil() */#include "ugstdemo.h"                   /* general UGST definitions *//* ..... Specific include files ..... */#if defined(VMS)		/* for checking file sizes */#include <stat.h>#else#include <sys/stat.h>#endif#if defined (unix) && !defined(MSDOS)/*                 ^^^^^^^^^^^^^^^^^^ This strange construction is necessary                                      for DJGPP, because "unix" is defined,				      even it being MSDOS! */#if defined(__ALPHA)#include <unistd.h>		/* for SEEK_... definitions used by fseek() */#else#include <sys/unistd.h>		/* for SEEK_... definitions used by fseek() */#endif#endif/* ..... Module definition files ..... */#include "ugst-utl.h"                   /* format conversion functions *//* ... Local function prototypes ... */char check_bs_format ARGS((FILE *F, char *file, char *type));int check_sync ARGS((FILE *F, char *file, char *bs_type, long *fr_len,		     char *bs_format));void display_usage ARGS((int level));/* ......... End of local function prototypes ......... */ /* ... Local defines, pseudo-functions ... */#define is_serial(x) ((x)=='S'||(x)=='s')#ifdef STL92#define OVERHEAD 1 /* Overhead is sync word */#else#define OVERHEAD 2 /* Overhead is sync word and length word*/#endif/* Operating modes */enum BS_formats {byte, g192, compact, nil};enum BS_types {NO_HEADER, HAS_HEADER};/* ************************* AUXILIARY FUNCTIONS ************************* *//*  --------------------------------------------------------------------------  char check_bs_format (FILE *F, char *file, char *type);  ~~~~~~~~~~~~~~~~~~~~  Function that checks the format (g192, byte, bit) in a given  bitstream, and tries to guess the type of data (bit stream or frame  erasure pattern)  Parameter:  ~~~~~~~~~~  F ...... FILE * structure to file to be checked  file ... name of file to be checked  type ... pointer to guessed data type (NO_HEADER or HAS_HEADER) in file  Returned value:  ~~~~~~~~~~~~~~~  Returns the data format (g192, byte, bit) found in file.  Original author: <simao.campos@comsat.com>  ~~~~~~~~~~~~~~~~  History:  ~~~~~~~~  20.Aug.97  v.1.0  Created.  -------------------------------------------------------------------------- */char check_bs_format(F, file, type)FILE *F;char *file;char *type;{  short word;  char ret_val;  /* Get a 16-bit word from the file */  fread(&word, sizeof(short), 1, F);  /* Use some heuristics to determine what type of file is this */  switch((unsigned)word)  {  case 0x7F7F:  case 0x7F81:  case 0x817F:  case 0x8181:    /* Byte-oriented G.192 bitstream */     *type = NO_HEADER;    ret_val = byte;    break;  case 0x2020:  case 0x2021:  case 0x2120:  case 0x2121:    /* Byte-oriented G.192 syncs */    *type = HAS_HEADER;    ret_val = byte;    break;  case 0x007F:  case 0x0081:    /* G.192 bitstream in natural order */    *type = NO_HEADER;    ret_val = g192;    break;  case 0x6B21:  case 0x6B20:    /* G.192 sync header in natural order */    *type = HAS_HEADER;    ret_val = g192;    break;  case 0x7F00:  case 0x8100:  case 0x216B:  case 0x206B:    /* G.192 format that needs to be byte-swapped */    fprintf(stderr, "File %s needs to be byte-swapped! Aborted.\n", file);    exit(8);  default:    /* Assuming it is compact bit mode */   *type = nil; /* Not possible to infer type for binary format! */    ret_val = compact;  }  /* Final check to see if the input bitstream is a byte-oriented G.192     bitstream. In this case, the first byte is 0x2n (n=0..F) and the     second byte must be the frame length */  if ((((unsigned)word>>8) & 0xF0) == 0x20)  {     *type = HAS_HEADER;     ret_val = byte;  }  /* Rewind file & and return format identifier */  fseek(F, 0l, SEEK_SET);  return(ret_val);}/* ...................... End of check_bs_format() ...................... */int check_sync(F, file, bs_type, fr_len, bs_format)FILE *F;char *file;char *bs_type, *bs_format;long *fr_len;{  long i;  char sync_header;  /* Initialize frame length to "unknown" */  /* *fr_len = 0; */  /* Get info on bitstream */  *bs_format = check_bs_format(F, file, bs_type);  /* If the BS seems to have a header, search for two consecutive     ones. If it finds, determines which is the frame size */  if (*bs_type == HAS_HEADER)  {    /* The input BS may have a G.192 synchronism header - verify */    if (*bs_format == g192)    {      short tmp[2];      /* Get presumed first G.192 sync header */      fread(tmp, sizeof(short), 2, F);      /* tmp[1] should have the frame length */      i = tmp[1];      /* advance file to the (presumed) next G.192 sync header */      fseek(F, (long)(tmp[1])*sizeof(short), SEEK_CUR);      /* get (presumed) next G.192 sync header */      fread(tmp, sizeof(short), 2, F);      /* Verify */      if (((tmp[0] & 0xFFF0) == 0x6B20) && (i == tmp[1]))      {	*fr_len = i;	sync_header = 1;      }      else	sync_header = 0;    }    else if (*bs_format == byte)    {      char tmp[2];      /* Get presumed first byte-wise G.192 sync header */      fread(tmp, sizeof(char), 2, F);      /* tmp[1] should have the frame length */      i = tmp[1];      /* advance file to the (presumed) next byte-wise G.192 sync header */      fseek(F, (long)tmp[1], SEEK_CUR);      /* get (presumed) next G.192 sync header */      fread(tmp, sizeof(char), 2, F);      /* Verify */      if (((tmp[0] & 0xF0) == 0x20) && (i == tmp[1]))      {	*fr_len = i;	sync_header = 1;      }      else	sync_header = 0;    }    else      sync_header = 0;    /* Rewind file */    fseek(F, 0l, SEEK_SET);  }  else    sync_header = 0;  /* Return info on whether or not a frame sync header was found */  return(sync_header);}/*  --------------------------------------------------------------------------  display_usage()  Shows program usage.  History:  ~~~~~~~~  20/Aug/1997  v1.0 Created <simao>  --------------------------------------------------------------------------*/#define P(x) printf xvoid display_usage(level)int level;{  P(("spdemo.c - version 3.0 of 20/Aug/1997\n"));   P(("  Demo program to convert between serial and parallel data formats.\n"));  if (level == 1)  {    P(("  A input file in the parallel format will be converted to serial\n"));    P(("  in the form of 16-bit words whose least significant bits will be\n"));    P(("  `1' or `0', as defined below. If the inclusion of a synchronism\n"));    P(("  bit is requested, then at the beginning of each data frame a\n"));    P(("  sync word (defined below) is added.\n"));    P(("\n"));    P(("                      Bit '0' is represented as '0x007F'\n"));    P(("                      Bit '1' is represented as '0x0081'\n"));    P(("                      A SYNC-word is defined as '0x6B21'\n"));    P(("\n"));    P(("  This bit definition was chosen to be compatible in the future \n"));    P(("  with the so called 'soft-bit'-format, where the  channel decoder\n"));    P(("  outputs probabilities that the  received bit is '0' or '1'. \n"));    P(("\n"));    P(("  The output bit-stream will then be a binary file where the first\n"));    P(("  word on the file is the SYNC-word, followed by LFRAME\n"));    P(("  words with the data bits (LFRAME=number of bits in one frame);\n"));    P(("  then the next SYNC-word, followed by the next frame, ... and so\n"));    P(("  on (if the sync word inclusion is selected). \n"));    P(("\n"));  }  P(("  Usage:\n"));  P(("  $ spdemo oper finp fout N N1 N2 resolution [sync [just]]\n"));  P(("  where:\n"));  P(("  oper ......... \"ps\": parallel -> serial; \"sp\": serial -> parallel\n"));  P(("  finp ......... input filename\n"));  P(("  fout ......... output filename\n"));  P(("  N ............ frame size\n"));  P(("  N1 ........... 1st frame to convert\n"));  P(("  N2 ........... number of frames from N1 on.\n"));  P(("  resolution ... number of bits per sample in input file.\n"));  P(("  sync ......... Enable (1) or disable (0) use of sync headers\n"));  P(("  just ......... data justification: left or right (default)\n\n"));  P(("  Options:\n"));  P(("  -n # ........... number of frames to process\n"));  P(("  -start # ....... first frame to start operation\n"));  P(("  -frame # ....... payload size in no. of softbits\n"));  P(("  -res # ......... bit resolution for file (default 16)\n"));  P(("  -left .......... data is left-justified\n"));  P(("  -right ......... data is right-justified (the default)\n"));  P(("  -nosync ........ don't use sync headers\n"));  P(("  -sync .......... use sync headers\n"));  P(("  -q ............. quiet operation\n"));  P(("  -? ............. display short help message\n"));  P(("  -help, ......... display long help message\n"));  /* Quit program */  exit(-128);

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
精品国产一区二区三区不卡| 粉嫩绯色av一区二区在线观看| 91免费国产视频网站| 国产欧美日韩另类视频免费观看 | 亚洲视频资源在线| 91蜜桃网址入口| 亚洲影视资源网| 欧美精品一级二级| 久久精品国产亚洲a| 久久精品亚洲麻豆av一区二区| 高清不卡在线观看av| 亚洲柠檬福利资源导航| 欧美午夜精品久久久久久超碰| 午夜婷婷国产麻豆精品| 日韩午夜精品电影| 国产成人综合在线播放| 中文字幕亚洲精品在线观看| 色老汉一区二区三区| 天天综合网天天综合色| 久久综合久久99| www.爱久久.com| 图片区日韩欧美亚洲| 久久精品欧美日韩| 色噜噜偷拍精品综合在线| 免费在线观看一区二区三区| 国产精品沙发午睡系列990531| 欧洲日韩一区二区三区| 狠狠v欧美v日韩v亚洲ⅴ| 日韩一区欧美小说| 日韩欧美专区在线| 色综合天天性综合| 麻豆高清免费国产一区| 中文字幕一区日韩精品欧美| 69av一区二区三区| 99在线精品视频| 青青青伊人色综合久久| 亚洲少妇中出一区| 精品国产一区二区三区四区四| 在线观看三级视频欧美| 国产美女精品人人做人人爽| 亚洲综合色自拍一区| 日本一区二区视频在线观看| 91黄色小视频| 成人av在线电影| 美女视频一区二区| 亚洲福利一二三区| 国产精品成人免费在线| 精品少妇一区二区| 欧美人与z0zoxxxx视频| www.日韩大片| 国产99一区视频免费| 国产一区二区在线看| 日韩黄色免费电影| 亚洲精品国产精品乱码不99| 国产欧美一区二区精品婷婷| 69堂成人精品免费视频| 欧美体内she精高潮| 成年人网站91| 国产精品综合av一区二区国产馆| 午夜不卡在线视频| 一区二区三区精品在线观看| 国产精品久久久久久久午夜片| 精品国内片67194| 91精品国产一区二区人妖| 精品视频全国免费看| 91久久一区二区| 91欧美激情一区二区三区成人| 成人精品视频一区二区三区尤物| 国产一区二区精品久久| 久久99精品国产麻豆婷婷| 日本成人在线网站| 日韩中文字幕区一区有砖一区| 亚洲午夜久久久| 亚洲动漫第一页| 亚洲成年人网站在线观看| 亚洲黄色性网站| 亚洲mv在线观看| 亚洲成人久久影院| 婷婷综合另类小说色区| 三级不卡在线观看| 一本久久精品一区二区| 成人久久18免费网站麻豆| 盗摄精品av一区二区三区| 国产成人综合视频| 日本中文字幕一区| 成人欧美一区二区三区在线播放| 国产精品区一区二区三| 国产精品久久久久四虎| 亚洲美女屁股眼交3| 一区二区三区精品在线| 亚洲成人手机在线| 蜜臀av一级做a爰片久久| 激情综合亚洲精品| 成人午夜视频网站| 在线精品视频免费播放| 欧美日韩成人综合天天影院| 欧美一区二区三级| 久久久噜噜噜久久中文字幕色伊伊 | 欧美性一区二区| 欧美三级视频在线观看| 91精品欧美综合在线观看最新 | 免费观看久久久4p| 久久精品国产久精国产| 国产高清亚洲一区| 色综合久久99| 日韩美一区二区三区| 久久精品欧美日韩精品| 亚洲情趣在线观看| 日本免费新一区视频| 波多野结衣亚洲| 337p亚洲精品色噜噜| 欧美精品一区二区三区视频| 亚洲欧美综合另类在线卡通| 爽好久久久欧美精品| 国产夫妻精品视频| 欧美优质美女网站| 久久色.com| 亚洲第一激情av| 丰满亚洲少妇av| 91精品国产色综合久久不卡蜜臀| 久久久久久久久久电影| 亚洲自拍都市欧美小说| 国产麻豆成人精品| 欧美日韩在线亚洲一区蜜芽| 久久精品视频在线免费观看| 亚洲大尺度视频在线观看| 国产经典欧美精品| 日韩无一区二区| 亚洲黄色片在线观看| 欧美一区二区播放| 一区二区中文字幕在线| 久久99国产精品免费| 在线影视一区二区三区| 国产三级精品三级在线专区| 天天色综合天天| 91论坛在线播放| 欧美国产综合一区二区| 久久爱另类一区二区小说| 欧美色老头old∨ideo| 亚洲欧洲av在线| 国产精品亚洲а∨天堂免在线| 精品污污网站免费看| 综合中文字幕亚洲| 国产99久久久国产精品潘金网站| 717成人午夜免费福利电影| 一级女性全黄久久生活片免费| 国产成人综合亚洲91猫咪| 欧美xxxx在线观看| 日本在线不卡视频| 欧美日韩卡一卡二| 亚洲图片欧美综合| 色综合久久88色综合天天免费| 国产精品乱人伦一区二区| 国产一区二区三区在线看麻豆| 欧美一级欧美一级在线播放| 亚洲一区在线视频| 欧日韩精品视频| 亚洲男人的天堂av| 99国内精品久久| 国产精品久久久久一区| 成人的网站免费观看| 国产欧美日韩不卡| 国产精品一区二区你懂的| 久久综合色鬼综合色| 国产在线麻豆精品观看| 欧美成人乱码一区二区三区| 日本成人中文字幕在线视频| 欧美日韩国产精选| 日韩av网站免费在线| 日韩欧美激情在线| 久久电影国产免费久久电影| 日韩一区国产二区欧美三区| 麻豆精品视频在线| 2020国产精品自拍| 国产成人欧美日韩在线电影| 久久久精品国产免费观看同学| 国产精品一区二区你懂的| 国产精品久久久久影院| 99国产精品久久久久| 一个色综合网站| 欧美一区二区三区人| 韩国一区二区视频| 欧美激情一区不卡| 91麻豆福利精品推荐| 亚洲国产cao| 欧美一二三区在线观看| 国产成人亚洲精品青草天美| 中文字幕欧美一| 欧美老人xxxx18| 国产一区二三区好的| 国产精品不卡一区二区三区| 色婷婷综合久久久中文字幕| 日日摸夜夜添夜夜添亚洲女人| 欧美成人午夜电影| 不卡av免费在线观看| 亚洲成年人影院| 久久久三级国产网站| 91国产免费观看| 久久91精品国产91久久小草| 国产精品人成在线观看免费|