Skip to content

Commit

Permalink
Speex is actually not needed at all
Browse files Browse the repository at this point in the history
Needed is only SpeexDSP.
  • Loading branch information
MartinPulec committed Mar 3, 2021
1 parent f7bf7e9 commit c909c09
Show file tree
Hide file tree
Showing 9 changed files with 40 additions and 57 deletions.
3 changes: 0 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@
[submodule "glm"]
path = glm
url = https://github.com/g-truc/glm.git
[submodule "ext-deps/speex"]
path = ext-deps/speex
url = https://gitlab.xiph.org/xiph/speex
[submodule "ext-deps/speexdsp"]
path = ext-deps/speexdsp
url = https://gitlab.xiph.org/xiph/speexdsp
Expand Down
2 changes: 1 addition & 1 deletion COPYRIGHT
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ UltraGrid - A High Definition Collaboratory
External libraries
------------------

### Speex
### SpeexDSP

Copyright 2002-2008 Xiph.org Foundation
Copyright 2002-2008 Jean-Marc Valin
Expand Down
4 changes: 2 additions & 2 deletions Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -300,11 +300,11 @@ src/audio/filterbank.o:

src/audio/fftwrap.o:
$(MKDIR_P) $(dir $@)
$(CC) $(CFLAGS) $(SPEEX_FLAGS) $(INC) -DUSE_SMALLFT -DEXPORT="" -DRANDOM_PREFIX=speex -DFLOATING_POINT -DDISABLE_WARNINGS -I. -I $(srcdir)/$(SPEEX_PATH)/include/speex -Iinclude -fvisibility=hidden -c $(srcdir)/$(SPEEX_PATH)/libspeex/fftwrap.c -fPIC -DPIC -o $@
$(CC) $(CFLAGS) $(SPEEX_FLAGS) $(INC) -DUSE_SMALLFT -DEXPORT="" -DRANDOM_PREFIX=speex -DFLOATING_POINT -DDISABLE_WARNINGS -I. -I $(srcdir)/$(SPEEX_PATH)/include/speex -Iinclude -fvisibility=hidden -c $(srcdir)/$(SPEEXDSP_PATH)/libspeexdsp/fftwrap.c -fPIC -DPIC -o $@

src/audio/smallft.o:
$(MKDIR_P) $(dir $@)
$(CC) $(CFLAGS) $(SPEEX_FLAGS) $(INC) -DEXPORT="" -DRANDOM_PREFIX=speex -DFIXED_POINT -DDISABLE_WARNINGS -I. -I $(srcdir)/$(SPEEX_PATH)/include/speex -Iinclude -fvisibility=hidden -c $(srcdir)/$(SPEEX_PATH)/libspeex/smallft.c -fPIC -DPIC -o $@
$(CC) $(CFLAGS) $(SPEEX_FLAGS) $(INC) -DEXPORT="" -DRANDOM_PREFIX=speex -DFIXED_POINT -DDISABLE_WARNINGS -I. -I $(srcdir)/$(SPEEX_PATH)/include/speex -Iinclude -fvisibility=hidden -c $(srcdir)/$(SPEEXDSP_PATH)/libspeexdsp/smallft.c -fPIC -DPIC -o $@

src/audio/mdf.o:
$(MKDIR_P) $(dir $@)
Expand Down
2 changes: 1 addition & 1 deletion autogen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ ORIGDIR=`pwd`
cd $srcdir

. ./data/scripts/add_cl_if_not_present.sh # add --with-cuda-host-compiler=<cl> to current params (Win)
./data/scripts/install_speex.sh
./data/scripts/install_speexdsp.sh
. ./data/scripts/fetch_submodule.sh
fetch_submodule zfec https://files.pythonhosted.org/packages/1c/bf/b87a31205fcd2e0e4b4c9a3f7bf6f5a231e199bec5f654d7c5ac6fcec349/zfec-1.5.5.tar.gz https://github.com/tahoe-lafs/zfec

Expand Down
16 changes: 3 additions & 13 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -2491,7 +2491,6 @@ fi
# SPEEX

