[FFmpeg-devel] [PATCH 5/9] [ARMv6] Add VFP-accelerated version of imdct_half

Michael Niedermayer michaelni at gmx.at
Mon Jul 15 22:05:04 CEST 2013


On Mon, Jul 15, 2013 at 06:28:13PM +0100, Ben Avison wrote:
>                Before           After
>                Mean    StdDev   Mean    StdDev  Change
> This function   2653.0  28.5     1108.8  51.4   +139.3%
> Overall        17049.5 408.2    15973.0 223.2     +6.7%
> 
> Signed-off-by: Ben Avison <bavison at riscosopen.org>
> ---
>  libavcodec/arm/Makefile           |    1 +
>  libavcodec/arm/fft_init_arm.c     |    8 ++
>  libavcodec/arm/mdct_vfp.S         |  206 +++++++++++++++++++++++++++++++++++++
>  libavcodec/arm/synth_filter_vfp.S |    2 +-
>  4 files changed, 216 insertions(+), 1 deletions(-)
>  create mode 100644 libavcodec/arm/mdct_vfp.S
> 
> diff --git a/libavcodec/arm/Makefile b/libavcodec/arm/Makefile
> index 6c0ed71..ed94061 100644
> --- a/libavcodec/arm/Makefile
> +++ b/libavcodec/arm/Makefile
> @@ -53,6 +53,7 @@ ARMV6-OBJS-$(CONFIG_VP8_DECODER)       += arm/vp8_armv6.o               \
>                                            arm/vp8dsp_armv6.o
>  
>  VFP-OBJS-$(HAVE_ARMV6)                 += arm/fmtconvert_vfp.o          \
> +                                          arm/mdct_vfp.o                \
>                                            arm/synth_filter_vfp.o
>  
>  NEON-OBJS                              += arm/fmtconvert_neon.o
> diff --git a/libavcodec/arm/fft_init_arm.c b/libavcodec/arm/fft_init_arm.c
> index 44c811d..11e5061 100644
> --- a/libavcodec/arm/fft_init_arm.c
> +++ b/libavcodec/arm/fft_init_arm.c
> @@ -26,6 +26,8 @@
>  void ff_fft_permute_neon(FFTContext *s, FFTComplex *z);
>  void ff_fft_calc_neon(FFTContext *s, FFTComplex *z);
>  
> +void ff_imdct_half_vfp(FFTContext *s, FFTSample *output, const FFTSample *input);
> +
>  void ff_imdct_calc_neon(FFTContext *s, FFTSample *output, const FFTSample *input);
>  void ff_imdct_half_neon(FFTContext *s, FFTSample *output, const FFTSample *input);
>  void ff_mdct_calc_neon(FFTContext *s, FFTSample *output, const FFTSample *input);
> @@ -48,6 +50,12 @@ av_cold void ff_fft_init_arm(FFTContext *s)
>  {
>      int cpu_flags = av_get_cpu_flags();
>  
> +    if (have_vfp(cpu_flags)) {
> +#if CONFIG_MDCT
> +        s->imdct_half   = ff_imdct_half_vfp;
> +#endif
> +    }
> +
>      if (have_neon(cpu_flags)) {
>  #if CONFIG_FFT
>          s->fft_permute  = ff_fft_permute_neon;
> diff --git a/libavcodec/arm/mdct_vfp.S b/libavcodec/arm/mdct_vfp.S
> new file mode 100644
> index 0000000..d1ea544

> --- /dev/null
> +++ b/libavcodec/arm/mdct_vfp.S

fails to build:

libavcodec/arm/mdct_vfp.S:154:(.text+0x8): relocation truncated to fit: R_ARM_THM_JUMP19 against symbol `ff_imdct_half_c' defined in .text section in libavcodec/libavcodec.a(mdct_float.o)
collect2: ld returned 1 exit status
make: *** [ffserver_g] Error 1
make: *** Waiting for unfinished jobs....
libavcodec/libavcodec.a(mdct_vfp.o): In function `ff_imdct_half_vfp':
libavcodec/arm/mdct_vfp.S:154:(.text+0x8): relocation truncated to fit: R_ARM_THM_JUMP19 against symbol `ff_imdct_half_c' defined in .text section in libavcodec/libavcodec.a(mdct_float.o)
collect2: ld returned 1 exit status
make: libavcodec/*** [ffprobe_g] Error 1libavcodec.a(mdct_vfp.o
): In function `ff_imdct_half_vfp':
libavcodec/arm/mdct_vfp.S:154:(.text+0x8): relocation truncated to fit: R_ARM_THM_JUMP19 against symbol `ff_imdct_half_c' defined in .text section in libavcodec/libavcodec.a(mdct_float.o)


[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

You can kill me, but you cannot change the truth.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20130715/6249c4a0/attachment.asc>


More information about the ffmpeg-devel mailing list