Moved 565 mode specific bits of HQ2x/HQ3x asm to 'variables'
svn-id: r36034
This commit is contained in:
parent
75518d5a6e
commit
ab5e3db9e3
2 changed files with 58 additions and 56 deletions
|
@ -49,7 +49,8 @@ const14 dd 0x000E000E,0x0000000E
|
||||||
threshold dd 0x00300706,0x00000000
|
threshold dd 0x00300706,0x00000000
|
||||||
; FIXME: zerlowbits assumes 565 mode.
|
; FIXME: zerlowbits assumes 565 mode.
|
||||||
; Also, in the code, the constant 0x0821 is used which also 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
|
moduloSrc dd 0
|
||||||
moduloDst dd 0
|
moduloDst dd 0
|
||||||
|
|
||||||
|
@ -136,12 +137,12 @@ SECTION .text
|
||||||
mov ecx,%3
|
mov ecx,%3
|
||||||
cmp edx,ecx
|
cmp edx,ecx
|
||||||
je %%fin
|
je %%fin
|
||||||
and edx,[zerolowbits]
|
and edx,[highbits]
|
||||||
and ecx,[zerolowbits]
|
and ecx,[highbits]
|
||||||
add ecx,edx
|
add ecx,edx
|
||||||
shr ecx,1
|
shr ecx,1
|
||||||
add ecx,0x0821
|
add ecx,[lowbits]
|
||||||
and ecx,[zerolowbits]
|
and ecx,[highbits]
|
||||||
add edx,ecx
|
add edx,ecx
|
||||||
shr edx,1
|
shr edx,1
|
||||||
%%fin:
|
%%fin:
|
||||||
|
@ -155,17 +156,17 @@ SECTION .text
|
||||||
mov ecx,%4
|
mov ecx,%4
|
||||||
cmp edx,ecx
|
cmp edx,ecx
|
||||||
je %%fin1
|
je %%fin1
|
||||||
and edx,[zerolowbits]
|
and edx,[highbits]
|
||||||
and ecx,[zerolowbits]
|
and ecx,[highbits]
|
||||||
add ecx,edx
|
add ecx,edx
|
||||||
shr ecx,1
|
shr ecx,1
|
||||||
add ecx,0x0821
|
add ecx,[lowbits]
|
||||||
%%fin1:
|
%%fin1:
|
||||||
mov edx,%2
|
mov edx,%2
|
||||||
cmp edx,ecx
|
cmp edx,ecx
|
||||||
je %%fin2
|
je %%fin2
|
||||||
and ecx,[zerolowbits]
|
and ecx,[highbits]
|
||||||
and edx,[zerolowbits]
|
and edx,[highbits]
|
||||||
add edx,ecx
|
add edx,ecx
|
||||||
shr edx,1
|
shr edx,1
|
||||||
%%fin2:
|
%%fin2:
|
||||||
|
@ -179,8 +180,8 @@ SECTION .text
|
||||||
mov ecx,%3
|
mov ecx,%3
|
||||||
cmp edx,ecx
|
cmp edx,ecx
|
||||||
je %%fin
|
je %%fin
|
||||||
and edx,[zerolowbits]
|
and edx,[highbits]
|
||||||
and ecx,[zerolowbits]
|
and ecx,[highbits]
|
||||||
add edx,ecx
|
add edx,ecx
|
||||||
shr edx,1
|
shr edx,1
|
||||||
%%fin:
|
%%fin:
|
||||||
|
@ -1728,12 +1729,12 @@ _hq2x_16:
|
||||||
shl eax,16
|
shl eax,16
|
||||||
or eax,edx
|
or eax,edx
|
||||||
mov ecx,[w2]
|
mov ecx,[w2]
|
||||||
and edx,[zerolowbits]
|
and edx,[highbits]
|
||||||
and ecx,[zerolowbits]
|
and ecx,[highbits]
|
||||||
add ecx,edx
|
add ecx,edx
|
||||||
shr ecx,1
|
shr ecx,1
|
||||||
add ecx,0x0821
|
add ecx,[lowbits]
|
||||||
and ecx,[zerolowbits]
|
and ecx,[highbits]
|
||||||
add edx,ecx
|
add edx,ecx
|
||||||
shr edx,1
|
shr edx,1
|
||||||
mov ecx,edx
|
mov ecx,edx
|
||||||
|
@ -1745,12 +1746,12 @@ _hq2x_16:
|
||||||
..@cross2:
|
..@cross2:
|
||||||
shl eax,16
|
shl eax,16
|
||||||
mov ecx,[w4]
|
mov ecx,[w4]
|
||||||
and edx,[zerolowbits]
|
and edx,[highbits]
|
||||||
and ecx,[zerolowbits]
|
and ecx,[highbits]
|
||||||
add ecx,edx
|
add ecx,edx
|
||||||
shr ecx,1
|
shr ecx,1
|
||||||
add ecx,0x0821
|
add ecx,[lowbits]
|
||||||
and ecx,[zerolowbits]
|
and ecx,[highbits]
|
||||||
add edx,ecx
|
add edx,ecx
|
||||||
shr edx,1
|
shr edx,1
|
||||||
or eax,edx
|
or eax,edx
|
||||||
|
@ -1759,12 +1760,12 @@ _hq2x_16:
|
||||||
jmp .loopx_end
|
jmp .loopx_end
|
||||||
..@cross4:
|
..@cross4:
|
||||||
mov ecx,[w6]
|
mov ecx,[w6]
|
||||||
and edx,[zerolowbits]
|
and edx,[highbits]
|
||||||
and ecx,[zerolowbits]
|
and ecx,[highbits]
|
||||||
add ecx,edx
|
add ecx,edx
|
||||||
shr ecx,1
|
shr ecx,1
|
||||||
add ecx,0x0821
|
add ecx,[lowbits]
|
||||||
and ecx,[zerolowbits]
|
and ecx,[highbits]
|
||||||
add edx,ecx
|
add edx,ecx
|
||||||
shr edx,1
|
shr edx,1
|
||||||
shl edx,16
|
shl edx,16
|
||||||
|
@ -1777,12 +1778,12 @@ _hq2x_16:
|
||||||
shl eax,16
|
shl eax,16
|
||||||
or eax,edx
|
or eax,edx
|
||||||
mov ecx,[w8]
|
mov ecx,[w8]
|
||||||
and edx,[zerolowbits]
|
and edx,[highbits]
|
||||||
and ecx,[zerolowbits]
|
and ecx,[highbits]
|
||||||
add ecx,edx
|
add ecx,edx
|
||||||
shr ecx,1
|
shr ecx,1
|
||||||
add ecx,0x0821
|
add ecx,[lowbits]
|
||||||
and ecx,[zerolowbits]
|
and ecx,[highbits]
|
||||||
add edx,ecx
|
add edx,ecx
|
||||||
shr edx,1
|
shr edx,1
|
||||||
mov ecx,edx
|
mov ecx,edx
|
||||||
|
|
|
@ -44,9 +44,10 @@ SECTION .data
|
||||||
reg_blank dd 0,0
|
reg_blank dd 0,0
|
||||||
const7 dd 0x00070007,0x00000007
|
const7 dd 0x00070007,0x00000007
|
||||||
threshold dd 0x00300706,0x00000000
|
threshold dd 0x00300706,0x00000000
|
||||||
zerolowbits dd 0xF7DEF7DE
|
|
||||||
; FIXME: zerlowbits assumes 565 mode.
|
; FIXME: zerlowbits assumes 565 mode.
|
||||||
; Also, in the code, the constant 0x0821 is used which also 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
|
moduloSrc dd 0
|
||||||
moduloDst dd 0
|
moduloDst dd 0
|
||||||
|
|
||||||
|
@ -133,12 +134,12 @@ SECTION .text
|
||||||
mov ecx,%3
|
mov ecx,%3
|
||||||
cmp edx,ecx
|
cmp edx,ecx
|
||||||
je %%fin
|
je %%fin
|
||||||
and edx,[zerolowbits]
|
and edx,[highbits]
|
||||||
and ecx,[zerolowbits]
|
and ecx,[highbits]
|
||||||
add ecx,edx
|
add ecx,edx
|
||||||
shr ecx,1
|
shr ecx,1
|
||||||
add ecx,0x0821
|
add ecx,[lowbits]
|
||||||
and ecx,[zerolowbits]
|
and ecx,[highbits]
|
||||||
add edx,ecx
|
add edx,ecx
|
||||||
shr edx,1
|
shr edx,1
|
||||||
%%fin:
|
%%fin:
|
||||||
|
@ -152,17 +153,17 @@ SECTION .text
|
||||||
mov ecx,%4
|
mov ecx,%4
|
||||||
cmp edx,ecx
|
cmp edx,ecx
|
||||||
je %%fin1
|
je %%fin1
|
||||||
and edx,[zerolowbits]
|
and edx,[highbits]
|
||||||
and ecx,[zerolowbits]
|
and ecx,[highbits]
|
||||||
add ecx,edx
|
add ecx,edx
|
||||||
shr ecx,1
|
shr ecx,1
|
||||||
add ecx,0x0821
|
add ecx,[lowbits]
|
||||||
%%fin1:
|
%%fin1:
|
||||||
mov edx,%2
|
mov edx,%2
|
||||||
cmp edx,ecx
|
cmp edx,ecx
|
||||||
je %%fin2
|
je %%fin2
|
||||||
and ecx,[zerolowbits]
|
and ecx,[highbits]
|
||||||
and edx,[zerolowbits]
|
and edx,[highbits]
|
||||||
add edx,ecx
|
add edx,ecx
|
||||||
shr edx,1
|
shr edx,1
|
||||||
%%fin2:
|
%%fin2:
|
||||||
|
@ -223,8 +224,8 @@ SECTION .text
|
||||||
mov ecx,%3
|
mov ecx,%3
|
||||||
cmp edx,ecx
|
cmp edx,ecx
|
||||||
je %%fin
|
je %%fin
|
||||||
and edx,[zerolowbits]
|
and edx,[highbits]
|
||||||
and ecx,[zerolowbits]
|
and ecx,[highbits]
|
||||||
add edx,ecx
|
add edx,ecx
|
||||||
shr edx,1
|
shr edx,1
|
||||||
%%fin:
|
%%fin:
|
||||||
|
@ -2302,12 +2303,12 @@ _hq3x_16:
|
||||||
shl eax,16
|
shl eax,16
|
||||||
or eax,edx
|
or eax,edx
|
||||||
mov ecx,[w2]
|
mov ecx,[w2]
|
||||||
and edx,[zerolowbits]
|
and edx,[highbits]
|
||||||
and ecx,[zerolowbits]
|
and ecx,[highbits]
|
||||||
add ecx,edx
|
add ecx,edx
|
||||||
shr ecx,1
|
shr ecx,1
|
||||||
add ecx,0x0821
|
add ecx,[lowbits]
|
||||||
and ecx,[zerolowbits]
|
and ecx,[highbits]
|
||||||
add edx,ecx
|
add edx,ecx
|
||||||
shr edx,1
|
shr edx,1
|
||||||
mov [edi],dx
|
mov [edi],dx
|
||||||
|
@ -2323,12 +2324,12 @@ _hq3x_16:
|
||||||
shl eax,16
|
shl eax,16
|
||||||
or eax,edx
|
or eax,edx
|
||||||
mov ecx,[w4]
|
mov ecx,[w4]
|
||||||
and edx,[zerolowbits]
|
and edx,[highbits]
|
||||||
and ecx,[zerolowbits]
|
and ecx,[highbits]
|
||||||
add ecx,edx
|
add ecx,edx
|
||||||
shr ecx,1
|
shr ecx,1
|
||||||
add ecx,0x0821
|
add ecx,[lowbits]
|
||||||
and ecx,[zerolowbits]
|
and ecx,[highbits]
|
||||||
add edx,ecx
|
add edx,ecx
|
||||||
shr edx,1
|
shr edx,1
|
||||||
mov [edi],dx
|
mov [edi],dx
|
||||||
|
@ -2343,12 +2344,12 @@ _hq3x_16:
|
||||||
shl eax,16
|
shl eax,16
|
||||||
or eax,edx
|
or eax,edx
|
||||||
mov ecx,[w6]
|
mov ecx,[w6]
|
||||||
and edx,[zerolowbits]
|
and edx,[highbits]
|
||||||
and ecx,[zerolowbits]
|
and ecx,[highbits]
|
||||||
add ecx,edx
|
add ecx,edx
|
||||||
shr ecx,1
|
shr ecx,1
|
||||||
add ecx,0x0821
|
add ecx,[lowbits]
|
||||||
and ecx,[zerolowbits]
|
and ecx,[highbits]
|
||||||
add edx,ecx
|
add edx,ecx
|
||||||
shr edx,1
|
shr edx,1
|
||||||
mov [edi],eax
|
mov [edi],eax
|
||||||
|
@ -2363,12 +2364,12 @@ _hq3x_16:
|
||||||
shl eax,16
|
shl eax,16
|
||||||
or eax,edx
|
or eax,edx
|
||||||
mov ecx,[w8]
|
mov ecx,[w8]
|
||||||
and edx,[zerolowbits]
|
and edx,[highbits]
|
||||||
and ecx,[zerolowbits]
|
and ecx,[highbits]
|
||||||
add ecx,edx
|
add ecx,edx
|
||||||
shr ecx,1
|
shr ecx,1
|
||||||
add ecx,0x0821
|
add ecx,[lowbits]
|
||||||
and ecx,[zerolowbits]
|
and ecx,[highbits]
|
||||||
add edx,ecx
|
add edx,ecx
|
||||||
shr edx,1
|
shr edx,1
|
||||||
mov [edi],eax
|
mov [edi],eax
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue