⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 main_ctcenc.c

📁 这个文件包括wimax中所有的编解码源代码
💻 C
字号:
/*****************************************************************************//*   FIle Name : main_turbo.c                                                *//*   Description : Main routine to Test FEC  Type2                           *//*   author : miffie                                                         *//*   Date   : sep/26/05                                                      *//*   Copyright (c) 2005 miffie   All rights reserved.                        *//*****************************************************************************/#include <math.h>#include <stdio.h>#include <stdlib.h>//Global variableschar   print_on = 1 ;#define  PRINTF if (print_on) printf#define  FPRINTF if (print_on) fprintf#include "../env/binaryset.c"#include "../env/utility.c"#include "ctc_enc.c"main(){  register int ii , jj, kk ;  char fail  ;  short  NN  , noise   ;  struct  binaryset exp , encoded, bset0, bset1;  unsigned char     data[512] ;  char fec_code_type ;    //multiple tests  for  (jj=0;jj<10000;jj++) { //each test    /* for known data, stick a few numbers into a zero codeword. Data is in       polynomial form.    */    //make a binary set    NN =  (int_random(27) +1)*16 ; //16-27*16    fec_code_type = 13 ; // int_random(7) + 13 ; //13-19    printf("\n %d th Test(fec_code_type=%d NN=%d\n\n", jj, NN, fec_code_type ) ;    for  (ii=0; ii<NN/4; ii++)   data[ii] = int_random(256) ;    bset0.format = 1 ;    bset0.data = &data[0] ;    bset0.size = NN/4 ;      exp = copy_binaryset(bset0) ;    //print_binaryset(bset0) ;    bset0 =  ctc_encoder(bset0, fec_code_type , 16 ) ;    print_binaryset(bset0) ;  } //each test}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -