Coverage Report

Created: 2026-04-12 06:53

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/exiv2/src/nikonmn_int.cpp
Line
Count
Source
1
// SPDX-License-Identifier: GPL-2.0-or-later
2
3
// included header files
4
#include "nikonmn_int.hpp"
5
#include "config.h"
6
#include "exif.hpp"
7
#include "i18n.h"  // NLS support.
8
#include "image_int.hpp"
9
#include "makernote_int.hpp"
10
#include "tags.hpp"
11
#include "tags_int.hpp"
12
#include "utils.hpp"
13
#include "value.hpp"
14
15
// + standard includes
16
#include <array>
17
#include <cmath>
18
#include <iomanip>
19
20
// *****************************************************************************
21
// class member definitions
22
namespace Exiv2::Internal {
23
//! OffOn, multiple tags
24
constexpr TagDetails nikonOffOn[] = {
25
    {0, N_("Off")},
26
    {1, N_("On")},
27
};
28
29
//! Off, Low, Normal, High, multiple tags
30
constexpr TagDetails nikonOlnh[] = {
31
    {0, N_("Off")},
32
    {1, N_("Low")},
33
    {3, N_("Normal")},
34
    {5, N_("High")},
35
};
36
37
//! Off, Low, Normal, High, multiple tags
38
constexpr TagDetails nikonActiveDLighting[] = {
39
    {0, N_("Off")}, {1, N_("Low")}, {3, N_("Normal")}, {5, N_("High")}, {7, N_("Extra High")}, {65535, N_("Auto")},
40
};
41
42
//! Focus area for Nikon cameras.
43
constexpr auto nikonFocusarea = std::array{
44
    N_("Single area"),   N_("Dynamic area"),       N_("Dynamic area, closest subject"),
45
    N_("Group dynamic"), N_("Single area (wide)"), N_("Dynamic area (wide)"),
46
};
47
48
// Roger Larsson: My guess is that focuspoints will follow autofocus sensor
49
// module. Note that relative size and position will vary depending on if
50
// "wide" or not
51
//! Focus points for Nikon cameras, used for Nikon 1 and Nikon 3 makernotes.
52
constexpr auto nikonFocuspoints = std::array{
53
    N_("Center"),      N_("Top"),        N_("Bottom"),      N_("Left"),      N_("Right"),      N_("Upper-left"),
54
    N_("Upper-right"), N_("Lower-left"), N_("Lower-right"), N_("Left-most"), N_("Right-most"),
55
};
56
57
//! Shutter Modes (credits to exiftool)
58
constexpr TagDetails nikonShutterModes[] = {
59
    {0, "Mechanical"},          {16, "Electronic"},        {48, "Electronic Front Curtain"},
60
    {64, "Electronic (Movie)"}, {80, "Auto (Mechanical)"}, {81, "Auto (Electronic Front Curtain)"},
61
};
62
63
//! FlashComp, tag 0x0012
64
constexpr TagDetails nikonFlashComp[] = {
65
    // From the PHP JPEG Metadata Toolkit
66
    {0x06, "+1.0 EV"}, {0x04, "+0.7 EV"}, {0x03, "+0.5 EV"}, {0x02, "+0.3 EV"}, {0x00, "0.0 EV"},  {0xfe, "-0.3 EV"},
67
    {0xfd, "-0.5 EV"}, {0xfc, "-0.7 EV"}, {0xfa, "-1.0 EV"}, {0xf8, "-1.3 EV"}, {0xf7, "-1.5 EV"}, {0xf6, "-1.7 EV"},
68
    {0xf4, "-2.0 EV"}, {0xf2, "-2.3 EV"}, {0xf1, "-2.5 EV"}, {0xf0, "-2.7 EV"}, {0xee, "-3.0 EV"},
69
};
70
71
//! ColorSpace, tag 0x001e
72
constexpr TagDetails nikonColorSpace[] = {
73
    {1, N_("sRGB")},
74
    {2, N_("Adobe RGB")},
75
};
76
77
//! FlashMode, tag 0x0087
78
constexpr TagDetails nikonFlashMode[] = {
79
    {0, N_("Did not fire")},   {1, N_("Fire, manual")},         {3, N_("Not ready")},      {6, N_("Off")},
80
    {7, N_("Fire, external")}, {8, N_("Fire, commander mode")}, {9, N_("Fire, TTL mode")}, {18, N_("LED Light")},
81
};
82
83
//! ShootingMode, tag 0x0089
84
constexpr TagDetailsBitmask nikonShootingMode[] = {
85
    {0x0001, N_("Continuous")},
86
    {0x0002, N_("Delay")},
87
    {0x0004, N_("PC Control")},
88
    {0x0008, N_("Self-timer")},
89
    {0x0010, N_("Exposure Bracketing")},
90
    {0x0020, N_("Auto ISO")},
91
    {0x0040, N_("White-Balance Bracketing")},
92
    {0x0080, N_("IR Control")},
93
    {0x0100, N_("D-Lighting Bracketing")},
94
};
95
96
//! ShootingMode D70, tag 0x0089
97
constexpr TagDetailsBitmask nikonShootingModeD70[] = {
98
    {0x0001, N_("Continuous")},
99
    {0x0002, N_("Delay")},
100
    {0x0004, N_("PC control")},
101
    {0x0010, N_("Exposure bracketing")},
102
    {0x0020, N_("Unused LE-NR slowdown")},
103
    {0x0040, N_("White balance bracketing")},
104
    {0x0080, N_("IR control")},
105
};
106
107
//! AutoBracketRelease, tag 0x008a
108
constexpr TagDetails nikonAutoBracketRelease[] = {
109
    {0, N_("None")},
110
    {1, N_("Auto release")},
111
    {2, N_("Manual release")},
112
};
113
114
//! NEFCompression, tag 0x0093
115
constexpr TagDetails nikonNefCompression[] = {
116
    {1, N_("Lossy (type 1)")},
117
    {2, N_("Uncompressed")},
118
    {3, N_("Lossless")},
119
    {4, N_("Lossy (type 2)")},
120
};
121
122
//! RetouchHistory, tag 0x009e
123
constexpr TagDetails nikonRetouchHistory[] = {
124
    {0, N_("None")},          {3, N_("B & W")},      {4, N_("Sepia")},         {5, N_("Trim")},
125
    {6, N_("Small picture")}, {7, N_("D-Lighting")}, {8, N_("Red eye")},       {9, N_("Cyanotype")},
126
    {10, N_("Sky light")},    {11, N_("Warm tone")}, {12, N_("Color custom")}, {13, N_("Image overlay")},
127
};
128
129
//! HighISONoiseReduction, tag 0x00b1
130
constexpr TagDetails nikonHighISONoiseReduction[] = {
131
    {0, N_("Off")}, {1, N_("Minimal")}, {2, N_("Low")}, {4, N_("Normal")}, {6, N_("High")},
132
};
133
134
// Nikon1 MakerNote Tag Info
135
constexpr TagInfo Nikon1MakerNote::tagInfo_[] = {
136
    {0x0001, "Version", N_("Version"), N_("Nikon Makernote version"), IfdId::nikon1Id, SectionId::makerTags, undefined,
137
     -1, printValue},
138
    {0x0002, "ISOSpeed", N_("ISO Speed"), N_("ISO speed setting"), IfdId::nikon1Id, SectionId::makerTags, unsignedShort,
139
     -1, print0x0002},
140
    {0x0003, "ColorMode", N_("Color Mode"), N_("Color mode"), IfdId::nikon1Id, SectionId::makerTags, asciiString, -1,
141
     printValue},
142
    {0x0004, "Quality", N_("Quality"), N_("Image quality setting"), IfdId::nikon1Id, SectionId::makerTags, asciiString,
143
     -1, printValue},
144
    {0x0005, "WhiteBalance", N_("White Balance"), N_("White balance"), IfdId::nikon1Id, SectionId::makerTags,
145
     asciiString, -1, printValue},
146
    {0x0006, "Sharpening", N_("Sharpening"), N_("Image sharpening setting"), IfdId::nikon1Id, SectionId::makerTags,
147
     asciiString, -1, printValue},
148
    {0x0007, "Focus", N_("Focus"), N_("Focus mode"), IfdId::nikon1Id, SectionId::makerTags, asciiString, -1,
149
     print0x0007},
150
    {0x0008, "FlashSetting", N_("Flash Setting"), N_("Flash setting"), IfdId::nikon1Id, SectionId::makerTags,
151
     asciiString, -1, printValue},
152
    {0x000a, "0x000a", "0x000a", N_("Unknown"), IfdId::nikon1Id, SectionId::makerTags, unsignedRational, -1,
153
     printValue},
154
    {0x000f, "ISOSelection", N_("ISO Selection"), N_("ISO selection"), IfdId::nikon1Id, SectionId::makerTags,
155
     asciiString, -1, printValue},
156
    {0x0010, "DataDump", N_("Data Dump"), N_("Data dump"), IfdId::nikon1Id, SectionId::makerTags, undefined, -1,
157
     printValue},
158
    {0x0080, "ImageAdjustment", N_("Image Adjustment"), N_("Image adjustment setting"), IfdId::nikon1Id,
159
     SectionId::makerTags, asciiString, -1, printValue},
160
    {0x0082, "AuxiliaryLens", N_("Auxiliary Lens"), N_("Auxiliary lens (adapter)"), IfdId::nikon1Id,
161
     SectionId::makerTags, asciiString, -1, printValue},
162
    {0x0085, "FocusDistance", N_("Focus Distance"), N_("Manual focus distance"), IfdId::nikon1Id, SectionId::makerTags,
163
     unsignedRational, -1, print0x0085},
164
    {0x0086, "DigitalZoom", N_("Digital Zoom"), N_("Digital zoom setting"), IfdId::nikon1Id, SectionId::makerTags,
165
     unsignedRational, -1, print0x0086},
166
    {0x0088, "AFFocusPos", N_("AF Focus Position"), N_("AF focus position information"), IfdId::nikon1Id,
167
     SectionId::makerTags, undefined, -1, print0x0088},
168
    // End of list marker
169
    {0xffff, "(UnknownNikon1MnTag)", "(UnknownNikon1MnTag)", N_("Unknown Nikon1MakerNote tag"), IfdId::nikon1Id,
170
     SectionId::makerTags, asciiString, -1, printValue},
171
};
172
173
0
std::ostream& Nikon1MakerNote::print0x0002(std::ostream& os, const Value& value, const ExifData*) {
174
0
  if (value.count() > 1)
175
0
    return os << value.toInt64(1);
176
0
  return os << "(" << value << ")";
177
0
}
178
179
0
static std::string getKeyString(const std::string& key, const ExifData* metadata) {
180
0
  std::string result;
181
0
  if (metadata->findKey(ExifKey(key)) != metadata->end()) {
182
0
    result = metadata->findKey(ExifKey(key))->toString();
183
0
  }
184
0
  return result;
185
0
}
186
187
0
std::ostream& Nikon1MakerNote::printBarValue(std::ostream& os, const Value& value, const ExifData* exifData) {
188
0
  if (!exifData)
189
0
    return os << "undefined";
190
191
0
  if (value.count() >= 9) {
192
0
    ByteOrder bo = getKeyString("Exif.MakerNote.ByteOrder", exifData) == "MM" ? bigEndian : littleEndian;
193
0
    byte p[4];
194
0
    for (int n = 0; n < 4; n++)
195
0
      p[n] = static_cast<byte>(value.toInt64(6 + n));
196
0
    os << getLong(p, bo);
197
0
  }
198
199
0
  return os;
200
0
}
201
202
0
std::ostream& Nikon1MakerNote::print0x0007(std::ostream& os, const Value& value, const ExifData*) {
203
0
  std::string focus = value.toString();
204
0
  if (focus == "AF-C  ")
205
0
    return os << _("Continuous autofocus");
206
0
  if (focus == "AF-S  ")
207
0
    return os << _("Single autofocus");
208
0
  if (focus == "AF-A  ")
209
0
    return os << _("Automatic");
210
0
  return os << "(" << value << ")";
211
0
}
212
213
0
std::ostream& Nikon1MakerNote::print0x0085(std::ostream& os, const Value& value, const ExifData*) {
214
0
  auto [r, s] = value.toRational();
215
0
  if (r == 0)
216
0
    return os << _("Unknown");
217
0
  if (s != 0)
218
0
    return os << stringFormat("{:.2f} m", static_cast<float>(r) / s);
219
0
  return os << "(" << value << ")";
220
0
}
221
222
0
std::ostream& Nikon1MakerNote::print0x0086(std::ostream& os, const Value& value, const ExifData*) {
223
0
  auto [r, s] = value.toRational();
224
0
  if (r == 0)
225
0
    return os << _("Not used");
226
0
  if (s == 0)
227
0
    return os << "(" << value << ")";
228
0
  return os << stringFormat("{:.1f}x", static_cast<float>(r) / s);
229
0
}
230
231
0
std::ostream& Nikon1MakerNote::print0x0088(std::ostream& os, const Value& value, const ExifData*) {
232
0
  if (value.count() >= 1) {
233
0
    const uint32_t focusArea = value.toUint32(0);
234
0
    if (focusArea >= nikonFocusarea.size()) {
235
0
      os << "Invalid value";
236
0
    } else {
237
0
      os << nikonFocusarea[focusArea];
238
0
    }
239
0
  }
240
0
  if (value.count() >= 2) {
241
0
    os << "; ";
242
0
    const uint32_t focusPoint = value.toUint32(1);
243
244
0
    if (focusPoint <= 4) {
245
0
      os << nikonFocuspoints[focusPoint];
246
0
    } else {
247
0
      os << value;
248
0
      if (focusPoint < nikonFocuspoints.size()) {
249
0
        os << " " << _("guess") << " " << nikonFocuspoints[focusPoint];
250
0
      }
251
0
    }
252
0
  }
253
0
  if (value.count() >= 3) {
254
0
    const uint32_t focusPointsUsed1 = value.toUint32(2);
255
0
    const uint32_t focusPointsUsed2 = value.toUint32(3);
256
257
0
    if (focusPointsUsed1 != 0 && focusPointsUsed2 != 0) {
258
0
      os << "; [";
259
260
0
      if (focusPointsUsed1 & 1)
261
0
        os << nikonFocuspoints[0] << " ";
262
0
      if (focusPointsUsed1 & 2)
263
0
        os << nikonFocuspoints[1] << " ";
264
0
      if (focusPointsUsed1 & 4)
265
0
        os << nikonFocuspoints[2] << " ";
266
0
      if (focusPointsUsed1 & 8)
267
0
        os << nikonFocuspoints[3] << " ";
268
0
      if (focusPointsUsed1 & 16)
269
0
        os << nikonFocuspoints[4] << " ";
270
0
      if (focusPointsUsed1 & 32)
271
0
        os << nikonFocuspoints[5] << " ";
272
0
      if (focusPointsUsed1 & 64)
273
0
        os << nikonFocuspoints[6] << " ";
274
0
      if (focusPointsUsed1 & 128)
275
0
        os << nikonFocuspoints[7] << " ";
276
277
0
      if (focusPointsUsed2 & 1)
278
0
        os << nikonFocuspoints[8] << " ";
279
0
      if (focusPointsUsed2 & 2)
280
0
        os << nikonFocuspoints[9] << " ";
281
0
      if (focusPointsUsed2 & 4)
282
0
        os << nikonFocuspoints[10] << " ";
283
284
0
      os << "]";
285
0
    }
286
0
  } else {
287
0
    os << "(" << value << ")";
288
0
  }
289
0
  return os;
290
0
}
291
292
//! Quality, tag 0x0003
293
constexpr TagDetails nikon2Quality[] = {
294
    {1, N_("VGA Basic")},  {2, N_("VGA Normal")},  {3, N_("VGA Fine")},
295
    {4, N_("SXGA Basic")}, {5, N_("SXGA Normal")}, {6, N_("SXGA Fine")},
296
};
297
298
//! ColorMode, tag 0x0004
299
constexpr TagDetails nikon2ColorMode[] = {
300
    {1, N_("Color")},
301
    {2, N_("Monochrome")},
302
};
303
304
//! ImageAdjustment, tag 0x0005
305
constexpr TagDetails nikon2ImageAdjustment[] = {
306
    {0, N_("Normal")}, {1, N_("Bright+")}, {2, N_("Bright-")}, {3, N_("Contrast+")}, {4, N_("Contrast-")},
307
};
308
309
//! ISOSpeed, tag 0x0006
310
constexpr TagDetails nikon2IsoSpeed[] = {
311
    {0, "80"},
312
    {2, "160"},
313
    {4, "320"},
314
    {5, "100"},
315
};
316
317
//! WhiteBalance, tag 0x0007
318
constexpr TagDetails nikon2WhiteBalance[] = {
319
    {0, N_("Auto")},        {1, N_("Preset")}, {2, N_("Daylight")},   {3, N_("Incandescent")},
320
    {4, N_("Fluorescent")}, {5, N_("Cloudy")}, {6, N_("Speedlight")},
321
};
322
323
// Nikon2 MakerNote Tag Info
324
constexpr TagInfo Nikon2MakerNote::tagInfo_[] = {
325
    {0x0002, "0x0002", "0x0002", N_("Unknown"), IfdId::nikon2Id, SectionId::makerTags, asciiString, -1, printValue},
326
    {0x0003, "Quality", N_("Quality"), N_("Image quality setting"), IfdId::nikon2Id, SectionId::makerTags,
327
     unsignedShort, -1, EXV_PRINT_TAG(nikon2Quality)},
328
    {0x0004, "ColorMode", N_("Color Mode"), N_("Color mode"), IfdId::nikon2Id, SectionId::makerTags, unsignedShort, -1,
329
     EXV_PRINT_TAG(nikon2ColorMode)},
330
    {0x0005, "ImageAdjustment", N_("Image Adjustment"), N_("Image adjustment setting"), IfdId::nikon2Id,
331
     SectionId::makerTags, unsignedShort, -1, EXV_PRINT_TAG(nikon2ImageAdjustment)},
332
    {0x0006, "ISOSpeed", N_("ISO Speed"), N_("ISO speed setting"), IfdId::nikon2Id, SectionId::makerTags, unsignedShort,
333
     -1, EXV_PRINT_TAG(nikon2IsoSpeed)},
334
    {0x0007, "WhiteBalance", N_("White Balance"), N_("White balance"), IfdId::nikon2Id, SectionId::makerTags,
335
     unsignedShort, -1, EXV_PRINT_TAG(nikon2WhiteBalance)},
336
    {0x0008, "Focus", N_("Focus Mode"), N_("Focus mode"), IfdId::nikon2Id, SectionId::makerTags, unsignedRational, -1,
337
     printValue},
338
    {0x0009, "0x0009", "0x0009", N_("Unknown"), IfdId::nikon2Id, SectionId::makerTags, asciiString, -1, printValue},
339
    {0x000a, "DigitalZoom", N_("Digital Zoom"), N_("Digital zoom setting"), IfdId::nikon2Id, SectionId::makerTags,
340
     unsignedRational, -1, print0x000a},
341
    {0x000b, "AuxiliaryLens", N_("Auxiliary Lens"), N_("Auxiliary lens (adapter)"), IfdId::nikon2Id,
342
     SectionId::makerTags, unsignedShort, -1, printValue},
343
    {0x0f00, "0x0f00", "0x0f00", N_("Unknown"), IfdId::nikon2Id, SectionId::makerTags, unsignedLong, -1, printValue},
344
    // End of list marker
345
    {0xffff, "(UnknownNikon2MnTag)", "(UnknownNikon2MnTag)", N_("Unknown Nikon2MakerNote tag"), IfdId::nikon2Id,
346
     SectionId::makerTags, asciiString, -1, printValue},
347
};
348
349
0
std::ostream& Nikon2MakerNote::print0x000a(std::ostream& os, const Value& value, const ExifData*) {
350
0
  auto [r, s] = value.toRational();
351
0
  if (r == 0)
352
0
    return os << _("Not used");
353
0
  if (s == 0)
354
0
    return os << "(" << value << ")";
355
0
  return os << stringFormat("{:.1f}x", static_cast<float>(r) / s);
356
0
}
357
358
// Nikon3 MakerNote Tag Info
359
constexpr TagInfo Nikon3MakerNote::tagInfo_[] = {
360
    {0x0001, "Version", N_("Version"), N_("Nikon Makernote version"), IfdId::nikon3Id, SectionId::makerTags, undefined,
361
     -1, printExifVersion},
362
    {0x0002, "ISOSpeed", N_("ISO Speed"), N_("ISO speed setting"), IfdId::nikon3Id, SectionId::makerTags, unsignedShort,
363
     -1, print0x0002},
364
    {0x0003, "ColorMode", N_("Color Mode"), N_("Color mode"), IfdId::nikon3Id, SectionId::makerTags, asciiString, -1,
365
     printValue},
366
    {0x0004, "Quality", N_("Quality"), N_("Image quality setting"), IfdId::nikon3Id, SectionId::makerTags, asciiString,
367
     -1, printValue},
368
    {0x0005, "WhiteBalance", N_("White Balance"), N_("White balance"), IfdId::nikon3Id, SectionId::makerTags,
369
     asciiString, -1, printValue},
370
    {0x0006, "Sharpening", N_("Sharpening"), N_("Image sharpening setting"), IfdId::nikon3Id, SectionId::makerTags,
371
     asciiString, -1, printValue},
372
    {0x0007, "Focus", N_("Focus"), N_("Focus mode"), IfdId::nikon3Id, SectionId::makerTags, asciiString, -1,
373
     print0x0007},
374
    {0x0008, "FlashSetting", N_("Flash Setting"), N_("Flash setting"), IfdId::nikon3Id, SectionId::makerTags,
375
     asciiString, -1, printValue},
376
    {0x0009, "FlashDevice", N_("Flash Device"), N_("Flash device"), IfdId::nikon3Id, SectionId::makerTags, asciiString,
377
     -1, printValue},
378
    {0x000a, "0x000a", "0x000a", N_("Unknown"), IfdId::nikon3Id, SectionId::makerTags, unsignedRational, -1,
379
     printValue},
380
    {0x000b, "WhiteBalanceBias", N_("White Balance Bias"), N_("White balance bias"), IfdId::nikon3Id,
381
     SectionId::makerTags, signedShort, -1, printValue},
382
    {0x000c, "WB_RBLevels", N_("WB RB Levels"), N_("WB RB levels"), IfdId::nikon3Id, SectionId::makerTags,
383
     unsignedRational, -1, printValue},
384
    {0x000d, "ProgramShift", N_("Program Shift"), N_("Program shift"), IfdId::nikon3Id, SectionId::makerTags, undefined,
385
     -1, EXV_PRINT_TAG(nikonFlashComp)},
386
    {0x000e, "ExposureDiff", N_("Exposure Difference"), N_("Exposure difference"), IfdId::nikon3Id,
387
     SectionId::makerTags, undefined, -1, EXV_PRINT_TAG(nikonFlashComp)},
388
    {0x000f, "ISOSelection", N_("ISO Selection"), N_("ISO selection"), IfdId::nikon3Id, SectionId::makerTags,
389
     asciiString, -1, printValue},
390
    {0x0010, "DataDump", N_("Data Dump"), N_("Data dump"), IfdId::nikon3Id, SectionId::makerTags, undefined, -1,
391
     printValue},
392
    {0x0011, "Preview", N_("Pointer to a preview image"), N_("Offset to an IFD containing a preview image"),
393
     IfdId::nikon3Id, SectionId::makerTags, undefined, -1, printValue},
394
    {0x0012, "FlashComp", N_("Flash Comp"), N_("Flash compensation setting"), IfdId::nikon3Id, SectionId::makerTags,
395
     undefined, -1, EXV_PRINT_TAG(nikonFlashComp)},
396
    {0x0013, "ISOSettings", N_("ISO Settings"), N_("ISO setting"), IfdId::nikon3Id, SectionId::makerTags, unsignedShort,
397
     -1, print0x0002},  // use 0x0002 print fct
398
    {0x0016, "ImageBoundary", N_("Image Boundary"), N_("Image boundary"), IfdId::nikon3Id, SectionId::makerTags,
399
     unsignedShort, -1, printValue},
400
    {0x0017, "FlashExposureComp", "Flash Exposure Comp", N_("Flash exposure comp"), IfdId::nikon3Id,
401
     SectionId::makerTags, undefined, -1, EXV_PRINT_TAG(nikonFlashComp)},
402
    {0x0018, "FlashBracketComp", N_("Flash Bracket Comp"), N_("Flash bracket compensation applied"), IfdId::nikon3Id,
403
     SectionId::makerTags, undefined, -1, EXV_PRINT_TAG(nikonFlashComp)},  // use 0x0012 print fct
404
    {0x0019, "ExposureBracketComp", N_("Exposure Bracket Comp"), N_("AE bracket compensation applied"), IfdId::nikon3Id,
405
     SectionId::makerTags, signedRational, -1, printValue},
406
    {0x001a, "ImageProcessing", N_("Image Processing"), N_("Image processing"), IfdId::nikon3Id, SectionId::makerTags,
407
     asciiString, -1, printValue},
408
    {0x001b, "CropHiSpeed", N_("Crop High Speed"), N_("Crop high speed"), IfdId::nikon3Id, SectionId::makerTags,
409
     unsignedShort, -1, printValue},
410
    {0x001c, "ExposureTuning", N_("Exposure Tuning"), N_("Exposure tuning"), IfdId::nikon3Id, SectionId::makerTags,
411
     unsignedShort, -1, printValue},
412
    {0x001d, "SerialNumber", N_("Serial Number"), N_("Serial Number"), IfdId::nikon3Id, SectionId::makerTags,
413
     asciiString, -1, printValue},
414
    {0x001e, "ColorSpace", N_("Color Space"), N_("Color space"), IfdId::nikon3Id, SectionId::makerTags, unsignedShort,
415
     -1, EXV_PRINT_TAG(nikonColorSpace)},
416
    {0x001f, "VRInfo", N_("VR Info"), N_("VR info"), IfdId::nikon3Id, SectionId::makerTags, undefined, -1, printValue},
417
    {0x0020, "ImageAuthentication", N_("Image Authentication"), N_("Image authentication"), IfdId::nikon3Id,
418
     SectionId::makerTags, unsignedByte, -1, EXV_PRINT_TAG(nikonOffOn)},
419
    {0x0022, "ActiveDLighting", N_("ActiveD-Lighting"), N_("ActiveD-lighting"), IfdId::nikon3Id, SectionId::makerTags,
420
     unsignedShort, -1, EXV_PRINT_TAG(nikonActiveDLighting)},
421
    {0x0023, "PictureControl", N_("Picture Control"), N_(" Picture control"), IfdId::nikon3Id, SectionId::makerTags,
422
     undefined, -1, printValue},
423
    {0x0024, "WorldTime", N_("World Time"), N_("World time"), IfdId::nikon3Id, SectionId::makerTags, undefined, -1,
424
     printValue},
425
    {0x0025, "ISOInfo", N_("ISO Info"), N_("ISO info"), IfdId::nikon3Id, SectionId::makerTags, undefined, -1,
426
     printValue},
427
    {0x002a, "VignetteControl", N_("Vignette Control"), N_("Vignette control"), IfdId::nikon3Id, SectionId::makerTags,
428
     unsignedShort, -1, EXV_PRINT_TAG(nikonOlnh)},
429
    {0x0034, "ShutterMode", N_("Shutter Mode"), N_("Shutter mode"), IfdId::nikon3Id, SectionId::makerTags,
430
     unsignedShort, -1, EXV_PRINT_TAG(nikonShutterModes)},
431
    {0x0037, "MechanicalShutterCount", N_("Mechanical Shutter Count"), N_("Mechanical shutter count"), IfdId::nikon3Id,
432
     SectionId::makerTags, unsignedLong, -1, printValue},
433
    {0x003f, "WhiteBalanceBias2", N_("White Balance Bias 2"), N_("White balance bias 2"), IfdId::nikon3Id,
434
     SectionId::makerTags, signedRational, -1, printValue},
435
    {0x0080, "ImageAdjustment", N_("Image Adjustment"), N_("Image adjustment setting"), IfdId::nikon3Id,
436
     SectionId::makerTags, asciiString, -1, printValue},
437
    {0x0081, "ToneComp", N_("Tone Compensation"), N_("Tone compensation"), IfdId::nikon3Id, SectionId::makerTags,
438
     asciiString, -1, printValue},
439
    {0x0082, "AuxiliaryLens", N_("Auxiliary Lens"), N_("Auxiliary lens (adapter)"), IfdId::nikon3Id,
440
     SectionId::makerTags, asciiString, -1, printValue},
441
    {0x0083, "LensType", N_("Lens Type"), N_("Lens type"), IfdId::nikon3Id, SectionId::makerTags, unsignedByte, -1,
442
     print0x0083},
443
    {0x0084, "Lens", N_("Lens"), N_("Lens"), IfdId::nikon3Id, SectionId::makerTags, unsignedRational, -1,
444
     printLensSpecification},
445
    {0x0085, "FocusDistance", N_("Focus Distance"), N_("Manual focus distance"), IfdId::nikon3Id, SectionId::makerTags,
446
     unsignedRational, -1, print0x0085},
447
    {0x0086, "DigitalZoom", N_("Digital Zoom"), N_("Digital zoom setting"), IfdId::nikon3Id, SectionId::makerTags,
448
     unsignedRational, -1, print0x0086},
449
    {0x0087, "FlashMode", N_("Flash Mode"), N_("Mode of flash used"), IfdId::nikon3Id, SectionId::makerTags,
450
     unsignedByte, -1, EXV_PRINT_TAG(nikonFlashMode)},
451
    {0x0088, "AFInfo", N_("AF Info"), N_("AF info"), IfdId::nikon3Id, SectionId::makerTags, undefined, -1, printValue},
452
    {0x0089, "ShootingMode", N_("Shooting Mode"), N_("Shooting mode"), IfdId::nikon3Id, SectionId::makerTags,
453
     unsignedShort, -1, print0x0089},
454
    {0x008a, "AutoBracketRelease", N_("Auto Bracket Release"), N_("Auto bracket release"), IfdId::nikon3Id,
455
     SectionId::makerTags, unsignedShort, -1, EXV_PRINT_TAG(nikonAutoBracketRelease)},
456
    {0x008b, "LensFStops", N_("Lens FStops"), N_("Lens FStops"), IfdId::nikon3Id, SectionId::makerTags, undefined, -1,
457
     print0x008b},
458
    {0x008c, "ContrastCurve", N_("Contrast Curve"), N_("Contrast curve"), IfdId::nikon3Id, SectionId::makerTags,
459
     undefined, -1, printValue},
460
    {0x008d, "ColorHue", N_("Color Hue"), N_("Color hue"), IfdId::nikon3Id, SectionId::makerTags, asciiString, -1,
461
     printValue},
462
    {0x008f, "SceneMode", N_("Scene Mode"), N_("Scene mode"), IfdId::nikon3Id, SectionId::makerTags, asciiString, -1,
463
     printValue},
464
    {0x0090, "LightSource", N_("Light Source"), N_("Light source"), IfdId::nikon3Id, SectionId::makerTags, asciiString,
465
     -1, printValue},
466
    {0x0091, "ShotInfo", "Shot Info", N_("Shot info"), IfdId::nikon3Id, SectionId::makerTags, undefined, -1,
467
     printValue},
468
    {0x0092, "HueAdjustment", N_("Hue Adjustment"), N_("Hue adjustment"), IfdId::nikon3Id, SectionId::makerTags,
469
     signedShort, -1, printValue},
470
    {0x0093, "NEFCompression", N_("NEF Compression"), N_("NEF compression"), IfdId::nikon3Id, SectionId::makerTags,
471
     unsignedShort, -1, EXV_PRINT_TAG(nikonNefCompression)},
472
    {0x0094, "Saturation", N_("Saturation"), N_("Saturation"), IfdId::nikon3Id, SectionId::makerTags, signedShort, -1,
473
     printValue},
474
    {0x0095, "NoiseReduction", N_("Noise Reduction"), N_("Noise reduction"), IfdId::nikon3Id, SectionId::makerTags,
475
     asciiString, -1, printValue},
476
    {0x0096, "LinearizationTable", N_("Linearization Table"), N_("Linearization table"), IfdId::nikon3Id,
477
     SectionId::makerTags, undefined, -1, printValue},
478
    {0x0097, "ColorBalance", N_("Color Balance"), N_("Color balance"), IfdId::nikon3Id, SectionId::makerTags, undefined,
479
     -1, printValue},
480
    {0x0098, "LensData", N_("Lens Data"), N_("Lens data settings"), IfdId::nikon3Id, SectionId::makerTags, undefined,
481
     -1, printValue},
482
    {0x0099, "RawImageCenter", N_("Raw Image Center"), N_("Raw image center"), IfdId::nikon3Id, SectionId::makerTags,
483
     unsignedShort, -1, printValue},
484
    {0x009a, "SensorPixelSize", N_("Sensor Pixel Size"), N_("Sensor pixel size"), IfdId::nikon3Id, SectionId::makerTags,
485
     unsignedRational, -1, print0x009a},
486
    {0x009b, "0x009b", "0x009b", N_("Unknown"), IfdId::nikon3Id, SectionId::makerTags, unsignedShort, -1, printValue},
487
    {0x009c, "SceneAssist", N_("Scene Assist"), N_("Scene assist"), IfdId::nikon3Id, SectionId::makerTags, asciiString,
488
     -1, printValue},
489
    {0x009e, "RetouchHistory", N_("Retouch History"), N_("Retouch history"), IfdId::nikon3Id, SectionId::makerTags,
490
     unsignedShort, -1, print0x009e},
491
    {0x009f, "0x009f", "0x009f", N_("Unknown"), IfdId::nikon3Id, SectionId::makerTags, signedShort, -1, printValue},
492
    {0x00a0, "SerialNO", N_("Serial NO"), N_("Camera serial number, usually starts with \"NO= \""), IfdId::nikon3Id,
493
     SectionId::makerTags, asciiString, -1, printValue},
494
    {0x00a2, "ImageDataSize", N_("Image Data Size"), N_("Image data size"), IfdId::nikon3Id, SectionId::makerTags,
495
     unsignedLong, -1, printValue},
496
    {0x00a3, "0x00a3", "0x00a3", N_("Unknown"), IfdId::nikon3Id, SectionId::makerTags, unsignedByte, -1, printValue},
497
    {0x00a5, "ImageCount", N_("Image Count"), N_("Image count"), IfdId::nikon3Id, SectionId::makerTags, unsignedLong,
498
     -1, printValue},
499
    {0x00a6, "DeletedImageCount", N_("Deleted Image Count"), N_("Deleted image count"), IfdId::nikon3Id,
500
     SectionId::makerTags, unsignedLong, -1, printValue},
501
    {0x00a7, "ShutterCount", N_("Shutter Count"), N_("Number of shots taken by camera"), IfdId::nikon3Id,
502
     SectionId::makerTags, unsignedLong, -1, printValue},
503
    {0x00a8, "FlashInfo", "Flash Info", N_("Flash info"), IfdId::nikon3Id, SectionId::makerTags, undefined, -1,
504
     printValue},
505
    {0x00a9, "ImageOptimization", N_("Image Optimization"), N_("Image optimization"), IfdId::nikon3Id,
506
     SectionId::makerTags, asciiString, -1, printValue},
507
    {0x00aa, "Saturation2", N_("Saturation 2"), N_("Saturation 2"), IfdId::nikon3Id, SectionId::makerTags, asciiString,
508
     -1, printValue},
509
    {0x00ab, "VariProgram", N_("Program Variation"), N_("Program variation"), IfdId::nikon3Id, SectionId::makerTags,
510
     asciiString, -1, printValue},
511
    {0x00ac, "ImageStabilization", N_("Image Stabilization"), N_("Image stabilization"), IfdId::nikon3Id,
512
     SectionId::makerTags, asciiString, -1, printValue},
513
    {0x00ad, "AFResponse", N_("AF Response"), N_("AF response"), IfdId::nikon3Id, SectionId::makerTags, asciiString, -1,
514
     printValue},
515
    {0x00b0, "MultiExposure", "Multi Exposure", N_("Multi exposure"), IfdId::nikon3Id, SectionId::makerTags, undefined,
516
     -1, printValue},
517
    {0x00b1, "HighISONoiseReduction", N_("High ISO Noise Reduction"), N_("High ISO Noise Reduction"), IfdId::nikon3Id,
518
     SectionId::makerTags, unsignedShort, -1, EXV_PRINT_TAG(nikonHighISONoiseReduction)},
519
    {0x00b3, "ToningEffect", "Toning Effect", N_("Toning effect"), IfdId::nikon3Id, SectionId::makerTags, asciiString,
520
     -1, printValue},
521
    {0x00b7, "AFInfo2", "AF Info 2", N_("AF info 2"), IfdId::nikon3Id, SectionId::makerTags, undefined, -1, printValue},
522
    {0x00b8, "FileInfo", "File Info", N_("File info"), IfdId::nikon3Id, SectionId::makerTags, undefined, -1,
523
     printValue},
524
    {0x00b9, "AFTune", "AF Tune", N_("AF tune"), IfdId::nikon3Id, SectionId::makerTags, undefined, -1, printValue},
525
    {0x00c3, "BarometerInfo", "Barometer Info", N_("Barometer Info"), IfdId::nikon3Id, SectionId::makerTags, signedLong,
526
     -1, Nikon1MakerNote::printBarValue},
527
    {0x0e00, "PrintIM", N_("Print IM"), N_("PrintIM information"), IfdId::nikon3Id, SectionId::makerTags, undefined, -1,
528
     printValue},
529
    // TODO: Add Capture Data decoding implementation.
530
    {0x0e01, "CaptureData", N_("Capture Data"), N_("Capture data"), IfdId::nikon3Id, SectionId::makerTags, undefined,
531
     -1, printValue},
532
    {0x0e09, "CaptureVersion", N_("Capture Version"), N_("Capture version"), IfdId::nikon3Id, SectionId::makerTags,
533
     asciiString, -1, printValue},
534
    // TODO: Add Capture Offsets decoding implementation.
535
    {0x0e0e, "CaptureOffsets", N_("Capture Offsets"), N_("Capture offsets"), IfdId::nikon3Id, SectionId::makerTags,
536
     undefined, -1, printValue},
537
    {0x0e10, "ScanIFD", "Scan IFD", N_("Scan IFD"), IfdId::nikon3Id, SectionId::makerTags, undefined, -1, printValue},
538
    {0x0e1d, "ICCProfile", "ICC Profile", N_("ICC profile"), IfdId::nikon3Id, SectionId::makerTags, undefined, -1,
539
     printValue},
540
    {0x0e1e, "CaptureOutput", "Capture Output", N_("Capture output"), IfdId::nikon3Id, SectionId::makerTags, undefined,
541
     -1, printValue},
542
    // End of list marker
543
    {0xffff, "(UnknownNikon3MnTag)", "(UnknownNikon3MnTag)", N_("Unknown Nikon3MakerNote tag"), IfdId::nikon3Id,
544
     SectionId::makerTags, asciiString, -1, printValue},
545
};
546
547
//! YesNo, used for DaylightSavings, tag index 2, et al.
548
constexpr TagDetails nikonYesNo[] = {
549
    {0, N_("No")},
550
    {1, N_("Yes")},
551
};
552
553
//! DateDisplayFormat, tag index 3
554
constexpr TagDetails nikonDateDisplayFormat[] = {
555
    {0, N_("Y/M/D")},
556
    {1, N_("M/D/Y")},
557
    {2, N_("D/M/Y")},
558
};
559
560
//! OnOff
561
constexpr TagDetails nikonOnOff[] = {
562
    {1, N_("On")},
563
    {2, N_("Off")},
564
};
565
566
// Nikon3 Vibration Reduction Tag Info
567
constexpr TagInfo Nikon3MakerNote::tagInfoVr_[] = {
568
    {0, "Version", N_("Version"), N_("Version"), IfdId::nikonVrId, SectionId::makerTags, undefined, 4,
569
     printExifVersion},
570
    {4, "VibrationReduction", N_("Vibration Reduction"), N_("Vibration reduction"), IfdId::nikonVrId,
571
     SectionId::makerTags, unsignedByte, 1, EXV_PRINT_TAG(nikonOnOff)},
572
    // End of list marker
573
    {0xffff, "(UnknownNikonVrTag)", "(UnknownNikonVrTag)", N_("Unknown Nikon Vibration Reduction Tag"),
574
     IfdId::nikonVrId, SectionId::makerTags, unsignedByte, 1, printValue},
575
};
576
577
//! Adjust
578
constexpr TagDetails nikonAdjust[] = {
579
    {0, N_("Default Settings")},
580
    {1, N_("Quick Adjust")},
581
    {2, N_("Full Control")},
582
};
583
584
//! FilterEffect
585
constexpr TagDetails nikonFilterEffect[] = {
586
    {0x80, N_("Off")}, {0x81, N_("Yellow")}, {0x82, N_("Orange")},
587
    {0x83, N_("Red")}, {0x84, N_("Green")},  {0xff, N_("n/a")},
588
};
589
590
//! ToningEffect
591
constexpr TagDetails nikonToningEffect[] = {
592
    {0x80, N_("B&W")},         {0x81, N_("Sepia")},      {0x82, N_("Cyanotype")},  {0x83, N_("Red")},
593
    {0x84, N_("Yellow")},      {0x85, N_("Green")},      {0x86, N_("Blue-green")}, {0x87, N_("Blue")},
594
    {0x88, N_("Purple-blue")}, {0x89, N_("Red-purple")}, {0xff, N_("n/a")},
595
};
596
597
// Nikon3 Picture Control Tag Info
598
constexpr TagInfo Nikon3MakerNote::tagInfoPc_[] = {
599
    {0, "Version", N_("Version"), N_("Version"), IfdId::nikonPcId, SectionId::makerTags, undefined, 4,
600
     printExifVersion},
601
    {4, "Name", N_("Name"), N_("Name"), IfdId::nikonPcId, SectionId::makerTags, asciiString, 20, printValue},
602
    {24, "Base", N_("Base"), N_("Base"), IfdId::nikonPcId, SectionId::makerTags, asciiString, 20, printValue},
603
    {48, "Adjust", N_("Adjust"), N_("Adjust"), IfdId::nikonPcId, SectionId::makerTags, unsignedByte, 1,
604
     EXV_PRINT_TAG(nikonAdjust)},
605
    {49, "QuickAdjust", N_("Quick Adjust"), N_("Quick adjust"), IfdId::nikonPcId, SectionId::makerTags, unsignedByte, 1,
606
     printPictureControl},
607
    {50, "Sharpness", N_("Sharpness"), N_("Sharpness"), IfdId::nikonPcId, SectionId::makerTags, unsignedByte, 1,
608
     printPictureControl},
609
    {51, "Contrast", N_("Contrast"), N_("Contrast"), IfdId::nikonPcId, SectionId::makerTags, unsignedByte, 1,
610
     printPictureControl},
611
    {52, "Brightness", N_("Brightness"), N_("Brightness"), IfdId::nikonPcId, SectionId::makerTags, unsignedByte, 1,
612
     printPictureControl},
613
    {53, "Saturation", N_("Saturation"), N_("Saturation"), IfdId::nikonPcId, SectionId::makerTags, unsignedByte, 1,
614
     printPictureControl},
615
    {54, "HueAdjustment", N_("Hue Adjustment"), N_("Hue adjustment"), IfdId::nikonPcId, SectionId::makerTags,
616
     unsignedByte, 1, printPictureControl},
617
    {55, "FilterEffect", N_("Filter Effect"), N_("Filter effect"), IfdId::nikonPcId, SectionId::makerTags, unsignedByte,
618
     1, EXV_PRINT_TAG(nikonFilterEffect)},
619
    {56, "ToningEffect", N_("Toning Effect"), N_("Toning effect"), IfdId::nikonPcId, SectionId::makerTags, unsignedByte,
620
     1, EXV_PRINT_TAG(nikonToningEffect)},
621
    {57, "ToningSaturation", N_("Toning Saturation"), N_("Toning saturation"), IfdId::nikonPcId, SectionId::makerTags,
622
     unsignedByte, 1, printPictureControl},
623
    // End of list marker
624
    {0xffff, "(UnknownNikonPcTag)", "(UnknownNikonPcTag)", N_("Unknown Nikon Picture Control Tag"), IfdId::nikonPcId,
625
     SectionId::makerTags, unsignedByte, 1, printValue},
626
};
627
628
//! OnOff
629
constexpr TagDetails aftOnOff[] = {
630
    {0, N_("Off")},
631
    {1, N_("On")},
632
    {2, N_("On")},
633
};
634
635
// Nikon3 AF Fine Tune
636
constexpr TagInfo Nikon3MakerNote::tagInfoAFT_[] = {
637
    {0, "AFFineTune", N_("AF Fine Tune"), N_("AF fine tune"), IfdId::nikonAFTId, SectionId::makerTags, unsignedByte, 1,
638
     EXV_PRINT_TAG(aftOnOff)},
639
    {1, "AFFineTuneIndex", N_("AF Fine Tune Index"), N_("AF fine tune index"), IfdId::nikonAFTId, SectionId::makerTags,
640
     unsignedByte, 1, printValue},
641
    {2, "AFFineTuneAdj", N_("AF Fine Tune Adjustment"), N_("AF fine tune adjustment"), IfdId::nikonAFTId,
642
     SectionId::makerTags, signedByte, 1, printValue},
643
    // End of list marker
644
    {0xffff, "(UnknownNikonAFTTag)", "(UnknownNikonAFTTag)", N_("Unknown Nikon AF Fine Tune Tag"), IfdId::nikonAFTId,
645
     SectionId::makerTags, unsignedByte, 1, printValue},
646
};
647
648
// Nikon3 World Time Tag Info
649
constexpr TagInfo Nikon3MakerNote::tagInfoWt_[] = {
650
    {0, "Timezone", N_("Timezone"), N_("Timezone"), IfdId::nikonWtId, SectionId::makerTags, signedShort, 1,
651
     printTimeZone},
652
    {2, "DaylightSavings", N_("Daylight Savings"), N_("Daylight savings"), IfdId::nikonWtId, SectionId::makerTags,
653
     unsignedByte, 1, EXV_PRINT_TAG(nikonYesNo)},
654
    {3, "DateDisplayFormat", N_("Date Display Format"), N_("Date display format"), IfdId::nikonWtId,
655
     SectionId::makerTags, unsignedByte, 1, EXV_PRINT_TAG(nikonDateDisplayFormat)},
656
    // End of list marker
657
    {0xffff, "(UnknownNikonWtTag)", "(UnknownNikonWtTag)", N_("Unknown Nikon World Time Tag"), IfdId::nikonWtId,
658
     SectionId::makerTags, unsignedByte, 1, printValue},
659
};
660
661
//! ISOExpansion, tag index 4 and 10
662
constexpr TagDetails nikonIsoExpansion[] = {
663
    {0x000, N_("Off")},    {0x101, N_("Hi 0.3")}, {0x102, N_("Hi 0.5")}, {0x103, N_("Hi 0.7")}, {0x104, N_("Hi 1.0")},
664
    {0x105, N_("Hi 1.3")}, {0x106, N_("Hi 1.5")}, {0x107, N_("Hi 1.7")}, {0x108, N_("Hi 2.0")}, {0x109, N_("Hi 2.3")},
665
    {0x10a, N_("Hi 2.5")}, {0x10b, N_("Hi 2.7")}, {0x10c, N_("Hi 3.0")}, {0x10d, N_("Hi 3.3")}, {0x10e, N_("Hi 3.5")},
666
    {0x10f, N_("Hi 3.7")}, {0x110, N_("Hi 4.0")}, {0x111, N_("Hi 4.3")}, {0x112, N_("Hi 4.5")}, {0x113, N_("Hi 4.7")},
667
    {0x114, N_("Hi 5.0")}, {0x201, N_("Lo 0.3")}, {0x202, N_("Lo 0.5")}, {0x203, N_("Lo 0.7")}, {0x204, N_("Lo 1.0")},
668
};
669
670
// Nikon3 ISO Info Tag Info
671
constexpr TagInfo Nikon3MakerNote::tagInfoIi_[] = {
672
    {0, "ISO", N_("ISO"), N_("ISO"), IfdId::nikonIiId, SectionId::makerTags, unsignedByte, 1, printIiIso},
673
    {4, "ISOExpansion", N_("ISO Expansion"), N_("ISO expansion"), IfdId::nikonIiId, SectionId::makerTags, unsignedShort,
674
     1, EXV_PRINT_TAG(nikonIsoExpansion)},
675
    {6, "ISO2", N_("ISO 2"), N_("ISO 2"), IfdId::nikonIiId, SectionId::makerTags, unsignedByte, 1, printIiIso},
676
    {10, "ISOExpansion2", N_("ISO Expansion 2"), N_("ISO expansion 2"), IfdId::nikonIiId, SectionId::makerTags,
677
     unsignedShort, 1, EXV_PRINT_TAG(nikonIsoExpansion)},
678
    // End of list marker
679
    {0xffff, "(UnknownNikonIiTag)", "(UnknownNikonIiTag)", N_("Unknown Nikon Iso Info Tag"), IfdId::nikonIiId,
680
     SectionId::makerTags, unsignedByte, 1, printValue},
681
};
682
683
//! AfAreaMode
684
constexpr TagDetails nikonAfAreaMode[] = {
685
    {0, N_("Single Area")},   {1, N_("Dynamic Area")},       {2, N_("Dynamic Area, Closest Subject")},
686
    {3, N_("Group Dynamic")}, {4, N_("Single Area (wide)")}, {5, N_("Dynamic Area (wide)")},
687
};
688
689
//! AF2 Area Mode when Contrast Detect AF is off
690
constexpr TagDetails nikonAf2AreaModeContrastDetectAfOff[] = {
691
    {0, N_("Single-point AF")},
692
    {1, N_("Dynamic-area AF")},
693
    {2, N_("Closest Subject")},
694
    {3, N_("Group Dynamic AF")},
695
    {4, N_("Dynamic-area AF (9 points)")},
696
    {5, N_("Dynamic-area AF (21 points)")},
697
    {6, N_("Dynamic-area AF (51 points)")},
698
    {7, N_("Dynamic-area AF (51 points), 3D-tracking")},
699
    {8, N_("Auto-area AF")},
700
    {9, N_("3D-tracking")},
701
    {10, N_("Single Area AF, Wide")},
702
    {11, N_("Dynamic-area AF, Wide")},
703
    {12, N_("3D-tracking/Wide")},
704
    {13, N_("Group-area AF")},
705
    {14, N_("Dynamic-area AF (25 points)")},
706
    {15, N_("Dynamic-area AF (72 points)")},
707
    {16, N_("Group-area AF (HL)")},
708
    {17, N_("Group-area AF (VL)")},
709
};
710
711
//! AF2 Area Mode when Contrast Detect AF is on
712
constexpr TagDetails nikonAf2AreaModeContrastDetectAfOn[] = {
713
    {0, N_("Contrast AF")},      {1, N_("Normal-area AF")},      {2, N_("Wide-area AF")},
714
    {3, N_("Face-priority AF")}, {4, N_("Subject-tracking AF")}, {5, N_("Pinpoint AF")},
715
};
716
717
//! AfPoint
718
constexpr TagDetails nikonAfPoint[] = {
719
    {0, N_("Center")},      {1, N_("Top")},        {2, N_("Bottom")},      {3, N_("Mid-left")},
720
    {4, N_("Mid-right")},   {5, N_("Upper-left")}, {6, N_("Upper-right")}, {7, N_("Lower-left")},
721
    {8, N_("Lower-right")}, {9, N_("Far Left")},   {10, N_("Far Right")},
722
};
723
724
//! AfPointsInFocus
725
constexpr TagDetailsBitmask nikonAfPointsInFocus[] = {
726
    {0x0001, N_("Center")},      {0x0002, N_("Top")},        {0x0004, N_("Bottom")},      {0x0008, N_("Mid-left")},
727
    {0x0010, N_("Mid-right")},   {0x0020, N_("Upper-left")}, {0x0040, N_("Upper-right")}, {0x0080, N_("Lower-left")},
728
    {0x0100, N_("Lower-right")}, {0x0200, N_("Far Left")},   {0x0400, N_("Far Right")},
729
};
730
731
// Nikon3 Auto Focus Tag Info
732
constexpr TagInfo Nikon3MakerNote::tagInfoAf_[] = {
733
    {0, "AFAreaMode", N_("AF Area Mode"), N_("AF area mode"), IfdId::nikonAfId, SectionId::makerTags, unsignedByte, 1,
734
     EXV_PRINT_TAG(nikonAfAreaMode)},
735
    {1, "AFPoint", N_("AF Point"), N_("AF point"), IfdId::nikonAfId, SectionId::makerTags, unsignedByte, 1,
736
     EXV_PRINT_TAG(nikonAfPoint)},
737
    {2, "AFPointsInFocus", N_("AF Points In Focus"), N_("AF points in focus"), IfdId::nikonAfId, SectionId::makerTags,
738
     unsignedShort, 1, printAfPointsInFocus},
739
    // End of list marker
740
    {0xffff, "(UnknownNikonAfTag)", "(UnknownNikonAfTag)", N_("Unknown Nikon Auto Focus Tag"), IfdId::nikonAfId,
741
     SectionId::makerTags, unsignedByte, 1, printValue},
742
};
743
744
//! PhaseDetectAF
745
constexpr TagDetails nikonPhaseDetectAF[] = {
746
    {0, N_("Off")},           {1, N_("On (51-point)")},      {2, N_("On (11-point)")},  {3, N_("On (39-point)")},
747
    {4, N_("On (73-point)")}, {5, N_("On (73-point, new)")}, {6, N_("On (105-point)")}, {7, N_("On (153-point)")},
748
};
749
750
// Nikon3 Auto Focus Tag Info
751
constexpr TagInfo Nikon3MakerNote::tagInfoAf21_[] = {
752
    {0, "Version", N_("Version"), N_("Version"), IfdId::nikonAf21Id, SectionId::makerTags, undefined, 4,
753
     printExifVersion},
754
    {4, "ContrastDetectAF", N_("Contrast Detect AF"), N_("Contrast detect AF"), IfdId::nikonAf21Id,
755
     SectionId::makerTags, unsignedByte, 1, EXV_PRINT_TAG(nikonOffOn)},
756
    {5, "AFAreaMode", N_("AF Area Mode"), N_("AF area mode"), IfdId::nikonAf21Id, SectionId::makerTags, unsignedByte, 1,
757
     printAf2AreaMode},
758
    {6, "PhaseDetectAF", N_("Phase Detect AF"), N_("Phase detect AF"), IfdId::nikonAf21Id, SectionId::makerTags,
759
     unsignedByte, 1, EXV_PRINT_TAG(nikonPhaseDetectAF)},
760
    {7, "PrimaryAFPoint", N_("Primary AF Point"), N_("Primary AF point"), IfdId::nikonAf21Id, SectionId::makerTags,
761
     unsignedByte, 1, printValue},
762
    {8, "AFPointsUsed", N_("AF Points Used"), N_("AF points used"), IfdId::nikonAf21Id, SectionId::makerTags,
763
     unsignedByte, 7, printValue},
764
    {16, "AFImageWidth", N_("AF Image Width"), N_("AF image width"), IfdId::nikonAf21Id, SectionId::makerTags,
765
     unsignedShort, 1, printValue},
766
    {18, "AFImageHeight", N_("AF Image Height"), N_("AF image height"), IfdId::nikonAf21Id, SectionId::makerTags,
767
     unsignedShort, 1, printValue},
768
    {20, "AFAreaXPosition", N_("AF Area X Position"), N_("AF area x position"), IfdId::nikonAf21Id,
769
     SectionId::makerTags, unsignedShort, 1, printValue},
770
    {22, "AFAreaYPosition", N_("AF Area Y Position"), N_("AF area y position"), IfdId::nikonAf21Id,
771
     SectionId::makerTags, unsignedShort, 1, printValue},
772
    {24, "AFAreaWidth", N_("AF Area Width"), N_("AF area width"), IfdId::nikonAf21Id, SectionId::makerTags,
773
     unsignedShort, 1, printValue},
774
    {26, "AFAreaHeight", N_("AF Area Height"), N_("AF area height"), IfdId::nikonAf21Id, SectionId::makerTags,
775
     unsignedShort, 1, printValue},
776
    {28, "ContrastDetectAFInFocus", N_("Contrast Detect AF In Focus"), N_("Contrast detect AF in focus"),
777
     IfdId::nikonAf21Id, SectionId::makerTags, unsignedByte, 1, EXV_PRINT_TAG(nikonYesNo)},
778
    // End of list marker
779
    {0xffff, "(UnknownNikonAf2Tag)", "(UnknownNikonAf2Tag)", N_("Unknown Nikon Auto Focus 2 Tag"), IfdId::nikonAf21Id,
780
     SectionId::makerTags, unsignedByte, 1, printValue},
781
};
782
783
// Nikon3 Auto Focus Tag Info Version 1.01 https://github.com/Exiv2/exiv2/pull/900
784
constexpr TagInfo Nikon3MakerNote::tagInfoAf22_[] = {
785
    {0, "Version", N_("Version"), N_("Version"), IfdId::nikonAf22Id, SectionId::makerTags, undefined, 4,
786
     printExifVersion},
787
    {4, "ContrastDetectAF", N_("Contrast Detect AF"), N_("Contrast detect AF"), IfdId::nikonAf22Id,
788
     SectionId::makerTags, unsignedByte, 1, EXV_PRINT_TAG(nikonOffOn)},
789
    {5, "AFAreaMode", N_("AF Area Mode"), N_("AF area mode"), IfdId::nikonAf22Id, SectionId::makerTags, unsignedByte, 1,
790
     printValue},
791
    {6, "PhaseDetectAF", N_("Phase Detect AF"), N_("Phase detect AF"), IfdId::nikonAf22Id, SectionId::makerTags,
792
     unsignedByte, 1, EXV_PRINT_TAG(nikonPhaseDetectAF)},
793
    {7, "PrimaryAFPoint", N_("Primary AF Point"), N_("Primary AF point"), IfdId::nikonAf22Id, SectionId::makerTags,
794
     unsignedByte, 1, printValue},
795
    {8, "AFPointsUsed", N_("AF Points Used"), N_("AF points used"), IfdId::nikonAf22Id, SectionId::makerTags,
796
     unsignedByte, 7, printValue},
797
    {70, "AFImageWidth", N_("AF Image Width"), N_("AF image width"), IfdId::nikonAf22Id, SectionId::makerTags,
798
     unsignedShort, 1, printValue},
799
    {72, "AFImageHeight", N_("AF Image Height"), N_("AF image height"), IfdId::nikonAf22Id, SectionId::makerTags,
800
     unsignedShort, 1, printValue},
801
    {74, "AFAreaXPosition", N_("AF Area X Position"), N_("AF area x position"), IfdId::nikonAf22Id,
802
     SectionId::makerTags, unsignedShort, 1, printValue},
803
    {76, "AFAreaYPosition", N_("AF Area Y Position"), N_("AF area y position"), IfdId::nikonAf22Id,
804
     SectionId::makerTags, unsignedShort, 1, printValue},
805
    {78, "AFAreaWidth", N_("AF Area Width"), N_("AF area width"), IfdId::nikonAf22Id, SectionId::makerTags,
806
     unsignedShort, 1, printValue},
807
    {80, "AFAreaHeight", N_("AF Area Height"), N_("AF area height"), IfdId::nikonAf22Id, SectionId::makerTags,
808
     unsignedShort, 1, printValue},
809
    {82, "ContrastDetectAFInFocus", N_("Contrast Detect AF In Focus"), N_("Contrast detect AF in focus"),
810
     IfdId::nikonAf22Id, SectionId::makerTags, unsignedByte, 1, EXV_PRINT_TAG(nikonYesNo)},
811
    // End of list marker
812
    {0xffff, "(UnknownNikonAf2Tag)", "(UnknownNikonAf2Tag)", N_("Unknown Nikon Auto Focus 2 Tag"), IfdId::nikonAf22Id,
813
     SectionId::makerTags, unsignedByte, 1, printValue},
814
};
815
816
// Nikon3 File Info Tag Info
817
constexpr TagInfo Nikon3MakerNote::tagInfoFi_[] = {
818
    {0, "Version", N_("Version"), N_("Version"), IfdId::nikonFiId, SectionId::makerTags, undefined, 4,
819
     printExifVersion},
820
    {6, "DirectoryNumber", N_("Directory Number"), N_("Directory number"), IfdId::nikonFiId, SectionId::makerTags,
821
     unsignedShort, 1, printValue},
822
    {8, "FileNumber", N_("File Number"), N_("File number"), IfdId::nikonFiId, SectionId::makerTags, unsignedShort, 1,
823
     printValue},
824
    // End of list marker
825
    {0xffff, "(UnknownNikonFiTag)", "(UnknownNikonFiTag)", N_("Unknown Nikon File Info Tag"), IfdId::nikonFiId,
826
     SectionId::makerTags, unsignedByte, 1, printValue},
827
};
828
829
//! MultiExposureMode
830
constexpr TagDetails nikonMultiExposureMode[] = {
831
    {0, N_("Off")},
832
    {1, N_("Multiple Exposure")},
833
    {2, N_("Image Overlay")},
834
};
835
836
// Nikon3 Multi Exposure Tag Info
837
constexpr TagInfo Nikon3MakerNote::tagInfoMe_[] = {
838
    {0, "Version", N_("Version"), N_("Version"), IfdId::nikonMeId, SectionId::makerTags, undefined, 4,
839
     printExifVersion},
840
    {4, "MultiExposureMode", N_("Multi Exposure Mode"), N_("Multi exposure mode"), IfdId::nikonMeId,
841
     SectionId::makerTags, unsignedLong, 1, EXV_PRINT_TAG(nikonMultiExposureMode)},
842
    {8, "MultiExposureShots", N_("Multi Exposure Shots"), N_("Multi exposure shots"), IfdId::nikonMeId,
843
     SectionId::makerTags, unsignedLong, 1, printValue},
844
    {12, "MultiExposureAutoGain", N_("Multi Exposure Auto Gain"), N_("Multi exposure auto gain"), IfdId::nikonMeId,
845
     SectionId::makerTags, unsignedLong, 1, EXV_PRINT_TAG(nikonOffOn)},
846
    // End of list marker
847
    {0xffff, "(UnknownNikonMeTag)", "(UnknownNikonMeTag)", N_("Unknown Nikon Multi Exposure Tag"), IfdId::nikonMeId,
848
     SectionId::makerTags, unsignedByte, 1, printValue},
849
};
850
851
//! FlashSource
852
constexpr TagDetails nikonFlashSource[] = {
853
    {0, N_("None")},
854
    {1, N_("External")},
855
    {2, N_("Internal")},
856
};
857
858
//! FlashFirmware
859
constexpr TagDetails nikonFlashFirmware[] = {
860
    {0x0000, N_("n/a")},
861
    {0x0101, N_("1.01 (SB-800 or Metz 58 AF-1)")},
862
    {0x0103, "1.03 (SB-800)"},
863
    {0x0201, "2.01 (SB-800)"},
864
    {0x0204, "2.04 (SB-600)"},
865
    {0x0205, "2.05 (SB-600)"},
866
    {0x0301, "3.01 (SU-800 Remote Commander)"},
867
    {0x0401, "4.01 (SB-400)"},
868
    {0x0402, "4.02 (SB-400)"},
869
    {0x0404, "4.04 (SB-400)"},
870
    {0x0501, "5.01 (SB-900)"},
871
    {0x0502, "5.02 (SB-900)"},
872
    {0x0601, "6.01 (SB-700)"},
873
    {0x0701, "7.01 (SB-910)"},
874
    {0x0800, "8.01 (SB-N5)"},
875
    {0x0a00, "10.00 (SB-N7)"},
876
    {0x0b00, "11.00 (SB-300)"},
877
    {0x0d00, "13.00 (SB-500)"},
878
    {0x0e00, "14.00 (SB-5000)"},
879
};
880
881
//! FlashGNDistance
882
constexpr TagDetails nikonFlashGNDistance[] = {
883
    {0, N_("n/a")},   {1, "0.1 m"},     {2, "0.2 m"},     {3, "0.3 m"},     {4, "0.4 m"},     {5, "0.5 m"},
884
    {6, "0.6 m"},     {7, "0.7 m"},     {8, "0.8 m"},     {9, "0.9 m"},     {10, "1.0 m"},    {11, "1.1 m"},
885
    {12, "1.3 m"},    {13, "1.4 m"},    {14, "1.6 m"},    {15, "1.8 m"},    {16, "2.0 m"},    {17, "2.2 m"},
886
    {18, "2.5 m"},    {19, "2.8 m"},    {20, "3.2 m"},    {21, "3.6 m"},    {22, "4.0 m"},    {23, "4.5 m"},
887
    {24, "5.0 m"},    {25, "5.6 m"},    {26, "6.3 m"},    {27, "7.1 m"},    {28, "8.0 m"},    {29, "9.0 m"},
888
    {30, "10.0 m"},   {31, "11.0 m"},   {32, "13.0 m"},   {33, "14.0 m"},   {34, "16.0 m"},   {35, "18.0 m"},
889
    {36, "20.0 m"},   {37, "23.0 m"},   {38, "25.0 m"},   {39, "29.0 m"},   {128, N_("n/a")}, {129, "0.3 ft"},
890
    {130, "0.7 ft"},  {131, "1.0 ft"},  {132, "1.3 ft"},  {133, "1.7 ft"},  {134, "2.0 ft"},  {135, "2.3 ft"},
891
    {136, "2.6 ft"},  {137, "2.9 ft"},  {138, "3.3 ft"},  {139, "3.7 ft"},  {140, "4.1 ft"},  {141, "4.6 ft"},
892
    {142, "5.2 ft"},  {143, "5.8 ft"},  {144, "6.6 ft"},  {145, "7.4 ft"},  {146, "8.3 ft"},  {147, "9.3 ft"},
893
    {148, "10.0 ft"}, {149, "12.0 ft"}, {150, "13.0 ft"}, {151, "15.0 ft"}, {152, "17.0 ft"}, {153, "19.0 ft"},
894
    {154, "21.0 ft"}, {155, "23.0 ft"}, {156, "26.0 ft"}, {157, "29.0 ft"}, {158, "33.0 ft"}, {159, "37.0 ft"},
895
    {160, "42.0 ft"}, {161, "47.0 ft"}, {162, "52.0 ft"}, {163, "59.0 ft"}, {164, "66.0 ft"}, {165, "74.0 ft"},
896
    {166, "83.0 ft"}, {167, "94.0 ft"}, {255, N_("n/a")},
897
};
898
899
//! FlashControlMode
900
constexpr TagDetails nikonFlashControlMode[] = {
901
    {0, N_("Off")},       {1, N_("TTL")},
902
    {2, N_("iTTL")},      {3, N_("Auto Aperture")},
903
    {4, N_("Automatic")}, {5, N_("GN (distance priority)")},
904
    {6, N_("Manual")},    {7, N_("Repeating Flash")},
905
    // 8: When used with Group A (and possibly Group B), may have an additional "Quick Wireless Flash Control [A:B]"
906
    //    mode that applies to Groups A and B. May only be available with Radio AWL modes?
907
    // ?: Possibly includes "iTTL-BL", "i-AA" and "i-A" modes.
908
};
909
910
0
static constexpr bool flashModeUsesManualScale(const int64_t mode) {
911
0
  return (mode == 6 || mode == 7);
912
0
}
913
914
//! ExternalFlashFlags
915
constexpr TagDetails nikonExternalFlashFlags[] = {
916
    {0, N_("Fired")},
917
    {2, N_("Bounce Flash")},
918
    {4, N_("Wide Flash Adapter")},
919
};
920
921
//! FlashColorFilter
922
constexpr TagDetails nikonFlashColorFilter[] = {
923
    {0, N_("None")},
924
    {1, N_("FL-GL1 (for fluorescent light)")},
925
    {2, N_("FL-GL2 (for fluorescent light)")},
926
    {9, N_("TN-A1 (for incandescent light)")},
927
    {10, N_("TN-A2 (for incandescent light)")},
928
    {65, N_("Red")},
929
    {66, N_("Blue")},
930
    {67, N_("Yellow")},
931
    {68, N_("Amber")},
932
    {79, N_("Other")},
933
};
934
935
//! FlashWirelessOptions
936
constexpr TagDetails nikonFlashAWLMode[] = {
937
    {0, N_("AWL Off")},
938
    {1, N_("Optical AWL")},
939
    {2, N_("Optical/Radio AWL")},
940
    {3, N_("Radio AWL")},
941
};
942
943
//! FlashExposureComp
944
constexpr TagDetails nikonFlashExposureComp[] = {
945
    {0, N_("Exposure Comp.: Entire frame")},
946
    {4, N_("Exposure Comp.: Background Only")},
947
};
948
949
//! FlashIlluminationPattern
950
constexpr TagDetails nikonFlashIlluminationPat[] = {
951
    {0, N_("Illumination Pat.: Standard")},
952
    {1, N_("Illumination Pat.: Center-weighted")},
953
    {2, N_("Illumination Pat.: Even")},
954
};
955
956
//! FlashAdaptors
957
constexpr TagDetailsBitmask nikonFlashAdaptors[] = {
958
    {0x04, N_("Bounce Flash adaptor")},
959
    {0x10, N_("Wide Flash adaptor")},
960
    {0x20, N_("Nikon Diffusion Dome")},
961
};
962
963
0
static std::ostream& printFlashCompensationValue(std::ostream& os, const unsigned char value, const bool manualScale) {
964
0
  std::ios::fmtflags f(os.flags());
965
0
  std::ostringstream oss;
966
0
  oss.copyfmt(os);
967
968
0
  if (manualScale) {
969
    /*
970
       // Format:
971
       0 = "1/1"
972
       1 = "1/1 (-1/6EV)"
973
       2 = "1/1 (-1/3EV)"
974
       3 = "1/1 (-1/2EV)"
975
       4 = "1/1 (-2/3EV)"
976
       5 = "1/1 (-5/6EV)"
977
       6 = "1/2"
978
       7 = "1/2 (-1/6EV)"
979
       ...
980
       48 = "1/256"
981
    */
982
0
    if (value > 48) {
983
0
      os << "(" << value << ")";
984
0
      os.flags(f);
985
0
      return os;
986
0
    }
987
0
    const auto mod = value % 6;
988
0
    auto temp = (value < 6) ? 0 : (value - mod) / 6;
989
0
    os << "1/" << std::exp2(temp);
990
0
    if (mod != 0) {
991
0
      os << " (-";
992
0
      switch (mod) {
993
0
        case 1:
994
0
          os << "1/6 EV)";
995
0
          break;
996
0
        case 2:
997
0
          os << "1/3 EV)";
998
0
          break;
999
0
        case 3:
1000
0
          os << "1/2 EV)";
1001
0
          break;
1002
0
        case 4:
1003
0
          os << "2/3 EV)";
1004
0
          break;
1005
0
        case 5:
1006
0
          os << "5/6 EV)";
1007
0
          break;
1008
0
      }
1009
0
    }
1010
0
  } else {
1011
    /*
1012
    // Format uses 127 as boundary between +/- then values descend:
1013
    0   = "0.0EV"
1014
    1   = "-0.2EV"
1015
    2   = "-0.3EV"
1016
    3   = "-0.5EV"
1017
    4   = "-0.7EV"
1018
    5   = "-0.8EV"
1019
    6   = "-1.0EV"
1020
    7   = "-1.2EV"
1021
    ...
1022
    127 = "-21.2EV"
1023
    128 = "+21.3EV"
1024
    129 = "+21.2EV"
1025
    130 = "+21.0EV"
1026
    ...
1027
    255 = "+0.2"
1028
     */
1029
0
    auto output = 0.0f;
1030
0
    if (value < 128) {
1031
0
      if (value != 0)
1032
0
        output = static_cast<float>(value) * -1.0f;
1033
0
    } else {
1034
0
      output = 256.0f - static_cast<float>(value);
1035
0
    }
1036
0
    os.precision(1);
1037
0
    if (value != 0)
1038
0
      os << std::showpos;
1039
0
    os << std::fixed << (output / 6) << " EV";
1040
0
  }
1041
0
  os.copyfmt(os);
1042
0
  os.flags(f);
1043
0
  return os;
1044
0
}
1045
1046
// Nikon3 Flash Info 1 Tag Info
1047
constexpr TagInfo Nikon3MakerNote::tagInfoFl1_[] = {
1048
    {0, "Version", N_("Version"), N_("Version"), IfdId::nikonFl1Id, SectionId::makerTags, undefined, 4,
1049
     printExifVersion},
1050
    {4, "FlashSource", N_("Flash Source"), N_("Flash source"), IfdId::nikonFl1Id, SectionId::makerTags, unsignedByte, 1,
1051
     EXV_PRINT_TAG(nikonFlashSource)},
1052
    {5, "0x0005", N_("0x0005"), N_("Unknown"), IfdId::nikonFl1Id, SectionId::makerTags, unsignedByte, 1, printValue},
1053
    {6, "ExternalFlashFirmware", N_("External Flash Firmware"), N_("External flash firmware"), IfdId::nikonFl1Id,
1054
     SectionId::makerTags, unsignedShort, 1, EXV_PRINT_TAG(nikonFlashFirmware)},
1055
    {8, "ExternalFlashFlags", N_("External Flash Flags"), N_("External flash flags"), IfdId::nikonFl1Id,
1056
     SectionId::makerTags, unsignedByte, 1, EXV_PRINT_TAG(nikonExternalFlashFlags)},
1057
    {11, "FlashFocalLength", N_("Flash Focal Length"), N_("Flash focal length"), IfdId::nikonFl1Id,
1058
     SectionId::makerTags, unsignedByte, 1, printFlashFocalLength},
1059
    {12, "RepeatingFlashRate", N_("Repeating Flash Rate"), N_("Repeating flash rate"), IfdId::nikonFl1Id,
1060
     SectionId::makerTags, unsignedByte, 1, printRepeatingFlashRate},
1061
    {13, "RepeatingFlashCount", N_("Repeating Flash Count"), N_("Repeating flash count"), IfdId::nikonFl1Id,
1062
     SectionId::makerTags, unsignedByte, 1, printRepeatingFlashCount},
1063
    {14, "FlashGNDistance", N_("Flash GN Distance"), N_("Flash GN distance"), IfdId::nikonFl1Id, SectionId::makerTags,
1064
     unsignedByte, 1, EXV_PRINT_TAG(nikonFlashGNDistance)},
1065
    {15, "FlashGroupAControlMode", N_("Flash Group A Control Mode"), N_("Flash group a control mode"),
1066
     IfdId::nikonFl1Id, SectionId::makerTags, unsignedByte, 1, EXV_PRINT_TAG(nikonFlashControlMode)},
1067
    {16, "FlashGroupBControlMode", N_("Flash Group B Control Mode"), N_("Flash group b control mode"),
1068
     IfdId::nikonFl1Id, SectionId::makerTags, unsignedByte, 1, EXV_PRINT_TAG(nikonFlashControlMode)},
1069
    // End of list marker
1070
    {0xffff, "(UnknownNikonMeTag)", "(UnknownNikonMeTag)", N_("Unknown Nikon Multi Exposure Tag"), IfdId::nikonFl1Id,
1071
     SectionId::makerTags, unsignedByte, 1, printValue},
1072
};
1073
1074
// Nikon3 Flash Info 2 Tag Info
1075
constexpr TagInfo Nikon3MakerNote::tagInfoFl2_[] = {
1076
    {0, "Version", N_("Version"), N_("Version"), IfdId::nikonFl2Id, SectionId::makerTags, undefined, 4,
1077
     printExifVersion},
1078
    {4, "FlashSource", N_("Flash Source"), N_("Flash source"), IfdId::nikonFl2Id, SectionId::makerTags, unsignedByte, 1,
1079
     EXV_PRINT_TAG(nikonFlashSource)},
1080
    {5, "0x0005", N_("0x0005"), N_("Unknown"), IfdId::nikonFl2Id, SectionId::makerTags, unsignedByte, 1, printValue},
1081
    {6, "ExternalFlashFirmware", N_("External Flash Firmware"), N_("External flash firmware"), IfdId::nikonFl2Id,
1082
     SectionId::makerTags, unsignedShort, 1, EXV_PRINT_TAG(nikonFlashFirmware)},
1083
    {8, "ExternalFlashFlags", N_("External Flash Flags"), N_("External flash flags"), IfdId::nikonFl2Id,
1084
     SectionId::makerTags, unsignedByte, 1, EXV_PRINT_TAG(nikonExternalFlashFlags)},
1085
    {12, "FlashFocalLength", N_("Flash Focal Length"), N_("Flash focal length"), IfdId::nikonFl2Id,
1086
     SectionId::makerTags, unsignedByte, 1, printFlashFocalLength},
1087
    {13, "RepeatingFlashRate", N_("Repeating Flash Rate"), N_("Repeating flash rate"), IfdId::nikonFl2Id,
1088
     SectionId::makerTags, unsignedByte, 1, printRepeatingFlashRate},
1089
    {14, "RepeatingFlashCount", N_("Repeating Flash Count"), N_("Repeating flash count"), IfdId::nikonFl2Id,
1090
     SectionId::makerTags, unsignedByte, 1, printRepeatingFlashCount},
1091
    {15, "FlashGNDistance", N_("Flash GN Distance"), N_("Flash GN distance"), IfdId::nikonFl2Id, SectionId::makerTags,
1092
     unsignedByte, 1, EXV_PRINT_TAG(nikonFlashGNDistance)},
1093
    // End of list marker
1094
    {0xffff, "(UnknownNikonMeTag)", "(UnknownNikonMeTag)", N_("Unknown Nikon Multi Exposure Tag"), IfdId::nikonFl2Id,
1095
     SectionId::makerTags, unsignedByte, 1, printValue},
1096
};
1097
1098
// Nikon3 Flash Info 3 Tag Info
1099
constexpr TagInfo Nikon3MakerNote::tagInfoFl3_[] = {
1100
    {0, "Version", N_("Version"), N_("Version"), IfdId::nikonFl3Id, SectionId::makerTags, undefined, 4,
1101
     printExifVersion},
1102
    {4, "FlashSource", N_("Flash Source"), N_("Flash source"), IfdId::nikonFl3Id, SectionId::makerTags, unsignedByte, 1,
1103
     EXV_PRINT_TAG(nikonFlashSource)},
1104
    {6, "ExternalFlashFirmware", N_("External Flash Firmware"), N_("External flash firmware"), IfdId::nikonFl3Id,
1105
     SectionId::makerTags, unsignedShort, 1, EXV_PRINT_TAG(nikonFlashFirmware)},
1106
    {8, "ExternalFlashFlags", N_("External Flash Flags"), N_("External flash flags"), IfdId::nikonFl3Id,
1107
     SectionId::makerTags, unsignedByte, 1, EXV_PRINT_TAG(nikonExternalFlashFlags)},
1108
    {12, "FlashFocalLength", N_("Flash Focal Length"), N_("Flash focal length"), IfdId::nikonFl3Id,
1109
     SectionId::makerTags, unsignedByte, 1, printFlashFocalLength},
1110
    {13, "RepeatingFlashRate", N_("Repeating Flash Rate"), N_("Repeating flash rate"), IfdId::nikonFl3Id,
1111
     SectionId::makerTags, unsignedByte, 1, printRepeatingFlashRate},
1112
    {14, "RepeatingFlashCount", N_("Repeating Flash Count"), N_("Repeating flash count"), IfdId::nikonFl3Id,
1113
     SectionId::makerTags, unsignedByte, 1, printRepeatingFlashCount},
1114
    {15, "FlashGNDistance", N_("Flash GN Distance"), N_("Flash GN distance"), IfdId::nikonFl3Id, SectionId::makerTags,
1115
     unsignedByte, 1, EXV_PRINT_TAG(nikonFlashGNDistance)},
1116
    {16, "FlashColorFilter", N_("Flash Color Filter"), N_("Flash color filter"), IfdId::nikonFl3Id,
1117
     SectionId::makerTags, unsignedByte, 1, EXV_PRINT_TAG(nikonFlashColorFilter)},
1118
    // End of list marker
1119
    {0xffff, "(UnknownNikonMeTag)", "(UnknownNikonMeTag)", N_("Unknown Nikon Multi Exposure Tag"), IfdId::nikonFl3Id,
1120
     SectionId::makerTags, unsignedByte, 1, printValue},
1121
};
1122
1123
// Nikon3 Flash Info 6 (0106) Tag Info
1124
constexpr TagInfo Nikon3MakerNote::tagInfoFl6_[] = {
1125
    {0, "Version", N_("Version"), N_("Identifies the NikonFl version"), IfdId::nikonFl6Id, SectionId::makerTags,
1126
     undefined, 4, printExifVersion},
1127
    {4, "FlashSource", N_("Flash source"), N_("The type of flash used"), IfdId::nikonFl6Id, SectionId::makerTags,
1128
     unsignedByte, 1, EXV_PRINT_TAG(nikonFlashSource)},
1129
    // 5: May be connected to high-speed shutter setting?
1130
    {6, "ExternalFlashFirmware", N_("External flash firmware"), N_("External flash firmware version"),
1131
     IfdId::nikonFl6Id, SectionId::makerTags, unsignedShort, 1, EXV_PRINT_TAG(nikonFlashFirmware)},
1132
    {8, "ExternalFlashData1", N_("External flash data 1"),
1133
     N_("The Speedlight flash status and any attached flash adapters"), IfdId::nikonFl6Id, SectionId::makerTags,
1134
     unsignedByte, 1, printExternalFlashData1Fl6},
1135
    {9, "ExternalFlashData2", N_("External flash data 2"),
1136
     N_("The external flash status and the mode used for the Master flash (see FlashSource)"), IfdId::nikonFl6Id,
1137
     SectionId::makerTags, unsignedByte, 1, printExternalFlashData2Fl6},
1138
    {10, "FlashCompensationMaster", N_("Flash compensation Master"),
1139
     N_("Flash compensation for the Master flash (see FlashSource)"), IfdId::nikonFl6Id, SectionId::makerTags,
1140
     unsignedByte, 1, printFlashMasterDataFl6},
1141
    {12, "FlashFocalLength", N_("Flash focal length"), N_("Flash focal length"), IfdId::nikonFl6Id,
1142
     SectionId::makerTags, unsignedByte, 1, printFlashFocalLength},
1143
    {13, "RepeatingFlashRate", N_("Repeating flash rate"), N_("For repeating flash mode, the rate (in Hz)"),
1144
     IfdId::nikonFl6Id, SectionId::makerTags, unsignedByte, 1, printRepeatingFlashRate},
1145
    {14, "RepeatingFlashCount", N_("Repeating flash count"),
1146
     N_("For repeating flash mode, the number of flash firings"), IfdId::nikonFl6Id, SectionId::makerTags, unsignedByte,
1147
     1, printRepeatingFlashCount},
1148
    {15, "FlashGNDistance", N_("Flash GN distance"),
1149
     N_("For GN (distance priority) mode on the Master flash (see FlashSource), the distance to the subject"),
1150
     IfdId::nikonFl6Id, SectionId::makerTags, unsignedByte, 1, EXV_PRINT_TAG(nikonFlashGNDistance)},
1151
    {16, "FlashColorFilter", N_("Flash color filter"), N_("The attached color filter"), IfdId::nikonFl6Id,
1152
     SectionId::makerTags, unsignedByte, 1, EXV_PRINT_TAG(nikonFlashColorFilter)},
1153
    {17, "FlashGroupAControlData", N_("Flash Group A control data"), N_("The mode used for Group A flashes"),
1154
     IfdId::nikonFl6Id, SectionId::makerTags, unsignedByte, 1, printFlashGroupAControlData},
1155
    {18, "FlashGroupBCControlData", N_("Flash Group B/C control data"), N_("The modes used for Group B and C flashes"),
1156
     IfdId::nikonFl6Id, SectionId::makerTags, unsignedByte, 1, printFlashGroupBCControlData},
1157
    {19, "FlashCompensationGroupA", N_("Flash compensation Group A"), N_("Flash compensation for Group A flashes"),
1158
     IfdId::nikonFl6Id, SectionId::makerTags, unsignedByte, 1, printFlashGroupADataFl6},
1159
    {20, "FlashCompensationGroupB", N_("Flash compensation Group B data"), N_("Flash compensation for Group B flashes"),
1160
     IfdId::nikonFl6Id, SectionId::makerTags, unsignedByte, 1, printFlashGroupBDataFl6},
1161
    {21, "FlashCompensationGroupC", N_("Flash Compensation Group C data"), N_("Flash compensation for Group C flashes"),
1162
     IfdId::nikonFl6Id, SectionId::makerTags, unsignedByte, 1, printFlashGroupCDataFl6},
1163
    // 22: Possibly includes nikonFlashExposureComp array?
1164
    {28, "CameraExposureCompensation", N_("Camera exposure compensation"), N_("The camera's exposure compensation"),
1165
     IfdId::nikonFl6Id, SectionId::makerTags, unsignedByte, 1, printCameraExposureCompensation},
1166
    {29, "CameraFlashCompensation", N_("Camera flash compensation"), N_("The camera's flash compensation"),
1167
     IfdId::nikonFl6Id, SectionId::makerTags, unsignedByte, 1, printCameraExposureCompensation},
1168
    {39, "FlashMasterOutput", N_("Flash Master output"),
1169
     N_("Total flash output for the Master (see FlashSource). FlashMasterOutput = CameraExposureCompensation "
1170
        "(if exposure uses \"Entire frame\" mode and Master uses a non-manual mode) + CameraFlashCompensation (if "
1171
        "Master uses a non-manual mode) + FlashCompensationMaster"),
1172
     IfdId::nikonFl6Id, SectionId::makerTags, unsignedByte, 1, printFlashMasterDataFl6},
1173
    {40, "FlashGroupAOutput", N_("Flash Group A output"),
1174
     N_("Total flash output for Group A. FlashGroupAOutput = CameraExposureCompensation (if exposure uses \"Entire "
1175
        "frame\" mode and Group A uses a non-manual mode) + CameraFlashCompensation (if Group A uses a non-manual "
1176
        "mode) + "
1177
        "FlashCompensationGroupA"),
1178
     IfdId::nikonFl6Id, SectionId::makerTags, unsignedByte, 1, printFlashGroupADataFl6},
1179
    {41, "FlashGroupBOutput", N_("Flash Group B output"),
1180
     N_("Total flash output for Group B. FlashGroupBOutput = CameraExposureCompensation (if exposure uses \"Entire "
1181
        "frame\" mode and Group B uses a non-manual mode) + CameraFlashCompensation (if Group B uses a non-manual "
1182
        "mode) + "
1183
        "FlashCompensationGroupB"),
1184
     IfdId::nikonFl6Id, SectionId::makerTags, unsignedByte, 1, printFlashGroupBDataFl6},
1185
    {42, "FlashGroupCOutput", N_("Flash Group C output"),
1186
     N_("Total flash output for Group C. FlashGroupCOutput = CameraExposureCompensation (if exposure uses \"Entire "
1187
        "frame\" mode and Group C uses a non-manual mode) + CameraFlashCompensation (if Group C uses a non-manual "
1188
        "mode) + "
1189
        "FlashCompensationGroupC"),
1190
     IfdId::nikonFl6Id, SectionId::makerTags, unsignedByte, 1, printFlashGroupCDataFl6},
1191
    // End of list marker
1192
    {0xffff, "(UnknownNikonFl6Tag)", "(UnknownNikonFl6Tag)", N_("Unknown Nikon Flash Info 6 Tag"), IfdId::nikonFl6Id,
1193
     SectionId::makerTags, unsignedByte, 1, printValue},
1194
};
1195
1196
// Nikon3 Flash Info 7 (0107 and 0108) Tag Info
1197
constexpr TagInfo Nikon3MakerNote::tagInfoFl7_[] = {
1198
    {0, "Version", N_("Version"), N_("Identifies the NikonFl version"), IfdId::nikonFl7Id, SectionId::makerTags,
1199
     undefined, 4, printExifVersion},
1200
    {4, "FlashSource", N_("Flash source"), N_("The type of flash used"), IfdId::nikonFl7Id, SectionId::makerTags,
1201
     unsignedByte, 1, EXV_PRINT_TAG(nikonFlashSource)},
1202
    // 5: Possibly connected to high-speed shutter setting?
1203
    {6, "ExternalFlashFirmware", N_("External flash firmware"), N_("The firmware version used by the external flash"),
1204
     IfdId::nikonFl7Id, SectionId::makerTags, unsignedShort, 1, EXV_PRINT_TAG(nikonFlashFirmware)},
1205
    {8, "ExternalFlashData1", N_("External flash data 1"),
1206
     N_("The external flash state, zoom status and attached flash adapters"), IfdId::nikonFl7Id, SectionId::makerTags,
1207
     unsignedByte, 1, printExternalFlashData1Fl7},
1208
    {9, "ExternalFlashData2", N_("External flash data 2"), N_("The mode used for the Master flash (see FlashSource)"),
1209
     IfdId::nikonFl7Id, SectionId::makerTags, unsignedByte, 1, printExternalFlashData2},
1210
    {10, "FlashCompensationMaster", N_("Flash compensation Master"),
1211
     N_("Flash compensation for the Master flash (see FlashSource)"), IfdId::nikonFl7Id, SectionId::makerTags,
1212
     unsignedByte, 1, printFlashMasterDataFl7},
1213
    // 12: Purpose of tag is unclear as manual zoom value is found in tag 38. Possibly connected to automatic zoom?
1214
    {12, "FlashFocalLength", N_("Flash focal length"), N_("Flash focal length"), IfdId::nikonFl7Id,
1215
     SectionId::makerTags, unsignedByte, 1, printFlashFocalLength},
1216
    {13, "RepeatingFlashRate", N_("Repeating flash rate"), N_("For repeating flash modes, the rate (in Hz)"),
1217
     IfdId::nikonFl7Id, SectionId::makerTags, unsignedByte, 1, printRepeatingFlashRate},
1218
    {14, "RepeatingFlashCount", N_("Repeating flash count"),
1219
     N_("For repeating flash modes, the number of flash firings"), IfdId::nikonFl7Id, SectionId::makerTags,
1220
     unsignedByte, 1, printRepeatingFlashCount},
1221
    {15, "FlashGNDistance", N_("Flash GN distance"),
1222
     N_("For GN (distance priority) mode on the Master flash (see FlashSource), the distance to the subject"),
1223
     IfdId::nikonFl7Id, SectionId::makerTags, unsignedByte, 1, EXV_PRINT_TAG(nikonFlashGNDistance)},
1224
    {16, "FlashColorFilter", N_("Flash color filter"), N_("The attached color filters"), IfdId::nikonFl7Id,
1225
     SectionId::makerTags, unsignedByte, 1, EXV_PRINT_TAG(nikonFlashColorFilter)},
1226
    // 17: Possibly also contains control data for Group D in upper nibble?
1227
    {17, "FlashGroupAControlData", N_("Flash Group A control data"), N_("The mode used for Group A flashes"),
1228
     IfdId::nikonFl7Id, SectionId::makerTags, unsignedByte, 1, printFlashGroupAControlData},
1229
    {18, "FlashGroupBCControlData", N_("Flash Groups B/C control data"), N_("The modes used for Group B and C flashes"),
1230
     IfdId::nikonFl7Id, SectionId::makerTags, unsignedByte, 1, printFlashGroupBCControlData},
1231
    {19, "FlashCompensationGroupA", N_("Flash compensation Group A"), N_("Flash compensation for Group A flashes"),
1232
     IfdId::nikonFl7Id, SectionId::makerTags, unsignedByte, 1, printFlashGroupADataFl7},
1233
    {20, "FlashCompensationGroupB", N_("Flash compensation Group B data"), N_("Flash compensation for Group B flashes"),
1234
     IfdId::nikonFl7Id, SectionId::makerTags, unsignedByte, 1, printFlashGroupBDataFl7},
1235
    {21, "FlashCompensationGroupC", N_("Flash Compensation Group C data"), N_("Flash compensation for Group C flashes"),
1236
     IfdId::nikonFl7Id, SectionId::makerTags, unsignedByte, 1, printFlashGroupCDataFl7},
1237
    {22, "ExternalFlashData3", N_("External flash data 3"),
1238
     N_("For the camera's exposure compensation, defines how the flash level is adjusted"), IfdId::nikonFl7Id,
1239
     SectionId::makerTags, unsignedByte, 1, printExternalFlashData3},
1240
    {27, "CameraFlashOutput", N_("Camera flash output"),
1241
     N_("Total flash output for the camera. CameraFlashOutput = CameraExposureCompensation (if ExternalFlashData3 "
1242
        "uses \"Entire frame\" mode) + CameraFlashCompensation"),
1243
     IfdId::nikonFl7Id, SectionId::makerTags, unsignedByte, 1, printCameraExposureCompensation},
1244
    {28, "CameraExposureCompensation", N_("Camera exposure compensation"), N_("The camera's exposure compensation"),
1245
     IfdId::nikonFl7Id, SectionId::makerTags, unsignedByte, 1, printCameraExposureCompensation},
1246
    {29, "CameraFlashCompensation", N_("Camera flash compensation"), N_("The camera's flash compensation"),
1247
     IfdId::nikonFl7Id, SectionId::makerTags, unsignedByte, 1, printCameraExposureCompensation},
1248
    // 34: Possible that FV Lock sets '0100 0000'?
1249
    {37, "ExternalFlashData4", N_("External flash data 4"), N_("The flash illumination pattern"), IfdId::nikonFl7Id,
1250
     SectionId::makerTags, unsignedByte, 1, printExternalFlashData4},
1251
    {38, "FlashZoomHeadPosition", N_("Flash zoom head position"), N_("Flash zoom head position (in mm)"),
1252
     IfdId::nikonFl7Id, SectionId::makerTags, unsignedByte, 1, printFlashZoomHeadPosition},
1253
    {39, "FlashMasterOutput", N_("Flash Master output"),
1254
     N_("Total flash output for the Master (see FlashSource). FlashMasterOutput = CameraFlashOutput (if Master uses a "
1255
        "non-manual mode) + "
1256
        "FlashCompensationMaster"),
1257
     IfdId::nikonFl7Id, SectionId::makerTags, unsignedByte, 1, printFlashMasterDataFl7},
1258
    {40, "FlashGroupAOutput", N_("Flash Group A output"),
1259
     N_("Total flash output for Group A. FlashGroupAOutput = CameraFlashOutput (if Group A uses a non-manual mode) + "
1260
        "FlashCompensationGroupA"),
1261
     IfdId::nikonFl7Id, SectionId::makerTags, unsignedByte, 1, printFlashGroupADataFl7},
1262
    {41, "FlashGroupBOutput", N_("Flash Group B output"),
1263
     N_("Total flash output for Group B. FlashGroupBOutput = CameraFlashOutput (if Group B uses a non-manual mode) + "
1264
        "FlashCompensationGroupB"),
1265
     IfdId::nikonFl7Id, SectionId::makerTags, unsignedByte, 1, printFlashGroupBDataFl7},
1266
    {42, "FlashGroupCOutput", N_("Flash Group C output"),
1267
     N_("Total flash output for Group C. FlashGroupCOutput = CameraFlashOutput (if Group C uses a non-manual mode) + "
1268
        "FlashCompensationGroupC"),
1269
     IfdId::nikonFl7Id, SectionId::makerTags, unsignedByte, 1, printFlashGroupCDataFl7},
1270
    // 43-46: Each corresponds to M/A/B/C - set when using TTL modes, otherwise is zero. Could be connected to the
1271
    //        monitor pre-flashes?
1272
    {67, "WirelessFlashData", N_("Wireless flash data"), N_("Advanced Wireless Lighting (AWL) communication mode"),
1273
     IfdId::nikonFl7Id, SectionId::makerTags, unsignedByte, 1, EXV_PRINT_TAG(nikonFlashAWLMode)},
1274
    // 68-72: Related to WirelessFlashData? Set if AWL is on, zero if AWL is off. 68-71 connected to M/A/B/C?
1275
    // ?:     1. Groups D/E/F will have equivalent tags to Groups A/B/C (see note in tag 17). This could also include
1276
    //           equivalent tags in 43-46?
1277
    //        2. Compatible remote flashes using 'Radio AWL' could transmit settings/data back to the Speedflash?
1278
    //        3. Automatic flash mode (A) uses an aperture value.
1279
    //        4. The Speedlight can detect if the Master is not pointed straight ahead. The vertical and horizontal
1280
    //           angles/positions of the flash could be recorded?
1281
    // End of list marker
1282
    {0xffff, "(UnknownNikonFl7Tag)", "(UnknownNikonFl7Tag)", N_("Unknown Nikon Flash Info 7 Tag"), IfdId::nikonFl7Id,
1283
     SectionId::makerTags, unsignedByte, 1, printValue},
1284
};
1285
1286
// Nikon3 Shot Info D80 Tag Info
1287
constexpr TagInfo Nikon3MakerNote::tagInfoSi1_[] = {
1288
    {0, "Version", N_("Version"), N_("Version"), IfdId::nikonSi1Id, SectionId::makerTags, unsignedByte, 4,
1289
     printExifVersion},
1290
    {586, "ShutterCount", N_("Shutter Count"), N_("Shutter count"), IfdId::nikonSi1Id, SectionId::makerTags,
1291
     unsignedLong, 1, printValue},
1292
    // End of list marker
1293
    {0xffff, "(UnknownNikonSi1Tag)", "(UnknownNikonSi1Tag)", N_("Unknown Nikon Shot Info D80 Tag"), IfdId::nikonSi1Id,
1294
     SectionId::makerTags, unsignedByte, 1, printValue},
1295
};
1296
1297
// Nikon3 Shot Info D40 Tag Info
1298
constexpr TagInfo Nikon3MakerNote::tagInfoSi2_[] = {
1299
    {0, "Version", N_("Version"), N_("Version"), IfdId::nikonSi2Id, SectionId::makerTags, unsignedByte, 4,
1300
     printExifVersion},
1301
    {582, "ShutterCount", N_("Shutter Count"), N_("Shutter count"), IfdId::nikonSi2Id, SectionId::makerTags,
1302
     unsignedLong, 1, printValue},
1303
    {738, "FlashLevel", N_("Flash Level"), N_("Flash level"), IfdId::nikonSi2Id, SectionId::makerTags, unsignedByte, 1,
1304
     printValue},
1305
    // End of list marker
1306
    {0xffff, "(UnknownNikonSi2Tag)", "(UnknownNikonSi2Tag)", N_("Unknown Nikon Shot Info D40 Tag"), IfdId::nikonSi2Id,
1307
     SectionId::makerTags, unsignedByte, 1, printValue},
1308
};
1309
1310
//! AfFineTuneAdj D300 (a)
1311
constexpr TagDetails nikonAfFineTuneAdj1[] = {
1312
    {0x0000, "0"},   {0x003a, "+1"},  {0x003b, "+2"},  {0x003c, "+4"},  {0x003d, "+8"},  {0x003e, "+16"},
1313
    {0x00c2, "-16"}, {0x00c3, "-8"},  {0x00c4, "-4"},  {0x00c5, "-2"},  {0x00c6, "-1"},  {0x103e, "+17"},
1314
    {0x10c2, "-17"}, {0x203d, "+9"},  {0x203e, "+18"}, {0x20c2, "-18"}, {0x20c3, "-9"},  {0x303e, "+19"},
1315
    {0x30c2, "-19"}, {0x403c, "+5"},  {0x403d, "+10"}, {0x403e, "+20"}, {0x40c2, "-20"}, {0x40c3, "-10"},
1316
    {0x40c4, "-5"},  {0x603d, "+11"}, {0x60c3, "-11"}, {0x803b, "+3"},  {0x803c, "+6"},  {0x803d, "+12"},
1317
    {0x80c3, "-12"}, {0x80c4, "-6"},  {0x80c5, "-3"},  {0xa03d, "+13"}, {0xa0c3, "-13"}, {0xc03c, "+7"},
1318
    {0xc03d, "+14"}, {0xc0c3, "-14"}, {0xc0c4, "-7"},  {0xe03d, "+15"}, {0xe0c3, "-15"},
1319
};
1320
1321
// Nikon3 Shot Info D300 (a) Tag Info
1322
constexpr TagInfo Nikon3MakerNote::tagInfoSi3_[] = {
1323
    {0, "Version", N_("Version"), N_("Version"), IfdId::nikonSi3Id, SectionId::makerTags, unsignedByte, 4,
1324
     printExifVersion},
1325
    {604, "ISO", N_("ISO"), N_("ISO"), IfdId::nikonSi3Id, SectionId::makerTags, unsignedByte, 1, printIiIso},
1326
    {633, "ShutterCount", N_("Shutter Count"), N_("Shutter count"), IfdId::nikonSi3Id, SectionId::makerTags,
1327
     unsignedLong, 1, printValue},
1328
    {721, "AFFineTuneAdj", N_("AF Fine Tune Adj"), N_("AF fine tune adj"), IfdId::nikonSi3Id, SectionId::makerTags,
1329
     unsignedShort, 1, EXV_PRINT_TAG(nikonAfFineTuneAdj1)},
1330
    // End of list marker
1331
    {0xffff, "(UnknownNikonSi3Tag)", "(UnknownNikonSi3Tag)", N_("Unknown Nikon Shot Info D300 (a) Tag"),
1332
     IfdId::nikonSi3Id, SectionId::makerTags, unsignedByte, 1, printValue},
1333
};
1334
1335
//! AfFineTuneAdj D300 (b)
1336
constexpr TagDetails nikonAfFineTuneAdj2[] = {
1337
    {0x0000, "0"},   {0x043e, "+13"}, {0x04c2, "-13"}, {0x183d, "+7"},  {0x183e, "+14"}, {0x18c2, "-14"},
1338
    {0x18c3, "-7"},  {0x2c3e, "+15"}, {0x2cc2, "-15"}, {0x403a, "+1"},  {0x403b, "+2"},  {0x403c, "+4"},
1339
    {0x403d, "+8"},  {0x403e, "+16"}, {0x40c2, "-16"}, {0x40c3, "-8"},  {0x40c4, "-4"},  {0x40c5, "-2"},
1340
    {0x40c6, "-1"},  {0x543e, "+17"}, {0x54c2, "-17"}, {0x683d, "+9"},  {0x683e, "+18"}, {0x68c2, "-18"},
1341
    {0x68c3, "-9"},  {0x7c3e, "+19"}, {0x7cc2, "-19"}, {0x903c, "+5"},  {0x903d, "+10"}, {0x903e, "+20"},
1342
    {0x90c2, "-20"}, {0x90c3, "-10"}, {0x90c4, "-5"},  {0xb83d, "+11"}, {0xb8c3, "-11"}, {0xe03b, "+3"},
1343
    {0xe03c, "+6"},  {0xe03d, "+12"}, {0xe0c3, "-12"}, {0xe0c4, "-6"},  {0xe0c5, "-3"},
1344
};
1345
1346
// Nikon3 Shot Info D300 (b) Tag Info
1347
constexpr TagInfo Nikon3MakerNote::tagInfoSi4_[] = {
1348
    {0, "Version", N_("Version"), N_("Version"), IfdId::nikonSi4Id, SectionId::makerTags, unsignedByte, 4,
1349
     printExifVersion},
1350
    {613, "ISO", N_("ISO"), N_("ISO"), IfdId::nikonSi4Id, SectionId::makerTags, unsignedByte, 1, printIiIso},
1351
    {644, "ShutterCount", N_("Shutter Count"), N_("Shutter count"), IfdId::nikonSi4Id, SectionId::makerTags,
1352
     unsignedLong, 1, printValue},
1353
    {732, "AFFineTuneAdj", N_("AF Fine Tune Adj"), N_("AF fine tune adj"), IfdId::nikonSi4Id, SectionId::makerTags,
1354
     unsignedShort, 1, EXV_PRINT_TAG(nikonAfFineTuneAdj2)},
1355
    // End of list marker
1356
    {0xffff, "(UnknownNikonSi4Tag)", "(UnknownNikonSi4Tag)", N_("Unknown Nikon Shot Info D300 (b) Tag"),
1357
     IfdId::nikonSi4Id, SectionId::makerTags, unsignedByte, 1, printValue},
1358
};
1359
1360
//! VibrationReduction
1361
constexpr TagDetails nikonOffOn2[] = {
1362
    {0, N_("Off")},
1363
    {1, N_("On (1)")},
1364
    {2, N_("On (2)")},
1365
    {3, N_("On (3)")},
1366
};
1367
1368
//! VibrationReduction2
1369
constexpr TagDetails nikonOffOn3[] = {
1370
    {0x0, N_("n/a")},
1371
    {0xc, N_("Off")},
1372
    {0xf, N_("On")},
1373
};
1374
1375
// Nikon3 Shot Info Tag Info
1376
constexpr TagInfo Nikon3MakerNote::tagInfoSi5_[] = {
1377
    {0, "Version", N_("Version"), N_("Version"), IfdId::nikonSi5Id, SectionId::makerTags, unsignedByte, 4,
1378
     printExifVersion},
1379
    {106, "ShutterCount1", N_("Shutter Count 1"), N_("Shutter count 1"), IfdId::nikonSi5Id, SectionId::makerTags,
1380
     unsignedLong, 1, printValue},
1381
    {110, "DeletedImageCount", N_("Deleted Image Count"), N_("Deleted image count"), IfdId::nikonSi5Id,
1382
     SectionId::makerTags, unsignedLong, 1, printValue},
1383
    {117, "VibrationReduction", N_("Vibration Reduction"), N_("Vibration reduction"), IfdId::nikonSi5Id,
1384
     SectionId::makerTags, unsignedByte, 1, EXV_PRINT_TAG(nikonOffOn2)},
1385
    {130, "VibrationReduction1", N_("Vibration Reduction 1"), N_("Vibration reduction 1"), IfdId::nikonSi5Id,
1386
     SectionId::makerTags, unsignedByte, 1, EXV_PRINT_TAG(nikonOffOn)},
1387
    {343, "ShutterCount2", N_("Shutter Count 2"), N_("Shutter count 2"), IfdId::nikonSi5Id, SectionId::makerTags,
1388
     undefined, 2, printValue},
1389
    {430, "VibrationReduction2", N_("Vibration Reduction 2"), N_("Vibration reduction 2"), IfdId::nikonSi5Id,
1390
     SectionId::makerTags, unsignedByte, 1, EXV_PRINT_TAG(nikonOffOn3)},
1391
    {598, "ISO", N_("ISO"), N_("ISO"), IfdId::nikonSi5Id, SectionId::makerTags, unsignedByte, 1, printIiIso},
1392
    {630, "ShutterCount", N_("Shutter Count"), N_("Shutter count"), IfdId::nikonSi5Id, SectionId::makerTags,
1393
     unsignedLong, 1, printValue},
1394
    // End of list marker
1395
    {0xffff, "(UnknownNikonSi5Tag)", "(UnknownNikonSi5Tag)", N_("Unknown Nikon Shot Info Tag"), IfdId::nikonSi5Id,
1396
     SectionId::makerTags, unsignedByte, 1, printValue},
1397
};
1398
1399
// Nikon3 Color Balance 1 Tag Info
1400
constexpr TagInfo Nikon3MakerNote::tagInfoCb1_[] = {
1401
    {0, "Version", N_("Version"), N_("Version"), IfdId::nikonCb1Id, SectionId::makerTags, undefined, 4,
1402
     printExifVersion},
1403
    {36, "WB_RBGGLevels", N_("WB RBGG Levels"), N_("WB RBGG levels"), IfdId::nikonCb1Id, SectionId::makerTags,
1404
     unsignedShort, 4, printValue},
1405
    // End of list marker
1406
    {0xffff, "(UnknownNikonCb1Tag)", "(UnknownNikonCb1Tag)", N_("Unknown Nikon Color Balance 1 Tag"), IfdId::nikonCb1Id,
1407
     SectionId::makerTags, unsignedShort, 1, printValue},
1408
};
1409
1410
// Nikon3 Color Balance 2 Tag Info
1411
constexpr TagInfo Nikon3MakerNote::tagInfoCb2_[] = {
1412
    {0, "Version", N_("Version"), N_("Version"), IfdId::nikonCb2Id, SectionId::makerTags, undefined, 4,
1413
     printExifVersion},
1414
    {5, "WB_RGGBLevels", N_("WB RGGB Levels"), N_("WB RGGB levels"), IfdId::nikonCb2Id, SectionId::makerTags,
1415
     unsignedShort, 4, printValue},
1416
    // End of list marker
1417
    {0xffff, "(UnknownNikonCb2Tag)", "(UnknownNikonCb2Tag)", N_("Unknown Nikon Color Balance 2 Tag"), IfdId::nikonCb2Id,
1418
     SectionId::makerTags, unsignedShort, 1, printValue},
1419
};
1420
1421
// Nikon3 Color Balance 2a Tag Info
1422
constexpr TagInfo Nikon3MakerNote::tagInfoCb2a_[] = {
1423
    {0, "Version", N_("Version"), N_("Version"), IfdId::nikonCb2aId, SectionId::makerTags, undefined, 4,
1424
     printExifVersion},
1425
    {9, "WB_RGGBLevels", N_("WB RGGB Levels"), N_("WB RGGB levels"), IfdId::nikonCb2aId, SectionId::makerTags,
1426
     unsignedShort, 4, printValue},
1427
    // End of list marker
1428
    {0xffff, "(UnknownNikonCb2aTag)", "(UnknownNikonCb2aTag)", N_("Unknown Nikon Color Balance 2a Tag"),
1429
     IfdId::nikonCb2aId, SectionId::makerTags, unsignedShort, 1, printValue},
1430
};
1431
1432
// Nikon3 Color Balance 2b Tag Info
1433
constexpr TagInfo Nikon3MakerNote::tagInfoCb2b_[] = {
1434
    {0, "Version", N_("Version"), N_("Version"), IfdId::nikonCb2bId, SectionId::makerTags, undefined, 4,
1435
     printExifVersion},
1436
    {145, "WB_RGGBLevels", N_("WB RGGB Levels"), N_("WB RGGB levels"), IfdId::nikonCb2bId, SectionId::makerTags,
1437
     unsignedShort, 4, printValue},
1438
    // End of list marker
1439
    {0xffff, "(UnknownNikonCb2bTag)", "(UnknownNikonCb2bTag)", N_("Unknown Nikon Color Balance 2b Tag"),
1440
     IfdId::nikonCb2bId, SectionId::makerTags, unsignedShort, 1, printValue},
1441
};
1442
1443
// Nikon3 Color Balance 3 Tag Info
1444
constexpr TagInfo Nikon3MakerNote::tagInfoCb3_[] = {
1445
    {0, "Version", N_("Version"), N_("Version"), IfdId::nikonCb3Id, SectionId::makerTags, undefined, 4,
1446
     printExifVersion},
1447
    {10, "WB_RGBGLevels", N_("WB RGBG Levels"), N_("WB RGBG levels"), IfdId::nikonCb3Id, SectionId::makerTags,
1448
     unsignedShort, 4, printValue},
1449
    // End of list marker
1450
    {0xffff, "(UnknownNikonCb3Tag)", "(UnknownNikonCb3Tag)", N_("Unknown Nikon Color Balance 3 Tag"), IfdId::nikonCb3Id,
1451
     SectionId::makerTags, unsignedShort, 1, printValue},
1452
};
1453
1454
// Nikon3 Color Balance 4 Tag Info
1455
constexpr TagInfo Nikon3MakerNote::tagInfoCb4_[] = {
1456
    {0, "Version", N_("Version"), N_("Version"), IfdId::nikonCb4Id, SectionId::makerTags, undefined, 4,
1457
     printExifVersion},
1458
    {147, "WB_GRBGLevels", N_("WB GRBG Levels"), N_("WB GRBG levels"), IfdId::nikonCb4Id, SectionId::makerTags,
1459
     unsignedShort, 4, printValue},
1460
    // End of list marker
1461
    {0xffff, "(UnknownNikonCb4Tag)", "(UnknownNikonCb4Tag)", N_("Unknown Nikon Color Balance 4 Tag"), IfdId::nikonCb4Id,
1462
     SectionId::makerTags, unsignedShort, 1, printValue},
1463
};
1464
1465
// Nikon3 Lens Data 1 Tag Info
1466
constexpr TagInfo Nikon3MakerNote::tagInfoLd1_[] = {
1467
    {0, "Version", N_("Version"), N_("Version"), IfdId::nikonLd1Id, SectionId::makerTags, undefined, 4,
1468
     printExifVersion},
1469
    {6, "LensIDNumber", N_("Lens ID Number"), N_("Lens ID number"), IfdId::nikonLd1Id, SectionId::makerTags,
1470
     unsignedByte, 1, printLensId1},
1471
    {7, "LensFStops", N_("Lens F-Stops"), N_("Lens F-stops"), IfdId::nikonLd1Id, SectionId::makerTags, unsignedByte, 1,
1472
     printFStops},
1473
    {8, "MinFocalLength", N_("Min Focal Length"), N_("Min focal length"), IfdId::nikonLd1Id, SectionId::makerTags,
1474
     unsignedByte, 1, printFocal},
1475
    {9, "MaxFocalLength", N_("Max Focal Length"), N_("Max focal length"), IfdId::nikonLd1Id, SectionId::makerTags,
1476
     unsignedByte, 1, printFocal},
1477
    {10, "MaxApertureAtMinFocal", N_("Max Aperture At Min Focal"), N_("Max aperture at min focal"), IfdId::nikonLd1Id,
1478
     SectionId::makerTags, unsignedByte, 1, printAperture},
1479
    {11, "MaxApertureAtMaxFocal", N_("Max Aperture At Max Focal"), N_("Max aperture at max focal"), IfdId::nikonLd1Id,
1480
     SectionId::makerTags, unsignedByte, 1, printAperture},
1481
    {12, "MCUVersion", N_("MCU Version"), N_("MCU version"), IfdId::nikonLd1Id, SectionId::makerTags, unsignedByte, 1,
1482
     printValue},
1483
    // End of list marker
1484
    {0xffff, "(UnknownNikonLd1Tag)", "(UnknownNikonLd1Tag)", N_("Unknown Nikon Lens Data 1 Tag"), IfdId::nikonLd1Id,
1485
     SectionId::makerTags, unsignedByte, 1, printValue},
1486
};
1487
1488
// Nikon3 Lens Data 2 Tag Info
1489
constexpr TagInfo Nikon3MakerNote::tagInfoLd2_[] = {
1490
    {0, "Version", N_("Version"), N_("Version"), IfdId::nikonLd2Id, SectionId::makerTags, undefined, 4,
1491
     printExifVersion},
1492
    {4, "ExitPupilPosition", N_("Exit Pupil Position"), N_("Exit pupil position"), IfdId::nikonLd2Id,
1493
     SectionId::makerTags, unsignedByte, 1, printExitPupilPosition},
1494
    {5, "AFAperture", N_("AF Aperture"), N_("AF aperture"), IfdId::nikonLd2Id, SectionId::makerTags, unsignedByte, 1,
1495
     printAperture},
1496
    {8, "FocusPosition", N_("Focus Position"), N_("Focus position"), IfdId::nikonLd2Id, SectionId::makerTags,
1497
     unsignedByte, 1, printValue},
1498
    {9, "FocusDistance", N_("Focus Distance"), N_("Focus distance"), IfdId::nikonLd2Id, SectionId::makerTags,
1499
     unsignedByte, 1, printFocusDistance},
1500
    {10, "FocalLength", N_("Focal Length"), N_("Focal length"), IfdId::nikonLd2Id, SectionId::makerTags, unsignedByte,
1501
     1, printFocal},
1502
    {11, "LensIDNumber", N_("Lens ID Number"), N_("Lens ID number"), IfdId::nikonLd2Id, SectionId::makerTags,
1503
     unsignedByte, 1, printLensId2},
1504
    {12, "LensFStops", N_("Lens F-Stops"), N_("Lens F-stops"), IfdId::nikonLd2Id, SectionId::makerTags, unsignedByte, 1,
1505
     printFStops},
1506
    {13, "MinFocalLength", N_("Min Focal Length"), N_("Min focal length"), IfdId::nikonLd2Id, SectionId::makerTags,
1507
     unsignedByte, 1, printFocal},
1508
    {14, "MaxFocalLength", N_("Max Focal Length"), N_("Max focal length"), IfdId::nikonLd2Id, SectionId::makerTags,
1509
     unsignedByte, 1, printFocal},
1510
    {15, "MaxApertureAtMinFocal", N_("Max Aperture At Min Focal"), N_("Max aperture at min focal"), IfdId::nikonLd2Id,
1511
     SectionId::makerTags, unsignedByte, 1, printAperture},
1512
    {16, "MaxApertureAtMaxFocal", N_("Max Aperture At Max Focal"), N_("Max aperture at max focal"), IfdId::nikonLd2Id,
1513
     SectionId::makerTags, unsignedByte, 1, printAperture},
1514
    {17, "MCUVersion", N_("MCU Version"), N_("MCU version"), IfdId::nikonLd2Id, SectionId::makerTags, unsignedByte, 1,
1515
     printValue},
1516
    {18, "EffectiveMaxAperture", N_("Effective Max Aperture"), N_("Effective max aperture"), IfdId::nikonLd2Id,
1517
     SectionId::makerTags, unsignedByte, 1, printAperture},
1518
    // End of list marker
1519
    {0xffff, "(UnknownNikonLd2Tag)", "(UnknownNikonLd2Tag)", N_("Unknown Nikon Lens Data 2 Tag"), IfdId::nikonLd2Id,
1520
     SectionId::makerTags, unsignedByte, 1, printValue},
1521
};
1522
1523
// Nikon3 Lens Data 3 Tag Info
1524
constexpr TagInfo Nikon3MakerNote::tagInfoLd3_[] = {
1525
    {0, "Version", N_("Version"), N_("Version"), IfdId::nikonLd3Id, SectionId::makerTags, undefined, 4,
1526
     printExifVersion},
1527
    {4, "ExitPupilPosition", N_("Exit Pupil Position"), N_("Exit pupil position"), IfdId::nikonLd3Id,
1528
     SectionId::makerTags, unsignedByte, 1, printExitPupilPosition},
1529
    {5, "AFAperture", N_("AF Aperture"), N_("AF aperture"), IfdId::nikonLd3Id, SectionId::makerTags, unsignedByte, 1,
1530
     printAperture},
1531
    {8, "FocusPosition", N_("Focus Position"), N_("Focus position"), IfdId::nikonLd3Id, SectionId::makerTags,
1532
     unsignedByte, 1, printValue},
1533
    {10, "FocusDistance", N_("Focus Distance"), N_("Focus distance"), IfdId::nikonLd3Id, SectionId::makerTags,
1534
     unsignedByte, 1, printFocusDistance},
1535
    {11, "FocalLength", N_("Focal Length"), N_("Focal length"), IfdId::nikonLd3Id, SectionId::makerTags, unsignedByte,
1536
     1, printFocal},
1537
    {12, "LensIDNumber", N_("Lens ID Number"), N_("Lens ID number"), IfdId::nikonLd3Id, SectionId::makerTags,
1538
     unsignedByte, 1, printLensId3},
1539
    {13, "LensFStops", N_("Lens F-Stops"), N_("Lens F-stops"), IfdId::nikonLd3Id, SectionId::makerTags, unsignedByte, 1,
1540
     printFStops},
1541
    {14, "MinFocalLength", N_("Min Focal Length"), N_("Min focal length"), IfdId::nikonLd3Id, SectionId::makerTags,
1542
     unsignedByte, 1, printFocal},
1543
    {15, "MaxFocalLength", N_("Max Focal Length"), N_("Max focal length"), IfdId::nikonLd3Id, SectionId::makerTags,
1544
     unsignedByte, 1, printFocal},
1545
    {16, "MaxApertureAtMinFocal", N_("Max Aperture At Min Focal"), N_("Max aperture at min focal length"),
1546
     IfdId::nikonLd3Id, SectionId::makerTags, unsignedByte, 1, printAperture},
1547
    {17, "MaxApertureAtMaxFocal", N_("Max Aperture At Max Focal"), N_("Max aperture at max focal length"),
1548
     IfdId::nikonLd3Id, SectionId::makerTags, unsignedByte, 1, printAperture},
1549
    {18, "MCUVersion", N_("MCU Version"), N_("MCU version"), IfdId::nikonLd3Id, SectionId::makerTags, unsignedByte, 1,
1550
     printValue},
1551
    {19, "EffectiveMaxAperture", N_("Effective Max Aperture"), N_("Effective max aperture"), IfdId::nikonLd3Id,
1552
     SectionId::makerTags, unsignedByte, 1, printAperture},
1553
    // End of list marker
1554
    {0xffff, "(UnknownNikonLd3Tag)", "(UnknownNikonLd3Tag)", N_("Unknown Nikon Lens Data 3 Tag"), IfdId::nikonLd3Id,
1555
     SectionId::makerTags, unsignedByte, 1, printValue},
1556
};
1557
1558
//! LensID, tag index 48
1559
// see https://github.com/exiftool/exiftool/blob/13.44/lib/Image/ExifTool/Nikon.pm#L5816
1560
constexpr TagDetails nikonZMountLensId[] = {
1561
    {0, N_("n/a")},
1562
    {1, "Nikon Nikkor Z 24-70mm f/4 S"},
1563
    {2, "Nikon Nikkor Z 14-30mm f/4 S"},
1564
    {4, "Nikon Nikkor Z 35mm f/1.8 S"},
1565
    {8, "Nikon Nikkor Z 58mm f/0.95 S Noct"},  // IB
1566
    {9, "Nikon Nikkor Z 50mm f/1.8 S"},
1567
    {11, "Nikon Nikkor Z DX 16-50mm f/3.5-6.3 VR"},
1568
    {12, "Nikon Nikkor Z DX 50-250mm f/4.5-6.3 VR"},
1569
    {13, "Nikon Nikkor Z 24-70mm f/2.8 S"},
1570
    {14, "Nikon Nikkor Z 85mm f/1.8 S"},
1571
    {15, "Nikon Nikkor Z 24mm f/1.8 S"},              // IB
1572
    {16, "Nikon Nikkor Z 70-200mm f/2.8 VR S"},       // IB
1573
    {17, "Nikon Nikkor Z 20mm f/1.8 S"},              // IB
1574
    {18, "Nikon Nikkor Z 24-200mm f/4-6.3 VR"},       // IB
1575
    {21, "Nikon Nikkor Z 50mm f/1.2 S"},              // IB
1576
    {22, "Nikon Nikkor Z 24-50mm f/4-6.3"},           // IB
1577
    {23, "Nikon Nikkor Z 14-24mm f/2.8 S"},           // IB
1578
    {24, "Nikon Nikkor Z MC 105mm f/2.8 VR S"},       // IB
1579
    {25, "Nikon Nikkor Z 40mm f/2"},                  // 28
1580
    {26, "Nikon Nikkor Z DX 18-140mm f/3.5-6.3 VR"},  // IB
1581
    {27, "Nikon Nikkor Z MC 50mm f/2.8"},             // IB
1582
    {28, "Nikon Nikkor Z 100-400mm f/4.5-5.6 VR S"},  // 28
1583
    {29, "Nikon Nikkor Z 28mm f/2.8"},                // IB
1584
    {30, "Nikon Nikkor Z 400mm f/2.8 TC VR S"},       // 28
1585
    {31, "Nikon Nikkor Z 24-120mm f/4 S"},            // 28
1586
    {32, "Nikon Nikkor Z 800mm f/6.3 VR S"},          // 28
1587
    {35, "Nikon Nikkor Z 28-75mm f/2.8"},             // IB
1588
    {36, "Nikon Nikkor Z 400mm f/4.5 VR S"},          // IB
1589
    {37, "Nikon Nikkor Z 600mm f/4 TC VR S"},         // 28
1590
    {38, "Nikon Nikkor Z 85mm f/1.2 S"},              // 28
1591
    {39, "Nikon Nikkor Z 17-28mm f/2.8"},             // IB
1592
    {40, "Nikon Nikkor Z 26mm f/2.8"},
1593
    {41, "Nikon Nikkor Z DX 12-28mm f/3.5-5.6 PZ VR"},
1594
    {42, "Nikon Nikkor Z 180-600mm f/5.6-6.3 VR"},
1595
    {43, "Nikon Nikkor Z DX 24mm f/1.7"},
1596
    {44, "Nikon Nikkor Z 70-180mm f/2.8"},
1597
    {45, "Nikon Nikkor Z 600mm f/6.3 VR S"},
1598
    {46, "Nikon Nikkor Z 135mm f/1.8 S Plena"},
1599
    {47, "Nikon Nikkor Z 35mm f/1.2 S"},
1600
    {48, "Nikon Nikkor Z 28-400mm f/4-8 VR"},
1601
    {49, "Nikon Nikkor Z 28-135mm f/4 PZ"},
1602
    {50, "Nikon Nikkor Z 24-70mm f/2.8 S II"},
1603
    {51, "Nikon Nikkor Z 35mm f/1.4"},
1604
    {52, "Nikon Nikkor Z 50mm f/1.4"},
1605
    {53, "Nikon Nikkor Z DX 16-50mm f/2.8 VR"},
1606
    {55, "Nikon Nikkor Z DX MC 35mm f/1.7"},
1607
    {57, "Nikon Nikkor Z 24-105mm f/4-7.1"},
1608
    {2305, "Laowa FFII 10mm F2.8 C&D Dreamer"},
1609
    {2820, "Viltrox AF 16mm F1.8"},
1610
    {2822, "Viltrox AF 20mm F2.8"},
1611
    {53251, "Sigma 56mm F1.4 DC DN | C"},
1612
    {57346, "Tamron 35-150mm F/2-2.8 Di III VXD"},
1613
};
1614
1615
// Nikon3 Lens Data 4 Tag Info
1616
// based on https://exiftool.org/TagNames/Nikon.html#LensData0800
1617
constexpr TagInfo Nikon3MakerNote::tagInfoLd4_[] = {
1618
    {0, "Version", N_("Version"), N_("Version"), IfdId::nikonLd4Id, SectionId::makerTags, undefined, 4,
1619
     printExifVersion},
1620
    {4, "ExitPupilPosition", N_("Exit Pupil Position"), N_("Exit pupil position"), IfdId::nikonLd4Id,
1621
     SectionId::makerTags, unsignedByte, 1, printExitPupilPosition},
1622
    {5, "AFAperture", N_("AF Aperture"), N_("AF aperture"), IfdId::nikonLd4Id, SectionId::makerTags, unsignedByte, 1,
1623
     printAperture},
1624
    {9, "FocusPosition", N_("Focus Position"), N_("Focus position"), IfdId::nikonLd4Id, SectionId::makerTags,
1625
     unsignedByte, 1, printValue},
1626
    {11, "FocusDistance", N_("Focus Distance"), N_("Focus distance"), IfdId::nikonLd4Id, SectionId::makerTags,
1627
     unsignedByte, 1, printFocusDistance},
1628
    {12, "FocalLength", N_("Focal Length"), N_("Focal length"), IfdId::nikonLd4Id, SectionId::makerTags, unsignedByte,
1629
     1, printFocal},
1630
    {13, "LensIDNumber", N_("Lens ID Number"), N_("Lens ID number"), IfdId::nikonLd4Id, SectionId::makerTags,
1631
     unsignedByte, 1, printLensId4},
1632
    {14, "LensFStops", N_("Lens F-Stops"), N_("Lens F-stops"), IfdId::nikonLd4Id, SectionId::makerTags, unsignedByte, 1,
1633
     printFStops},
1634
    {15, "MinFocalLength", N_("Min Focal Length"), N_("Min focal length"), IfdId::nikonLd4Id, SectionId::makerTags,
1635
     unsignedByte, 1, printFocal},
1636
    {16, "MaxFocalLength", N_("Max Focal Length"), N_("Max focal length"), IfdId::nikonLd4Id, SectionId::makerTags,
1637
     unsignedByte, 1, printFocal},
1638
    {17, "MaxApertureAtMinFocal", N_("Max Aperture At Min Focal"), N_("Max aperture at min focal length"),
1639
     IfdId::nikonLd4Id, SectionId::makerTags, unsignedByte, 1, printAperture},
1640
    {18, "MaxApertureAtMaxFocal", N_("Max Aperture At Max Focal"), N_("Max aperture at max focal length"),
1641
     IfdId::nikonLd4Id, SectionId::makerTags, unsignedByte, 1, printAperture},
1642
    {19, "MCUVersion", N_("MCU Version"), N_("MCU version"), IfdId::nikonLd4Id, SectionId::makerTags, unsignedByte, 1,
1643
     printValue},
1644
    {20, "EffectiveMaxAperture", N_("Effective Max Aperture"), N_("Effective max aperture"), IfdId::nikonLd4Id,
1645
     SectionId::makerTags, unsignedByte, 1, printAperture},
1646
    {48, "LensID", N_("LensID"), N_("Lens ID"), IfdId::nikonLd4Id, SectionId::makerTags, unsignedShort, 1,
1647
     EXV_PRINT_TAG(nikonZMountLensId)},
1648
    {54, "MaxAperture", N_("Max Aperture"), N_("Max aperture"), IfdId::nikonLd4Id, SectionId::makerTags, unsignedShort,
1649
     1, printApertureLd4},
1650
    {56, "FNumber", N_("F-Number"), N_("F-Number"), IfdId::nikonLd4Id, SectionId::makerTags, unsignedShort, 1,
1651
     printApertureLd4},
1652
    {60, "FocalLength2", N_("Focal Length 2"), N_("Focal length 2"), IfdId::nikonLd4Id, SectionId::makerTags,
1653
     unsignedShort, 1, printFocalLd4},
1654
    {78, "FocusDistance2", N_("Focus Distance 2"), N_("Focus distance 2"), IfdId::nikonLd4Id, SectionId::makerTags,
1655
     unsignedShort, 1, printFocusDistanceLd4},
1656
    // End of list marker
1657
    {0xffff, "(UnknownNikonLd4Tag)", "(UnknownNikonLd4Tag)", N_("Unknown Nikon Lens Data 3 Tag"), IfdId::nikonLd4Id,
1658
     SectionId::makerTags, unsignedByte, 1, printValue},
1659
};
1660
1661
0
std::ostream& Nikon3MakerNote::printIiIso(std::ostream& os, const Value& value, const ExifData*) {
1662
0
  auto v = std::lround(100.0 * std::exp2((value.toInt64() / 12.0) - 5));
1663
0
  return os << v;
1664
0
}
1665
1666
0
std::ostream& Nikon3MakerNote::print0x0002(std::ostream& os, const Value& value, const ExifData*) {
1667
0
  if (value.count() > 1)
1668
0
    return os << value.toInt64(1);
1669
0
  return os << "(" << value << ")";
1670
0
}
1671
1672
0
std::ostream& Nikon3MakerNote::printAf2AreaMode(std::ostream& os, const Value& value, const ExifData* metadata) {
1673
0
  int contrastDetectAF = 0;
1674
0
  if (metadata) {
1675
0
    auto pos = metadata->findKey(ExifKey("Exif.NikonAf2.ContrastDetectAF"));
1676
0
    if (pos != metadata->end() && pos->count() != 0) {
1677
0
      contrastDetectAF = pos->toUint32();
1678
0
    }
1679
0
  }
1680
1681
0
  if (contrastDetectAF == 0)
1682
0
    return EXV_PRINT_TAG(nikonAf2AreaModeContrastDetectAfOff)(os, value, nullptr);
1683
0
  return EXV_PRINT_TAG(nikonAf2AreaModeContrastDetectAfOn)(os, value, nullptr);
1684
0
}
1685
1686
0
std::ostream& Nikon3MakerNote::print0x0007(std::ostream& os, const Value& value, const ExifData*) {
1687
0
  std::string focus = value.toString();
1688
0
  if (focus == "AF-C  ")
1689
0
    return os << _("Continuous autofocus");
1690
0
  if (focus == "AF-S  ")
1691
0
    return os << _("Single autofocus");
1692
0
  if (focus == "AF-A  ")
1693
0
    return os << _("Automatic");
1694
0
  return os << "(" << value << ")";
1695
0
}
1696
1697
0
std::ostream& Nikon3MakerNote::print0x0083(std::ostream& os, const Value& value, const ExifData*) {
1698
0
  const uint32_t lensType = value.toUint32();
1699
1700
0
  bool valid = false;
1701
0
  if (lensType & 1) {
1702
0
    os << "MF ";
1703
0
    valid = true;
1704
0
  }
1705
0
  if (lensType & 2) {
1706
0
    os << "D ";
1707
0
    valid = true;
1708
0
  }
1709
0
  if (lensType & 4) {
1710
0
    os << "G ";
1711
0
    valid = true;
1712
0
  }
1713
0
  if (lensType & 8) {
1714
0
    os << "VR";
1715
0
    valid = true;
1716
0
  }
1717
1718
0
  if (!valid)
1719
0
    os << "(" << lensType << ")";
1720
1721
0
  return os;
1722
0
}
1723
1724
0
std::ostream& Nikon3MakerNote::print0x0084(std::ostream& os, const Value& value, const ExifData*) {
1725
0
  if (value.count() != 4 || value.toRational(0).second == 0 || value.toRational(1).second == 0)
1726
0
    return os << "(" << value << ")";
1727
1728
0
  auto focal = [&value] {
1729
0
    const int64_t len1 = value.toInt64(0);
1730
0
    const int64_t len2 = value.toInt64(1);
1731
1732
0
    if (len2 != len1)
1733
0
      return stringFormat("{}-{}mm ", len1, len2);
1734
0
    return stringFormat("{}mm ", len1);
1735
0
  }();
1736
1737
0
  auto aperture = [&value] {
1738
0
    auto [r1, s1] = value.toRational(2);
1739
0
    auto [r2, s2] = value.toRational(3);
1740
0
    auto f1 = static_cast<double>(r1) / s1;
1741
1742
0
    if (r2 != r1)
1743
0
      return stringFormat("F{:.2f}-{:.2f}", f1, static_cast<double>(r2) / s2);
1744
0
    return stringFormat("F{:.2f}", f1);
1745
0
  }();
1746
1747
0
  return os << focal << aperture;
1748
0
}
1749
1750
0
std::ostream& Nikon3MakerNote::print0x0085(std::ostream& os, const Value& value, const ExifData*) {
1751
0
  auto [r, s] = value.toRational();
1752
0
  if (r == 0)
1753
0
    return os << _("Unknown");
1754
0
  if (s == 0)
1755
0
    return os << "(" << value << ")";
1756
0
  return os << stringFormat("{:.2f} m", static_cast<float>(r) / s);
1757
0
}
1758
1759
0
std::ostream& Nikon3MakerNote::print0x0086(std::ostream& os, const Value& value, const ExifData*) {
1760
0
  auto [r, s] = value.toRational();
1761
0
  if (r == 0)
1762
0
    return os << _("Not used");
1763
0
  if (s == 0)
1764
0
    return os << "(" << value << ")";
1765
0
  return os << stringFormat("{:.1f}x", static_cast<float>(r) / s);
1766
0
}
1767
1768
0
std::ostream& Nikon3MakerNote::print0x0088(std::ostream& os, const Value& value, const ExifData*) {
1769
0
  if (value.size() != 4) {  // Size is 4 even for those who map this way...
1770
0
    os << "(" << value << ")";
1771
0
  } else {
1772
    // Mapping by Roger Larsson
1773
0
    const uint32_t focusmetering = value.toUint32(0);
1774
0
    const uint32_t focuspoint = value.toUint32(1);
1775
0
    const uint32_t focusused = (value.toUint32(2) << 8) + value.toUint32(3);
1776
    // TODO: enum {standard, wide} combination = standard;
1777
1778
0
    if (focusmetering == 0 && focuspoint == 0 && focusused == 0) {
1779
      // Special case, in Manual focus and with Nikon compacts
1780
      // this indicates that the field has no meaning.
1781
      // But when actually in "Single area, Center" this can mean
1782
      // that focus was not found (try this in AF-C mode)
1783
      // TODO: handle the meaningful case (interacts with other fields)
1784
0
      os << _("n/a");
1785
0
      return os;
1786
0
    }
1787
1788
0
    switch (focusmetering) {
1789
0
      case 0x00:
1790
0
        os << _("Single area");
1791
0
        break;  // D70, D200
1792
0
      case 0x01:
1793
0
        os << _("Dynamic area");
1794
0
        break;  // D70, D200
1795
0
      case 0x02:
1796
0
        os << _("Closest subject");
1797
0
        break;  // D70, D200
1798
0
      case 0x03:
1799
0
        os << _("Group dynamic-AF");
1800
0
        break;  // D200
1801
0
      case 0x04:
1802
0
        os << _("Single area (wide)"); /* TODO: combination = wide; */
1803
0
        break;                         // D200
1804
0
      case 0x05:
1805
0
        os << _("Dynamic area (wide)"); /* TODO: combination = wide; */
1806
0
        break;                          // D200
1807
0
      default:
1808
0
        os << "(" << focusmetering << ")";
1809
0
        break;
1810
0
    }
1811
1812
0
    char sep = ';';
1813
0
    if (focusmetering != 0x02) {  //  No user selected point for Closest subject
1814
0
      os << sep << ' ';
1815
1816
      // What focuspoint did the user select?
1817
0
      if (focuspoint < nikonFocuspoints.size()) {
1818
0
        os << nikonFocuspoints[focuspoint];
1819
        // TODO: os << position[focuspoint][combination]
1820
0
      } else
1821
0
        os << "(" << focuspoint << ")";
1822
1823
0
      sep = ',';
1824
0
    }
1825
1826
    // What focuspoints(!) did the camera use? add if differs
1827
0
    if (focusused == 0)
1828
0
      os << sep << " " << _("none");
1829
0
    else if (focusused != 1U << focuspoint) {
1830
      // selected point was not the actually used one
1831
      // (Roger Larsson: my interpretation, verify)
1832
0
      os << sep;
1833
0
      for (size_t fpid = 0; fpid < nikonFocuspoints.size(); fpid++)
1834
0
        if (focusused & 1 << fpid)
1835
0
          os << ' ' << nikonFocuspoints[fpid];
1836
0
    }
1837
1838
0
    os << " " << _("used");
1839
0
  }
1840
1841
0
  return os;
1842
0
}
1843
1844
0
std::ostream& Nikon3MakerNote::printAfPointsInFocus(std::ostream& os, const Value& value, const ExifData* metadata) {
1845
0
  if (value.typeId() != unsignedShort)
1846
0
    return os << "(" << value << ")";
1847
1848
0
  bool dModel = false;
1849
0
  if (metadata) {
1850
0
    auto pos = metadata->findKey(ExifKey("Exif.Image.Model"));
1851
0
    if (pos != metadata->end() && pos->count() != 0) {
1852
0
      std::string model = pos->toString();
1853
0
      if (Internal::contains(model, "NIKON D")) {
1854
0
        dModel = true;
1855
0
      }
1856
0
    }
1857
0
  }
1858
1859
0
  auto val = static_cast<uint16_t>(value.toInt64());
1860
0
  if (dModel)
1861
0
    val = (val >> 8) | ((val & 0x00ffU) << 8);
1862
1863
0
  if (val == 0x07ff)
1864
0
    return os << _("All 11 Points");
1865
1866
0
  UShortValue v;
1867
0
  v.value_.push_back(val);
1868
0
  return EXV_PRINT_TAG_BITMASK(nikonAfPointsInFocus)(os, v, nullptr);
1869
0
}
1870
1871
0
std::ostream& Nikon3MakerNote::print0x0089(std::ostream& os, const Value& value, const ExifData* metadata) {
1872
0
  if (value.count() != 1 || value.typeId() != unsignedShort) {
1873
0
    return os << "(" << value << ")";
1874
0
  }
1875
0
  const auto l = value.toInt64(0);
1876
0
  if (l == 0)
1877
0
    return os << _("Single-frame");
1878
0
  if (!(l & 0x87))
1879
0
    os << _("Single-frame") << ", ";
1880
0
  bool d70 = false;
1881
0
  if (metadata) {
1882
0
    ExifKey key("Exif.Image.Model");
1883
0
    auto pos = metadata->findKey(key);
1884
0
    if (pos != metadata->end() && pos->count() != 0) {
1885
0
      std::string model = pos->toString();
1886
0
      if (Internal::contains(model, "D70")) {
1887
0
        d70 = true;
1888
0
      }
1889
0
    }
1890
0
  }
1891
0
  if (d70)
1892
0
    return EXV_PRINT_TAG_BITMASK(nikonShootingModeD70)(os, value, nullptr);
1893
0
  return EXV_PRINT_TAG_BITMASK(nikonShootingMode)(os, value, nullptr);
1894
0
}
1895
1896
0
std::ostream& Nikon3MakerNote::print0x008b(std::ostream& os, const Value& value, const ExifData*) {
1897
  // Decoded by Robert Rottmerhusen <email@rottmerhusen.com>
1898
0
  if (value.size() != 4 || value.typeId() != undefined)
1899
0
    return os << "(" << value << ")";
1900
0
  float a = value.toFloat(0);
1901
0
  const auto b = value.toInt64(1);
1902
0
  const auto c = value.toInt64(2);
1903
0
  if (c == 0)
1904
0
    return os << "(" << value << ")";
1905
0
  return os << a * b / c;
1906
0
}
1907
1908
static bool testConfigFile(std::ostream& os, const Value& value);
1909
0
static bool testConfigFile(std::ostream& os, const Value& value) {
1910
0
  bool result = false;
1911
0
  const std::string undefined("undefined");
1912
0
  const std::string section("nikon");
1913
0
  if (Internal::readExiv2Config(section, value.toString(), undefined) != undefined) {
1914
0
    os << Internal::readExiv2Config(section, value.toString(), undefined);
1915
0
    result = true;
1916
0
  }
1917
0
  return result;
1918
0
}
1919
1920
0
std::ostream& Nikon3MakerNote::printLensId1(std::ostream& os, const Value& value, const ExifData* metadata) {
1921
0
  return testConfigFile(os, value) ? os : printLensId(os, value, metadata, "NikonLd1");
1922
0
}
1923
1924
0
std::ostream& Nikon3MakerNote::printLensId2(std::ostream& os, const Value& value, const ExifData* metadata) {
1925
0
  return testConfigFile(os, value) ? os : printLensId(os, value, metadata, "NikonLd2");
1926
0
}
1927
1928
0
std::ostream& Nikon3MakerNote::printLensId3(std::ostream& os, const Value& value, const ExifData* metadata) {
1929
0
  return testConfigFile(os, value) ? os : printLensId(os, value, metadata, "NikonLd3");
1930
0
}
1931
1932
0
std::ostream& Nikon3MakerNote::printLensId4(std::ostream& os, const Value& value, const ExifData* metadata) {
1933
0
  return testConfigFile(os, value) ? os : printLensId(os, value, metadata, "NikonLd4");
1934
0
}
1935
1936
std::ostream& Nikon3MakerNote::printLensId(std::ostream& os, const Value& value, const ExifData* metadata,
1937
0
                                           [[maybe_unused]] const std::string& group) {
1938
0
#ifdef EXV_HAVE_LENSDATA
1939
// 8< - - - 8< do not remove this line >8 - - - >8
1940
//------------------------------------------------------------------------------
1941
0
#ifndef FMOUNTLH
1942
0
#define FMOUNTLH
1943
//------------------------------------------------------------------------------
1944
// List of AF F-Mount lenses - Version 4.4.550.02                    2018-03-03
1945
//------------------------------------------------------------------------------
1946
0
#define FMLVERSION "4.4.550.02"
1947
0
#define FMLDATE "2018-03-03"
1948
  //------------------------------------------------------------------------------
1949
  //
1950
  // Created by Robert Rottmerhusen 2005 - 2018
1951
  // http://www.rottmerhusen.com (lens_id@rottmerhusen.com)
1952
  //
1953
  // Eight misidentified lenses due to double LensIDs:
1954
  //
1955
  // 2F 48 30 44 24 24 29 02.1: Nikon AF Zoom-Nikkor 20-35mm f/2.8D IF
1956
  // 2F 48 30 44 24 24 29 02.2: Tokina AT-X 235 AF PRO (AF 20-35mm f/2.8)
1957
  //
1958
  // 32 54 6A 6A 24 24 35 02.1: Nikon AF Micro-Nikkor 105mm f/2.8D
1959
  // 32 54 6A 6A 24 24 35 02.2: Sigma Macro 105mm F2.8 EX DG
1960
  //
1961
  // 7A 3C 1F 37 30 30 7E 06.1: Nikon AF-S DX Zoom-Nikkor 12-24mm f/4G IF-ED
1962
  // 7A 3C 1F 37 30 30 7E 06.2: Tokina AT-X 124 AF PRO DX II (AF 12-24mm f/4)
1963
  //
1964
  // 8B 40 2D 80 2C 3C FD 0E.1: Nikon AF-S DX VR Zoom-Nikkor 18-200mm f/3.5-5.6G IF-ED
1965
  // 8B 40 2D 80 2C 3C FD 0E.2: Nikon AF-S DX VR Zoom-Nikkor 18-200mm f/3.5-5.6G IF-ED II
1966
  //
1967
  // 32 53 64 64 24 24 35 02.1: Tamron SP AF 90mm F/2.8 Macro 1:1 (172E)
1968
  // 32 53 64 64 24 24 35 02.2: Tamron SP AF 90mm F/2.8 Di Macro 1:1 (272E)
1969
  //
1970
  // 2F 40 30 44 2C 34 29 02.1: Tokina AF 235 II (AF 20-35mm f/3.5-4.5)
1971
  // 2F 40 30 44 2C 34 29 02.2: Tokina AF 193 (AF 19-35mm f/3.5-4.5)
1972
  //
1973
  // 25 48 3C 5C 24 24 1B 02.1: Tokina AT-X 287 AF PRO SV (AF 28-70mm f/2.8)
1974
  // 25 48 3C 5C 24 24 1B 02.2: Tokina AT-X 270 AF PRO II (AF 28-70mm f/2.6-2.8)
1975
  //
1976
  // 4A 48 24 24 24 0C 4D 02.1: Samyang AE 14mm f/2.8 ED AS IF UMC
1977
  // 4A 48 24 24 24 0C 4D 02.2: Samyang 10mm f/2.8 ED AS NCS CS
1978
  //
1979
  //
1980
  // product number/order code not complete
1981
  //
1982
  // Free use in non-commercial, GPL or open source software only!
1983
  // Please contact me for adding lenses or use in commercial software.
1984
  //
1985
  //"data from TAG 0x98" "ltyp" " "TC" "MID" "maker" "PN" "lens name from manuf";
1986
  //
1987
  //------------------------------------------------------------------------------
1988
  // EXIF data necessary for new entries
1989
  //------------------------------------------------------------------------------
1990
  //
1991
  // lid:   LensIDNumber
1992
  // stps:  LensFStops
1993
  // focs:  MinFocalLength
1994
  // focl:  MaxFocalLength
1995
  // aps:   MaxApertureAtMinFocal
1996
  // apl:   MaxApertureAtMaxFocal
1997
  // lfw:   MCUVersion
1998
  // ltype: LensType
1999
  //
2000
  // The tcinfo, dblid and mid fields are being ignored.
2001
  //
2002
  // Please note that all fields except LensType have to be looked up in the
2003
  // Exif.NikonLd* prefix and not other Exif.Nikon* prefixes. For example: for modern
2004
  // Nikon bodies with modern lenses, there will be both a Exif.Nikon3.LensFStops and a
2005
  // Exif.NikonLd3.LensFStops entry in the EXIF data. You are looking for
2006
  // Exif.NikonLd3.LensFStops.
2007
  //
2008
  // In most cases the necessary hex values should be extracted from a test image using
2009
  // the following command:
2010
  //
2011
  // exiv2 -ph -g NikonLd3.LensIDNumber -g NikonLd3.LensFStops
2012
  // -g NikonLd3.MinFocalLength -g NikonLd3.MaxFocalLength
2013
  // -g NikonLd3.MaxApertureAtMinFocal -g NikonLd3.MaxApertureAtMaxFocal
2014
  // -g NikonLd3.MCUVersion -g Nikon3.LensType test.NEF
2015
  //
2016
  // Please consider, that sequence of output is sligthly different from sequence in
2017
  // data structure: LensType (ltype) is printed first, but has to be entered after
2018
  // MCUVersion (lfw).
2019
  //
2020
  //------------------------------------------------------------------------------
2021
  // Nikkor lenses by their LensID
2022
  //------------------------------------------------------------------------------
2023
2024
0
  static constexpr struct FMntLens {
2025
0
    unsigned char lid, stps, focs, focl, aps, apl, lfw, ltype, tcinfo, dblid, mid;
2026
0
    std::string_view manuf;
2027
0
    std::string_view lnumber;
2028
0
    std::string_view lensname;
2029
2030
0
    bool operator==(unsigned char l) const {
2031
0
      return lid == l;
2032
0
    }
2033
0
  } fmountlens[] = {
2034
0
      {0x01, 0x58, 0x50, 0x50, 0x14, 0x14, 0x02, 0x00, 0x00, 0x00, 0x00, "Nikon", "JAA00901", "AF Nikkor 50mm f/1.8"},
2035
0
      {0x01, 0x58, 0x50, 0x50, 0x14, 0x14, 0x05, 0x00, 0x00, 0x00, 0x00, "Nikon", "JAA00901", "AF Nikkor 50mm f/1.8"},
2036
0
      {0x02, 0x42, 0x44, 0x5C, 0x2A, 0x34, 0x02, 0x00, 0x00, 0x00, 0x00, "Nikon", "JAA72701",
2037
0
       "AF Zoom-Nikkor 35-70mm f/3.3-4.5"},
2038
0
      {0x02, 0x42, 0x44, 0x5C, 0x2A, 0x34, 0x08, 0x00, 0x00, 0x00, 0x00, "Nikon", "JAA72701",
2039
0
       "AF Zoom-Nikkor 35-70mm f/3.3-4.5"},
2040
0
      {0x03, 0x48, 0x5C, 0x81, 0x30, 0x30, 0x02, 0x00, 0x00, 0x00, 0x00, "Nikon", "JAA72801",
2041
0
       "AF Zoom-Nikkor 70-210mm f/4"},
2042
0
      {0x04, 0x48, 0x3C, 0x3C, 0x24, 0x24, 0x03, 0x00, 0x00, 0x00, 0x00, "Nikon", "JAA12001", "AF Nikkor 28mm f/2.8"},
2043
0
      {0x05, 0x54, 0x50, 0x50, 0x0C, 0x0C, 0x04, 0x00, 0x00, 0x00, 0x00, "Nikon", "JAA01001", "AF Nikkor 50mm f/1.4"},
2044
0
      {0x06, 0x54, 0x53, 0x53, 0x24, 0x24, 0x06, 0x00, 0x40, 0x00, 0x00, "Nikon", "JAA62101",
2045
0
       "AF Micro-Nikkor 55mm f/2.8"},
2046
0
      {0x07, 0x40, 0x3C, 0x62, 0x2C, 0x34, 0x03, 0x00, 0x00, 0x00, 0x00, "Nikon", "JAA72901",
2047
0
       "AF Zoom-Nikkor 28-85mm f/3.5-4.5"},
2048
0
      {0x08, 0x40, 0x44, 0x6A, 0x2C, 0x34, 0x04, 0x00, 0x00, 0x00, 0x00, "Nikon", "JAA73001",
2049
0
       "AF Zoom-Nikkor 35-105mm f/3.5-4.5"},
2050
0
      {0x09, 0x48, 0x37, 0x37, 0x24, 0x24, 0x04, 0x00, 0x00, 0x00, 0x00, "Nikon", "JAA12101", "AF Nikkor 24mm f/2.8"},
2051
0
      {0x0A, 0x48, 0x8E, 0x8E, 0x24, 0x24, 0x03, 0x00, 0x00, 0x00, 0x00, "Nikon", "JAA322AA",
2052
0
       "AF Nikkor 300mm f/2.8 IF-ED"},
2053
0
      {0x0A, 0x48, 0x8E, 0x8E, 0x24, 0x24, 0x05, 0x00, 0x00, 0x00, 0x00, "Nikon", "JAA322AB",
2054
0
       "AF Nikkor 300mm f/2.8 IF-ED"},
2055
0
      {0x0B, 0x48, 0x7C, 0x7C, 0x24, 0x24, 0x05, 0x00, 0x00, 0x00, 0x00, "Nikon", "JAA32101",
2056
0
       "AF Nikkor 180mm f/2.8 IF-ED"},
2057
      // 0C
2058
0
      {0x0D, 0x40, 0x44, 0x72, 0x2C, 0x34, 0x07, 0x00, 0x00, 0x00, 0x00, "Nikon", "JAA73101",
2059
0
       "AF Zoom-Nikkor 35-135mm f/3.5-4.5"},
2060
0
      {0x0E, 0x48, 0x5C, 0x81, 0x30, 0x30, 0x05, 0x00, 0x00, 0x00, 0x00, "Nikon", "", "AF Zoom-Nikkor 70-210mm f/4"},
2061
0
      {0x0F, 0x58, 0x50, 0x50, 0x14, 0x14, 0x05, 0x00, 0x00, 0x00, 0x00, "Nikon", "JAA009AD", "AF Nikkor 50mm f/1.8 N"},
2062
0
      {0x10, 0x48, 0x8E, 0x8E, 0x30, 0x30, 0x08, 0x00, 0x00, 0x00, 0x00, "Nikon", "JAA32301",
2063
0
       "AF Nikkor 300mm f/4 IF-ED"},
2064
0
      {0x11, 0x48, 0x44, 0x5C, 0x24, 0x24, 0x08, 0x00, 0x00, 0x00, 0x00, "Nikon", "JAA73301",
2065
0
       "AF Zoom-Nikkor 35-70mm f/2.8"},
2066
0
      {0x11, 0x48, 0x44, 0x5C, 0x24, 0x24, 0x15, 0x00, 0x00, 0x00, 0x00, "Nikon", "JAA73301",
2067
0
       "AF Zoom-Nikkor 35-70mm f/2.8"},
2068
0
      {0x12, 0x48, 0x5C, 0x81, 0x30, 0x3C, 0x09, 0x00, 0x00, 0x00, 0x00, "Nikon", "JAA73201",
2069
0
       "AF Nikkor 70-210mm f/4-5.6"},
2070
0
      {0x13, 0x42, 0x37, 0x50, 0x2A, 0x34, 0x0B, 0x00, 0x00, 0x00, 0x00, "Nikon", "JAA73401",
2071
0
       "AF Zoom-Nikkor 24-50mm f/3.3-4.5"},
2072
0
      {0x14, 0x48, 0x60, 0x80, 0x24, 0x24, 0x0B, 0x00, 0x00, 0x00, 0x00, "Nikon", "JAA73501",
2073
0
       "AF Zoom-Nikkor 80-200mm f/2.8 ED"},
2074
0
      {0x15, 0x4C, 0x62, 0x62, 0x14, 0x14, 0x0C, 0x00, 0x00, 0x00, 0x00, "Nikon", "JAA32401", "AF Nikkor 85mm f/1.8"},
2075
      // 16
2076
0
      {0x17, 0x3C, 0xA0, 0xA0, 0x30, 0x30, 0x0F, 0x00, 0x00, 0x00, 0x00, "Nikon", "JAA518AA",
2077
0
       "Nikkor 500mm f/4 P ED IF"},
2078
0
      {0x17, 0x3C, 0xA0, 0xA0, 0x30, 0x30, 0x11, 0x00, 0x00, 0x00, 0x00, "Nikon", "JAA518AA",
2079
0
       "Nikkor 500mm f/4 P ED IF"},
2080
0
      {0x18, 0x40, 0x44, 0x72, 0x2C, 0x34, 0x0E, 0x00, 0x00, 0x00, 0x00, "Nikon", "JAA736AA",
2081
0
       "AF Zoom-Nikkor 35-135mm f/3.5-4.5 N"},
2082
      // 19
2083
0
      {0x1A, 0x54, 0x44, 0x44, 0x18, 0x18, 0x11, 0x00, 0x00, 0x00, 0x00, "Nikon", "JAA12201", "AF Nikkor 35mm f/2"},
2084
0
      {0x1B, 0x44, 0x5E, 0x8E, 0x34, 0x3C, 0x10, 0x00, 0x00, 0x00, 0x00, "Nikon", "JAA738AA",
2085
0
       "AF Zoom-Nikkor 75-300mm f/4.5-5.6"},
2086
0
      {0x1C, 0x48, 0x30, 0x30, 0x24, 0x24, 0x12, 0x00, 0x00, 0x00, 0x00, "Nikon", "JAA12301", "AF Nikkor 20mm f/2.8"},
2087
0
      {0x1D, 0x42, 0x44, 0x5C, 0x2A, 0x34, 0x12, 0x00, 0x00, 0x00, 0x00, "Nikon", "",
2088
0
       "AF Zoom-Nikkor 35-70mm f/3.3-4.5 N"},
2089
0
      {0x1E, 0x54, 0x56, 0x56, 0x24, 0x24, 0x13, 0x00, 0x40, 0x00, 0x00, "Nikon", "JAA62201",
2090
0
       "AF Micro-Nikkor 60mm f/2.8"},
2091
0
      {0x1F, 0x54, 0x6A, 0x6A, 0x24, 0x24, 0x14, 0x00, 0x40, 0x00, 0x00, "Nikon", "JAA62301",
2092
0
       "AF Micro-Nikkor 105mm f/2.8"},
2093
0
      {0x20, 0x48, 0x60, 0x80, 0x24, 0x24, 0x15, 0x00, 0x00, 0x00, 0x00, "Nikon", "",
2094
0
       "AF Zoom-Nikkor 80-200mm f/2.8 ED"},
2095
0
      {0x21, 0x40, 0x3C, 0x5C, 0x2C, 0x34, 0x16, 0x00, 0x00, 0x00, 0x00, "Nikon", "",
2096
0
       "AF Zoom-Nikkor 28-70mm f/3.5-4.5"},
2097
0
      {0x22, 0x48, 0x72, 0x72, 0x18, 0x18, 0x16, 0x00, 0x00, 0x00, 0x00, "Nikon", "JAA32501", "AF DC-Nikkor 135mm f/2"},
2098
0
      {0x23, 0x30, 0xBE, 0xCA, 0x3C, 0x48, 0x17, 0x00, 0x00, 0x00, 0x00, "Nikon", "",
2099
0
       "Zoom-Nikkor 1200-1700mm f/5.6-8 P ED IF"},
2100
      // - D - lenses from here
2101
0
      {0x24, 0x48, 0x60, 0x80, 0x24, 0x24, 0x1A, 0x02, 0x00, 0x00, 0x00, "Nikon", "JAA742DA",
2102
0
       "AF Zoom-Nikkor 80-200mm f/2.8D ED"},
2103
0
      {0x25, 0x48, 0x44, 0x5c, 0x24, 0x24, 0x1B, 0x02, 0x00, 0x00, 0x00, "Nikon", "JAA743DA",
2104
0
       "AF Zoom-Nikkor 35-70mm f/2.8D"},
2105
0
      {0x25, 0x48, 0x44, 0x5C, 0x24, 0x24, 0x3A, 0x02, 0x00, 0x00, 0x00, "Nikon", "JAA743DA",
2106
0
       "AF Zoom-Nikkor 35-70mm f/2.8D"},
2107
0
      {0x25, 0x48, 0x44, 0x5c, 0x24, 0x24, 0x52, 0x02, 0x00, 0x00, 0x00, "Nikon", "JAA743DA",
2108
0
       "AF Zoom-Nikkor 35-70mm f/2.8D"},
2109
0
      {0x26, 0x40, 0x3C, 0x5C, 0x2C, 0x34, 0x1C, 0x02, 0x00, 0x00, 0x00, "Nikon", "JAA744DA",
2110
0
       "AF Zoom-Nikkor 28-70mm f/3.5-4.5D"},
2111
      // ^- not yet verified
2112
0
      {0x27, 0x48, 0x8E, 0x8E, 0x24, 0x24, 0x1D, 0x02, 0x07, 0x00, 0x00, "Nikon", "JAA326DA",
2113
0
       "AF-I Nikkor 300mm f/2.8D IF-ED"},
2114
0
      {0x27, 0x48, 0x8E, 0x8E, 0x24, 0x24, 0xF1, 0x02, 0x0F, 0x00, 0x00, "Nikon", "JAA326DA",
2115
0
       "AF-I Nikkor 300mm f/2.8D IF-ED + TC-14E"},
2116
0
      {0x27, 0x48, 0x8E, 0x8E, 0x24, 0x24, 0xE1, 0x02, 0x0F, 0x00, 0x00, "Nikon", "JAA326DA",
2117
0
       "AF-I Nikkor 300mm f/2.8D IF-ED + TC-17E"},
2118
0
      {0x27, 0x48, 0x8E, 0x8E, 0x24, 0x24, 0xF2, 0x02, 0x0F, 0x00, 0x00, "Nikon", "JAA326DA",
2119
0
       "AF-I Nikkor 300mm f/2.8D IF-ED + TC-20E"},
2120
0
      {0x28, 0x3C, 0xA6, 0xA6, 0x30, 0x30, 0x1D, 0x02, 0x07, 0x00, 0x00, "Nikon", "JAA519DA",
2121
0
       "AF-I Nikkor 600mm f/4D IF-ED"},
2122
0
      {0x28, 0x3C, 0xA6, 0xA6, 0x30, 0x30, 0xF1, 0x02, 0x0F, 0x00, 0x00, "Nikon", "JAA519DA",
2123
0
       "AF-I Nikkor 600mm f/4D IF-ED + TC-14E"},
2124
0
      {0x28, 0x3C, 0xA6, 0xA6, 0x30, 0x30, 0xE1, 0x02, 0x0F, 0x00, 0x00, "Nikon", "JAA519DA",
2125
0
       "AF-I Nikkor 600mm f/4D IF-ED + TC-17E"},
2126
0
      {0x28, 0x3C, 0xA6, 0xA6, 0x30, 0x30, 0xF2, 0x02, 0x0F, 0x00, 0x00, "Nikon", "JAA519DA",
2127
0
       "AF-I Nikkor 600mm f/4D IF-ED + TC-20E"},
2128
      // 29
2129
0
      {0x2A, 0x54, 0x3C, 0x3C, 0x0C, 0x0C, 0x26, 0x02, 0x00, 0x00, 0x00, "Nikon", "JAA124DA", "AF Nikkor 28mm f/1.4D"},
2130
0
      {0x2B, 0x3C, 0x44, 0x60, 0x30, 0x3C, 0x1F, 0x02, 0x00, 0x00, 0x00, "Nikon", "",
2131
0
       "AF Zoom-Nikkor 35-80mm f/4-5.6D"},
2132
0
      {0x2C, 0x48, 0x6A, 0x6A, 0x18, 0x18, 0x27, 0x02, 0x00, 0x00, 0x00, "Nikon", "JAA327DA",
2133
0
       "AF DC-Nikkor 105mm f/2D"},
2134
0
      {0x2D, 0x48, 0x80, 0x80, 0x30, 0x30, 0x21, 0x02, 0x40, 0x00, 0x00, "Nikon", "JAA624DA",
2135
0
       "AF Micro-Nikkor 200mm f/4D IF-ED"},
2136
0
      {0x2E, 0x48, 0x5C, 0x82, 0x30, 0x3C, 0x22, 0x02, 0x00, 0x00, 0x00, "Nikon", "JAA747DA",
2137
0
       "AF Nikkor 70-210mm f/4-5.6D"},
2138
0
      {0x2E, 0x48, 0x5C, 0x82, 0x30, 0x3C, 0x28, 0x02, 0x00, 0x00, 0x00, "Nikon", "JAA747DA",
2139
0
       "AF Nikkor 70-210mm f/4-5.6D"},
2140
0
      {0x2F, 0x48, 0x30, 0x44, 0x24, 0x24, 0x29, 0x02, 0x00, 0x01, 0x00, "Nikon", "JAA746DA",
2141
0
       "AF Zoom-Nikkor 20-35mm f/2.8D IF"},
2142
0
      {0x30, 0x48, 0x98, 0x98, 0x24, 0x24, 0x24, 0x02, 0x07, 0x00, 0x00, "Nikon", "JAA520DA",
2143
0
       "AF-I Nikkor 400mm f/2.8D IF-ED"},
2144
0
      {0x30, 0x48, 0x98, 0x98, 0x24, 0x24, 0xF1, 0x02, 0x0F, 0x00, 0x00, "Nikon", "JAA520DA",
2145
0
       "AF-I Nikkor 400mm f/2.8D IF-ED + TC-14E"},
2146
0
      {0x30, 0x48, 0x98, 0x98, 0x24, 0x24, 0xE1, 0x02, 0x0F, 0x00, 0x00, "Nikon", "JAA520DA",
2147
0
       "AF-I Nikkor 400mm f/2.8D IF-ED + TC-17E"},
2148
0
      {0x30, 0x48, 0x98, 0x98, 0x24, 0x24, 0xF2, 0x02, 0x0F, 0x00, 0x00, "Nikon", "JAA520DA",
2149
0
       "AF-I Nikkor 400mm f/2.8D IF-ED + TC-20E"},
2150
0
      {0x31, 0x54, 0x56, 0x56, 0x24, 0x24, 0x25, 0x02, 0x40, 0x00, 0x00, "Nikon", "JAA625DA",
2151
0
       "AF Micro-Nikkor 60mm f/2.8D"},
2152
0
      {0x32, 0x54, 0x6A, 0x6A, 0x24, 0x24, 0x35, 0x02, 0x40, 0x01, 0x00, "Nikon", "JAA627DA",
2153
0
       "AF Micro-Nikkor 105mm f/2.8D"},
2154
0
      {0x33, 0x48, 0x2D, 0x2D, 0x24, 0x24, 0x31, 0x02, 0x00, 0x00, 0x00, "Nikon", "JAA126DA", "AF Nikkor 18mm f/2.8D"},
2155
0
      {0x34, 0x48, 0x29, 0x29, 0x24, 0x24, 0x32, 0x02, 0x00, 0x00, 0x00, "Nikon", "JAA626DA",
2156
0
       "AF Fisheye Nikkor 16mm f/2.8D"},
2157
0
      {0x35, 0x3C, 0xA0, 0xA0, 0x30, 0x30, 0x33, 0x02, 0x07, 0x00, 0x00, "Nikon", "JAA521DA",
2158
0
       "AF-I Nikkor 500mm f/4D IF-ED"},
2159
0
      {0x35, 0x3C, 0xA0, 0xA0, 0x30, 0x30, 0xF1, 0x02, 0x0F, 0x00, 0x00, "Nikon", "JAA521DA",
2160
0
       "AF-I Nikkor 500mm f/4D IF-ED + TC-14E"},
2161
0
      {0x35, 0x3C, 0xA0, 0xA0, 0x30, 0x30, 0xE1, 0x02, 0x0F, 0x00, 0x00, "Nikon", "JAA521DA",
2162
0
       "AF-I Nikkor 500mm f/4D IF-ED + TC-17E"},
2163
0
      {0x35, 0x3C, 0xA0, 0xA0, 0x30, 0x30, 0xF2, 0x02, 0x0F, 0x00, 0x00, "Nikon", "JAA521DA",
2164
0
       "AF-I Nikkor 500mm f/4D IF-ED + TC-20E"},
2165
0
      {0x36, 0x48, 0x37, 0x37, 0x24, 0x24, 0x34, 0x02, 0x00, 0x00, 0x00, "Nikon", "JAA125DA", "AF Nikkor 24mm f/2.8D"},
2166
0
      {0x37, 0x48, 0x30, 0x30, 0x24, 0x24, 0x36, 0x02, 0x00, 0x00, 0x00, "Nikon", "JAA127DA", "AF Nikkor 20mm f/2.8D"},
2167
0
      {0x38, 0x4C, 0x62, 0x62, 0x14, 0x14, 0x37, 0x02, 0x00, 0x00, 0x00, "Nikon", "JAA328DA", "AF Nikkor 85mm f/1.8D"},
2168
      // 39                38
2169
0
      {0x3A, 0x40, 0x3C, 0x5C, 0x2C, 0x34, 0x39, 0x02, 0x00, 0x00, 0x00, "Nikon", "JAA744DA",
2170
0
       "AF Zoom-Nikkor 28-70mm f/3.5-4.5D"},
2171
0
      {0x3B, 0x48, 0x44, 0x5C, 0x24, 0x24, 0x3A, 0x02, 0x00, 0x00, 0x00, "Nikon", "JAA743DA",
2172
0
       "AF Zoom-Nikkor 35-70mm f/2.8D N"},
2173
0
      {0x3C, 0x48, 0x60, 0x80, 0x24, 0x24, 0x3B, 0x02, 0x00, 0x00, 0x00, "Nikon", "",
2174
0
       "AF Zoom-Nikkor 80-200mm f/2.8D ED"},
2175
0
      {0x3D, 0x3C, 0x44, 0x60, 0x30, 0x3C, 0x3E, 0x02, 0x00, 0x00, 0x00, "Nikon", "",
2176
0
       "AF Zoom-Nikkor 35-80mm f/4-5.6D"},
2177
0
      {0x3E, 0x48, 0x3C, 0x3C, 0x24, 0x24, 0x3D, 0x02, 0x00, 0x00, 0x00, "Nikon", "JAA128DA", "AF Nikkor 28mm f/2.8D"},
2178
0
      {0x3F, 0x40, 0x44, 0x6A, 0x2C, 0x34, 0x45, 0x02, 0x00, 0x00, 0x00, "Nikon", "JAA748DA",
2179
0
       "AF Zoom-Nikkor 35-105mm f/3.5-4.5D"},
2180
      // 40
2181
0
      {0x41, 0x48, 0x7c, 0x7c, 0x24, 0x24, 0x43, 0x02, 0x00, 0x00, 0x00, "Nikon", "JAA330DA",
2182
0
       "AF Nikkor 180mm f/2.8D IF-ED"},
2183
0
      {0x42, 0x54, 0x44, 0x44, 0x18, 0x18, 0x44, 0x02, 0x00, 0x00, 0x00, "Nikon", "JAA129DA", "AF Nikkor 35mm f/2D"},
2184
0
      {0x43, 0x54, 0x50, 0x50, 0x0C, 0x0C, 0x46, 0x02, 0x00, 0x00, 0x00, "Nikon", "JAA011DB", "AF Nikkor 50mm f/1.4D"},
2185
0
      {0x44, 0x44, 0x60, 0x80, 0x34, 0x3C, 0x47, 0x02, 0x00, 0x00, 0x00, "Nikon", "JAA753DB",
2186
0
       "AF Zoom-Nikkor 80-200mm f/4.5-5.6D"},
2187
0
      {0x45, 0x40, 0x3C, 0x60, 0x2C, 0x3C, 0x48, 0x02, 0x00, 0x00, 0x00, "Nikon", "JAA752DA",
2188
0
       "AF Zoom-Nikkor 28-80mm f/3.5-5.6D"},
2189
0
      {0x46, 0x3C, 0x44, 0x60, 0x30, 0x3C, 0x49, 0x02, 0x00, 0x00, 0x00, "Nikon", "JAA754DA",
2190
0
       "AF Zoom-Nikkor 35-80mm f/4-5.6D N"},
2191
0
      {0x47, 0x42, 0x37, 0x50, 0x2A, 0x34, 0x4A, 0x02, 0x00, 0x00, 0x00, "Nikon", "JAA756DA",
2192
0
       "AF Zoom-Nikkor 24-50mm f/3.3-4.5D"},
2193
0
      {0x48, 0x48, 0x8E, 0x8E, 0x24, 0x24, 0x4B, 0x02, 0x07, 0x00, 0x00, "Nikon", "JAA333DA",
2194
0
       "AF-S Nikkor 300mm f/2.8D IF-ED"},
2195
0
      {0x48, 0x48, 0x8E, 0x8E, 0x24, 0x24, 0xF1, 0x02, 0x0F, 0x00, 0x00, "Nikon", "JAA333DA",
2196
0
       "AF-S Nikkor 300mm f/2.8D IF-ED + TC-14E"},
2197
0
      {0x48, 0x48, 0x8E, 0x8E, 0x24, 0x24, 0xE1, 0x02, 0x0F, 0x00, 0x00, "Nikon", "JAA333DA",
2198
0
       "AF-S Nikkor 300mm f/2.8D IF-ED + TC-17E"},
2199
0
      {0x48, 0x48, 0x8E, 0x8E, 0x24, 0x24, 0xF2, 0x02, 0x0F, 0x00, 0x00, "Nikon", "JAA333DA",
2200
0
       "AF-S Nikkor 300mm f/2.8D IF-ED + TC-20E"},
2201
0
      {0x49, 0x3C, 0xA6, 0xA6, 0x30, 0x30, 0x4C, 0x02, 0x07, 0x00, 0x00, "Nikon", "JAA522DA",
2202
0
       "AF-S Nikkor 600mm f/4D IF-ED"},
2203
0
      {0x49, 0x3C, 0xA6, 0xA6, 0x30, 0x30, 0xF1, 0x02, 0x0F, 0x00, 0x00, "Nikon", "JAA522DA",
2204
0
       "AF-S Nikkor 600mm f/4D IF-ED + TC-14E"},
2205
0
      {0x49, 0x3C, 0xA6, 0xA6, 0x30, 0x30, 0xE1, 0x02, 0x0F, 0x00, 0x00, "Nikon", "JAA522DA",
2206
0
       "AF-S Nikkor 600mm f/4D IF-ED + TC-17E"},
2207
0
      {0x49, 0x3C, 0xA6, 0xA6, 0x30, 0x30, 0xF2, 0x02, 0x0F, 0x00, 0x00, "Nikon", "JAA522DA",
2208
0
       "AF-S Nikkor 600mm f/4D IF-ED + TC-20E"},
2209
0
      {0x4A, 0x54, 0x62, 0x62, 0x0C, 0x0C, 0x4D, 0x02, 0x00, 0x00, 0x00, "Nikon", "JAA332DA",
2210
0
       "AF Nikkor 85mm f/1.4D IF"},
2211
0
      {0x4B, 0x3C, 0xA0, 0xA0, 0x30, 0x30, 0x4E, 0x02, 0x07, 0x00, 0x00, "Nikon", "JAA523DA",
2212
0
       "AF-S Nikkor 500mm f/4D IF-ED"},
2213
0
      {0x4B, 0x3C, 0xA0, 0xA0, 0x30, 0x30, 0xF1, 0x02, 0x0F, 0x00, 0x00, "Nikon", "JAA523DA",
2214
0
       "AF-S Nikkor 500mm f/4D IF-ED + TC-14E"},
2215
0
      {0x4B, 0x3C, 0xA0, 0xA0, 0x30, 0x30, 0xE1, 0x02, 0x0F, 0x00, 0x00, "Nikon", "JAA523DA",
2216
0
       "AF-S Nikkor 500mm f/4D IF-ED + TC-17E"},
2217
0
      {0x4B, 0x3C, 0xA0, 0xA0, 0x30, 0x30, 0xF2, 0x02, 0x0F, 0x00, 0x00, "Nikon", "JAA523DA",
2218
0
       "AF-S Nikkor 500mm f/4D IF-ED + TC-20E"},
2219
0
      {0x4C, 0x40, 0x37, 0x6E, 0x2C, 0x3C, 0x4F, 0x02, 0x00, 0x00, 0x00, "Nikon", "JAA757DA",
2220
0
       "AF Zoom-Nikkor 24-120mm f/3.5-5.6D IF"},
2221
0
      {0x4D, 0x40, 0x3C, 0x80, 0x2C, 0x3C, 0x62, 0x02, 0x00, 0x00, 0x00, "Nikon", "JAA758DA",
2222
0
       "AF Zoom-Nikkor 28-200mm f/3.5-5.6D IF"},
2223
0
      {0x4E, 0x48, 0x72, 0x72, 0x18, 0x18, 0x51, 0x02, 0x00, 0x00, 0x00, "Nikon", "JAA329DA",
2224
0
       "AF DC-Nikkor 135mm f/2D"},
2225
0
      {0x4F, 0x40, 0x37, 0x5C, 0x2C, 0x3C, 0x53, 0x06, 0x00, 0x00, 0x00, "Nikon", "JBA701AA",
2226
0
       "IX-Nikkor 24-70mm f/3.5-5.6"},
2227
0
      {0x50, 0x48, 0x56, 0x7C, 0x30, 0x3C, 0x54, 0x06, 0x00, 0x00, 0x00, "Nikon", "JBA702AA",
2228
0
       "IX-Nikkor 60-180mm f/4-5.6"},
2229
      //                                                  "JBA703AC" "IX-Nikkor 20-60 mm f/3.5-5.6";
2230
      // 51
2231
      // 52
2232
0
      {0x53, 0x48, 0x60, 0x80, 0x24, 0x24, 0x57, 0x02, 0x00, 0x00, 0x00, "Nikon", "JAA762DA",
2233
0
       "AF Zoom-Nikkor 80-200mm f/2.8D ED"},
2234
0
      {0x53, 0x48, 0x60, 0x80, 0x24, 0x24, 0x60, 0x02, 0x00, 0x00, 0x00, "Nikon", "JAA762DA",
2235
0
       "AF Zoom-Nikkor 80-200mm f/2.8D ED"},
2236
0
      {0x54, 0x44, 0x5C, 0x7C, 0x34, 0x3C, 0x58, 0x02, 0x00, 0x00, 0x00, "Nikon", "JAA763DA",
2237
0
       "AF Zoom-Micro Nikkor 70-180mm f/4.5-5.6D ED"},
2238
0
      {0x54, 0x44, 0x5C, 0x7C, 0x34, 0x3C, 0x61, 0x02, 0x00, 0x00, 0x00, "Nikon", "JAA763DA",
2239
0
       "AF Zoom-Micro Nikkor 70-180mm f/4.5-5.6D ED"},
2240
      // 55
2241
0
      {0x56, 0x48, 0x5C, 0x8E, 0x30, 0x3C, 0x5A, 0x02, 0x00, 0x00, 0x00, "Nikon", "JAA764DA",
2242
0
       "AF Zoom-Nikkor 70-300mm f/4-5.6D ED"},
2243
      // 57
2244
      // 58
2245
0
      {0x59, 0x48, 0x98, 0x98, 0x24, 0x24, 0x5D, 0x02, 0x07, 0x00, 0x00, "Nikon", "JAA524DA",
2246
0
       "AF-S Nikkor 400mm f/2.8D IF-ED"},
2247
0
      {0x59, 0x48, 0x98, 0x98, 0x24, 0x24, 0xF1, 0x02, 0x0F, 0x00, 0x00, "Nikon", "JAA524DA",
2248
0
       "AF-S Nikkor 400mm f/2.8D IF-ED + TC-14E"},
2249
0
      {0x59, 0x48, 0x98, 0x98, 0x24, 0x24, 0xE1, 0x02, 0x0F, 0x00, 0x00, "Nikon", "JAA524DA",
2250
0
       "AF-S Nikkor 400mm f/2.8D IF-ED + TC-17E"},
2251
0
      {0x59, 0x48, 0x98, 0x98, 0x24, 0x24, 0xF2, 0x02, 0x0F, 0x00, 0x00, "Nikon", "JAA524DA",
2252
0
       "AF-S Nikkor 400mm f/2.8D IF-ED + TC-20E"},
2253
0
      {0x5A, 0x3C, 0x3E, 0x56, 0x30, 0x3C, 0x5E, 0x06, 0x00, 0x00, 0x00, "Nikon", "JBA704AA",
2254
0
       "IX-Nikkor 30-60mm f/4-5.6"},
2255
0
      {0x5B, 0x44, 0x56, 0x7C, 0x34, 0x3C, 0x5F, 0x06, 0x00, 0x00, 0x00, "Nikon", "JBA705AA",
2256
0
       "IX-Nikkor 60-180mm f/4.5-5.6"},
2257
      //                                                  "JBA706AC" "IX-Nikkor 20-60 mm f/3.5-5.6N";
2258
      // 5C
2259
0
      {0x5D, 0x48, 0x3C, 0x5C, 0x24, 0x24, 0x63, 0x02, 0x01, 0x00, 0x00, "Nikon", "JAA767DA",
2260
0
       "AF-S Zoom-Nikkor 28-70mm f/2.8D IF-ED"},
2261
0
      {0x5E, 0x48, 0x60, 0x80, 0x24, 0x24, 0x64, 0x02, 0x03, 0x00, 0x00, "Nikon", "JAA765DA",
2262
0
       "AF-S Zoom-Nikkor 80-200mm f/2.8D IF-ED"},
2263
0
      {0x5F, 0x40, 0x3C, 0x6A, 0x2C, 0x34, 0x65, 0x02, 0x00, 0x00, 0x00, "Nikon", "JAA766DA",
2264
0
       "AF Zoom-Nikkor 28-105mm f/3.5-4.5D IF"},
2265
0
      {0x60, 0x40, 0x3C, 0x60, 0x2C, 0x3C, 0x66, 0x02, 0x00, 0x00, 0x00, "Nikon", "JAA769DA",
2266
0
       "AF Zoom-Nikkor 28-80mm f/3.5-5.6D"},
2267
0
      {0x61, 0x44, 0x5E, 0x86, 0x34, 0x3C, 0x67, 0x02, 0x00, 0x00, 0x00, "Nikon", "JAA768DA",
2268
0
       "AF Zoom-Nikkor 75-240mm f/4.5-5.6D"},
2269
      // 62                69
2270
0
      {0x63, 0x48, 0x2B, 0x44, 0x24, 0x24, 0x68, 0x02, 0x01, 0x00, 0x00, "Nikon", "JAA770DA",
2271
0
       "AF-S Nikkor 17-35mm f/2.8D IF-ED"},
2272
0
      {0x64, 0x00, 0x62, 0x62, 0x24, 0x24, 0x6A, 0x02, 0x40, 0x00, 0x00, "Nikon", "JAA628DA",
2273
0
       "PC Micro-Nikkor 85mm f/2.8D"},
2274
0
      {0x65, 0x44, 0x60, 0x98, 0x34, 0x3C, 0x6B, 0x0A, 0x00, 0x00, 0x00, "Nikon", "JAA771DA",
2275
0
       "AF VR Zoom-Nikkor 80-400mm f/4.5-5.6D ED"},
2276
0
      {0x66, 0x40, 0x2D, 0x44, 0x2C, 0x34, 0x6C, 0x02, 0x00, 0x00, 0x00, "Nikon", "JAA772DA",
2277
0
       "AF Zoom-Nikkor 18-35mm f/3.5-4.5D IF-ED"},
2278
0
      {0x67, 0x48, 0x37, 0x62, 0x24, 0x30, 0x6D, 0x02, 0x00, 0x00, 0x00, "Nikon", "JAA774DA",
2279
0
       "AF Zoom-Nikkor 24-85mm f/2.8-4D IF"},
2280
0
      {0x68, 0x42, 0x3C, 0x60, 0x2A, 0x3C, 0x6E, 0x06, 0x00, 0x00, 0x00, "Nikon", "JAA777DA",
2281
0
       "AF Zoom-Nikkor 28-80mm f/3.3-5.6G"},
2282
0
      {0x69, 0x48, 0x5C, 0x8E, 0x30, 0x3C, 0x6F, 0x06, 0x00, 0x00, 0x00, "Nikon", "JAA776DA",
2283
0
       "AF Zoom-Nikkor 70-300mm f/4-5.6G"},
2284
0
      {0x6A, 0x48, 0x8E, 0x8E, 0x30, 0x30, 0x70, 0x02, 0x03, 0x00, 0x00, "Nikon", "JAA334DA",
2285
0
       "AF-S Nikkor 300mm f/4D IF-ED"},
2286
0
      {0x6B, 0x48, 0x24, 0x24, 0x24, 0x24, 0x71, 0x02, 0x00, 0x00, 0x00, "Nikon", "JAA130DA",
2287
0
       "AF Nikkor ED 14mm f/2.8D"},
2288
      // 6C                72
2289
0
      {0x6D, 0x48, 0x8E, 0x8E, 0x24, 0x24, 0x73, 0x02, 0x03, 0x00, 0x00, "Nikon", "JAA335DA",
2290
0
       "AF-S Nikkor 300mm f/2.8D IF-ED II"},
2291
0
      {0x6E, 0x48, 0x98, 0x98, 0x24, 0x24, 0x74, 0x02, 0x03, 0x00, 0x00, "Nikon", "JAA525DA",
2292
0
       "AF-S Nikkor 400mm f/2.8D IF-ED II"},
2293
0
      {0x6F, 0x3C, 0xA0, 0xA0, 0x30, 0x30, 0x75, 0x02, 0x03, 0x00, 0x00, "Nikon", "JAA526DA",
2294
0
       "AF-S Nikkor 500mm f/4D IF-ED II"},
2295
0
      {0x70, 0x3C, 0xA6, 0xA6, 0x30, 0x30, 0x76, 0x02, 0x03, 0x00, 0x00, "Nikon", "JAA527DA",
2296
0
       "AF-S Nikkor 600mm f/4D IF-ED II"},
2297
      // 71
2298
0
      {0x72, 0x48, 0x4C, 0x4C, 0x24, 0x24, 0x77, 0x00, 0x00, 0x00, 0x00, "Nikon", "JAA012AA", "Nikkor 45mm f/2.8 P"},
2299
      // 73
2300
0
      {0x74, 0x40, 0x37, 0x62, 0x2C, 0x34, 0x78, 0x06, 0x01, 0x00, 0x00, "Nikon", "JAA780DA",
2301
0
       "AF-S Zoom-Nikkor 24-85mm f/3.5-4.5G IF-ED"},
2302
0
      {0x75, 0x40, 0x3C, 0x68, 0x2C, 0x3C, 0x79, 0x06, 0x00, 0x00, 0x00, "Nikon", "JAA778DA",
2303
0
       "AF Zoom-Nikkor 28-100mm f/3.5-5.6G"},
2304
0
      {0x76, 0x58, 0x50, 0x50, 0x14, 0x14, 0x7A, 0x02, 0x00, 0x00, 0x00, "Nikon", "JAA013DA", "AF Nikkor 50mm f/1.8D"},
2305
0
      {0x77, 0x48, 0x5C, 0x80, 0x24, 0x24, 0x7B, 0x0E, 0x03, 0x00, 0x00, "Nikon", "JAA781DA",
2306
0
       "AF-S VR Zoom-Nikkor 70-200mm f/2.8G IF-ED"},
2307
0
      {0x78, 0x40, 0x37, 0x6E, 0x2C, 0x3C, 0x7C, 0x0E, 0x01, 0x00, 0x00, "Nikon", "JAA782DA",
2308
0
       "AF-S VR Zoom-Nikkor 24-120mm f/3.5-5.6G IF-ED"},
2309
0
      {0x79, 0x40, 0x3C, 0x80, 0x2C, 0x3C, 0x7F, 0x06, 0x00, 0x00, 0x00, "Nikon", "JAA783DA",
2310
0
       "AF Zoom-Nikkor 28-200mm f/3.5-5.6G IF-ED"},
2311
0
      {0x7A, 0x3C, 0x1F, 0x37, 0x30, 0x30, 0x7E, 0x06, 0x01, 0x01, 0x00, "Nikon", "JAA784DA",
2312
0
       "AF-S DX Zoom-Nikkor 12-24mm f/4G IF-ED"},
2313
0
      {0x7B, 0x48, 0x80, 0x98, 0x30, 0x30, 0x80, 0x0E, 0x03, 0x00, 0x00, "Nikon", "JAA787DA",
2314
0
       "AF-S VR Zoom-Nikkor 200-400mm f/4G IF-ED"},
2315
      // 7C                81
2316
0
      {0x7D, 0x48, 0x2B, 0x53, 0x24, 0x24, 0x82, 0x06, 0x01, 0x00, 0x00, "Nikon", "JAA788DA",
2317
0
       "AF-S DX Zoom-Nikkor 17-55mm f/2.8G IF-ED"},
2318
      // 7E                83
2319
0
      {0x7F, 0x40, 0x2D, 0x5C, 0x2C, 0x34, 0x84, 0x06, 0x11, 0x00, 0x00, "Nikon", "JAA790DA",
2320
0
       "AF-S DX Zoom-Nikkor 18-70mm f/3.5-4.5G IF-ED"},
2321
0
      {0x80, 0x48, 0x1A, 0x1A, 0x24, 0x24, 0x85, 0x06, 0x00, 0x00, 0x00, "Nikon", "JAA629DA",
2322
0
       "AF DX Fisheye-Nikkor 10.5mm f/2.8G ED"},
2323
0
      {0x81, 0x54, 0x80, 0x80, 0x18, 0x18, 0x86, 0x0E, 0x03, 0x00, 0x00, "Nikon", "JAA336DA",
2324
0
       "AF-S VR Nikkor 200mm f/2G IF-ED"},
2325
0
      {0x82, 0x48, 0x8E, 0x8E, 0x24, 0x24, 0x87, 0x0E, 0x13, 0x00, 0x00, "Nikon", "JAA337DA",
2326
0
       "AF-S VR Nikkor 300mm f/2.8G IF-ED"},
2327
0
      {0x83, 0x00, 0xB0, 0xB0, 0x5A, 0x5A, 0x88, 0x04, 0x00, 0x00, 0x00, "Nikon", "", "FSA-L2, EDG 65, 800mm F13 G"},
2328
      // 84
2329
      // 85
2330
      // 86
2331
      // 87
2332
      // 88
2333
0
      {0x89, 0x3C, 0x53, 0x80, 0x30, 0x3C, 0x8B, 0x06, 0x01, 0x00, 0x00, "Nikon", "JAA793DA",
2334
0
       "AF-S DX Zoom-Nikkor 55-200mm f/4-5.6G ED"},
2335
0
      {0x8A, 0x54, 0x6A, 0x6A, 0x24, 0x24, 0x8C, 0x0E, 0x53, 0x00, 0x00, "Nikon", "JAA630DA",
2336
0
       "AF-S VR Micro-Nikkor 105mm f/2.8G IF-ED"},
2337
0
      {0x8B, 0x40, 0x2D, 0x80, 0x2C, 0x3C, 0x8D, 0x0E, 0x01, 0x00, 0x00, "Nikon", "JAA794DA",
2338
0
       "AF-S DX VR Zoom-Nikkor 18-200mm f/3.5-5.6G IF-ED"},
2339
      //{0x8B,0x40,0x2D,0x80,0x2C,0x3C,0xFD,0x0E,0x01,0x01,0x00, "Nikon", "JAA794DA", "AF-S DX VR Zoom-Nikkor
2340
      // 18-200mm f/3.5-5.6G IF-ED"}, // Fix bug #1026.
2341
0
      {0x8B, 0x40, 0x2D, 0x80, 0x2C, 0x3C, 0xFD, 0x0E, 0x01, 0x02, 0x00, "Nikon", "JAA813DA",
2342
0
       "AF-S DX VR Zoom-Nikkor 18-200mm f/3.5-5.6G IF-ED II"},
2343
0
      {0x8C, 0x40, 0x2D, 0x53, 0x2C, 0x3C, 0x8E, 0x06, 0x01, 0x00, 0x00, "Nikon", "JAA792DA",
2344
0
       "AF-S DX Zoom-Nikkor 18-55mm f/3.5-5.6G ED"},
2345
0
      {0x8D, 0x44, 0x5C, 0x8E, 0x34, 0x3C, 0x8F, 0x0E, 0x31, 0x00, 0x00, "Nikon", "JAA795DA",
2346
0
       "AF-S VR Zoom-Nikkor 70-300mm f/4.5-5.6G IF-ED"},
2347
      // 8E                90
2348
0
      {0x8F, 0x40, 0x2D, 0x72, 0x2C, 0x3C, 0x91, 0x06, 0x01, 0x00, 0x00, "Nikon", "JAA796DA",
2349
0
       "AF-S DX Zoom-Nikkor 18-135mm f/3.5-5.6G IF-ED"},
2350
0
      {0x90, 0x3B, 0x53, 0x80, 0x30, 0x3C, 0x92, 0x0E, 0x01, 0x00, 0x00, "Nikon", "JAA798DA",
2351
0
       "AF-S DX VR Zoom-Nikkor 55-200mm f/4-5.6G IF-ED"},
2352
      // 91                93
2353
0
      {0x92, 0x48, 0x24, 0x37, 0x24, 0x24, 0x94, 0x06, 0x01, 0x00, 0x00, "Nikon", "JAA801DA",
2354
0
       "AF-S Zoom-Nikkor 14-24mm f/2.8G ED"},
2355
0
      {0x93, 0x48, 0x37, 0x5C, 0x24, 0x24, 0x95, 0x06, 0x01, 0x00, 0x00, "Nikon", "JAA802DA",
2356
0
       "AF-S Zoom-Nikkor 24-70mm f/2.8G ED"},
2357
0
      {0x94, 0x40, 0x2D, 0x53, 0x2C, 0x3C, 0x96, 0x06, 0x01, 0x00, 0x00, "Nikon", "JAA797DA",
2358
0
       "AF-S DX Zoom-Nikkor 18-55mm f/3.5-5.6G ED II"},
2359
0
      {0x95, 0x4C, 0x37, 0x37, 0x2C, 0x2C, 0x97, 0x02, 0x00, 0x00, 0x00, "Nikon", "JAA631DA",
2360
0
       "PC-E Nikkor 24mm f/3.5D ED"},
2361
0
      {0x95, 0x00, 0x37, 0x37, 0x2C, 0x2C, 0x97, 0x06, 0x00, 0x00, 0x00, "Nikon", "JAA631DA",
2362
0
       "PC-E Nikkor 24mm f/3.5D ED"},
2363
0
      {0x96, 0x48, 0x98, 0x98, 0x24, 0x24, 0x98, 0x0E, 0x13, 0x00, 0x00, "Nikon", "JAA528DA",
2364
0
       "AF-S VR Nikkor 400mm f/2.8G ED"},
2365
0
      {0x97, 0x3C, 0xA0, 0xA0, 0x30, 0x30, 0x99, 0x0E, 0x13, 0x00, 0x00, "Nikon", "JAA529DA",
2366
0
       "AF-S VR Nikkor 500mm f/4G ED"},
2367
0
      {0x98, 0x3C, 0xA6, 0xA6, 0x30, 0x30, 0x9A, 0x0E, 0x13, 0x00, 0x00, "Nikon", "JAA530DA",
2368
0
       "AF-S VR Nikkor 600mm f/4G ED"},
2369
0
      {0x99, 0x40, 0x29, 0x62, 0x2C, 0x3C, 0x9B, 0x0E, 0x01, 0x00, 0x00, "Nikon", "JAA800DA",
2370
0
       "AF-S DX VR Zoom-Nikkor 16-85mm f/3.5-5.6G ED"},
2371
0
      {0x9A, 0x40, 0x2D, 0x53, 0x2C, 0x3C, 0x9C, 0x0E, 0x01, 0x00, 0x00, "Nikon", "JAA803DA",
2372
0
       "AF-S DX VR Zoom-Nikkor 18-55mm f/3.5-5.6G"},
2373
0
      {0x9B, 0x54, 0x4C, 0x4C, 0x24, 0x24, 0x9D, 0x02, 0x00, 0x00, 0x00, "Nikon", "JAA633DA",
2374
0
       "PC-E Micro Nikkor 45mm f/2.8D ED"},
2375
0
      {0x9B, 0x00, 0x4C, 0x4C, 0x24, 0x24, 0x9D, 0x06, 0x00, 0x00, 0x00, "Nikon", "JAA633DA",
2376
0
       "PC-E Micro Nikkor 45mm f/2.8D ED"},
2377
0
      {0x9C, 0x54, 0x56, 0x56, 0x24, 0x24, 0x9E, 0x06, 0x41, 0x00, 0x00, "Nikon", "JAA632DA",
2378
0
       "AF-S Micro Nikkor 60mm f/2.8G ED"},
2379
0
      {0x9D, 0x54, 0x62, 0x62, 0x24, 0x24, 0x9F, 0x02, 0x40, 0x00, 0x00, "Nikon", "JAA634DA",
2380
0
       "PC-E Micro Nikkor 85mm f/2.8D"},
2381
0
      {0x9D, 0x00, 0x62, 0x62, 0x24, 0x24, 0x9F, 0x06, 0x40, 0x00, 0x00, "Nikon", "JAA634DA",
2382
0
       "PC-E Micro Nikkor 85mm f/2.8D"},
2383
0
      {0x9E, 0x40, 0x2D, 0x6A, 0x2C, 0x3C, 0xA0, 0x0E, 0x01, 0x00, 0x00, "Nikon", "JAA805DA",
2384
0
       "AF-S DX VR Zoom-Nikkor 18-105mm f/3.5-5.6G ED"},
2385
0
      {0x9F, 0x58, 0x44, 0x44, 0x14, 0x14, 0xA1, 0x06, 0x01, 0x00, 0x00, "Nikon", "JAA132DA",
2386
0
       "AF-S DX Nikkor 35mm f/1.8G"},
2387
0
      {0xA0, 0x54, 0x50, 0x50, 0x0C, 0x0C, 0xA2, 0x06, 0x01, 0x00, 0x00, "Nikon", "JAA014DA",
2388
0
       "AF-S Nikkor 50mm f/1.4G"},
2389
0
      {0xA1, 0x40, 0x18, 0x37, 0x2C, 0x34, 0xA3, 0x06, 0x01, 0x00, 0x00, "Nikon", "JAA804DA",
2390
0
       "AF-S DX Nikkor 10-24mm f/3.5-4.5G ED"},
2391
0
      {0xA2, 0x38, 0x5C, 0x8E, 0x34, 0x40, 0xCD, 0x86, 0x00, 0x00, 0x00, "Nikon", "JAA829DA",
2392
0
       "AF-P DX Nikkor 70-300mm f/4.5-6.3G ED VR"},
2393
0
      {0xA2, 0x48, 0x5C, 0x80, 0x24, 0x24, 0xA4, 0x0E, 0x13, 0x00, 0x00, "Nikon", "JAA807DA",
2394
0
       "AF-S Nikkor 70-200mm f/2.8G ED VR II"},
2395
0
      {0xA3, 0x3C, 0x29, 0x44, 0x30, 0x30, 0xA5, 0x0E, 0x01, 0x00, 0x00, "Nikon", "JAA806DA",
2396
0
       "AF-S Nikkor 16-35mm f/4G ED VR"},
2397
0
      {0xA4, 0x54, 0x37, 0x37, 0x0C, 0x0C, 0xA6, 0x06, 0x01, 0x00, 0x00, "Nikon", "JAA131DA",
2398
0
       "AF-S Nikkor 24mm f/1.4G ED"},
2399
0
      {0xA5, 0x40, 0x3C, 0x8E, 0x2C, 0x3C, 0xA7, 0x0E, 0x01, 0x00, 0x00, "Nikon", "JAA808DA",
2400
0
       "AF-S Nikkor 28-300mm f/3.5-5.6G ED VR"},
2401
0
      {0xA6, 0x48, 0x8E, 0x8E, 0x24, 0x24, 0xA8, 0x0E, 0x13, 0x00, 0x00, "Nikon", "JAA339DA",
2402
0
       "AF-S Nikkor 300mm f/2.8G IF-ED VR II"},
2403
0
      {0xA7, 0x4B, 0x62, 0x62, 0x2C, 0x2C, 0xA9, 0x0E, 0x41, 0x00, 0x00, "Nikon", "JAA637DA",
2404
0
       "AF-S DX Micro Nikkor 85mm f/3.5G ED VR"},
2405
0
      {0xA8, 0x48, 0x80, 0x98, 0x30, 0x30, 0xAA, 0x0E, 0x03, 0x00, 0x00, "Nikon", "JAA809DA",
2406
0
       "AF-S Zoom-Nikkor 200-400mm f/4G IF-ED VR II"},
2407
0
      {0xA9, 0x54, 0x80, 0x80, 0x18, 0x18, 0xAB, 0x0E, 0x13, 0x00, 0x00, "Nikon", "JAA340DA",
2408
0
       "AF-S Nikkor 200mm f/2G ED VR II"},
2409
0
      {0xAA, 0x3C, 0x37, 0x6E, 0x30, 0x30, 0xAC, 0x0E, 0x01, 0x00, 0x00, "Nikon", "JAA811DA",
2410
0
       "AF-S Nikkor 24-120mm f/4G ED VR"},
2411
      // AB                AD                                          -- no lens --
2412
0
      {0xAC, 0x38, 0x53, 0x8E, 0x34, 0x3C, 0xAE, 0x0E, 0x01, 0x00, 0x00, "Nikon", "JAA814DA",
2413
0
       "AF-S DX Nikkor 55-300mm f/4.5-5.6G ED VR"},
2414
0
      {0xAD, 0x3C, 0x2D, 0x8E, 0x2C, 0x3C, 0xAF, 0x0E, 0x01, 0x00, 0x00, "Nikon", "JAA812DA",
2415
0
       "AF-S DX Nikkor 18-300mm f/3.5-5.6G ED VR"},
2416
0
      {0xAD, 0x3C, 0xA0, 0xA0, 0x3C, 0x3C, 0xD8, 0x4E, 0x00, 0x00, 0x00, "Nikon", "JAA535DA",
2417
0
       "AF-S Nikkor 500mm f/5.6E PF ED VR"},
2418
0
      {0xAE, 0x54, 0x62, 0x62, 0x0C, 0x0C, 0xB0, 0x06, 0x01, 0x00, 0x00, "Nikon", "JAA338DA",
2419
0
       "AF-S Nikkor 85mm f/1.4G"},
2420
0
      {0xAF, 0x54, 0x44, 0x44, 0x0C, 0x0C, 0xB1, 0x06, 0x01, 0x00, 0x00, "Nikon", "JAA134DA",
2421
0
       "AF-S Nikkor 35mm f/1.4G"},
2422
0
      {0xB0, 0x4C, 0x50, 0x50, 0x14, 0x14, 0xB2, 0x06, 0x01, 0x00, 0x00, "Nikon", "JAA015DA",
2423
0
       "AF-S Nikkor 50mm f/1.8G"},
2424
0
      {0xB1, 0x48, 0x48, 0x48, 0x24, 0x24, 0xB3, 0x06, 0x01, 0x00, 0x00, "Nikon", "JAA638DA",
2425
0
       "AF-S DX Micro Nikkor 40mm f/2.8G"},
2426
0
      {0xB2, 0x48, 0x5C, 0x80, 0x30, 0x30, 0xB4, 0x0E, 0x01, 0x00, 0x00, "Nikon", "JAA815DA",
2427
0
       "AF-S Nikkor 70-200mm f/4G ED VR"},
2428
0
      {0xB3, 0x4C, 0x62, 0x62, 0x14, 0x14, 0xB5, 0x06, 0x01, 0x00, 0x00, "Nikon", "JAA341DA",
2429
0
       "AF-S Nikkor 85mm f/1.8G"},
2430
0
      {0xB4, 0x40, 0x37, 0x62, 0x2C, 0x34, 0xB6, 0x0E, 0x01, 0x00, 0x00, "Nikon", "JAA816DA",
2431
0
       "AF-S Nikkor 24-85mm f/3.5-4.5G ED VR"},
2432
0
      {0xB5, 0x4C, 0x3C, 0x3C, 0x14, 0x14, 0xB7, 0x06, 0x01, 0x00, 0x00, "Nikon", "JAA135DA",
2433
0
       "AF-S Nikkor 28mm f/1.8G"},
2434
0
      {0xB6, 0x3C, 0xB0, 0xB0, 0x3C, 0x3C, 0xB8, 0x0E, 0x01, 0x00, 0x00, "Nikon", "JAA531DA",
2435
0
       "AF-S VR Nikkor 800mm f/5.6E FL ED"},
2436
0
      {0xB6, 0x3C, 0xB0, 0xB0, 0x3C, 0x3C, 0xB8, 0x4E, 0x01, 0x00, 0x00, "Nikon", "JAA531DA",
2437
0
       "AF-S VR Nikkor 800mm f/5.6E FL ED"},
2438
0
      {0xB7, 0x44, 0x60, 0x98, 0x34, 0x3C, 0xB9, 0x0E, 0x01, 0x00, 0x00, "Nikon", "JAA817DA",
2439
0
       "AF-S Nikkor 80-400mm f/4.5-5.6G ED VR"},
2440
0
      {0xB8, 0x40, 0x2D, 0x44, 0x2C, 0x34, 0xBA, 0x06, 0x01, 0x00, 0x00, "Nikon", "JAA818DA",
2441
0
       "AF-S Nikkor 18-35mm f/3.5-4.5G ED"},
2442
0
      {0xA0, 0x40, 0x2D, 0x74, 0x2C, 0x3C, 0xBB, 0x0E, 0x01, 0x00, 0x01, "Nikon", "JAA819DA",
2443
0
       "AF-S DX Nikkor 18-140mm f/3.5-5.6G ED VR"},
2444
0
      {0xA1, 0x54, 0x55, 0x55, 0x0C, 0x0C, 0xBC, 0x06, 0x01, 0x00, 0x01, "Nikon", "JAA136DA",
2445
0
       "AF-S Nikkor 58mm f/1.4G"},
2446
0
      {0xA2, 0x40, 0x2D, 0x53, 0x2C, 0x3C, 0xBD, 0x0E, 0x01, 0x00, 0x01, "Nikon", "JAA820DA",
2447
0
       "AF-S DX Nikkor 18-55mm f/3.5-5.6G VR II"},
2448
0
      {0xA4, 0x40, 0x2D, 0x8E, 0x2C, 0x40, 0xBF, 0x0E, 0x01, 0x00, 0x01, "Nikon", "JAA821DA",
2449
0
       "AF-S DX Nikkor 18-300mm f/3.5-6.3G ED VR"},
2450
0
      {0xA5, 0x4C, 0x44, 0x44, 0x14, 0x14, 0xC0, 0x06, 0x01, 0x00, 0x01, "Nikon", "JAA137DA",
2451
0
       "AF-S Nikkor 35mm f/1.8G ED"},
2452
0
      {0xA6, 0x48, 0x98, 0x98, 0x24, 0x24, 0xC1, 0x0E, 0x01, 0x00, 0x01, "Nikon", "JAA532DA",
2453
0
       "AF-S Nikkor 400mm f/2.8E FL ED VR"},
2454
0
      {0xA7, 0x3C, 0x53, 0x80, 0x30, 0x3C, 0xC2, 0x0E, 0x01, 0x00, 0x01, "Nikon", "JAA823DA",
2455
0
       "AF-S DX Nikkor 55-200mm f/4-5.6G ED VR II"},
2456
0
      {0xA8, 0x48, 0x8E, 0x8E, 0x30, 0x30, 0xC3, 0x4E, 0x01, 0x00, 0x01, "Nikon", "JAA342DA",
2457
0
       "AF-S Nikkor 300mm f/4E PF ED VR"},
2458
0
      {0xA8, 0x48, 0x8E, 0x8E, 0x30, 0x30, 0xC3, 0x0E, 0x01, 0x00, 0x01, "Nikon", "JAA342DA",
2459
0
       "AF-S Nikkor 300mm f/4E PF ED VR"},
2460
0
      {0xA9, 0x4C, 0x31, 0x31, 0x14, 0x14, 0xC4, 0x06, 0x01, 0x00, 0x01, "Nikon", "JAA138DA",
2461
0
       "AF-S Nikkor 20mm f/1.8G ED"},
2462
0
      {0xAA, 0x48, 0x37, 0x5C, 0x24, 0x24, 0xC5, 0x4E, 0x01, 0x00, 0x02, "Nikon", "JAA824DA",
2463
0
       "AF-S Nikkor 24-70mm f/2.8E ED VR"},
2464
0
      {0xAA, 0x48, 0x37, 0x5C, 0x24, 0x24, 0xC5, 0x0E, 0x01, 0x00, 0x02, "Nikon", "JAA824DA",
2465
0
       "AF-S Nikkor 24-70mm f/2.8E ED VR"},
2466
0
      {0xAB, 0x3C, 0xA0, 0xA0, 0x30, 0x30, 0xC6, 0x4E, 0x01, 0x00, 0x02, "Nikon", "JAA533DA",
2467
0
       "AF-S Nikkor 500mm f/4E FL ED VR"},
2468
0
      {0xAC, 0x3C, 0xA6, 0xA6, 0x30, 0x30, 0xC7, 0x4E, 0x01, 0x00, 0x02, "Nikon", "JAA534DA",
2469
0
       "AF-S Nikkor 600mm f/4E FL ED VR"},
2470
0
      {0xAD, 0x48, 0x28, 0x60, 0x24, 0x30, 0xC8, 0x4E, 0x01, 0x00, 0x02, "Nikon", "JAA825DA",
2471
0
       "AF-S DX Nikkor 16-80mm f/2.8-4E ED VR"},
2472
0
      {0xAD, 0x48, 0x28, 0x60, 0x24, 0x30, 0xC8, 0x0E, 0x01, 0x00, 0x02, "Nikon", "JAA825DA",
2473
0
       "AF-S DX Nikkor 16-80mm f/2.8-4E ED VR"},
2474
0
      {0xAE, 0x3C, 0x80, 0xA0, 0x3C, 0x3C, 0xC9, 0x4E, 0x01, 0x00, 0x02, "Nikon", "JAA822DA",
2475
0
       "AF-S Nikkor 200-500mm f/5.6E ED VR"},
2476
0
      {0xAE, 0x3C, 0x80, 0xA0, 0x3C, 0x3C, 0xC9, 0x0E, 0x01, 0x00, 0x02, "Nikon", "JAA822DA",
2477
0
       "AF-S Nikkor 200-500mm f/5.6E ED VR"},
2478
0
      {0xA0, 0x40, 0x2D, 0x53, 0x2C, 0x3C, 0xCA, 0x8E, 0x01, 0x00, 0x03, "Nikon", "JAA826DA",
2479
0
       "AF-P DX Nikkor 18-55mm f/3.5-5.6G VR"},
2480
0
      {0xA0, 0x40, 0x2D, 0x53, 0x2C, 0x3C, 0xCA, 0x0E, 0x01, 0x00, 0x03, "Nikon", "JAA827DA",
2481
0
       "AF-P DX Nikkor 18-55mm f/3.5-5.6G"},
2482
      //                  CB
2483
0
      {0xAF, 0x4C, 0x37, 0x37, 0x14, 0x14, 0xCC, 0x06, 0x01, 0x00, 0x03, "Nikon", "JAA139DA",
2484
0
       "AF-S Nikkor 24mm f/1.8G ED"},
2485
0
      {0xA3, 0x38, 0x5C, 0x8E, 0x34, 0x40, 0xCE, 0x8E, 0x01, 0x00, 0x03, "Nikon", "JAA829DA",
2486
0
       "AF-P DX Nikkor 70-300mm f/4.5-6.3G ED VR"},
2487
0
      {0xA3, 0x38, 0x5C, 0x8E, 0x34, 0x40, 0xCE, 0x0E, 0x01, 0x00, 0x03, "Nikon", "JAA828DA",
2488
0
       "AF-P DX Nikkor 70-300mm f/4.5-6.3G ED"},
2489
0
      {0xA4, 0x48, 0x5C, 0x80, 0x24, 0x24, 0xCF, 0x4E, 0x01, 0x00, 0x03, "Nikon", "JAA830DA",
2490
0
       "AF-S Nikkor 70-200mm f/2.8E FL ED VR"},
2491
0
      {0xA4, 0x48, 0x5C, 0x80, 0x24, 0x24, 0xCF, 0x0E, 0x01, 0x00, 0x03, "Nikon", "JAA830DA",
2492
0
       "AF-S Nikkor 70-200mm f/2.8E FL ED VR"},
2493
0
      {0xA5, 0x54, 0x6A, 0x6A, 0x0C, 0x0C, 0xD0, 0x46, 0x01, 0x00, 0x03, "Nikon", "JAA343DA",
2494
0
       "AF-S Nikkor 105mm f/1.4E ED"},
2495
0
      {0xA5, 0x54, 0x6A, 0x6A, 0x0C, 0x0C, 0xD0, 0x06, 0x01, 0x00, 0x03, "Nikon", "JAA343DA",
2496
0
       "AF-S Nikkor 105mm f/1.4E ED"},
2497
0
      {0xA6, 0x48, 0x2F, 0x2F, 0x30, 0x30, 0xD1, 0x46, 0x01, 0x00, 0x03, "Nikon", "JAA639DA", "PC Nikkor 19mm f/4E ED"},
2498
0
      {0xA6, 0x48, 0x2F, 0x2F, 0x30, 0x30, 0xD1, 0x06, 0x01, 0x00, 0x03, "Nikon", "JAA639DA", "PC Nikkor 19mm f/4E ED"},
2499
0
      {0xA7, 0x40, 0x11, 0x26, 0x2C, 0x34, 0xD2, 0x46, 0x01, 0x00, 0x03, "Nikon", "JAA831DA",
2500
0
       "AF-S Fisheye Nikkor 8-15mm f/3.5-4.5E ED"},
2501
0
      {0xA7, 0x40, 0x11, 0x26, 0x2C, 0x34, 0xD2, 0x06, 0x01, 0x00, 0x03, "Nikon", "JAA831DA",
2502
0
       "AF-S Fisheye Nikkor 8-15mm f/3.5-4.5E ED"},
2503
0
      {0xA8, 0x38, 0x18, 0x30, 0x34, 0x3C, 0xD3, 0x8E, 0x01, 0x00, 0x03, "Nikon", "JAA832DA",
2504
0
       "AF-P DX Nikkor 10-20mm f/4.5-5.6G VR"},
2505
0
      {0xA8, 0x38, 0x18, 0x30, 0x34, 0x3C, 0xD3, 0x0E, 0x01, 0x00, 0x03, "Nikon", "JAA832DA",
2506
0
       "AF-P DX Nikkor 10-20mm f/4.5-5.6G VR"},
2507
      // A9                D4
2508
      // AA                D5
2509
0
      {0xAB, 0x44, 0x5C, 0x8E, 0x34, 0x3C, 0xD6, 0xCE, 0x01, 0x00, 0x03, "Nikon", "JAA833DA",
2510
0
       "AF-P Nikkor 70-300mm f/4.5-5.6E ED VR"},
2511
0
      {0xAB, 0x44, 0x5C, 0x8E, 0x34, 0x3C, 0xD6, 0x0E, 0x01, 0x00, 0x03, "Nikon", "JAA833DA",
2512
0
       "AF-P Nikkor 70-300mm f/4.5-5.6E ED VR"},
2513
0
      {0xAC, 0x54, 0x3C, 0x3C, 0x0C, 0x0C, 0xD7, 0x46, 0x01, 0x00, 0x03, "Nikon", "JAA140DA",
2514
0
       "AF-S Nikkor 28mm f/1.4E ED"},
2515
0
      {0xAC, 0x54, 0x3C, 0x3C, 0x0C, 0x0C, 0xD7, 0x06, 0x01, 0x00, 0x03, "Nikon", "JAA140DA",
2516
0
       "AF-S Nikkor 28mm f/1.4E ED"},
2517
      //
2518
      //
2519
      //
2520
      //
2521
      //   "AF-S DX Nikkor 18-200mm f/3.5-5.6G ED VR II"
2522
      //
2523
0
      {0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, "Nikon", "JAA90701", "TC-16A"},
2524
0
      {0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, "Nikon", "JAA90701", "TC-16A"},
2525
      //
2526
      //------------------------------------------------------------------------------
2527
      // Sigma lenses by focal length, first fixed then zoom lenses
2528
      //------------------------------------------------------------------------------
2529
      //
2530
0
      {0xFE, 0x47, 0x00, 0x00, 0x24, 0x24, 0x4B, 0x06, 0x01, 0x00, 0x00, "Sigma", "486556",
2531
0
       "4.5mm F2.8 EX DC HSM Circular Fisheye"},
2532
0
      {0x26, 0x48, 0x11, 0x11, 0x30, 0x30, 0x1C, 0x02, 0x00, 0x00, 0x00, "Sigma", "483", "8mm F4 EX Circular Fisheye"},
2533
0
      {0x79, 0x40, 0x11, 0x11, 0x2C, 0x2C, 0x1C, 0x06, 0x00, 0x00, 0x00, "Sigma", "485597",
2534
0
       "8mm F3.5 EX Circular Fisheye"},
2535
0
      {0xDC, 0x48, 0x19, 0x19, 0x24, 0x24, 0x4B, 0x06, 0x01, 0x00, 0x00, "Sigma", "477554",
2536
0
       "10mm F2.8 EX DC HSM Fisheye"},
2537
0
      {0x02, 0x3F, 0x24, 0x24, 0x2C, 0x2C, 0x02, 0x00, 0x00, 0x00, 0x00, "Sigma", "468", "14mm F3.5"},
2538
0
      {0x48, 0x48, 0x24, 0x24, 0x24, 0x24, 0x4B, 0x02, 0x01, 0x00, 0x00, "Sigma", "", "14mm F2.8 EX Aspherical HSM"},
2539
0
      {0x26, 0x48, 0x27, 0x27, 0x24, 0x24, 0x1C, 0x02, 0x00, 0x00, 0x00, "Sigma", "476441",
2540
0
       "15mm F2.8 EX Diagonal Fisheye"},
2541
0
      {0xEA, 0x48, 0x27, 0x27, 0x24, 0x24, 0x1C, 0x02, 0x00, 0x00, 0x00, "Sigma", "", "15mm F2.8 EX Diagonal Fisheye"},
2542
      // M                                         "Sigma" "410"    "18mm F3.5";
2543
0
      {0x26, 0x58, 0x31, 0x31, 0x14, 0x14, 0x1C, 0x02, 0x00, 0x00, 0x00, "Sigma", "411442",
2544
0
       "20mm F1.8 EX DG Aspherical RF"},
2545
0
      {0x79, 0x54, 0x31, 0x31, 0x0C, 0x0C, 0x4B, 0x06, 0x00, 0x00, 0x00, "Sigma", "412555", "20mm F1.4 DG HSM | A"},
2546
0
      {0x7E, 0x54, 0x37, 0x37, 0x0C, 0x0C, 0x4B, 0x06, 0x00, 0x00, 0x00, "Sigma", "401559", "24mm F1.4 DG HSM | A"},
2547
0
      {0x26, 0x58, 0x37, 0x37, 0x14, 0x14, 0x1C, 0x02, 0x00, 0x00, 0x00, "Sigma", "432447",
2548
0
       "24mm F1.8 EX DG Aspherical Macro"},
2549
0
      {0xE1, 0x58, 0x37, 0x37, 0x14, 0x14, 0x1C, 0x02, 0x00, 0x00, 0x00, "Sigma", "432447",
2550
0
       "24mm F1.8 EX DG Aspherical Macro"},
2551
0
      {0x02, 0x46, 0x37, 0x37, 0x25, 0x25, 0x02, 0x00, 0x00, 0x00, 0x00, "Sigma", "438",
2552
0
       "24mm F2.8 Super Wide II Macro"},
2553
0
      {0xBC, 0x54, 0x3C, 0x3C, 0x0C, 0x0C, 0x4B, 0x46, 0x00, 0x00, 0x00, "Sigma", "441555", "28mm F1.4 DG HSM | A"},
2554
0
      {0x26, 0x58, 0x3C, 0x3C, 0x14, 0x14, 0x1C, 0x02, 0x00, 0x00, 0x00, "Sigma", "440442",
2555
0
       "28mm F1.8 EX DG Aspherical Macro"},
2556
0
      {0x48, 0x54, 0x3E, 0x3E, 0x0C, 0x0C, 0x4B, 0x06, 0x01, 0x00, 0x00, "Sigma", "477554", "30mm F1.4 EX DC HSM"},
2557
0
      {0xF8, 0x54, 0x3E, 0x3E, 0x0C, 0x0C, 0x4B, 0x06, 0x01, 0x00, 0x00, "Sigma", "477554", "30mm F1.4 EX DC HSM"},
2558
0
      {0x91, 0x54, 0x44, 0x44, 0x0C, 0x0C, 0x4B, 0x06, 0x01, 0x00, 0x00, "Sigma", "", "35mm F1.4 DG HSM"},
2559
0
      {0xDE, 0x54, 0x50, 0x50, 0x0C, 0x0C, 0x4B, 0x06, 0x01, 0x00, 0x00, "Sigma", "310554", "50mm F1.4 EX DG HSM"},
2560
0
      {0x88, 0x54, 0x50, 0x50, 0x0C, 0x0C, 0x4B, 0x06, 0x00, 0x00, 0x00, "Sigma", "311551", "50mm F1.4 DG HSM | A"},
2561
0
      {0x02, 0x48, 0x50, 0x50, 0x24, 0x24, 0x02, 0x00, 0x00, 0x00, 0x00, "Sigma", "", "Macro 50mm F2.8"},
2562
0
      {0x32, 0x54, 0x50, 0x50, 0x24, 0x24, 0x35, 0x02, 0x00, 0x00, 0x00, "Sigma", "346447", "Macro 50mm F2.8 EX DG"},
2563
0
      {0xE3, 0x54, 0x50, 0x50, 0x24, 0x24, 0x35, 0x02, 0x00, 0x00, 0x00, "Sigma", "", "Macro 50mm F2.8 EX DG"},
2564
0
      {0x79, 0x48, 0x5C, 0x5C, 0x24, 0x24, 0x1C, 0x06, 0x00, 0x00, 0x00, "Sigma", "270599", "Macro 70mm F2.8 EX DG"},
2565
0
      {0x9B, 0x54, 0x62, 0x62, 0x0C, 0x0C, 0x4B, 0x06, 0x00, 0x00, 0x00, "Sigma", "", "85mm F1.4 EX DG HSM"},
2566
0
      {0x02, 0x48, 0x65, 0x65, 0x24, 0x24, 0x02, 0x00, 0x00, 0x00, 0x00, "Sigma", "", "Macro 90mm F2.8"},
2567
0
      {0x32, 0x54, 0x6A, 0x6A, 0x24, 0x24, 0x35, 0x02, 0x00, 0x02, 0x00, "Sigma", "256", "Macro 105mm F2.8 EX DG"},
2568
0
      {0xE5, 0x54, 0x6A, 0x6A, 0x24, 0x24, 0x35, 0x02, 0x40, 0x00, 0x00, "Sigma", "257446", "Macro 105mm F2.8 EX DG"},
2569
0
      {0x97, 0x48, 0x6A, 0x6A, 0x24, 0x24, 0x4B, 0x0E, 0x00, 0x00, 0x00, "Sigma", "", "Macro 105mm F2.8 EX DG OS HSM"},
2570
0
      {0x48, 0x48, 0x76, 0x76, 0x24, 0x24, 0x4B, 0x06, 0x43, 0x00, 0x00, "Sigma", "104559",
2571
0
       "APO Macro 150mm F2.8 EX DG HSM"},
2572
0
      {0xF5, 0x48, 0x76, 0x76, 0x24, 0x24, 0x4B, 0x06, 0x43, 0x00, 0x00, "Sigma", "104559",
2573
0
       "APO Macro 150mm F2.8 EX DG HSM"},
2574
0
      {0x99, 0x48, 0x76, 0x76, 0x24, 0x24, 0x4B, 0x0E, 0x43, 0x00, 0x00, "Sigma", "",
2575
0
       "APO Macro 150mm F2.8 EX DG OS HSM"},
2576
0
      {0x48, 0x4C, 0x7C, 0x7C, 0x2C, 0x2C, 0x4B, 0x02, 0x43, 0x00, 0x00, "Sigma", "", "APO Macro 180mm F3.5 EX DG HSM"},
2577
0
      {0x48, 0x4C, 0x7D, 0x7D, 0x2C, 0x2C, 0x4B, 0x02, 0x43, 0x00, 0x00, "Sigma", "105556",
2578
0
       "APO Macro 180mm F3.5 EX DG HSM"},
2579
0
      {0x94, 0x48, 0x7C, 0x7C, 0x24, 0x24, 0x4B, 0x0E, 0x43, 0x00, 0x00, "Sigma", "",
2580
0
       "APO Macro 180mm F2.8 EX DG OS HSM"},
2581
      // M                                         "Sigma" ""       "APO 300mm F2.8";
2582
0
      {0x48, 0x54, 0x8E, 0x8E, 0x24, 0x24, 0x4B, 0x02, 0x03, 0x00, 0x00, "Sigma", "", "APO 300mm F2.8 EX DG HSM"},
2583
0
      {0xFB, 0x54, 0x8E, 0x8E, 0x24, 0x24, 0x4B, 0x02, 0x13, 0x00, 0x00, "Sigma", "195557", "APO 300mm F2.8 EX DG HSM"},
2584
0
      {0x26, 0x48, 0x8E, 0x8E, 0x30, 0x30, 0x1C, 0x02, 0x00, 0x00, 0x00, "Sigma", "", "APO Tele Macro 300mm F4"},
2585
0
      {0x02, 0x2F, 0x98, 0x98, 0x3D, 0x3D, 0x02, 0x00, 0x00, 0x00, 0x00, "Sigma", "", "APO 400mm F5.6"},
2586
0
      {0x26, 0x3C, 0x98, 0x98, 0x3C, 0x3C, 0x1C, 0x02, 0x00, 0x00, 0x00, "Sigma", "", "APO Tele Macro 400mm F5.6"},
2587
0
      {0x02, 0x37, 0xA0, 0xA0, 0x34, 0x34, 0x02, 0x00, 0x00, 0x00, 0x00, "Sigma", "", "APO 500mm F4.5"},
2588
0
      {0x48, 0x44, 0xA0, 0xA0, 0x34, 0x34, 0x4B, 0x02, 0x03, 0x00, 0x00, "Sigma", "", "APO 500mm F4.5 EX HSM"},
2589
0
      {0xF1, 0x44, 0xA0, 0xA0, 0x34, 0x34, 0x4B, 0x02, 0x03, 0x00, 0x00, "Sigma", "184551", "APO 500mm F4.5 EX DG HSM"},
2590
0
      {0x02, 0x34, 0xA0, 0xA0, 0x44, 0x44, 0x02, 0x00, 0x00, 0x00, 0x00, "Sigma", "", "APO 500mm F7.2"},
2591
0
      {0x02, 0x3C, 0xB0, 0xB0, 0x3C, 0x3C, 0x02, 0x00, 0x00, 0x00, 0x00, "Sigma", "", "APO 800mm F5.6"},
2592
0
      {0x48, 0x3C, 0xB0, 0xB0, 0x3C, 0x3C, 0x4B, 0x02, 0x03, 0x00, 0x00, "Sigma", "", "APO 800mm F5.6 EX HSM"},
2593
      // M                                         "Sigma" "152550" "APO 800mm F5.6 EX DG HSM";
2594
      // M2    B8 B8 49 49 02" "00" "00" "00" "00" "Sigma" ""       "APO 1000mm F8.0";
2595
      //
2596
0
      {0x9E, 0x38, 0x11, 0x29, 0x34, 0x3C, 0x4B, 0x06, 0x01, 0x00, 0x00, "Sigma", "", "8-16mm F4.5-5.6 DC HSM"},
2597
0
      {0xA1, 0x41, 0x19, 0x31, 0x2C, 0x2C, 0x4B, 0x06, 0x01, 0x00, 0x00, "Sigma", "", "10-20mm F3.5 EX DC HSM"},
2598
0
      {0x48, 0x3C, 0x19, 0x31, 0x30, 0x3C, 0x4B, 0x06, 0x01, 0x00, 0x00, "Sigma", "201555", "10-20mm F4-5.6 EX DC HSM"},
2599
0
      {0xF9, 0x3C, 0x19, 0x31, 0x30, 0x3C, 0x4B, 0x06, 0x01, 0x00, 0x00, "Sigma", "201555", "10-20mm F4-5.6 EX DC HSM"},
2600
0
      {0xCA, 0x3C, 0x1F, 0x37, 0x30, 0x30, 0x4B, 0x46, 0x01, 0x00, 0x00, "Sigma", "205955", "12-24mm F4 DG HSM | A"},
2601
0
      {0x48, 0x38, 0x1F, 0x37, 0x34, 0x3C, 0x4B, 0x06, 0x00, 0x00, 0x00, "Sigma", "200558",
2602
0
       "12-24mm F4.5-5.6 EX DG Aspherical HSM"},
2603
0
      {0xF0, 0x38, 0x1F, 0x37, 0x34, 0x3C, 0x4B, 0x06, 0x00, 0x00, 0x00, "Sigma", "200558",
2604
0
       "12-24mm F4.5-5.6 EX DG Aspherical HSM"},
2605
0
      {0x96, 0x38, 0x1F, 0x37, 0x34, 0x3C, 0x4B, 0x06, 0x00, 0x00, 0x00, "Sigma", "", "12-24mm F4.5-5.6 II DG HSM"},
2606
0
      {0xC1, 0x48, 0x24, 0x37, 0x24, 0x24, 0x4B, 0x46, 0x00, 0x00, 0x00, "Sigma", "", "14-24mm F2.8 DG HSM | A"},
2607
0
      {0x26, 0x40, 0x27, 0x3F, 0x2C, 0x34, 0x1C, 0x02, 0x00, 0x00, 0x00, "Sigma", "",
2608
0
       "15-30mm F3.5-4.5 EX DG Aspherical DF"},
2609
0
      {0x48, 0x48, 0x2B, 0x44, 0x24, 0x30, 0x4B, 0x06, 0x00, 0x00, 0x00, "Sigma", "",
2610
0
       "17-35mm F2.8-4 EX DG Aspherical HSM"},
2611
0
      {0x26, 0x54, 0x2B, 0x44, 0x24, 0x30, 0x1C, 0x02, 0x00, 0x00, 0x00, "Sigma", "", "17-35mm F2.8-4 EX Aspherical"},
2612
0
      {0x9D, 0x48, 0x2B, 0x50, 0x24, 0x24, 0x4B, 0x0E, 0x00, 0x00, 0x00, "Sigma", "", "17-50mm F2.8 EX DC OS HSM"},
2613
0
      {0x8F, 0x48, 0x2B, 0x50, 0x24, 0x24, 0x4B, 0x0E, 0x00, 0x00, 0x00, "Sigma", "", "17-50mm F2.8 EX DC OS HSM"},
2614
0
      {0x7A, 0x47, 0x2B, 0x5C, 0x24, 0x34, 0x4B, 0x06, 0x00, 0x00, 0x00, "Sigma", "689599",
2615
0
       "17-70mm F2.8-4.5 DC Macro Asp. IF HSM"},
2616
0
      {0x7A, 0x48, 0x2B, 0x5C, 0x24, 0x34, 0x4B, 0x06, 0x00, 0x00, 0x00, "Sigma", "689599",
2617
0
       "17-70mm F2.8-4.5 DC Macro Asp. IF HSM"},
2618
0
      {0x7F, 0x48, 0x2B, 0x5C, 0x24, 0x34, 0x1C, 0x06, 0x00, 0x00, 0x00, "Sigma", "",
2619
0
       "17-70mm F2.8-4.5 DC Macro Asp. IF"},
2620
0
      {0x8E, 0x3C, 0x2B, 0x5C, 0x24, 0x30, 0x4B, 0x0E, 0x00, 0x00, 0x00, "Sigma", "",
2621
0
       "17-70mm F2.8-4 DC Macro OS HSM | C"},
2622
0
      {0xA0, 0x48, 0x2A, 0x5C, 0x24, 0x30, 0x4B, 0x0E, 0x00, 0x00, 0xFE, "Sigma", "", "17-70mm F2.8-4 DC Macro OS HSM"},
2623
0
      {0x8B, 0x4C, 0x2D, 0x44, 0x14, 0x14, 0x4B, 0x06, 0x00, 0x00, 0x00, "Sigma", "", "18-35mm F1.8 DC HSM"},
2624
0
      {0x26, 0x40, 0x2D, 0x44, 0x2B, 0x34, 0x1C, 0x02, 0x00, 0x00, 0x00, "Sigma", "", "18-35mm F3.5-4.5 Aspherical"},
2625
0
      {0x26, 0x48, 0x2D, 0x50, 0x24, 0x24, 0x1C, 0x06, 0x00, 0x00, 0x00, "Sigma", "", "18-50mm F2.8 EX DC"},
2626
0
      {0x7F, 0x48, 0x2D, 0x50, 0x24, 0x24, 0x1C, 0x06, 0x00, 0x00, 0x00, "Sigma", "", "18-50mm F2.8 EX DC Macro"},
2627
0
      {0x7A, 0x48, 0x2D, 0x50, 0x24, 0x24, 0x4B, 0x06, 0x01, 0x00, 0x00, "Sigma", "582593", "18-50mm F2.8 EX DC Macro"},
2628
0
      {0xF6, 0x48, 0x2D, 0x50, 0x24, 0x24, 0x4B, 0x06, 0x01, 0x00, 0x00, "Sigma", "582593", "18-50mm F2.8 EX DC Macro"},
2629
0
      {0xA4, 0x47, 0x2D, 0x50, 0x24, 0x34, 0x4B, 0x0E, 0x01, 0x00, 0x00, "Sigma", "", "18-50mm F2.8-4.5 DC OS HSM"},
2630
0
      {0x26, 0x40, 0x2D, 0x50, 0x2C, 0x3C, 0x1C, 0x06, 0x00, 0x00, 0x00, "Sigma", "", "18-50mm F3.5-5.6 DC"},
2631
0
      {0x7A, 0x40, 0x2D, 0x50, 0x2C, 0x3C, 0x4B, 0x06, 0x01, 0x00, 0x00, "Sigma", "551551", "18-50mm F3.5-5.6 DC HSM"},
2632
0
      {0x26, 0x40, 0x2D, 0x70, 0x2B, 0x3C, 0x1C, 0x06, 0x00, 0x00, 0x00, "Sigma", "", "18-125mm F3.5-5.6 DC"},
2633
0
      {0xCD, 0x3D, 0x2D, 0x70, 0x2E, 0x3C, 0x4B, 0x0E, 0x01, 0x00, 0x00, "Sigma", "853556",
2634
0
       "18-125mm F3.8-5.6 DC OS HSM"},
2635
0
      {0x26, 0x40, 0x2D, 0x80, 0x2C, 0x40, 0x1C, 0x06, 0x00, 0x00, 0x00, "Sigma", "777555", "18-200mm F3.5-6.3 DC"},
2636
0
      {0xFF, 0x40, 0x2D, 0x80, 0x2C, 0x40, 0x4B, 0x06, 0x00, 0x00, 0x00, "Sigma", "", "18-200mm F3.5-6.3 DC"},
2637
0
      {0x7A, 0x40, 0x2D, 0x80, 0x2C, 0x40, 0x4B, 0x0E, 0x01, 0x00, 0x00, "Sigma", "888558",
2638
0
       "18-200mm F3.5-6.3 DC OS HSM"},
2639
0
      {0xED, 0x40, 0x2D, 0x80, 0x2C, 0x40, 0x4B, 0x0E, 0x01, 0x00, 0x00, "Sigma", "888558",
2640
0
       "18-200mm F3.5-6.3 DC OS HSM"},
2641
0
      {0x90, 0x40, 0x2D, 0x80, 0x2C, 0x40, 0x4B, 0x0E, 0x01, 0x00, 0x00, "Sigma", "", "18-200mm F3.5-6.3 II DC OS HSM"},
2642
0
      {0xA5, 0x40, 0x2D, 0x88, 0x2C, 0x40, 0x4B, 0x0E, 0x01, 0x00, 0x00, "Sigma", "", "18-250mm F3.5-6.3 DC OS HSM"},
2643
0
      {0x92, 0x39, 0x2D, 0x88, 0x2C, 0x40, 0x4B, 0x0E, 0x01, 0x00, 0x00, "Sigma", "",
2644
0
       "18-250mm F3.5-6.3 DC OS Macro HSM"},
2645
0
      {0x26, 0x48, 0x31, 0x49, 0x24, 0x24, 0x1C, 0x02, 0x00, 0x00, 0x00, "Sigma", "", "20-40mm F2.8"},
2646
0
      {0x02, 0x3A, 0x37, 0x50, 0x31, 0x3D, 0x02, 0x00, 0x00, 0x00, 0x00, "Sigma", "", "24-50mm F4-5.6 UC"},
2647
0
      {0x26, 0x48, 0x37, 0x56, 0x24, 0x24, 0x1C, 0x02, 0x00, 0x00, 0x00, "Sigma", "547448", "24-60mm F2.8 EX DG"},
2648
0
      {0xB6, 0x48, 0x37, 0x56, 0x24, 0x24, 0x1C, 0x02, 0x00, 0x00, 0x00, "Sigma", "547448", "24-60mm F2.8 EX DG"},
2649
0
      {0xA6, 0x48, 0x37, 0x5C, 0x24, 0x24, 0x4B, 0x06, 0x01, 0x00, 0x00, "Sigma", "571559",
2650
0
       "24-70mm F2.8 IF EX DG HSM"},
2651
0
      {0x26, 0x54, 0x37, 0x5C, 0x24, 0x24, 0x1C, 0x02, 0x00, 0x00, 0x00, "Sigma", "", "24-70mm F2.8 EX DG Macro"},
2652
0
      {0x67, 0x54, 0x37, 0x5C, 0x24, 0x24, 0x1C, 0x02, 0x00, 0x00, 0x00, "Sigma", "548445", "24-70mm F2.8 EX DG Macro"},
2653
0
      {0xE9, 0x54, 0x37, 0x5C, 0x24, 0x24, 0x1C, 0x02, 0x00, 0x00, 0x00, "Sigma", "548445", "24-70mm F2.8 EX DG Macro"},
2654
0
      {0x26, 0x40, 0x37, 0x5C, 0x2C, 0x3C, 0x1C, 0x02, 0x00, 0x00, 0x00, "Sigma", "", "24-70mm F3.5-5.6 Aspherical HF"},
2655
0
      {0x8A, 0x3C, 0x37, 0x6A, 0x30, 0x30, 0x4B, 0x0E, 0x00, 0x00, 0x00, "Sigma", "", "24-105mm F4 DG OS HSM"},
2656
0
      {0x26, 0x54, 0x37, 0x73, 0x24, 0x34, 0x1C, 0x02, 0x00, 0x00, 0x00, "Sigma", "", "24-135mm F2.8-4.5"},
2657
0
      {0x02, 0x46, 0x3C, 0x5C, 0x25, 0x25, 0x02, 0x00, 0x00, 0x00, 0x00, "Sigma", "", "28-70mm F2.8"},
2658
0
      {0x26, 0x54, 0x3C, 0x5C, 0x24, 0x24, 0x1C, 0x02, 0x00, 0x00, 0x00, "Sigma", "", "28-70mm F2.8 EX"},
2659
0
      {0x26, 0x48, 0x3C, 0x5C, 0x24, 0x24, 0x1C, 0x06, 0x00, 0x00, 0x00, "Sigma", "549442", "28-70mm F2.8 EX DG"},
2660
0
      {0x79, 0x48, 0x3C, 0x5C, 0x24, 0x24, 0x1C, 0x06, 0x00, 0x00, 0x00, "Sigma", "", "28-70mm F2.8 EX DG"},
2661
0
      {0x26, 0x48, 0x3C, 0x5C, 0x24, 0x30, 0x1C, 0x02, 0x00, 0x00, 0x00, "Sigma", "634445", "28-70mm F2.8-4 DG"},
2662
0
      {0x02, 0x3F, 0x3C, 0x5C, 0x2D, 0x35, 0x02, 0x00, 0x00, 0x00, 0x00, "Sigma", "", "28-70mm F3.5-4.5 UC"},
2663
0
      {0x26, 0x40, 0x3C, 0x60, 0x2C, 0x3C, 0x1C, 0x02, 0x00, 0x00, 0x00, "Sigma", "",
2664
0
       "28-80mm F3.5-5.6 Mini Zoom Macro II Aspherical"},
2665
0
      {0x26, 0x40, 0x3C, 0x65, 0x2C, 0x3C, 0x1C, 0x02, 0x00, 0x00, 0x00, "Sigma", "", "28-90mm F3.5-5.6 Macro"},
2666
0
      {0x26, 0x48, 0x3C, 0x6A, 0x24, 0x30, 0x1C, 0x02, 0x00, 0x00, 0x00, "Sigma", "", "28-105mm F2.8-4 Aspherical"},
2667
0
      {0x26, 0x3E, 0x3C, 0x6A, 0x2E, 0x3C, 0x1C, 0x02, 0x00, 0x00, 0x00, "Sigma", "",
2668
0
       "28-105mm F3.8-5.6 UC-III Aspherical IF"},
2669
0
      {0x26, 0x40, 0x3C, 0x80, 0x2C, 0x3C, 0x1C, 0x02, 0x00, 0x00, 0x00, "Sigma", "",
2670
0
       "28-200mm F3.5-5.6 Compact Aspherical Hyperzoom Macro"},
2671
0
      {0x26, 0x40, 0x3C, 0x80, 0x2B, 0x3C, 0x1C, 0x02, 0x00, 0x00, 0x00, "Sigma", "",
2672
0
       "28-200mm F3.5-5.6 Compact Aspherical Hyperzoom Macro"},
2673
0
      {0x26, 0x3D, 0x3C, 0x80, 0x2F, 0x3D, 0x1C, 0x02, 0x00, 0x00, 0x00, "Sigma", "", "28-300mm F3.8-5.6 Aspherical"},
2674
0
      {0x26, 0x41, 0x3C, 0x8E, 0x2C, 0x40, 0x1C, 0x02, 0x00, 0x00, 0x00, "Sigma", "795443",
2675
0
       "28-300mm F3.5-6.3 DG Macro"},
2676
0
      {0xE6, 0x41, 0x3C, 0x8E, 0x2C, 0x40, 0x1C, 0x02, 0x00, 0x00, 0x00, "Sigma", "", "28-300mm F3.5-6.3 DG Macro"},
2677
0
      {0x26, 0x40, 0x3C, 0x8E, 0x2C, 0x40, 0x1C, 0x02, 0x00, 0x00, 0x00, "Sigma", "", "28-300mm F3.5-6.3 Macro"},
2678
0
      {0x02, 0x3B, 0x44, 0x61, 0x30, 0x3D, 0x02, 0x00, 0x00, 0x00, 0x00, "Sigma", "", "35-80mm F4-5.6"},
2679
0
      {0x02, 0x40, 0x44, 0x73, 0x2B, 0x36, 0x02, 0x00, 0x00, 0x00, 0x00, "Sigma", "", "35-135mm F3.5-4.5 a"},
2680
0
      {0xCC, 0x4C, 0x50, 0x68, 0x14, 0x14, 0x4B, 0x06, 0x00, 0x00, 0x00, "Sigma", "", "50-100mm F1.8 DC HSM | A"},
2681
0
      {0x7A, 0x47, 0x50, 0x76, 0x24, 0x24, 0x4B, 0x06, 0x03, 0x00, 0x00, "Sigma", "", "50-150mm F2.8 EX APO DC HSM"},
2682
0
      {0xFD, 0x47, 0x50, 0x76, 0x24, 0x24, 0x4B, 0x06, 0x03, 0x00, 0x00, "Sigma", "691554",
2683
0
       "50-150mm F2.8 EX APO DC HSM II"},
2684
0
      {0x98, 0x48, 0x50, 0x76, 0x24, 0x24, 0x4B, 0x0E, 0x00, 0x00, 0x00, "Sigma", "", "50-150mm F2.8 EX DC APO OS HSM"},
2685
0
      {0x48, 0x3C, 0x50, 0xA0, 0x30, 0x40, 0x4B, 0x02, 0x03, 0x00, 0x00, "Sigma", "736552",
2686
0
       "APO 50-500mm F4-6.3 EX HSM"},
2687
0
      {0x9F, 0x37, 0x50, 0xA0, 0x34, 0x40, 0x4B, 0x0E, 0x03, 0x00, 0x00, "Sigma", "",
2688
0
       "50-500mm F4.5-6.3 APO DG OS HSM"},
2689
      // M                                         "Sigma" "686550" "50-200mm F4-5.6 DC OS HSM";
2690
0
      {0x26, 0x3C, 0x54, 0x80, 0x30, 0x3C, 0x1C, 0x06, 0x00, 0x00, 0x00, "Sigma", "", "55-200mm F4-5.6 DC"},
2691
0
      {0x7A, 0x3B, 0x53, 0x80, 0x30, 0x3C, 0x4B, 0x06, 0x01, 0x00, 0x00, "Sigma", "", "55-200mm F4-5.6 DC HSM"},
2692
0
      {0xBF, 0x38, 0x56, 0xA6, 0x34, 0x40, 0x4B, 0x4E, 0x00, 0x00, 0x00, "Sigma", "",
2693
0
       "60-600mm F4.5-6.3 DG OS HSM | S"},
2694
0
      {0x48, 0x54, 0x5C, 0x80, 0x24, 0x24, 0x4B, 0x02, 0x00, 0x00, 0x00, "Sigma", "", "70-200mm F2.8 EX APO IF HSM"},
2695
0
      {0x7A, 0x48, 0x5C, 0x80, 0x24, 0x24, 0x4B, 0x06, 0x03, 0x00, 0x00, "Sigma", "",
2696
0
       "70-200mm F2.8 EX APO DG Macro HSM II"},
2697
0
      {0xEE, 0x48, 0x5C, 0x80, 0x24, 0x24, 0x4B, 0x06, 0x03, 0x00, 0x00, "Sigma", "579555",
2698
0
       "70-200mm F2.8 EX APO DG Macro HSM II"},
2699
0
      {0x9C, 0x48, 0x5C, 0x80, 0x24, 0x24, 0x4B, 0x0E, 0x03, 0x00, 0x00, "Sigma", "", "70-200mm F2.8 EX DG OS HSM"},
2700
0
      {0x02, 0x46, 0x5C, 0x82, 0x25, 0x25, 0x02, 0x00, 0x00, 0x00, 0x00, "Sigma", "", "70-210mm F2.8 APO"},
2701
0
      {0x02, 0x40, 0x5C, 0x82, 0x2C, 0x35, 0x02, 0x00, 0x00, 0x00, 0x00, "Sigma", "", "APO 70-210mm F3.5-4.5"},
2702
0
      {0x26, 0x3C, 0x5C, 0x82, 0x30, 0x3C, 0x1C, 0x02, 0x00, 0x00, 0x00, "Sigma", "", "70-210mm F4-5.6 UC-II"},
2703
0
      {0x26, 0x3C, 0x5C, 0x8E, 0x30, 0x3C, 0x1C, 0x02, 0x00, 0x00, 0x00, "Sigma", "", "70-300mm F4-5.6 DG Macro"},
2704
0
      {0x56, 0x3C, 0x5C, 0x8E, 0x30, 0x3C, 0x1C, 0x02, 0x00, 0x00, 0x00, "Sigma", "",
2705
0
       "70-300mm F4-5.6 APO Macro Super II"},
2706
0
      {0xE0, 0x3C, 0x5C, 0x8E, 0x30, 0x3C, 0x4B, 0x06, 0x00, 0x00, 0x00, "Sigma", "508555",
2707
0
       "APO 70-300mm F4-5.6 DG Macro"},
2708
0
      {0xA3, 0x3C, 0x5C, 0x8E, 0x30, 0x3C, 0x4B, 0x0E, 0x00, 0x00, 0x00, "Sigma", "572556", "70-300mm F4-5.6 DG OS"},
2709
0
      {0x02, 0x37, 0x5E, 0x8E, 0x35, 0x3D, 0x02, 0x00, 0x00, 0x00, 0x00, "Sigma", "", "75-300mm F4.5-5.6 APO"},
2710
0
      {0x02, 0x3A, 0x5E, 0x8E, 0x32, 0x3D, 0x02, 0x00, 0x00, 0x00, 0x00, "Sigma", "", "75-300mm F4.0-5.6"},
2711
0
      {0x77, 0x44, 0x61, 0x98, 0x34, 0x3C, 0x7B, 0x0E, 0x03, 0x00, 0x00, "Sigma", "", "80-400mm f4.5-5.6 EX OS"},
2712
0
      {0x77, 0x44, 0x60, 0x98, 0x34, 0x3C, 0x7B, 0x0E, 0x03, 0x00, 0x00, "Sigma", "", "80-400mm f4.5-5.6 APO DG D OS"},
2713
0
      {0x48, 0x48, 0x68, 0x8E, 0x30, 0x30, 0x4B, 0x02, 0x03, 0x00, 0x00, "Sigma", "134556",
2714
0
       "APO 100-300mm F4 EX IF HSM"},
2715
0
      {0xF3, 0x48, 0x68, 0x8E, 0x30, 0x30, 0x4B, 0x02, 0x13, 0x00, 0x00, "Sigma", "134556",
2716
0
       "APO 100-300mm F4 EX IF HSM"},
2717
0
      {0x48, 0x54, 0x6F, 0x8E, 0x24, 0x24, 0x4B, 0x02, 0x03, 0x00, 0x00, "Sigma", "", "APO 120-300mm F2.8 EX DG HSM"},
2718
0
      {0x7A, 0x54, 0x6E, 0x8E, 0x24, 0x24, 0x4B, 0x02, 0x03, 0x00, 0x00, "Sigma", "135553",
2719
0
       "APO 120-300mm F2.8 EX DG HSM"},
2720
0
      {0xFA, 0x54, 0x6E, 0x8E, 0x24, 0x24, 0x4B, 0x02, 0x03, 0x00, 0x00, "Sigma", "135553",
2721
0
       "APO 120-300mm F2.8 EX DG HSM"},
2722
0
      {0xCF, 0x38, 0x6E, 0x98, 0x34, 0x3C, 0x4B, 0x0E, 0x03, 0x00, 0x00, "Sigma", "728557",
2723
0
       "APO 120-400mm F4.5-5.6 DG OS HSM"},
2724
0
      {0xC3, 0x34, 0x68, 0x98, 0x38, 0x40, 0x4B, 0x4E, 0x03, 0x00, 0x00, "Sigma", "", "100-400mm F5-6.3 DG OS HSM | C"},
2725
0
      {0x8D, 0x48, 0x6E, 0x8E, 0x24, 0x24, 0x4B, 0x0E, 0x03, 0x00, 0x00, "Sigma", "", "120-300mm F2.8 DG OS HSM | S"},
2726
0
      {0x26, 0x44, 0x73, 0x98, 0x34, 0x3C, 0x1C, 0x02, 0x00, 0x00, 0x00, "Sigma", "",
2727
0
       "135-400mm F4.5-5.6 APO Aspherical"},
2728
0
      {0xCE, 0x34, 0x76, 0xA0, 0x38, 0x40, 0x4B, 0x0E, 0x03, 0x00, 0x00, "Sigma", "737559",
2729
0
       "APO 150-500mm F5-6.3 DG OS HSM"},
2730
0
      {0x81, 0x34, 0x76, 0xA6, 0x38, 0x40, 0x4B, 0x0E, 0x03, 0x00, 0x00, "Sigma", "", "150-600mm F5-6.3 DG OS HSM | S"},
2731
0
      {0x82, 0x34, 0x76, 0xA6, 0x38, 0x40, 0x4B, 0x0E, 0x03, 0x00, 0x00, "Sigma", "", "150-600mm F5-6.3 DG OS HSM | C"},
2732
0
      {0x26, 0x40, 0x7B, 0xA0, 0x34, 0x40, 0x1C, 0x02, 0x00, 0x00, 0x00, "Sigma", "",
2733
0
       "APO 170-500mm F5-6.3 Aspherical RF"},
2734
0
      {0xA7, 0x49, 0x80, 0xA0, 0x24, 0x24, 0x4B, 0x06, 0x03, 0x00, 0x00, "Sigma", "", "APO 200-500mm F2.8 EX DG"},
2735
0
      {0x48, 0x3C, 0x8E, 0xB0, 0x3C, 0x3C, 0x4B, 0x02, 0x03, 0x00, 0x00, "Sigma", "595555",
2736
0
       "APO 300-800mm F5.6 EX DG HSM"},
2737
      //
2738
      //------------------------------------------------------------------------------
2739
      // Tamron lenses by focal length, first fixed then zoom lenses
2740
      //------------------------------------------------------------------------------
2741
      //
2742
0
      {0x00, 0x47, 0x25, 0x25, 0x24, 0x24, 0x00, 0x02, 0x00, 0x00, 0x00, "Tamron", "69E",
2743
0
       "SP AF 14mm F/2.8 Aspherical (IF)"},
2744
0
      {0xE8, 0x4C, 0x44, 0x44, 0x14, 0x14, 0xDF, 0x0E, 0x00, 0x00, 0x00, "Tamron", "F012", "SP 35mm F/1.8 Di VC USD"},
2745
0
      {0xE7, 0x4C, 0x4C, 0x4C, 0x14, 0x14, 0xDF, 0x0E, 0x00, 0x00, 0x00, "Tamron", "F013", "SP 45mm F/1.8 Di VC USD"},
2746
0
      {0xF4, 0x54, 0x56, 0x56, 0x18, 0x18, 0x84, 0x06, 0x01, 0x00, 0x00, "Tamron", "G005",
2747
0
       "SP AF 60mm F/2 Di II LD (IF) Macro 1:1"},
2748
0
      {0x1E, 0x5D, 0x64, 0x64, 0x20, 0x20, 0x13, 0x00, 0x40, 0x00, 0x00, "Tamron", "52E", "SP AF 90mm F/2.5"},
2749
0
      {0x20, 0x5A, 0x64, 0x64, 0x20, 0x20, 0x14, 0x00, 0x40, 0x00, 0x00, "Tamron", "152E", "SP AF 90mm F/2.5 Macro"},
2750
0
      {0x22, 0x53, 0x64, 0x64, 0x24, 0x24, 0xE0, 0x02, 0x40, 0x00, 0x00, "Tamron", "72E", "SP AF 90mm F/2.8 Macro 1:1"},
2751
0
      {0x32, 0x53, 0x64, 0x64, 0x24, 0x24, 0x35, 0x02, 0x40, 0x01, 0x00, "Tamron", "172E",
2752
0
       "SP AF 90mm F/2.8 Macro 1:1"},
2753
0
      {0x32, 0x53, 0x64, 0x64, 0x24, 0x24, 0x35, 0x02, 0x40, 0x02, 0x00, "Tamron", "272E",
2754
0
       "SP AF 90mm F/2.8 Di Macro 1:1"},
2755
0
      {0xF8, 0x55, 0x64, 0x64, 0x24, 0x24, 0x84, 0x06, 0x41, 0x00, 0x00, "Tamron", "272NII",
2756
0
       "SP AF 90mm F/2.8 Di Macro 1:1"},
2757
0
      {0xF8, 0x54, 0x64, 0x64, 0x24, 0x24, 0xDF, 0x06, 0x41, 0x00, 0x00, "Tamron", "272NII",
2758
0
       "SP AF 90mm F/2.8 Di Macro 1:1"},
2759
0
      {0xFE, 0x54, 0x64, 0x64, 0x24, 0x24, 0xDF, 0x0E, 0x00, 0x00, 0x00, "Tamron", "F004",
2760
0
       "SP 90mm F/2.8 Di VC USD Macro 1:1"},
2761
0
      {0xE4, 0x54, 0x64, 0x64, 0x24, 0x24, 0xDF, 0x0E, 0x00, 0x00, 0x00, "Tamron", "F017",
2762
0
       "SP 90mm F/2.8 Di VC USD Macro 1:1"},
2763
0
      {0x00, 0x4C, 0x7C, 0x7C, 0x2C, 0x2C, 0x00, 0x02, 0x00, 0x00, 0x00, "Tamron", "B01", "SP AF 180mm F/3.5 Di Model"},
2764
0
      {0x21, 0x56, 0x8E, 0x8E, 0x24, 0x24, 0x14, 0x00, 0x00, 0x00, 0x00, "Tamron", "60E", "SP AF 300mm F/2.8 LD-IF"},
2765
0
      {0x27, 0x54, 0x8E, 0x8E, 0x24, 0x24, 0x1D, 0x02, 0x00, 0x00, 0x00, "Tamron", "360E", "SP AF 300mm F/2.8 LD-IF"},
2766
      //
2767
0
      {0xF6, 0x3F, 0x18, 0x37, 0x2C, 0x34, 0x84, 0x06, 0x01, 0x00, 0x00, "Tamron", "B001",
2768
0
       "SP AF 10-24mm F/3.5-4.5 Di II LD Aspherical (IF)"},
2769
0
      {0xF6, 0x3F, 0x18, 0x37, 0x2C, 0x34, 0xDF, 0x06, 0x01, 0x00, 0x00, "Tamron", "B001",
2770
0
       "SP AF 10-24mm F/3.5-4.5 Di II LD Aspherical (IF)"},
2771
0
      {0x00, 0x36, 0x1C, 0x2D, 0x34, 0x3C, 0x00, 0x06, 0x00, 0x00, 0x00, "Tamron", "A13",
2772
0
       "SP AF 11-18mm F/4.5-5.6 Di II LD Aspherical (IF)"},
2773
0
      {0xCA, 0x48, 0x27, 0x3E, 0x24, 0x24, 0xDF, 0x4E, 0x00, 0x00, 0x00, "Tamron", "A041",
2774
0
       "SP 15-30mm F/2.8 Di VC USD G2"},
2775
0
      {0xE9, 0x48, 0x27, 0x3E, 0x24, 0x24, 0xDF, 0x0E, 0x00, 0x00, 0x00, "Tamron", "A012",
2776
0
       "SP 15-30mm F/2.8 Di VC USD"},
2777
0
      {0xEA, 0x40, 0x29, 0x8E, 0x2C, 0x40, 0xDF, 0x0E, 0x00, 0x00, 0x00, "Tamron", "B016",
2778
0
       "16-300mm F/3.5-6.3 Di II VC PZD Macro"},
2779
0
      {0x07, 0x46, 0x2B, 0x44, 0x24, 0x30, 0x03, 0x02, 0x00, 0x00, 0x00, "Tamron", "A05",
2780
0
       "SP AF 17-35mm F/2.8-4 Di LD Aspherical (IF)"},
2781
0
      {0x00, 0x53, 0x2B, 0x50, 0x24, 0x24, 0x00, 0x06, 0x00, 0x00, 0x00, "Tamron", "A16",
2782
0
       "SP AF 17-50mm F/2.8 XR Di II LD Aspherical (IF)"},
2783
0
      {0x00, 0x54, 0x2B, 0x50, 0x24, 0x24, 0x00, 0x06, 0x01, 0x00, 0x00, "Tamron", "A16NII",
2784
0
       "SP AF 17-50mm F/2.8 XR Di II LD Aspherical (IF)"},
2785
0
      {0xFB, 0x54, 0x2B, 0x50, 0x24, 0x24, 0x84, 0x06, 0x01, 0x00, 0x00, "Tamron", "A16NII",
2786
0
       "SP AF 17-50mm F/2.8 XR Di II LD Aspherical (IF)"},
2787
0
      {0xF3, 0x54, 0x2B, 0x50, 0x24, 0x24, 0x84, 0x0E, 0x01, 0x00, 0x00, "Tamron", "B005",
2788
0
       "SP AF 17-50mm F/2.8 XR Di II VC LD Aspherical (IF)"},
2789
0
      {0x00, 0x3F, 0x2D, 0x80, 0x2B, 0x40, 0x00, 0x06, 0x00, 0x00, 0x00, "Tamron", "A14",
2790
0
       "AF 18-200mm F/3.5-6.3 XR Di II LD Aspherical (IF)"},
2791
0
      {0x00, 0x3F, 0x2D, 0x80, 0x2C, 0x40, 0x00, 0x06, 0x00, 0x00, 0x00, "Tamron", "A14",
2792
0
       "AF 18-200mm F/3.5-6.3 XR Di II LD Aspherical (IF) Macro"},
2793
0
      {0x00, 0x40, 0x2D, 0x80, 0x2C, 0x40, 0x00, 0x06, 0x01, 0x00, 0x00, "Tamron", "A14NII",
2794
0
       "AF 18-200mm F/3.5-6.3 XR Di II LD Aspherical (IF) Macro"},
2795
0
      {0xFC, 0x40, 0x2D, 0x80, 0x2C, 0x40, 0xDF, 0x06, 0x01, 0x00, 0x00, "Tamron", "A14NII",
2796
0
       "AF 18-200mm F/3.5-6.3 XR Di II LD Aspherical (IF) Macro"},
2797
0
      {0xE6, 0x40, 0x2D, 0x80, 0x2C, 0x40, 0xDF, 0x0E, 0x01, 0x00, 0x00, "Tamron", "B018",
2798
0
       "18-200mm F/3.5-6.3 Di II VC"},
2799
0
      {0x00, 0x40, 0x2D, 0x88, 0x2C, 0x40, 0x62, 0x06, 0x00, 0x00, 0x00, "Tamron", "A18",
2800
0
       "AF 18-250mm F/3.5-6.3 Di II LD Aspherical (IF) Macro"},
2801
0
      {0x00, 0x40, 0x2D, 0x88, 0x2C, 0x40, 0x00, 0x06, 0x01, 0x00, 0x00, "Tamron", "A18NII",
2802
0
       "AF 18-250mm F/3.5-6.3 Di II LD Aspherical (IF) Macro "},
2803
0
      {0xF5, 0x40, 0x2C, 0x8A, 0x2C, 0x40, 0x40, 0x0E, 0x01, 0x00, 0x00, "Tamron", "B003",
2804
0
       "AF 18-270mm F/3.5-6.3 Di II VC LD Aspherical (IF) Macro"},
2805
0
      {0xF0, 0x3F, 0x2D, 0x8A, 0x2C, 0x40, 0xDF, 0x0E, 0x01, 0x00, 0x00, "Tamron", "B008",
2806
0
       "AF 18-270mm F/3.5-6.3 Di II VC PZD"},
2807
0
      {0xE0, 0x40, 0x2D, 0x98, 0x2C, 0x41, 0xDF, 0x4E, 0x01, 0x00, 0x00, "Tamron", "B028",
2808
0
       "18-400mm F/3.5-6.3 Di II VC HLD"},
2809
0
      {0xE0, 0x40, 0x2D, 0x98, 0x2C, 0x41, 0xDF, 0x0E, 0x01, 0x00, 0x00, "Tamron", "B028",
2810
0
       "18-400mm F/3.5-6.3 Di II VC HLD"},
2811
0
      {0x07, 0x40, 0x2F, 0x44, 0x2C, 0x34, 0x03, 0x02, 0x00, 0x00, 0x00, "Tamron", "A10", "AF 19-35mm F/3.5-4.5"},
2812
0
      {0x07, 0x40, 0x30, 0x45, 0x2D, 0x35, 0x03, 0x02, 0x00, 0x00, 0x00, "Tamron", "A10", "AF 19-35mm F/3.5-4.5"},
2813
0
      {0x00, 0x49, 0x30, 0x48, 0x22, 0x2B, 0x00, 0x02, 0x00, 0x00, 0x00, "Tamron", "166D", "SP AF 20-40mm F/2.7-3.5"},
2814
0
      {0x0E, 0x4A, 0x31, 0x48, 0x23, 0x2D, 0x0E, 0x02, 0x00, 0x00, 0x00, "Tamron", "166D", "SP AF 20-40mm F/2.7-3.5"},
2815
      // M                                         "Tamron" "266D"   "SP AF 20-40mm F/2.7-3.5 Aspherical-IF";
2816
0
      {0xFE, 0x48, 0x37, 0x5C, 0x24, 0x24, 0xDF, 0x0E, 0x01, 0x00, 0x00, "Tamron", "A007",
2817
0
       "SP 24-70mm F/2.8 Di VC USD"},
2818
      // M                                         "Tamron" "73D"    "AF 24-70mm F/3.3-5.6 Aspherical";
2819
0
      {0xCE, 0x47, 0x37, 0x5C, 0x25, 0x25, 0xDF, 0x4E, 0x00, 0x00, 0x00, "Tamron", "A032",
2820
0
       "SP 24-70mm F/2.8 Di VC USD G2"},
2821
0
      {0xCE, 0x47, 0x37, 0x5C, 0x25, 0x25, 0xDF, 0x0E, 0x00, 0x00, 0x00, "Tamron", "A032",
2822
0
       "SP 24-70mm F/2.8 Di VC USD G2"},
2823
0
      {0x45, 0x41, 0x37, 0x72, 0x2C, 0x3C, 0x48, 0x02, 0x00, 0x00, 0x00, "Tamron", "190D",
2824
0
       "SP AF 24-135mm F/3.5-5.6 AD Aspherical (IF) Macro"},
2825
      // M                                         "Tamron" "159D"   "AF 28-70mm F/3.5-4.5";
2826
      // M                                         "Tamron" "259D"   "AF 28-70mm F/3.5-4.5";
2827
0
      {0x33, 0x54, 0x3C, 0x5E, 0x24, 0x24, 0x62, 0x02, 0x00, 0x00, 0x00, "Tamron", "A09",
2828
0
       "SP AF 28-75mm F/2.8 XR Di LD Aspherical (IF) Macro"},
2829
0
      {0xFA, 0x54, 0x3C, 0x5E, 0x24, 0x24, 0x84, 0x06, 0x01, 0x00, 0x00, "Tamron", "A09NII",
2830
0
       "SP AF 28-75mm F/2.8 XR Di LD Aspherical (IF) Macro"},
2831
0
      {0xFA, 0x54, 0x3C, 0x5E, 0x24, 0x24, 0xDF, 0x06, 0x01, 0x00, 0x00, "Tamron", "A09NII",
2832
0
       "SP AF 28-75mm F/2.8 XR Di LD Aspherical (IF) Macro"},
2833
0
      {0x10, 0x3D, 0x3C, 0x60, 0x2C, 0x3C, 0xD2, 0x02, 0x00, 0x00, 0x00, "Tamron", "177D",
2834
0
       "AF 28-80mm F/3.5-5.6 Aspherical"},
2835
0
      {0x45, 0x3D, 0x3C, 0x60, 0x2C, 0x3C, 0x48, 0x02, 0x00, 0x00, 0x00, "Tamron", "177D",
2836
0
       "AF 28-80mm F/3.5-5.6 Aspherical"},
2837
0
      {0x00, 0x48, 0x3C, 0x6A, 0x24, 0x24, 0x00, 0x02, 0x00, 0x00, 0x00, "Tamron", "176D",
2838
0
       "SP AF 28-105mm F/2.8 LD Aspherical IF"},
2839
      // M                                         "Tamron" "276D"   "SP AF 28-105mm F/2.8 LD Aspherical IF";
2840
      // M                                         "Tamron" "179D"   "AF 28-105mm F4.0-5.6 IF";
2841
0
      {0x4D, 0x3E, 0x3C, 0x80, 0x2E, 0x3C, 0x62, 0x02, 0x00, 0x00, 0x00, "Tamron", "A03N",
2842
0
       "AF 28-200mm F/3.8-5.6 XR Aspherical (IF) Macro"},
2843
      // M                                         "Tamron" "471D"   "AF 28-200mm F/3.8-5.6 Aspherical IF Super2
2844
      // Silver";
2845
0
      {0x0B, 0x3E, 0x3D, 0x7F, 0x2F, 0x3D, 0x0E, 0x00, 0x00, 0x00, 0x00, "Tamron", "71D", "AF 28-200mm F/3.8-5.6"},
2846
0
      {0x0B, 0x3E, 0x3D, 0x7F, 0x2F, 0x3D, 0x0E, 0x02, 0x00, 0x00, 0x00, "Tamron", "171D", "AF 28-200mm F/3.8-5.6D"},
2847
0
      {0x12, 0x3D, 0x3C, 0x80, 0x2E, 0x3C, 0xDF, 0x02, 0x00, 0x00, 0x00, "Tamron", "271D",
2848
0
       "AF 28-200mm F/3.8-5.6 LD Aspherical (IF)"},
2849
0
      {0x4D, 0x41, 0x3C, 0x8E, 0x2B, 0x40, 0x62, 0x02, 0x00, 0x00, 0x00, "Tamron", "A061",
2850
0
       "AF 28-300mm F/3.5-6.3 XR Di LD Aspherical (IF)"},
2851
0
      {0x4D, 0x41, 0x3C, 0x8E, 0x2C, 0x40, 0x62, 0x02, 0x00, 0x00, 0x00, "Tamron", "185D",
2852
0
       "AF 28-300mm F/3.5-6.3 XR LD Aspherical (IF)"},
2853
      // M                                         "Tamron" "285D"   "AF 28-300mm F/3.8-6.3 LD Aspherical IF
2854
      // Silver";
2855
0
      {0xF9, 0x40, 0x3C, 0x8E, 0x2C, 0x40, 0x40, 0x0E, 0x01, 0x00, 0x00, "Tamron", "A20",
2856
0
       "AF 28-300mm F/3.5-6.3 XR Di VC LD Aspherical (IF) Macro"},
2857
      // M                                         "Tamron" "63D"    "AF 35-90mm F/4-5.6";
2858
      // M                                         "Tamron" "65D"    "SP AF 35-105mm F/2.8 Aspherical";
2859
      // M                                         "Tamron" ""       "AF 35-135mm F/3.5-4.5";
2860
0
      {0xC9, 0x3C, 0x44, 0x76, 0x25, 0x31, 0xDF, 0x4E, 0x00, 0x00, 0x00, "Tamron", "A043",
2861
0
       "35-150mm F/2.8-4 Di VC OSD"},
2862
0
      {0x00, 0x47, 0x53, 0x80, 0x30, 0x3C, 0x00, 0x06, 0x00, 0x00, 0x00, "Tamron", "A15",
2863
0
       "AF 55-200mm F/4-5.6 Di II LD"},
2864
0
      {0xF7, 0x53, 0x5C, 0x80, 0x24, 0x24, 0x84, 0x06, 0x01, 0x00, 0x00, "Tamron", "A001",
2865
0
       "SP AF 70-200mm F/2.8 Di LD (IF) Macro"},
2866
0
      {0xFE, 0x53, 0x5C, 0x80, 0x24, 0x24, 0x84, 0x06, 0x01, 0x00, 0x00, "Tamron", "A001",
2867
0
       "SP AF 70-200mm F/2.8 Di LD (IF) Macro"},
2868
0
      {0xF7, 0x53, 0x5C, 0x80, 0x24, 0x24, 0x40, 0x06, 0x01, 0x00, 0x00, "Tamron", "A001",
2869
0
       "SP AF 70-200mm F/2.8 Di LD (IF) Macro"},
2870
0
      {0xFE, 0x54, 0x5C, 0x80, 0x24, 0x24, 0xDF, 0x0E, 0x01, 0x00, 0x00, "Tamron", "A009",
2871
0
       "SP 70-200mm F/2.8 Di VC USD"},
2872
0
      {0xE2, 0x47, 0x5C, 0x80, 0x24, 0x24, 0xDF, 0x4E, 0x00, 0x00, 0x00, "Tamron", "A025",
2873
0
       "SP 70-200mm F/2.8 Di VC USD G2"},
2874
0
      {0xCD, 0x47, 0x5C, 0x82, 0x31, 0x31, 0xDF, 0x4E, 0x00, 0x00, 0x00, "Tamron", "A034", "70-210mm F/4 Di VC USD"},
2875
      // M                                         "Tamron" "67D"    "SP AF 70-210mm f/2.8 LD";
2876
      // M                                         "Tamron" ""       "AF 70-210mm F/3.5-4.5";
2877
      // M                                         "Tamron" "158D"   "AF 70-210mm F/4-5.6";
2878
      // M                                         "Tamron" "258D"   "AF 70-210mm F/4-5.6";
2879
      // M                                         "Tamron" "172D"   "AF 70-300mm F/4-5.6";
2880
      // M                                         "Tamron" "472D"   "AF 70-300mm F/4-5.6 LD";
2881
0
      {0x69, 0x48, 0x5C, 0x8E, 0x30, 0x3C, 0x6F, 0x02, 0x00, 0x00, 0x00, "Tamron", "572D/772D",
2882
0
       "AF 70-300mm F/4-5.6 LD Macro 1:2"},
2883
0
      {0x69, 0x47, 0x5C, 0x8E, 0x30, 0x3C, 0x00, 0x02, 0x00, 0x00, 0x00, "Tamron", "A17N",
2884
0
       "AF 70-300mm F/4-5.6 Di LD Macro 1:2"},
2885
0
      {0x00, 0x48, 0x5C, 0x8E, 0x30, 0x3C, 0x00, 0x06, 0x01, 0x00, 0x00, "Tamron", "A17NII",
2886
0
       "AF 70-300mm F/4-5.6 Di LD Macro 1:2"},
2887
0
      {0xF1, 0x47, 0x5C, 0x8E, 0x30, 0x3C, 0xDF, 0x0E, 0x00, 0x00, 0x00, "Tamron", "A005",
2888
0
       "SP 70-300mm F4-5.6 Di VC USD"},
2889
      // M                                         "Tamron" "872D"   "AF 75-300mm F/4-5.6 LD";
2890
      // M                                         "Tamron" "278D"   "AF 80-210mm F/4.5-5.6";
2891
      // M                                         "Tamron" "62D"    "AF 90-300mm F/4.5-5.6";
2892
      // M                                         "Tamron" "186D"   "AF 100-300mm F/5-6.3";
2893
0
      {0xEB, 0x40, 0x76, 0xA6, 0x38, 0x40, 0xDF, 0x0E, 0x00, 0x00, 0x00, "Tamron", "A011",
2894
0
       "SP AF 150-600mm F/5-6.3 VC USD"},
2895
0
      {0xE3, 0x40, 0x76, 0xA6, 0x38, 0x40, 0xDF, 0x4E, 0x00, 0x00, 0x00, "Tamron", "A022",
2896
0
       "SP AF 150-600mm F/5-6.3 Di VC USD G2"},
2897
0
      {0x20, 0x3C, 0x80, 0x98, 0x3D, 0x3D, 0x1E, 0x02, 0x00, 0x00, 0x00, "Tamron", "75D", "AF 200-400mm F/5.6 LD IF"},
2898
0
      {0x00, 0x3E, 0x80, 0xA0, 0x38, 0x3F, 0x00, 0x02, 0x00, 0x00, 0x00, "Tamron", "A08",
2899
0
       "SP AF 200-500mm F/5-6.3 Di LD (IF)"},
2900
0
      {0x00, 0x3F, 0x80, 0xA0, 0x38, 0x3F, 0x00, 0x02, 0x00, 0x00, 0x00, "Tamron", "A08", "SP AF 200-500mm F/5-6.3 Di"},
2901
      //
2902
      //------------------------------------------------------------------------------
2903
      // Tokina Lenses by focal length, first fixed then zoom lenses
2904
      //------------------------------------------------------------------------------
2905
      //
2906
0
      {0x00, 0x40, 0x2B, 0x2B, 0x2C, 0x2C, 0x00, 0x02, 0x00, 0x00, 0x00, "Tokina", "",
2907
0
       "AT-X 17 AF PRO (AF 17mm f/3.5)"},
2908
0
      {0x00, 0x47, 0x44, 0x44, 0x24, 0x24, 0x00, 0x06, 0x40, 0x00, 0x00, "Tokina", "T303503",
2909
0
       "AT-X M35 PRO DX (AF 35mm f/2.8 Macro)"},
2910
0
      {0x00, 0x54, 0x68, 0x68, 0x24, 0x24, 0x00, 0x02, 0x40, 0x00, 0x00, "Tokina", "T310003N",
2911
0
       "AT-X M100 AF PRO D (AF 100mm f/2.8 Macro)"},
2912
0
      {0x27, 0x48, 0x8E, 0x8E, 0x30, 0x30, 0x1D, 0x02, 0x00, 0x00, 0x00, "Tokina", "", "AT-X 304 AF (AF 300mm f/4)"},
2913
0
      {0x00, 0x54, 0x8E, 0x8E, 0x24, 0x24, 0x00, 0x02, 0x00, 0x00, 0x00, "Tokina", "",
2914
0
       "AT-X 300 AF PRO (AF 300mm f/2.8)"},
2915
0
      {0x12, 0x3B, 0x98, 0x98, 0x3D, 0x3D, 0x09, 0x00, 0x00, 0x00, 0x00, "Tokina", "",
2916
0
       "AT-X 400 AF SD (AF 400mm f/5.6)"},
2917
      //
2918
0
      {0x00, 0x40, 0x18, 0x2B, 0x2C, 0x34, 0x00, 0x06, 0x00, 0x00, 0x00, "Tokina", "T4101703",
2919
0
       "AT-X 107 AF DX Fisheye (AF 10-17mm f/3.5-4.5)"},
2920
0
      {0x00, 0x48, 0x1C, 0x29, 0x24, 0x24, 0x00, 0x06, 0x00, 0x00, 0x00, "Tokina", "T4111603",
2921
0
       "AT-X 116 PRO DX (AF 11-16mm f/2.8)"},
2922
0
      {0x7A, 0x48, 0x1C, 0x29, 0x24, 0x24, 0x7E, 0x06, 0x00, 0x00, 0x00, "Tokina", "",
2923
0
       "AT-X 116 PRO DX II (AF 11-16mm f/2.8)"},
2924
0
      {0x7A, 0x48, 0x1C, 0x30, 0x24, 0x24, 0x7E, 0x06, 0x00, 0x00, 0x00, "Tokina", "",
2925
0
       "AT-X 11-20 F2.8 PRO DX (AF 11-20mm f/2.8)"},
2926
0
      {0x8B, 0x48, 0x1C, 0x30, 0x24, 0x24, 0x85, 0x06, 0x00, 0x00, 0x00, "Tokina", "", "ATX-i 11-20mm F2.8 CF"},
2927
0
      {0x00, 0x3C, 0x1F, 0x37, 0x30, 0x30, 0x00, 0x06, 0x00, 0x00, 0x00, "Tokina", "T4122403",
2928
0
       "AT-X 124 AF PRO DX (AF 12-24mm f/4)"},
2929
0
      {0x7A, 0x3C, 0x1F, 0x37, 0x30, 0x30, 0x7E, 0x06, 0x01, 0x02, 0x00, "Tokina", "T4122423",
2930
0
       "AT-X 124 AF PRO DX II (AF 12-24mm f/4)"},
2931
0
      {0x7A, 0x3C, 0x1F, 0x3C, 0x30, 0x30, 0x7E, 0x06, 0x00, 0x00, 0x00, "Tokina", "",
2932
0
       "AT-X 12-28 PRO DX (AF 12-28mm f/4)"},
2933
0
      {0x94, 0x54, 0x24, 0x30, 0x18, 0x18, 0x4a, 0x06, 0x00, 0x00, 0x00, "Tokina", "",
2934
0
       "AT-X 14-20 F2 PRO DX (AF 14-20mm f/2)"},
2935
0
      {0x00, 0x48, 0x29, 0x3C, 0x24, 0x24, 0x00, 0x06, 0x00, 0x00, 0x00, "Tokina", "",
2936
0
       "AT-X 16-28 AF PRO FX (AF 16-28mm f/2.8)"},
2937
0
      {0x00, 0x48, 0x29, 0x50, 0x24, 0x24, 0x00, 0x06, 0x00, 0x00, 0x00, "Tokina", "",
2938
0
       "AT-X 165 PRO DX (AF 16-50mm f/2.8)"},
2939
0
      {0x00, 0x40, 0x2A, 0x72, 0x2C, 0x3C, 0x00, 0x06, 0x00, 0x00, 0x00, "Tokina", "",
2940
0
       "AT-X 16.5-135 DX (AF 16.5-135mm f/3.5-5.6)"},
2941
0
      {0x00, 0x3C, 0x2B, 0x44, 0x30, 0x30, 0x00, 0x06, 0x00, 0x00, 0x00, "Tokina", "",
2942
0
       "AT-X 17-35 F4 PRO FX (AF 17-35mm f/4)"},
2943
0
      {0x2F, 0x40, 0x30, 0x44, 0x2C, 0x34, 0x29, 0x02, 0x00, 0x02, 0x00, "Tokina", "", "AF 193 (AF 19-35mm f/3.5-4.5)"},
2944
0
      {0x2F, 0x48, 0x30, 0x44, 0x24, 0x24, 0x29, 0x02, 0x00, 0x02, 0x00, "Tokina", "",
2945
0
       "AT-X 235 AF PRO (AF 20-35mm f/2.8)"},
2946
      // M                                         "Tokina" ""          "AF 235 (AF 20-35mm f/3.5-4.5)"
2947
0
      {0x2F, 0x40, 0x30, 0x44, 0x2C, 0x34, 0x29, 0x02, 0x00, 0x01, 0x00, "Tokina", "",
2948
0
       "AF 235 II (AF 20-35mm f/3.5-4.5)"},
2949
      // M                                         "Tokina" ""          "AT-X 240 AF (AF 24-40mm f/2.8)"
2950
0
      {0x00, 0x48, 0x37, 0x5C, 0x24, 0x24, 0x00, 0x06, 0x00, 0x00, 0x00, "Tokina", "",
2951
0
       "AT-X 24-70MM F2.8 PRO FX (AF 24-70mm f/2.8)"},
2952
0
      {0x00, 0x40, 0x37, 0x80, 0x2C, 0x3C, 0x00, 0x02, 0x00, 0x00, 0x00, "Tokina", "",
2953
0
       "AT-X 242 AF (AF 24-200mm f/3.5-5.6)"},
2954
0
      {0x25, 0x48, 0x3C, 0x5C, 0x24, 0x24, 0x1B, 0x02, 0x00, 0x02, 0x00, "Tokina", "",
2955
0
       "AT-X 270 AF PRO II (AF 28-70mm f/2.6-2.8)"},
2956
0
      {0x25, 0x48, 0x3C, 0x5C, 0x24, 0x24, 0x1B, 0x02, 0x00, 0x01, 0x00, "Tokina", "",
2957
0
       "AT-X 287 AF PRO SV (AF 28-70mm f/2.8)"},
2958
0
      {0x07, 0x48, 0x3C, 0x5C, 0x24, 0x24, 0x03, 0x00, 0x00, 0x00, 0x00, "Tokina", "",
2959
0
       "AT-X 287 AF (AF 28-70mm f/2.8)"},
2960
0
      {0x07, 0x47, 0x3C, 0x5C, 0x25, 0x35, 0x03, 0x00, 0x00, 0x00, 0x00, "Tokina", "",
2961
0
       "AF 287 SD (AF 28-70mm f/2.8-4.5)"},
2962
0
      {0x07, 0x40, 0x3C, 0x5C, 0x2C, 0x35, 0x03, 0x00, 0x00, 0x00, 0x00, "Tokina", "",
2963
0
       "AF 270 II (AF 28-70mm f/3.5-4.5)"},
2964
0
      {0x00, 0x48, 0x3C, 0x60, 0x24, 0x24, 0x00, 0x02, 0x00, 0x00, 0x00, "Tokina", "",
2965
0
       "AT-X 280 AF PRO (AF 28-80mm f/2.8)"},
2966
      // M                                         "Tokina" ""          "AF 280 II EMZ (AF 28-80mm f/3.5-5.6)"
2967
      // M                                         "Tokina" ""          "AF 205 (AF 28-105mm f/3.5-4.5)"
2968
      // M                                         "Tokina" ""          "AF 282 (AF 28-200mm 3.5-5.6)"
2969
      // M                                         "Tokina" ""          "AF 282 EMZ II (AF 28-210mm f/4.2-6.5)"
2970
      // M                                         "Tokina" ""          "AF 370 (AF 35-70mm f/3.5-4.6)"
2971
      // M                                         "Tokina" ""          "AF 370 II (AF 35-70mm f/3.5-4.6)"
2972
0
      {0x25, 0x44, 0x44, 0x8E, 0x34, 0x42, 0x1B, 0x02, 0x00, 0x00, 0x00, "Tokina", "",
2973
0
       "AF 353 (AF 35-300mm f/4.5-6.7)"},
2974
0
      {0x00, 0x48, 0x50, 0x72, 0x24, 0x24, 0x00, 0x06, 0x00, 0x00, 0x00, "Tokina", "",
2975
0
       "AT-X 535 PRO DX (AF 50-135mm f/2.8)"},
2976
0
      {0x00, 0x3C, 0x5C, 0x80, 0x30, 0x30, 0x00, 0x0E, 0x00, 0x00, 0x00, "Tokina", "",
2977
0
       "AT-X 70-200 F4 FX VCM-S (AF 70-200mm f/4)"},
2978
0
      {0x00, 0x48, 0x5C, 0x80, 0x30, 0x30, 0x00, 0x0E, 0x00, 0x00, 0x00, "Tokina", "",
2979
0
       "AT-X 70-200 F4 FX VCM-S (AF 70-200mm f/4)"},
2980
      // M                                         "Tokina" ""          "AF 745 (AF 70-210mm f/4.5)"
2981
      // M                                         "Tokina" ""          "AF 210 (AF 70-210mm f/4.0-5.6)"
2982
      // M                                         "Tokina" ""          "AF 210 II SD (AF 70-210mm f/4.0-5.6)"
2983
0
      {0x12, 0x44, 0x5E, 0x8E, 0x34, 0x3C, 0x09, 0x00, 0x00, 0x00, 0x00, "Tokina", "",
2984
0
       "AF 730 (AF 75-300mm f/4.5-5.6)"},
2985
      // M                                         "Tokina" ""          "AF 730 II (AF 75-300mm f/4.5-5.6)"
2986
0
      {0x14, 0x54, 0x60, 0x80, 0x24, 0x24, 0x0B, 0x00, 0x00, 0x00, 0x00, "Tokina", "",
2987
0
       "AT-X 828 AF (AF 80-200mm f/2.8)"},
2988
0
      {0x24, 0x54, 0x60, 0x80, 0x24, 0x24, 0x1A, 0x02, 0x00, 0x00, 0x00, "Tokina", "",
2989
0
       "AT-X 828 AF PRO (AF 80-200mm f/2.8)"},
2990
      // M                                         "Tokina" ""          "AT-X 840 AF (AF 80-400mm f/4.5-5.6)"
2991
0
      {0x24, 0x44, 0x60, 0x98, 0x34, 0x3C, 0x1A, 0x02, 0x00, 0x00, 0x00, "Tokina", "",
2992
0
       "AT-X 840 AF-II (AF 80-400mm f/4.5-5.6)"},
2993
0
      {0x00, 0x44, 0x60, 0x98, 0x34, 0x3C, 0x00, 0x02, 0x00, 0x00, 0x00, "Tokina", "",
2994
0
       "AT-X 840 D (AF 80-400mm f/4.5-5.6)"},
2995
0
      {0x14, 0x48, 0x68, 0x8E, 0x30, 0x30, 0x0B, 0x00, 0x00, 0x00, 0x00, "Tokina", "",
2996
0
       "AT-X 340 AF (AF 100-300mm f/4)"},
2997
      // M                                         "Tokina" ""          "AT-X 340 AF-II (AF 100-300mm f/4)"
2998
      // M                                         "Tokina" ""          "AF 130 EMZ II (AF 100-300mm f/5.6-6.7)"
2999
      // M                                         "Tokina" ""          "AF 140 EMZ (AF 100-400mm f/4.5-6.3)"
3000
      //
3001
      //------------------------------------------------------------------------------
3002
      // Lenses from various other brands
3003
      //------------------------------------------------------------------------------
3004
      //
3005
0
      {0x06, 0x3F, 0x68, 0x68, 0x2C, 0x2C, 0x06, 0x00, 0x00, 0x00, 0x00, "Cosina", "", "AF 100mm F3.5 Macro"},
3006
0
      {0x07, 0x36, 0x3D, 0x5F, 0x2C, 0x3C, 0x03, 0x00, 0x00, 0x00, 0x00, "Cosina", "",
3007
0
       "AF Zoom 28-80mm F3.5-5.6 MC Macro"},
3008
0
      {0x07, 0x46, 0x3D, 0x6A, 0x25, 0x2F, 0x03, 0x00, 0x00, 0x00, 0x00, "Cosina", "", "AF Zoom 28-105mm F2.8-3.8 MC"},
3009
      // M                                         "Cosina" "" "AF Zoom 28-210mm F3.5-5.6";
3010
      // M                                         "Cosina" "" "AF Zoom 28-210mm F4.2-6.5 Aspherical IF";
3011
      // M                                         "Cosina" "" "AF Zoom 28-300mm F4.0-6.3";
3012
      // M                                         "Cosina" "" "AF Zoom 70-210mm F2.8-4.0";
3013
0
      {0x12, 0x36, 0x5C, 0x81, 0x35, 0x3D, 0x09, 0x00, 0x00, 0x00, 0x00, "Cosina", "",
3014
0
       "AF Zoom 70-210mm F4.5-5.6 MC Macro"},
3015
0
      {0x12, 0x39, 0x5C, 0x8E, 0x34, 0x3D, 0x08, 0x02, 0x00, 0x00, 0x00, "Cosina", "",
3016
0
       "AF Zoom 70-300mm F4.5-5.6 MC Macro"},
3017
0
      {0x12, 0x3B, 0x68, 0x8D, 0x3D, 0x43, 0x09, 0x02, 0x00, 0x00, 0x00, "Cosina", "",
3018
0
       "AF Zoom 100-300mm F5.6-6.7 MC Macro"},
3019
      // M                                         "Cosina" "" "AF Zoom 100-400mm F5.6-6.7 MC";
3020
      //
3021
0
      {0x12, 0x38, 0x69, 0x97, 0x35, 0x42, 0x09, 0x02, 0x00, 0x00, 0x00, "Promaster", "",
3022
0
       "Spectrum 7 100-400mm 1:4.5-6.7"},
3023
      //
3024
0
      {0x00, 0x40, 0x31, 0x31, 0x2C, 0x2C, 0x00, 0x00, 0x00, 0x00, 0x00, "Voigtlander", "BA295AN",
3025
0
       "Color Skopar 20mm F3.5 SLII Aspherical"},
3026
0
      {0x00, 0x48, 0x3C, 0x3C, 0x24, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, "Voigtlander", "",
3027
0
       "Color Skopar 28mm F2.8 SL II"},
3028
0
      {0x00, 0x54, 0x48, 0x48, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, "Voigtlander", "BA229DN",
3029
0
       "Ultron 40mm F2 SLII Aspherical"},
3030
0
      {0x00, 0x54, 0x55, 0x55, 0x0C, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, "Voigtlander", "BA239BN",
3031
0
       "Nokton 58mm F1.4 SLII"},
3032
0
      {0x00, 0x40, 0x64, 0x64, 0x2C, 0x2C, 0x00, 0x00, 0x00, 0x00, 0x00, "Voigtlander", "",
3033
0
       "APO-Lanthar 90mm F3.5 SLII Close Focus"},
3034
      //
3035
0
      {0x00, 0x40, 0x2D, 0x2D, 0x2C, 0x2C, 0x00, 0x00, 0x00, 0x00, 0x00, "Carl Zeiss", "", "Distagon T* 3,5/18 ZF.2"},
3036
0
      {0x00, 0x48, 0x32, 0x32, 0x24, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, "Carl Zeiss", "", "Distagon T* 2,8/21 ZF.2"},
3037
0
      {0x00, 0x54, 0x38, 0x38, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, "Carl Zeiss", "", "Distagon T* 2/25 ZF.2"},
3038
0
      {0x00, 0x54, 0x3C, 0x3C, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, "Carl Zeiss", "", "Distagon T* 2/28 ZF.2"},
3039
0
      {0x00, 0x54, 0x44, 0x44, 0x0C, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, "Carl Zeiss", "", "Distagon T* 1.4/35 ZF.2"},
3040
0
      {0x00, 0x54, 0x44, 0x44, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, "Carl Zeiss", "", "Distagon T* 2/35 ZF.2"},
3041
0
      {0x00, 0x54, 0x50, 0x50, 0x0C, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, "Carl Zeiss", "", "Planar T* 1,4/50 ZF.2"},
3042
0
      {0x00, 0x54, 0x50, 0x50, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, "Carl Zeiss", "", "Makro-Planar T* 2/50 ZF.2"},
3043
0
      {0x00, 0x54, 0x62, 0x62, 0x0C, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, "Carl Zeiss", "", "Planar T* 1,4/85 ZF.2"},
3044
0
      {0x00, 0x54, 0x68, 0x68, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, "Carl Zeiss", "",
3045
0
       "Makro-Planar T* 2/100 ZF.2"},
3046
0
      {0x00, 0x54, 0x72, 0x72, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, "Carl Zeiss", "", "Apo Sonnar T* 2/135 ZF.2"},
3047
0
      {0x02, 0x54, 0x3C, 0x3C, 0x0C, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, "Zeiss", "", "Otus 1.4/28"},
3048
0
      {0x00, 0x54, 0x53, 0x53, 0x0C, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, "Zeiss", "", "Otus 1.4/55"},
3049
0
      {0x01, 0x54, 0x62, 0x62, 0x0C, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, "Zeiss", "", "Otus 1.4/85"},
3050
0
      {0x03, 0x54, 0x68, 0x68, 0x0C, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, "Zeiss", "", "Otus 1.4/100"},
3051
      //                    " "00" "00" "00" "00" "Zeiss" "" "Milvus 2.8/15"
3052
      //                    " "00" "00" "00" "00" "Zeiss" "" "Milvus 2.8/18"
3053
      //                    " "00" "00" "00" "00" "Zeiss" "" "Milvus 2.8/21"
3054
      //                    " "00" "00" "00" "00" "Zeiss" "" "Milvus 1.4/25"
3055
0
      {0x52, 0x54, 0x44, 0x44, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, "Zeiss", "", "Milvus 2/35"},
3056
0
      {0x53, 0x54, 0x50, 0x50, 0x0C, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, "Zeiss", "", "Milvus 1.4/50"},
3057
0
      {0x54, 0x54, 0x50, 0x50, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, "Zeiss", "", "Milvus 2/50M"},
3058
0
      {0x55, 0x54, 0x62, 0x62, 0x0C, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, "Zeiss", "", "Milvus 1.4/85"},
3059
0
      {0x56, 0x54, 0x68, 0x68, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, "Zeiss", "", "Milvus 2/100M"},
3060
      //                    " "00" "00" "00" "00" "Zeiss" "" "Milvus 2/135"
3061
      //
3062
0
      {0x00, 0x54, 0x56, 0x56, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, "Coastal Optical Systems", "",
3063
0
       "60mm 1:4 UV-VIS-IR Macro Apo"},
3064
      //
3065
0
      {0xBF, 0x4E, 0x26, 0x26, 0x1E, 0x1E, 0x01, 0x04, 0x00, 0x00, 0x00, "Irix", "", "15mm f/2.4 Firefly"},
3066
0
      {0xBF, 0x3C, 0x1B, 0x1B, 0x30, 0x30, 0x01, 0x04, 0x00, 0x00, 0x00, "Irix", "", "11mm f/4.0 Blackstone/Firefly"},
3067
      //
3068
0
      {0x4A, 0x40, 0x11, 0x11, 0x2C, 0x0C, 0x4D, 0x02, 0x00, 0x00, 0x00, "Samyang", "", "8mm f/3.5 Fish-Eye CS"},
3069
0
      {0x4A, 0x48, 0x24, 0x24, 0x24, 0x0C, 0x4D, 0x02, 0x00, 0x02, 0x00, "Samyang", "", "10mm f/2.8 ED AS NCS CS"},
3070
0
      {0x4A, 0x48, 0x1E, 0x1E, 0x24, 0x0C, 0x4D, 0x02, 0x00, 0x00, 0x00, "Samyang", "",
3071
0
       "12mm f/2.8 ED AS NCS Fish-eye"},
3072
0
      {0x4A, 0x4C, 0x24, 0x24, 0x1E, 0x6C, 0x4D, 0x06, 0x00, 0x00, 0x00, "Samyang", "", "14mm f/2.4 Premium"},
3073
0
      {0x4A, 0x48, 0x24, 0x24, 0x24, 0x0C, 0x4D, 0x02, 0x00, 0x01, 0x00, "Samyang", "", "AE 14mm f/2.8 ED AS IF UMC"},
3074
0
      {0x4A, 0x54, 0x29, 0x29, 0x18, 0x0C, 0x4D, 0x02, 0x00, 0x00, 0x00, "Samyang", "", "16mm F2.0 ED AS UMC CS"},
3075
0
      {0x4A, 0x60, 0x36, 0x36, 0x0C, 0x0C, 0x4D, 0x02, 0x00, 0x00, 0x00, "Samyang", "", "24mm f/1.4 ED AS UMC"},
3076
0
      {0x4A, 0x60, 0x44, 0x44, 0x0C, 0x0C, 0x4D, 0x02, 0x00, 0x00, 0x00, "Samyang", "", "35mm f/1.4 AS UMC"},
3077
0
      {0x4A, 0x60, 0x62, 0x62, 0x0C, 0x0C, 0x4D, 0x02, 0x00, 0x00, 0x00, "Samyang", "", "AE 85mm f/1.4 AS IF UMC"},
3078
      //
3079
0
      {0x9F, 0x48, 0x23, 0x23, 0x24, 0x24, 0xA1, 0x06, 0x00, 0x00, 0x00, "Yongnuo", "", "YN14mm F2.8N"},
3080
0
      {0x9F, 0x4C, 0x44, 0x44, 0x18, 0x18, 0xA1, 0x06, 0x00, 0x00, 0x00, "Yongnuo", "", "YN35mm F2N"},
3081
0
      {0x9F, 0x48, 0x48, 0x48, 0x24, 0x24, 0xA1, 0x06, 0x00, 0x00, 0x00, "Yongnuo", "", "YN40mm F2.8N"},
3082
0
      {0x9A, 0x4C, 0x50, 0x50, 0x14, 0x14, 0x9C, 0x06, 0x00, 0x00, 0x00, "Yongnuo", "", "YN50mm F1.8N"},
3083
0
      {0x9F, 0x4D, 0x50, 0x50, 0x14, 0x14, 0xA0, 0x06, 0x00, 0x00, 0x00, "Yongnuo", "", "YN50mm F1.8N"},
3084
0
      {0x9F, 0x54, 0x68, 0x68, 0x18, 0x18, 0xA2, 0x06, 0x00, 0x00, 0x00, "Yongnuo", "", "YN100mm F2N"},
3085
      //
3086
0
      {0x02, 0x40, 0x44, 0x5C, 0x2C, 0x34, 0x02, 0x00, 0x00, 0x00, 0x00, "Exakta", "", "AF 35-70mm 1:3.5-4.5 MC"},
3087
0
      {0x07, 0x3E, 0x30, 0x43, 0x2D, 0x35, 0x03, 0x00, 0x00, 0x00, 0x00, "Soligor", "", "AF Zoom 19-35mm 1:3.5-4.5 MC"},
3088
0
      {0x03, 0x43, 0x5C, 0x81, 0x35, 0x35, 0x02, 0x00, 0x00, 0x00, 0x00, "Soligor", "",
3089
0
       "AF C/D Zoom UMCS 70-210mm 1:4.5"},
3090
0
      {0x12, 0x4A, 0x5C, 0x81, 0x31, 0x3D, 0x09, 0x00, 0x00, 0x00, 0x00, "Soligor", "",
3091
0
       "AF C/D Auto Zoom+Macro 70-210mm 1:4-5.6 UMCS"},
3092
0
      {0x12, 0x36, 0x69, 0x97, 0x35, 0x42, 0x09, 0x00, 0x00, 0x00, 0x00, "Soligor", "",
3093
0
       "AF Zoom 100-400mm 1:4.5-6.7 MC"},
3094
      //
3095
0
      {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, "Manual Lens", "", "No CPU"},
3096
0
      {0x00, 0x00, 0x48, 0x48, 0x53, 0x53, 0x00, 0x01, 0x00, 0x00, 0x00, "Loreo", "",
3097
0
       "40mm F11-22 3D Lens in a Cap 9005"},
3098
      //
3099
      //------------------------------------------------------------------------------
3100
      //
3101
      // Lenses, that were upgraded with custom CPU
3102
      //
3103
0
      {0x00, 0x47, 0x10, 0x10, 0x24, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, "Nikon", "JAA604AC",
3104
0
       "Fisheye Nikkor 8mm f/2.8 AiS"},
3105
0
      {0x00, 0x47, 0x3C, 0x3C, 0x24, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, "Nikon", "", "Nikkor 28mm f/2.8 AiS"},
3106
      //"00 54 44 44 0C 0C 00" "00" "00" "00" "00" "Nikon"   "JAA115AD" "Nikkor 35mm f/1.4 AiS" double ID with
3107
      // Zeiss
3108
0
      {0x00, 0x57, 0x50, 0x50, 0x14, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, "Nikon", "", "Nikkor 50mm f/1.8 AI"},
3109
0
      {0x00, 0x48, 0x50, 0x50, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, "Nikon", "", "Nikkor H 50mm f/2"},
3110
0
      {0x00, 0x48, 0x68, 0x68, 0x24, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, "Nikon", "JAA304AA", "Series E 100mm f/2.8"},
3111
0
      {0x00, 0x4C, 0x6A, 0x6A, 0x20, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, "Nikon", "JAA305AA", "Nikkor 105mm f/2.5 AiS"},
3112
0
      {0x00, 0x48, 0x80, 0x80, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, "Nikon", "JAA313AA", "Nikkor 200mm f/4 AiS"},
3113
0
      {0x00, 0x40, 0x11, 0x11, 0x2C, 0x2C, 0x00, 0x00, 0x00, 0x00, 0x00, "Samyang", "", "8mm f/3.5 Fish-Eye"},
3114
0
      {0x00, 0x58, 0x64, 0x64, 0x20, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, "Soligor", "", "C/D Macro MC 90mm f/2.5"},
3115
      // https://github.com/Exiv2/exiv2/issues/743
3116
0
      {0xc9, 0x48, 0x37, 0x5c, 0x24, 0x24, 0x4b, 0x4e, 0x01, 0x00, 0x00, "Sigma", "", "24-70mm F2.8 DG OS HSM Art"},
3117
      //  https://github.com/Exiv2/exiv2/issues/598 , https://github.com/Exiv2/exiv2/pull/891
3118
0
      {0xCF, 0x47, 0x5C, 0x8E, 0x31, 0x3D, 0xDF, 0x0E, 0x00, 0x00, 0x00, "Tamron", "A030",
3119
0
       "SP 70-300mm F/4-5.6 Di VC USD"},
3120
      //
3121
0
      {0xf4, 0x4c, 0x7c, 0x7c, 0x2c, 0x2c, 0x4b, 0x02, 0x00, 0x00, 0x00, "Sigma", "", "APO Macro 180mm F3.5 EX DG HSM"},
3122
      // https://github.com/Exiv2/exiv2/issues/1078
3123
0
      {0x80, 0x48, 0x1C, 0x29, 0x24, 0x24, 0x7A, 0x06, 0x00, 0x00, 0x00, "Tokina", "", "atx-i 11-16mm F2.8 CF"},
3124
      // https://github.com/Exiv2/exiv2/issues/1069
3125
0
      {0xc8, 0x54, 0x44, 0x44, 0x0d, 0x0d, 0xdf, 0x46, 0x00, 0x00, 0x00, "Tamron", "F045", "SP 35mm f/1.4 Di USD"},
3126
      // https://github.com/Exiv2/exiv2/pull/1105
3127
0
      {0xCB, 0x3C, 0x2B, 0x44, 0x24, 0x31, 0xDF, 0x46, 0x00, 0x00, 0x00, "Tamron", "A037", "17-35mm F/2.8-4 Di OSD"},
3128
      // https://github.com/Exiv2/exiv2/issues/1208
3129
0
      {0xC8, 0x54, 0x62, 0x62, 0x0C, 0x0C, 0x4B, 0x46, 0x00, 0x00, 0x00, "Sigma", "321550", "85mm F1.4 DG HSM | A"},
3130
0
  };
3131
//------------------------------------------------------------------------------
3132
0
#endif
3133
  // 8< - - - 8< do not remove this line >8 - - - >8
3134
3135
  /* if no meta obj is provided, try to use the value param that *may*
3136
   * be the pre-parsed lensid
3137
   */
3138
0
  if (!metadata) {
3139
0
    const auto vid = static_cast<unsigned char>(value.toInt64(0));
3140
3141
    /* the 'FMntLens' name is added to the anonymous struct for
3142
     * fmountlens[]
3143
     *
3144
     * remember to name the struct when importing/updating the lens info
3145
     * from:
3146
     *
3147
     * www.rottmerhusen.com/objektives/lensid/files/c-header/fmountlens4.h
3148
     */
3149
0
    if (auto pf = Exiv2::find(fmountlens, vid))
3150
0
      return os << pf->manuf << " " << pf->lensname;
3151
0
    return os << "(" << value << ")";
3152
0
  }
3153
3154
0
  byte raw[] = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0};
3155
3156
0
  static constexpr auto tags = std::array{
3157
0
      "LensIDNumber",          "LensFStops", "MinFocalLength", "MaxFocalLength", "MaxApertureAtMinFocal",
3158
0
      "MaxApertureAtMaxFocal", "MCUVersion",
3159
0
  };
3160
3161
0
  const std::string pre = std::string("Exif.") + group + std::string(".");
3162
0
  for (unsigned int i = 0; i < 7; ++i) {
3163
0
    ExifKey key(pre + std::string(tags[i]));
3164
0
    auto md = metadata->findKey(key);
3165
0
    if (md == metadata->end() || md->typeId() != unsignedByte || md->count() == 0) {
3166
0
      return os << "(" << value << ")";
3167
0
    }
3168
0
    raw[i] = static_cast<byte>(md->toInt64());
3169
0
  }
3170
3171
0
  auto md = metadata->findKey(ExifKey("Exif.Nikon3.LensType"));
3172
0
  if (md == metadata->end() || md->typeId() != unsignedByte || md->count() == 0) {
3173
0
    return os << "(" << value << ")";
3174
0
  }
3175
0
  raw[7] = static_cast<byte>(md->toInt64());
3176
3177
0
  for (const auto& f : fmountlens) {
3178
0
    if (raw[0] == f.lid) {
3179
      // #1034
3180
0
      const std::string undefined("undefined");
3181
0
      const std::string section("nikon");
3182
0
      auto lensIDStream = std::to_string(raw[7]);
3183
0
      if (Internal::readExiv2Config(section, lensIDStream, undefined) != undefined) {
3184
0
        return os << Internal::readExiv2Config(section, lensIDStream, undefined);
3185
0
      }
3186
0
    }
3187
3188
0
    if (raw[0] == f.lid
3189
        // stps varies with focal length for some Sigma zoom lenses.
3190
0
        && (raw[1] == f.stps || f.manuf == "Sigma") && raw[2] == f.focs && raw[3] == f.focl && raw[4] == f.aps &&
3191
0
        raw[5] == f.apl && raw[6] == f.lfw && raw[7] == f.ltype) {
3192
      // Lens found in database
3193
0
      return os << f.manuf << " " << f.lensname;
3194
0
    }
3195
0
  }
3196
  // Lens not found in database
3197
0
  return os << "(" << value << ")";
3198
#else
3199
  return os << "(" << value << ")";
3200
#endif  // EXV_HAVE_LENSDATA
3201
0
}
3202
3203
0
std::ostream& Nikon3MakerNote::printFocusDistance(std::ostream& os, const Value& value, const ExifData*) {
3204
0
  if (value.count() != 1 || value.typeId() != unsignedByte)
3205
0
    return os << "(" << value << ")";
3206
0
  auto val = value.toInt64();
3207
0
  if (val == 0)
3208
0
    return os << _("n/a");
3209
3210
0
  return os << stringFormat("{:.2f} m", std::pow(10.0, (val / 40.0) - 2.0));
3211
0
}
3212
3213
0
std::ostream& Nikon3MakerNote::printAperture(std::ostream& os, const Value& value, const ExifData*) {
3214
0
  if (value.count() != 1 || value.typeId() != unsignedByte)
3215
0
    return os << "(" << value << ")";
3216
3217
0
  auto val = value.toInt64();
3218
0
  if (val == 0)
3219
0
    return os << _("n/a");
3220
3221
0
  return os << stringFormat("F{:.1f}", std::exp2(val / 24.0));
3222
0
}
3223
3224
0
std::ostream& Nikon3MakerNote::printFocal(std::ostream& os, const Value& value, const ExifData*) {
3225
0
  if (value.count() != 1 || value.typeId() != unsignedByte) {
3226
0
    return os << "(" << value << ")";
3227
0
  }
3228
0
  auto val = value.toInt64();
3229
0
  if (val == 0)
3230
0
    return os << _("n/a");
3231
3232
0
  return os << stringFormat("{:.1f} mm", 5.0 * std::exp2(val / 24.0));
3233
0
}
3234
3235
0
std::ostream& Nikon3MakerNote::printFStops(std::ostream& os, const Value& value, const ExifData*) {
3236
0
  if (value.count() != 1 || value.typeId() != unsignedByte)
3237
0
    return os << "(" << value << ")";
3238
0
  return os << stringFormat("F{:.1f}", value.toInt64() / 12.0);
3239
0
}
3240
3241
0
std::ostream& Nikon3MakerNote::printExitPupilPosition(std::ostream& os, const Value& value, const ExifData*) {
3242
0
  if (value.count() != 1 || value.typeId() != unsignedByte || value.toInt64() == 0)
3243
0
    return os << "(" << value << ")";
3244
0
  return os << stringFormat("{:.1f} mm", 2048.0 / value.toInt64());
3245
0
}
3246
3247
0
std::ostream& Nikon3MakerNote::printFlashFocalLength(std::ostream& os, const Value& value, const ExifData*) {
3248
0
  if (value.count() != 1 || value.typeId() != unsignedByte)
3249
0
    return os << "(" << value << ")";
3250
3251
0
  auto temp = value.toInt64();
3252
0
  if (temp == 0 || temp == 255)
3253
0
    return os << _("n/a");
3254
0
  return os << stringFormat("{:1} mm", temp);
3255
0
}
3256
3257
0
std::ostream& Nikon3MakerNote::printRepeatingFlashRate(std::ostream& os, const Value& value, const ExifData*) {
3258
0
  if (value.count() != 1 || value.typeId() != unsignedByte)
3259
0
    return os << "(" << value << ")";
3260
3261
0
  auto temp = value.toInt64();
3262
0
  if (temp == 0 || temp == 255)
3263
0
    return os << _("n/a");
3264
0
  return os << stringFormat("{:2} Hz", temp);
3265
0
}
3266
3267
0
std::ostream& Nikon3MakerNote::printRepeatingFlashCount(std::ostream& os, const Value& value, const ExifData*) {
3268
0
  if (value.count() != 1 || value.typeId() != unsignedByte)
3269
0
    return os << "(" << value << ")";
3270
3271
0
  auto temp = value.toInt64();
3272
0
  if (temp == 0 || temp == 255)
3273
0
    return os << _("n/a");
3274
3275
0
  return os << stringFormat("{:1}", temp);
3276
0
}
3277
3278
std::ostream& Nikon3MakerNote::printExternalFlashData1Fl6(std::ostream& os, const Value& value,
3279
0
                                                          const ExifData* metadata) {
3280
0
  if (value.count() != 1 || value.typeId() != unsignedByte)
3281
0
    return os << "(" << value << ")";
3282
3283
0
  const auto v0 = value.toUint32(0);
3284
0
  if (!(v0 & 0x01))
3285
0
    return os << _("Did not fire");
3286
3287
0
  os << _("Fired");
3288
3289
0
  std::ostringstream ossTemp;
3290
0
  EXV_PRINT_TAG_BITMASK(nikonFlashAdaptors)(ossTemp, value, metadata);
3291
0
  std::string tempStr = ossTemp.str();
3292
0
  if (!tempStr.empty())
3293
0
    return os << ", " << tempStr;
3294
0
  return os;
3295
0
}
3296
3297
std::ostream& Nikon3MakerNote::printExternalFlashData2Fl6(std::ostream& os, const Value& value,
3298
0
                                                          const ExifData* metadata) {
3299
0
  if (value.count() != 1 || value.typeId() != unsignedByte)
3300
0
    return os << "(" << value << ")";
3301
3302
0
  const auto v0 = value.toUint32(0);
3303
0
  if (!(v0 & 0x80))
3304
0
    return os << _("External flash off");
3305
3306
0
  os << _("External flash on") << ", ";
3307
0
  return EXV_PRINT_TAG(nikonFlashControlMode)(os, (v0 & 0x0F), metadata);
3308
0
}
3309
3310
std::ostream& Nikon3MakerNote::printExternalFlashData1Fl7(std::ostream& os, const Value& value,
3311
0
                                                          const ExifData* metadata) {
3312
0
  if (value.count() != 1 || value.typeId() != unsignedByte)
3313
0
    return os << "(" << value << ")";
3314
3315
0
  const auto v0 = value.toUint32();
3316
0
  if (!(v0 & 0x01))
3317
0
    return os << _("External flash off");
3318
3319
0
  os << _("External flash on") << ", ";
3320
0
  if (v0 & 0x80)
3321
0
    os << _("External flash zoom override");
3322
0
  else
3323
0
    os << _("No external flash zoom override");
3324
3325
0
  std::ostringstream ossTemp;
3326
0
  EXV_PRINT_TAG_BITMASK(nikonFlashAdaptors)(ossTemp, value, metadata);
3327
0
  std::string tempStr = ossTemp.str();
3328
0
  if (!tempStr.empty())
3329
0
    return os << ", " << tempStr;
3330
0
  return os;
3331
0
}
3332
3333
0
std::ostream& Nikon3MakerNote::printExternalFlashData2(std::ostream& os, const Value& value, const ExifData* metadata) {
3334
0
  if (value.count() != 1 || value.typeId() != unsignedByte)
3335
0
    return os << "(" << value << ")";
3336
0
  return EXV_PRINT_TAG(nikonFlashControlMode)(os, (value.toUint32() & 0x0F), metadata);
3337
0
}
3338
3339
0
std::ostream& Nikon3MakerNote::printFlashMasterDataFl6(std::ostream& os, const Value& value, const ExifData* metadata) {
3340
0
  if (value.count() != 1 || value.typeId() != unsignedByte || !metadata)
3341
0
    return os << "(" << value << ")";
3342
3343
  // Check if using an automated or manual mode
3344
0
  auto pos = metadata->findKey(ExifKey("Exif.NikonFl6.ExternalFlashData1"));
3345
0
  if (pos == metadata->end() || pos->count() != 1 || pos->typeId() != unsignedByte)
3346
0
    return os << "(" << value << ")";
3347
3348
0
  if (auto mode = pos->toUint32(0) & 0x0F)
3349
0
    return printFlashCompensationValue(os, static_cast<unsigned char>(value.toUint32(0)),
3350
0
                                       flashModeUsesManualScale(mode));
3351
0
  return os << _("n/a");
3352
0
}
3353
3354
0
std::ostream& Nikon3MakerNote::printFlashMasterDataFl7(std::ostream& os, const Value& value, const ExifData* metadata) {
3355
0
  if (value.count() != 1 || value.typeId() != unsignedByte || !metadata)
3356
0
    return os << "(" << value << ")";
3357
3358
  // Check if using an automated or manual mode
3359
0
  auto pos = metadata->findKey(ExifKey("Exif.NikonFl7.ExternalFlashData2"));
3360
0
  if (pos == metadata->end() || pos->count() != 1 || pos->typeId() != unsignedByte)
3361
0
    return os << "(" << value << ")";
3362
3363
0
  if (auto mode = pos->toUint32(0) & 0x0F)
3364
0
    return printFlashCompensationValue(os, static_cast<unsigned char>(value.toUint32(0)),
3365
0
                                       flashModeUsesManualScale(mode));
3366
0
  return os << _("n/a");
3367
0
}
3368
3369
0
std::ostream& Nikon3MakerNote::printFlashGroupAControlData(std::ostream& os, const Value& value, const ExifData* data) {
3370
0
  if (value.count() != 1 || value.typeId() != unsignedByte)
3371
0
    return os << "(" << value << ")";
3372
0
  return EXV_PRINT_TAG(nikonFlashControlMode)(os, (value.toUint32() & 0x0F), data);
3373
0
}
3374
3375
std::ostream& Nikon3MakerNote::printFlashGroupBCControlData(std::ostream& os, const Value& value,
3376
0
                                                            const ExifData* data) {
3377
0
  if (value.count() != 1 || value.typeId() != unsignedByte)
3378
0
    return os << "(" << value << ")";
3379
3380
0
  const auto temp = value.toUint32();
3381
0
  EXV_PRINT_TAG(nikonFlashControlMode)(os, (temp >> 4), data);
3382
0
  os << ", ";
3383
0
  return EXV_PRINT_TAG(nikonFlashControlMode)(os, (temp & 0x0f), data);
3384
0
}
3385
3386
0
std::ostream& Nikon3MakerNote::printFlashGroupADataFl6(std::ostream& os, const Value& value, const ExifData* metadata) {
3387
0
  if (value.count() != 1 || value.typeId() != unsignedByte || !metadata)
3388
0
    return os << "(" << value << ")";
3389
3390
  // Check if using an automated or manual mode
3391
0
  auto pos = metadata->findKey(ExifKey("Exif.NikonFl6.FlashGroupAControlData"));
3392
0
  if (pos == metadata->end() || pos->count() != 1 || pos->typeId() != unsignedByte)
3393
0
    return os << "(" << value << ")";
3394
3395
0
  if (auto mode = pos->toUint32(0) & 0x0F)
3396
0
    return printFlashCompensationValue(os, static_cast<unsigned char>(value.toUint32(0)),
3397
0
                                       flashModeUsesManualScale(mode));
3398
0
  return os << _("n/a");
3399
0
}
3400
3401
0
std::ostream& Nikon3MakerNote::printFlashGroupADataFl7(std::ostream& os, const Value& value, const ExifData* metadata) {
3402
0
  if (value.count() != 1 || value.typeId() != unsignedByte || !metadata)
3403
0
    return os << "(" << value << ")";
3404
3405
  // Check if using an automated or manual mode
3406
0
  auto pos = metadata->findKey(ExifKey("Exif.NikonFl7.FlashGroupAControlData"));
3407
0
  if (pos == metadata->end() || pos->count() != 1 || pos->typeId() != unsignedByte)
3408
0
    return os << "(" << value << ")";
3409
3410
0
  if (auto mode = pos->toUint32(0) & 0x0F)
3411
0
    return printFlashCompensationValue(os, static_cast<unsigned char>(value.toUint32(0)),
3412
0
                                       flashModeUsesManualScale(mode));
3413
0
  return os << _("n/a");
3414
0
}
3415
3416
0
std::ostream& Nikon3MakerNote::printFlashGroupBDataFl6(std::ostream& os, const Value& value, const ExifData* metadata) {
3417
0
  if (value.count() != 1 || value.typeId() != unsignedByte || !metadata)
3418
0
    return os << "(" << value << ")";
3419
3420
  // Check if using an automated or manual mode
3421
0
  auto pos = metadata->findKey(ExifKey("Exif.NikonFl6.FlashGroupBCControlData"));
3422
0
  if (pos == metadata->end() || pos->count() != 1 || pos->typeId() != unsignedByte)
3423
0
    return os << "(" << value << ")";
3424
3425
0
  if (auto mode = pos->toUint32(0) >> 4)
3426
0
    return printFlashCompensationValue(os, static_cast<unsigned char>(value.toUint32(0)),
3427
0
                                       flashModeUsesManualScale(mode));
3428
0
  return os << _("n/a");
3429
0
}
3430
3431
0
std::ostream& Nikon3MakerNote::printFlashGroupBDataFl7(std::ostream& os, const Value& value, const ExifData* metadata) {
3432
0
  if (value.count() != 1 || value.typeId() != unsignedByte || !metadata)
3433
0
    return os << "(" << value << ")";
3434
3435
  // Check if using an automated or manual mode
3436
0
  auto pos = metadata->findKey(ExifKey("Exif.NikonFl7.FlashGroupBCControlData"));
3437
0
  if (pos == metadata->end() || pos->count() != 1 || pos->typeId() != unsignedByte)
3438
0
    return os << "(" << value << ")";
3439
3440
0
  if (auto mode = pos->toUint32(0) >> 4)
3441
0
    return printFlashCompensationValue(os, static_cast<unsigned char>(value.toUint32(0)),
3442
0
                                       flashModeUsesManualScale(mode));
3443
0
  return os << _("n/a");
3444
0
}
3445
3446
0
std::ostream& Nikon3MakerNote::printFlashGroupCDataFl6(std::ostream& os, const Value& value, const ExifData* metadata) {
3447
0
  if (value.count() != 1 || value.typeId() != unsignedByte || !metadata)
3448
0
    return os << "(" << value << ")";
3449
3450
  // Check if using an automated or manual mode
3451
0
  auto pos = metadata->findKey(ExifKey("Exif.NikonFl6.FlashGroupBCControlData"));
3452
0
  if (pos == metadata->end() || pos->count() != 1 || pos->typeId() != unsignedByte)
3453
0
    return os << "(" << value << ")";
3454
3455
0
  if (auto mode = pos->toUint32(0) & 0x000F)
3456
0
    return printFlashCompensationValue(os, static_cast<unsigned char>(value.toUint32(0)),
3457
0
                                       flashModeUsesManualScale(mode));
3458
0
  return os << _("n/a");
3459
0
}
3460
3461
0
std::ostream& Nikon3MakerNote::printFlashGroupCDataFl7(std::ostream& os, const Value& value, const ExifData* metadata) {
3462
0
  if (value.count() != 1 || value.typeId() != unsignedByte || !metadata)
3463
0
    return os << "(" << value << ")";
3464
3465
  // Check if using an automated or manual mode
3466
0
  auto pos = metadata->findKey(ExifKey("Exif.NikonFl7.FlashGroupBCControlData"));
3467
0
  if (pos == metadata->end() || pos->count() != 1 || pos->typeId() != unsignedByte)
3468
0
    return os << "(" << value << ")";
3469
3470
0
  if (auto mode = pos->toUint32(0) & 0x000F)
3471
0
    return printFlashCompensationValue(os, static_cast<unsigned char>(value.toUint32(0)),
3472
0
                                       flashModeUsesManualScale(mode));
3473
0
  return os << _("n/a");
3474
0
}
3475
3476
0
std::ostream& Nikon3MakerNote::printExternalFlashData3(std::ostream& os, const Value& value, const ExifData* data) {
3477
0
  if (value.count() != 1 || value.typeId() != unsignedByte)
3478
0
    return os << "(" << value << ")";
3479
0
  return EXV_PRINT_TAG(nikonFlashExposureComp)(os, (value.toUint32(0) & 0x04), data);
3480
0
}
3481
3482
0
std::ostream& Nikon3MakerNote::printCameraExposureCompensation(std::ostream& os, const Value& value, const ExifData*) {
3483
0
  if (value.count() != 1 || value.typeId() != unsignedByte)
3484
0
    return os << "(" << value << ")";
3485
0
  return printFlashCompensationValue(os, static_cast<unsigned char>(value.toUint32(0)), false);
3486
0
}
3487
3488
0
std::ostream& Nikon3MakerNote::printExternalFlashData4(std::ostream& os, const Value& value, const ExifData* metadata) {
3489
0
  if (value.count() != 1 || value.typeId() != unsignedByte)
3490
0
    return os << "(" << value << ")";
3491
0
  return EXV_PRINT_TAG(nikonFlashIlluminationPat)(os, value.toUint32(0), metadata);
3492
0
}
3493
3494
0
std::ostream& Nikon3MakerNote::printFlashZoomHeadPosition(std::ostream& os, const Value& value, const ExifData*) {
3495
0
  if (value.count() != 1 || value.typeId() != unsignedByte)
3496
0
    return os << "(" << value << ")";
3497
0
  if (auto v0 = value.toUint32(0))
3498
0
    return os << stringFormat("{} mm", v0);
3499
0
  return os << _("n/a");
3500
0
}
3501
3502
0
std::ostream& Nikon3MakerNote::printTimeZone(std::ostream& os, const Value& value, const ExifData*) {
3503
0
  if (value.count() != 1 || value.typeId() != signedShort)
3504
0
    return os << "(" << value << ")";
3505
0
  char sign = value.toInt64() < 0 ? '-' : '+';
3506
0
  long h = static_cast<long>(std::fabs(value.toFloat() / 60.0F)) % 24;
3507
0
  long min = static_cast<long>(std::fabs(value.toFloat() - (h * 60))) % 60;
3508
0
  return os << stringFormat("UTC {}{:02}:{:02}", sign, h, min);
3509
0
}
3510
3511
0
std::ostream& Nikon3MakerNote::printPictureControl(std::ostream& os, const Value& value, const ExifData*) {
3512
0
  if (value.count() != 1 || value.typeId() != unsignedByte)
3513
0
    return os << "(" << value << ")";
3514
0
  const auto pcval = value.toInt64() - 0x80;
3515
0
  if (pcval == 0)
3516
0
    return os << _("Normal");
3517
0
  if (pcval == 127)
3518
0
    return os << _("n/a");
3519
0
  if (pcval == -127)
3520
0
    return os << _("User");
3521
0
  if (pcval == -128)
3522
0
    return os << _("Auto");
3523
0
  return os << pcval;
3524
0
}
3525
3526
0
std::ostream& Nikon3MakerNote::print0x009a(std::ostream& os, const Value& value, const ExifData*) {
3527
0
  if (value.count() != 2 || value.typeId() != unsignedRational)
3528
0
    return os << value;
3529
0
  float f1 = value.toFloat(0);
3530
0
  float f2 = value.toFloat(1);
3531
0
  return os << f1 << " x " << f2 << " um";
3532
0
}
3533
3534
0
std::ostream& Nikon3MakerNote::print0x009e(std::ostream& os, const Value& value, const ExifData*) {
3535
0
  if (value.count() != 10 || value.typeId() != unsignedShort)
3536
0
    return os << value;
3537
3538
0
  std::vector<std::string> sv;
3539
0
  bool trim = true;
3540
3541
0
  for (int i = 9; i >= 0; --i) {
3542
0
    const auto l = value.toInt64(i);
3543
0
    if (i > 0 && l == 0 && trim)
3544
0
      continue;
3545
0
    if (l != 0)
3546
0
      trim = false;
3547
3548
0
    if (auto td = Exiv2::find(nikonRetouchHistory, l))
3549
0
      sv.emplace_back(_(td->label_));
3550
0
    else
3551
0
      sv.emplace_back(stringFormat("{} ({})", _("Unknown"), l));
3552
0
  }
3553
3554
0
  if (!sv.empty()) {
3555
0
    std::copy(sv.begin(), sv.end() - 1, std::ostream_iterator<std::string>(os, "; "));
3556
0
    os << sv.back();
3557
0
  }
3558
3559
0
  return os;
3560
0
}
3561
3562
0
std::ostream& Nikon3MakerNote::printApertureLd4(std::ostream& os, const Value& value, const ExifData*) {
3563
0
  if (value.count() != 1 || value.typeId() != unsignedShort)
3564
0
    return os << "(" << value << ")";
3565
0
  auto temp = value.toInt64();
3566
0
  if (temp == 0)
3567
0
    return os << _("n/a");
3568
0
  return os << stringFormat("F{:.1f}", std::exp2((temp / 384.0) - 1.0));
3569
0
}
3570
0
std::ostream& Nikon3MakerNote::printFocalLd4(std::ostream& os, const Value& value, const ExifData*) {
3571
0
  if (value.count() != 1 || value.typeId() != unsignedShort)
3572
0
    return os << "(" << value << ")";
3573
0
  auto temp = value.toInt64();
3574
0
  if (temp == 0)
3575
0
    return os << _("n/a");
3576
0
  return os << stringFormat("{} mm", temp);
3577
0
}
3578
3579
0
std::ostream& Nikon3MakerNote::printFocusDistanceLd4(std::ostream& os, const Value& value, const ExifData*) {
3580
0
  if (value.count() != 1 || value.typeId() != unsignedShort)
3581
0
    return os << "(" << value << ")";
3582
0
  auto temp = value.toInt64();
3583
0
  if (temp == 0)
3584
0
    return os << _("n/a");
3585
0
  return os << stringFormat("{:.2f} m", std::pow(10.0, (temp / (256.0 * 40.0)) - 2.0));
3586
0
}
3587
3588
}  // namespace Exiv2::Internal