[MPlayer-dev-eng] RPMs for MPlayer-0.50
Eric Anholt
eanholt at gladstone.uoregon.edu
Fri Oct 19 01:05:04 CEST 2001
Did you even look at what I did? That's basically it, for the cases that
really mattered. I wish I had left more macros in the _tmp file for
fast_memcpy to be cleaner, but that could be fixed if necessary.
The only compile time option I had at the moment was to add/remove certain
cpu-specific optimizations, but I didn't make a total runtime cpu detection
removing option. How important is that for you?
Yes, it would be a repo-copy, followed by a checkin of the new files -- the
ones in the .tar.gz
On Thursday 18 October 2001 15:51, you wrote:
> Hi,
>
> > Okay, some changes came in after my cvs update, and I didn't update again
> > before the diff. I'll fix things up and get the new code changed over.
> > I see the macro/3dnow issues you were talking about, and I'm cleaning
> > that up.
>
> and, you should keep the option of cpu selection at compile time!
> (it was discussed earlier - using #ifdefs)
>
> when it's hard to separate code, it's better to change code to template,
> and include it many times with different cpu flags set and changing
> function name. good example is postprocessing code.
>
> for example:
>
> xxx.c:
>
> #ifdef RUNTIME_CPU_DETECT
>
> #define FUNC xxx_func_c
> #undef HAVE_MMX
> #undef HAVE_MMX2
> #undef HAVE_3DNOW
>
> #include "xxx_tmpl.h"
>
> #define FUNC xxx_func_mmx
> #define HAVE_MMX
> #undef HAVE_SSE
> #undef HAVE_3DNOW
>
> #include "xxx_tmpl.h"
>
> #define FUNC xxx_func_sse
> #define HAVE_MMX
> #define HAVE_SSE
> #undef HAVE_3DNOW
>
> #include "xxx_tmpl.h"
>
> #define FUNC xxx_func_3dnow
> #define HAVE_MMX
> #undef HAVE_SSE
> #define HAVE_3DNOW
>
> #include "xxx_tmpl.h"
>
> // define and set up function pointer to the right one depending on
> cpudetect ...
>
> #else
>
> #include "config.h"
> #define FUNC xxx_func
> #include "xxx_tmpl.h"
>
> #endif
>
> xxx_tmpl.h:
>
> int FUNC_NAME(int a,int b){
> ...
> #ifdef HAVE_3DNOW
> ...
> ...
> #endif
> ...
> ...
> }
>
> i'm sure it's the cleanest way to solve this.
> many projects uses it, for example MESA.
>
> note: if you gonna do it this way - it needs more that a patch.
> it may requires renaming files in the CVS to keep log history.
>
>
> A'rpi / Astral & ESP-team
--
Eric Anholt
eanholt at gladstone.uoregon.edu
More information about the MPlayer-dev-eng
mailing list