Branch Coverage

blib/lib/Image/ExifTool/MakerNotes.pm
Criterion Covered Total %
branch 138 252 54.7


line true false branch
1134 56 109 if ($make =~ /^Canon/) { }
5 104 elsif ($make =~ /^CASIO/) { }
4 100 elsif ($make =~ /^(General Imaging Co.|GEDSC IMAGING CORP.)/i) { }
0 100 elsif ($make =~ /^KYOCERA/) { }
0 100 elsif ($make =~ /^Leica Camera AG/) { }
4 96 elsif ($make =~ /^OLYMPUS/ and $model =~ /^E-(1|300|330)\b/) { }
0 96 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 83 elsif ($make =~ /^(Panasonic|JVC)\b/) { }
12 71 elsif ($make =~ /^SONY/) { }
0 71 elsif ($et->{'TIFF_TYPE'} eq 'SRW' and $make eq 'SAMSUNG' and $model eq 'EK-GN120') { }
7 64 elsif ($make eq 'FUJIFILM') { }
0 64 elsif ($make =~ /^TOSHIBA/) { }
8 56 elsif ($make =~ /^PENTAX/) { }
3 53 elsif ($make =~ /^Konica Minolta/i) { }
4 49 elsif ($make =~ /^Minolta/) { }
1135 5 51 $model =~ /\b(20D|350D|REBEL XT|Kiss Digital N)\b/ ? :
1138 0 56 if $model =~ /\b(FV\b|OPTURA)/
1140 0 56 if $model =~ /(PowerShot|IXUS|IXY)/
1145 0 5 $et->{'FILE_TYPE'} =~ /^(RIFF|MOV)$/ ? :
1151 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/) { }
1153 0 0 $et->{'FILE_TYPE'} eq 'JPEG' ? :
1174 0 12 if ($model =~ /^(DSLR-.*|SLT-A(33|35|55V)|NEX-(3|5|C3|VG10E))$/ or $et->{'OlympusCAMER'}) { }
1223 0 3427 if $format < 1 or $format > 13
1226 1496 1931 if $size <= 4
1228 1931 0 if $tagPtr
1230 1931 0 unless (defined $valBlock{$valPtr} and $valBlock{$valPtr} > $size)
1235 1931 0 unless (defined $valBlkAdj{$valPtr} and $valBlkAdj{$valPtr} > $size)
1238 1796 135 if (defined $valBlkAdj{'MIN'}) { }
1240 5 1791 if $valBlkAdj{'MIN'} < 12 or $valBlkAdj{'MIN'} > $valPtr
1241 5 1791 if $valBlkAdj{'MAX'} > $end
1261 38 138 if $dirInfo->{'FixOffsets'} or $dirInfo->{'NoFixBase'}
1269 0 138 defined $fixBase && $fixBase ne '' ? :
1274 3 135 unless %$valBlock
1280 60 75 if ($et->{'Make'} =~ /^Canon/ and $dirInfo->{'DirLen'} > 8)
1283 23 37 if ($footer =~ /^(II\x2a\0|MM\0\x2a)/ and substr($footer, 0, 2) eq &GetByteOrder())
1288 0 23 if ($setBase) { }
1292 23 0 unless $fix
1301 0 0 if (not $endDiff or $endDiff == 1)
1327 112 0 defined $makeDiff ? :
1328 0 112 if $debug
1334 0 1467 if $debug
1336 1355 112 if (defined $last)
1338 1338 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) { }
1345 0 0 if $valPtr
1349 0 2 if abs $valPtr - $expected <= 4
1352 2 1353 if $minPt < 12
1357 3 109 if ($countNeg12 > $countZero && $valBlkAdj->{'MIN'} >= $ifdLen - 2 || ($valBlkAdj->{'MIN'} == $ifdLen - 2 || $valBlkAdj->{'MIN'} == $ifdLen + 2) and $valBlkAdj->{'MAX'} <= $dirInfo->{'DirLen'} - 2) { }
1364 0 3 if $verbose
1369 0 109 if $countOverlap
1370 0 109 if ($entryBased)
1376 21 88 if ($tagPtr{'3584'})
1378 21 0 if $ptr > 0 and $ptr <= length($$dataPt) - 8 and substr($$dataPt, $ptr, 8) eq "PrintIM\0"
1382 0 88 if ($dirInfo->{'FixBase'} and $dirInfo->{'FixBase'} == 2)
1383 0 0 if $diff >= 0 and $diff <= 24
1392 3 88 if ($entryBased)
1393 0 3 if $debug
1409 3 0 unless $setBase
1414 91 0 unless ($setBase)
1416 0 91 unless defined $makeDiff
1418 88 3 if $diff == 0 or $diff == 4
1421 1 2 if $diff == $_
1428 0 2 unless defined $makeDiff
1431 2 0 if ($dirInfo->{'FixBase'}) { }
0 0 elsif (defined $fixBase) { }
1433 0 2 if ($dataPos - $fix + $dirStart <= 0)
1434 0 0 defined $relative ? :
1436 0 2 if ($setBase)
1441 0 0 if $fixBase ne ""
1445 0 0 if ($diff < 0 or $diff > 16 or $diff & 1)
1451 0 2 if (defined $fixedBy)
1475 63 0 defined $dirInfo->{'DirLen'} ? :
1483 10 53 unless $dirInfo->{'Base'}
1484 54 9 unless $dirInfo->{'DataPos'}
1488 63 0 if ($tagInfo and $tagInfo->{'SubDirectory'})
1490 53 10 unless ($subdir->{'ProcessProc'} and $subdir->{'ProcessProc'} eq \&Image::ExifTool::MakerNotes::ProcessUnknown || $subdir->{'ProcessProc'} eq \&Image::ExifTool::MakerNotes::ProcessUnknownOrPreview)
1497 18 35 if (defined $subdir->{'Start'})
1501 8 45 if ($subdir->{'Base'})
1513 8 0 if ($subdir->{'Base'} =~ /\$start\b/)
1516 0 8 if ($subdir->{'ProcessProc'} and $subdir->{'ProcessProc'} eq \&Image::ExifTool::MakerNotes::FixLeicaBase)
1525 5 48 if ($subdir->{'OffsetPt'})
1526 5 0 if ($subdir->{'ByteOrder'} =~ /^Little/i) { }
0 0 elsif ($subdir->{'ByteOrder'} =~ /^Big/i) { }
1544 63 0 if ($dirLen >= 14 + $firstTry)
1547 0 130 if $offset + 14 > $dirLen
1552 0 130 if (&SetByteOrder(substr($$dataPt, $pos, 2)) and &Get16u($dataPt, $pos + 2) == 42)
1557 5 125 if (defined $ifdOffsetPos)
1560 5 0 if ($ptr >= $ifdOffsetPos + 4 and $ptr + $offset + 14 <= $dirLen)
1577 8 117 unless $num
1579 9 108 if (not $num & 255) { }
48 60 elsif ($num & 65280) { }
1588 0 69 if ($bytesFromEnd < 4)
1589 0 0 unless $bytesFromEnd == 2 or $bytesFromEnd == 0
1597 4 1615 unless ($format)
1599 0 0 if ($num == 23 and $index == 21 and $et->{'Make'} eq "SAMSUNG")
1606 0 4 unless $count or $index == 0
1608 0 4 if $index == $num - 1 and $et->{'Model'} =~ /EOS 40D/
1611 0 12 if $num == 12 and $et->{'Make'} eq "SONY" and $index >= 8
1616 12 1607 if $format < 1 or $format > 13
1619 0 1607 if $count & 4278190080
1621 1607 0 unless $num == 1
1623 0 0 if ($valueSize > 4)
1624 0 0 if $valueSize > $size
1626 0 0 if $valuePtr > 65536
1648 0 0 if (%$valBlock)
1653 0 0 if ($diff > 8)
1659 0 0 if ($tagTablePtr)
1674 0 43 if ($et->{'HTML_DUMP'} and $dirInfo->{'DirLen'} > 8)
1679 0 0 if ($footer =~ /^(II\x2a\0|MM\0\x2a)/ and substr($footer, 0, 2) eq &GetByteOrder())
1683 0 0 if ($oldOffset != $newOffset)
1701 0 0 unless my $dataPt = $dirInfo->{'DataPt'}
1717 0 0 unless my $dataPt = $dirInfo->{'DataPt'}
1722 0 0 unless $dirInfo->{'DirLen'} >= 4
1741 0 3 if ($dirLen > 6 and substr($$dataPt, $dirStart, 3) eq "\377\330\377")
1743 0 0 if ($et->{'HTML_DUMP'})
1765 0 1 if ($dirLen > 6 and substr($$dataPt, $dirStart, 3) eq "\377\330\377") { }
1766 0 0 if ($et->{'NEW_VALUE'}{$Image::ExifTool::Extra{'PreviewImage'}}) { }
1769 0 0 if ($et->Options("Verbose") > 1)
1771 0 0 if $newVal
1794 6 1 if (defined $loc) { }
1796 0 6 if ($et->Options("Verbose") > 1)