[FFmpeg-devel] [RFC] cpu specific implementation of libavutil functions

Nigel Pearson nigel
Mon Sep 10 02:35:39 CEST 2007


> 2. do we even have a working altivec detection routine?


1) MythTV uses the one in libavcodec/ppc/dsputil_altivec.c
which seems to work correctly on Darwin.


2) We use something like this:
% cat libmythtv/yuv2rgb.cpp
...
#ifdef HAVE_ALTIVEC
static void altivec_yuv420_2vuy (...
#endif
...
yuv2vuy_fun get_yuv2vuy_conv(void)
{
#ifdef HAVE_ALTIVEC
     if (has_altivec())
         return altivec_yuv420_2vuy;
#endif

#ifdef MMX
     return mmx_yuv420_2vuy;
#endif

     return non_vec_yuv420_2vuy; /* Fallback to C */
}
^C


3) I think having _just_ compile-time detection
would be a big step backwards for packagers.




More information about the ffmpeg-devel mailing list