[FFmpeg-devel] [PATCH] Assign unique values to AV_CPU_FLAG_IWMMXT and AV_CPU_FLAG_ALTIVEC.

Ronald S. Bultje rsbultje
Mon Sep 6 03:51:57 CEST 2010


Hi,

On Sun, Sep 5, 2010 at 8:04 PM, Stefano Sabatini
<stefano.sabatini-lala at poste.it> wrote:
> ---
> ?libavutil/cpu.h | ? ?4 ++--
> ?1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/libavutil/cpu.h b/libavutil/cpu.h
> index 644df3e..7ec52c8 100644
> --- a/libavutil/cpu.h
> +++ b/libavutil/cpu.h
> @@ -38,7 +38,7 @@
> ?#define AV_CPU_FLAG_SSSE3 ? ? ? ?0x0080 ///< Conroe SSSE3 functions
> ?#define AV_CPU_FLAG_SSE4 ? ? ? ? 0x0100 ///< Penryn SSE4.1 functions
> ?#define AV_CPU_FLAG_SSE42 ? ? ? ?0x0200 ///< Nehalem SSE4.2 functions
> -#define AV_CPU_FLAG_IWMMXT ? ? ? 0x0100 ///< XScale IWMMXT
> -#define AV_CPU_FLAG_ALTIVEC ? ? ?0x0001 ///< standard
> +#define AV_CPU_FLAG_IWMMXT ? ? ? 0x0400 ///< XScale IWMMXT
> +#define AV_CPU_FLAG_ALTIVEC ? ? ?0x0800 ///< Altivec

I don't think this is a good idea, as previously said.

Every use of AV_CPU_FLAG_ALTIVEC currently is, and should be, under
HAVE_ALTIVEC and every use of AV_CPU_FLAG_SSE*/MMX*/3DNOW/etc should
be under HAVE_MMX, since these are all exclusive. A real-life CPU will
never support both altivec and SSSE3.

Since this doesn't solve a problem and actually adds a problem of
having only 32 flags for all CPU extensions out there on all archs,
which is rather limiting given the amount of new extensions Intel and
Arm come up with every few months. Therefore, I'd rather not see this
committed.

Ronald



More information about the ffmpeg-devel mailing list