[Scummvm-cvs-logs] SF.net SVN: scummvm:[36047] scummvm/trunk/graphics/scaler

fingolfin at users.sourceforge.net fingolfin at users.sourceforge.net
Sun Jan 25 00:27:21 CET 2009


Revision: 36047
          http://scummvm.svn.sourceforge.net/scummvm/?rev=36047&view=rev
Author:   fingolfin
Date:     2009-01-24 23:27:21 +0000 (Sat, 24 Jan 2009)

Log Message:
-----------
HQX: Removed some more branches (like in my previous commit) from interpolation macros (they are meant to speed up things, but in reality cause a slowdown -- branches are expensive on modern CPUs)

Modified Paths:
--------------
    scummvm/trunk/graphics/scaler/hq2x_i386.asm
    scummvm/trunk/graphics/scaler/hq3x_i386.asm

Modified: scummvm/trunk/graphics/scaler/hq2x_i386.asm
===================================================================
--- scummvm/trunk/graphics/scaler/hq2x_i386.asm	2009-01-24 23:06:58 UTC (rev 36046)
+++ scummvm/trunk/graphics/scaler/hq2x_i386.asm	2009-01-24 23:27:21 UTC (rev 36047)
@@ -154,29 +154,14 @@
     add ecx,edx
     shr ecx,1
     add ecx,[_hqx_lowbits]
-%%fin1:
     mov edx,%2
     and ecx,[_hqx_highbits]
     and edx,[_hqx_highbits]
     add edx,ecx
     shr edx,1
-%%fin2:
     mov %1,dx
 %endmacro
 
-; interpolate16_2<bitFormat,1,1>
-; Mix two pixels with weight 1 and 1, respectively: (c1+c2)/2;
-%macro Interp5 3
-    mov edx,%2
-    mov ecx,%3
-    and edx,[_hqx_highbits]
-    and ecx,[_hqx_highbits]
-    add edx,ecx
-    shr edx,1
-%%fin:
-    mov %1,dx
-%endmacro
-
 ; interpolate16_3<bitFormat,5,2,1>
 ; Mix three pixels with weight 5, 2, and 1, respectively: (c1*5+c2*2+c3)/8;
 %macro Interp6 3

Modified: scummvm/trunk/graphics/scaler/hq3x_i386.asm
===================================================================
--- scummvm/trunk/graphics/scaler/hq3x_i386.asm	2009-01-24 23:06:58 UTC (rev 36046)
+++ scummvm/trunk/graphics/scaler/hq3x_i386.asm	2009-01-24 23:27:21 UTC (rev 36047)
@@ -130,8 +130,6 @@
 %macro Interp1 3
     mov edx,%2
     mov ecx,%3
-    cmp edx,ecx
-    je  %%fin
     and edx,[_hqx_highbits]
     and ecx,[_hqx_highbits]
     add ecx,edx
@@ -140,7 +138,6 @@
     and ecx,[_hqx_highbits]
     add edx,ecx
     shr edx,1
-%%fin:
     mov %1,dx
 %endmacro
 
@@ -149,22 +146,16 @@
 %macro Interp2 4
     mov edx,%3
     mov ecx,%4
-    cmp edx,ecx
-    je  %%fin1
     and edx,[_hqx_highbits]
     and ecx,[_hqx_highbits]
     add ecx,edx
     shr ecx,1
     add ecx,[_hqx_lowbits]
-%%fin1:
     mov edx,%2
-    cmp edx,ecx
-    je  %%fin2
     and ecx,[_hqx_highbits]
     and edx,[_hqx_highbits]
     add edx,ecx
     shr edx,1
-%%fin2:
     mov %1,dx
 %endmacro
 
@@ -220,13 +211,10 @@
 %macro Interp5 3
     mov edx,%2
     mov ecx,%3
-    cmp edx,ecx
-    je  %%fin
     and edx,[_hqx_highbits]
     and ecx,[_hqx_highbits]
     add edx,ecx
     shr edx,1
-%%fin:
     mov %1,dx
 %endmacro
 


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list