diff options
| author | Marin Ivanov <[email protected]> | 2025-07-25 10:17:14 +0300 |
|---|---|---|
| committer | Marin Ivanov <[email protected]> | 2026-01-18 20:09:26 +0200 |
| commit | 0168586485e6310c598713c911b1dec5618d61a1 (patch) | |
| tree | 6aabc2a12ef8fef70683f5389bea00f948015f77 /unittest/check_real_comp.sh | |
* codec2 cut-down version 1.2.0
* Remove codebook and generation of sources
* remove c2dec c2enc binaries
* prepare for emscripten
Diffstat (limited to 'unittest/check_real_comp.sh')
| -rwxr-xr-x | unittest/check_real_comp.sh | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/unittest/check_real_comp.sh b/unittest/check_real_comp.sh new file mode 100755 index 0000000..a7b57db --- /dev/null +++ b/unittest/check_real_comp.sh @@ -0,0 +1,15 @@ +#!/usr/bin/env bash +# check_real_comp.sh +# Check the output of freedv_tx() and the real part of freedv_comptx() match, +# as they use different code paths. Run from codec2/unittest, set path to +# include codec2/build/misc and codec2/build/unittest + +set -x +cat ../raw/ve9qrp_10s.raw | freedv_700d_tx > tx_700d.int16 +cat ../raw/ve9qrp_10s.raw | freedv_700d_comptx > tx_700d.iq16 + +echo "tx_real=load_raw('tx_700d.int16'); tx_comp=load_raw('tx_700d.iq16'); \ + tx_comp=tx_comp(1:2:end)+j*tx_comp(2:2:end); \ + diff = sum(real(tx_comp)-tx_real); printf('diff: %f\n', diff); \ + if diff < 1, quit(0), end; \ + quit(1)" | octave-cli -p ../octave -qf |
