From 3827a86eacd04d9d7b356f769be553f7b8cca361 Mon Sep 17 00:00:00 2001 From: Nedeljko Babic Date: Mon, 4 Jun 2012 18:02:56 +0200 Subject: Optimization of AMR NB and WB decoders for MIPS AMR NB and WB decoders are optimized for MIPS architecture. Appropriate Makefiles are changed accordingly. Cnfigure script is changed in order to support optimizations. Optimizations are enabled by default when compiling is done for mips architecture. Appropriate cflags are automatically set. Support for several mips CPUs is added in configure script. New ffmpeg options are added for disabling optimizations. The FFMPEG option --disable-mipsfpu disables MIPS floating point optimizations. The FFMPEG option --disable-mips32r2 disables MIPS32R2 optimizations. The FFMPEG option --disable-mipsdspr1 disables MIPS DSP ASE R1 optimizations. The FFMPEG option --disable-mipsdspr2 disables MIPS DSP ASE R2 optimizations. Signed-off-by: Nedeljko Babic Reviewed-by: Vitor Sessak Signed-off-by: Michael Niedermayer --- libavcodec/acelp_filters.h | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) (limited to 'libavcodec/acelp_filters.h') diff --git a/libavcodec/acelp_filters.h b/libavcodec/acelp_filters.h index e807aed7b9..56197bcc18 100644 --- a/libavcodec/acelp_filters.h +++ b/libavcodec/acelp_filters.h @@ -25,6 +25,39 @@ #include +typedef struct ACELPFContext { + /** + * Floating point version of ff_acelp_interpolate() + */ + void (*acelp_interpolatef)(float *out, const float *in, + const float *filter_coeffs, int precision, + int frac_pos, int filter_length, int length); + + /** + * Apply an order 2 rational transfer function in-place. + * + * @param out output buffer for filtered speech samples + * @param in input buffer containing speech data (may be the same as out) + * @param zero_coeffs z^-1 and z^-2 coefficients of the numerator + * @param pole_coeffs z^-1 and z^-2 coefficients of the denominator + * @param gain scale factor for final output + * @param mem intermediate values used by filter (should be 0 initially) + * @param n number of samples (should be a multiple of eight) + */ + void (*acelp_apply_order_2_transfer_function)(float *out, const float *in, + const float zero_coeffs[2], + const float pole_coeffs[2], + float gain, + float mem[2], int n); + +}ACELPFContext; + +/** + * Initialize ACELPFContext. + */ +void ff_acelp_filter_init(ACELPFContext *c); +void ff_acelp_filter_init_mips(ACELPFContext *c); + /** * low-pass Finite Impulse Response filter coefficients. * -- cgit v1.2.3