shithub: opus

Download patch

ref: bfa01f1a1ca257ceff20aaf61d81d165af6867fe
parent: 7458c1bdc667564764d630f8ea08933a9c5e9319
author: Jean-Marc Valin <jmvalin@amazon.com>
date: Tue Jun 20 20:29:39 EDT 2023

Update build for LPCNet merge

git/query: bad hash f71541410ce1a04552bd1e06610ea8c2f0c86f9f
--- a/.gitmodules
+++ b/.gitmodules
@@ -1,3 +1,0 @@
-[submodule "lpcnet"]
-	path = lpcnet
-	url = https://github.com/xiph/LPCNet
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -278,7 +278,7 @@
          $<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 @@
   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 @@
 
   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 @@
 
   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}
--- a/Makefile.am
+++ b/Makefile.am
@@ -11,7 +11,7 @@
 
 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 @@
 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
 
--- a/autogen.bat
+++ b/autogen.bat
@@ -10,7 +10,7 @@
 REM Remove trailing ")" character from the model variable
 set "model=%model:~0,-1%"
 
-cd lpcnet
+cd dnn
 call download_model.bat %model%
 cd ..
 
--- a/autogen.sh
+++ b/autogen.sh
@@ -10,7 +10,7 @@
 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...."
 
--- 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
--- a/dnn/download_model.bat
+++ b/dnn/download_model.bat
@@ -7,4 +7,6 @@
 )
 
 tar -xvzf %model%
+move .\src\*.c .
+move .\src\*.h .
 
--