Enabling the post-filter and exporting the ec functions for Opus
This commit is contained in:
parent
b44e94ef58
commit
3a8f04db17
4 changed files with 25 additions and 0 deletions
|
@ -202,6 +202,10 @@ fi
|
||||||
AC_SUBST(SIZE16)
|
AC_SUBST(SIZE16)
|
||||||
AC_SUBST(SIZE32)
|
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
|
AC_OUTPUT([Makefile libcelt/Makefile tests/Makefile
|
||||||
celt.pc tools/Makefile libcelt.spec ])
|
celt.pc tools/Makefile libcelt.spec ])
|
||||||
|
|
||||||
|
|
|
@ -37,6 +37,11 @@
|
||||||
|
|
||||||
#define CELT_C
|
#define CELT_C
|
||||||
|
|
||||||
|
/* Always enable postfilter for Opus */
|
||||||
|
#if defined(OPUS_BUILD) && !defined(ENABLE_POSTFILTER)
|
||||||
|
#define ENABLE_POSTFILTER
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "os_support.h"
|
#include "os_support.h"
|
||||||
#include "mdct.h"
|
#include "mdct.h"
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
@ -855,9 +860,11 @@ static int stereo_analysis(const CELTMode *m, const celt_norm *X,
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef FIXED_POINT
|
#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)
|
int celt_encode_with_ec(CELTEncoder * restrict st, const celt_int16 * pcm, int frame_size, unsigned char *compressed, int nbCompressedBytes, ec_enc *enc)
|
||||||
{
|
{
|
||||||
#else
|
#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)
|
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
|
#endif
|
||||||
|
|
|
@ -99,9 +99,18 @@ struct CELTMode {
|
||||||
PulseCache cache;
|
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) */
|
/* 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(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_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(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);
|
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
|
#endif
|
||||||
|
|
|
@ -40,6 +40,11 @@
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* Always enable postfilter for Opus */
|
||||||
|
#if defined(OPUS_BUILD) && !defined(ENABLE_POSTFILTER)
|
||||||
|
#define ENABLE_POSTFILTER
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "pitch.h"
|
#include "pitch.h"
|
||||||
#include "os_support.h"
|
#include "os_support.h"
|
||||||
#include "modes.h"
|
#include "modes.h"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue