| line |
true |
false |
branch |
|
364
|
4 |
0 |
if ( |
|
365
|
4 |
0 |
data == NULL || out_len == NULL || desc == NULL || |
|
|
4 |
0 |
data == NULL || out_len == NULL || desc == NULL || |
|
366
|
4 |
0 |
desc->width == 0 || desc->height == 0 || |
|
|
4 |
0 |
desc->width == 0 || desc->height == 0 || |
|
367
|
4 |
0 |
desc->channels < 3 || desc->channels > 4 || |
|
|
4 |
0 |
desc->channels < 3 || desc->channels > 4 || |
|
368
|
4 |
0 |
desc->colorspace > 1 || |
|
369
|
0 |
4 |
desc->height >= QOI_PIXELS_MAX / desc->width |
|
380
|
0 |
4 |
if (!bytes) { |
|
406
|
90000 |
4 |
for (px_pos = 0; px_pos < px_len; px_pos += channels) { |
|
411
|
0 |
90000 |
if (channels == 4) { |
|
415
|
80721 |
9279 |
if (px.v == px_prev.v) { |
|
417
|
80293 |
428 |
if (run == 62 || px_pos == px_end) { |
|
|
4 |
80289 |
if (run == 62 || px_pos == px_end) { |
|
425
|
1544 |
7735 |
if (run > 0) { |
|
432
|
5536 |
3743 |
if (index[index_pos].v == px.v) { |
|
438
|
3743 |
0 |
if (px.rgba.a == px_prev.rgba.a) { |
|
446
|
2588 |
1155 |
if ( |
|
447
|
1005 |
1583 |
vr > -3 && vr < 2 && |
|
|
660 |
345 |
vr > -3 && vr < 2 && |
|
448
|
279 |
381 |
vg > -3 && vg < 2 && |
|
|
279 |
0 |
vg > -3 && vg < 2 && |
|
449
|
78 |
201 |
vb > -3 && vb < 2 |
|
453
|
2660 |
1005 |
else if ( |
|
454
|
1418 |
1242 |
vg_r > -9 && vg_r < 8 && |
|
|
1412 |
6 |
vg_r > -9 && vg_r < 8 && |
|
455
|
1389 |
23 |
vg > -33 && vg < 32 && |
|
|
1362 |
27 |
vg > -33 && vg < 32 && |
|
456
|
1182 |
180 |
vg_b > -9 && vg_b < 8 |
|
480
|
32 |
4 |
for (i = 0; i < (int)sizeof(qoi_padding); i++) { |
|
497
|
4 |
0 |
if ( |
|
498
|
4 |
0 |
data == NULL || desc == NULL || |
|
|
0 |
4 |
data == NULL || desc == NULL || |
|
499
|
0 |
0 |
(channels != 0 && channels != 3 && channels != 4) || |
|
|
0 |
0 |
(channels != 0 && channels != 3 && channels != 4) || |
|
|
0 |
4 |
(channels != 0 && channels != 3 && channels != 4) || |
|
514
|
4 |
0 |
desc->width == 0 || desc->height == 0 || |
|
|
4 |
0 |
desc->width == 0 || desc->height == 0 || |
|
515
|
4 |
0 |
desc->channels < 3 || desc->channels > 4 || |
|
|
4 |
0 |
desc->channels < 3 || desc->channels > 4 || |
|
516
|
4 |
0 |
desc->colorspace > 1 || |
|
|
4 |
0 |
desc->colorspace > 1 || |
|
518
|
0 |
4 |
desc->height >= QOI_PIXELS_MAX / desc->width |
|
523
|
4 |
0 |
if (channels == 0) { |
|
529
|
0 |
4 |
if (!pixels) { |
|
540
|
90000 |
4 |
for (px_pos = 0; px_pos < px_len; px_pos += channels) { |
|
541
|
68619 |
21381 |
if (run > 0) { |
|
544
|
9789 |
11592 |
else if (p < chunks_len) { |
|
547
|
2087 |
7702 |
if (b1 == QOI_OP_RGB) { |
|
552
|
0 |
7702 |
else if (b1 == QOI_OP_RGBA) { |
|
558
|
4794 |
2908 |
else if ((b1 & QOI_MASK_2) == QOI_OP_INDEX) { |
|
561
|
78 |
2830 |
else if ((b1 & QOI_MASK_2) == QOI_OP_DIFF) { |
|
566
|
1109 |
1721 |
else if ((b1 & QOI_MASK_2) == QOI_OP_LUMA) { |
|
573
|
1721 |
0 |
else if ((b1 & QOI_MASK_2) == QOI_OP_RUN) { |
|
584
|
0 |
90000 |
if (channels == 4) { |
|
600
|
0 |
0 |
if (!f) { |
|
605
|
0 |
0 |
if (!encoded) { |
|
616
|
0 |
0 |
return err ? 0 : size; |
|
624
|
0 |
0 |
if (!f) { |
|
630
|
0 |
0 |
if (size <= 0 || fseek(f, 0, SEEK_SET) != 0) { |
|
|
0 |
0 |
if (size <= 0 || fseek(f, 0, SEEK_SET) != 0) { |
|
636
|
0 |
0 |
if (!data) { |
|
643
|
0 |
0 |
pixels = (bytes_read != size) ? NULL : qoi_decode(data, bytes_read, desc, channels); |