summaryrefslogtreecommitdiff
path: root/libavutil/arm/cpu.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavutil/arm/cpu.c')
-rw-r--r--libavutil/arm/cpu.c17
1 files changed, 12 insertions, 5 deletions
diff --git a/libavutil/arm/cpu.c b/libavutil/arm/cpu.c
index 8bdaa88469..f1683e8d76 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
+ /* 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;
@@ -143,7 +149,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