From b57e38f52cc3f31a27105c28887d57cd6812c3eb Mon Sep 17 00:00:00 2001 From: Justin Ruggles Date: Wed, 28 Oct 2015 15:38:22 +0100 Subject: ac3dsp: x86: Replace inline asm for in-decoder downmixing with standalone asm Adds a wrapper function for downmixing which detects channel count changes and updates the selected downmix function accordingly. Simplification and porting to current x86inc infrastructure by Diego Biurrun. Signed-off-by: Diego Biurrun --- libavcodec/ac3dsp.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'libavcodec/ac3dsp.h') diff --git a/libavcodec/ac3dsp.h b/libavcodec/ac3dsp.h index cdce21a..c33a0be 100644 --- a/libavcodec/ac3dsp.h +++ b/libavcodec/ac3dsp.h @@ -126,8 +126,9 @@ typedef struct AC3DSPContext { void (*extract_exponents)(uint8_t *exp, int32_t *coef, int nb_coefs); - void (*downmix)(float **samples, float **matrix, int out_ch, - int in_ch, int len); + int out_channels; + int in_channels; + void (*downmix)(float **samples, float **matrix, int len); /** * Apply symmetric window in 16-bit fixed-point. @@ -148,4 +149,8 @@ void ff_ac3dsp_init (AC3DSPContext *c, int bit_exact); void ff_ac3dsp_init_arm(AC3DSPContext *c, int bit_exact); void ff_ac3dsp_init_x86(AC3DSPContext *c, int bit_exact); +void ff_ac3dsp_downmix(AC3DSPContext *c, float **samples, float **matrix, + int out_ch, int in_ch, int len); +void ff_ac3dsp_set_downmix_x86(AC3DSPContext *c); + #endif /* AVCODEC_AC3DSP_H */ -- cgit v1.1