[FFmpeg-devel] Fix VP3 IDCT on Win64

Michael Niedermayer michaelni
Thu Aug 26 22:50:52 CEST 2010

On Thu, Aug 26, 2010 at 08:44:06PM +0200, Reimar D?ffinger wrote:
> On Thu, Aug 26, 2010 at 11:05:30AM +0000, Loren Merritt wrote:
> > On Thu, 26 Aug 2010, Reimar D?ffinger wrote:
> > >On Wed, Aug 25, 2010 at 08:43:25PM -0400, Ronald S. Bultje wrote:
> > >>
> > >>Those will stay inline of course. If an issue arises where we really
> > >>need multiple (>6) XMM registers in inline functions (which I can
> > >>honestly not imagine), then we'll think about a solution then and
> > >>there.
> > >
> > >The solution is easy: only add the clobbers for compilers where they
> > >are supported (I assume this was the issue on Win32/BSD? You never
> > >said _what_ the problem was). This can be tested in configure.
> > >And you'll have to specify the clobbers for inline functions even
> > >for a single XMM register and even for Linux, it's just unreasonable
> > >to hope that the compiler will never place some float stuff in a
> > >bad location, particularly with global optimization enabled.
> > 
> > Do you plan to add an emms at the end of every mmx function?
> I think you should have no problem to come up with reasons why
> this is not comparable.
> But just in case
> - "fixing" emms usage necessarily has a performance impact,
>   correct clobbers should not

emms usage is correct and also in line with how others do it and how both
intel and amd recommand it

> - on most recent CPUs and on x86 in general, --disable-mmx
>   should "fix" the emms issue without too much of a performance
>   issue by just using SSE


> - it is much less likely to be an issue since (most?) compilers
>   do not use MMX instructions and very rarely keep values stored
>   in the FPU (in contrast to SSE where they do both, even more so
>   on Win64).

we dont mix float and mmx code without emms
and before you start, we dont support compilers that create float asm out of
integer C and noone else (kernel comes to mind) will support such compiler


Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Freedom in capitalist society always remains about the same as it was in
ancient Greek republics: Freedom for slave owners. -- Vladimir Lenin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100826/a14423a7/attachment.pgp>

More information about the ffmpeg-devel mailing list