From b93db9f30f9dca7398f56c3be1a5f04cbdbd3e8d Mon Sep 17 00:00:00 2001 From: Max Horn Date: Sat, 24 Jan 2009 23:27:21 +0000 Subject: 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) svn-id: r36047 --- graphics/scaler/hq2x_i386.asm | 15 --------------- graphics/scaler/hq3x_i386.asm | 12 ------------ 2 files changed, 27 deletions(-) (limited to 'graphics/scaler') diff --git a/graphics/scaler/hq2x_i386.asm b/graphics/scaler/hq2x_i386.asm index 085df82ce5..5c826401ca 100644 --- a/graphics/scaler/hq2x_i386.asm +++ b/graphics/scaler/hq2x_i386.asm @@ -154,26 +154,11 @@ SECTION .text 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 -; 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 diff --git a/graphics/scaler/hq3x_i386.asm b/graphics/scaler/hq3x_i386.asm index 3212ea93ac..b13fc10f0d 100644 --- a/graphics/scaler/hq3x_i386.asm +++ b/graphics/scaler/hq3x_i386.asm @@ -130,8 +130,6 @@ SECTION .text %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 @@ SECTION .text and ecx,[_hqx_highbits] add edx,ecx shr edx,1 -%%fin: mov %1,dx %endmacro @@ -149,22 +146,16 @@ SECTION .text %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 @@ SECTION .text %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 -- cgit v1.2.3