[gst-devel] Configuration
Wim Taymans
wim.taymans at tvd.be
Tue Feb 1 08:48:05 CET 2000
Richard Boulton wrote:
<snip>
>
> i) in several of the plugins dealing with mpeg decoding (in fact, they all
> look like the same piece of code, cut and pasted) there is a
> #undef HAVE_LIBMMX. Just wondering if these are still wanted, now that
> libmmx support can be configured out by ./configure --disable-libmmx
>
We need to clean this up. I would prefer one binary with MMX support
activated when the processor is capable. This is always good from the
distributers perspective.
I checked in a mmx.h, removing the dependency for libmmx. I think we
should rename HAVE_LIBMMX to something like USE_MMX or so.
Maybe we should set a global flag (or have a method) to query the
MMX capabilities of the CPU. All codecs could then set the pointers
to their different functions as needed.
We could have something like:
#ifdef USE_MMX
.. somefunction_MMX(...) {
}
#endif
#ifdef INTEL_i386
.. somefunction_i386(...) {
}
#endif
.. somefunction_C() {
}
init() {
if (get_cpu_capabilities() & CPU_MMX)
somefunction = somefunction_MMX;
else
somefunction = somefunction_C;
}
We could even have the different implementations in their own file. What do
you think?
Wim
--
Liar, n.:
A lawyer with a roving commission.
-- Ambrose Bierce, "The Devil's Dictionary"
More information about the gstreamer-devel
mailing list