Subversion Repositories Kolibri OS

Rev

Rev 6854 | Rev 6860 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 6854 Rev 6855
Line 670... Line 670...
670
		cmp dword[stree],0
670
		cmp dword[stree],0
671
		je @f ;if (..)
671
		je @f ;if (..)
672
			movzx eax,word[f]
672
			movzx eax,word[f]
673
			mov esi,sizeof.ct_data
673
			mov esi,sizeof.ct_data
674
			imul esi,ecx
674
			imul esi,ecx
675
			add esi,[tree] ;;;must be [stree] but don't work
675
			add esi,[stree]
676
			movzx esi,word[esi+Len]
676
			movzx esi,word[esi+Len]
677
			add esi,[xbits]
677
			add esi,[xbits]
678
			imul eax,esi
678
			imul eax,esi
679
			add [edi+deflate_state.static_len],eax
679
			add [edi+deflate_state.static_len],eax
680
		@@:
680
		@@:
Line 1131... Line 1131...
1131
			mov eax,REPZ_11_138
1131
			mov eax,REPZ_11_138
1132
			imul eax,sizeof.ct_data
1132
			imul eax,sizeof.ct_data
1133
			add eax,edi
1133
			add eax,edi
1134
			inc word[eax+deflate_state.bl_tree+Freq]
1134
			inc word[eax+deflate_state.bl_tree+Freq]
1135
		.end4:
1135
		.end4:
1136
		mov dword[count],0
-
 
1137
		mov eax,[curlen]
1136
		mov eax,[curlen]
1138
		mov [prevlen],eax
1137
		mov [prevlen],eax
-
 
1138
		xor eax,eax
-
 
1139
		mov dword[count],eax
1139
		cmp dword[nextlen],0
1140
		cmp dword[nextlen],eax
1140
		jne .end5 ;if (..==0)
1141
		jne .end5 ;if (..==0)
1141
			mov dword[max_count],138
1142
			mov dword[max_count],138
1142
			mov dword[min_count],3
1143
			mov dword[min_count],3
1143
			jmp .cycle0
1144
			jmp .cycle0
1144
align 4
1145
align 4
Line 1164... Line 1165...
1164
 
1165
 
1165
;void (s, tree, max_code)
1166
;void (s, tree, max_code)
1166
;    deflate_state* s
1167
;    deflate_state* s
1167
;    ct_data *tree ;the tree to be scanned
1168
;    ct_data *tree ;the tree to be scanned
1168
;    int max_code  ;and its largest code of non zero frequency
1169
;    int max_code  ;and its largest code of non zero frequency
1169
align 4
1170
align 16
1170
proc send_tree uses eax ebx ecx edi, s:dword, tree:dword, max_code:dword
1171
proc send_tree uses eax ebx ecx edi, s:dword, tree:dword, max_code:dword
1171
locals
1172
locals
1172
	n dd ? ;int ;iterates over all tree elements
1173
	n dd ? ;int ;iterates over all tree elements
1173
	prevlen  dd -1 ;int ;last emitted length
1174
	prevlen  dd -1 ;int ;last emitted length
Line 1261... Line 1262...
1261
			send_code edi, REPZ_11_138, ebx
1262
			send_code edi, REPZ_11_138, ebx
1262
			mov ebx,[count]
1263
			mov ebx,[count]
1263
			sub ebx,11
1264
			sub ebx,11
1264
			stdcall send_bits, edi, ebx, 7
1265
			stdcall send_bits, edi, ebx, 7
1265
		.end4:
1266
		.end4:
1266
		mov dword[curlen],0
-
 
1267
		mov eax,[curlen]
1267
		mov eax,[curlen]
1268
		mov [prevlen],eax
1268
		mov [prevlen],eax
-
 
1269
		xor eax,eax
1269
		mov [nextlen],eax
1270
		mov dword[count],eax
1270
		cmp eax,0
1271
		cmp [nextlen],eax
1271
		jne .end5 ;if (..==0)
1272
		jne .end5 ;if (..==0)
1272
			mov dword[max_count],138
1273
			mov dword[max_count],138
1273
			mov dword[min_count],3
1274
			mov dword[min_count],3
1274
			jmp .end7
1275
			jmp .end7
1275
		.end5:
1276
		.end5: