diff options
Diffstat (limited to 'ffmpeg/libavutil/arm')
| -rw-r--r-- | ffmpeg/libavutil/arm/asm.S | 2 | ||||
| -rw-r--r-- | ffmpeg/libavutil/arm/cpu.c | 9 | ||||
| -rw-r--r-- | ffmpeg/libavutil/arm/cpu.h | 23 | ||||
| -rw-r--r-- | ffmpeg/libavutil/arm/float_dsp_arm.h | 2 | ||||
| -rw-r--r-- | ffmpeg/libavutil/arm/float_dsp_init_arm.c | 5 | ||||
| -rw-r--r-- | ffmpeg/libavutil/arm/float_dsp_init_neon.c | 11 | ||||
| -rw-r--r-- | ffmpeg/libavutil/arm/float_dsp_init_vfp.c | 5 | ||||
| -rw-r--r-- | ffmpeg/libavutil/arm/float_dsp_neon.S | 8 |
8 files changed, 34 insertions, 31 deletions
diff --git a/ffmpeg/libavutil/arm/asm.S b/ffmpeg/libavutil/arm/asm.S index 6061e47..9cdcce9 100644 --- a/ffmpeg/libavutil/arm/asm.S +++ b/ffmpeg/libavutil/arm/asm.S @@ -291,7 +291,7 @@ T sub \rn, \rn, \rm .endm #if HAVE_VFP_ARGS - .eabi_attribute 28, 1 +ELF .eabi_attribute 28, 1 # define VFP # define NOVFP @ #else diff --git a/ffmpeg/libavutil/arm/cpu.c b/ffmpeg/libavutil/arm/cpu.c index b4aabc3..3f7674b 100644 --- a/ffmpeg/libavutil/arm/cpu.c +++ b/ffmpeg/libavutil/arm/cpu.c @@ -1,22 +1,23 @@ /* - * This file is part of Libav. + * This file is part of FFmpeg. * - * Libav is free software; you can redistribute it and/or + * FFmpeg is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * - * Libav is distributed in the hope that it will be useful, + * FFmpeg is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with Libav; if not, write to the Free Software + * License along with FFmpeg; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #include "libavutil/cpu.h" +#include "libavutil/cpu_internal.h" #include "config.h" #define CORE_FLAG(f) \ diff --git a/ffmpeg/libavutil/arm/cpu.h b/ffmpeg/libavutil/arm/cpu.h index 91c959a..c545589 100644 --- a/ffmpeg/libavutil/arm/cpu.h +++ b/ffmpeg/libavutil/arm/cpu.h @@ -1,18 +1,18 @@ /* - * This file is part of Libav. + * This file is part of FFmpeg. * - * Libav is free software; you can redistribute it and/or + * FFmpeg is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * - * Libav is distributed in the hope that it will be useful, + * FFmpeg is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with Libav; if not, write to the Free Software + * License along with FFmpeg; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ @@ -21,12 +21,13 @@ #include "config.h" #include "libavutil/cpu.h" +#include "libavutil/cpu_internal.h" -#define have_armv5te(flags) (HAVE_ARMV5TE && ((flags) & AV_CPU_FLAG_ARMV5TE)) -#define have_armv6(flags) (HAVE_ARMV6 && ((flags) & AV_CPU_FLAG_ARMV6)) -#define have_armv6t2(flags) (HAVE_ARMV6T2 && ((flags) & AV_CPU_FLAG_ARMV6T2)) -#define have_vfp(flags) (HAVE_VFP && ((flags) & AV_CPU_FLAG_VFP)) -#define have_vfpv3(flags) (HAVE_VFPV3 && ((flags) & AV_CPU_FLAG_VFPV3)) -#define have_neon(flags) (HAVE_NEON && ((flags) & AV_CPU_FLAG_NEON)) +#define have_armv5te(flags) CPUEXT(flags, ARMV5TE) +#define have_armv6(flags) CPUEXT(flags, ARMV6) +#define have_armv6t2(flags) CPUEXT(flags, ARMV6T2) +#define have_vfp(flags) CPUEXT(flags, VFP) +#define have_vfpv3(flags) CPUEXT(flags, VFPV3) +#define have_neon(flags) CPUEXT(flags, NEON) -#endif +#endif /* AVUTIL_ARM_CPU_H */ diff --git a/ffmpeg/libavutil/arm/float_dsp_arm.h b/ffmpeg/libavutil/arm/float_dsp_arm.h index f3fafe3..fe311cc 100644 --- a/ffmpeg/libavutil/arm/float_dsp_arm.h +++ b/ffmpeg/libavutil/arm/float_dsp_arm.h @@ -23,7 +23,7 @@ #include "libavutil/float_dsp.h" -void ff_float_dsp_init_vfp (AVFloatDSPContext *fdsp); +void ff_float_dsp_init_vfp(AVFloatDSPContext *fdsp, int cpu_flags); void ff_float_dsp_init_neon(AVFloatDSPContext *fdsp); #endif /* AVUTIL_ARM_FLOAT_DSP_ARM_H */ diff --git a/ffmpeg/libavutil/arm/float_dsp_init_arm.c b/ffmpeg/libavutil/arm/float_dsp_init_arm.c index f721344..38148b3 100644 --- a/ffmpeg/libavutil/arm/float_dsp_init_arm.c +++ b/ffmpeg/libavutil/arm/float_dsp_init_arm.c @@ -18,16 +18,17 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ +#include "libavutil/attributes.h" #include "libavutil/float_dsp.h" #include "cpu.h" #include "float_dsp_arm.h" -void ff_float_dsp_init_arm(AVFloatDSPContext *fdsp) +av_cold void ff_float_dsp_init_arm(AVFloatDSPContext *fdsp) { int cpu_flags = av_get_cpu_flags(); if (have_vfp(cpu_flags)) - ff_float_dsp_init_vfp(fdsp); + ff_float_dsp_init_vfp(fdsp, cpu_flags); if (have_neon(cpu_flags)) ff_float_dsp_init_neon(fdsp); } diff --git a/ffmpeg/libavutil/arm/float_dsp_init_neon.c b/ffmpeg/libavutil/arm/float_dsp_init_neon.c index a7245ad..689aa77 100644 --- a/ffmpeg/libavutil/arm/float_dsp_init_neon.c +++ b/ffmpeg/libavutil/arm/float_dsp_init_neon.c @@ -2,25 +2,26 @@ * ARM NEON optimised Float DSP functions * Copyright (c) 2008 Mans Rullgard <mans@mansr.com> * - * This file is part of Libav. + * This file is part of FFmpeg. * - * Libav is free software; you can redistribute it and/or + * FFmpeg is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * - * Libav is distributed in the hope that it will be useful, + * FFmpeg is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with Libav; if not, write to the Free Software + * License along with FFmpeg; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #include <stdint.h> +#include "libavutil/attributes.h" #include "libavutil/float_dsp.h" #include "float_dsp_arm.h" @@ -45,7 +46,7 @@ void ff_butterflies_float_neon(float *v1, float *v2, int len); float ff_scalarproduct_float_neon(const float *v1, const float *v2, int len); -void ff_float_dsp_init_neon(AVFloatDSPContext *fdsp) +av_cold void ff_float_dsp_init_neon(AVFloatDSPContext *fdsp) { fdsp->vector_fmul = ff_vector_fmul_neon; fdsp->vector_fmac_scalar = ff_vector_fmac_scalar_neon; diff --git a/ffmpeg/libavutil/arm/float_dsp_init_vfp.c b/ffmpeg/libavutil/arm/float_dsp_init_vfp.c index f7e2f54..1fe52ab 100644 --- a/ffmpeg/libavutil/arm/float_dsp_init_vfp.c +++ b/ffmpeg/libavutil/arm/float_dsp_init_vfp.c @@ -18,6 +18,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ +#include "libavutil/attributes.h" #include "libavutil/float_dsp.h" #include "cpu.h" #include "float_dsp_arm.h" @@ -28,10 +29,8 @@ void ff_vector_fmul_vfp(float *dst, const float *src0, const float *src1, void ff_vector_fmul_reverse_vfp(float *dst, const float *src0, const float *src1, int len); -void ff_float_dsp_init_vfp(AVFloatDSPContext *fdsp) +av_cold void ff_float_dsp_init_vfp(AVFloatDSPContext *fdsp, int cpu_flags) { - int cpu_flags = av_get_cpu_flags(); - if (!have_vfpv3(cpu_flags)) fdsp->vector_fmul = ff_vector_fmul_vfp; fdsp->vector_fmul_reverse = ff_vector_fmul_reverse_vfp; diff --git a/ffmpeg/libavutil/arm/float_dsp_neon.S b/ffmpeg/libavutil/arm/float_dsp_neon.S index 559b565..3823227 100644 --- a/ffmpeg/libavutil/arm/float_dsp_neon.S +++ b/ffmpeg/libavutil/arm/float_dsp_neon.S @@ -2,20 +2,20 @@ * ARM NEON optimised Float DSP functions * Copyright (c) 2008 Mans Rullgard <mans@mansr.com> * - * This file is part of Libav. + * This file is part of FFmpeg. * - * Libav is free software; you can redistribute it and/or + * FFmpeg is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * - * Libav is distributed in the hope that it will be useful, + * FFmpeg is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with Libav; if not, write to the Free Software + * License along with FFmpeg; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ |
