Branch Coverage

img8.c
Criterion Covered Total %
branch 217 270 80.3


line true false branch
153 1102 3 if (x < 1 || y < 1) {
2 1100 if (x < 1 || y < 1) {
157 1099 1 if (ch < 1 || ch > MAXCHANNELS) {
1 1098 if (ch < 1 || ch > MAXCHANNELS) {
163 0 1098 if (bytes / y / ch != x) {
168 1089 9 if (im == NULL)
178 0 1098 if ( (im->idata=mymalloc(im->bytes)) == NULL)
213 5534313 3 if ( x>-1 && xxsize && y>-1 && yysize ) {
5507288 27025 if ( x>-1 && xxsize && y>-1 && yysize ) {
5507128 160 if ( x>-1 && xxsize && y>-1 && yysize ) {
5506556 572 if ( x>-1 && xxsize && y>-1 && yysize ) {
214 16231919 5506556 for(ch=0;chchannels;ch++)
215 16231918 1 if (im->ch_mask&(1<
238 24102033 27331 if (x>-1 && xxsize && y>-1 && yysize) {
24049353 52680 if (x>-1 && xxsize && y>-1 && yysize) {
24021603 27750 if (x>-1 && xxsize && y>-1 && yysize) {
23989610 31993 if (x>-1 && xxsize && y>-1 && yysize) {
239 70336360 23989610 for(ch=0;chchannels;ch++)
243 419994 139754 for(ch=0;chchannels;ch++) val->channel[ch] = 0;
269 156771 0 if (y >=0 && y < im->ysize && l < im->xsize && l >= 0) {
156771 0 if (y >=0 && y < im->ysize && l < im->xsize && l >= 0) {
156771 0 if (y >=0 && y < im->ysize && l < im->xsize && l >= 0) {
156771 0 if (y >=0 && y < im->ysize && l < im->xsize && l >= 0) {
270 0 156771 if (r > im->xsize)
274 4499074 156771 for (i = 0; i < count; ++i) {
275 13245880 4499074 for (ch = 0; ch < im->channels; ++ch)
307 507020 0 if (y >=0 && y < im->ysize && l < im->xsize && l >= 0) {
506960 60 if (y >=0 && y < im->ysize && l < im->xsize && l >= 0) {
506960 0 if (y >=0 && y < im->ysize && l < im->xsize && l >= 0) {
506960 0 if (y >=0 && y < im->ysize && l < im->xsize && l >= 0) {
308 300 506660 if (r > im->xsize)
312 7360943 506960 for (i = 0; i < count; ++i) {
313 21346982 7360943 for (ch = 0; ch < im->channels; ++ch) {
314 20420761 926221 if (im->ch_mask & (1 << ch))
336 15 2 if ( x>-1 && xxsize && y>-1 && yysize ) {
13 2 if ( x>-1 && xxsize && y>-1 && yysize ) {
11 2 if ( x>-1 && xxsize && y>-1 && yysize ) {
10 1 if ( x>-1 && xxsize && y>-1 && yysize ) {
337 30 10 for(ch=0;chchannels;ch++)
338 29 1 if (im->ch_mask&(1<
356 17 1 if (x>-1 && xxsize && y>-1 && yysize) {
16 1 if (x>-1 && xxsize && y>-1 && yysize) {
16 0 if (x>-1 && xxsize && y>-1 && yysize) {
16 0 if (x>-1 && xxsize && y>-1 && yysize) {
357 48 16 for(ch=0;chchannels;ch++) {
388 2393 0 if (y >=0 && y < im->ysize && l < im->xsize && l >= 0) {
2393 0 if (y >=0 && y < im->ysize && l < im->xsize && l >= 0) {
2393 0 if (y >=0 && y < im->ysize && l < im->xsize && l >= 0) {
2393 0 if (y >=0 && y < im->ysize && l < im->xsize && l >= 0) {
389 0 2393 if (r > im->xsize)
393 310719 2393 for (i = 0; i < count; ++i) {
394 940450 310719 for (ch = 0; ch < im->channels; ++ch)
426 1438 0 if (y >=0 && y < im->ysize && l < im->xsize && l >= 0) {
1438 0 if (y >=0 && y < im->ysize && l < im->xsize && l >= 0) {
1438 0 if (y >=0 && y < im->ysize && l < im->xsize && l >= 0) {
1438 0 if (y >=0 && y < im->ysize && l < im->xsize && l >= 0) {
427 0 1438 if (r > im->xsize)
431 164543 1438 for (i = 0; i < count; ++i) {
432 493653 164543 for (ch = 0; ch < im->channels; ++ch) {
433 493652 1 if (im->ch_mask & (1 << ch))
464 205364 0 if (y >=0 && y < im->ysize && l < im->xsize && l >= 0) {
205364 0 if (y >=0 && y < im->ysize && l < im->xsize && l >= 0) {
205364 0 if (y >=0 && y < im->ysize && l < im->xsize && l >= 0) {
205364 0 if (y >=0 && y < im->ysize && l < im->xsize && l >= 0) {
465 0 205364 if (r > im->xsize)
471 202129 3235 if (chans) {
473 208148 202129 for (ch = 0; ch < chan_count; ++ch) {
474 208148 0 if (chans[ch] < 0 || chans[ch] >= im->channels) {
0 208148 if (chans[ch] < 0 || chans[ch] >= im->channels) {
480 1146462 202129 for (i = 0; i < w; ++i) {
481 1927436 1146462 for (ch = 0; ch < chan_count; ++ch) {
489 3235 0 if (chan_count <= 0 || chan_count > im->channels) {
0 3235 if (chan_count <= 0 || chan_count > im->channels) {
495 380521 3235 for (i = 0; i < w; ++i) {
496 1115175 380521 for (ch = 0; ch < chan_count; ++ch) {
529 162 154 for (ch = 0; ch < chan_count; ++ch) {
530 162 0 if (chans[ch] < 0 || chans[ch] >= im->channels) {
0 162 if (chans[ch] < 0 || chans[ch] >= im->channels) {
535 154 0 if (y >=0 && y < im->ysize && l < im->xsize && l >= 0) {
154 0 if (y >=0 && y < im->ysize && l < im->xsize && l >= 0) {
154 0 if (y >=0 && y < im->ysize && l < im->xsize && l >= 0) {
154 0 if (y >=0 && y < im->ysize && l < im->xsize && l >= 0) {
536 0 154 if (r > im->xsize)
542 154 0 if (chans) {
544 162 154 for (ch = 0; ch < chan_count; ++ch) {
545 162 0 if (chans[ch] < 0 || chans[ch] >= im->channels) {
0 162 if (chans[ch] < 0 || chans[ch] >= im->channels) {
551 22522 154 for (i = 0; i < w; ++i) {
552 22566 22522 for (ch = 0; ch < chan_count; ++ch) {
560 0 0 if (chan_count <= 0 || chan_count > im->channels) {
0 0 if (chan_count <= 0 || chan_count > im->channels) {
566 0 0 for (i = 0; i < w; ++i) {
567 0 0 for (ch = 0; ch < chan_count; ++ch) {
602 196 1 if (y >=0 && y < im->ysize && l < im->xsize && l >= 0) {
195 1 if (y >=0 && y < im->ysize && l < im->xsize && l >= 0) {
193 2 if (y >=0 && y < im->ysize && l < im->xsize && l >= 0) {
192 1 if (y >=0 && y < im->ysize && l < im->xsize && l >= 0) {
603 1 191 if (r > im->xsize)
609 19 173 if (chans) {
613 54 12 for (ch = 0; ch < chan_count; ++ch) {
614 51 3 if (chans[ch] < 0 || chans[ch] >= im->channels) {
4 47 if (chans[ch] < 0 || chans[ch] >= im->channels) {
619 3 44 if (!((1 << chans[ch]) & im->ch_mask))
622 9 3 if (all_in_mask) {
623 42 9 for (i = 0; i < w; ++i) {
624 120 42 for (ch = 0; ch < chan_count; ++ch) {
632 3 3 for (i = 0; i < w; ++i) {
633 9 3 for (ch = 0; ch < chan_count; ++ch) {
634 6 3 if (im->ch_mask & (1 << (chans[ch])))
644 173 0 if (chan_count <= 0 || chan_count > im->channels) {
0 173 if (chan_count <= 0 || chan_count > im->channels) {
650 22633 173 for (i = 0; i < w; ++i) {
652 67899 22633 for (ch = 0; ch < chan_count; ++ch) {
653 67896 3 if (im->ch_mask & mask)
693 36 1 if (y >=0 && y < im->ysize && l < im->xsize && l >= 0) {
35 1 if (y >=0 && y < im->ysize && l < im->xsize && l >= 0) {
33 2 if (y >=0 && y < im->ysize && l < im->xsize && l >= 0) {
32 1 if (y >=0 && y < im->ysize && l < im->xsize && l >= 0) {
694 1 31 if (r > im->xsize)
700 19 13 if (chans) {
704 54 12 for (ch = 0; ch < chan_count; ++ch) {
705 51 3 if (chans[ch] < 0 || chans[ch] >= im->channels) {
4 47 if (chans[ch] < 0 || chans[ch] >= im->channels) {
710 3 44 if (!((1 << chans[ch]) & im->ch_mask))
713 9 3 if (all_in_mask) {
714 42 9 for (i = 0; i < w; ++i) {
715 120 42 for (ch = 0; ch < chan_count; ++ch) {
724 3 3 for (i = 0; i < w; ++i) {
725 9 3 for (ch = 0; ch < chan_count; ++ch) {
726 6 3 if (im->ch_mask & (1 << (chans[ch])))
736 13 0 if (chan_count <= 0 || chan_count > im->channels) {
0 13 if (chan_count <= 0 || chan_count > im->channels) {
742 32 13 for (i = 0; i < w; ++i) {
744 96 32 for (ch = 0; ch < chan_count; ++ch) {
745 93 3 if (im->ch_mask & mask)