Commit e2d3bc39 authored by Ron's avatar Ron

Tidy the speex/*.h includes some more

This is a partial revert of 785e61a5.

The _BUILD_SPEEX special case isn't needed in the public headers, and
we don't need '../include' relative paths in the internal files.
Drop a few of the latter altogether where foo.c was including headers
already included by its foo.h.

The OUTSIDE_SPEEX guard isn't needed here anymore either, since that
was only for the resampler which is now in a separate source tree.
parent 6da046b6
......@@ -282,8 +282,6 @@ fi
AC_SUBST(SIZE16)
AC_SUBST(SIZE32)
AC_DEFINE([_BUILD_SPEEX], [], [Defined only when Speex itself is build built])
AC_OUTPUT([Makefile libspeex/Makefile src/Makefile doc/Makefile Speex.spec
include/Makefile include/speex/Makefile speex.pc
win32/Makefile win32/libspeex/Makefile win32/speexenc/Makefile
......
......@@ -5,7 +5,6 @@
#include "quant_lsp.h"
#include "cb_search.h"
#include "filters.h"
#include "../include/speex/speex_bits.h"
#include "os_support.h"
#ifndef NULL
......
......@@ -40,13 +40,8 @@
* @{
*/
#ifdef _BUILD_SPEEX
# include "speex_types.h"
# include "speex_bits.h"
#else
# include <speex/speex_types.h>
# include <speex/speex_bits.h>
#endif
#include "speex_types.h"
#include "speex_bits.h"
#ifdef __cplusplus
extern "C" {
......
......@@ -39,11 +39,7 @@
* @{
*/
#ifdef _BUILD_SPEEX
# include "speex.h"
#else
# include <speex/speex.h>
#endif
#include "speex.h"
#ifdef __cplusplus
extern "C" {
......
......@@ -41,11 +41,7 @@
* @{
*/
#ifdef _BUILD_SPEEX
# include "speex_types.h"
#else
# include <speex/speex_types.h>
#endif
#include "speex_types.h"
#ifdef __cplusplus
extern "C" {
......
......@@ -39,13 +39,8 @@
* @{
*/
#ifdef _BUILD_SPEEX
# include "speex_types.h"
# include "speex_bits.h"
#else
# include <speex/speex_types.h>
# include <speex/speex_bits.h>
#endif
#include "speex_types.h"
#include "speex_bits.h"
#ifdef __cplusplus
......
......@@ -119,11 +119,7 @@
#else
# ifdef _BUILD_SPEEX
# include "include/speex/speex_config_types.h"
#else
# include <speex/speex_config_types.h>
#endif
#include "speex_config_types.h"
#endif
......
......@@ -17,7 +17,7 @@ else
FFTSRC=
endif
INCLUDES = -I$(top_builddir)/include -I$(top_builddir) @OGG_CFLAGS@ @FFT_CFLAGS@
INCLUDES = -I$(top_srcdir)/include -I$(top_builddir)/include/speex -I$(top_builddir) @OGG_CFLAGS@ @FFT_CFLAGS@
lib_LTLIBRARIES = libspeex.la
......
......@@ -74,9 +74,7 @@
#endif
#ifndef OUTSIDE_SPEEX
#include "../include/speex/speex_types.h"
#endif
#include "speex/speex_types.h"
#define ABS(x) ((x) < 0 ? (-(x)) : (x)) /**< Absolute integer value. */
#define ABS16(x) ((x) < 0 ? (-(x)) : (x)) /**< Absolute 16-bit value. */
......
......@@ -36,7 +36,7 @@
#include "config.h"
#endif
#include "../include/speex/speex_bits.h"
#include "speex/speex_bits.h"
#include "arch.h"
#include "os_support.h"
......
......@@ -35,7 +35,7 @@
#ifndef CB_SEARCH_H
#define CB_SEARCH_H
#include "../include/speex/speex_bits.h"
#include "speex/speex_bits.h"
#include "arch.h"
/** Split codebook parameters. */
......
......@@ -38,7 +38,6 @@
#include "ltp.h"
#include "stack_alloc.h"
#include "filters.h"
#include "../include/speex/speex_bits.h"
#include "math_approx.h"
#include "os_support.h"
......
......@@ -35,7 +35,7 @@
#ifndef LTP_H
#define LTP_H
#include "../include/speex/speex_bits.h"
#include "speex/speex_bits.h"
#include "arch.h"
/** LTP parameters. */
......
......@@ -36,8 +36,7 @@
#ifndef MODES_H
#define MODES_H
#include "../include/speex/speex.h"
#include "../include/speex/speex_bits.h"
#include "speex/speex.h"
#include "arch.h"
#define NB_SUBMODES 16
......
......@@ -43,12 +43,10 @@
#include "filters.h"
#include "stack_alloc.h"
#include "vq.h"
#include "../include/speex/speex_bits.h"
#include "vbr.h"
#include "arch.h"
#include "math_approx.h"
#include "os_support.h"
#include "../include/speex/speex_callbacks.h"
#ifdef VORBIS_PSYCHO
#include "vorbis_psy.h"
......
......@@ -37,8 +37,7 @@
#define NB_CELP_H
#include "modes.h"
#include "../include/speex/speex_bits.h"
#include "../include/speex/speex_callbacks.h"
#include "speex/speex_callbacks.h"
#include "vbr.h"
#include "filters.h"
......
......@@ -35,7 +35,7 @@
#ifndef QUANT_LSP_H
#define QUANT_LSP_H
#include "../include/speex/speex_bits.h"
#include "speex/speex_bits.h"
#include "arch.h"
#define MAX_LSP_SIZE 20
......
......@@ -37,7 +37,6 @@
#define SB_CELP_H
#include "modes.h"
#include "../include/speex/speex_bits.h"
#include "nb_celp.h"
/**Structure representing the full state of the sub-band encoder*/
......
......@@ -36,7 +36,7 @@
#include "config.h"
#endif
#include "../include/speex/speex_callbacks.h"
#include "speex/speex_callbacks.h"
#include "arch.h"
#include "os_support.h"
......
......@@ -36,8 +36,8 @@
#endif
#include "arch.h"
#include "../include/speex/speex_header.h"
#include "../include/speex/speex.h"
#include "speex/speex_header.h"
#include "speex/speex.h"
#include "os_support.h"
#ifndef NULL
......
......@@ -33,8 +33,8 @@
#include "config.h"
#endif
#include "../include/speex/speex_stereo.h"
#include "../include/speex/speex_callbacks.h"
#include "speex/speex_stereo.h"
#include "speex/speex_callbacks.h"
#include "math_approx.h"
#include "vq.h"
#include <math.h>
......
......@@ -2,10 +2,9 @@
#include "config.h"
#endif
#include "../include/speex/speex.h"
#include "speex/speex_callbacks.h"
#include <stdio.h>
#include <stdlib.h>
#include "../include/speex/speex_callbacks.h"
#ifdef FIXED_DEBUG
extern long long spx_mips;
......
......@@ -2,10 +2,9 @@
#include "config.h"
#endif
#include "../include/speex/speex.h"
#include "speex/speex_callbacks.h"
#include <stdio.h>
#include <stdlib.h>
#include "../include/speex/speex_callbacks.h"
#ifdef FIXED_DEBUG
extern long long spx_mips;
......
......@@ -2,10 +2,9 @@
#include "config.h"
#endif
#include "../include/speex/speex.h"
#include "speex/speex_callbacks.h"
#include <stdio.h>
#include <stdlib.h>
#include "../include/speex/speex_callbacks.h"
#ifdef FIXED_DEBUG
extern long long spx_mips;
......
......@@ -5,7 +5,7 @@
# Disable automatic dependency tracking if using other tools than gcc and gmake
#AUTOMAKE_OPTIONS = no-dependencies
INCLUDES = -I$(top_builddir) @OGG_CFLAGS@ @SPEEXDSP_CFLAGS@
INCLUDES = -I$(top_srcdir)/include -I$(top_builddir)/include/speex -I$(top_builddir) @OGG_CFLAGS@ @SPEEXDSP_CFLAGS@
man_MANS = speexenc.1 speexdec.1
......
......@@ -46,7 +46,6 @@
#include <stdlib.h>
#include <string.h>
#include "../include/speex/speex.h"
#include <ogg/ogg.h>
#if defined WIN32 || defined _WIN32
......@@ -81,9 +80,9 @@
#include <string.h>
#include "wav_io.h"
#include "../include/speex/speex_header.h"
#include "../include/speex/speex_stereo.h"
#include "../include/speex/speex_callbacks.h"
#include "speex/speex_header.h"
#include "speex/speex_stereo.h"
#include "speex/speex_callbacks.h"
#define MAX_FRAME_SIZE 2000
......
......@@ -47,11 +47,11 @@
#include <string.h>
#include <time.h>
#include "../include/speex/speex.h"
#include "speex/speex.h"
#include "speex/speex_header.h"
#include "speex/speex_stereo.h"
#include <ogg/ogg.h>
#include "wav_io.h"
#include "../include/speex/speex_header.h"
#include "../include/speex/speex_stereo.h"
#ifdef USE_SPEEXDSP
#include <speex/speex_preprocess.h>
#endif
......
......@@ -36,7 +36,6 @@
#include <stdio.h>
#include <string.h>
#include "../include/speex/speex_types.h"
#include "wav_io.h"
......
......@@ -33,7 +33,7 @@
#define WAV_IO_H
#include <stdio.h>
#include "../include/speex/speex_types.h"
#include "speex/speex_types.h"
#if !defined(__LITTLE_ENDIAN__) && ( defined(WORDS_BIGENDIAN) || defined(__BIG_ENDIAN__) )
#define le_short(s) ((short) ((unsigned short) (s) << 8) | ((unsigned short) (s) >> 8))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment