summaryrefslogtreecommitdiff
path: root/libavcodec/wmavoice.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2011-03-21 03:09:46 +0100
committerMichael Niedermayer <michaelni@gmx.at>2011-03-21 03:33:28 +0100
commitd4a50a2100a2b3539d238e64af98e16f47b47a89 (patch)
tree95bc08782f34783dfac34a73142a77adbce4db32 /libavcodec/wmavoice.c
parent849f80fecbada7c512737e13edec9516541996e3 (diff)
parentcf752d027fafe691951fa00d9c25e2fda032b536 (diff)
downloadffmpeg-d4a50a2100a2b3539d238e64af98e16f47b47a89.tar.gz
Merge remote-tracking branch 'newdev/master'
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/wmavoice.c')
-rw-r--r--libavcodec/wmavoice.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/libavcodec/wmavoice.c b/libavcodec/wmavoice.c
index 13011ec234..dfdfabbbb3 100644
--- a/libavcodec/wmavoice.c
+++ b/libavcodec/wmavoice.c
@@ -36,8 +36,9 @@
#include "acelp_filters.h"
#include "lsp.h"
#include "libavutil/lzo.h"
-#include "avfft.h"
-#include "fft.h"
+#include "dct.h"
+#include "rdft.h"
+#include "sinewin.h"
#define MAX_BLOCKS 8 ///< maximum number of blocks per frame
#define MAX_LSPS 16 ///< maximum filter order
@@ -558,7 +559,7 @@ static void calc_input_response(WMAVoiceContext *s, float *lpcs,
int n, idx;
/* Create frequency power spectrum of speech input (i.e. RDFT of LPCs) */
- ff_rdft_calc(&s->rdft, lpcs);
+ s->rdft.rdft_calc(&s->rdft, lpcs);
#define log_range(var, assign) do { \
float tmp = log10f(assign); var = tmp; \
max = FFMAX(max, tmp); min = FFMIN(min, tmp); \
@@ -601,8 +602,8 @@ static void calc_input_response(WMAVoiceContext *s, float *lpcs,
* is a sinus input) by doing a phase shift (in theory, H(sin())=cos()).
* Hilbert_Transform(RDFT(x)) = Laplace_Transform(x), which calculates the
* "moment" of the LPCs in this filter. */
- ff_dct_calc(&s->dct, lpcs);
- ff_dct_calc(&s->dst, lpcs);
+ s->dct.dct_calc(&s->dct, lpcs);
+ s->dst.dct_calc(&s->dst, lpcs);
/* Split out the coefficient indexes into phase/magnitude pairs */
idx = 255 + av_clip(lpcs[64], -255, 255);
@@ -623,7 +624,7 @@ static void calc_input_response(WMAVoiceContext *s, float *lpcs,
coeffs[1] = last_coeff;
/* move into real domain */
- ff_rdft_calc(&s->irdft, coeffs);
+ s->irdft.rdft_calc(&s->irdft, coeffs);
/* tilt correction and normalize scale */
memset(&coeffs[remainder], 0, sizeof(coeffs[0]) * (128 - remainder));
@@ -693,8 +694,8 @@ static void wiener_denoise(WMAVoiceContext *s, int fcb_type,
/* apply coefficients (in frequency spectrum domain), i.e. complex
* number multiplication */
memset(&synth_pf[size], 0, sizeof(synth_pf[0]) * (128 - size));
- ff_rdft_calc(&s->rdft, synth_pf);
- ff_rdft_calc(&s->rdft, coeffs);
+ s->rdft.rdft_calc(&s->rdft, synth_pf);
+ s->rdft.rdft_calc(&s->rdft, coeffs);
synth_pf[0] *= coeffs[0];
synth_pf[1] *= coeffs[1];
for (n = 1; n < 64; n++) {
@@ -702,7 +703,7 @@ static void wiener_denoise(WMAVoiceContext *s, int fcb_type,
synth_pf[n * 2] = v1 * coeffs[n * 2] - v2 * coeffs[n * 2 + 1];
synth_pf[n * 2 + 1] = v2 * coeffs[n * 2] + v1 * coeffs[n * 2 + 1];
}
- ff_rdft_calc(&s->irdft, synth_pf);
+ s->irdft.rdft_calc(&s->irdft, synth_pf);
}
/* merge filter output with the history of previous runs */