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/celp_math.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'libavcodec/celp_math.h') diff --git a/libavcodec/celp_math.h b/libavcodec/celp_math.h index ec62a9ea09..16cc19ccd7 100644 --- a/libavcodec/celp_math.h +++ b/libavcodec/celp_math.h @@ -25,6 +25,25 @@ #include +typedef struct CELPMContext { + /** + * Return the dot product. + * @param a input data array + * @param b input data array + * @param length number of elements + * + * @return dot product = sum of elementwise products + */ + float (*dot_productf)(const float* a, const float* b, int length); + +}CELPMContext; + +/** + * Initialize CELPMContext. + */ +void ff_celp_math_init(CELPMContext *c); +void ff_celp_math_init_mips(CELPMContext *c); + /** * fixed-point implementation of cosine in [0; PI) domain. * @param arg fixed-point cosine argument, 0 <= arg < 0x4000 -- cgit v1.2.1