aboutsummaryrefslogtreecommitdiff
path: root/graphics/scaler/hq2x_i386.asm
diff options
context:
space:
mode:
authorMax Horn2009-01-24 06:26:43 +0000
committerMax Horn2009-01-24 06:26:43 +0000
commitab5e3db9e3d1fae2abf97cf4770c8caab8ae81cc (patch)
treeea3933bb689b185fbb3f50fa7b56412d7063088f /graphics/scaler/hq2x_i386.asm
parent75518d5a6ecaac63683434440ad2820864ef9903 (diff)
downloadscummvm-rg350-ab5e3db9e3d1fae2abf97cf4770c8caab8ae81cc.tar.gz
scummvm-rg350-ab5e3db9e3d1fae2abf97cf4770c8caab8ae81cc.tar.bz2
scummvm-rg350-ab5e3db9e3d1fae2abf97cf4770c8caab8ae81cc.zip
Moved 565 mode specific bits of HQ2x/HQ3x asm to 'variables'
svn-id: r36034
Diffstat (limited to 'graphics/scaler/hq2x_i386.asm')
-rw-r--r--graphics/scaler/hq2x_i386.asm57
1 files changed, 29 insertions, 28 deletions
diff --git a/graphics/scaler/hq2x_i386.asm b/graphics/scaler/hq2x_i386.asm
index 60cb0fea8b..a4bc50c979 100644
--- a/graphics/scaler/hq2x_i386.asm
+++ b/graphics/scaler/hq2x_i386.asm
@@ -49,7 +49,8 @@ const14 dd 0x000E000E,0x0000000E
threshold dd 0x00300706,0x00000000
; FIXME: zerlowbits assumes 565 mode.
; Also, in the code, the constant 0x0821 is used which also assumes 565 mode
-zerolowbits dd 0xF7DEF7DE
+highbits dd 0xF7DEF7DE
+lowbits dd 0x0821
moduloSrc dd 0
moduloDst dd 0
@@ -136,12 +137,12 @@ SECTION .text
mov ecx,%3
cmp edx,ecx
je %%fin
- and edx,[zerolowbits]
- and ecx,[zerolowbits]
+ and edx,[highbits]
+ and ecx,[highbits]
add ecx,edx
shr ecx,1
- add ecx,0x0821
- and ecx,[zerolowbits]
+ add ecx,[lowbits]
+ and ecx,[highbits]
add edx,ecx
shr edx,1
%%fin:
@@ -155,17 +156,17 @@ SECTION .text
mov ecx,%4
cmp edx,ecx
je %%fin1
- and edx,[zerolowbits]
- and ecx,[zerolowbits]
+ and edx,[highbits]
+ and ecx,[highbits]
add ecx,edx
shr ecx,1
- add ecx,0x0821
+ add ecx,[lowbits]
%%fin1:
mov edx,%2
cmp edx,ecx
je %%fin2
- and ecx,[zerolowbits]
- and edx,[zerolowbits]
+ and ecx,[highbits]
+ and edx,[highbits]
add edx,ecx
shr edx,1
%%fin2:
@@ -179,8 +180,8 @@ SECTION .text
mov ecx,%3
cmp edx,ecx
je %%fin
- and edx,[zerolowbits]
- and ecx,[zerolowbits]
+ and edx,[highbits]
+ and ecx,[highbits]
add edx,ecx
shr edx,1
%%fin:
@@ -1728,12 +1729,12 @@ _hq2x_16:
shl eax,16
or eax,edx
mov ecx,[w2]
- and edx,[zerolowbits]
- and ecx,[zerolowbits]
+ and edx,[highbits]
+ and ecx,[highbits]
add ecx,edx
shr ecx,1
- add ecx,0x0821
- and ecx,[zerolowbits]
+ add ecx,[lowbits]
+ and ecx,[highbits]
add edx,ecx
shr edx,1
mov ecx,edx
@@ -1745,12 +1746,12 @@ _hq2x_16:
..@cross2:
shl eax,16
mov ecx,[w4]
- and edx,[zerolowbits]
- and ecx,[zerolowbits]
+ and edx,[highbits]
+ and ecx,[highbits]
add ecx,edx
shr ecx,1
- add ecx,0x0821
- and ecx,[zerolowbits]
+ add ecx,[lowbits]
+ and ecx,[highbits]
add edx,ecx
shr edx,1
or eax,edx
@@ -1759,12 +1760,12 @@ _hq2x_16:
jmp .loopx_end
..@cross4:
mov ecx,[w6]
- and edx,[zerolowbits]
- and ecx,[zerolowbits]
+ and edx,[highbits]
+ and ecx,[highbits]
add ecx,edx
shr ecx,1
- add ecx,0x0821
- and ecx,[zerolowbits]
+ add ecx,[lowbits]
+ and ecx,[highbits]
add edx,ecx
shr edx,1
shl edx,16
@@ -1777,12 +1778,12 @@ _hq2x_16:
shl eax,16
or eax,edx
mov ecx,[w8]
- and edx,[zerolowbits]
- and ecx,[zerolowbits]
+ and edx,[highbits]
+ and ecx,[highbits]
add ecx,edx
shr ecx,1
- add ecx,0x0821
- and ecx,[zerolowbits]
+ add ecx,[lowbits]
+ and ecx,[highbits]
add edx,ecx
shr edx,1
mov ecx,edx