On 2014-07-08 10:58:10 +0300, Martin Storsjö wrote: > This instruction is deprecated on ARMv8, and it is serializing on > some ARMv7 cores as well [1]. > > http://article.gmane.org/gmane.linux.ports.arm.kernel/339293 > --- > libavcodec/arm/h264dsp_init_arm.c | 7 ++++++- > 1 file changed, 6 insertions(+), 1 deletion(-) > > diff --git a/libavcodec/arm/h264dsp_init_arm.c > b/libavcodec/arm/h264dsp_init_arm.c > index 92658e7..a7f64c8 100644 > --- a/libavcodec/arm/h264dsp_init_arm.c > +++ b/libavcodec/arm/h264dsp_init_arm.c > @@ -104,8 +104,13 @@ 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))) {
in practice probably good enough although testing the architecture version directly would be nicer. > + // 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 where it was designed to > + // actually give any benefit, on ARMv6. I would drop the "where.*benefit, ". Even when SETEND is serialisizing switching the cpu into big endian while parsing big endian data should be faster as long there is enough data to parse. > 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); > } ok with the commnt changed Janne _______________________________________________ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel