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

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

?? convolutional.h

?? 各種卷積碼、turbo碼的迭代解碼平臺
?? H
字號:
/* File convolutional.h
   
   Description: General functions used to implement convolutional encoding.   

   Copyright (C) 2006, Matthew C. Valenti

   Last updated on Jan. 11, 2006

   Functions  itob, parity_counter, nsc_enc_bit, rsc_enc_bit, nsc_transit, 
   rsc_transit, rsc_tail, and conv_encode are part of the Iterative Solutions 
   Coded Modulation Library. The Iterative Solutions Coded Modulation 
   Library is free software; you can redistribute it and/or modify it 
   under the terms of the GNU Lesser General Public License as published 
   by the Free Software Foundation; either version 2.1 of the License, 
   or (at your option) any later version.

   This library is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   Lesser General Public License for more details.
  
   You should have received a copy of the GNU Lesser General Public
   License along with this library; if not, write to the Free Software
   Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA

*/

/* function itob()

  Description: Converts an integer symbol into a vector of bits

	Output parameters:
		binvec_p: The binary vector
		
    Input parameters:
	    symbol:  The integer-valued symbol
		length:  The length of the binary vector
	
  This function is used by conv_encode()  */

void itob(
						int	binvec_p[],
						int symbol,
						int length )
{
	int counter;

	/* Go through each bit in the vector */
	for (counter=0;counter<length;counter++) {
		binvec_p[length-counter-1] = (symbol&1);
		symbol = symbol>>1;
	}

	return;
}

/* function parity_counter()

  Copyright 2003, Matthew C. Valenti.
	
  Description: Determines if a symbol has odd (1) or even (0) parity

	Output parameters:
		(returned int): The symbol's parity = 1 for odd and 0 for even
		
    Input parameters:
	    symbol:  The integer-valued symbol
		length:  The highest bit position in the symbol
	
  This function is used by nsc_enc_bit(), rsc_enc_bit(), and rsc_tail()  */

int parity_counter( int symbol, int length )
{
	int counter;
	int temp_parity = 0;

	for (counter=0;counter<length;counter++) {
		temp_parity = temp_parity^(symbol&1);
		symbol = symbol>>1;
	}

	return( temp_parity );
}


/* Function nsc_enc_bit() 

  (c) Copyright 2003, Matthew C. Valenti.

  Description: Convolutionally encodes a single bit using a rate 1/n encoder.
  Takes in one input bit at a time, and produces a n-bit output.
  
	Input parameters:
		input		The input data bit (i.e. a 0 or 1).
		state_in	The starting state of the encoder (an int from 0 to 2^m-1).
		g[]			An n-element vector containing the code generators in binary form.
		KK			The constraint length of the convolutional code.

	Output parameters:
		output_p[]		An n-element vector containing the encoded bits.
		state_out_p[]	An integer containing the final state of the encoder	
						(i.e. the state after encoding this bit)
	
  This function is used by rsc_encode(), nsc_transit(), rsc_transit(), and nsc_transit() */

static int nsc_enc_bit(
				   int	state_out_p[],
				   int	input,
				   int	state_in, 
				   int  g[],
				   int  KK,
				   int  nn )
{
	/* declare variables */
	int state, i;
	int out = 0;	

	/* create a word made up of state and new input */
	state = (input<<(KK-1))^state_in;
	
	/* AND the word with the generators */
	for (i=0;i<nn;i++)
    {		
		/* update output symbol */
		out = (out<<1) + parity_counter( state&g[i], KK ); 		
    }
	
	/* shift the state to make the new state */
	state_out_p[0] = state>>1; 	
	return(out);
}

static int rsc_enc_bit(
				   int	state_out_p[],
				   int	input,
				   int	state_in, 
				   int  g[],
				   int  KK,
				   int  nn )
{
	/* declare variables */
	int state, i, out, a_k;	

	/* systematic output */
	out = input;

	/* determine feedback bit */
	a_k = input^parity_counter( g[0]&state_in, KK );

	/* create a word made up of state and feedback bit */
	state = (a_k<<(KK-1))^state_in;

	/* AND the word with the generators */
	for (i=1;i<nn;i++)
    {		
		/* update output symbol */
		out = (out<<1) + parity_counter( state&g[i], KK ); 		
    }
	
	/* shift the state to make the new state */
	state_out_p[0] = state>>1; 	
	return(out);
}

/* function that creates the transit and output vectors */
static void nsc_transit(
						int		output_p[],
						int		trans_p[],
						int		input,
						int     g[],
						int     KK,
						int     nn )
{
	int nextstate[1];
	int state, states;
	states = (1<<(KK-1));  /* The number of states: 2^mm */

	/* Determine the output and next state for each possible starting state */
	for(state=0;state<states;state++) {
		output_p[state]  = nsc_enc_bit( nextstate, input, state, g, KK, nn ); 
		trans_p[state]  = nextstate[0];
	}
	return;
}

