From 1fa1a5bbe36538e8988c2dade42c50244e57fbcb Mon Sep 17 00:00:00 2001 From: okcsampson Date: Wed, 14 Jun 2017 17:53:59 +0000 Subject: [PATCH] Fix index bug in ofdm.c demod git-svn-id: https://svn.code.sf.net/p/freetel/code@3192 01035d8c-6547-0410-b346-abe4f91aad63 --- codec2-dev/src/ofdm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/codec2-dev/src/ofdm.c b/codec2-dev/src/ofdm.c index f9ae1c12..3fd6d8ab 100644 --- a/codec2-dev/src/ofdm.c +++ b/codec2-dev/src/ofdm.c @@ -621,9 +621,9 @@ void ofdm_demod(struct OFDM *ofdm, int *rx_bits, COMP *rxbuf_in) { for (rr = 0; rr < OFDM_ROWSPERFRAME; rr++) { for (i = 1; i < (OFDM_NC + 1); i++) { if (ofdm->phase_est_en == true) { - rx_corr = rx_sym[rr][i] * cexpf(I * aphase_est_pilot[i]); + rx_corr = rx_sym[rr+1][i] * cexpf(I * aphase_est_pilot[i]); } else { - rx_corr = rx_sym[rr][i]; + rx_corr = rx_sym[rr+1][i]; } ofdm->rx_np[(rr * OFDM_ROWSPERFRAME) + (i - 1)] = rx_corr; -- 2.25.1