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

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

?? prune.c

?? Vector Quantization壓縮算法
?? C
字號:
/****************************************************************************** * * NAME *    prune.c *    Jill R. Goldschneider *    March 1994 *    Last Revision: * * SYNOPSIS *    prune -c codebook -s statfile -o output -E * * DESCRIPTION *    This program should be used to prune a codebook created by tsvq.c. *    It uses a codebook file to find the tree structure, and a *    statistics file to find the count and average distortion for each *    node of the tree. See pages 683-684 of _Vector Quantization and *    Signal Compression_ by Gersho & Gray for the pruning algorithm. *    The -E option implements entropy constrained pruning. *    The output of the program is preorder list (like the codebook) *    with one long int used for each node. If the value is zero, *    it means that nothing was pruned at that point.  If the value *    is non-zero, then there was a pruning done at that node. *    The number n stored indicates that that node was the nth pruning *    done.  This is a more convenient way to store the nested *    subtree structures rather than to write every subtree structure *    as the algorithm says to do.  To get tree number N, just *    remove all of the nodes that descend from any node that has *    a label of 1,2,...N. Prune prints to stdout for each subtree: the *    subtree number, the minimum lambda of that tree, the averate rate *    and distortion, and the number of nodes in the tree. * *    The program uses the same TreeNode structure as the tsvq.c *    and tsvqe.c programs.  The trick is that the node->data field *    is used to store the four pieces of data needed for pruning rather *    than to store the codeword.  The size of node->data is set by using dim, *    so dim is set to be NODE_DATA_SIZE (4). The four pieces of *    information are stored as: *        node->data[DELTA_D] = delta_d *        node->data[DELTA_R] = delta_r *        node->data[LAMBDA]  = lambda *        node->data[LAMBDA_MIN]  = lambda_min *    The next trick is that the node->count field is used to store *    the subtree number. * * OPTIONS *    -c  codebook file name                       DEF_codebookname *    -s  statistics file name                     DEF_statname *    -o  nested subtree file nane                 DEF_subtreename *    -E  entropy pruned flag                      FALSE * * CALLS *    create_root(), construct_stat_tree(), initialize_stat_tree(), *    entropy_init_stat_tree(), find_min_slope(), pruned_count(), *    update_tree(), count_nodes(), write_nested_subtree() * *****************************************************************************/#include "tsvq.h"char *programname;int  dim;main(argc, argv)     int       argc;         /* number of command line arguments */     char      *argv[];      /* command line arguments */{  char      *cp;               /* character pointer */  char      option;            /* used for command line interpretation */  char      statname[NAME_MAX];     /* file containing count and distortion */  char      subtreename[NAME_MAX];  /* output file of nested subtrees */  char      codebookname[NAME_MAX]; /* file containing codebook */  FILE      *statfile;  FILE      *subtreefile;  FILE      *codebookfile;  long      numnodes;          /* number of nodes in the tree */  int       vector_dimension;  /* vector dimension not needed for pruning */  long      subtree_number;    /* the number of subtrees on the convex hull */  long      trsqcount;         /* the number of training vectors */  DISTTYPE  rate, distortion;  TreeNode  *root, *min_slope_node; /* pointer to node with smallest slope */  BOOLEAN   entropy_flag;      /* flag used to select entropy pruned tsvq */  /* set default values */  programname = *argv;  dim = NODE_DATA_SIZE;  entropy_flag = FALSE;  strcpy(statname, DEF_statname);  strcpy(codebookname, DEF_codebookname);  strcpy(subtreename, DEF_subtreename);  /* if no options entered, list all of the defaults */  if (argc == 1) {    printf("%s %s %s\n",USAGE,programname,HOWTOUSE_PRUNE);    printf("\nOPTIONS   DESCRIPTIONS                         DEFAULTS\n");    printf("-c        codebook file                        %s\n",codebookname);    printf("-s        codebook statistics file             %s\n",statname);    printf("-o        nested subtree file                  %s\n",subtreename);    printf("-E        entropy pruned                         \n");    printf("\n");    fflush(stdout);    exit(0);  }  /* read and interpret command line arguments */  while (--argc && ++argv) {    if (*argv[0]=='-' && strlen(*argv)==2) { /* each option has 1 letter */      option = *++argv[0];      if (option == 'E') entropy_flag = TRUE;      else if (--argc && ++argv) { /* examine the option */        switch(option) { /* examine the option letter */        case 'c':          strncpy(codebookname,*argv,NAME_MAX);          break;        case 's':          strncpy(statname,*argv,NAME_MAX);          break;        case 'o':          strncpy(subtreename,*argv,NAME_MAX);          break;        default:          fprintf(stderr,"%s: %c: %s\n",programname,option,NOTOPTION);          exit(1);          break;        }      }      else {        fprintf(stderr,"%s %s %s\n",USAGE,programname,HOWTOUSE_PRUNE);        exit(2);      }    }    else if (*argv[0] == '-') { /* user entered unknown option */      ++argv[0];      fprintf(stderr,"%s: %s: %s\n",programname,*argv,NOTOPTION);      exit(3);    }    else { /* user entered unknown string */      fprintf(stderr,"%s: %s: %s\n",programname,*argv,NOTOPTION);      exit(4);    }  }  /* user did not enter input file names */  if (strlen(codebookname) == 0 || strlen(statname) == 0) {    fprintf(stderr,"%s %s %s\n",USAGE,programname,HOWTOUSE_PRUNE);    exit(5);  }  /* user entered an input name which is the same as the output name */  if (strncmp(cp = codebookname,subtreename,NAME_MAX) == 0 ||      strncmp(cp = statname,subtreename,NAME_MAX) == 0) {    fprintf(stderr,"%s: %s %s %s %s: %s\n",            programname,cp,AND,subtreename,ARESAME,ABORT_PRUNE);    exit(6);  }  /* user entered the same input names */  if (strncmp(statname,codebookname,NAME_MAX) == 0) {    fprintf(stderr,"%s: %s %s %s %s: %s\n",            programname,statname,AND,codebookname,ARESAME,ABORT_PRUNE);    exit(7);  }  /* assign the default output names if necessary */  if (strlen(subtreename) == 0) {    sprintf(subtreename,"%s%s",codebookname,DEF_APPEND_PRUNE);  }  /* open the files */  if(!(codebookfile = fopen(cp = codebookname,"r")) ||     !(statfile = fopen(cp = statname,"r")) ||     !(subtreefile = fopen(cp = subtreename, "w"))) {    fprintf(stderr,"%s: %s: %s\n",programname,cp,NOTFOUND);    exit(8);  }  /* write to output */  printf("\nOPTIONS   DESCRIPTIONS                         SETTINGS\n");  printf("-c        codebook file                        %s\n",codebookname);  printf("-s        codebook statistics file             %s\n",statname);  printf("-o        nested subtree file                  %s\n",subtreename);  if(entropy_flag) {    printf("-E        entropy is reported in               bits per vector\n");  }  else {    printf("          rate is reported in                  bits per vector\n");  }  printf("          distortion is reported in            bits per vector\n");  fflush(stdout);  /* find the number of nodes */  if (fread((char *) &numnodes, sizeof(long), 1, codebookfile) != 1) {    fprintf(stderr,"%s: %s: %s\n",programname,codebookname,NOREAD);    exit(9);  }  /* find the vector dimension */  if (fread((char *) &vector_dimension,sizeof(int),1,codebookfile) != 1) {    fprintf(stderr,"%s: %s: %s\n",programname,codebookname,NOREAD);    exit(10);  }  /* write more to output */  printf("          vector dimension                     %d\n",	 vector_dimension);  printf("\n");  fflush(stdout);  /* construct the tree */  if(!(root = create_root())) {    exit(11);  }  if(!(construct_stat_tree(root,numnodes,codebookfile,codebookname,			   statfile,statname))) exit(12);  /* find the number of training vectors */  trsqcount = root->count;  /* initialize the tree */  if (entropy_flag) {    entropy_init_stat_tree(root);  }  else {    initialize_stat_tree(root);  }  /* find the initial rate and distortion */  rate = root->data[DELTA_R];  distortion = root->avmse + root->data[DELTA_D];  subtree_number = 0;  if(!entropy_flag) {   printf("SUBTREE          LAMBDA            RATE      DISTORTION   NODES\n");  }  else {   printf("SUBTREE          LAMBDA         ENTROPY      DISTORTION   NODES\n");  }  /* print the tree information */  printf("%7d %15f %15f %15f %7d\n",subtree_number, root->data[LAMBDA_MIN],	 rate/trsqcount, distortion/trsqcount, numnodes);  fflush(stdout);  /* prune the tree until only one node left */  while (root->data[LAMBDA_MIN] < HUGE) {    /* find the node with the minimum slope */    if(!(min_slope_node = find_min_slope(root))) exit(13);    /* find the new rate and distortion */    rate -= min_slope_node->data[DELTA_R];    distortion -=  min_slope_node->data[DELTA_D];    /* label the node with its subtree number */    subtree_number++;    min_slope_node->count = subtree_number;    /* find the number of nodes left in the tree */    numnodes = numnodes - pruned_count(min_slope_node) + 1;    /* update the tree */    update_tree(min_slope_node);    /* print the tree information */    printf("%7d %15f %15f %15f %7d\n", subtree_number, root->data[LAMBDA_MIN],	   rate/trsqcount, distortion/trsqcount, numnodes);    fflush(stdout);  }  numnodes = count_nodes(root);  if(!(write_nested_subtree(root,numnodes,subtreefile,subtreename))) exit(14);  exit(0);}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久免费的精品国产v∧| 91精品国产综合久久精品图片| 一区二区成人在线观看| 久久久久久日产精品| 精品少妇一区二区三区免费观看| 亚洲一区在线观看网站| 国产人成亚洲第一网站在线播放 | 欧美xxx久久| 国产91在线观看| 欧美一区二区黄色| 日韩视频一区二区| 久久嫩草精品久久久精品| 久久亚洲综合av| 国产婷婷色一区二区三区四区| 久久国产精品一区二区| 久久99精品久久久久久国产越南| 蜜臀av在线播放一区二区三区| 狠狠久久亚洲欧美| 成人av片在线观看| www国产成人免费观看视频 深夜成人网| 日韩视频在线一区二区| 国产精品天天看| 亚洲人xxxx| 国产一区二区免费视频| www.欧美日韩| 色一情一伦一子一伦一区| 欧美日韩五月天| 色综合久久天天综合网| 国产日韩v精品一区二区| 91福利在线看| 日韩精品最新网址| 欧美韩国日本一区| 天堂资源在线中文精品| 国产在线播放一区三区四| 99久久免费精品| 欧美一区二区三区视频在线观看| 欧美国产一区在线| 午夜影院久久久| 丰满亚洲少妇av| 欧美群妇大交群中文字幕| 久久尤物电影视频在线观看| 亚洲欧美乱综合| 黄页网站大全一区二区| 在线观看成人免费视频| 久久久www成人免费毛片麻豆| 亚洲自拍偷拍av| 成+人+亚洲+综合天堂| 日韩一区二区免费电影| 成人欧美一区二区三区黑人麻豆| 久久精品国产色蜜蜜麻豆| 99久久精品免费看| 久久久久久久久久久黄色| 亚洲妇熟xx妇色黄| 成人动漫中文字幕| www激情久久| 久久99久久99| 日韩一区二区三区视频在线| 亚洲卡通欧美制服中文| 国产成人亚洲精品青草天美| 欧美一区二区三区公司| 亚洲综合男人的天堂| av电影在线观看一区| 久久久777精品电影网影网| 成人网页在线观看| 欧美电影免费观看高清完整版在线 | 不卡的av在线| 久久久久久久综合| 国产麻豆视频精品| 欧美mv日韩mv亚洲| 久久成人久久爱| 欧美不卡视频一区| 美女精品自拍一二三四| 成人午夜电影网站| 日本女人一区二区三区| 国产日产欧产精品推荐色| 在线91免费看| 欧美人体做爰大胆视频| av激情亚洲男人天堂| 亚洲一区二区四区蜜桃| 国产欧美日韩视频在线观看| 日韩午夜激情视频| 欧美变态凌虐bdsm| 日韩一级片在线观看| 日韩三级精品电影久久久| 欧美国产国产综合| 激情图片小说一区| 精品一区二区三区视频在线观看| 亚洲一二三级电影| 日本不卡一区二区| 亚洲一区二区三区四区在线| 国产a视频精品免费观看| 亚洲女人****多毛耸耸8| 日韩精品久久久久久| 亚洲欧洲韩国日本视频| 亚瑟在线精品视频| 亚洲午夜久久久久久久久久久 | 亚洲精品一区二区三区香蕉| 蜜桃视频免费观看一区| 亚洲福利国产精品| 在线播放中文字幕一区| 精品一区二区精品| 国产精品久久久久一区| 欧美中文字幕一二三区视频| 日日摸夜夜添夜夜添精品视频| 欧美成人性战久久| 成人激情免费网站| 亚洲小说欧美激情另类| ww亚洲ww在线观看国产| 国产精品综合久久| av一本久道久久综合久久鬼色| 色婷婷香蕉在线一区二区| 欧美美女bb生活片| 免费欧美高清视频| 久久99久久久欧美国产| av一本久道久久综合久久鬼色| 欧美日韩视频在线观看一区二区三区 | 亚洲电影在线免费观看| 国产欧美一区二区精品性色| 777午夜精品免费视频| 7777精品伊人久久久大香线蕉 | 国产精品免费看片| 久久人人爽人人爽| 久久精品视频一区| 亚洲精品一区在线观看| 日韩一区二区免费在线观看| 欧美区一区二区三区| 日本一区二区视频在线| 亚洲va中文字幕| 欧美影视一区二区三区| 欧美不卡一区二区三区| 99久久er热在这里只有精品66| 麻豆国产精品官网| 捆绑调教一区二区三区| 蜜臀91精品一区二区三区| 麻豆国产欧美日韩综合精品二区| 美女被吸乳得到大胸91| 免费在线欧美视频| 岛国一区二区三区| 欧美日韩精品二区第二页| 精品久久免费看| 中文字幕日韩av资源站| 亚洲一线二线三线视频| 狠狠色丁香婷综合久久| 成人av综合在线| 日韩欧美国产综合在线一区二区三区| 欧美大白屁股肥臀xxxxxx| 国产精品久线观看视频| 一级中文字幕一区二区| 九九精品一区二区| 欧美在线啊v一区| 国产亚洲欧美一级| 久久成人免费电影| 欧美日韩在线播放一区| 国产精品麻豆久久久| 奇米亚洲午夜久久精品| 91精品办公室少妇高潮对白| 精品sm在线观看| 美女在线一区二区| 日韩一区国产二区欧美三区| 国产精品一区三区| 欧美一区二区免费视频| 一区二区三区欧美在线观看| 国产精品亚洲一区二区三区妖精| 7878成人国产在线观看| 成人手机在线视频| 久久亚洲精品小早川怜子| 日韩不卡一区二区| 欧美一卡二卡在线| 亚洲a一区二区| 91精品国产免费| 国产精品系列在线播放| 国产农村妇女毛片精品久久麻豆 | 中文字幕日本乱码精品影院| 欧美人与禽zozo性伦| 色哟哟亚洲精品| 欧美亚洲禁片免费| 91极品视觉盛宴| 日本二三区不卡| 欧美久久一区二区| 精品国产网站在线观看| 日韩av电影天堂| 波多野结衣在线一区| 在线观看视频一区| 8v天堂国产在线一区二区| 免费精品99久久国产综合精品| 美女尤物国产一区| 欧美在线观看视频一区二区 | 99国产精品一区| 在线日韩av片| 欧美一级黄色大片| 日本一区二区综合亚洲| 一色桃子久久精品亚洲| 亚洲精品高清在线| 国产在线看一区| 91福利在线观看| 精品国产99国产精品| 日韩精品色哟哟| 日本欧美一区二区| 成人av动漫网站| 日韩欧美区一区二|