Skip to content

Commit

Permalink
Resurected the --enable-vorbis-psy option by linking with libspeexdsp…
Browse files Browse the repository at this point in the history
… for the

fft.
  • Loading branch information
jmvalin committed Apr 15, 2009
1 parent e34614c commit 05f7c6f
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 5 deletions.
7 changes: 7 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,12 @@ AC_ARG_ENABLE(ti-c55x, [ --enable-ti-c55x Enable support for TI C55X DSP
AC_DEFINE([TI_C55X], , [Enable support for TI C55X DSP])
fi])

AC_ARG_ENABLE(vorbis-psy, [ --enable-psy Enable the Vorbis psy model],
[if test "$enableval" = yes; then
vorbis_psy=yes;
AC_DEFINE([VORBIS_PSYCHO], , [Enable support for the Vorbis psy model])
fi])

AC_ARG_WITH([fft], [AS_HELP_STRING([--with-fft=choice],[use an alternate FFT implementation. The available choices are
kiss (default fixed point), smallft (default floating point), gpl-fftw3 and proprietary-intel-mkl])],
[FFT=$withval]
Expand Down Expand Up @@ -239,6 +245,7 @@ AM_CONDITIONAL(BUILD_KISS_FFT, [test "$FFT" = "kiss"])
AM_CONDITIONAL(BUILD_SMALLFT, [test "$FFT" = "smallft"])
AC_SUBST(FFT_PKGCONFIG)

AM_CONDITIONAL(BUILD_VORBIS_PSY, [test "x$vorbis_psy" = "xyes"])

AC_CHECK_SIZEOF(short)
AC_CHECK_SIZEOF(int)
Expand Down
15 changes: 11 additions & 4 deletions libspeex/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
# Disable automatic dependency tracking if using other tools than gcc and gmake
#AUTOMAKE_OPTIONS = no-dependencies

if BUILD_VORBIS_PSY
VPSY_LIB=libspeexdsp.la
VPSY_SOURCE=vorbis_psy.c
else
VPSY_LIB=
VPSY_SOURCE=
endif

EXTRA_DIST=echo_diagnostic.m

Expand All @@ -9,7 +16,7 @@ INCLUDES = -I$(top_builddir)/include -I$(top_builddir) @OGG_CFLAGS@ @FFT_CFLAGS@
lib_LTLIBRARIES = libspeex.la libspeexdsp.la

# Sources for compilation in the library
libspeex_la_SOURCES = cb_search.c exc_10_32_table.c exc_8_128_table.c \
libspeex_la_SOURCES = $(VPSY_SOURCE) cb_search.c exc_10_32_table.c exc_8_128_table.c \
filters.c gain_table.c hexc_table.c high_lsp_tables.c lsp.c \
ltp.c speex.c stereo.c vbr.c vq.c bits.c exc_10_16_table.c \
exc_20_32_table.c exc_5_256_table.c exc_5_64_table.c gain_table_lbr.c hexc_10_32_table.c \
Expand Down Expand Up @@ -42,11 +49,11 @@ libspeexdsp_la_LDFLAGS = -no-undefined -version-info @SPEEX_LT_CURRENT@:@SPEEX_L

noinst_PROGRAMS = testenc testenc_wb testenc_uwb testdenoise testecho testjitter
testenc_SOURCES = testenc.c
testenc_LDADD = libspeex.la
testenc_LDADD = libspeex.la $(VPSY_LIB)
testenc_wb_SOURCES = testenc_wb.c
testenc_wb_LDADD = libspeex.la
testenc_wb_LDADD = libspeex.la $(VPSY_LIB)
testenc_uwb_SOURCES = testenc_uwb.c
testenc_uwb_LDADD = libspeex.la
testenc_uwb_LDADD = libspeex.la $(VPSY_LIB)
testdenoise_SOURCES = testdenoise.c
testdenoise_LDADD = libspeexdsp.la @FFT_LIBS@
testecho_SOURCES = testecho.c
Expand Down
1 change: 1 addition & 0 deletions libspeex/vorbis_psy.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
#include "smallft.h"
#include "lpc.h"
#include "vorbis_psy.h"
#include "os_support.h"

#include <stdlib.h>
#include <math.h>
Expand Down
8 changes: 7 additions & 1 deletion src/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@
# Disable automatic dependency tracking if using other tools than gcc and gmake
#AUTOMAKE_OPTIONS = no-dependencies

if BUILD_VORBIS_PSY
VPSY_LIB=$(top_builddir)/libspeex/libspeexdsp.la
else
VPSY_LIB=
endif

INCLUDES = -I$(top_builddir) @OGG_CFLAGS@

man_MANS = speexenc.1 speexdec.1
Expand All @@ -21,5 +27,5 @@ speexenc_LDADD = $(top_builddir)/libspeex/libspeex.la $(top_builddir)/libspeex/l
$(OGG_LIBS) @FFT_LIBS@

speexdec_SOURCES = speexdec.c wav_io.c
speexdec_LDADD = $(top_builddir)/libspeex/libspeex.la \
speexdec_LDADD = $(top_builddir)/libspeex/libspeex.la $(VPSY_LIB) \
$(OGG_LIBS) @FFT_LIBS@

0 comments on commit 05f7c6f

Please sign in to comment.