summaryrefslogtreecommitdiff
path: root/pjmedia/src/pjmedia-codec/speex/filters.h
diff options
context:
space:
mode:
Diffstat (limited to 'pjmedia/src/pjmedia-codec/speex/filters.h')
-rw-r--r--pjmedia/src/pjmedia-codec/speex/filters.h27
1 files changed, 11 insertions, 16 deletions
diff --git a/pjmedia/src/pjmedia-codec/speex/filters.h b/pjmedia/src/pjmedia-codec/speex/filters.h
index c86d189c..35de5e1e 100644
--- a/pjmedia/src/pjmedia-codec/speex/filters.h
+++ b/pjmedia/src/pjmedia-codec/speex/filters.h
@@ -38,8 +38,9 @@
#include "misc.h"
spx_word16_t compute_rms(const spx_sig_t *x, int len);
+spx_word16_t compute_rms16(const spx_word16_t *x, int len);
void signal_mul(const spx_sig_t *x, spx_sig_t *y, spx_word32_t scale, int len);
-void signal_div(const spx_sig_t *x, spx_sig_t *y, spx_word32_t scale, int len);
+void signal_div(const spx_word16_t *x, spx_word16_t *y, spx_word32_t scale, int len);
#ifdef FIXED_POINT
@@ -47,13 +48,6 @@ int normalize16(const spx_sig_t *x, spx_word16_t *y, spx_sig_t max_scale, int le
#endif
-/** Combined filter memory. */
-typedef struct {
- int last_pitch;
- spx_word16_t last_pitch_gain[3];
- spx_word16_t smooth_gain;
-} CombFilterMem;
-
void qmf_decomp(const spx_word16_t *xx, const spx_word16_t *aa, spx_sig_t *, spx_sig_t *y2, int N, int M, spx_word16_t *mem, char *stack);
void fir_mem_up(const spx_sig_t *x, const spx_word16_t *a, spx_sig_t *y, int N, int M, spx_word32_t *mem, char *stack);
@@ -63,6 +57,10 @@ void filter_mem2(const spx_sig_t *x, const spx_coef_t *num, const spx_coef_t *de
void fir_mem2(const spx_sig_t *x, const spx_coef_t *num, spx_sig_t *y, int N, int ord, spx_mem_t *mem);
void iir_mem2(const spx_sig_t *x, const spx_coef_t *den, spx_sig_t *y, int N, int ord, spx_mem_t *mem);
+void filter_mem16(const spx_word16_t *x, const spx_coef_t *num, const spx_coef_t *den, spx_word16_t *y, int N, int ord, spx_mem_t *mem, char *stack);
+void iir_mem16(const spx_word16_t *x, const spx_coef_t *den, spx_word16_t *y, int N, int ord, spx_mem_t *mem, char *stack);
+void fir_mem16(const spx_word16_t *x, const spx_coef_t *num, spx_word16_t *y, int N, int ord, spx_mem_t *mem, char *stack);
+
/* Apply bandwidth expansion on LPC coef */
void bw_lpc(spx_word16_t , const spx_coef_t *lpc_in, spx_coef_t *lpc_out, int order);
@@ -74,19 +72,16 @@ void residue_percep_zero(const spx_sig_t *xx, const spx_coef_t *ak, const spx_co
void compute_impulse_response(const spx_coef_t *ak, const spx_coef_t *awk1, const spx_coef_t *awk2, spx_word16_t *y, int N, int ord, char *stack);
-void comb_filter_mem_init (CombFilterMem *mem);
-
-void comb_filter(
-spx_sig_t *exc, /*decoded excitation*/
-spx_sig_t *new_exc, /*enhanced excitation*/
+void multicomb(
+spx_word16_t *exc, /*decoded excitation*/
+spx_word16_t *new_exc, /*enhanced excitation*/
spx_coef_t *ak, /*LPC filter coefs*/
int p, /*LPC order*/
int nsf, /*sub-frame size*/
int pitch, /*pitch period*/
-spx_word16_t *pitch_gain, /*pitch gain (3-tap)*/
+int max_pitch, /*pitch gain (3-tap)*/
spx_word16_t comb_gain, /*gain of comb filter*/
-CombFilterMem *mem
+char *stack
);
-
#endif