Re[4]: [XviD-devel] Quality optimization

Klaus Post (KPO) xvid-devel@xvid.org
Mon, 27 Jan 2003 13:46:15 +0100


Hi!

Actually it doesn't use cmov.

Here is the code, MSVC generated for:

eax = abs(edx - eax)

--------------
sub eax,edx         ;Difference one way  ( = abs(Luma1-Luma2))
cdq				
xor eax,edx
sub eax,edx         ; eax=absolute difference	
--------------

For a simple abs() the code is even simpler. This code was generated by
MSVC with full optimizations on.  Are you overriding the abs() function
anywhere?  That could be the reason it branches.


 
Regards, Klaus Post
Producer
 
 
-----Original Message-----
From: Marco Al [mailto:marco@simplex.nl] 
Sent: 24. januar 2003 16:22
To: xvid-devel@xvid.org
Subject: Re: Re[4]: [XviD-devel] Quality optimization

Klaus Post (KPO) wrote:

> - This is also why you are getting horrible performance on abs(). In
> Release mode, a special trick is used by MSVC to get the absolute
value.
> This code is non-branching.

Does that work only for its own instrinsic or can MSVC translate
conditional
assignments (maybe even if/else statements with small bodies?) to
instruction
sequences using CMOV instead of conditional jumps? I am pretty sure VC6
didnt do
that.

Marco

_______________________________________________
XviD-devel mailing list
XviD-devel@xvid.org
http://list.xvid.org/mailman/listinfo/xvid-devel