Zdenek Kabelac <[EMAIL PROTECTED]> writes:

Now my needs/suggestions ;)

> > global:
> > - CPU detection
> surely 
portable CPU detection (not only x86 family)

> > video:
> > - YUV<->RGB conversion stuff (YV12-> any bpp, YV12->YUY2, YUY2->YV12,
> >   any bpp -> any bpp, especially 15->16, 24->32, and 24/32 bpp -> YUY2,YV12)
> > - software scaling routines (YV12,YUY2,RGB)
> > - stride copy  (copy same bpp image but stride is different)
> > - image blitting (like Nick's fastmemcpy)
> 
And provide C/C++ version of every optimized functions (to allow
compilation on all cpu architectures).

>  but I think almost
> everyone has CPU with at least MMX support so I wouldn't see this
> as huge problem.
I know that you have dual Celeron but please try to think about other
architectures when you are designing something for avifile :)

More generic library name will be nicer, too (maybe similar to Sun
libmedia -> ,,libmmedia''?).

I've started changing avifile to get one portable library with all
optimized versions of some functions. My idea is to have every
function in separate file so on Makefile.am level using conditional
automake macros (depending on current architecture) we can choose what
version of file we want to compile in (C, asm with runtime detection
of mmx,sse etc)

We can have files:
   generic_zoom_32_bpp.cpp      (plain C/C++)
      i386_zoom_32_bpp.cpp      (asm without MMX, SSE etc)
  i386_opt_zoom_32_bpp.cpp      (asm with runtime detection of MMX...)
     alpha_zoom_32_bpp.cpp      (alpha asm)
 alpha_opt_zoom_32_bpp.cpp      (afaik some alphas have multimedia
                                 extensions as x86 has MMX)
     generic_v555to565.cpp
        i386_v555to565.cpp
    i386_opt_v555to565.cpp

etc... and link what versions we really want.

If every function will be avilable in plain C/C++ and CPU detection
stuff will be portable then whole avifile will be quite portable :-)

There is one problem with conditional compilation in automake - it
doesn't support ,,else if'' which sucks :/ But you can use:
if BLABLA
...
else
if OTHER_BLABLA
else
if ONE_MORE_OTHER_BLABLA
else
endif
endif
endif

it's ugly but works for me.

 glibc has very nice support for different architectures
(sysdeps/generic, sysdeps/arm, sysdeps/alpha, sysdeps/i386 etc) but it
doesn't use automake ;(

Anyway now important thing is to think about portability when
designing some parts of avifile.

>  Zdenek Kabelac  http://i.am/kabi/ kabi@{i.am, debian.org, fi.muni.cz}
>           Resistance is futile. You all will be packaged

ps. CPU detection can be taken from rpm (rpm contains detection for
few processors (x86, asm, sparc etc)).

-- 
 Arkadiusz Miśkiewicz, AM2-6BONE, 1024/3DB19BBD
 IPv6 ready PLD Linux at http://www.pld.org.pl/
My jsme Borg. Odpor je marný, budete asimilováni

_______________________________________________
Avifile mailing list
[EMAIL PROTECTED]
http://prak.org/mailman/listinfo/avifile

Reply via email to