Merge pull request #13 from softwareradiosystems/next_bugfix_sch

Solved infinite loop and/or segmentation fault in ...
This commit is contained in:
Andre Puschmann 2017-08-16 21:27:03 +02:00 committed by GitHub
commit 8fee5eb41f
2 changed files with 6 additions and 2 deletions

View File

@ -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

View File

@ -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;