From: drowe67 Date: Tue, 8 May 2018 21:55:57 +0000 (+0000) Subject: new distributed UW integrated with freedv_api, ready for testing on FreeDV GUI X-Git-Url: http://git.whiteaudio.com/gitweb/?a=commitdiff_plain;h=7c9acafbe0d038c6bcd0e0b4c49d65f4a64938d0;p=freetel-svn-tracking.git new distributed UW integrated with freedv_api, ready for testing on FreeDV GUI git-svn-id: https://svn.code.sf.net/p/freetel/code@3587 01035d8c-6547-0410-b346-abe4f91aad63 --- diff --git a/codec2-dev/src/freedv_api.c b/codec2-dev/src/freedv_api.c index b8f4dc2c..2368d27f 100644 --- a/codec2-dev/src/freedv_api.c +++ b/codec2-dev/src/freedv_api.c @@ -1653,7 +1653,10 @@ static int freedv_comprx_700d(struct freedv *f, COMP demod_in_8kHz[], int *valid float *codeword_amps = f->codeword_amps; int Nbitsperframe = ofdm_get_bits_per_frame(ofdm); int rx_bits[Nbitsperframe]; - + short txt_bits[OFDM_NTXTBITS]; + COMP payload_syms[coded_syms_per_frame]; + float payload_amps[coded_syms_per_frame]; + bits_per_codec_frame = codec2_bits_per_frame(f->codec2); bytes_per_codec_frame = (bits_per_codec_frame + 7) / 8; frames = f->n_codec_bits / bits_per_codec_frame; @@ -1690,6 +1693,8 @@ static int freedv_comprx_700d(struct freedv *f, COMP demod_in_8kHz[], int *valid if ((strcmp(ofdm->sync_state,"synced") == 0) || (strcmp(ofdm->sync_state,"trial") == 0) ) { ofdm_demod(ofdm, rx_bits, rxbuf_in); + ofdm_disassemble_modem_frame(ofdm, rx_uw, payload_syms, payload_amps, txt_bits); + f->sync = 1; ofdm_get_demod_stats(f->ofdm, &f->stats); f->snr_est = f->stats.snr_est; @@ -1708,11 +1713,10 @@ static int freedv_comprx_700d(struct freedv *f, COMP demod_in_8kHz[], int *valid /* newest symbols at end of buffer (uses final i from last loop), note we change COMP formats from what modem uses internally */ - for(i=(interleave_frames-1)*coded_syms_per_frame,j=(OFDM_NUWBITS+OFDM_NTXTBITS)/OFDM_BPS; irx_np[j]); - codeword_symbols[i].imag = cimagf(ofdm->rx_np[j]); - codeword_amps[i] = ofdm->rx_amp[j]; - } + for(i=(interleave_frames-1)*coded_syms_per_frame,j=0; ivaricode_dec_states, &ascii_out, &arx_bit, 1, 1); + n_ascii = varicode_decode(&f->varicode_dec_states, &ascii_out, &txt_bits[k], 1, 1); if (n_ascii && (f->freedv_put_next_rx_char != NULL)) { (*f->freedv_put_next_rx_char)(f->callback_state, ascii_out); } } - /* extract Unique Word bits */ - - for(i=0; i