diff --git a/CMakeLists.txt b/CMakeLists.txt index 4d583cb..e44f97b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -127,3 +127,5 @@ add_test(NAME core_synthesis_mag COMMAND sh -c "cd ${CMAKE_CURRENT_SOURCE_DIR}/unittest; SYNTH_mag=1 ./test_core_nn.sh") add_test(NAME nnet2f32 COMMAND sh -c "cd ${CMAKE_CURRENT_BINARY_DIR}; ./src/nnet2f32 t.f32") +add_test(NAME SIMD_functions + COMMAND sh -c "cd ${CMAKE_CURRENT_BINARY_DIR}; ./src/test_vec") diff --git a/README.md b/README.md index 5bbe838..4d8ce54 100644 --- a/README.md +++ b/README.md @@ -25,6 +25,14 @@ LPCNet at 1733 bits/s using direct-split quantiser: ``` sox ../../wav/wia.wav -t raw -r 16000 - | ./lpcnet_enc -s | ./lpcnet_dec -s | aplay -f S16_LE -r 16000 ``` +# CTests + +``` +$ cd ~/LPCNet/build_linux +$ ctest +``` + +Note, due to precision/library issues several tests (1-3) will only pass on certain machines such as Ubuntu 16 and 18, Ubuntu 17 is known to fail. # Reading Further diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index cae16b5..e39b2de 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -77,6 +77,9 @@ target_link_libraries(quant2c m) add_executable(diff32 diff32.c) target_link_libraries(diff32 m) +add_executable(ramp ramp.c) +target_link_libraries(ramp m) + add_executable(quant_enc quant_enc.c) target_link_libraries(quant_enc lpcnetfreedv m codec2) diff --git a/src/quant_feat.c b/src/quant_feat.c index cc2883c..2c74e41 100644 --- a/src/quant_feat.c +++ b/src/quant_feat.c @@ -422,10 +422,7 @@ int main(int argc, char *argv[]) { float tmp[NB_BANDS]; dct(tmp, features_out); for(i=0; i +#include +#include +#include +#include + +#define NB_FEATURES 55 +#define FRAMES 18 + +int main(void) { + FILE *fout = fopen("ramp.f32", "wb"); assert(fout != NULL); + float features[NB_FEATURES]; + int i,j; + + for(i=0; i \n"); + fprintf(stderr, "usage: test_lpcnet [--mag] [--logstates statesfile] [--nnet lpcnet_xxx.f32] \n"); return 0; }