Merge pull request #13 from softwareradiosystems/next_bugfix_sch

Solved infinite loop and/or segmentation fault in ...
master
Andre Puschmann 7 years ago committed by GitHub
commit 8fee5eb41f

@ -48,13 +48,13 @@
// The constant SRSLTE_TDEC_NPAR defines the maximum number of parallel CB supported by all SIMD decoders
#ifdef ENABLE_SIMD_INTER
#include "srslte/phy/fec/turbodecoder_simd_inter.h"
#if LV_HAVE_AVX2
#ifdef LV_HAVE_AVX2
#define SRSLTE_TDEC_NPAR_INTRA 2
#else
#define SRSLTE_TDEC_NPAR_INTRA 1
#endif
#else
#if LV_HAVE_AVX2
#ifdef LV_HAVE_AVX2
#define SRSLTE_TDEC_NPAR 2
#else
#define SRSLTE_TDEC_NPAR 1

@ -328,6 +328,9 @@ void srslte_tdec_gen_iteration(srslte_tdec_gen_t * h, float * input, uint32_t lo
} else {
fprintf(stderr, "Error CB index not set (call srslte_tdec_gen_reset() first\n");
}
// Increase number of iterations
h->n_iter++;
}
int srslte_tdec_gen_reset(srslte_tdec_gen_t * h, uint32_t long_cb)
@ -339,6 +342,7 @@ int srslte_tdec_gen_reset(srslte_tdec_gen_t * h, uint32_t long_cb)
}
memset(h->w, 0, sizeof(float) * long_cb);
h->current_cbidx = srslte_cbsegm_cbindex(long_cb);
h->current_cb_len = long_cb;
if (h->current_cbidx < 0) {
fprintf(stderr, "Invalid CB length %d\n", long_cb);
return -1;

Loading…
Cancel
Save