From e3c2ed7a71f65dc721c7210f120259ecd4ff65cb Mon Sep 17 00:00:00 2001 From: Nils Wallménius Date: Wed, 11 Dec 2013 22:59:14 +0100 Subject: Sync libopus to upstream release 1.1 Change-Id: I9fea7460fc33f60faff961b3389dd97b5191463c --- lib/rbcodec/codecs/libopus/celt/celt.h | 31 ++++++++++++++++++------------- 1 file changed, 18 insertions(+), 13 deletions(-) (limited to 'lib/rbcodec/codecs/libopus/celt/celt.h') diff --git a/lib/rbcodec/codecs/libopus/celt/celt.h b/lib/rbcodec/codecs/libopus/celt/celt.h index 0911c72f72..5deea1f0aa 100644 --- a/lib/rbcodec/codecs/libopus/celt/celt.h +++ b/lib/rbcodec/codecs/libopus/celt/celt.h @@ -52,11 +52,11 @@ extern "C" { typedef struct { int valid; - opus_val16 tonality; - opus_val16 tonality_slope; - opus_val16 noisiness; - opus_val16 activity; - opus_val16 music_prob; + float tonality; + float tonality_slope; + float noisiness; + float activity; + float music_prob; int bandwidth; }AnalysisInfo; @@ -66,6 +66,10 @@ typedef struct { /* Encoder/decoder Requests */ +/* Expose this option again when variable framesize actually works */ +#define OPUS_FRAMESIZE_VARIABLE 5010 /**< Optimize the frame size dynamically */ + + #define CELT_SET_PREDICTION_REQUEST 10002 /** Controls the use of interframe prediction. 0=Independent frames @@ -109,10 +113,7 @@ typedef struct { #define OPUS_SET_LFE_REQUEST 10024 #define OPUS_SET_LFE(x) OPUS_SET_LFE_REQUEST, __opus_check_int(x) -#define OPUS_SET_ENERGY_SAVE_REQUEST 10026 -#define OPUS_SET_ENERGY_SAVE(x) OPUS_SET_ENERGY_SAVE_REQUEST, __opus_check_val16_ptr(x) - -#define OPUS_SET_ENERGY_MASK_REQUEST 10028 +#define OPUS_SET_ENERGY_MASK_REQUEST 10026 #define OPUS_SET_ENERGY_MASK(x) OPUS_SET_ENERGY_MASK_REQUEST, __opus_check_val16_ptr(x) /* Encoder stuff */ @@ -121,7 +122,8 @@ int celt_encoder_get_size(int channels); int celt_encode_with_ec(OpusCustomEncoder * OPUS_RESTRICT st, const opus_val16 * pcm, int frame_size, unsigned char *compressed, int nbCompressedBytes, ec_enc *enc); -int celt_encoder_init(CELTEncoder *st, opus_int32 sampling_rate, int channels); +int celt_encoder_init(CELTEncoder *st, opus_int32 sampling_rate, int channels, + int arch); @@ -141,7 +143,7 @@ int celt_decode_with_ec(OpusCustomDecoder * OPUS_RESTRICT st, const unsigned cha #ifdef CUSTOM_MODES #define OPUS_CUSTOM_NOSTATIC #else -#define OPUS_CUSTOM_NOSTATIC static inline +#define OPUS_CUSTOM_NOSTATIC static OPUS_INLINE #endif static const unsigned char trim_icdf[11] = {126, 124, 119, 109, 87, 41, 19, 9, 4, 2, 0}; @@ -166,7 +168,7 @@ static const unsigned char fromOpusTable[16] = { 0x00, 0x08, 0x10, 0x18 }; -static inline int toOpus(unsigned char c) +static OPUS_INLINE int toOpus(unsigned char c) { int ret=0; if (c<0xA0) @@ -177,7 +179,7 @@ static inline int toOpus(unsigned char c) return ret|(c&0x7); } -static inline int fromOpus(unsigned char c) +static OPUS_INLINE int fromOpus(unsigned char c) { if (c<0x80) return -1; @@ -193,6 +195,9 @@ extern const signed char tf_select_table[4][8]; int resampling_factor(opus_int32 rate); +void celt_preemphasis(const opus_val16 * OPUS_RESTRICT pcmp, celt_sig * OPUS_RESTRICT inp, + int N, int CC, int upsample, const opus_val16 *coef, celt_sig *mem, int clip); + void comb_filter(opus_val32 *y, opus_val32 *x, int T0, int T1, int N, opus_val16 g0, opus_val16 g1, int tapset0, int tapset1, const opus_val16 *window, int overlap); -- cgit v1.2.3