Janne Grunau <[email protected]> writes:

> I'm not really sure if the deprecation of iwmmxt cpu flag is really
> necessary. Immediate removal is still binary compatible.

It does "break" source compatibility, but only in a configuration that
doesn't compile.  Simply removing it should be safe.

> ---8<---
> The were broken since August of 2010 without anyone noticing until
> three weeks ago. Nobody cares about it anymore and hopefully Marvell
> will support NEON like in the PXA978 from now on.
> ---
>  configure                                    |    5 -
>  libavcodec/arm/Makefile                      |    3 -
>  libavcodec/arm/dsputil_arm.h                 |    1 -
>  libavcodec/arm/dsputil_init_arm.c            |    1 -
>  libavcodec/arm/dsputil_iwmmxt.c              |  210 -----
>  libavcodec/arm/dsputil_iwmmxt_rnd_template.c | 1114 
> --------------------------
>  libavcodec/arm/mpegvideo_arm.c               |    7 -
>  libavcodec/arm/mpegvideo_arm.h               |    1 -
>  libavcodec/arm/mpegvideo_iwmmxt.c            |  101 ---
>  libavutil/arm/cpu.c                          |    2 +-
>  libavutil/avutil.h                           |    3 +
>  libavutil/cpu.c                              |    4 +-
>  libavutil/cpu.h                              |    4 +-
>  13 files changed, 10 insertions(+), 1446 deletions(-)
>  delete mode 100644 libavcodec/arm/dsputil_iwmmxt.c
>  delete mode 100644 libavcodec/arm/dsputil_iwmmxt_rnd_template.c
>  delete mode 100644 libavcodec/arm/mpegvideo_iwmmxt.c

Fine with me.

> diff --git a/libavutil/arm/cpu.c b/libavutil/arm/cpu.c
> index 835513e..f88f91d 100644
> --- a/libavutil/arm/cpu.c
> +++ b/libavutil/arm/cpu.c
> @@ -21,5 +21,5 @@
>
>  int ff_get_cpu_flags_arm(void)
>  {
> -    return HAVE_IWMMXT * AV_CPU_FLAG_IWMMXT;
> +    return 0;
>  }

There's no need to keep this function.

> diff --git a/libavutil/avutil.h b/libavutil/avutil.h
> index 21fc737..9b53431 100644
> --- a/libavutil/avutil.h
> +++ b/libavutil/avutil.h
> @@ -189,6 +189,9 @@
>  #ifndef FF_API_OLD_AVOPTIONS
>  #define FF_API_OLD_AVOPTIONS            (LIBAVUTIL_VERSION_MAJOR < 52)
>  #endif
> +#ifndef FF_API_IWMMXT
> +#define FF_API_IWMMXT                   (LIBAVUTIL_VERSION_MAJOR < 52)
> +#endif
>
>  /**
>   * @}
> diff --git a/libavutil/cpu.c b/libavutil/cpu.c
> index c44075b..d7cd4ec 100644
> --- a/libavutil/cpu.c
> +++ b/libavutil/cpu.c
> @@ -54,7 +54,9 @@ static const struct {
>      const char *name;
>  } cpu_flag_tab[] = {
>  #if   ARCH_ARM
> -    { AV_CPU_FLAG_IWMMXT,    "iwmmxt"     },
> +#if FF_API_IWMMXT
> +    { AV_CPU_FLAG_IWMMXT,    "unsupported"},
> +#endif

Pointless, just remove it.

>  #elif ARCH_PPC
>      { AV_CPU_FLAG_ALTIVEC,   "altivec"    },
>  #elif ARCH_X86
> diff --git a/libavutil/cpu.h b/libavutil/cpu.h
> index 361fe98..f12370b 100644
> --- a/libavutil/cpu.h
> +++ b/libavutil/cpu.h
> @@ -40,7 +40,9 @@
>  #define AV_CPU_FLAG_AVX          0x4000 ///< AVX functions: requires OS 
> support even if YMM registers aren't used
>  #define AV_CPU_FLAG_XOP          0x0400 ///< Bulldozer XOP functions
>  #define AV_CPU_FLAG_FMA4         0x0800 ///< Bulldozer FMA4 functions
> -#define AV_CPU_FLAG_IWMMXT       0x0100 ///< XScale IWMMXT
> +#if FF_API_IWMMXT
> +#define AV_CPU_FLAG_IWMMXT       0x0100 ///< XScale IWMMXT is unsupported
> +#endif
>  #define AV_CPU_FLAG_ALTIVEC      0x0001 ///< standard
>
>  /**
> -- 
> 1.7.8.5
>

-- 
Måns Rullgård
[email protected]
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to