drowe67 / codec2

Open source speech codec designed for communications quality speech between 700 and 3200 bit/s. The main application is low bandwidth HF/VHF digital radio.
GNU Lesser General Public License v2.1
201 stars 32 forks source link

WP4000 - ch tool upgrade #16

Open drowe67 opened 1 year ago

drowe67 commented 1 year ago

ch is a C channel simulation tool. To simulate multipath channel is requires Doppler spreading samples. It currently uses float files of these samples generated by Octave "off line" at build time. Add on the fly generation of Doppler samples Use doppler_spread Octave code in freedv_low study, as this fixes some bugs in current codec2/octave version. Port Octave doppler_spread function to C. Will require run time generation of filter coeffs (see misc/rect_ft), or a fixed lowFs and fixed filter coeffs. Fixed lowFs might be OK for C. Place C code in codec2_ch.[ch]. Part of move to a channel simulation library. Write ctest that compares Octave and C version, e.g. same power spectrum for same input parameters. We wouldn't expect the time domain samples to be identical. Test doppler spectra for MPG, MPP, MPD. Refactor ch to use on the fly Doppler sample generation. Check that it can generate samples on the fly (in real time) with modest use of CPU on a typical laptop (few % of CPU). Modify ctests to remove off line doppler spread sample generation