diff options
author | Christophe Gisquet | 2014-02-06 00:41:54 +0000 |
---|---|---|
committer | Michael Niedermayer | 2014-02-08 02:04:12 +0100 |
commit | 45854df9a5220bdde400a447f63f61618b89dde2 (patch) | |
tree | 453b65fc1702cb7f4b554f892dc812228d08160a /libavcodec/dcadsp.c | |
parent | 82ae8a44e631b25ba3b2c1b7333a4fe5cf18dc07 (diff) |
dcadsp: split lfe_dir cases
The x86 runs short on registers because numerous elements are not static.
In addition, splitting them allows more optimized code, at least for x86.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/dcadsp.c')
-rw-r--r-- | libavcodec/dcadsp.c | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/libavcodec/dcadsp.c b/libavcodec/dcadsp.c index 87c9f90b7f..b14c4350ef 100644 --- a/libavcodec/dcadsp.c +++ b/libavcodec/dcadsp.c @@ -32,8 +32,9 @@ static void int8x8_fmul_int32_c(float *dst, const int8_t *src, int scale) dst[i] = src[i] * fscale; } -static void dca_lfe_fir_c(float *out, const float *in, const float *coefs, - int decifactor, float scale) +static inline void +dca_lfe_fir(float *out, const float *in, const float *coefs, + int decifactor, float scale) { float *out2 = out + decifactor; const float *cf0 = coefs; @@ -82,9 +83,22 @@ static void dca_qmf_32_subbands(float samples_in[32][8], int sb_act, } } +static void dca_lfe_fir0_c(float *out, const float *in, const float *coefs, + float scale) +{ + dca_lfe_fir(out, in, coefs, 32, scale); +} + +static void dca_lfe_fir1_c(float *out, const float *in, const float *coefs, + float scale) +{ + dca_lfe_fir(out, in, coefs, 64, scale); +} + av_cold void ff_dcadsp_init(DCADSPContext *s) { - s->lfe_fir = dca_lfe_fir_c; + s->lfe_fir[0] = dca_lfe_fir0_c; + s->lfe_fir[1] = dca_lfe_fir1_c; s->qmf_32_subbands = dca_qmf_32_subbands; s->int8x8_fmul_int32 = int8x8_fmul_int32_c; if (ARCH_ARM) ff_dcadsp_init_arm(s); |