fixed bug in amplitude estimator that improved LDPC dec perf - C code
authordrowe67 <drowe67@01035d8c-6547-0410-b346-abe4f91aad63>
Tue, 24 Apr 2018 03:38:46 +0000 (03:38 +0000)
committerdrowe67 <drowe67@01035d8c-6547-0410-b346-abe4f91aad63>
Tue, 24 Apr 2018 03:38:46 +0000 (03:38 +0000)
git-svn-id: https://svn.code.sf.net/p/freetel/code@3522 01035d8c-6547-0410-b346-abe4f91aad63

codec2-dev/src/freedv_api.c
codec2-dev/src/ofdm.c
codec2-dev/src/ofdm_demod.c

index 2f65dc0a723b0f5fe59a88fbb92a2989d6747287..eb21a47f4f5f1ef62af61cdac70f5efe0de537c7 100644 (file)
@@ -1561,6 +1561,7 @@ static int freedv_comprx_700(struct freedv *f, COMP demod_in_8kHz[], int *valid)
     [ ] error pattern support?
     [ ] work out how to handle return of multiple interleaved frames over time
     [ ] deal with out of sync returning nin samples, listening to analog audio when out of sync
+    [ ] level issues
 */
 
 #define ASCALE   (2E5*1.1491/2.0)  /* scale from shorts back to floats       */
index d3352c34c6ea4fe24ff23aa53d90576ec7dfb784..7ee14b1acaf19fbf19ed836f429fbdccb64079a2 100644 (file)
@@ -874,9 +874,9 @@ void ofdm_demod(struct OFDM *ofdm, int *rx_bits, COMP *rxbuf_in) {
         aphase_est_pilot_rect = aphase_est_pilot_rect + vector_sum(symbol, 3);
         aphase_est_pilot[i] = cargf(aphase_est_pilot_rect);
 
-        /* TODO David: WTF 12.0 constant?  Something to do with LDPC input scaling? */
+        /* amplitude is estimated over 6 rows of pilots */
 
-        aamp_est_pilot[i] = cabsf(aphase_est_pilot_rect / 12.0f);
+        aamp_est_pilot[i] = cabsf(aphase_est_pilot_rect / 6.0f);
     }
 
     /*
index a9cc81e6ce96934931a7e6d3becebeacd698285b..3c00cad046aa5357c4e7aeeb57ed2badb93f7096 100644 (file)
@@ -181,7 +181,7 @@ int main(int argc, char *argv[])
     int    rx_uw[OFDM_NUWBITS];
     f = 0; Nerrs = Terrs = Tbits = Terrs2 = Tbits2 = Terrs_coded = Tbits_coded = frame_count = 0;
 
-    float EsNo = 10;
+    float EsNo = 3;
     fprintf(stderr,"Warning EsNo: %f hard coded\n", EsNo);
 
     COMP  codeword_symbols[interleave_frames*coded_syms_per_frame];