diff options
Diffstat (limited to 'libavutil/arm')
-rw-r--r-- | libavutil/arm/asm.S | 8 | ||||
-rw-r--r-- | libavutil/arm/bswap.h | 12 | ||||
-rw-r--r-- | libavutil/arm/cpu.c | 17 | ||||
-rw-r--r-- | libavutil/arm/cpu.h | 15 | ||||
-rw-r--r-- | libavutil/arm/float_dsp_arm.h | 8 | ||||
-rw-r--r-- | libavutil/arm/float_dsp_init_arm.c | 8 | ||||
-rw-r--r-- | libavutil/arm/float_dsp_init_neon.c | 8 | ||||
-rw-r--r-- | libavutil/arm/float_dsp_init_vfp.c | 10 | ||||
-rw-r--r-- | libavutil/arm/float_dsp_neon.S | 8 | ||||
-rw-r--r-- | libavutil/arm/float_dsp_vfp.S | 8 | ||||
-rw-r--r-- | libavutil/arm/intmath.h | 16 | ||||
-rw-r--r-- | libavutil/arm/intreadwrite.h | 12 | ||||
-rw-r--r-- | libavutil/arm/neontest.h | 13 | ||||
-rw-r--r-- | libavutil/arm/timer.h | 8 |
14 files changed, 79 insertions, 72 deletions
diff --git a/libavutil/arm/asm.S b/libavutil/arm/asm.S index a791e80c57..7d33a64fac 100644 --- a/libavutil/arm/asm.S +++ b/libavutil/arm/asm.S @@ -1,20 +1,20 @@ /* * 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 */ diff --git a/libavutil/arm/bswap.h b/libavutil/arm/bswap.h index 8bc7d9a8f7..611ff0ad5b 100644 --- a/libavutil/arm/bswap.h +++ b/libavutil/arm/bswap.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 */ @@ -44,7 +44,7 @@ static av_always_inline av_const unsigned av_bswap16(unsigned x) } #endif -#if !AV_GCC_VERSION_AT_LEAST(4,5) +#if AV_GCC_VERSION_AT_MOST(4,4) #define av_bswap32 av_bswap32 static av_always_inline av_const uint32_t av_bswap32(uint32_t x) { @@ -60,7 +60,7 @@ static av_always_inline av_const uint32_t av_bswap32(uint32_t x) #endif /* HAVE_ARMV6_INLINE */ return x; } -#endif /* !AV_GCC_VERSION_AT_LEAST(4,5) */ +#endif /* AV_GCC_VERSION_AT_MOST(4,4) */ #endif /* __ARMCC_VERSION */ diff --git a/libavutil/arm/cpu.c b/libavutil/arm/cpu.c index 2effb72610..3889ef011c 100644 --- a/libavutil/arm/cpu.c +++ b/libavutil/arm/cpu.c @@ -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 */ @@ -128,6 +128,12 @@ int ff_get_cpu_flags_arm(void) trickle down. */ if (flags & (AV_CPU_FLAG_VFPV3 | AV_CPU_FLAG_NEON)) flags |= AV_CPU_FLAG_ARMV6T2; + else if (flags & (AV_CPU_FLAG_ARMV6T2 | AV_CPU_FLAG_ARMV6)) + /* Some functions use the 'setend' instruction which is deprecated on ARMv8 + * and serializing on some ARMv7 cores. This ensures such functions + * are only enabled on ARMv6. */ + flags |= AV_CPU_FLAG_SETEND; + if (flags & AV_CPU_FLAG_ARMV6T2) flags |= AV_CPU_FLAG_ARMV6; @@ -147,7 +153,8 @@ int ff_get_cpu_flags_arm(void) AV_CPU_FLAG_ARMV6T2 * HAVE_ARMV6T2 | AV_CPU_FLAG_VFP * HAVE_VFP | AV_CPU_FLAG_VFPV3 * HAVE_VFPV3 | - AV_CPU_FLAG_NEON * HAVE_NEON; + AV_CPU_FLAG_NEON * HAVE_NEON | + AV_CPU_FLAG_SETEND * !(HAVE_NEON | HAVE_VFPV3); } #endif diff --git a/libavutil/arm/cpu.h b/libavutil/arm/cpu.h index 127993e5dd..eb64ed5fcd 100644 --- a/libavutil/arm/cpu.h +++ b/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 */ @@ -29,16 +29,11 @@ #define have_vfp(flags) CPUEXT(flags, VFP) #define have_vfpv3(flags) CPUEXT(flags, VFPV3) #define have_neon(flags) CPUEXT(flags, NEON) +#define have_setend(flags) CPUEXT(flags, SETEND) /* some functions use the VFPv2 vector mode which is deprecated in ARMv7-A * and might trap on such CPU depending on the OS configuration */ #define have_vfp_vm(flags) \ (HAVE_VFP && ((flags) & AV_CPU_FLAG_VFP_VM)) -/* Some functions use the 'setend' instruction which is deprecated on ARMv8 - * and serializing on some ARMv7 cores. This macro ensures such functions - * are only enabled on ARMv6. */ -#define have_setend(flags) \ - (have_armv6(flags) && !(have_vfpv3(flags) || have_neon(flags))) - #endif /* AVUTIL_ARM_CPU_H */ diff --git a/libavutil/arm/float_dsp_arm.h b/libavutil/arm/float_dsp_arm.h index ec925ecf5c..fe311cc0d2 100644 --- a/libavutil/arm/float_dsp_arm.h +++ b/libavutil/arm/float_dsp_arm.h @@ -1,20 +1,20 @@ /* * Copyright (c) 2009 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 */ diff --git a/libavutil/arm/float_dsp_init_arm.c b/libavutil/arm/float_dsp_init_arm.c index ff0105c5c9..678762862e 100644 --- a/libavutil/arm/float_dsp_init_arm.c +++ b/libavutil/arm/float_dsp_init_arm.c @@ -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 */ diff --git a/libavutil/arm/float_dsp_init_neon.c b/libavutil/arm/float_dsp_init_neon.c index 617bf5d576..689aa77c7b 100644 --- a/libavutil/arm/float_dsp_init_neon.c +++ b/libavutil/arm/float_dsp_init_neon.c @@ -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 */ diff --git a/libavutil/arm/float_dsp_init_vfp.c b/libavutil/arm/float_dsp_init_vfp.c index 61ff2ed38e..e15abf3f54 100644 --- a/libavutil/arm/float_dsp_init_vfp.c +++ b/libavutil/arm/float_dsp_init_vfp.c @@ -1,20 +1,20 @@ /* * Copyright (c) 2008 Siarhei Siamashka <ssvb@users.sourceforge.net> * - * 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 */ @@ -32,7 +32,7 @@ void ff_vector_fmul_window_vfp(float *dst, const float *src0, void ff_vector_fmul_reverse_vfp(float *dst, const float *src0, const float *src1, int len); -void ff_butterflies_float_vfp(float *restrict v1, float *restrict v2, int len); +void ff_butterflies_float_vfp(float *av_restrict v1, float *av_restrict v2, int len); av_cold void ff_float_dsp_init_vfp(AVFloatDSPContext *fdsp, int cpu_flags) { diff --git a/libavutil/arm/float_dsp_neon.S b/libavutil/arm/float_dsp_neon.S index 559b565628..3823227608 100644 --- a/libavutil/arm/float_dsp_neon.S +++ b/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 */ diff --git a/libavutil/arm/float_dsp_vfp.S b/libavutil/arm/float_dsp_vfp.S index 9f920aae70..7db2452284 100644 --- a/libavutil/arm/float_dsp_vfp.S +++ b/libavutil/arm/float_dsp_vfp.S @@ -1,20 +1,20 @@ /* * Copyright (c) 2008 Siarhei Siamashka <ssvb@users.sourceforge.net> * - * 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 */ diff --git a/libavutil/arm/intmath.h b/libavutil/arm/intmath.h index 2b15ba0593..65e42c5733 100644 --- a/libavutil/arm/intmath.h +++ b/libavutil/arm/intmath.h @@ -1,20 +1,20 @@ /* * Copyright (c) 2010 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 */ @@ -31,9 +31,9 @@ #if HAVE_ARMV6_INLINE #define av_clip_uint8 av_clip_uint8_arm -static av_always_inline av_const unsigned av_clip_uint8_arm(int a) +static av_always_inline av_const int av_clip_uint8_arm(int a) { - unsigned x; + int x; __asm__ ("usat %0, #8, %1" : "=r"(x) : "r"(a)); return x; } @@ -47,9 +47,9 @@ static av_always_inline av_const int av_clip_int8_arm(int a) } #define av_clip_uint16 av_clip_uint16_arm -static av_always_inline av_const unsigned av_clip_uint16_arm(int a) +static av_always_inline av_const int av_clip_uint16_arm(int a) { - unsigned x; + int x; __asm__ ("usat %0, #16, %1" : "=r"(x) : "r"(a)); return x; } diff --git a/libavutil/arm/intreadwrite.h b/libavutil/arm/intreadwrite.h index 6eff7332fb..60fc860cbb 100644 --- a/libavutil/arm/intreadwrite.h +++ b/libavutil/arm/intreadwrite.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 */ @@ -23,14 +23,14 @@ #include "config.h" #include "libavutil/attributes.h" -#if HAVE_FAST_UNALIGNED && HAVE_INLINE_ASM && !AV_GCC_VERSION_AT_LEAST(4,7) +#if HAVE_FAST_UNALIGNED && HAVE_INLINE_ASM && AV_GCC_VERSION_AT_MOST(4,6) #define AV_RN16 AV_RN16 static av_always_inline unsigned AV_RN16(const void *p) { const uint8_t *q = p; unsigned v; -#if !AV_GCC_VERSION_AT_LEAST(4,6) +#if AV_GCC_VERSION_AT_MOST(4,5) __asm__ ("ldrh %0, %1" : "=r"(v) : "m"(*(const uint16_t *)q)); #elif defined __thumb__ __asm__ ("ldrh %0, %1" : "=r"(v) : "m"(q[0]), "m"(q[1])); diff --git a/libavutil/arm/neontest.h b/libavutil/arm/neontest.h index eb46df8e0b..d75ab8380b 100644 --- a/libavutil/arm/neontest.h +++ b/libavutil/arm/neontest.h @@ -3,23 +3,26 @@ * Copyright (c) 2008 Ramiro Polla <ramiro.polla@gmail.com> * Copyright (c) 2013 Martin Storsjo * - * 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 */ +#ifndef AVUTIL_ARM_NEONTEST_H +#define AVUTIL_ARM_NEONTEST_H + #include <inttypes.h> #include <stdint.h> #include <stdlib.h> @@ -60,3 +63,5 @@ int __real_ ## func; \ int __wrap_ ## func; \ int __wrap_ ## func + +#endif /* AVUTIL_ARM_NEONTEST_H */ diff --git a/libavutil/arm/timer.h b/libavutil/arm/timer.h index 4bca877d00..5e8bc8edd0 100644 --- a/libavutil/arm/timer.h +++ b/libavutil/arm/timer.h @@ -1,20 +1,20 @@ /* * Copyright (c) 2009 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 */ |