On Mon, Jul 14, 2014 at 07:35:19PM +0100, Ben Avison wrote:
> --- a/libavcodec/arm/h264dsp_init_arm.c
> +++ b/libavcodec/arm/h264dsp_init_arm.c
> @@ -104,12 +103,8 @@ 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) && !(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_setend(cpu_flags))
> + c->startcode_find_candidate = ff_startcode_find_candidate_armv6;
> if (have_neon(cpu_flags))
> h264dsp_init_neon(c, bit_depth, chroma_format_idc);
> }
> --- a/libavutil/arm/cpu.h
> +++ b/libavutil/arm/cpu.h
> @@ -29,5 +29,9 @@
> #define have_vfp(flags) CPUEXT(flags, VFP)
> #define have_vfpv3(flags) CPUEXT(flags, VFPV3)
> #define have_neon(flags) CPUEXT(flags, NEON)
> +// Some functions use the 'setend' instruction which is deprecated
> +// on ARMv8. This instruction is serializing on some ARMv7 cores as
> +// well. Use this macro to ensure such functions are only used on ARMv6.
> +#define have_setend(flags) (have_armv6(flags) && !(have_vfpv3(flags) ||
> have_neon(flags)))
>
> #endif /* AVUTIL_ARM_CPU_H */
This should be a separate patch.
Janne or Martin, can one of you maybe extract and test this?
Diego
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel