Update build for LPCNet merge

This commit is contained in:
Jean-Marc Valin 2023-06-21 00:29:39 -04:00
parent 7458c1bdc6
commit bfa01f1a1c
No known key found for this signature in database
GPG key ID: 531A52533318F00A
16 changed files with 59 additions and 61 deletions

3
.gitmodules vendored
View file

@ -1,3 +0,0 @@
[submodule "lpcnet"]
path = lpcnet
url = https://github.com/xiph/LPCNet

View file

@ -278,7 +278,7 @@ target_include_directories(
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}/opus> $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}/opus>
PRIVATE ${CMAKE_CURRENT_BINARY_DIR} PRIVATE ${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_SOURCE_DIR}/lpcnet/include ${CMAKE_CURRENT_SOURCE_DIR}/dnn/include
celt celt
silk) 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 ${CMAKE_CURRENT_BINARY_DIR})
target_include_directories(opus_demo PRIVATE silk) # debug.h target_include_directories(opus_demo PRIVATE silk) # debug.h
target_include_directories(opus_demo PRIVATE celt) # arch.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_link_libraries(opus_demo PRIVATE opus ${OPUS_REQUIRED_LIBRARIES})
target_compile_definitions(opus_demo PRIVATE OPUS_BUILD) 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}) add_executable(test_opus_encode ${test_opus_encode_sources})
target_include_directories(test_opus_encode 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_link_libraries(test_opus_encode PRIVATE opus)
target_compile_definitions(test_opus_encode PRIVATE OPUS_BUILD) target_compile_definitions(test_opus_encode PRIVATE OPUS_BUILD)
add_test(NAME test_opus_encode COMMAND ${CMAKE_COMMAND} 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}) add_executable(test_opus_extensions ${test_opus_extensions_sources})
target_include_directories(test_opus_extensions 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_link_libraries(test_opus_extensions PRIVATE opus)
target_compile_definitions(test_opus_extensions PRIVATE OPUS_BUILD) target_compile_definitions(test_opus_extensions PRIVATE OPUS_BUILD)
add_test(NAME test_opus_extensions COMMAND ${CMAKE_COMMAND} add_test(NAME test_opus_extensions COMMAND ${CMAKE_COMMAND}

View file

@ -11,7 +11,7 @@ DIST_SUBDIRS = doc
AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/celt -I$(top_srcdir)/silk \ 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)/silk/float -I$(top_srcdir)/silk/fixed $(NE10_CFLAGS) \
-I$(top_srcdir)/lpcnet/include -I$(top_srcdir)/dnn/include
include celt_sources.mk include celt_sources.mk
include lpcnet_sources.mk include lpcnet_sources.mk
@ -154,7 +154,7 @@ opus_compare_LDADD = $(LIBM)
trivial_example_SOURCES = doc/trivial_example.c trivial_example_SOURCES = doc/trivial_example.c
trivial_example_LDADD = libopus.la $(LIBM) 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_LDADD = $(LIBM)
dump_weights_blob_CFLAGS = $(AM_CFLAGS) -DDUMP_BINARY_WEIGHTS dump_weights_blob_CFLAGS = $(AM_CFLAGS) -DDUMP_BINARY_WEIGHTS

View file

@ -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 REM Remove trailing ")" character from the model variable
set "model=%model:~0,-1%" set "model=%model:~0,-1%"
cd lpcnet cd dnn
call download_model.bat %model% call download_model.bat %model%
cd .. cd ..

View file

@ -10,7 +10,7 @@ srcdir=`dirname $0`
test -n "$srcdir" && cd "$srcdir" test -n "$srcdir" && cd "$srcdir"
git submodule update --init git submodule update --init
(cd lpcnet; ./download_model.sh 2ddc476) (cd dnn; ./download_model.sh 2ddc476)
echo "Updating build configuration files, please wait...." echo "Updating build configuration files, please wait...."

View file

@ -51,7 +51,7 @@
#include "celt_lpc.h" #include "celt_lpc.h"
#include "vq.h" #include "vq.h"
#include "lpcnet.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 /* 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 CPU time in the PLC pitch search by making this smaller than MAX_PERIOD. The

View file

@ -7,4 +7,6 @@ if not exist %model% (
) )
tar -xvzf %model% tar -xvzf %model%
move .\src\*.c .
move .\src\*.h .

1
lpcnet

@ -1 +0,0 @@
Subproject commit f71541410ce1a04552bd1e06610ea8c2f0c86f9f

View file

@ -3,24 +3,24 @@ silk/dred_coding.h \
silk/dred_config.h \ silk/dred_config.h \
silk/dred_decoder.h \ silk/dred_decoder.h \
silk/dred_encoder.h \ silk/dred_encoder.h \
lpcnet/include/dred_rdovae.h \ dnn/include/dred_rdovae.h \
lpcnet/include/lpcnet.h \ dnn/include/lpcnet.h \
lpcnet/src/burg.h \ dnn/burg.h \
lpcnet/src/common.h \ dnn/common.h \
lpcnet/src/freq.h \ dnn/freq.h \
lpcnet/src/kiss99.h \ dnn/kiss99.h \
lpcnet/src/lpcnet_private.h \ dnn/lpcnet_private.h \
lpcnet/src/nnet_data.h \ dnn/nnet_data.h \
lpcnet/src/nnet.h \ dnn/nnet.h \
lpcnet/src/plc_data.h \ dnn/plc_data.h \
lpcnet/src/tansig_table.h \ dnn/tansig_table.h \
lpcnet/src/vec.h \ dnn/vec.h \
lpcnet/src/vec_avx.h \ dnn/vec_avx.h \
lpcnet/src/vec_neon.h \ dnn/vec_neon.h \
lpcnet/src/dred_rdovae_constants.h \ dnn/dred_rdovae_constants.h \
lpcnet/src/dred_rdovae_enc.h \ dnn/dred_rdovae_enc.h \
lpcnet/src/dred_rdovae_enc_data.h \ dnn/dred_rdovae_enc_data.h \
lpcnet/src/dred_rdovae_dec.h \ dnn/dred_rdovae_dec.h \
lpcnet/src/dred_rdovae_dec_data.h \ dnn/dred_rdovae_dec_data.h \
lpcnet/src/dred_rdovae_stats_data.h \ dnn/dred_rdovae_stats_data.h \
lpcnet/src/pitch.h dnn/pitch.h

View file

@ -1,23 +1,23 @@
LPCNET_SOURCES = \ LPCNET_SOURCES = \
lpcnet/src/burg.c \ dnn/burg.c \
lpcnet/src/common.c \ dnn/common.c \
lpcnet/src/freq.c \ dnn/freq.c \
lpcnet/src/kiss99.c \ dnn/kiss99.c \
lpcnet/src/lpcnet.c \ dnn/lpcnet.c \
lpcnet/src/lpcnet_dec.c \ dnn/lpcnet_dec.c \
lpcnet/src/lpcnet_enc.c \ dnn/lpcnet_enc.c \
lpcnet/src/lpcnet_plc.c \ dnn/lpcnet_plc.c \
lpcnet/src/lpcnet_tables.c \ dnn/lpcnet_tables.c \
lpcnet/src/nnet.c \ dnn/nnet.c \
lpcnet/src/nnet_data.c \ dnn/nnet_data.c \
lpcnet/src/plc_data.c \ dnn/plc_data.c \
lpcnet/src/parse_lpcnet_weights.c \ dnn/parse_lpcnet_weights.c \
lpcnet/src/dred_rdovae.c \ dnn/dred_rdovae.c \
lpcnet/src/dred_rdovae_enc.c \ dnn/dred_rdovae_enc.c \
lpcnet/src/dred_rdovae_enc_data.c \ dnn/dred_rdovae_enc_data.c \
lpcnet/src/dred_rdovae_dec.c \ dnn/dred_rdovae_dec.c \
lpcnet/src/dred_rdovae_dec_data.c \ dnn/dred_rdovae_dec_data.c \
lpcnet/src/dred_rdovae_stats_data.c \ dnn/dred_rdovae_stats_data.c \
silk/dred_encoder.c \ silk/dred_encoder.c \
silk/dred_coding.c \ silk/dred_coding.c \
silk/dred_decoder.c silk/dred_decoder.c

View file

@ -14,7 +14,7 @@ host_cpu_family = host_machine.cpu_family()
top_srcdir = meson.current_source_dir() top_srcdir = meson.current_source_dir()
top_builddir = meson.current_build_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') opus_public_includes = include_directories('include')
add_project_arguments('-DOPUS_BUILD', language: 'c') add_project_arguments('-DOPUS_BUILD', language: 'c')

View file

@ -33,7 +33,7 @@ POSSIBILITY OF SUCH DAMAGE.
#include "errors.h" #include "errors.h"
#include "entenc.h" #include "entenc.h"
#include "entdec.h" #include "entdec.h"
#include "lpcnet/src/lpcnet_private.h" #include "dnn/lpcnet_private.h"
#ifdef __cplusplus #ifdef __cplusplus
extern "C" extern "C"

View file

@ -32,9 +32,9 @@
#include "dred_config.h" #include "dred_config.h"
#include "dred_rdovae.h" #include "dred_rdovae.h"
#include "entcode.h" #include "entcode.h"
#include "lpcnet/src/lpcnet_private.h" #include "dnn/lpcnet_private.h"
#include "lpcnet/src/dred_rdovae_enc.h" #include "dnn/dred_rdovae_enc.h"
#include "lpcnet/src/dred_rdovae_enc_data.h" #include "dnn/dred_rdovae_enc_data.h"
#define RESAMPLING_ORDER 8 #define RESAMPLING_ORDER 8

View file

@ -58,7 +58,7 @@ endif
# Perhaps this should be moved into lpcnet itself # Perhaps this should be moved into lpcnet itself
lpcnet_sources = sources['LPCNET_SOURCES'] lpcnet_sources = sources['LPCNET_SOURCES']
lpcnet_includes = [opus_includes, include_directories('../lpcnet/include')] lpcnet_includes = [opus_includes, include_directories('../dnn/include')]
lpcnet_c_args = [] lpcnet_c_args = []
if host_machine.system() == 'windows' if host_machine.system() == 'windows'

View file

@ -36,7 +36,7 @@ POSSIBILITY OF SUCH DAMAGE.
#ifdef NEURAL_PLC #ifdef NEURAL_PLC
#include "lpcnet.h" #include "lpcnet.h"
#include "lpcnet/src/lpcnet_private.h" #include "dnn/lpcnet_private.h"
#endif #endif
#ifdef ENABLE_NEURAL_FEC #ifdef ENABLE_NEURAL_FEC

View file

@ -51,7 +51,7 @@
#include "define.h" #include "define.h"
#include "mathops.h" #include "mathops.h"
#include "cpu_support.h" #include "cpu_support.h"
#include "lpcnet/src/dred_rdovae_dec_data.h" #include "dnn/dred_rdovae_dec_data.h"
struct OpusDecoder { struct OpusDecoder {
int celt_dec_offset; int celt_dec_offset;