From 0cbdafcc4b125531df4dab65b586b752161914c3 Mon Sep 17 00:00:00 2001 From: drowe67 Date: Tue, 12 Jun 2012 06:12:18 +0000 Subject: [PATCH] reduced sizeof tx_filter_mem, saving 100k out of 400k for FDMDV states git-svn-id: https://svn.code.sf.net/p/freetel/code@545 01035d8c-6547-0410-b346-abe4f91aad63 --- codec2-dev/octave/tfdmdv.m | 2 +- codec2-dev/src/fdmdv.c | 31 +++++++++++++++++++------------ codec2-dev/src/fdmdv_internal.h | 4 ++-- codec2-dev/unittest/tfdmdv.c | 2 ++ 4 files changed, 24 insertions(+), 15 deletions(-) diff --git a/codec2-dev/octave/tfdmdv.m b/codec2-dev/octave/tfdmdv.m index 787913cf..41e68c88 100644 --- a/codec2-dev/octave/tfdmdv.m +++ b/codec2-dev/octave/tfdmdv.m @@ -196,7 +196,7 @@ stem_sig_and_error(1, 212, real(tx_symbols_log_c(1:n/2)), real(tx_symbols_log(1: % tx_filter() diff = tx_baseband_log - tx_baseband_log_c; -c=3; +c=15; plot_sig_and_error(2, 211, real(tx_baseband_log_c(c,:)), real(sum(diff)), 'tx baseband real') plot_sig_and_error(2, 212, imag(tx_baseband_log_c(c,:)), imag(sum(diff)), 'tx baseband imag') diff --git a/codec2-dev/src/fdmdv.c b/codec2-dev/src/fdmdv.c index 3526e780..1ded60f1 100644 --- a/codec2-dev/src/fdmdv.c +++ b/codec2-dev/src/fdmdv.c @@ -145,9 +145,12 @@ struct FDMDV * CODEC2_WIN32SUPPORT fdmdv_create(void) f->prev_rx_symbols[c].real = 1.0; f->prev_rx_symbols[c].imag = 0.0; - for(k=0; ktx_filter_memory[c][k].real = 0.0; f->tx_filter_memory[c][k].imag = 0.0; + } + + for(k=0; krx_filter_memory[c][k].real = 0.0; f->rx_filter_memory[c][k].imag = 0.0; } @@ -332,7 +335,7 @@ void bits_to_dqpsk_symbols(COMP tx_symbols[], COMP prev_tx_symbols[], int tx_bit \*---------------------------------------------------------------------------*/ -void tx_filter(COMP tx_baseband[NC+1][M], COMP tx_symbols[], COMP tx_filter_memory[NC+1][NFILTER]) +void tx_filter(COMP tx_baseband[NC+1][M], COMP tx_symbols[], COMP tx_filter_memory[NC+1][NSYM]) { int c; int i,j,k; @@ -341,9 +344,14 @@ void tx_filter(COMP tx_baseband[NC+1][M], COMP tx_symbols[], COMP tx_filter_memo gain.real = sqrt(2.0)/2.0; gain.imag = 0.0; - + + /* for(c=0; c