/* Function rsc_transit()

  Copyright 2001, Matthew C. Valenti.
	
  Description: Calculates the "transition matrix" for the trellis.
  This information tells the decoder what the next state and output bits
  will be given the current state and input bit.

	Input parameters:
		input		Either 0 or 1 --- the input data bit.
		g[]			A two element vector containing the code generators.
		KK			The constraint length of the convolutional code.

	Output parameters:
		output_p[]	A vector of length max_states = 2^(KK-1) containing
		            the output symbols.
		trans_p[]   A vector of length max_states that tells the decoder
					what the next state will be given the input and current state.
	
  This function is used by turbo_decode()   */

static void rsc_transit(
						int	output_p[],
						int trans_p[],
						int	input,
						int g[],
						int KK,
						int nn )
{
	int nextstate[1];
	int state, states; 

	states = 1 << (KK-1); /* The number of states: 2^mm */

	/* Determine the output and next state for each possible starting state */
	for(state=0;state<states;state++) {
		output_p[state] = rsc_enc_bit( nextstate, input, state, g, KK, nn ); 
		trans_p[state]  = nextstate[0];
	}	
	return;
}

static void rsc_tail(
						int	tail_p[],
						int g[],
						int max_states,
						int mm )
{
	int state;

	/* Determine the tail for each state */
	for(state=0;state<max_states;state++) {		
		/* determine feedback word */
		tail_p[state] = parity_counter( g[0]&state, mm );
	}
	return;
}