speex=yes
SPEEX_PATH=ext-deps/speex
SPEEXDSP_PATH=ext-deps/speexdsp
SPEEX_INC=
SPEEX_OBJ=src/audio/echo.o
Expand All @@ -2502,29 +2501,20 @@ PKG_CHECK_MODULES([LIBSPEEXDSP], [speexdsp], [found_speexdsp=yes], [found_speexd
if test "$found_speexdsp" = yes; then
LIBS="$LIBS $LIBSPEEXDSP_LIBS"
else
PKG_CHECK_MODULES([LIBSPEEX], [speex], [found_speex=yes], [found_speex=no])
if test "$found_speex" = yes; then
LIBS="$LIBS $LIBSPEEX_LIBS"
else
SPEEX_INC="-I$srcdir/${SPEEX_PATH}/include"
SPEEX_OBJ="$SPEEX_OBJ src/audio/fftwrap.o src/audio/smallft.o"
fi

SPEEX_INC="$SPEEX_INC -I$srcdir/${SPEEXDSP_PATH}/include"
SPEEX_OBJ="$SPEEX_OBJ src/audio/filterbank.o src/audio/mdf.o src/audio/preprocess.o src/audio/resample.o"
SPEEX_OBJ="$SPEEX_OBJ src/audio/fftwrap.o src/audio/filterbank.o src/audio/mdf.o src/audio/preprocess.o src/audio/resample.o src/audio/smallft.o"
fi

SAVED_CFLAGS=$CFLAGS
SAVED_CPPFLAGS=$CPPFLAGS
CFLAGS="$CFLAGS $SPEEX_INC"
CPPFLAGS="$CPPFLAGS $SPEEX_INC"
AC_CHECK_HEADER([speex/speex.h])
AC_CHECK_HEADER([speex/speex_resampler.h])
CFLAGS=$SAVED_CFLAGS
CPPFLAGS=$SAVED_CPPFLAGS

if test "$ac_cv_header_speex_speex_h" != yes -o "$ac_cv_header_speex_speex_resampler_h" != yes; then
AC_MSG_ERROR([Speex/SpeexDSP is a hard dependency, download it into $SPEEX_PATH and $SPEEXDSP_PATH]
if test "$ac_cv_header_speex_speex_resampler_h" != yes; then
AC_MSG_ERROR([SpeexDSP is a hard dependency, download it into $SPEEXDSP_PATH]
[This should be usually automatic - please report to $PACKAGE_BUGREPORT if not sure why getting this.]);
fi

Expand Down
33 changes: 0 additions & 33 deletions data/scripts/install_speex.sh

This file was deleted.

30 changes: 30 additions & 0 deletions data/scripts/install_speexdsp.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#!/bin/sh -eu
## Install speex and speexdsp
##
## Normally try to use git submodules present in the repository. If not possible
## it tries to either clone (.git directory stripped) or to download release
## (if git not found).

if command -v pkg-config >/dev/null && pkg-config speexdsp; then
echo "Using system SpeexDSP"
exit 0
fi

. $(dirname $0)/fetch_submodule.sh

if fetch_submodule speexdsp http://downloads.us.xiph.org/releases/speex/speexdsp-1.2.0.tar.gz https://gitlab.xiph.org/xiph/speexdsp 1
then
SUBMODULE_UPDATED=no
else
SUBMODULE_UPDATED=yes
fi

printf "Configuring speexdsp... "
if [ -f ext-deps/speexdsp/include/speex/speexdsp_config_types.h -a $SUBMODULE_UPDATED = no ]; then
echo "not needed"
else
cd ext-deps/speexdsp
./autogen.sh
./configure
cd ../..
fi
6 changes: 3 additions & 3 deletions ext-deps/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ DeckLink
--------
**DeckLink SDK API** - only a wrapper dynamically calling actual library.

Speex + SpeexDSP
SpeexDSP
----------------
Essential for UltraGrid (i.e. it won't compile without).

If those can be detected with _pkg-config_, system library is used instead (preferred).
If this can be detected with _pkg-config_, system library is used instead (preferred).
Otherwise `autogen.sh` tries to either pull the submodule, clone or a direct download.

Zfec
----
Currently required. Bootsrapped similarly to Speex/SpeexDSP.
Currently required. Bootstrapped similarly to SpeexDSP.
1 change: 0 additions & 1 deletion ext-deps/speex
Submodule speex deleted from 870ff8

0 comments on commit c909c09

Please sign in to comment.