diff options
author | Ben Avison <bavison@riscosopen.org> | 2013-07-15 18:28:10 +0100 |
---|---|---|
committer | Martin Storsjö <martin@martin.st> | 2013-07-22 10:15:30 +0300 |
commit | ce9ed10ac27b9cf32a6257e083ea2f052692d971 (patch) | |
tree | 8162b562d4dd904d26cde28cd62ea3fa22d07537 /libavcodec/arm/fmtconvert_init_arm.c | |
parent | 41ef1d360bac65032aa32f6b43ae137666507ae5 (diff) | |
download | ffmpeg-ce9ed10ac27b9cf32a6257e083ea2f052692d971.tar.gz |
arm: Add VFP-accelerated version of int32_to_float_fmul_scalar
Before After
Mean StdDev Mean StdDev Change
This function 1175.0 4.4 366.2 18.3 +220.8%
Overall 19285.5 292.0 18420.5 489.1 +4.7%
Signed-off-by: Martin Storsjö <martin@martin.st>
Diffstat (limited to 'libavcodec/arm/fmtconvert_init_arm.c')
-rw-r--r-- | libavcodec/arm/fmtconvert_init_arm.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/libavcodec/arm/fmtconvert_init_arm.c b/libavcodec/arm/fmtconvert_init_arm.c index 4f36729b00..9aab7bbac7 100644 --- a/libavcodec/arm/fmtconvert_init_arm.c +++ b/libavcodec/arm/fmtconvert_init_arm.c @@ -28,6 +28,9 @@ void ff_int32_to_float_fmul_scalar_neon(float *dst, const int32_t *src, float mul, int len); +void ff_int32_to_float_fmul_scalar_vfp(float *dst, const int32_t *src, + float mul, int len); + void ff_float_to_int16_neon(int16_t *dst, const float *src, long len); void ff_float_to_int16_interleave_neon(int16_t *, const float **, long, int); @@ -38,6 +41,13 @@ av_cold void ff_fmt_convert_init_arm(FmtConvertContext *c, AVCodecContext *avctx int cpu_flags = av_get_cpu_flags(); if (have_vfp(cpu_flags) && have_armv6(cpu_flags)) { + if (!have_vfpv3(cpu_flags)) { + // This function doesn't use anything armv6 specific in itself, + // but ff_float_to_int16_vfp which is in the same assembly source + // file does, thus the whole file requires armv6 to be built. + c->int32_to_float_fmul_scalar = ff_int32_to_float_fmul_scalar_vfp; + } + c->float_to_int16 = ff_float_to_int16_vfp; } |