static void conv_encode(
	     int		output_p[],
	     int		input[],
		 int		out0[], 
		 int		state0[], 
		 int		out1[], 
		 int		state1[],
         int		tail[],	 
         int        KK,
         int        LL,
		 int        nn )
{
  int i, j, inbit, outsym;
  int *bin_vec;
  int state = 0;

  bin_vec = calloc( nn, sizeof(int) );

  /* encode one bit at a time */
  for (i=0;i<LL+KK-1;i++) {
	  if (i<LL)
		  inbit = input[i]; /* data bit */
	  else
		  inbit = tail[state]; /* tail bit */
	  
	  if (inbit) {
		  /* Input is a one */
		  outsym = out1[state];  /* The output symbol */
		  
		  /* Determine next state */
		  state = state1[state];
	  } else {
		  /* Input is a zero */
		  outsym = out0[state];  /* The output symbol */
		  
		  /* Determine next state */
		  state = state0[state];
	  }

	  /* Convert symbol to a binary vector	*/
	  itob( bin_vec, outsym, nn );
		  
	  /* Assign to output */
	  for (j=0;j<nn;j++)
		  output_p[nn*i+j] = bin_vec[j];
  }

  free(bin_vec);

  return;
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
91极品视觉盛宴| 亚洲天堂a在线| 亚洲码国产岛国毛片在线| 日韩精品色哟哟| 成人激情av网| 久久亚洲精品国产精品紫薇| 亚洲一本大道在线| 91免费观看视频在线| 久久精品亚洲国产奇米99| 天天亚洲美女在线视频| 在线欧美日韩精品| 中文字幕电影一区| 国产毛片精品视频| 欧美va在线播放| 五月天一区二区| 色94色欧美sute亚洲线路一ni| 久久久综合激的五月天| 紧缚捆绑精品一区二区| 欧美一区二区在线免费观看| 亚洲午夜电影网| 欧美色图片你懂的| 亚洲愉拍自拍另类高清精品| 91丨porny丨户外露出| 亚洲欧洲日本在线| 成人免费毛片片v| 日本一区二区三区在线观看| 国产电影精品久久禁18| 久久精品一区四区| 国产99一区视频免费| 国产无一区二区| 成人免费福利片| 中文字幕av一区二区三区| 国产成人啪午夜精品网站男同| 精品久久国产字幕高潮| 玖玖九九国产精品| 久久综合丝袜日本网| 精品亚洲国内自在自线福利| 精品国产伦一区二区三区免费| 久久se这里有精品| 国产色综合一区| 国产九色sp调教91| 91麻豆精品国产| 久久国产麻豆精品| 中文字幕免费不卡| 色综合天天综合在线视频| 亚洲午夜国产一区99re久久| 91精品国产综合久久香蕉麻豆| 久久精品噜噜噜成人av农村| 久久久不卡影院| 91在线观看美女| 天天av天天翘天天综合网色鬼国产| 4438x成人网最大色成网站| 韩国精品一区二区| 中文字幕一区二区三区四区不卡| 一本大道久久a久久综合| 丝瓜av网站精品一区二区| 久久一日本道色综合| 成人激情校园春色| 天堂成人国产精品一区| 久久一留热品黄| 一本色道久久加勒比精品| 免播放器亚洲一区| 国产精品美女视频| 欧美男人的天堂一二区| 懂色av中文字幕一区二区三区| 一级女性全黄久久生活片免费| 日韩一级黄色片| 99久久久久久99| 精品中文字幕一区二区| 亚洲色图在线视频| 精品福利一区二区三区| 色婷婷精品久久二区二区蜜臀av| 精品一区二区三区影院在线午夜 | 亚洲国产成人午夜在线一区| 91国偷自产一区二区三区观看| 欧美aⅴ一区二区三区视频| 国产精品精品国产色婷婷| 欧美一区二区视频观看视频| 成人avav影音| 国产在线精品视频| 亚洲午夜久久久久| 亚洲欧洲精品成人久久奇米网| 91精品麻豆日日躁夜夜躁| 91一区二区三区在线观看| 精品一区二区三区久久| 一二三区精品福利视频| 中文字幕电影一区| 26uuu亚洲综合色欧美| 欧美日韩中文精品| 色婷婷综合中文久久一本| 国产精品伊人色| 玖玖九九国产精品| 日韩福利电影在线观看| 亚洲影视在线播放| 自拍偷拍亚洲综合| 中文字幕第一区| 国产偷国产偷精品高清尤物 | 日本道在线观看一区二区| 国产成人精品亚洲日本在线桃色| 免费观看久久久4p| 亚洲va天堂va国产va久| 一区二区三区在线免费| 国产精品久久久久久久浪潮网站| 国产午夜精品一区二区三区嫩草 | 国产自产v一区二区三区c| 日本少妇一区二区| 日韩av高清在线观看| 亚洲成人第一页| 亚洲第一福利一区| 性做久久久久久免费观看| 性做久久久久久| 亚洲成人动漫在线观看| 婷婷久久综合九色综合绿巨人| 一区二区三区精品| 亚洲最新视频在线播放| 尤物视频一区二区| 亚洲一二三专区| 五月天一区二区| 久久成人麻豆午夜电影| 国产在线不卡一区| 国产精品一级片在线观看| 韩国理伦片一区二区三区在线播放| 精品一二三四在线| 极品少妇一区二区三区精品视频 | 久久久久久**毛片大全| 欧美激情在线一区二区| 国产精品亲子伦对白| 亚洲色图欧美激情| 亚洲主播在线播放| 亚洲成人久久影院| 激情小说欧美图片| 不卡的电视剧免费网站有什么| 色综合网色综合| 884aa四虎影成人精品一区| 日韩一区二区三区在线观看| 久久久国产午夜精品| 中文字幕视频一区二区三区久| 亚洲精品中文在线影院| 日韩不卡一二三区| 丁香五精品蜜臀久久久久99网站| 91麻豆国产福利精品| 欧美一区二区三区四区视频| 久久综合九色综合久久久精品综合 | 中文字幕不卡在线观看| 亚洲精品视频在线观看免费| 日韩成人免费在线| 成人午夜在线视频| 3d动漫精品啪啪一区二区竹菊| 久久久亚洲精品石原莉奈| 亚洲免费在线电影| 青青草国产精品亚洲专区无| 国内不卡的二区三区中文字幕| 99久久婷婷国产精品综合| 欧美肥胖老妇做爰| 国产精品卡一卡二卡三| 日本欧美一区二区在线观看| eeuss鲁片一区二区三区| 欧美一区二区三区性视频| 中文字幕一区二区三区不卡在线| 天天av天天翘天天综合网| 国产成人在线观看| 日韩一区二区高清| 一区二区在线观看不卡| 国产麻豆91精品| 91精品国产福利| 亚洲精品国产一区二区精华液 | 国产宾馆实践打屁股91| 欧美性猛交xxxx乱大交退制版| 久久久久久久性| 奇米综合一区二区三区精品视频 | 一区二区三区**美女毛片| 国产一区二区三区日韩| 欧美妇女性影城| 一区二区在线观看免费| 成人午夜电影久久影院| 精品欧美一区二区三区精品久久 | 一区二区三区在线免费视频| 成人午夜精品一区二区三区| 欧美成人在线直播| 免费一级片91| 欧美精品欧美精品系列| 亚洲成人自拍网| 91国在线观看| 亚洲美女电影在线| 99精品欧美一区| 国产精品系列在线| 成人一区二区三区中文字幕| 久久青草国产手机看片福利盒子 | 26uuuu精品一区二区| 日本免费新一区视频| 777精品伊人久久久久大香线蕉| 亚洲一区av在线| 欧美专区亚洲专区| 一级日本不卡的影视| 91国模大尺度私拍在线视频| 亚洲精品乱码久久久久久| 91麻豆国产自产在线观看| 亚洲视频在线观看一区| 成人av网址在线| 亚洲欧洲综合另类|