diff --git a/.gitmodules b/.gitmodules index 876455ac1..e69de29bb 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +0,0 @@ -[submodule "lpcnet"] - path = lpcnet - url = https://github.com/xiph/LPCNet diff --git a/CMakeLists.txt b/CMakeLists.txt index a8d6ccb36..a67c0991e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -278,7 +278,7 @@ target_include_directories( $ PRIVATE ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR} - ${CMAKE_CURRENT_SOURCE_DIR}/lpcnet/include + ${CMAKE_CURRENT_SOURCE_DIR}/dnn/include celt silk) @@ -601,7 +601,7 @@ if(OPUS_BUILD_PROGRAMS) target_include_directories(opus_demo PRIVATE ${CMAKE_CURRENT_BINARY_DIR}) target_include_directories(opus_demo PRIVATE silk) # debug.h target_include_directories(opus_demo PRIVATE celt) # arch.h - target_include_directories(opus_demo PRIVATE lpcnet/include) + target_include_directories(opus_demo PRIVATE dnn/include) target_link_libraries(opus_demo PRIVATE opus ${OPUS_REQUIRED_LIBRARIES}) target_compile_definitions(opus_demo PRIVATE OPUS_BUILD) @@ -652,7 +652,7 @@ if(BUILD_TESTING AND NOT BUILD_SHARED_LIBS) add_executable(test_opus_encode ${test_opus_encode_sources}) target_include_directories(test_opus_encode - PRIVATE ${CMAKE_CURRENT_BINARY_DIR} celt lpcnet/include) + PRIVATE ${CMAKE_CURRENT_BINARY_DIR} celt dnn/include) target_link_libraries(test_opus_encode PRIVATE opus) target_compile_definitions(test_opus_encode PRIVATE OPUS_BUILD) add_test(NAME test_opus_encode COMMAND ${CMAKE_COMMAND} @@ -662,7 +662,7 @@ if(BUILD_TESTING AND NOT BUILD_SHARED_LIBS) add_executable(test_opus_extensions ${test_opus_extensions_sources}) target_include_directories(test_opus_extensions - PRIVATE ${CMAKE_CURRENT_BINARY_DIR} celt lpcnet/include) + PRIVATE ${CMAKE_CURRENT_BINARY_DIR} celt dnn/include) target_link_libraries(test_opus_extensions PRIVATE opus) target_compile_definitions(test_opus_extensions PRIVATE OPUS_BUILD) add_test(NAME test_opus_extensions COMMAND ${CMAKE_COMMAND} diff --git a/Makefile.am b/Makefile.am index 05f3b4306..487f018c4 100644 --- a/Makefile.am +++ b/Makefile.am @@ -11,7 +11,7 @@ DIST_SUBDIRS = doc AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/celt -I$(top_srcdir)/silk \ -I$(top_srcdir)/silk/float -I$(top_srcdir)/silk/fixed $(NE10_CFLAGS) \ - -I$(top_srcdir)/lpcnet/include + -I$(top_srcdir)/dnn/include include celt_sources.mk include lpcnet_sources.mk @@ -154,7 +154,7 @@ opus_compare_LDADD = $(LIBM) trivial_example_SOURCES = doc/trivial_example.c trivial_example_LDADD = libopus.la $(LIBM) -dump_weights_blob_SOURCES = lpcnet/src/write_lpcnet_weights.c +dump_weights_blob_SOURCES = dnn/write_lpcnet_weights.c dump_weights_blob_LDADD = $(LIBM) dump_weights_blob_CFLAGS = $(AM_CFLAGS) -DDUMP_BINARY_WEIGHTS diff --git a/autogen.bat b/autogen.bat index ad05efc2e..998a8fb6d 100644 --- a/autogen.bat +++ b/autogen.bat @@ -10,7 +10,7 @@ for /F "tokens=4 delims= " %%A in ('findstr "download_model.sh" autogen.sh') do REM Remove trailing ")" character from the model variable set "model=%model:~0,-1%" -cd lpcnet +cd dnn call download_model.bat %model% cd .. diff --git a/autogen.sh b/autogen.sh index e567164a1..fe558d39e 100755 --- a/autogen.sh +++ b/autogen.sh @@ -10,7 +10,7 @@ srcdir=`dirname $0` test -n "$srcdir" && cd "$srcdir" git submodule update --init -(cd lpcnet; ./download_model.sh 2ddc476) +(cd dnn; ./download_model.sh 2ddc476) echo "Updating build configuration files, please wait...." diff --git a/celt/celt_decoder.c b/celt/celt_decoder.c index 7ab58cf08..ada5938e2 100644 --- a/celt/celt_decoder.c +++ b/celt/celt_decoder.c @@ -51,7 +51,7 @@ #include "celt_lpc.h" #include "vq.h" #include "lpcnet.h" -#include "lpcnet/src/lpcnet_private.h" +#include "dnn/lpcnet_private.h" /* The maximum pitch lag to allow in the pitch-based PLC. It's possible to save CPU time in the PLC pitch search by making this smaller than MAX_PERIOD. The diff --git a/dnn/download_model.bat b/dnn/download_model.bat index 3d9e55753..df5f1169e 100644 --- a/dnn/download_model.bat +++ b/dnn/download_model.bat @@ -7,4 +7,6 @@ if not exist %model% ( ) tar -xvzf %model% +move .\src\*.c . +move .\src\*.h . diff --git a/lpcnet b/lpcnet deleted file mode 160000 index f71541410..000000000 --- a/lpcnet +++ /dev/null @@ -1 +0,0 @@ -Subproject commit f71541410ce1a04552bd1e06610ea8c2f0c86f9f diff --git a/lpcnet_headers.mk b/lpcnet_headers.mk index 2685e0b60..90a827c6f 100644 --- a/lpcnet_headers.mk +++ b/lpcnet_headers.mk @@ -3,24 +3,24 @@ silk/dred_coding.h \ silk/dred_config.h \ silk/dred_decoder.h \ silk/dred_encoder.h \ -lpcnet/include/dred_rdovae.h \ -lpcnet/include/lpcnet.h \ -lpcnet/src/burg.h \ -lpcnet/src/common.h \ -lpcnet/src/freq.h \ -lpcnet/src/kiss99.h \ -lpcnet/src/lpcnet_private.h \ -lpcnet/src/nnet_data.h \ -lpcnet/src/nnet.h \ -lpcnet/src/plc_data.h \ -lpcnet/src/tansig_table.h \ -lpcnet/src/vec.h \ -lpcnet/src/vec_avx.h \ -lpcnet/src/vec_neon.h \ -lpcnet/src/dred_rdovae_constants.h \ -lpcnet/src/dred_rdovae_enc.h \ -lpcnet/src/dred_rdovae_enc_data.h \ -lpcnet/src/dred_rdovae_dec.h \ -lpcnet/src/dred_rdovae_dec_data.h \ -lpcnet/src/dred_rdovae_stats_data.h \ -lpcnet/src/pitch.h +dnn/include/dred_rdovae.h \ +dnn/include/lpcnet.h \ +dnn/burg.h \ +dnn/common.h \ +dnn/freq.h \ +dnn/kiss99.h \ +dnn/lpcnet_private.h \ +dnn/nnet_data.h \ +dnn/nnet.h \ +dnn/plc_data.h \ +dnn/tansig_table.h \ +dnn/vec.h \ +dnn/vec_avx.h \ +dnn/vec_neon.h \ +dnn/dred_rdovae_constants.h \ +dnn/dred_rdovae_enc.h \ +dnn/dred_rdovae_enc_data.h \ +dnn/dred_rdovae_dec.h \ +dnn/dred_rdovae_dec_data.h \ +dnn/dred_rdovae_stats_data.h \ +dnn/pitch.h diff --git a/lpcnet_sources.mk b/lpcnet_sources.mk index 16daaf152..778f60dc1 100644 --- a/lpcnet_sources.mk +++ b/lpcnet_sources.mk @@ -1,23 +1,23 @@ LPCNET_SOURCES = \ -lpcnet/src/burg.c \ -lpcnet/src/common.c \ -lpcnet/src/freq.c \ -lpcnet/src/kiss99.c \ -lpcnet/src/lpcnet.c \ -lpcnet/src/lpcnet_dec.c \ -lpcnet/src/lpcnet_enc.c \ -lpcnet/src/lpcnet_plc.c \ -lpcnet/src/lpcnet_tables.c \ -lpcnet/src/nnet.c \ -lpcnet/src/nnet_data.c \ -lpcnet/src/plc_data.c \ -lpcnet/src/parse_lpcnet_weights.c \ -lpcnet/src/dred_rdovae.c \ -lpcnet/src/dred_rdovae_enc.c \ -lpcnet/src/dred_rdovae_enc_data.c \ -lpcnet/src/dred_rdovae_dec.c \ -lpcnet/src/dred_rdovae_dec_data.c \ -lpcnet/src/dred_rdovae_stats_data.c \ +dnn/burg.c \ +dnn/common.c \ +dnn/freq.c \ +dnn/kiss99.c \ +dnn/lpcnet.c \ +dnn/lpcnet_dec.c \ +dnn/lpcnet_enc.c \ +dnn/lpcnet_plc.c \ +dnn/lpcnet_tables.c \ +dnn/nnet.c \ +dnn/nnet_data.c \ +dnn/plc_data.c \ +dnn/parse_lpcnet_weights.c \ +dnn/dred_rdovae.c \ +dnn/dred_rdovae_enc.c \ +dnn/dred_rdovae_enc_data.c \ +dnn/dred_rdovae_dec.c \ +dnn/dred_rdovae_dec_data.c \ +dnn/dred_rdovae_stats_data.c \ silk/dred_encoder.c \ silk/dred_coding.c \ silk/dred_decoder.c diff --git a/meson.build b/meson.build index 3d83608f4..d8b59b64e 100644 --- a/meson.build +++ b/meson.build @@ -14,7 +14,7 @@ host_cpu_family = host_machine.cpu_family() top_srcdir = meson.current_source_dir() top_builddir = meson.current_build_dir() -opus_includes = include_directories('.', 'include', 'celt', 'silk', 'lpcnet/include') +opus_includes = include_directories('.', 'include', 'celt', 'silk', 'dnn/include') opus_public_includes = include_directories('include') add_project_arguments('-DOPUS_BUILD', language: 'c') diff --git a/silk/API.h b/silk/API.h index b5327ba1c..408638831 100644 --- a/silk/API.h +++ b/silk/API.h @@ -33,7 +33,7 @@ POSSIBILITY OF SUCH DAMAGE. #include "errors.h" #include "entenc.h" #include "entdec.h" -#include "lpcnet/src/lpcnet_private.h" +#include "dnn/lpcnet_private.h" #ifdef __cplusplus extern "C" diff --git a/silk/dred_encoder.h b/silk/dred_encoder.h index 439ef6540..0e220848b 100644 --- a/silk/dred_encoder.h +++ b/silk/dred_encoder.h @@ -32,9 +32,9 @@ #include "dred_config.h" #include "dred_rdovae.h" #include "entcode.h" -#include "lpcnet/src/lpcnet_private.h" -#include "lpcnet/src/dred_rdovae_enc.h" -#include "lpcnet/src/dred_rdovae_enc_data.h" +#include "dnn/lpcnet_private.h" +#include "dnn/dred_rdovae_enc.h" +#include "dnn/dred_rdovae_enc_data.h" #define RESAMPLING_ORDER 8 diff --git a/silk/meson.build b/silk/meson.build index c07a75ec9..2fd8e9739 100644 --- a/silk/meson.build +++ b/silk/meson.build @@ -58,7 +58,7 @@ endif # Perhaps this should be moved into lpcnet itself lpcnet_sources = sources['LPCNET_SOURCES'] -lpcnet_includes = [opus_includes, include_directories('../lpcnet/include')] +lpcnet_includes = [opus_includes, include_directories('../dnn/include')] lpcnet_c_args = [] if host_machine.system() == 'windows' diff --git a/silk/structs.h b/silk/structs.h index 2058d4e86..01f733b7a 100644 --- a/silk/structs.h +++ b/silk/structs.h @@ -36,7 +36,7 @@ POSSIBILITY OF SUCH DAMAGE. #ifdef NEURAL_PLC #include "lpcnet.h" -#include "lpcnet/src/lpcnet_private.h" +#include "dnn/lpcnet_private.h" #endif #ifdef ENABLE_NEURAL_FEC diff --git a/src/opus_decoder.c b/src/opus_decoder.c index c7d62e5f7..e0949f8c3 100644 --- a/src/opus_decoder.c +++ b/src/opus_decoder.c @@ -51,7 +51,7 @@ #include "define.h" #include "mathops.h" #include "cpu_support.h" -#include "lpcnet/src/dred_rdovae_dec_data.h" +#include "dnn/dred_rdovae_dec_data.h" struct OpusDecoder { int celt_dec_offset;