Branch Coverage

render.im
Criterion Covered Total %
branch 507 740 68.5


line true false branch
85 110 74 if (r->line_8)
87 72 112 if (r->line_double)
89 86 98 if (r->fill_line_8)
91 55 129 if (r->fill_line_double)
98 0 137188 if (width > r->line_width) {
100 0 0 if (new_width < width)
103 0 0 if (eight_bit) {
104 0 0 if (r->line_8)
108 0 0 if (r->line_double) {
114 0 0 if (r->line_double)
118 0 0 if (r->line_8) {
127 135526 1662 if (eight_bit) {
128 110 135416 if (!r->line_8)
130 0 135526 if (r->line_double) {
136 72 1590 if (!r->line_double)
138 0 1662 if (r->line_8) {
148 0 135595 if (width > r->fill_width) {
150 0 0 if (new_width < width)
153 0 0 if (eight_bit) {
154 0 0 if (r->line_8)
158 0 0 if (r->fill_line_double) {
164 0 0 if (r->fill_line_double)
168 0 0 if (r->fill_line_8) {
177 134559 1036 if (eight_bit) {
178 86 134473 if (!r->fill_line_8)
180 0 134559 if (r->fill_line_double) {
186 55 981 if (!r->fill_line_double)
188 0 1036 if (r->fill_line_8) {
212 340 0 if (y < 0 || y >= im->ysize)
0 340 if (y < 0 || y >= im->ysize)
214 0 340 if (x < 0) {
219 0 340 if (x + width > im->xsize) {
222 340 0 if (x >= im->xsize || x + width <= 0 || width <= 0)
340 0 if (x >= im->xsize || x + width <= 0 || width <= 0)
0 340 if (x >= im->xsize || x + width <= 0 || width <= 0)
226 350 0 while (width > 0 && *src == 0) {
10 340 while (width > 0 && *src == 0) {
231 690 0 while (width > 0 && src[width-1] == 0) {
350 340 while (width > 0 && src[width-1] == 0) {
234 0 340 if (!width)
239 340 0 #code r->im->bits <= 8
262 135455 140 if (fill_channels == 1 || fill_channels == 3)
135207 248 if (fill_channels == 1 || fill_channels == 3)
265 135595 0 if (y < 0 || y >= im->ysize)
0 135595 if (y < 0 || y >= im->ysize)
267 0 135595 if (x < 0) {
272 0 135595 if (x + width > im->xsize) {
275 135595 0 if (x >= im->xsize || x + width <= 0 || width <= 0)
135595 0 if (x >= im->xsize || x + width <= 0 || width <= 0)
0 135595 if (x >= im->xsize || x + width <= 0 || width <= 0)
278 663 134932 if (src) {
280 664 0 while (width > 0 && *src == 0) {
1 663 while (width > 0 && *src == 0) {
285 704 0 while (width > 0 && src[width-1] == 0) {
41 663 while (width > 0 && src[width-1] == 0) {
289 0 135595 if (!width)
292 134851 744 alloc_line(r, width, r->im->bits <= 8 && fill->f_fill_with_color != NULL);
134559 292 alloc_line(r, width, r->im->bits <= 8 && fill->f_fill_with_color != NULL);
293 134851 744 alloc_fill_line(r, width, r->im->bits <= 8 && fill->f_fill_with_color != NULL);
134559 292 alloc_fill_line(r, width, r->im->bits <= 8 && fill->f_fill_with_color != NULL);
295 134851 744 #code r->im->bits <= 8 && fill->f_fill_with_color
134559 292 #code r->im->bits <= 8 && fill->f_fill_with_color
296 786 133773 if (IM_FILL_COMBINE(fill)) {
264 772 if (IM_FILL_COMBINE(fill)) {
304 1218 35 while (work_width) {
0 0 while (work_width) {
305 210 1008 if (*srcc == 0) {
0 0 if (*srcc == 0) {
308 134 874 else if (*srcc != 255) {
0 0 else if (*srcc != 255) {
321 320 133453 if (src) {
308 464 if (src) {
329 26985 320 while (work_width) {
30637 308 while (work_width) {
330 23540 3445 if (*src == 255) {
22696 7941 if (*src == 255) {
334 1561 1884 else if (*src) {
1870 6071 else if (*src) {
335 4683 1561 for (ch = 0; ch < im->channels; ++ch) {
5610 1870 for (ch = 0; ch < im->channels; ++ch) {
338 4683 0 destc->channel[ch] = IM_LIMIT(work);
0 5610 destc->channel[ch] = IM_LIMIT(work);
0 5610 destc->channel[ch] = IM_LIMIT(work);
400 626 0 if (src_chans == 1 || src_chans == 3)
626 0 if (src_chans == 1 || src_chans == 3)
627 0 if (src_chans == 1 || src_chans == 3)
626 1 if (src_chans == 1 || src_chans == 3)
403 626 0 if (y < 0 || y >= im->ysize)
0 626 if (y < 0 || y >= im->ysize)
627 0 if (y < 0 || y >= im->ysize)
0 627 if (y < 0 || y >= im->ysize)
405 0 626 if (x < 0) {
0 627 if (x < 0) {
411 0 626 if (x + width > im->xsize)
0 627 if (x + width > im->xsize)
421 411 215 if (src) {
411 216 if (src) {
427 15536 411 while (work_width) {
15536 411 while (work_width) {
428 13975 1561 if (*srcp) {
13975 1561 if (*srcp) {
429 3845 10130 if (*srcp != IM_SAMPLE_MAX)
3845 10130 if (*srcp != IM_SAMPLE_MAX)
446 0 0 if (src) {
0 0 if (src) {
452 0 0 while (work_width) {
0 0 while (work_width) {
453 0 0 if (*src == 255) {
0 0 if (*src == 255) {
457 0 0 else if (*src) {
0 0 else if (*src) {
459 0 0 for (ch = 0; ch < im->channels; ++ch) {
0 0 for (ch = 0; ch < im->channels; ++ch) {
462 0 0 destc->channel[ch] = IM_LIMIT(work);
0 0 destc->channel[ch] = IM_LIMIT(work);
0 0 destc->channel[ch] = IM_LIMIT(work);
495 0 0 for (ch = 0; ch < channels; ++ch) {
502 0 0 if (color_alpha == 0xFF) {
320 0 if (color_alpha == 0xFF) {
503 0 0 while (fetch_offset < width && *src == 0xFF) {
0 0 while (fetch_offset < width && *src == 0xFF) {
921 9 while (fetch_offset < width && *src == 0xFF) {
610 311 while (fetch_offset < width && *src == 0xFF) {
510 0 0 while (fetch_offset < width) {
18916 320 while (fetch_offset < width) {
516 0 0 if (alpha == IM_SAMPLE_MAX)
17782 1134 if (alpha == IM_SAMPLE_MAX)
518 0 0 else if (alpha) {
1134 0 else if (alpha) {
519 0 0 for (ch = 0; ch < channels; ++ch) {
3402 1134 for (ch = 0; ch < channels; ++ch) {
546 0 0 for (ch = 0; ch < r->im->channels; ++ch) {
553 0 0 if (color->channel[alpha_channel] == 0xFF) {
20 0 if (color->channel[alpha_channel] == 0xFF) {
554 0 0 while (fetch_offset < width && *src == 0xFF) {
0 0 while (fetch_offset < width && *src == 0xFF) {
20 0 while (fetch_offset < width && *src == 0xFF) {
0 20 while (fetch_offset < width && *src == 0xFF) {
561 0 0 while (fetch_offset < width) {
342 20 while (fetch_offset < width) {
567 0 0 if (src_alpha == IM_SAMPLE_MAX)
278 64 if (src_alpha == IM_SAMPLE_MAX)
569 0 0 else if (src_alpha) {
64 0 else if (src_alpha) {
573 0 0 for (ch = 0; ch < alpha_channel; ++ch) {
192 64 for (ch = 0; ch < alpha_channel; ++ch) {
600 232 28 while (count) {
241 29 while (count) {
603 0 232 if (src_alpha == IM_SAMPLE_MAX)
3 238 if (src_alpha == IM_SAMPLE_MAX)
605 202 30 else if (src_alpha) {
205 33 else if (src_alpha) {
610 606 202 for (ch = 0; ch < alpha_channel; ++ch) {
615 205 for (ch = 0; ch < alpha_channel; ++ch) {
636 70416 1046 while (count) {
37643 996 while (count) {
639 33669 36747 if (src_alpha == IM_SAMPLE_MAX)
8837 28806 if (src_alpha == IM_SAMPLE_MAX)
641 22743 14004 else if (src_alpha) {
17749 11057 else if (src_alpha) {
645 68229 22743 for (ch = 0; ch < channels; ++ch) {
53247 17749 for (ch = 0; ch < channels; ++ch) {
672 128 32 while (count) {
128 32 while (count) {
675 0 128 if (src_alpha == IM_SAMPLE_MAX)
0 128 if (src_alpha == IM_SAMPLE_MAX)
677 128 0 else if (src_alpha) {
128 0 else if (src_alpha) {
682 384 128 for (ch = 0; ch < alpha_channel; ++ch) {
384 128 for (ch = 0; ch < alpha_channel; ++ch) {
697 758 0 if (channels == 2 || channels == 4)
28 730 if (channels == 2 || channels == 4)
1009 0 if (channels == 2 || channels == 4)
29 980 if (channels == 2 || channels == 4)
705 348 0 if (channels == 2 || channels == 4)
32 316 if (channels == 2 || channels == 4)
48 0 if (channels == 2 || channels == 4)
32 16 if (channels == 2 || channels == 4)
751 72 0 if (combine < 0 || combine >= sizeof(combines_8) / sizeof(*combines_8))
0 72 if (combine < 0 || combine >= sizeof(combines_8) / sizeof(*combines_8))
798 12 0 int color_channels = i_color_channels(channels);
8 4 int color_channels = i_color_channels(channels);
12 0 int color_channels = i_color_channels(channels);
8 4 int color_channels = i_color_channels(channels);
800 12 0 if (i_has_alpha(channels)) {
8 4 if (i_has_alpha(channels)) {
12 0 if (i_has_alpha(channels)) {
8 4 if (i_has_alpha(channels)) {
801 32 8 while (work_count--) {
32 8 while (work_count--) {
805 32 0 if (src_alpha) {
32 0 if (src_alpha) {
809 96 32 for (ch = 0; ch < color_channels; ++ch) {
96 32 for (ch = 0; ch < color_channels; ++ch) {
824 16 4 while (work_count--) {
16 4 while (work_count--) {
828 16 0 if (src_alpha) {
16 0 if (src_alpha) {
829 48 16 for (ch = 0; ch < color_channels; ++ch) {
48 16 for (ch = 0; ch < color_channels; ++ch) {
843 12 0 int color_channels = i_color_channels(channels);
8 4 int color_channels = i_color_channels(channels);
12 0 int color_channels = i_color_channels(channels);
8 4 int color_channels = i_color_channels(channels);
846 12 0 if (i_has_alpha(channels)) {
8 4 if (i_has_alpha(channels)) {
12 0 if (i_has_alpha(channels)) {
8 4 if (i_has_alpha(channels)) {
847 32 8 while (count--) {
32 8 while (count--) {
848 12 20 if (in->channel[channels-1] > rand() * ((double)IM_SAMPLE_MAX / RAND_MAX)) {
15 17 if (in->channel[channels-1] > rand() * ((double)IM_SAMPLE_MAX / RAND_MAX)) {
849 36 12 for (ch = 0; ch < color_channels; ++ch) {
45 15 for (ch = 0; ch < color_channels; ++ch) {
859 16 4 while (count--) {
16 4 while (count--) {
860 9 7 if (in->channel[channels] > rand() * ((double)IM_SAMPLE_MAX / RAND_MAX)) {
6 10 if (in->channel[channels] > rand() * ((double)IM_SAMPLE_MAX / RAND_MAX)) {
861 27 9 for (ch = 0; ch < color_channels; ++ch) {
18 6 for (ch = 0; ch < color_channels; ++ch) {
881 12 0 int color_channels = i_color_channels(channels);
8 4 int color_channels = i_color_channels(channels);
12 0 int color_channels = i_color_channels(channels);
8 4 int color_channels = i_color_channels(channels);
886 12 0 if (i_has_alpha(channels)) {
8 4 if (i_has_alpha(channels)) {
12 0 if (i_has_alpha(channels)) {
8 4 if (i_has_alpha(channels)) {
887 32 8 while (work_count--) {
32 8 while (work_count--) {
889 32 0 if (src_alpha) {
32 0 if (src_alpha) {
892 32 0 if (dest_alpha > IM_SAMPLE_MAX)
32 0 if (dest_alpha > IM_SAMPLE_MAX)
894 96 32 for (ch = 0; ch < color_channels; ++ch) {
96 32 for (ch = 0; ch < color_channels; ++ch) {
896 0 96 if (total > IM_SAMPLE_MAX)
0 96 if (total > IM_SAMPLE_MAX)
908 16 4 while (work_count--) {
16 4 while (work_count--) {
910 16 0 if (src_alpha) {
16 0 if (src_alpha) {
911 48 16 for (ch = 0; ch < color_channels; ++ch) {
48 16 for (ch = 0; ch < color_channels; ++ch) {
913 0 48 if (total > IM_SAMPLE_MAX)
0 48 if (total > IM_SAMPLE_MAX)
939 12 0 int color_channels = i_color_channels(channels);
8 4 int color_channels = i_color_channels(channels);
12 0 int color_channels = i_color_channels(channels);
8 4 int color_channels = i_color_channels(channels);
941 12 0 if (i_has_alpha(channels)) {
8 4 if (i_has_alpha(channels)) {
12 0 if (i_has_alpha(channels)) {
8 4 if (i_has_alpha(channels)) {
942 32 8 while (work_count--) {
32 8 while (work_count--) {
944 32 0 if (src_alpha) {
32 0 if (src_alpha) {
947 32 0 if (dest_alpha > IM_SAMPLE_MAX)
32 0 if (dest_alpha > IM_SAMPLE_MAX)
949 96 32 for (ch = 0; ch < color_channels; ++ch) {
96 32 for (ch = 0; ch < color_channels; ++ch) {
953 96 0 if (total < 0)
80 16 if (total < 0)
964 16 4 while (work_count--) {
16 4 while (work_count--) {
966 16 0 if (src_alpha) {
16 0 if (src_alpha) {
967 48 16 for (ch = 0; ch < color_channels; ++ch) {
48 16 for (ch = 0; ch < color_channels; ++ch) {
969 48 0 if (total < 0)
32 16 if (total < 0)
997 12 0 int color_channels = i_color_channels(channels);
8 4 int color_channels = i_color_channels(channels);
284 0 int color_channels = i_color_channels(channels);
8 276 int color_channels = i_color_channels(channels);
999 12 0 if (i_has_alpha(channels)) {
8 4 if (i_has_alpha(channels)) {
284 0 if (i_has_alpha(channels)) {
8 276 if (i_has_alpha(channels)) {
1000 32 8 while (work_count--) {
32 8 while (work_count--) {
1002 32 0 if (src_alpha) {
32 0 if (src_alpha) {
1006 96 32 for (ch = 0; ch < color_channels; ++ch) {
96 32 for (ch = 0; ch < color_channels; ++ch) {
1011 0 96 IM_WORK_T diff = src_da < dest_sa ? src_da : dest_sa;
1021 16 4 while (work_count--) {
8581 276 while (work_count--) {
1023 16 0 if (src_alpha) {
8371 210 if (src_alpha) {
1024 48 16 for (ch = 0; ch < color_channels; ++ch) {
25113 8371 for (ch = 0; ch < color_channels; ++ch) {
1029 0 48 IM_WORK_T diff = src_da < dest_sa ? src_da : dest_sa;
1065 12 0 int color_channels = i_color_channels(channels);
8 4 int color_channels = i_color_channels(channels);
12 0 int color_channels = i_color_channels(channels);
8 4 int color_channels = i_color_channels(channels);
1067 12 0 if (i_has_alpha(channels)) {
8 4 if (i_has_alpha(channels)) {
12 0 if (i_has_alpha(channels)) {
8 4 if (i_has_alpha(channels)) {
1068 32 8 while (work_count--) {
32 8 while (work_count--) {
1071 32 0 if (src_alpha) {
32 0 if (src_alpha) {
1075 96 32 for (ch = 0; ch < color_channels; ++ch) {
96 32 for (ch = 0; ch < color_channels; ++ch) {
1080 0 96 IM_WORK_T minc = ScaDa < DcaSa ? ScaDa : DcaSa;
1094 16 4 while (work_count--) {
16 4 while (work_count--) {
1097 16 0 if (src_alpha) {
16 0 if (src_alpha) {
1098 48 16 for (ch = 0; ch < color_channels; ++ch) {
48 16 for (ch = 0; ch < color_channels; ++ch) {
1100 48 0 ? outp->channel[ch] : inp->channel[ch];
1120 12 0 int color_channels = i_color_channels(channels);
8 4 int color_channels = i_color_channels(channels);
12 0 int color_channels = i_color_channels(channels);
8 4 int color_channels = i_color_channels(channels);
1122 12 0 if (i_has_alpha(channels)) {
8 4 if (i_has_alpha(channels)) {
12 0 if (i_has_alpha(channels)) {
8 4 if (i_has_alpha(channels)) {
1123 32 8 while (work_count--) {
32 8 while (work_count--) {
1126 32 0 if (src_alpha) {
32 0 if (src_alpha) {
1130 96 32 for (ch = 0; ch < color_channels; ++ch) {
96 32 for (ch = 0; ch < color_channels; ++ch) {
1135 96 0 IM_WORK_T maxc = ScaDa > DcaSa ? ScaDa : DcaSa;
1149 16 4 while (work_count--) {
16 4 while (work_count--) {
1152 16 0 if (src_alpha) {
16 0 if (src_alpha) {
1153 48 16 for (ch = 0; ch < color_channels; ++ch) {
48 16 for (ch = 0; ch < color_channels; ++ch) {
1155 0 48 ? outp->channel[ch] : inp->channel[ch];
1179 12 0 if (channels > 2) {
12 0 if (channels > 2) {
1184 12 0 if (i_has_alpha(channels)) {
8 4 if (i_has_alpha(channels)) {
12 0 if (i_has_alpha(channels)) {
8 4 if (i_has_alpha(channels)) {
1185 32 8 while (work_count--) {
32 8 while (work_count--) {
1189 32 0 if (c.channel[1] && inp->channel[3] && outp->channel[3]) {
32 0 if (c.channel[1] && inp->channel[3] && outp->channel[3]) {
32 0 if (c.channel[1] && inp->channel[3] && outp->channel[3]) {
32 0 if (c.channel[1] && inp->channel[3] && outp->channel[3]) {
1193 32 0 if (inp->channel[1]) {
32 0 if (inp->channel[1]) {
1211 16 4 while (work_count--) {
16 4 while (work_count--) {
1215 16 0 if (c.channel[1] && inp->channel[3]) {
16 0 if (c.channel[1] && inp->channel[3]) {
1219 16 0 if (inp->channel[1]) {
16 0 if (inp->channel[1]) {
1240 12 0 if (channels > 2) {
12 0 if (channels > 2) {
1245 48 12 while (work_count--) {
48 12 while (work_count--) {
1263 12 0 if (channels > 2) {
12 0 if (channels > 2) {
1268 48 12 while (work_count--) {
48 12 while (work_count--) {
1288 312 0 if (channels > 2) {
12 0 if (channels > 2) {
1293 45048 312 while (work_count--) {
48 12 while (work_count--) {