aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorMartin Storsjö <martin@martin.st>2014-07-04 18:21:50 +0300
committerReinhard Tartler <siretart@tauware.de>2014-07-27 10:14:33 -0400
commitb8e57113ecba5494d4bf47c29634392ea5fdb17b (patch)
treee172f7196ba56d6dd6bd7404183bc46dcb285919 /libavcodec
parent407912d17870a53e8a8cc072f192cadf358bc155 (diff)
downloadffmpeg-b8e57113ecba5494d4bf47c29634392ea5fdb17b.tar.gz
arm: Avoid using the 'setend' instruction on ARMv7 and newer
This instruction is deprecated on ARMv8, and it is serializing on some ARMv7 cores as well [1]. [1] http://article.gmane.org/gmane.linux.ports.arm.kernel/339293 CC: libav-stable@libav.org Signed-off-by: Martin Storsjö <martin@martin.st> (cherry picked from commit 79fce1ec8abd017593c003917fc123f7119a78d6) Signed-off-by: Reinhard Tartler <siretart@tauware.de>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/arm/h264dsp_init_arm.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/libavcodec/arm/h264dsp_init_arm.c b/libavcodec/arm/h264dsp_init_arm.c
index 92658e7fc2..f9712d8102 100644
--- a/libavcodec/arm/h264dsp_init_arm.c
+++ b/libavcodec/arm/h264dsp_init_arm.c
@@ -104,8 +104,12 @@ av_cold void ff_h264dsp_init_arm(H264DSPContext *c, const int bit_depth,
{
int cpu_flags = av_get_cpu_flags();
- if (have_armv6(cpu_flags))
+ if (have_armv6(cpu_flags) && !(have_vfpv3(cpu_flags) || have_neon(cpu_flags))) {
+ // This function uses the 'setend' instruction which is deprecated
+ // on ARMv8. This instruction is serializing on some ARMv7 cores as
+ // well. Therefore, only use the function on ARMv6.
c->h264_find_start_code_candidate = ff_h264_find_start_code_candidate_armv6;
+ }
if (have_neon(cpu_flags))
h264dsp_init_neon(c, bit_depth, chroma_format_idc);
}