Commit 3a8f04db authored by Jean-Marc Valin's avatar Jean-Marc Valin
Browse files

Enabling the post-filter and exporting the ec functions for Opus

parent b44e94ef
......@@ -202,6 +202,10 @@ fi
AC_SUBST(SIZE16)
AC_SUBST(SIZE32)
if test "$OPUS_BUILD" == "true" ; then
AC_DEFINE(OPUS_BUILD, [], [We're part of Opus])
fi
AC_OUTPUT([Makefile libcelt/Makefile tests/Makefile
celt.pc tools/Makefile libcelt.spec ])
......
......@@ -37,6 +37,11 @@
#define CELT_C
/* Always enable postfilter for Opus */
#if defined(OPUS_BUILD) && !defined(ENABLE_POSTFILTER)
#define ENABLE_POSTFILTER
#endif
#include "os_support.h"
#include "mdct.h"
#include <math.h>
......@@ -855,9 +860,11 @@ static int stereo_analysis(const CELTMode *m, const celt_norm *X,
}
#ifdef FIXED_POINT
CELT_STATIC
int celt_encode_with_ec(CELTEncoder * restrict st, const celt_int16 * pcm, int frame_size, unsigned char *compressed, int nbCompressedBytes, ec_enc *enc)
{
#else
CELT_STATIC
int celt_encode_with_ec_float(CELTEncoder * restrict st, const celt_sig * pcm, int frame_size, unsigned char *compressed, int nbCompressedBytes, ec_enc *enc)
{
#endif
......
......@@ -99,9 +99,18 @@ struct CELTMode {
PulseCache cache;
};
#ifndef OPUS_BUILD
#define CELT_STATIC static
#else
#define CELT_STATIC
#endif
#ifdef OPUS_BUILD
/* Prototypes for _ec versions of the encoder/decoder calls (not public) */
int celt_encode_with_ec(CELTEncoder * restrict st, const celt_int16 * pcm, int frame_size, unsigned char *compressed, int nbCompressedBytes, ec_enc *enc);
int celt_encode_with_ec_float(CELTEncoder * restrict st, const float * pcm, int frame_size, unsigned char *compressed, int nbCompressedBytes, ec_enc *enc);
int celt_decode_with_ec(CELTDecoder * restrict st, const unsigned char *data, int len, celt_int16 * restrict pcm, int frame_size, ec_dec *dec);
int celt_decode_with_ec_float(CELTDecoder * restrict st, const unsigned char *data, int len, float * restrict pcm, int frame_size, ec_dec *dec);
#endif /* OPUS_BUILD */
#endif
......@@ -40,6 +40,11 @@
#include "config.h"
#endif
/* Always enable postfilter for Opus */
#if defined(OPUS_BUILD) && !defined(ENABLE_POSTFILTER)
#define ENABLE_POSTFILTER
#endif
#include "pitch.h"
#include "os_support.h"
#include "modes.h"
......
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