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

Stefano Sabatini stefano.sabatini-lala
Wed Sep 8 11:56:30 CEST 2010


On date Sunday 2010-09-05 21:51:57 -0400, Ronald S. Bultje encoded:
> 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.

I don't have a strong opinion so I can easily drop this patch, but
having the same flag with different meanings is intrinsically messy,
and I remember an user complaining about that for some reason.

Regards.
-- 
FFmpeg = Foolish and Friendly Magical Purposeless Erroneous Governor



More information about the ffmpeg-devel mailing list