commit 367f6ef0aa0f0bc713c32cf749faecc70ffba003 Author: Edouard DUPIN Date: Mon Jun 15 22:43:44 2015 +0200 [DEV] create lutin wrapper diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..29c35e4 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "speex"] + path = speex + url = https://github.com/generic-library/speex.git diff --git a/README.md b/README.md new file mode 100644 index 0000000..888d700 --- /dev/null +++ b/README.md @@ -0,0 +1,5 @@ +Lutin wrapper +============= + +Used to compile the library with lutin builder interface + diff --git a/lutin_speex.py b/lutin_speex.py new file mode 100644 index 0000000..22ca71b --- /dev/null +++ b/lutin_speex.py @@ -0,0 +1,93 @@ +#!/usr/bin/python +import lutin.module as module +import lutin.tools as tools + +def get_desc(): + return "Algorithm of speex codec" + + +def create(target): + myModule = module.Module(__file__, 'speex', 'LIBRARY') + # add extra compilation flags : + myModule.add_extra_compile_flags() + # add the file to compile: + myModule.add_src_file([ + 'speex/libspeex/bits.c', + 'speex/libspeex/exc_5_256_table.c', + 'speex/libspeex/gain_table_lbr.c', + 'speex/libspeex/kiss_fftr.c', + 'speex/libspeex/modes.c', + 'speex/libspeex/smallft.c', + 'speex/libspeex/vq.c', + 'speex/libspeex/cb_search.c', + 'speex/libspeex/exc_5_64_table.c', + 'speex/libspeex/hexc_10_32_table.c', + 'speex/libspeex/lpc.c', + 'speex/libspeex/modes_wb.c', + 'speex/libspeex/speex.c', + 'speex/libspeex/window.c', + 'speex/libspeex/exc_10_16_table.c', + 'speex/libspeex/exc_8_128_table.c', + 'speex/libspeex/hexc_table.c', + 'speex/libspeex/lsp.c', + 'speex/libspeex/nb_celp.c', + 'speex/libspeex/speex_callbacks.c', + 'speex/libspeex/exc_10_32_table.c', + 'speex/libspeex/filters.c', + 'speex/libspeex/high_lsp_tables.c', + 'speex/libspeex/lsp_tables_nb.c', + 'speex/libspeex/quant_lsp.c', + 'speex/libspeex/speex_header.c', + 'speex/libspeex/vbr.c', + 'speex/libspeex/exc_20_32_table.c', + 'speex/libspeex/gain_table.c', + 'speex/libspeex/kiss_fft.c', + 'speex/libspeex/ltp.c', + 'speex/libspeex/sb_celp.c', + 'speex/libspeex/stereo.c', + 'speex/libspeex/vorbis_psy.c' + ]) + + # name of the dependency + #myModule.add_module_depend('speexdsp') + + myModule.compile_version_CC(1989, gnu=True) + myModule.add_export_path(tools.get_current_path(__file__) + "/speex/include") + # configure library : + + # Make use of ARM4 assembly optimizations + #myModule.compile_flags_CC("-DARM4_ASM=1") + # Make use of ARM5E assembly optimizations + #myModule.compile_flags_CC("-DARM5E_ASM=1") + # Make use of Blackfin assembly optimizations + #myModule.compile_flags_CC("-DBFIN_ASM=1") + # Disable all parts of the API that are using floats + #myModule.compile_flags_CC("-DDISABLE_FLOAT_API=1") + # Enable valgrind extra checks + #myModule.compile_flags_CC("-DENABLE_VALGRIND=1") + # Symbol visibility prefix */ + #define EXPORT __attribute__((visibility("default"))) + myModule.compile_flags('c', "-DEXPORT=''") + # Debug fixed-point implementation */ + #myModule.compile_flags_CC("-DFIXED_DEBUG=1") + # Compile as fixed-point / floating-point + if True: + myModule.compile_flags('c', "-DFIXED_POINT") + else: + myModule.compile_flags('c', "-DFLOATING_POINT") + # Enable NEON support */ + #myModule.compile_flags('c', "-D_USE_NEON=1") + # Enable SSE support */ + myModule.compile_flags('c', "-D_USE_SSE=1") + # Enable SSE2 support */ + myModule.compile_flags('c', "-D_USE_SSE2=1") + # Define to 1 if you have the header file. + myModule.compile_flags('c', "-DHAVE_ALLOCA_H=1") + # Use FFT from OggVorbis */ + myModule.compile_flags('c', "-DUSE_SMALLFT=1") + # Use C99 variable-size arrays */ + myModule.compile_flags('c', "-DVAR_ARRAYS=1") + + return myModule + + diff --git a/lutin_speextestenc.py b/lutin_speextestenc.py new file mode 100644 index 0000000..df698b0 --- /dev/null +++ b/lutin_speextestenc.py @@ -0,0 +1,25 @@ +#!/usr/bin/python +import lutin.module as module +import lutin.tools as tools + +def get_desc(): + return "Encode test" + + +def create(target): + myModule = module.Module(__file__, 'speextestenc', 'BINARY') + # add extra compilation flags : + myModule.add_extra_compile_flags() + # add the file to compile: + myModule.add_src_file([ + 'speex/libspeex/testenc.c' + ]) + + myModule.compile_version_CC(1989, gnu=True) + # name of the dependency + myModule.add_module_depend('speex') + + # add the currrent module at the + return myModule + + diff --git a/lutin_speextestencuwb.py b/lutin_speextestencuwb.py new file mode 100644 index 0000000..6308700 --- /dev/null +++ b/lutin_speextestencuwb.py @@ -0,0 +1,25 @@ +#!/usr/bin/python +import lutin.module as module +import lutin.tools as tools + +def get_desc(): + return "test: Encode U wide band" + + +def create(target): + myModule = module.Module(__file__, 'speextestencuwb', 'BINARY') + # add extra compilation flags : + myModule.add_extra_compile_flags() + # add the file to compile: + myModule.add_src_file([ + 'speex/libspeex/testenc_uwb.c' + ]) + + myModule.compile_version_CC(1989, gnu=True) + # name of the dependency + myModule.add_module_depend('speex') + + # add the currrent module at the + return myModule + + diff --git a/lutin_speextestencwb.py b/lutin_speextestencwb.py new file mode 100644 index 0000000..b78d22e --- /dev/null +++ b/lutin_speextestencwb.py @@ -0,0 +1,25 @@ +#!/usr/bin/python +import lutin.module as module +import lutin.tools as tools + +def get_desc(): + return "test: Encode wide band" + + +def create(target): + myModule = module.Module(__file__, 'speextestencwb', 'BINARY') + # add extra compilation flags : + myModule.add_extra_compile_flags() + # add the file to compile: + myModule.add_src_file([ + 'speex/libspeex/testenc_wb.c' + ]) + + myModule.compile_version_CC(1989, gnu=True) + # name of the dependency + myModule.add_module_depend('speex') + + # add the currrent module at the + return myModule + + diff --git a/speex b/speex new file mode 160000 index 0000000..8dfa165 --- /dev/null +++ b/speex @@ -0,0 +1 @@ +Subproject commit 8dfa1650ca240ccca3d4834c298eb854bfe0a56d