[MPlayer-dev-eng] [PATCH] SSE detection fix for NetBSD/amd64

Aurelien Jacobs aurel at gnuage.org
Mon Jan 10 02:00:13 CET 2005


On Sun, 9 Jan 2005 19:50:01 +0100
Reimar Döffinger <Reimar.Doeffinger at stud.uni-karlsruhe.de> wrote:

> Hi,
> On Sun, Jan 09, 2005 at 07:10:55PM +0100, Guillaume POIRIER wrote:
> > Le vendredi 07 janvier 2005 à 18:42 +0100, Aurelien Jacobs a écrit :
> > 
> > > I didn't found any way to test OS SSE support on x86-64.
> > > But AFAIK, there is no x86-64 OS which don't support SSE.
> > > I guess it's safe to assume SEE support on x86-64, whatever the OS is.
> > > So I propose the following patch, which should make everyone happy.
> > > 
> > > Anyone against it ?
> > 
> > I'm not. This patch does work well, and allows some faster code to be
> > enabled.
> > I posted a bench last Thursday on XviD mailling list to compare the
> > x86-64 version against IA-32.
> > 
> > Here are the new figures:
> > 
> > On x86-64 
> >   XviD Pure C | XviD Edouard SIMD | lavc + SIMD
> > Pass 1: 37fps | 78fps  SSE: 90fps | 82fps  SSE: 84fps
> > Pass 2: 11fps | 32fps  SSE: 36fps | 30fps  SSE: 30fps
> > 
> > Well, I'm quite puzzled why lavc doesn't get boosted by the activation
> > of SSE, but regarding XviD, when It's run with a SSE1|2-aware mencoder,
> > it gets a bonus 12%... not bad. Not bad at all!
> 
> That is because lavc uses cpudetection based in the code in
> libavcodec/i386/cputest.c.

AFAIR, there's not so much SSE optimisations in lavc. There are certainly
more functions which could benefits of SSE.

> No idea why there a different implementations of this, and why the OS is
> asked and doesn't just use the CPUID instruction (or is it e.g. possible for
> the kernel to disable SSE? or CPUID?)...

It seems that some older kernels didn't handled SSE registers saving at
context switch, thus breaking mplayer when running concurrently with another
SSE apps.
But such old kernel won't run on amd64, so I guess all amd64 kernels handle
SSE registers well.
I will commit soon if nobody complain and if this breaks on some kernel,
we will certainly discover it sooner or later.

Aurel




More information about the MPlayer-dev-eng mailing list