Re[2]: [XviD-devel] inlined SAD

Michael Militzer xvid-devel@xvid.org
Tue, 3 Sep 2002 17:02:09 +0200


Hi,

----- Original Message -----
From: "Radoslaw Czyz" <syskin@bigpond.com>
To: <xvid-devel@xvid.org>
Sent: Wednesday, September 04, 2002 9:11 AM
Subject: Re[2]: [XviD-devel] inlined SAD


> > yes, I have inlined versions of all assembler functions (VC++ inlined),
but
> > not the latest versions. However it doesn't make a difference for sad
> > because there weren't important changes for months...
>
> Hi. Thanks for that. I just have a question. Can I do the following:
>
> #ifdef WIN32
> // inlined assembler version
> #else
> // use nasm assembler
> #endif
>
> ?
> That would make it compilable in gcc, right? I saw a similar code in
> current xvid somewhere... Just wanted to make sure.

hm, it's not that easy. We have included asm code which needs to be inlined
into portab.h, but then it looks like this:

#ifdef WIN32
// VC++ inlined assembler version
#else
// gcc/gas inlined assembler version
#endif

Also we'll run into problems with our function pointers: function pointers
can of course not be used anymore if the code is inlined, so we'd need to do
release special XVID binaries for every cpu type... Moreover, as you've
noticed already, inlined asm code makes the code hard to port between
different c compilers. - So let's better not discuss possible solutions
before you have proven a clear advantage of using inlined code ;-)

bye
Michael