Welcome to mirror list, hosted at ThFree Co, Russian Federation.

a_stretchrgb_point.asm « source « Kasumi « VirtualDub « thirdparty « src - github.com/mpc-hc/mpc-hc.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: dca765b926fc4a4afb02ad7b0d92bef69a6dc03c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
		segment	.text

		struc	scaleinfo
.dst		resd	1
.src		resd	1
.xaccum		resd	1
.xfracinc	resd	1
.xintinc	resd	1
.count		resd	1
		endstruc

		global	_vdasm_resize_point32
_vdasm_resize_point32:
		push	ebp
		push	edi
		push	esi
		push	ebx

		mov		eax, [esp+4+16]

		mov		ebx, [eax+scaleinfo.xaccum]
		mov		ecx, [eax+scaleinfo.xfracinc]
		mov		edx, [eax+scaleinfo.src]
		mov		esi, [eax+scaleinfo.xintinc]
		mov		edi, [eax+scaleinfo.dst]
		mov		ebp, [eax+scaleinfo.count]
.xloop:
		mov		eax,[edx*4]
		add		ebx,ecx
		adc		edx,esi
		mov		[edi+ebp],eax
		add		ebp,4
		jne		.xloop

		pop		ebx
		pop		esi
		pop		edi
		pop		ebp
		ret

		global	_vdasm_resize_point32_MMX
_vdasm_resize_point32_MMX:
		push	ebp
		push	edi
		push	esi
		push	ebx

		mov		eax, [esp+4+16]

		push	0
		push	dword [fs:0]
		mov		dword [fs:0], esp

		mov		ebx, [eax+scaleinfo.xaccum]
		mov		esp, [eax+scaleinfo.xfracinc]
		mov		edx, [eax+scaleinfo.src]
		mov		esi, [eax+scaleinfo.xintinc]
		mov		edi, [eax+scaleinfo.dst]
		mov		ebp, [eax+scaleinfo.count]

		mov		eax, ebx
		mov		ecx, edx
		add		ebx, esp
		adc		edx, esi
		add		esp, esp
		adc		esi, esi

		add		ebp, 4
		jz		.odd
.dualloop:
		movd		mm0, dword [ecx*4]
		punpckldq	mm0,[edx*4]
		add		eax,esp
		adc		ecx,esi
		add		ebx,esp
		adc		edx,esi
		movq	[edi+ebp-4],mm0

		add		ebp,8
		jnc		.dualloop
		jnz		.noodd
.odd:
		mov		eax, [ecx*4]
		mov		[edi-4], eax
.noodd:
		mov		esp, dword [fs:0]
		pop		eax
		pop		eax

		pop		ebx
		pop		esi
		pop		edi
		pop		ebp
		ret

		end