Branch Coverage

blib/lib/Image/ExifTool/MakerNotes.pm
Criterion Covered Total %
branch 139 254 54.7


line true false branch
1135 62 117 if ($make =~ /^Canon/) { }
5 112 elsif ($make =~ /^CASIO/) { }
4 108 elsif ($make =~ /^(General Imaging Co.|GEDSC IMAGING CORP.)/i) { }
0 108 elsif ($make =~ /^KYOCERA/) { }
0 108 elsif ($make =~ /^Leica Camera AG/) { }
4 104 elsif ($make =~ /^OLYMPUS/ and $model =~ /^E-(1|300|330)\b/) { }
0 104 elsif ($make =~ /^OLYMPUS/ and $model =~ /^(C2500L|C-1Z?|C-5000Z|X-2|C720UZ|C725UZ|C150|C2Z|E-10|E-20|FerrariMODEL2003|u20D|u10D)\b/) { }
13 91 elsif ($make =~ /^(Panasonic|JVC)\b/) { }
12 79 elsif ($make =~ /^SONY/) { }
0 79 elsif ($et->{'TIFF_TYPE'} eq 'SRW' and $make eq 'SAMSUNG' and $model eq 'EK-GN120') { }
9 70 elsif ($make eq 'FUJIFILM') { }
0 70 elsif ($make =~ /^TOSHIBA/) { }
8 62 elsif ($make =~ /^PENTAX/) { }
3 59 elsif ($make =~ /^Konica Minolta/i) { }
4 55 elsif ($make =~ /^Minolta/) { }
1136 5 57 $model =~ /\b(20D|350D|REBEL XT|Kiss Digital N)\b/ ? :
1139 0 62 if $model =~ /\b(FV\b|OPTURA)/
1141 0 62 if $model =~ /(PowerShot|IXUS|IXY)/
1146 0 5 $et->{'FILE_TYPE'} =~ /^(RIFF|MOV)$/ ? :
1152 0 0 if ($model eq 'S2') { }
0 0 elsif ($model eq 'LEICA M MONOCHROM (Typ 246)') { }
0 0 elsif ($model eq 'LEICA M (Typ 240)') { }
0 0 elsif ($model =~ /^(R8|R9|M8)\b/) { }
1154 0 0 $et->{'FILE_TYPE'} eq 'JPEG' ? :
1175 0 12 if ($model =~ /^(DSLR-.*|SLT-A(33|35|55V)|NEX-(3|5|C3|VG10E))$/ or $et->{'OlympusCAMER'}) { }
1224 0 3662 if $format < 1 or $format > 13
1227 1559 2103 if $size <= 4
1229 2103 0 if $tagPtr
1231 2103 0 unless (defined $valBlock{$valPtr} and $valBlock{$valPtr} > $size)
1236 2103 0 unless (defined $valBlkAdj{$valPtr} and $valBlkAdj{$valPtr} > $size)
1239 1957 146 if (defined $valBlkAdj{'MIN'}) { }
1241 5 1952 if $valBlkAdj{'MIN'} < 12 or $valBlkAdj{'MIN'} > $valPtr
1242 5 1952 if $valBlkAdj{'MAX'} > $end
1262 41 149 if $dirInfo->{'FixOffsets'} or $dirInfo->{'NoFixBase'}
1270 0 149 defined $fixBase && $fixBase ne '' ? :
1275 3 146 unless %$valBlock
1281 65 81 if ($et->{'Make'} =~ /^Canon/ and $dirInfo->{'DirLen'} > 8)
1284 23 42 if ($footer =~ /^(II\x2a\0|MM\0\x2a)/ and substr($footer, 0, 2) eq &GetByteOrder())
1289 0 23 if ($setBase) { }
1293 23 0 unless $fix
1302 0 0 if (not $endDiff or $endDiff == 1)
1328 123 0 defined $makeDiff ? :
1329 0 123 if $debug
1335 0 1639 if $debug
1337 1516 123 if (defined $last)
1339 1499 17 if ($gap == 0 or $gap == 1) { }
12 5 elsif ($gap == -12 and not $entryBased) { }
0 5 elsif ($gap < 0) { }
2 3 elsif ($gap >= $ifdLen) { }
1346 0 0 if $valPtr
1350 0 2 if abs $valPtr - $expected <= 4
1353 2 1514 if $minPt < 12
1358 3 120 if ($countNeg12 > $countZero && $valBlkAdj->{'MIN'} >= $ifdLen - 2 || ($valBlkAdj->{'MIN'} == $ifdLen - 2 || $valBlkAdj->{'MIN'} == $ifdLen + 2) and $valBlkAdj->{'MAX'} <= $dirInfo->{'DirLen'} - 2) { }
1365 0 3 if $verbose
1370 0 120 if $countOverlap
1371 0 120 if ($entryBased)
1377 26 94 if ($tagPtr{'3584'})
1379 26 0 if $ptr > 0 and $ptr <= length($$dataPt) - 8 and substr($$dataPt, $ptr, 8) eq "PrintIM\0"
1383 0 94 if ($dirInfo->{'FixBase'} and $dirInfo->{'FixBase'} == 2)
1384 0 0 if $diff >= 0 and $diff <= 24
1393 3 94 if ($entryBased)
1394 0 3 if $debug
1410 3 0 unless $setBase
1415 97 0 unless ($setBase)
1417 0 97 unless defined $makeDiff
1419 94 3 if $diff == 0 or $diff == 4
1422 1 2 if $diff == $_
1429 0 2 unless defined $makeDiff
1432 2 0 if ($dirInfo->{'FixBase'}) { }
0 0 elsif (defined $fixBase) { }
1434 0 2 if ($dataPos - $fix + $dirStart <= 0)
1435 0 0 defined $relative ? :
1437 0 2 if ($setBase)
1442 0 0 if $fixBase ne ""
1446 0 0 if ($diff < 0 or $diff > 16 or $diff & 1)
1452 0 2 if (defined $fixedBy)
1476 66 0 defined $dirInfo->{'DirLen'} ? :
1484 10 56 unless $dirInfo->{'Base'}
1485 57 9 unless $dirInfo->{'DataPos'}
1489 66 0 if ($tagInfo and $tagInfo->{'SubDirectory'})
1491 56 10 unless ($subdir->{'ProcessProc'} and $subdir->{'ProcessProc'} eq \&Image::ExifTool::MakerNotes::ProcessUnknown || $subdir->{'ProcessProc'} eq \&Image::ExifTool::MakerNotes::ProcessUnknownOrPreview)
1498 18 38 if (defined $subdir->{'Start'})
1502 9 47 if ($subdir->{'Base'})
1514 9 0 if ($subdir->{'Base'} =~ /\$start\b/)
1517 0 9 if ($subdir->{'ProcessProc'} and $subdir->{'ProcessProc'} eq \&Image::ExifTool::MakerNotes::FixLeicaBase)
1526 6 50 if ($subdir->{'OffsetPt'})
1527 6 0 if ($subdir->{'ByteOrder'} =~ /^Little/i) { }
0 0 elsif ($subdir->{'ByteOrder'} =~ /^Big/i) { }
1545 66 0 if ($dirLen >= 14 + $firstTry)
1548 0 133 if $offset + 14 > $dirLen
1553 0 133 if (&SetByteOrder(substr($$dataPt, $pos, 2)) and &Get16u($dataPt, $pos + 2) == 42)
1558 6 127 if (defined $ifdOffsetPos)
1561 6 0 if ($ptr >= $ifdOffsetPos + 4 and $ptr + $offset + 14 <= $dirLen)
1578 8 119 unless $num
1580 9 110 if (not $num & 255) { }
48 62 elsif ($num & 65280) { }
1589 0 71 if ($bytesFromEnd < 4)
1590 0 0 unless $bytesFromEnd == 2 or $bytesFromEnd == 0
1598 4 1659 unless ($format)
1600 0 0 if ($num == 23 and $index == 21 and $et->{'Make'} eq "SAMSUNG")
1607 0 4 unless $count or $index == 0
1609 0 4 if $index == $num - 1 and $et->{'Model'} =~ /EOS 40D/
1612 0 12 if $num == 12 and $et->{'Make'} eq "SONY" and $index >= 8
1614 0 1663 if $format == 16 and $et->{'Make'} eq "Apple"
1619 12 1651 if $format < 1 or $format > 13
1622 0 1651 if $count & 4278190080
1624 1651 0 unless $num == 1
1626 0 0 if ($valueSize > 4)
1627 0 0 if $valueSize > $size
1629 0 0 if $valuePtr > 65536
1651 0 0 if (%$valBlock)
1656 0 0 if ($diff > 8)
1662 0 0 if ($tagTablePtr)
1677 0 47 if ($et->{'HTML_DUMP'} and $dirInfo->{'DirLen'} > 8)
1682 0 0 if ($footer =~ /^(II\x2a\0|MM\0\x2a)/ and substr($footer, 0, 2) eq &GetByteOrder())
1686 0 0 if ($oldOffset != $newOffset)
1704 0 0 unless my $dataPt = $dirInfo->{'DataPt'}
1720 0 0 unless my $dataPt = $dirInfo->{'DataPt'}
1725 0 0 unless $dirInfo->{'DirLen'} >= 4
1744 0 3 if ($dirLen > 6 and substr($$dataPt, $dirStart, 3) eq "\377\330\377")
1746 0 0 if ($et->{'HTML_DUMP'})
1768 0 1 if ($dirLen > 6 and substr($$dataPt, $dirStart, 3) eq "\377\330\377") { }
1769 0 0 if ($et->{'NEW_VALUE'}{$Image::ExifTool::Extra{'PreviewImage'}}) { }
1772 0 0 if ($et->Options("Verbose") > 1)
1774 0 0 if $newVal
1797 6 1 if (defined $loc) { }
1799 0 6 if ($et->Options("Verbose") > 1)