mirror of
https://github.com/kunkundi/crossdesk.git
synced 2025-10-27 12:45:35 +08:00
Fix OpenFEC compile error on Windows platform
This commit is contained in:
@@ -79,7 +79,7 @@
|
||||
* Default maximum number of source and encoding symbols for this codec.
|
||||
* This value depends in particular on the kind of decoder used. To this
|
||||
* limit, codec implementation details might add other limits (e.g. if
|
||||
* the ESI values are stored in UINT16 instead of UINT32...).
|
||||
* the ESI values are stored in _UINT16 instead of _UINT32...).
|
||||
*
|
||||
* Hints:
|
||||
* If ML decoding is enabled and used, then limit yourself to a value
|
||||
|
||||
@@ -45,12 +45,12 @@ typedef struct of_ldpc_staircase_cb
|
||||
/****** of_cb part { **************************************************/
|
||||
of_codec_id_t codec_id;
|
||||
of_codec_type_t codec_type;
|
||||
UINT32 nb_source_symbols; /** k parameter (AKA code dimension). */
|
||||
UINT32 nb_repair_symbols; /** r = n - k parameter. */
|
||||
UINT32 encoding_symbol_length; /** symbol length. */
|
||||
_UINT32 nb_source_symbols; /** k parameter (AKA code dimension). */
|
||||
_UINT32 nb_repair_symbols; /** r = n - k parameter. */
|
||||
_UINT32 encoding_symbol_length; /** symbol length. */
|
||||
/****** } of_cb part **************************************************/
|
||||
|
||||
UINT32 nb_total_symbols; /** n parameter (AKA code length). */
|
||||
_UINT32 nb_total_symbols; /** n parameter (AKA code length). */
|
||||
|
||||
/* parity check matrix */
|
||||
of_mod2sparse *pchk_matrix;
|
||||
@@ -60,20 +60,20 @@ typedef struct of_ldpc_staircase_cb
|
||||
#ifdef OF_DEBUG
|
||||
of_symbols_stats_t *stats_symbols;
|
||||
#endif
|
||||
UINT32 nb_source_symbol_ready; // Number of source symbols ready
|
||||
UINT32 nb_repair_symbol_ready; // Number of parity symbols ready
|
||||
_UINT32 nb_source_symbol_ready; // Number of source symbols ready
|
||||
_UINT32 nb_repair_symbol_ready; // Number of parity symbols ready
|
||||
|
||||
#ifdef ML_DECODING /* { */
|
||||
UINT32 *index_rows; // Indirection index to access initial m_chekValues array
|
||||
UINT32 *index_cols; // Indirection index to access initial symbol array
|
||||
UINT32 remain_cols; // Nb of non empty remaining cols in the future simplified matrix
|
||||
UINT32 remain_rows; // Nb of non empty remaining rows in the future simplified matrix
|
||||
_UINT32 *index_rows; // Indirection index to access initial m_chekValues array
|
||||
_UINT32 *index_cols; // Indirection index to access initial symbol array
|
||||
_UINT32 remain_cols; // Nb of non empty remaining cols in the future simplified matrix
|
||||
_UINT32 remain_rows; // Nb of non empty remaining rows in the future simplified matrix
|
||||
|
||||
of_mod2sparse *pchk_matrix_simplified; // Simplified Parity Check Matrix in sparse mode format
|
||||
of_mod2sparse *original_pchkMatrix;
|
||||
of_mod2sparse *pchk_matrix_gauss; // Parity Check matrix in sparse mode format.
|
||||
UINT32 dec_step; // Current step in the Gauss decoding algorithm
|
||||
UINT32 threshold_simplification; // threshold (number of symbols) above which we
|
||||
_UINT32 dec_step; // Current step in the Gauss decoding algorithm
|
||||
_UINT32 threshold_simplification; // threshold (number of symbols) above which we
|
||||
// run the Gaussian Elimination algorithm
|
||||
#endif /* } ML_DECODING */
|
||||
|
||||
@@ -81,43 +81,43 @@ typedef struct of_ldpc_staircase_cb
|
||||
/** table of all check values, i.e. that contain the constant term of each equation. */
|
||||
void** tab_const_term_of_equ;
|
||||
/** table containing the number of encoding symbols of each equation. */
|
||||
UINT16* tab_nb_enc_symbols_per_equ;
|
||||
_UINT16* tab_nb_enc_symbols_per_equ;
|
||||
/** table containing the number of unknow symbols (i.e. neither received nor decoded
|
||||
* at that time) of each equation. */
|
||||
UINT16* tab_nb_unknown_symbols;
|
||||
_UINT16* tab_nb_unknown_symbols;
|
||||
/** table containing the number of equations in which a repair symbol is included. */
|
||||
UINT16* tab_nb_equ_for_repair;
|
||||
_UINT16* tab_nb_equ_for_repair;
|
||||
|
||||
void** repair_symbols_values;
|
||||
void** tmp_tab_symbols;
|
||||
UINT16 nb_tmp_symbols;
|
||||
_UINT16 nb_tmp_symbols;
|
||||
#endif /* } OF_USE_DECODER */
|
||||
|
||||
void **encoding_symbols_tab;
|
||||
|
||||
/** callbacks registered by the application. */
|
||||
void* (*decoded_source_symbol_callback) (void *context,
|
||||
UINT32 size, /* size of decoded source symbol */
|
||||
UINT32 esi); /* encoding symbol ID in {0..k-1} */
|
||||
_UINT32 size, /* size of decoded source symbol */
|
||||
_UINT32 esi); /* encoding symbol ID in {0..k-1} */
|
||||
void* (*decoded_repair_symbol_callback) (void *context,
|
||||
UINT32 size, /* size of decoded repair symbol */
|
||||
UINT32 esi); /* encoding symbol ID in {0..k-1} */
|
||||
_UINT32 size, /* size of decoded repair symbol */
|
||||
_UINT32 esi); /* encoding symbol ID in {0..k-1} */
|
||||
void* context_4_callback;
|
||||
|
||||
/****** } of_linear_binary_code_cb part *******************************/
|
||||
|
||||
/** Maximum number of source symbols supported by this codec for practical reasons. */
|
||||
UINT32 max_nb_source_symbols;
|
||||
_UINT32 max_nb_source_symbols;
|
||||
/** Maximum number of encoding symbols supported by this codec for practical reasons. */
|
||||
UINT32 max_nb_encoding_symbols;
|
||||
_UINT32 max_nb_encoding_symbols;
|
||||
/** Seed used to build this code. */
|
||||
UINT32 prng_seed;
|
||||
_UINT32 prng_seed;
|
||||
/** Target number or "1s" per column for H1 (see RFC5170). */
|
||||
UINT8 N1;
|
||||
_UINT8 N1;
|
||||
/** During H1 creation, have extra entries been added per row to make the row hamming weight at least two? */
|
||||
bool extra_entries_added_in_pchk;
|
||||
/** ESI of first non decoded source symbol. Used by is_decoding_complete function. */
|
||||
UINT32 first_non_decoded;
|
||||
_UINT32 first_non_decoded;
|
||||
} of_ldpc_staircase_cb_t;
|
||||
|
||||
|
||||
@@ -165,8 +165,8 @@ of_status_t of_ldpc_staircase_set_fec_parameters (of_ldpc_staircase_cb_t* ofcb,
|
||||
|
||||
/**
|
||||
* @fn of_status_t of_ldpc_staircase_set_callback_functions (of_ldpc_staircase_cb_t *ofcb,void* (*decoded_source_symbol_callback)
|
||||
* (void *context,UINT32 size,UINT32 esi), void* (*decoded_repair_symbol_callback)
|
||||
* (void *context,UINT32 size,UINT32 esi),void* context_4_callback)
|
||||
* (void *context,_UINT32 size,_UINT32 esi), void* (*decoded_repair_symbol_callback)
|
||||
* (void *context,_UINT32 size,_UINT32 esi),void* context_4_callback)
|
||||
* @brief set various callbock functions (see header of_open_fec_api.h)
|
||||
* @param ofcb (IN) Pointer to the session.
|
||||
*
|
||||
@@ -190,16 +190,16 @@ of_status_t of_ldpc_staircase_set_fec_parameters (of_ldpc_staircase_cb_t* ofcb,
|
||||
*/
|
||||
of_status_t of_ldpc_staircase_set_callback_functions (of_ldpc_staircase_cb_t* ofcb,
|
||||
void* (*decoded_source_symbol_callback) (void *context,
|
||||
UINT32 size, /* size of decoded source symbol */
|
||||
UINT32 esi), /* encoding symbol ID in {0..k-1} */
|
||||
_UINT32 size, /* size of decoded source symbol */
|
||||
_UINT32 esi), /* encoding symbol ID in {0..k-1} */
|
||||
void* (*decoded_repair_symbol_callback) (void *context,
|
||||
UINT32 size, /* size of decoded repair symbol */
|
||||
UINT32 esi), /* encoding symbol ID in {0..k-1} */
|
||||
_UINT32 size, /* size of decoded repair symbol */
|
||||
_UINT32 esi), /* encoding symbol ID in {0..k-1} */
|
||||
void* context_4_callback);
|
||||
|
||||
#ifdef OF_USE_ENCODER
|
||||
/**
|
||||
* @fn of_status_t of_ldpc_staircase_build_repair_symbol (of_ldpc_staircase_cb_t* ofcb, void* encoding_symbols_tab[], UINT32 esi_of_symbol_to_build)
|
||||
* @fn of_status_t of_ldpc_staircase_build_repair_symbol (of_ldpc_staircase_cb_t* ofcb, void* encoding_symbols_tab[], _UINT32 esi_of_symbol_to_build)
|
||||
* @brief build a repair symbol (encoder only)
|
||||
* @param ofcb (IN) Pointer to the session.
|
||||
* @param encoding_symbols_tab (IN/OUT) table of source and repair symbols.
|
||||
@@ -213,12 +213,12 @@ of_status_t of_ldpc_staircase_set_callback_functions (of_ldpc_staircase_cb_t* o
|
||||
*/
|
||||
of_status_t of_ldpc_staircase_build_repair_symbol (of_ldpc_staircase_cb_t* ofcb,
|
||||
void* encoding_symbols_tab[],
|
||||
UINT32 esi_of_symbol_to_build);
|
||||
_UINT32 esi_of_symbol_to_build);
|
||||
#endif //OF_USE_ENCODER
|
||||
|
||||
#ifdef OF_USE_DECODER
|
||||
/**
|
||||
* @fn of_status_t of_ldpc_staircase_decode_with_new_symbol (of_ldpc_staircase_cb_t* ofcb, void* const new_symbol_buf, UINT32 new_symbol_esi)
|
||||
* @fn of_status_t of_ldpc_staircase_decode_with_new_symbol (of_ldpc_staircase_cb_t* ofcb, void* const new_symbol_buf, _UINT32 new_symbol_esi)
|
||||
* @brief (try to) decode with a newly received symbol
|
||||
* @param ofcb (IN) Pointer to the session.
|
||||
* @param new_symbol (IN) Pointer to the encoding symbol now available (i.e. a new
|
||||
@@ -229,7 +229,7 @@ of_status_t of_ldpc_staircase_build_repair_symbol (of_ldpc_staircase_cb_t* ofcb
|
||||
*/
|
||||
of_status_t of_ldpc_staircase_decode_with_new_symbol (of_ldpc_staircase_cb_t* ofcb,
|
||||
void* new_symbol,
|
||||
UINT32 new_symbol_esi);
|
||||
_UINT32 new_symbol_esi);
|
||||
|
||||
/**
|
||||
* @fn of_status_t of_ldpc_staircase_set_available_symbols (of_ldpc_staircase_cb_t* ofcb, void* const encoding_symbols_tab[]);
|
||||
@@ -275,7 +275,7 @@ of_status_t of_ldpc_staircase_get_source_symbols_tab (of_ldpc_staircase_cb_t* of
|
||||
void* source_symbols_tab[]);
|
||||
|
||||
/**
|
||||
* @fn of_status_t of_ldpc_staircase_set_control_parameter (of_ldpc_staircase_cb_t* ofcb,UINT32 type,void* value,UINT32 length)
|
||||
* @fn of_status_t of_ldpc_staircase_set_control_parameter (of_ldpc_staircase_cb_t* ofcb,_UINT32 type,void* value,_UINT32 length)
|
||||
* @brief set a specific FEC parameter
|
||||
* @param ofcb (IN) Pointer to the session.
|
||||
* @param type (IN) Type of parameter. This type is FEC codec ID specific.
|
||||
@@ -285,12 +285,12 @@ of_status_t of_ldpc_staircase_get_source_symbols_tab (of_ldpc_staircase_cb_t* of
|
||||
* @return Error status.
|
||||
*/
|
||||
of_status_t of_ldpc_staircase_set_control_parameter(of_ldpc_staircase_cb_t* ofcb,
|
||||
UINT32 type,
|
||||
_UINT32 type,
|
||||
void* value,
|
||||
UINT32 length);
|
||||
_UINT32 length);
|
||||
|
||||
/**
|
||||
* @fn of_status_t of_ldpc_staircase_get_control_parameter (of_ldpc_staircase_cb_t* ofcb, UINT32 type, void* value, UINT32 length)
|
||||
* @fn of_status_t of_ldpc_staircase_get_control_parameter (of_ldpc_staircase_cb_t* ofcb, _UINT32 type, void* value, _UINT32 length)
|
||||
* @brief get a specific FEC parameter
|
||||
* @param ofcb (IN) Pointer to the session.
|
||||
* @param type (IN) Type of parameter. This type is FEC codec ID specific.
|
||||
@@ -302,9 +302,9 @@ of_status_t of_ldpc_staircase_set_control_parameter(of_ldpc_staircase_cb_t* ofcb
|
||||
* @return Error status.
|
||||
*/
|
||||
of_status_t of_ldpc_staircase_get_control_parameter(of_ldpc_staircase_cb_t* ofcb,
|
||||
UINT32 type,
|
||||
_UINT32 type,
|
||||
void* value,
|
||||
UINT32 length);
|
||||
_UINT32 length);
|
||||
|
||||
/**
|
||||
* @brief Create the LDPC-Staircase matrix as defined in RFC 5170.
|
||||
@@ -315,10 +315,10 @@ of_status_t of_ldpc_staircase_get_control_parameter(of_ldpc_staircase_cb_t* ofcb
|
||||
* @param ofcb (IN/OUT)
|
||||
* @return pointer to the parity check matrix that has just been allocated and initialized.
|
||||
*/
|
||||
of_mod2sparse* of_create_pchck_matrix_rfc5170_compliant (UINT32 nb_rows,
|
||||
UINT32 nb_cols,
|
||||
UINT32 left_degree,
|
||||
UINT32 seed,
|
||||
of_mod2sparse* of_create_pchck_matrix_rfc5170_compliant (_UINT32 nb_rows,
|
||||
_UINT32 nb_cols,
|
||||
_UINT32 left_degree,
|
||||
_UINT32 seed,
|
||||
of_ldpc_staircase_cb_t *ofcb);
|
||||
|
||||
#endif //OF_USE_DECODER
|
||||
|
||||
@@ -59,7 +59,7 @@ of_status_t of_ldpc_staircase_create_codec_instance (of_ldpc_staircase_cb_t** of
|
||||
of_status_t of_ldpc_staircase_release_codec_instance (of_ldpc_staircase_cb_t* ofcb)
|
||||
{
|
||||
OF_ENTER_FUNCTION
|
||||
UINT32 i;
|
||||
_UINT32 i;
|
||||
if (ofcb->pchk_matrix != NULL)
|
||||
{
|
||||
of_mod2sparse_free(ofcb->pchk_matrix);
|
||||
@@ -167,8 +167,8 @@ of_status_t of_ldpc_staircase_set_fec_parameters (of_ldpc_staircase_cb_t* ofcb,
|
||||
of_ldpc_parameters_t* params)
|
||||
{
|
||||
of_mod2entry *e;
|
||||
UINT32 row;
|
||||
UINT32 seq;
|
||||
_UINT32 row;
|
||||
_UINT32 seq;
|
||||
|
||||
OF_ENTER_FUNCTION
|
||||
|
||||
@@ -191,7 +191,7 @@ of_status_t of_ldpc_staircase_set_fec_parameters (of_ldpc_staircase_cb_t* ofcb,
|
||||
if ((ofcb->nb_repair_symbols = params->nb_repair_symbols) > ofcb->max_nb_encoding_symbols)
|
||||
{
|
||||
/* this test is needed because if the number of repair symbols is
|
||||
* erroneously < 0, because we are using UINT32, this is transformed
|
||||
* erroneously < 0, because we are using _UINT32, this is transformed
|
||||
* into a very large integer, which, when added to k, wraps once again
|
||||
* and the test on nb_total_symbols returns true... */
|
||||
OF_PRINT_ERROR(("of_ldpc_staircase_set_fec_parameters: ERROR, invalid number of repair symbols (got %d, maximum number of encoding symbols is %d)\n",
|
||||
@@ -256,14 +256,14 @@ of_status_t of_ldpc_staircase_set_fec_parameters (of_ldpc_staircase_cb_t* ofcb,
|
||||
#ifdef OF_USE_DECODER
|
||||
if (ofcb->codec_type & OF_DECODER)
|
||||
{
|
||||
ofcb->tab_nb_unknown_symbols = (UINT16*)
|
||||
of_calloc (ofcb->nb_repair_symbols, sizeof (UINT16));
|
||||
ofcb->tab_nb_unknown_symbols = (_UINT16*)
|
||||
of_calloc (ofcb->nb_repair_symbols, sizeof (_UINT16));
|
||||
ofcb->tab_const_term_of_equ = (void**)
|
||||
of_calloc (ofcb->nb_repair_symbols, sizeof (void*));
|
||||
ofcb->tab_nb_equ_for_repair = (UINT16*)
|
||||
of_calloc (ofcb->nb_repair_symbols, sizeof (UINT16));
|
||||
ofcb->tab_nb_enc_symbols_per_equ = (UINT16*)
|
||||
of_calloc (ofcb->nb_repair_symbols, sizeof (UINT16));
|
||||
ofcb->tab_nb_equ_for_repair = (_UINT16*)
|
||||
of_calloc (ofcb->nb_repair_symbols, sizeof (_UINT16));
|
||||
ofcb->tab_nb_enc_symbols_per_equ = (_UINT16*)
|
||||
of_calloc (ofcb->nb_repair_symbols, sizeof (_UINT16));
|
||||
if (ofcb->tab_nb_unknown_symbols == NULL || ofcb->tab_const_term_of_equ == NULL ||
|
||||
ofcb->tab_nb_equ_for_repair == NULL || ofcb->tab_nb_enc_symbols_per_equ == NULL) {
|
||||
goto no_mem;
|
||||
@@ -355,11 +355,11 @@ error:
|
||||
|
||||
of_status_t of_ldpc_staircase_set_callback_functions (of_ldpc_staircase_cb_t* ofcb,
|
||||
void* (*decoded_source_symbol_callback) (void *context,
|
||||
UINT32 size, /* size of decoded source symbol */
|
||||
UINT32 esi), /* encoding symbol ID in {0..k-1} */
|
||||
_UINT32 size, /* size of decoded source symbol */
|
||||
_UINT32 esi), /* encoding symbol ID in {0..k-1} */
|
||||
void* (*decoded_repair_symbol_callback) (void *context,
|
||||
UINT32 size, /* size of decoded repair symbol */
|
||||
UINT32 esi), /* encoding symbol ID in {k..n-1} */
|
||||
_UINT32 size, /* size of decoded repair symbol */
|
||||
_UINT32 esi), /* encoding symbol ID in {k..n-1} */
|
||||
void* context_4_callback)
|
||||
{
|
||||
OF_ENTER_FUNCTION
|
||||
@@ -375,11 +375,11 @@ of_status_t of_ldpc_staircase_set_callback_functions (of_ldpc_staircase_cb_t* o
|
||||
|
||||
of_status_t of_ldpc_staircase_build_repair_symbol (of_ldpc_staircase_cb_t* ofcb,
|
||||
void* encoding_symbols_tab[],
|
||||
UINT32 esi_of_symbol_to_build)
|
||||
_UINT32 esi_of_symbol_to_build)
|
||||
{
|
||||
of_mod2entry *e;
|
||||
UINT32 col_to_build;
|
||||
UINT32 esi;
|
||||
_UINT32 col_to_build;
|
||||
_UINT32 esi;
|
||||
void *to_add_buf;
|
||||
void *parity_symbol;
|
||||
OF_ENTER_FUNCTION
|
||||
@@ -429,7 +429,7 @@ error:
|
||||
|
||||
of_status_t of_ldpc_staircase_decode_with_new_symbol (of_ldpc_staircase_cb_t* ofcb,
|
||||
void* new_symbol,
|
||||
UINT32 new_symbol_esi)
|
||||
_UINT32 new_symbol_esi)
|
||||
{
|
||||
OF_ENTER_FUNCTION
|
||||
return of_linear_binary_code_decode_with_new_symbol((of_linear_binary_code_cb_t*)ofcb, new_symbol, new_symbol_esi);
|
||||
@@ -439,7 +439,7 @@ of_status_t of_ldpc_staircase_decode_with_new_symbol (of_ldpc_staircase_cb_t* of
|
||||
of_status_t of_ldpc_staircase_set_available_symbols (of_ldpc_staircase_cb_t* ofcb,
|
||||
void* const encoding_symbols_tab[])
|
||||
{
|
||||
UINT32 i;
|
||||
_UINT32 i;
|
||||
|
||||
OF_ENTER_FUNCTION
|
||||
for (i = 0; i < ofcb->nb_total_symbols; i++)
|
||||
@@ -501,9 +501,9 @@ of_status_t of_ldpc_staircase_get_source_symbols_tab (of_ldpc_staircase_cb_t* of
|
||||
#endif //OF_USE_DECODER
|
||||
|
||||
of_status_t of_ldpc_staircase_set_control_parameter (of_ldpc_staircase_cb_t* ofcb,
|
||||
UINT32 type,
|
||||
_UINT32 type,
|
||||
void* value,
|
||||
UINT32 length)
|
||||
_UINT32 length)
|
||||
{
|
||||
OF_PRINT_ERROR(("of_ldpc_staircase_set_control_parameter: ERROR, not implemented...\n"))
|
||||
return OF_STATUS_ERROR;
|
||||
@@ -511,30 +511,30 @@ of_status_t of_ldpc_staircase_set_control_parameter (of_ldpc_staircase_cb_t* of
|
||||
|
||||
|
||||
of_status_t of_ldpc_staircase_get_control_parameter (of_ldpc_staircase_cb_t* ofcb,
|
||||
UINT32 type,
|
||||
_UINT32 type,
|
||||
void* value,
|
||||
UINT32 length)
|
||||
_UINT32 length)
|
||||
{
|
||||
OF_ENTER_FUNCTION
|
||||
switch (type) {
|
||||
case OF_CTRL_GET_MAX_K:
|
||||
if (value == NULL || length != sizeof(UINT32)) {
|
||||
if (value == NULL || length != sizeof(_UINT32)) {
|
||||
OF_PRINT_ERROR(("%s: OF_CTRL_GET_MAX_K ERROR: null value or bad length (got %d, expected %zu)\n",
|
||||
__FUNCTION__, length, sizeof(UINT32)))
|
||||
__FUNCTION__, length, sizeof(_UINT32)))
|
||||
goto error;
|
||||
}
|
||||
*(UINT32*)value = ofcb->max_nb_source_symbols;
|
||||
OF_TRACE_LVL(1, ("%s: OF_CTRL_GET_MAX_K (%d)\n", __FUNCTION__, *(UINT32*)value))
|
||||
*(_UINT32*)value = ofcb->max_nb_source_symbols;
|
||||
OF_TRACE_LVL(1, ("%s: OF_CTRL_GET_MAX_K (%d)\n", __FUNCTION__, *(_UINT32*)value))
|
||||
break;
|
||||
|
||||
case OF_CTRL_GET_MAX_N:
|
||||
if (value == NULL || length != sizeof(UINT32)) {
|
||||
if (value == NULL || length != sizeof(_UINT32)) {
|
||||
OF_PRINT_ERROR(("%s: OF_CTRL_GET_MAX_N ERROR: null value or bad length (got %d, expected %zu)\n",
|
||||
__FUNCTION__, length, sizeof(UINT32)))
|
||||
__FUNCTION__, length, sizeof(_UINT32)))
|
||||
goto error;
|
||||
}
|
||||
*(UINT32*)value = ofcb->max_nb_encoding_symbols;
|
||||
OF_TRACE_LVL(1, ("%s: OF_CTRL_GET_MAX_N (%d)\n", __FUNCTION__, *(UINT32*)value))
|
||||
*(_UINT32*)value = ofcb->max_nb_encoding_symbols;
|
||||
OF_TRACE_LVL(1, ("%s: OF_CTRL_GET_MAX_N (%d)\n", __FUNCTION__, *(_UINT32*)value))
|
||||
break;
|
||||
|
||||
case OF_CRTL_LDPC_STAIRCASE_IS_LAST_SYMBOL_NULL:
|
||||
|
||||
@@ -48,14 +48,14 @@
|
||||
*/
|
||||
typedef struct of_ldpc_parameters
|
||||
{
|
||||
UINT32 nb_source_symbols; /* must be 1st item */
|
||||
UINT32 nb_repair_symbols; /* must be 2nd item */
|
||||
UINT32 encoding_symbol_length; /* must be 3rd item */
|
||||
_UINT32 nb_source_symbols; /* must be 1st item */
|
||||
_UINT32 nb_repair_symbols; /* must be 2nd item */
|
||||
_UINT32 encoding_symbol_length; /* must be 3rd item */
|
||||
/*
|
||||
* FEC codec id specific attributes follow...
|
||||
*/
|
||||
INT32 prng_seed;
|
||||
UINT8 N1;
|
||||
_INT32 prng_seed;
|
||||
_UINT8 N1;
|
||||
} of_ldpc_parameters_t;
|
||||
|
||||
|
||||
|
||||
@@ -50,21 +50,21 @@
|
||||
|
||||
|
||||
/* RFC5170 compliant fonction. DO NOT MODIFY */
|
||||
of_mod2sparse* of_create_pchck_matrix_rfc5170_compliant (UINT32 nb_rows,
|
||||
UINT32 nb_cols,
|
||||
UINT32 left_degree,
|
||||
UINT32 seed,
|
||||
of_mod2sparse* of_create_pchck_matrix_rfc5170_compliant (_UINT32 nb_rows,
|
||||
_UINT32 nb_cols,
|
||||
_UINT32 left_degree,
|
||||
_UINT32 seed,
|
||||
of_ldpc_staircase_cb_t *ofcb)
|
||||
{
|
||||
OF_ENTER_FUNCTION
|
||||
of_mod2entry *e;
|
||||
UINT32 added, uneven;
|
||||
INT32 i, j, k;
|
||||
INT32 t; /* left limit within the list of possible choices u[] */
|
||||
UINT32 *u; /* table used to have a homogeneous 1 distrib. */
|
||||
_UINT32 added, uneven;
|
||||
_INT32 i, j, k;
|
||||
_INT32 t; /* left limit within the list of possible choices u[] */
|
||||
_UINT32 *u; /* table used to have a homogeneous 1 distrib. */
|
||||
of_mod2sparse *pchkMatrix = NULL;
|
||||
UINT32 skipCols = 0; // avoid warning
|
||||
UINT32 nbDataCols = 0; // avoid warning
|
||||
_UINT32 skipCols = 0; // avoid warning
|
||||
_UINT32 nbDataCols = 0; // avoid warning
|
||||
|
||||
skipCols = nb_rows;
|
||||
nbDataCols = nb_cols - skipCols;
|
||||
@@ -80,7 +80,7 @@ of_mod2sparse* of_create_pchck_matrix_rfc5170_compliant (UINT32 nb_rows,
|
||||
pchkMatrix = of_mod2sparse_allocate (nb_rows, nb_cols);
|
||||
/* create the initial version of the parity check matrix. */
|
||||
/* evenboth make method only */
|
||||
u = (UINT32*) of_calloc (left_degree * nbDataCols, sizeof * u);
|
||||
u = (_UINT32*) of_calloc (left_degree * nbDataCols, sizeof * u);
|
||||
/* initialize a list of possible choices to guarantee a homogeneous "1" distribution */
|
||||
for (k = left_degree * nbDataCols - 1; k >= 0; k--)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user