[FFmpeg-devel] [PATCH 1/5] add AV_CPU_FLAG_BFIN for libswscale

Michael Niedermayer michaelni
Tue Sep 28 02:24:21 CEST 2010


On Tue, Sep 28, 2010 at 01:46:18AM +0200, Janne Grunau wrote:
> On Tue, Sep 28, 2010 at 12:17:10AM +0100, M?ns Rullg?rd wrote:
> > Janne Grunau <janne-ffmpeg at jannau.net> writes:
> > 
> > > ---
> > >  libavutil/cpu.c |    1 +
> > >  libavutil/cpu.h |    1 +
> > >  2 files changed, 2 insertions(+), 0 deletions(-)
> > >
> > > diff --git a/libavutil/cpu.c b/libavutil/cpu.c
> > > index 1548530..12c230d 100644
> > > --- a/libavutil/cpu.c
> > > +++ b/libavutil/cpu.c
> > > @@ -27,6 +27,7 @@ int av_get_cpu_flags(void)
> > >          return flags;
> > >
> > >      if (ARCH_ARM) flags = ff_get_cpu_flags_arm();
> > > +    if (ARCH_BFIN) flags = AV_CPU_FLAG_BFIN;
> > >      if (ARCH_PPC) flags = ff_get_cpu_flags_ppc();
> > >      if (ARCH_X86) flags = ff_get_cpu_flags_x86();
> > >
> > > diff --git a/libavutil/cpu.h b/libavutil/cpu.h
> > > index 71cc265..6412a54 100644
> > > --- a/libavutil/cpu.h
> > > +++ b/libavutil/cpu.h
> > > @@ -38,6 +38,7 @@
> > >  #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_BFIN         0x0001
> > 
> > What is the point of this?  Blackfin is not optional on Blackfin any
> > more than x86 is optional on such CPUs.
> 
> The difference is that there is no x86 optimized code but libswscale
> has Blackfin optimized code/asm.
> libswscale seems to use the SWS_CPU_CAPS more as runtime selectable
> algorithm switches. The only minor advantage I see with this approach is
> runtime switching between general C code and Blackfin specific code.
> 
> It is unfortunately necessary for preserving behaviour when using the old
> interface.

as far as iam concerened iam ok with this then

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

I do not agree with what you have to say, but I'll defend to the death your
right to say it. -- Voltaire
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100928/84f83cd1/attachment.pgp>



More information about the ffmpeg-devel mailing list