From fcd2422eb07ca23b509eb024628638d2ae80bd10 Mon Sep 17 00:00:00 2001 From: okcsampson Date: Sun, 18 Jun 2017 03:26:28 +0000 Subject: [PATCH] Changes to ofdm.c passes all tests git-svn-id: https://svn.code.sf.net/p/freetel/code@3210 01035d8c-6547-0410-b346-abe4f91aad63 --- codec2-dev/src/ofdm.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/codec2-dev/src/ofdm.c b/codec2-dev/src/ofdm.c index e8a310dd..f6c2e66a 100644 --- a/codec2-dev/src/ofdm.c +++ b/codec2-dev/src/ofdm.c @@ -512,7 +512,7 @@ void ofdm_demod(struct OFDM *ofdm, int *rx_bits, COMP *rxbuf_in) { /* previous pilot */ - st = OFDM_M + OFDM_NCP + OFDM_SAMPLESPERFRAME + (-OFDM_NS) * (OFDM_M + OFDM_NCP) + ofdm->sample_point; + st = OFDM_M + OFDM_NCP + OFDM_SAMPLESPERFRAME + (-OFDM_NS) * (OFDM_M + OFDM_NCP) + 1 + ofdm->sample_point; en = st + OFDM_M; complex float work[OFDM_M]; @@ -526,7 +526,7 @@ void ofdm_demod(struct OFDM *ofdm, int *rx_bits, COMP *rxbuf_in) { /* pilot - this frame - pilot */ for (rr = 0; rr < (OFDM_NS + 1); rr++) { - st = OFDM_M + OFDM_NCP + OFDM_SAMPLESPERFRAME + rr * (OFDM_M + OFDM_NCP) + ofdm->sample_point; + st = OFDM_M + OFDM_NCP + OFDM_SAMPLESPERFRAME + rr * (OFDM_M + OFDM_NCP) + 1 + ofdm->sample_point; en = st + OFDM_M; for (j = st, k = 0; j < en; j++, k++) { @@ -538,7 +538,7 @@ void ofdm_demod(struct OFDM *ofdm, int *rx_bits, COMP *rxbuf_in) { /* next pilot */ - st = OFDM_M + OFDM_NCP + OFDM_SAMPLESPERFRAME + (2 * OFDM_NS) * (OFDM_M + OFDM_NCP) + ofdm->sample_point; + st = OFDM_M + OFDM_NCP + OFDM_SAMPLESPERFRAME + (2 * OFDM_NS) * (OFDM_M + OFDM_NCP) + 1 + ofdm->sample_point; en = st + OFDM_M; for (j = st, k = 0; j < en; j++, k++) { -- 2.25.1