aboutsummaryrefslogtreecommitdiff
path: root/graphics/scaler/hq3x_i386.asm
diff options
context:
space:
mode:
authorMax Horn2009-01-24 23:06:58 +0000
committerMax Horn2009-01-24 23:06:58 +0000
commit16e7a7cd30e3523a53c0038b4e04289e07424479 (patch)
treea8671c66cec3b3b3b73e95fecbc67bbf9ddb26e4 /graphics/scaler/hq3x_i386.asm
parente5feb689dfa8afc3d6af3ae6e66343cfc61b855c (diff)
downloadscummvm-rg350-16e7a7cd30e3523a53c0038b4e04289e07424479.tar.gz
scummvm-rg350-16e7a7cd30e3523a53c0038b4e04289e07424479.tar.bz2
scummvm-rg350-16e7a7cd30e3523a53c0038b4e04289e07424479.zip
Turned two vars of the HQ2x/HQ3x ASM implementation into global vars, to make it possible to adjust them for 555 vs. 565 mode (555 mode is still a bit buggy, due to the interpolation code they use)
svn-id: r36046
Diffstat (limited to 'graphics/scaler/hq3x_i386.asm')
-rw-r--r--graphics/scaler/hq3x_i386.asm60
1 files changed, 29 insertions, 31 deletions
diff --git a/graphics/scaler/hq3x_i386.asm b/graphics/scaler/hq3x_i386.asm
index 43bfd85540..3212ea93ac 100644
--- a/graphics/scaler/hq3x_i386.asm
+++ b/graphics/scaler/hq3x_i386.asm
@@ -22,6 +22,8 @@ GLOBAL _hq3x_16
EXTERN _LUT16to32
EXTERN _RGBtoYUV
+EXTERN _hqx_highbits
+EXTERN _hqx_lowbits
SECTION .bss
linesleft resd 1
@@ -44,10 +46,6 @@ SECTION .data
reg_blank dd 0,0
const7 dd 0x00070007,0x00000007
threshold dd 0x00300706,0x00000000
-; FIXME: zerlowbits assumes 565 mode.
-; Also, in the code, the constant 0x0821 is used which also assumes 565 mode
-highbits dd 0xF7DEF7DE
-lowbits dd 0x0821
moduloSrc dd 0
moduloDst dd 0
@@ -134,12 +132,12 @@ SECTION .text
mov ecx,%3
cmp edx,ecx
je %%fin
- and edx,[highbits]
- and ecx,[highbits]
+ and edx,[_hqx_highbits]
+ and ecx,[_hqx_highbits]
add ecx,edx
shr ecx,1
- add ecx,[lowbits]
- and ecx,[highbits]
+ add ecx,[_hqx_lowbits]
+ and ecx,[_hqx_highbits]
add edx,ecx
shr edx,1
%%fin:
@@ -153,17 +151,17 @@ SECTION .text
mov ecx,%4
cmp edx,ecx
je %%fin1
- and edx,[highbits]
- and ecx,[highbits]
+ and edx,[_hqx_highbits]
+ and ecx,[_hqx_highbits]
add ecx,edx
shr ecx,1
- add ecx,[lowbits]
+ add ecx,[_hqx_lowbits]
%%fin1:
mov edx,%2
cmp edx,ecx
je %%fin2
- and ecx,[highbits]
- and edx,[highbits]
+ and ecx,[_hqx_highbits]
+ and edx,[_hqx_highbits]
add edx,ecx
shr edx,1
%%fin2:
@@ -224,8 +222,8 @@ SECTION .text
mov ecx,%3
cmp edx,ecx
je %%fin
- and edx,[highbits]
- and ecx,[highbits]
+ and edx,[_hqx_highbits]
+ and ecx,[_hqx_highbits]
add edx,ecx
shr edx,1
%%fin:
@@ -2303,12 +2301,12 @@ _hq3x_16:
shl eax,16
or eax,edx
mov ecx,[w2]
- and edx,[highbits]
- and ecx,[highbits]
+ and edx,[_hqx_highbits]
+ and ecx,[_hqx_highbits]
add ecx,edx
shr ecx,1
- add ecx,[lowbits]
- and ecx,[highbits]
+ add ecx,[_hqx_lowbits]
+ and ecx,[_hqx_highbits]
add edx,ecx
shr edx,1
mov [edi],dx
@@ -2324,12 +2322,12 @@ _hq3x_16:
shl eax,16
or eax,edx
mov ecx,[w4]
- and edx,[highbits]
- and ecx,[highbits]
+ and edx,[_hqx_highbits]
+ and ecx,[_hqx_highbits]
add ecx,edx
shr ecx,1
- add ecx,[lowbits]
- and ecx,[highbits]
+ add ecx,[_hqx_lowbits]
+ and ecx,[_hqx_highbits]
add edx,ecx
shr edx,1
mov [edi],dx
@@ -2344,12 +2342,12 @@ _hq3x_16:
shl eax,16
or eax,edx
mov ecx,[w6]
- and edx,[highbits]
- and ecx,[highbits]
+ and edx,[_hqx_highbits]
+ and ecx,[_hqx_highbits]
add ecx,edx
shr ecx,1
- add ecx,[lowbits]
- and ecx,[highbits]
+ add ecx,[_hqx_lowbits]
+ and ecx,[_hqx_highbits]
add edx,ecx
shr edx,1
mov [edi],eax
@@ -2364,12 +2362,12 @@ _hq3x_16:
shl eax,16
or eax,edx
mov ecx,[w8]
- and edx,[highbits]
- and ecx,[highbits]
+ and edx,[_hqx_highbits]
+ and ecx,[_hqx_highbits]
add ecx,edx
shr ecx,1
- add ecx,[lowbits]
- and ecx,[highbits]
+ add ecx,[_hqx_lowbits]
+ and ecx,[_hqx_highbits]
add edx,ecx
shr edx,1
mov [edi],eax