ldpc.h

来自「介绍了ldpc编码相关的设计与实现」· C头文件 代码 · 共 45 行

H
45
字号
#ifndef _LDPC_H_
#define _LDPC_H_

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>

short		Column;
short		H_row;
short		G_row;

/*Define the LDPC code parameters structure*/
struct	LDPCParam
{
	short	mat_param[5];
	short	iterC;
	short	*MatCol;
	short	*MatRow;
	short	*GMatrix;
};

struct LDPCParam	ldpc_param;

void LDPC_init(struct LDPCParam *p_ldpc_param, FILE *fpLDPC);

void init_mat_para(short *mat_para, FILE *f_H_data);
void array_sort (short *in , short length , short init_min);
void gauss_elimate_to_P_I (short *mat_col , short *mat_row , short **t , short *rank , short *mat_para);
void Construct_H_Matrix (short *mat_para , short *mat_col , short *mat_row, FILE *f_H_data);
void Construct_G_Matrix (short *mat_col , short *mat_row , short **gen , short *mat_para);

void LDPC_encode(short *gen, short *input, short *output, short *mat_para);
double correct_factor(double x,double y);

void BP_decoding(double		*llr_in,
				 double		*llr_out,
				 short		*dec_out,
				 short		*mat_col,
				 short		*mat_row,
				 short		*mat_param,
				 short		iterN);


#endif

⌨️ 快捷键说明

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