Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristophe Gisquet <christophe.gisquet@gmail.com>2012-05-11 13:17:36 +0400
committerMichael Niedermayer <michaelni@gmx.at>2014-02-08 03:55:42 +0400
commit481a46a462ca762600ee4ad4c3b1e93d21b1fa35 (patch)
treef81182d2736a1ae14a14b83eb35b70541d344509 /libavcodec/dcadec.c
parenta7574a36afa1ccf5b170e4e827050710bd280899 (diff)
dcadsp: add int8x8_fmul_int32 to DSP context
It is currently declared as a macro who is set to inlinable functions, among which a Neon and a default C implementations. Add a DSP parameter to each inline function, unused except by the default C implementation which calls a function from the DSP context. On an Arrandale CPU, gain for an inlined SSE2 function vs. a call: - Win32: 29 to 26 cycles - Win64: 25 to 23 cycles Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/dcadec.c')
-rw-r--r--libavcodec/dcadec.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/libavcodec/dcadec.c b/libavcodec/dcadec.c
index 9f7ee54bd4..969e1f2341 100644
--- a/libavcodec/dcadec.c
+++ b/libavcodec/dcadec.c
@@ -1247,12 +1247,10 @@ static const uint8_t abits_sizes[7] = { 7, 10, 12, 13, 15, 17, 19 };
static const uint8_t abits_levels[7] = { 3, 5, 7, 9, 13, 17, 25 };
#ifndef int8x8_fmul_int32
-static inline void int8x8_fmul_int32(float *dst, const int8_t *src, int scale)
+static inline void int8x8_fmul_int32(DCADSPContext *dsp, float *dst,
+ const int8_t *src, int scale)
{
- float fscale = scale / 16.0;
- int i;
- for (i = 0; i < 8; i++)
- dst[i] = src[i] * fscale;
+ dsp->int8x8_fmul_int32(dst, src, scale);
}
#endif
@@ -1380,7 +1378,7 @@ static int dca_subsubframe(DCAContext *s, int base_channel, int block_index)
s->debug_flag |= 0x01;
}
- int8x8_fmul_int32(subband_samples[k][l],
+ int8x8_fmul_int32(&s->dcadsp, subband_samples[k][l],
&high_freq_vq[hfvq][subsubframe * 8],
s->scale_factor[k][l][0]);
}