line |
true |
false |
branch |
54
|
41 |
21 |
while (s->bsLive > 0) { |
81
|
62709 |
76974 |
bsNEEDW ( n ); |
116
|
5376 |
21 |
for (i = 0; i < 256; i++) |
117
|
1033 |
4343 |
if (s->inUse[i]) { |
163
|
1075 |
21 |
for (i = 0; i <= EOB; i++) s->mtfFreq[i] = 0; |
167
|
1033 |
21 |
for (i = 0; i < s->nInUse; i++) yy[i] = (UChar) i; |
169
|
125395 |
21 |
for (i = 0; i < s->nblock; i++) { |
172
|
21 |
125374 |
j = ptr[i]-1; if (j < 0) j += s->nblock; |
176
|
65286 |
60109 |
if (yy[0] == ll_i) { |
180
|
312 |
59797 |
if (zPend > 0) { |
183
|
229 |
394 |
if (zPend & 1) { |
190
|
312 |
311 |
if (zPend < 2) break; |
203
|
7558755 |
60109 |
while ( rll_i != rtmp ) { |
218
|
1 |
20 |
if (zPend > 0) { |
221
|
6 |
4 |
if (zPend & 1) { |
228
|
1 |
9 |
if (zPend < 2) break; |
275
|
126 |
21 |
for (t = 0; t < BZ_N_GROUPS; t++) |
276
|
6450 |
126 |
for (v = 0; v < alphaSize; v++) |
280
|
0 |
21 |
AssertH ( s->nMTF > 0, 3001 ); |
281
|
17 |
4 |
if (s->nMTF < 200) nGroups = 2; else |
282
|
1 |
3 |
if (s->nMTF < 600) nGroups = 3; else |
283
|
0 |
3 |
if (s->nMTF < 1200) nGroups = 4; else |
284
|
0 |
3 |
if (s->nMTF < 2400) nGroups = 5; else |
294
|
55 |
21 |
while (nPart > 0) { |
298
|
1081 |
55 |
while (aFreq < tFreq && ge < alphaSize-1) { |
|
1081 |
0 |
while (aFreq < tFreq && ge < alphaSize-1) { |
303
|
53 |
2 |
if (ge > gs |
304
|
33 |
20 |
&& nPart != nGroups && nPart != 1 |
|
12 |
21 |
&& nPart != nGroups && nPart != 1 |
305
|
6 |
6 |
&& ((nGroups-nPart) % 2 == 1)) { |
316
|
5252 |
55 |
for (v = 0; v < alphaSize; v++) |
317
|
3161 |
2091 |
if (v >= gs && v <= ge) |
|
1075 |
2086 |
if (v >= gs && v <= ge) |
330
|
84 |
21 |
for (iter = 0; iter < BZ_N_ITERS; iter++) { |
332
|
220 |
84 |
for (t = 0; t < nGroups; t++) fave[t] = 0; |
334
|
220 |
84 |
for (t = 0; t < nGroups; t++) |
335
|
21008 |
220 |
for (v = 0; v < alphaSize; v++) |
342
|
12 |
72 |
if (nGroups == 6) { |
343
|
3084 |
12 |
for (v = 0; v < alphaSize; v++) { |
356
|
84 |
4912 |
if (gs >= s->nMTF) break; |
358
|
84 |
4828 |
if (ge >= s->nMTF) ge = s->nMTF-1; |
364
|
29092 |
4912 |
for (t = 0; t < nGroups; t++) cost[t] = 0; |
366
|
4812 |
100 |
if (nGroups == 6 && 50 == ge-gs+1) { |
|
4800 |
12 |
if (nGroups == 6 && 50 == ge-gs+1) { |
397
|
3052 |
112 |
for (i = gs; i <= ge; i++) { |
399
|
7052 |
3052 |
for (t = 0; t < nGroups; t++) cost[t] += s->len[t][icv]; |
408
|
29092 |
4912 |
for (t = 0; t < nGroups; t++) |
409
|
11048 |
18044 |
if (cost[t] < bc) { bc = cost[t]; bt = t; }; |
418
|
4812 |
100 |
if (nGroups == 6 && 50 == ge-gs+1) { |
|
4800 |
12 |
if (nGroups == 6 && 50 == ge-gs+1) { |
438
|
3052 |
112 |
for (i = gs; i <= ge; i++) |
444
|
0 |
84 |
if (s->verbosity >= 3) { |
447
|
0 |
0 |
for (t = 0; t < nGroups; t++) |
457
|
220 |
84 |
for (t = 0; t < nGroups; t++) |
463
|
0 |
21 |
AssertH( nGroups < 8, 3002 ); |
464
|
21 |
0 |
AssertH( nSelectors < 32768 && |
|
0 |
21 |
AssertH( nSelectors < 32768 && |
472
|
55 |
21 |
for (i = 0; i < nGroups; i++) pos[i] = i; |
473
|
1228 |
21 |
for (i = 0; i < nSelectors; i++) { |
477
|
3012 |
1228 |
while ( ll_i != tmp ) { |
489
|
55 |
21 |
for (t = 0; t < nGroups; t++) { |
492
|
5252 |
55 |
for (i = 0; i < alphaSize; i++) { |
493
|
75 |
5177 |
if (s->len[t][i] > maxLen) maxLen = s->len[t][i]; |
494
|
137 |
5115 |
if (s->len[t][i] < minLen) minLen = s->len[t][i]; |
496
|
0 |
55 |
AssertH ( !(maxLen > 17 /*20*/ ), 3004 ); |
497
|
0 |
55 |
AssertH ( !(minLen < 1), 3005 ); |
505
|
336 |
21 |
for (i = 0; i < 16; i++) { |
507
|
5376 |
336 |
for (j = 0; j < 16; j++) |
508
|
1033 |
4343 |
if (s->inUse[i * 16 + j]) inUse16[i] = True; |
512
|
336 |
21 |
for (i = 0; i < 16; i++) |
513
|
129 |
207 |
if (inUse16[i]) bsW(s,1,1); else bsW(s,1,0); |
515
|
336 |
21 |
for (i = 0; i < 16; i++) |
516
|
129 |
207 |
if (inUse16[i]) |
517
|
2064 |
129 |
for (j = 0; j < 16; j++) { |
518
|
1033 |
1031 |
if (s->inUse[i * 16 + j]) bsW(s,1,1); else bsW(s,1,0); |
529
|
1228 |
21 |
for (i = 0; i < nSelectors; i++) { |
530
|
3012 |
1228 |
for (j = 0; j < s->selectorMtf[i]; j++) bsW(s,1,1); |
539
|
55 |
21 |
for (t = 0; t < nGroups; t++) { |
542
|
5252 |
55 |
for (i = 0; i < alphaSize; i++) { |
543
|
1859 |
5252 |
while (curr < s->len[t][i]) { bsW(s,2,2); curr++; /* 10 */ }; |
544
|
1817 |
5252 |
while (curr > s->len[t][i]) { bsW(s,2,3); curr--; /* 11 */ }; |
557
|
21 |
1228 |
if (gs >= s->nMTF) break; |
559
|
21 |
1207 |
if (ge >= s->nMTF) ge = s->nMTF-1; |
560
|
0 |
1228 |
AssertH ( s->selector[selCtr] < nGroups, 3006 ); |
562
|
1203 |
25 |
if (nGroups == 6 && 50 == ge-gs+1) { |
|
1200 |
3 |
if (nGroups == 6 && 50 == ge-gs+1) { |
591
|
763 |
28 |
for (i = gs; i <= ge; i++) { |
602
|
0 |
21 |
AssertH( selCtr == nSelectors, 3007 ); |
612
|
21 |
2 |
if (s->nblock > 0) { |
617
|
0 |
21 |
if (s->blockNo > 1) s->numZ = 0; |
630
|
21 |
2 |
if (s->blockNo == 1) { |
638
|
21 |
2 |
if (s->nblock > 0) { |
665
|
21 |
2 |
if (is_last_block) { |