Skip to content

Commit 9f843ee

Browse files
committed
Merge branch 'master' into ms-remove-dfu
2 parents 0626641 + 199a9e1 commit 9f843ee

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+1148
-769
lines changed

.github/workflows/cmake.yml

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: CMake
22

3-
on: [push]
3+
on: [push, pull_request]
44

55
env:
66
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
@@ -30,12 +30,8 @@ jobs:
3030
- name: Configure codec2 CMake
3131
shell: bash
3232
working-directory: ${{github.workspace}}/build_linux
33-
run: cmake $GITHUB_WORKSPACE
33+
run: cmake -DUNITTEST=1 $GITHUB_WORKSPACE
3434

35-
- name: Setup CML Support
36-
shell: bash
37-
run: cd $HOME && $GITHUB_WORKSPACE/script/build_cml.sh
38-
3935
- name: Build codec2
4036
working-directory: ${{github.workspace}}/build_linux
4137
shell: bash
@@ -57,7 +53,7 @@ jobs:
5753
shell: bash
5854
# Second pass build of codec2 with LPCNet
5955
run: |
60-
cmake -DLPCNET_BUILD_DIR=$HOME/LPCNet/build_linux $GITHUB_WORKSPACE
56+
cmake -DLPCNET_BUILD_DIR=$HOME/LPCNet/build_linux -DUNITTEST=1 $GITHUB_WORKSPACE
6157
make -j4
6258
6359
- name: Run ctests

CMakeLists.txt

Lines changed: 57 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
#
88
set(CMAKE_OSX_DEPLOYMENT_TARGET "10.9" CACHE STRING "Minimum OS X deployment version")
99

10-
project(codec2 C)
10+
project(codec2)
1111

1212
cmake_minimum_required(VERSION 3.0)
1313

@@ -47,7 +47,7 @@ set(CODEC2_VERSION_MAJOR 1)
4747
set(CODEC2_VERSION_MINOR 0)
4848
# Set to patch level if needed, otherwise leave FALSE.
4949
# Must be positive (non-zero) if set, since 0 == FALSE in CMake.
50-
set(CODEC2_VERSION_PATCH 0)
50+
set(CODEC2_VERSION_PATCH 3)
5151
set(CODEC2_VERSION "${CODEC2_VERSION_MAJOR}.${CODEC2_VERSION_MINOR}")
5252
# Patch level version bumps should not change API/ABI.
5353
set(SOVERSION "${CODEC2_VERSION_MAJOR}.${CODEC2_VERSION_MINOR}")
@@ -112,7 +112,7 @@ else()
112112
endif()
113113

114114
# -fPIC is implied on MinGW...
115-
if(NOT WIN32)
115+
if((NOT WIN32) AND (NOT MICROCONTROLLER_BUILD))
116116
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC")
117117
endif()
118118

@@ -152,12 +152,7 @@ endif()
152152
#
153153
option(BUILD_SHARED_LIBS
154154
"Build shared library. Set to OFF for static library." ON)
155-
# Unittest should be on for dev builds and off for releases.
156-
if(CMAKE_BUILD_TYPE MATCHES "Release")
157-
option(UNITTEST "Build unittest binaries." OFF)
158-
else()
159-
option(UNITTEST "Build unittest binaries." ON)
160-
endif()
155+
option(UNITTEST "Build unittest binaries." OFF)
161156
option(INSTALL_EXAMPLES "Install example code." OFF)
162157
if(INSTALL_EXAMPLES)
163158
install(DIRECTORY octave raw script wav
@@ -378,6 +373,22 @@ if(UNITTEST)
378373
")
379374
set_tests_properties(test_fdmdv_16to8_short PROPERTIES PASS_REGULAR_EXPRESSION "PASS")
380375

376+
# 48<->8 kHz float resamplers
377+
add_test(NAME test_fdmdv_48to8_short
378+
COMMAND sh -c "cd ${CMAKE_CURRENT_SOURCE_DIR}/octave;
379+
${CMAKE_CURRENT_BINARY_DIR}/unittest/t48_8_short;
380+
DISPLAY=\"\" echo \"diff_fft_mag('in8.raw','out8.raw'); quit;\" | octave-cli -qf
381+
")
382+
set_tests_properties(test_fdmdv_48to8_short PROPERTIES PASS_REGULAR_EXPRESSION "PASS")
383+
384+
# 48<->8 kHz short resamplers
385+
add_test(NAME test_fdmdv_48to8
386+
COMMAND sh -c "cd ${CMAKE_CURRENT_SOURCE_DIR}/octave;
387+
${CMAKE_CURRENT_BINARY_DIR}/unittest/t48_8;
388+
DISPLAY=\"\" echo \"diff_fft_mag('in8.raw','out8.raw'); quit;\" | octave-cli -qf
389+
")
390+
set_tests_properties(test_fdmdv_48to8 PROPERTIES PASS_REGULAR_EXPRESSION "PASS")
391+
381392
add_test(NAME test_CML_ldpcut
382393
COMMAND sh -c "cd ${CMAKE_CURRENT_SOURCE_DIR}/octave; SHORT_VERSION_FOR_CTEST=1 octave-cli -qf ldpcut.m")
383394
set_tests_properties(test_CML_ldpcut PROPERTIES PASS_REGULAR_EXPRESSION "Nerr: 0")
@@ -399,14 +410,12 @@ if(UNITTEST)
399410
add_test(NAME test_FDMDV_modem_octave_port
400411
COMMAND sh -c "$<TARGET_FILE:tfdmdv> && DISPLAY=\"\" octave-cli --no-gui -qf ${CMAKE_CURRENT_SOURCE_DIR}/octave/tfdmdv.m"
401412
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/octave)
402-
set_tests_properties(test_FDMDV_modem_octave_port PROPERTIES
403-
PASS_REGULAR_EXPRESSION "fails: 0")
413+
set_tests_properties(PROPERTIES PASS_REGULAR_EXPRESSION "fails: 0")
404414

405415
add_test(NAME test_COHPSK_modem_octave_port
406416
COMMAND sh -c "$<TARGET_FILE:tcohpsk> && DISPLAY=\"\" octave-cli --no-gui -qf ${CMAKE_CURRENT_SOURCE_DIR}/octave/tcohpsk.m"
407417
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/octave)
408-
set_tests_properties(test_COHPSK_modem_octave_port PROPERTIES
409-
PASS_REGULAR_EXPRESSION "fails: 0")
418+
set_tests_properties(test_COHPSK_modem_octave_port PROPERTIES PASS_REGULAR_EXPRESSION "fails: 0")
410419

411420
add_test(NAME test_COHPSK_modem_AWGN_BER
412421
COMMAND sh -c "$<TARGET_FILE:cohpsk_get_test_bits> - 5600 | $<TARGET_FILE:cohpsk_mod> - - | $<TARGET_FILE:cohpsk_ch> - - -30 | $<TARGET_FILE:cohpsk_demod> - - | $<TARGET_FILE:cohpsk_put_test_bits> -"
@@ -426,14 +435,12 @@ if(UNITTEST)
426435
add_test(NAME test_OFDM_modem_octave_port
427436
COMMAND sh -c "PATH_TO_TOFDM=${CMAKE_CURRENT_BINARY_DIR}/unittest/tofdm DISPLAY=\"\" octave-cli --no-gui -qf ${CMAKE_CURRENT_SOURCE_DIR}/octave/tofdm.m"
428437
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/octave)
429-
set_tests_properties(test_OFDM_modem_octave_port PROPERTIES
430-
PASS_REGULAR_EXPRESSION "fails: 0")
438+
set_tests_properties(test_OFDM_modem_octave_port PROPERTIES PASS_REGULAR_EXPRESSION "fails: 0")
431439

432440
add_test(NAME test_OFDM_modem_octave_port_Nc_31
433441
COMMAND sh -c "NC=31 PATH_TO_TOFDM=${CMAKE_CURRENT_BINARY_DIR}/unittest/tofdm DISPLAY=\"\" octave-cli --no-gui -qf ${CMAKE_CURRENT_SOURCE_DIR}/octave/tofdm.m"
434442
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/octave)
435-
set_tests_properties(test_OFDM_modem_octave_port_Nc_31 PROPERTIES
436-
PASS_REGULAR_EXPRESSION "fails: 0")
443+
set_tests_properties(test_OFDM_modem_octave_port_Nc_31 PROPERTIES PASS_REGULAR_EXPRESSION "fails: 0")
437444

438445
add_test(NAME test_OFDM_modem_octave_qam16_uncoded
439446
COMMAND sh -c "cd ${CMAKE_CURRENT_SOURCE_DIR}/octave;
@@ -521,15 +528,15 @@ if(UNITTEST)
521528

522529
add_test(NAME test_OFDM_modem_fading_BER
523530
COMMAND sh -c "cd ${CMAKE_CURRENT_SOURCE_DIR}/unittest;
524-
PATH=$PATH:${CMAKE_CURRENT_BINARY_DIR}/src ./ofdm_fade.sh")
531+
PATH=$PATH:${CMAKE_CURRENT_BINARY_DIR}/src ./ofdm_fade.sh ${CMAKE_CURRENT_BINARY_DIR}/unittest")
525532

526533
add_test(NAME test_OFDM_modem_phase_est_bw
527534
COMMAND sh -c "cd ${CMAKE_CURRENT_SOURCE_DIR}/unittest;
528-
PATH=$PATH:${CMAKE_CURRENT_BINARY_DIR}/src ./ofdm_phase_est_bw.sh")
535+
PATH=$PATH:${CMAKE_CURRENT_BINARY_DIR}/src ./ofdm_phase_est_bw.sh ${CMAKE_CURRENT_BINARY_DIR}/unittest")
529536

530537
add_test(NAME test_OFDM_modem_fading_DPSK_BER
531538
COMMAND sh -c "cd ${CMAKE_CURRENT_SOURCE_DIR}/unittest;
532-
PATH=$PATH:${CMAKE_CURRENT_BINARY_DIR}/src ./ofdm_fade_dpsk.sh")
539+
PATH=$PATH:${CMAKE_CURRENT_BINARY_DIR}/src ./ofdm_fade_dpsk.sh ${CMAKE_CURRENT_BINARY_DIR}/unittest")
533540

534541
add_test(NAME test_OFDM_modem_time_sync_700D
535542
COMMAND sh -c "cd ${CMAKE_CURRENT_SOURCE_DIR}/unittest;
@@ -841,7 +848,7 @@ endif()
841848
COMMAND sh -c "cd ${CMAKE_CURRENT_SOURCE_DIR}/unittest; ./reliable_text_fade.sh 700D -19 8 1 '${CMAKE_CURRENT_BINARY_DIR}/src'")
842849

843850
add_test(NAME test_freedv_reliable_text_fade_700E
844-
COMMAND sh -c "cd ${CMAKE_CURRENT_SOURCE_DIR}/unittest; ./reliable_text_fade.sh 700E -22 9 1 '${CMAKE_CURRENT_BINARY_DIR}/src'")
851+
COMMAND sh -c "cd ${CMAKE_CURRENT_SOURCE_DIR}/unittest; ./reliable_text_fade.sh 700E -22 8 1 '${CMAKE_CURRENT_BINARY_DIR}/src'")
845852

846853
if(LPCNET)
847854
add_test(NAME test_freedv_reliable_text_ideal_2020
@@ -991,10 +998,11 @@ endif(NOT APPLE)
991998

992999
add_test(NAME test_vq_mbest
9931000
COMMAND sh -c "./tvq_mbest; \
994-
cat target.f32 | ../misc/vq_mbest -k 2 -q vq1.f32,vq2.f32 --mbest 2 -v > out.f32; \
995-
diff target.f32 out.f32"
1001+
cat target.f32 | \
1002+
../misc/vq_mbest -k 4 -q vq1.f32,vq2.f32 --st 1 --en 2 --mbest 2 -v > /dev/null;"
9961003
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/unittest
9971004
)
1005+
set_tests_properties(test_vq_mbest PROPERTIES PASS_REGULAR_EXPRESSION "MSE: 0.00")
9981006

9991007
add_test(NAME test_700c_eq
10001008
COMMAND sh -c "cd ${CMAKE_CURRENT_SOURCE_DIR}/unittest;
@@ -1126,35 +1134,20 @@ endif(NOT APPLE)
11261134
COMMAND sh -c "cd ${CMAKE_CURRENT_BINARY_DIR}/src;
11271135
head -c $((14*10)) </dev/urandom > binaryIn.bin;
11281136
./freedv_data_raw_tx DATAC0 binaryIn.bin - --bursts 10 |
1129-
./freedv_data_raw_rx DATAC0 - binaryOut.bin --framesperburst 1 --vv;
1137+
./freedv_data_raw_rx DATAC0 - binaryOut.bin -v;
11301138
diff binaryIn.bin binaryOut.bin")
11311139

11321140
add_test(NAME test_freedv_data_raw_ofdm_datac1_burst_file
11331141
COMMAND sh -c "cd ${CMAKE_CURRENT_BINARY_DIR}/src;
11341142
head -c $((510*10)) </dev/urandom > binaryIn.bin;
1135-
./freedv_data_raw_tx DATAC1 binaryIn.bin - --framesperburst 2 --bursts 5 |
1136-
./freedv_data_raw_rx DATAC1 - binaryOut.bin --framesperburst 2 --vv;
1137-
diff binaryIn.bin binaryOut.bin")
1138-
1139-
# Streaming mode tests, with data file I/O
1140-
add_test(NAME test_freedv_data_raw_ofdm_datac0
1141-
COMMAND sh -c "cd ${CMAKE_CURRENT_BINARY_DIR}/src;
1142-
head -c $((14*10)) </dev/urandom > binaryIn.bin;
1143-
./freedv_data_raw_tx DATAC0 binaryIn.bin - |
1144-
./freedv_data_raw_rx DATAC0 - binaryOut.bin -v;
1145-
diff binaryIn.bin binaryOut.bin")
1146-
1147-
add_test(NAME test_freedv_data_raw_ofdm_datac1
1148-
COMMAND sh -c "cd ${CMAKE_CURRENT_BINARY_DIR}/src;
1149-
head -c $((510*10)) </dev/urandom > binaryIn.bin;
1150-
./freedv_data_raw_tx DATAC1 binaryIn.bin - |
1143+
./freedv_data_raw_tx DATAC1 binaryIn.bin - --bursts 10 |
11511144
./freedv_data_raw_rx DATAC1 - binaryOut.bin -v;
11521145
diff binaryIn.bin binaryOut.bin")
11531146

1154-
add_test(NAME test_freedv_data_raw_ofdm_datac3
1147+
add_test(NAME test_freedv_data_raw_ofdm_datac3_burst_file
11551148
COMMAND sh -c "cd ${CMAKE_CURRENT_BINARY_DIR}/src;
11561149
head -c $((126*10)) </dev/urandom > binaryIn.bin;
1157-
./freedv_data_raw_tx DATAC3 binaryIn.bin - |
1150+
./freedv_data_raw_tx DATAC3 binaryIn.bin - --bursts 10 |
11581151
./freedv_data_raw_rx DATAC3 - binaryOut.bin -v;
11591152
diff binaryIn.bin binaryOut.bin")
11601153

@@ -1221,6 +1214,27 @@ endif(NOT APPLE)
12211214
cat binaryIn.bin | ./demo/freedv_datac1_tx |
12221215
./demo/freedv_datac1_rx > binaryOut.bin;
12231216
diff binaryIn.bin binaryOut.bin")
1224-
12251217

1218+
# test Rx of two modes in parallel, with AWGN noise and sample clock offsets
1219+
add_test(NAME test_demo_datac0c1
1220+
COMMAND sh -c "cd ${CMAKE_CURRENT_BINARY_DIR};
1221+
./demo/freedv_datac0c1_tx |
1222+
./src/cohpsk_ch - - -24 -f 20 --Fs 8000 |
1223+
sox -t .s16 -c 1 -r 8000 - -t .s16 -c 1 -r 8008 - |
1224+
./demo/freedv_datac0c1_rx")
1225+
set_tests_properties(test_demo_datac0c1 PROPERTIES PASS_REGULAR_EXPRESSION "DATAC0 Frames: 10 DATAC1 Frames: 10")
1226+
1227+
# Set common properties for tests that need Octave/CML
1228+
set_tests_properties(
1229+
test_CML_ldpcut
1230+
test_OFDM_modem_octave_port
1231+
test_OFDM_modem_octave_port_Nc_31
1232+
test_OFDM_modem_octave_datac0_mpp_coded
1233+
test_OFDM_modem_datac0_octave_burst
1234+
test_OFDM_modem_datac1_octave
1235+
test_OFDM_modem_datac3_octave
1236+
test_fsk_lib_4fsk_ldpc
1237+
PROPERTIES
1238+
ENVIRONMENT "CML_PATH=${CMAKE_CURRENT_BINARY_DIR}/cml"
1239+
)
12261240
endif(UNITTEST)

README.md

Lines changed: 46 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -123,15 +123,13 @@ CTest is used as a test framework, with support from [GNU Octave](https://www.gn
123123
```
124124
sudo apt install octave octave-common octave-signal liboctave-dev gnuplot python3-numpy sox valgrind
125125
```
126-
1. Install CML library with instructions at the top of [```octave/ldpc.m```](octave/ldpc.m)
127-
128126
1. To build and run the tests:
129127
```
130128
cd ~/codec2
131129
rm -Rf build_linux && mkdir build_linux
132130
cd build_linux
133-
cmake -DCMAKE_BUILD_TYPE=Debug ..
134-
make all test
131+
cmake -DUNITTEST=1 ..
132+
make
135133
```
136134

137135
1. To just run tests without rebuilding:
@@ -154,6 +152,13 @@ CTest is used as a test framework, with support from [GNU Octave](https://www.gn
154152
ctest -N
155153
```
156154

155+
1. Many Octave scripts rely on the CML LDPC library. To run these from the Octave CLI, you need to set
156+
the `CML_PATH` environment variable. A convenient way to do this is using a `.octaverc` file
157+
in your `codec/octave` directory. For example on a Linux machine, create a `.octaverc` file:
158+
```
159+
setenv("CML_PATH","../build_linux/cml")
160+
```
161+
157162
## Directories
158163
```
159164
cmake - cmake support files
@@ -236,6 +241,43 @@ Codec 2 can be added to the project in the following way.
236241
237242
1. Add Codec 2 to the target_link_libraries in the same file.
238243
244+
## Building Codec 2 for Microcontrollers
245+
246+
Codec 2 requires a hardware Floating Point Unit (FPU) to run in real time.
247+
248+
Two build options have been added to support building on microcontrollers:
249+
1. Setting the `cmake` variable MICROCONTROLLER_BUILD disables position independent code (-fPIC is not used). This was required for the IMRT1052 used in Teensy 4/4.1).
250+
251+
1. On ARM machines, setting the C Flag \_\_EMBEDDED\_\_ and linking with the ARM CMSIS library will improve performance on ARM-based microcontrollers. \_\_REAL\_\_ and FDV\_ARM\_MATH are additional ARM-specific options that can be set to improve performance if required, especially with OFDM modes.
252+
253+
A CMakeLists.txt example for a microcontroller is below:
254+
255+
```
256+
set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY)
257+
set(MICROCONTROLLER_BUILD 1)
258+
259+
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mlittle-endian -ffunction-sections -fdata-sections -g -O3")
260+
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -ffunction-sections -fdata-sections")
261+
262+
add_definitions(-DCORTEX_M7 -D__EMBEDDED__)
263+
add_definitions(-DFREEDV_MODE_EN_DEFAULT=0 -DFREEDV_MODE_1600_EN=1 -DFREEDV_MODE_700D_EN=1 -DFREEDV_MODE_700E_EN=1 -DCODEC2_MODE_EN_DEFAULT=0 -DCODEC2_MODE_1300_EN=1 -DCODEC2_MODE_700C_EN=1)
264+
265+
FetchContent_Declare(codec2
266+
GIT_REPOSITORY https://github.com/drowe67/codec2.git
267+
GIT_TAG origin/master
268+
GIT_SHALLOW ON
269+
GIT_PROGRESS ON
270+
)
271+
FetchContent_GetProperties(codec2)
272+
if(NOT ${codec2_POPULATED})
273+
FetchContent_Populate(codec2)
274+
endif()
275+
set(CMAKE_REQUIRED_FLAGS "")
276+
277+
set(LPCNET OFF CACHE BOOL "")
278+
add_subdirectory(${codec2_SOURCE_DIR} ${codec2_BINARY_DIR} EXCLUDE_FROM_ALL)
279+
```
280+
239281
## Building Debian packages
240282
241283
To build Debian packages, simply run the "cpack" command after running "make". This will generate the following packages:

README_data.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,7 @@ Clipping works by introducing controlled distortion, which affects the SNR estim
336336

337337
This command line demonstrates the effect:
338338
```
339-
/src/freedv_data_raw_tx datac3 /dev/zero - --testframes 10 --bursts 10 --clip 1 | ./src/cohpsk_ch - - -100 --raw_dir ../raw --Fs 8000 | ./src/freedv_data_raw_rx datac3 - /dev/null --testframes --framesperburst 1 -v
339+
./src/freedv_data_raw_tx datac3 /dev/zero - --testframes 10 --bursts 10 --clip 1 | ./src/cohpsk_ch - - -100 --fading_dir unittest --Fs 8000 | ./src/freedv_data_raw_rx datac3 - /dev/null --testframes --framesperburst 1 -v
340340
```
341341
Try adjusting `--clip` and third argument of `cohpsk_ch` (noise level) for different modes. Note the SNR estimates returned from `freedv_data_raw_rx` compared to the SNR from the channel simulator `cohpsh_ch`. You will notice clipping also increases the RMS power and reduces the PER for a given noise level.
342342

README_freedv.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ The current demo programs are as follows:
3434
| [freedv_700d_rx.py](demo/freedv_700d_rx.py) | Receive a voice signal using the FreeDV API in Python |
3535
| [freedv_datac1_tx.c](demo/freedv_datac1_tx.c) | Transmit raw data frames using the FreeDV API |
3636
| [freedv_datac1_rx.c](demo/freedv_datac1_rx.c) | Receive raw data frames using the FreeDV API |
37+
| [freedv_datac0c1_tx.c](demo/freedv_datac0c1_tx.c) | Transmit two types of raw data frames using the FreeDV API |
38+
| [freedv_datac0c1_rx.c](demo/freedv_datac0c1_rx.c) | Receive two types of raw data frames using the FreeDV API |
3739

3840
So also [freedv_api.h](src/freedv_api.h) and [freedv_api.c](src/freedv_api.c) for the full list of API functions. Only a small set of these functions are needed for basic FreeDV use, please see the demo programs for minimal examples.
3941

@@ -185,11 +187,11 @@ $ ./freedv_tx 2020 ~/LPCNet/wav/all.wav - | ./cohpsk_ch - - -22 --Fs 8000 | ./fr
185187

186188
AWGN:
187189
```
188-
$ ./src/freedv_tx 700D ../raw/ve9qrp.raw - --clip 0 --testframes | ./src/cohpsk_ch - - -16 --raw_dir ../raw/ --Fs 8000 | ./src/freedv_rx 700D - /dev/null --testframes
190+
$ ./src/freedv_tx 700D ../raw/ve9qrp.raw - --clip 0 --testframes | ./src/cohpsk_ch - - -16 --Fs 8000 | ./src/freedv_rx 700D - /dev/null --testframes
189191
```
190192
MultiPath Poor (MPP):
191193
```
192-
$ ./src/freedv_tx 700D ../raw/ve9qrp.raw - --clip 0 --testframes | ./src/cohpsk_ch - - -24 --fast --raw_dir ../raw/ --Fs 8000 | ./src/freedv_rx 700D - /dev/null --testframes
194+
$ ./src/freedv_tx 700D ../raw/ve9qrp.raw - --clip 0 --testframes | ./src/cohpsk_ch - - -24 --mpp --fading_dir unittest --Fs 8000 | ./src/freedv_rx 700D - /dev/null --testframes
193195
```
194196

195197
Adjust `--clip [0|1]` and 3rd argument of `cohpsk_ch` to obtain a PER of just less than 0.1, and note the SNR and PAPR reported by `cohpsk_ch`. The use of the `ve9qrp` samples makes the test run for a few minutes, in order to get reasonable multipath channel results.

demo/CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,7 @@ add_executable(freedv_datac1_tx freedv_datac1_tx.c)
1111
target_link_libraries(freedv_datac1_tx codec2)
1212
add_executable(freedv_datac1_rx freedv_datac1_rx.c)
1313
target_link_libraries(freedv_datac1_rx codec2)
14+
add_executable(freedv_datac0c1_tx freedv_datac0c1_tx.c)
15+
target_link_libraries(freedv_datac0c1_tx codec2)
16+
add_executable(freedv_datac0c1_rx freedv_datac0c1_rx.c)
17+
target_link_libraries(freedv_datac0c1_rx codec2)

0 commit comments

Comments
 (0)