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

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

?? decode_rs.c

?? 這個(gè)文件包括wimax中所有的編解碼源代碼
?? C
字號(hào):
/*****************************************************************************//*   FIle Name : decode_rs.c                                                 *//*   Description : Decoder of Reed-Solomon FEC                               *//*                 The RS encoder may NOT be compliant with 802.16.2004 spec.*//*                 So this decoder is not be sophisticated enough.           *//*   author : miffie                                                         *//*   Date   : sep/20/05                                                      *//*   Copyright (c) 2005 miffie   All rights reserved.                        *//*****************************************************************************/struct binaryset decode_rs( struct binaryset datain, char RR )/* assume we have received bits grouped into mm-bit symbols in datain.data[i],   i=0..(nn-1),  and datain.data[i] is index form (ie as powers of alpha).   We first compute the 2*tt syndromes by substituting alpha**i into rec(X) and   evaluating, storing the syndromes in s[i], i=1..2tt (leave s[0] zero) .   Then we use the Berlekamp iteration to find the error location polynomial   elp[i].   If the degree of the elp is >tt, we cannot correct all the errors   and hence just put out the information symbols uncorrected. If the degree of   elp is <=tt, we substitute alpha**i , i=1..n into the elp to get the roots,   hence the inverse roots, the error location numbers. If the number of errors   located does not equal the degree of the elp, we have more than tt errors   and cannot correct them.  Otherwise, we then solve for the error value at   the error location and correct the error.  The procedure is that found in   Lin and Costello. For the cases where the number of errors is known to be too   large to correct, the information symbols as received are output (the   advantage of systematic encoding is that hopefully some of the information   symbols will be okay and that if we are in luck, the errors are in the   parity part of the transmitted codeword).  Of course, these insoluble cases   can be returned as error flags to the calling routine if desired.   */ { //decode_rs   register int i,j,u,q ;   static int NN = 255 ;   char tt ;   char unfixable ;   short KK, pad ;   int elp[RR+2][RR], d[RR+2], l[RR+2], u_lu[RR+2], s[RR+1] ;   int count=0, syn_error=0, root[RR], loc[RR], z[RR+1], err[NN], reg[RR+1] ;   //int count=0, syn_error=0, root[tt], loc[tt], z[tt+1], err[NN], reg[tt+1] ;   int alpha_to [NN+1], index_of [NN+1] ;   int received[NN+1] ;// Initializations printf("...start decode_rs ( %d %d)\n", datain.size , RR ) ;  /* generate the Galois Field GF(2**mm) */  generate_gf(&alpha_to[0], &index_of[0]) ;  //tt is the number of bytes to be corrected RR= 2*tt   tt = RR/2 ;  //pad is the number of padding byte  as prefix  KK = NN-RR ;  pad = KK-(datain.size-RR) ; printf("KK pad ( %d %d)\n", KK , pad ) ;    /* copy datain.data[i] into sram */  for (i=0; i<RR; i++)     received[i] = datain.data[i]&0xff ; //parity  //add pads  if(pad>0) for (i=RR; i<RR+pad; i++) received[i] = 0 ; //pads  //  for (i=RR+pad; i<NN; i++)      received[i] = datain.data[i-pad]&0xff ; //data  //for (i=0; i<NN; i++)   //   printf("received(%d)=%x\n", i, received[i] ) ;  unfixable = 0 ;/* first form the syndromes */   for (i=1; i<=RR; i++)    { s[i] = 0 ;      for (j=0; j<NN; j++) {          s[i] ^= gf_multiply( (received[j]&0xff), alpha_to[(i*j)%NN] ) ;      }/* convert syndrome from polynomial form to index form  */      if (s[i]!=0)  syn_error=1 ;        /* set flag if non-zero syndrome => error */      s[i] = index_of[s[i]&0xff] ;    } ;   if (syn_error)       /* if errors, try and correct */    {/* compute the error location polynomial via the Berlekamp iterative algorithm,   following the terminology of Lin and Costello :   d[u] is the 'mu'th   discrepancy, where u='mu'+1 and 'mu' (the Greek letter!) is the step number   ranging from -1 to 2*tt (see L&C),  l[u] is the   degree of the elp at that step, and u_l[u] is the difference between the   step number and the degree of the elp.*/      printf("syn_error  ") ;/* initialise table entries */      d[0] = 0 ;           /* index form */      d[1] = s[1] ;        /* index form */      elp[0][0] = 0 ;      /* index form */      elp[1][0] = 1 ;      /* polynomial form */      for (i=1; i<RR; i++)        { elp[0][i] = -1 ;   /* index form */          elp[1][i] = 0 ;   /* polynomial form */        }      l[0] = 0 ;      l[1] = 0 ;      u_lu[0] = -1 ;      u_lu[1] = 0 ;      u = 0 ;      do      {//do        u++ ;        if (d[u]==-1)          { l[u+1] = l[u] ;            for (i=0; i<=l[u]; i++)             {  elp[u+1][i] = elp[u][i] ;                elp[u][i] = index_of[elp[u][i]] ;             }          }        else/* search for words with greatest u_lu[q] for which d[q]!=0 */          { q = u-1 ;            while ((d[q]==-1) && (q>0)) q-- ;/* have found first non-zero d[q]  */            if (q>0)             { j=q ;               do               { j-- ;                 if ((d[j]!=-1) && (u_lu[q]<u_lu[j]))                   q = j ;               }while (j>0) ;             } ;/* have now found q such that d[u]!=0 and u_lu[q] is maximum *//* store degree of new elp polynomial */            if (l[u]>l[q]+u-q)  l[u+1] = l[u] ;            else  l[u+1] = l[q]+u-q ;            //printf("l[%d]=%d\n", u+1, l[u+1] );/* form new elp(x) */            for (i=0; i<RR; i++)    elp[u+1][i] = 0 ;            for (i=0; i<=l[q]; i++)              if (elp[q][i]!=-1)                elp[u+1][i+u-q] = alpha_to[(d[u]+NN-d[q]+elp[q][i])%NN] ;            for (i=0; i<=l[u]; i++)              { elp[u+1][i] ^= elp[u][i] ;                elp[u][i] = index_of[elp[u][i]] ;  /*convert old elp value to index*/              }          }        u_lu[u+1] = u-l[u+1] ;/* form (u+1)th discrepancy */        if (u<RR)    /* no discrepancy computed on last iteration */          {            if (s[u+1]!=-1)                   d[u+1] = alpha_to[s[u+1]] ;            else              d[u+1] = 0 ;            for (i=1; i<=l[u+1]; i++)              if ((s[u+1-i]!=-1) && (elp[u+1][i]!=0))                d[u+1] ^= alpha_to[(s[u+1-i]+index_of[elp[u+1][i]])%NN] ;            d[u+1] = index_of[d[u+1]] ;    /* put d[u+1] into index form */            //printf("d[%d]=%x\n", u+1, d[u+1] ) ;          }      } while ((u<RR) && (l[u+1]<=tt)) ; //do      u++ ;      if (l[u]<=tt)         /* can correct error */       {         //printf("can correct\n") ;/* put elp into index form */         for (i=0; i<=l[u]; i++)   elp[u][i] = index_of[elp[u][i]] ;/* find roots of the error location polynomial */         for (i=1; i<=l[u]; i++)           reg[i] = elp[u][i] ;         count = 0 ;         for (i=1; i<=NN; i++)          {  q = 1 ;             for (j=1; j<=l[u]; j++)              if (reg[j]!=-1)                { reg[j] = (reg[j]+j)%NN ;                  q ^= alpha_to[reg[j]] ;                } ;             if (!q)        /* store root and error location number indices */              { root[count] = i;                loc[count] = NN-i ;                count++ ;              };          } ;         //printf("count=%d l[%d]=%d\n", count, u, l[u]) ;         if (count==l[u])    /* no. roots = degree of elp hence <= tt errors */          {           printf("counti=%d\n", count) ;/* form polynomial z(x) */           for (i=1; i<=l[u]; i++)        /* Z[0] = 1 always - do not need */            { if ((s[i]!=-1) && (elp[u][i]!=-1))                 z[i] = alpha_to[s[i]] ^ alpha_to[elp[u][i]] ;              else if ((s[i]!=-1) && (elp[u][i]==-1))                      z[i] = alpha_to[s[i]] ;                   else if ((s[i]==-1) && (elp[u][i]!=-1))                          z[i] = alpha_to[elp[u][i]] ;                        else                          z[i] = 0 ;              for (j=1; j<i; j++)                if ((s[j]!=-1) && (elp[u][i-j]!=-1))                   z[i] ^= alpha_to[(elp[u][i-j] + s[j])%NN] ;            } ;  /* evaluate errors at locations given by error location numbers loc[i] */           for (i=0; i<NN; i++)              err[i] = 0 ;                        for (i=0; i<l[u]; i++)    /* compute numerator of error term first */            { err[loc[i]] = 1;       /* accounts for z[0] */              for (j=1; j<=l[u]; j++) {                   err[loc[i]] ^= gf_multiply(z[j], alpha_to[(j*root[i])%NN]) ;              }              if (err[loc[i]]!=0)               { err[loc[i]] = index_of[err[loc[i]]&0xff] ;                 q = 0 ;     /* form denominator of error term */                 for (j=0; j<l[u]; j++)                   if (j!=i)                     q += index_of[1^alpha_to[(loc[j]+root[i])%NN]] ;                 q = q % NN ;                 err[loc[i]] = alpha_to[(err[loc[i]]-q+NN)%NN] ;                 //printf("loc(%x)=%x %x\n", i, loc[i], err[loc[i]]) ;                 received[loc[i]] ^= err[loc[i]] ;  /*received[i] must be in polynomial form */               }            }          }         else { unfixable=1 ;}    /* no. roots != degree of elp => >tt errors and cannot solve */       }     else { unfixable=1 ;}    /* elp has degree has degree >tt hence cannot solve */    }   else { printf(" no errors found\n" ) ; }    /* no non-zero syndromes => no errors: output received codeword */    //copy result to datain set    for (i=0; i<(datain.size-RR); i++)       datain.data[i]=received[i+RR+pad] ;           //If it's unfixable , set datain.size same as input.     if (unfixable==0) datain.size -=  RR ;    else printf(" unfixable error occured in rs_decoder\n" ) ;    printf("\n") ;    return( datain ) ; } //decode_rs

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
一区二区三区欧美亚洲| 亚洲国产你懂的| 欧美日韩不卡视频| 国产成人aaa| 亚洲成国产人片在线观看| 欧美精品一区男女天堂| 欧美性受xxxx黑人xyx| 国产一区在线看| 日韩av电影免费观看高清完整版 | 日韩极品在线观看| 国产精品狼人久久影院观看方式| 91精品国产综合久久福利| 99v久久综合狠狠综合久久| 日韩成人精品视频| 亚洲精品国产无套在线观| 久久久综合视频| 日韩欧美国产综合| 欧美久久婷婷综合色| 一本大道久久a久久综合婷婷| 国产高清不卡二三区| 精品制服美女丁香| 日本不卡一二三| 亚洲h在线观看| 亚洲在线视频网站| 怡红院av一区二区三区| 国产欧美一区二区三区网站| 日韩你懂的电影在线观看| 欧美日韩极品在线观看一区| 一道本成人在线| 99久久精品一区二区| 国产suv一区二区三区88区| 极品少妇xxxx偷拍精品少妇| 日韩av二区在线播放| 日韩高清在线观看| 日韩中文字幕一区二区三区| 亚洲成人精品一区| 亚洲18影院在线观看| 亚洲成人午夜电影| 午夜视频在线观看一区二区 | 国产精品进线69影院| 国产亚洲精品资源在线26u| 久久蜜臀精品av| 久久久久久**毛片大全| 久久久久久电影| 国产三级欧美三级日产三级99| 精品第一国产综合精品aⅴ| 精品人在线二区三区| 亚洲精品一线二线三线无人区| 日韩欧美国产一区在线观看| 精品成人私密视频| 国产亚洲欧美一级| 国产精品国产三级国产aⅴ原创 | 美女免费视频一区二区| 美女视频网站久久| 国产乱人伦偷精品视频不卡 | 国产激情精品久久久第一区二区 | 国产乱码精品一区二区三区av | 日韩综合在线视频| 另类小说一区二区三区| 国内精品视频一区二区三区八戒 | 99国产精品久| 欧美日本国产一区| 欧美成va人片在线观看| 国产午夜精品理论片a级大结局| 中文字幕第一区二区| 亚洲桃色在线一区| 午夜精品爽啪视频| 久久99国产精品免费| 北条麻妃一区二区三区| 欧美中文一区二区三区| 日韩精品一区二| 中文字幕不卡在线观看| 亚洲精品亚洲人成人网| 美女久久久精品| www.99精品| 欧美一区二区播放| 欧美激情一二三区| 亚洲高清免费视频| 国产乱码精品一区二区三区忘忧草 | 欧美午夜电影一区| 日韩午夜av一区| 国产精品传媒在线| 日本中文字幕一区二区有限公司| 国产不卡一区视频| 欧美日本视频在线| 日本一区二区动态图| 午夜在线成人av| 风间由美一区二区三区在线观看 | 国产欧美一区二区在线观看| 亚洲一区二区三区爽爽爽爽爽| 国内外精品视频| 欧美性受xxxx黑人xyx| 国产三级精品三级| 日韩电影网1区2区| 日本久久电影网| 久久午夜羞羞影院免费观看| 亚洲一区影音先锋| 成人午夜免费电影| 欧美一区二区三区免费视频| 亚洲免费观看高清在线观看| 国内不卡的二区三区中文字幕| 在线视频你懂得一区| 久久久久久一二三区| 丝袜a∨在线一区二区三区不卡 | 国产亚洲午夜高清国产拍精品| 亚洲成人你懂的| 色综合中文字幕| 国产精品美女久久久久久久网站| 日韩成人精品在线| 欧美性色欧美a在线播放| 国产精品家庭影院| 国产成人av自拍| 精品久久国产字幕高潮| 日韩成人免费看| 欧美女孩性生活视频| 一区二区三区精密机械公司| 成人免费av资源| 久久在线观看免费| 久久国产精品一区二区| 在线观看91av| 午夜精品福利久久久| 欧美性色黄大片手机版| 樱桃视频在线观看一区| 91女厕偷拍女厕偷拍高清| 国产女同互慰高潮91漫画| 狠狠色狠狠色合久久伊人| 欧美一区二区三区喷汁尤物| 日日夜夜精品免费视频| 欧美日韩精品一区视频| 五月天激情综合网| 欧美日韩国产一级二级| 污片在线观看一区二区| 欧美日韩电影在线播放| 亚洲aⅴ怡春院| 在线不卡中文字幕| 天堂一区二区在线| 制服丝袜av成人在线看| 蜜桃91丨九色丨蝌蚪91桃色| 日韩欧美一级特黄在线播放| 久草中文综合在线| wwww国产精品欧美| 国产馆精品极品| 欧美国产精品一区| 本田岬高潮一区二区三区| 国产精品国产三级国产三级人妇| 91原创在线视频| 亚洲一区二区视频| 欧美久久免费观看| 国产自产v一区二区三区c| 久久久久久一二三区| 波多野结衣精品在线| 一区二区三区高清在线| 欧美一区三区二区| 精品一区免费av| 国产精品欧美一区喷水| 日本韩国精品在线| 日韩福利视频网| 日本一区二区视频在线| 色综合天天天天做夜夜夜夜做| 亚洲午夜精品一区二区三区他趣| 欧美一区二区三区啪啪| 国产xxx精品视频大全| 亚洲精品免费播放| 欧美一级爆毛片| 国产福利一区在线| 亚洲一区视频在线| 26uuu色噜噜精品一区| 91在线看国产| 美女网站一区二区| 亚洲视频一区二区在线观看| 欧美日韩专区在线| 国产一区二区在线免费观看| 中文字幕日本乱码精品影院| 欧美色爱综合网| 国产成人在线网站| 亚洲自拍偷拍综合| 久久先锋影音av鲁色资源网| 色香蕉久久蜜桃| 黄色资源网久久资源365| 国产精品二区一区二区aⅴ污介绍| 欧美性猛交xxxxxxxx| 国产精品系列在线播放| 一区二区三区在线影院| 久久综合色综合88| 欧美午夜电影在线播放| 国产.欧美.日韩| 亚洲成人第一页| 国产精品麻豆99久久久久久| 欧美老年两性高潮| 日韩欧美区一区二| 91啪九色porn原创视频在线观看| 蜜臀av性久久久久蜜臀aⅴ | 亚洲资源中文字幕| 久久久精品欧美丰满| 欧美日韩在线不卡| 成人夜色视频网站在线观看| 全部av―极品视觉盛宴亚洲| 亚洲图片欧美激情| 国产亚洲1区2区3区| 日韩午夜电影在线观看|