Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.xiph.org/xiph/opus.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean-Marc Valin <jmvalin@amazon.com>2023-06-21 07:29:39 +0300
committerJean-Marc Valin <jmvalin@amazon.com>2023-06-22 00:33:53 +0300
commitbfa01f1a1ca257ceff20aaf61d81d165af6867fe (patch)
tree060015616b60462dd0e3f9bf8e2f2175172bdfc3
parent7458c1bdc667564764d630f8ea08933a9c5e9319 (diff)
Update build for LPCNet merge
-rw-r--r--.gitmodules3
-rw-r--r--CMakeLists.txt8
-rw-r--r--Makefile.am4
-rw-r--r--autogen.bat2
-rwxr-xr-xautogen.sh2
-rw-r--r--celt/celt_decoder.c2
-rw-r--r--dnn/download_model.bat2
m---------lpcnet0
-rw-r--r--lpcnet_headers.mk42
-rw-r--r--lpcnet_sources.mk38
-rw-r--r--meson.build2
-rw-r--r--silk/API.h2
-rw-r--r--silk/dred_encoder.h6
-rw-r--r--silk/meson.build2
-rw-r--r--silk/structs.h2
-rw-r--r--src/opus_decoder.c2
16 files changed, 59 insertions, 60 deletions
diff --git a/.gitmodules b/.gitmodules
index 876455ac..e69de29b 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 a8d6ccb3..a67c0991 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -278,7 +278,7 @@ target_include_directories(
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}/opus>
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 05f3b430..487f018c 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 ad05efc2..998a8fb6 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 e567164a..fe558d39 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 7ab58cf0..ada5938e 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 3d9e5575..df5f1169 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
-Subproject f71541410ce1a04552bd1e06610ea8c2f0c86f9
diff --git a/lpcnet_headers.mk b/lpcnet_headers.mk
index 2685e0b6..90a827c6 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 16daaf15..778f60dc 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 3d83608f..d8b59b64 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 b5327ba1..40863883 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 439ef654..0e220848 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 c07a75ec..2fd8e973 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 2058d4e8..01f733b7 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 c7d62e5f..e0949f8c 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;