Coverage Report

Created: 2026-10-14 06:52

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/exiv2/src/olympusmn_int.cpp
Line
Count
Source
1
// SPDX-License-Identifier: GPL-2.0-or-later
2
3
// *****************************************************************************
4
// included header files
5
#include "olympusmn_int.hpp"
6
7
#include "exif.hpp"
8
#include "i18n.h"  // NLS support.
9
#include "image_int.hpp"
10
#include "makernote_int.hpp"
11
#include "tags.hpp"
12
#include "tags_int.hpp"
13
#include "utils.hpp"
14
#include "value.hpp"
15
16
// *****************************************************************************
17
// class member definitions
18
namespace Exiv2::Internal {
19
//! OffOn, multiple tags
20
constexpr TagDetails olympusOffOn[] = {
21
    {0, N_("Off")},
22
    {1, N_("On")},
23
};
24
25
//! NoYes, multiple tags
26
constexpr TagDetails olympusNoYes[] = {
27
    {0, N_("No")},
28
    {1, N_("Yes")},
29
};
30
31
//! Quality, tag 0x0201
32
constexpr TagDetails olympusQuality[] = {
33
    {1, N_("Standard Quality (SQ)")},
34
    {2, N_("High Quality (HQ)")},
35
    {3, N_("Super High Quality (SHQ)")},
36
    {6, N_("Raw")},
37
};
38
39
//! Macro, tag 0x0202
40
constexpr TagDetails olympusMacro[] = {
41
    {0, N_("Off")},
42
    {1, N_("On")},
43
    {2, N_("Super macro")},
44
};
45
46
//! OneTouchWB, tag 0x0302
47
constexpr TagDetails olympusOneTouchWb[] = {
48
    {0, N_("Off")},
49
    {1, N_("On")},
50
    {2, N_("On (preset)")},
51
};
52
53
//! SceneMode, tag 0x403 and CameraSettings tag 0x509
54
constexpr TagDetails olympusSceneMode[] = {
55
    {0, N_("Standard")},
56
    {6, N_("Auto")},
57
    {7, N_("Sport")},
58
    {8, N_("Portrait")},
59
    {9, N_("Landscape+Portrait")},
60
    {10, N_("Landscape")},
61
    {11, N_("Night Scene")},
62
    {12, N_("Self Portrait")},
63
    {13, N_("Panorama")},
64
    {14, N_("2 in 1")},
65
    {15, N_("Movie")},
66
    {16, N_("Landscape+Portrait")},
67
    {17, N_("Night+Portrait")},
68
    {18, N_("Indoor")},
69
    {19, N_("Fireworks")},
70
    {20, N_("Sunset")},
71
    {22, N_("Macro")},
72
    {23, N_("Super Macro")},
73
    {24, N_("Food")},
74
    {25, N_("Documents")},
75
    {26, N_("Museum")},
76
    {27, N_("Shoot & Select")},
77
    {28, N_("Beach & Snow")},
78
    {29, N_("Self Portrait+Timer")},
79
    {30, N_("Candle")},
80
    {31, N_("Available Light")},
81
    {32, N_("Behind Glass")},
82
    {33, N_("My Mode")},
83
    {34, N_("Pet")},
84
    {35, N_("Underwater Wide1")},
85
    {36, N_("Underwater Macro")},
86
    {37, N_("Shoot & Select1")},
87
    {38, N_("Shoot & Select2")},
88
    {39, N_("High Key")},
89
    {40, N_("Digital Image Stabilization")},
90
    {41, N_("Auction")},
91
    {42, N_("Beach")},
92
    {43, N_("Snow")},
93
    {44, N_("Underwater Wide2")},
94
    {45, N_("Low Key")},
95
    {46, N_("Children")},
96
    {47, N_("Vivid")},
97
    {48, N_("Nature Macro")},
98
    {49, N_("Underwater Snapshot")},
99
    {50, N_("Shooting Guide")},
100
};
101
102
//! FlashDevice, tag 0x1005
103
constexpr TagDetails olympusFlashDevice[] = {
104
    {0, N_("None")},
105
    {1, N_("Internal")},
106
    {4, N_("External")},
107
    {5, N_("Internal + External")},
108
};
109
110
//! FocusRange, tag 0x100a
111
constexpr TagDetails olympusFocusRange[] = {
112
    {0, N_("Normal")},
113
    {1, N_("Macro")},
114
};
115
116
//! FocusMode, tag 0x100b
117
constexpr TagDetails olympusFocusMode[] = {
118
    {0, N_("Auto")},
119
    {1, N_("Manual")},
120
};
121
122
//! Sharpness, tag 0x100f
123
constexpr TagDetails olympusSharpness[] = {
124
    {0, N_("Normal")},
125
    {1, N_("Hard")},
126
    {2, N_("Soft")},
127
};
128
129
//! Contrast, tag 0x1029
130
constexpr TagDetails olympusContrast[] = {
131
    {0, N_("High")},
132
    {1, N_("Normal")},
133
    {2, N_("Low")},
134
};
135
136
//! CCDScanMode, tag 0x1039
137
constexpr TagDetails olympusCCDScanMode[] = {
138
    {0, N_("Interlaced")},
139
    {1, N_("Progressive")},
140
};
141
142
// Olympus Tag Info
143
constexpr TagInfo OlympusMakerNote::tagInfo_[] = {
144
145
    /* TODO:
146
       add Minolta makenotes tags here (0x0000-0x0103). See Exiftool database.*/
147
    {0x0000, "0x0000", "0x0000", N_("Unknown"), IfdId::olympusId, SectionId::makerTags, unsignedShort, -1, printValue},
148
    {0x0100, "ThumbnailImage", N_("Thumbnail Image"), N_("Thumbnail image"), IfdId::olympusId, SectionId::makerTags,
149
     undefined, -1, printValue},
150
151
    {0x0104, "BodyFirmwareVersion", N_("Body Firmware Version"), N_("Body firmware version"), IfdId::olympusId,
152
     SectionId::makerTags, asciiString, -1, printValue},
153
    {0x0200, "SpecialMode", N_("Special Mode"), N_("Picture taking mode"), IfdId::olympusId, SectionId::makerTags,
154
     unsignedLong, -1, print0x0200},
155
    {0x0201, "Quality", N_("Quality"), N_("Image quality setting"), IfdId::olympusId, SectionId::makerTags,
156
     unsignedShort, -1, EXV_PRINT_TAG(olympusQuality)},
157
    {0x0202, "Macro", N_("Macro"), N_("Macro mode"), IfdId::olympusId, SectionId::makerTags, unsignedShort, -1,
158
     EXV_PRINT_TAG(olympusMacro)},
159
    {0x0203, "BWMode", N_("Black & White Mode"), N_("Black and white mode"), IfdId::olympusId, SectionId::makerTags,
160
     unsignedShort, -1, EXV_PRINT_TAG(olympusOffOn)},
161
    {0x0204, "DigitalZoom", N_("Digital Zoom"), N_("Digital zoom ratio"), IfdId::olympusId, SectionId::makerTags,
162
     unsignedRational, -1, print0x0204},
163
    {0x0205, "FocalPlaneDiagonal", N_("Focal Plane Diagonal"), N_("Focal plane diagonal"), IfdId::olympusId,
164
     SectionId::makerTags, unsignedRational, -1, printValue},
165
    {0x0206, "LensDistortionParams", N_("Lens Distortion Parameters"), N_("Lens distortion parameters"),
166
     IfdId::olympusId, SectionId::makerTags, signedShort, -1, printValue},
167
    {0x0207, "CameraType", N_("Camera Type"), N_("Camera type"), IfdId::olympusId, SectionId::makerTags, asciiString,
168
     -1, printValue},
169
    {0x0208, "PictureInfo", N_("Picture Info"), N_("ASCII format data such as [PictureInfo]"), IfdId::olympusId,
170
     SectionId::makerTags, asciiString, -1, printValue},
171
    {0x0209, "CameraID", N_("Camera ID"), N_("Camera ID data"), IfdId::olympusId, SectionId::makerTags, asciiString, -1,
172
     print0x0209},
173
    {0x020b, "ImageWidth2", N_("Image Width 2"), N_("Image width 2"), IfdId::olympusId, SectionId::makerTags,
174
     unsignedShort, -1, printValue},
175
    {0x020c, "ImageHeight2", N_("Image Height 2"), N_("Image height 2"), IfdId::olympusId, SectionId::makerTags,
176
     unsignedShort, -1, printValue},
177
    {0x020d, "Software", N_("Software"), N_("Software"), IfdId::olympusId, SectionId::makerTags, asciiString, -1,
178
     printValue},
179
    {0x0280, "PreviewImage", N_("Preview Image"), N_("Preview image"), IfdId::olympusId, SectionId::makerTags,
180
     unsignedByte, -1, printValue},
181
    {0x0300, "PreCaptureFrames", N_("Pre Capture Frames"), N_("Pre-capture frames"), IfdId::olympusId,
182
     SectionId::makerTags, unsignedShort, -1, printValue},
183
    {0x0301, "WhiteBoard", N_("White Board"), N_("White board"), IfdId::olympusId, SectionId::makerTags, unsignedShort,
184
     -1, printValue},
185
    {0x0302, "OneTouchWB", N_("One Touch WB"), N_("One touch white balance"), IfdId::olympusId, SectionId::makerTags,
186
     unsignedShort, -1, EXV_PRINT_TAG(olympusOneTouchWb)},
187
    {0x0303, "WhiteBalanceBracket", N_("White Balance Bracket"), N_("White balance bracket"), IfdId::olympusId,
188
     SectionId::makerTags, unsignedShort, -1, printValue},
189
    {0x0304, "WhiteBalanceBias", N_("White Balance Bias"), N_("White balance bias"), IfdId::olympusId,
190
     SectionId::makerTags, unsignedShort, -1, printValue},
191
    {0x0403, "SceneMode", N_("Scene Mode"), N_("Scene mode"), IfdId::olympusCsId, SectionId::makerTags, unsignedShort,
192
     -1, EXV_PRINT_TAG(olympusSceneMode)},
193
    {0x0404, "Firmware", N_("Firmware"), N_("Firmware"), IfdId::olympusId, SectionId::makerTags, asciiString, -1,
194
     printValue},
195
    {0x0e00, "PrintIM", N_("Print IM"), N_("PrintIM information"), IfdId::olympusId, SectionId::makerTags, undefined,
196
     -1, printValue},
197
    {0x0f00, "DataDump1", N_("Data Dump 1"), N_("Various camera settings 1"), IfdId::olympusId, SectionId::makerTags,
198
     undefined, -1, printValue},
199
    {0x0f01, "DataDump2", N_("Data Dump 2"), N_("Various camera settings 2"), IfdId::olympusId, SectionId::makerTags,
200
     undefined, -1, printValue},
201
    {0x1000, "ShutterSpeed", N_("Shutter Speed"), N_("Shutter speed value"), IfdId::olympusId, SectionId::makerTags,
202
     signedRational, -1, printValue},
203
    {0x1001, "ISOSpeed", N_("ISO Speed"), N_("ISO speed value"), IfdId::olympusId, SectionId::makerTags, signedRational,
204
     -1, printValue},
205
    {0x1002, "ApertureValue", N_("Aperture Value"), N_("Aperture value"), IfdId::olympusId, SectionId::makerTags,
206
     signedRational, -1, printValue},
207
    {0x1003, "Brightness", N_("Brightness"), N_("Brightness value"), IfdId::olympusId, SectionId::makerTags,
208
     signedRational, -1, printValue},
209
    {0x1004, "FlashMode", N_("Flash Mode"), N_("Flash mode"), IfdId::olympusId, SectionId::makerTags, unsignedShort, -1,
210
     EXV_PRINT_TAG(olympusOffOn)},
211
    {0x1005, "FlashDevice", N_("Flash Device"), N_("Flash device"), IfdId::olympusId, SectionId::makerTags,
212
     unsignedShort, -1, EXV_PRINT_TAG(olympusFlashDevice)},
213
    {0x1006, "Bracket", N_("Bracket"), N_("Exposure compensation value"), IfdId::olympusId, SectionId::makerTags,
214
     signedRational, -1, printValue},
215
    {0x1007, "SensorTemperature", N_("Sensor Temperature"), N_("Sensor temperature"), IfdId::olympusId,
216
     SectionId::makerTags, signedShort, -1, printValue},
217
    {0x1008, "LensTemperature", N_("Lens Temperature"), N_("Lens temperature"), IfdId::olympusId, SectionId::makerTags,
218
     signedShort, -1, printValue},
219
    {0x1009, "LightCondition", N_("Light Condition"), N_("Light condition"), IfdId::olympusId, SectionId::makerTags,
220
     unsignedShort, -1, printValue},
221
    {0x100a, "FocusRange", N_("Focus Range"), N_("Focus range"), IfdId::olympusId, SectionId::makerTags, unsignedShort,
222
     -1, EXV_PRINT_TAG(olympusFocusRange)},
223
    {0x100b, "FocusMode", N_("Focus Mode"), N_("Focus mode"), IfdId::olympusId, SectionId::makerTags, unsignedShort, -1,
224
     EXV_PRINT_TAG(olympusFocusMode)},
225
    {0x100c, "FocusDistance", N_("Focus Distance"), N_("Manual focus distance"), IfdId::olympusId, SectionId::makerTags,
226
     unsignedRational, -1, printValue},
227
    {0x100d, "Zoom", N_("Zoom"), N_("Zoom step count"), IfdId::olympusId, SectionId::makerTags, unsignedShort, -1,
228
     printValue},
229
    {0x100e, "MacroFocus", N_("Macro Focus"), N_("Macro focus step count"), IfdId::olympusId, SectionId::makerTags,
230
     unsignedShort, -1, printValue},
231
    {0x100f, "SharpnessFactor", N_("Sharpness Factor"), N_("Sharpness factor"), IfdId::olympusId, SectionId::makerTags,
232
     unsignedShort, -1, EXV_PRINT_TAG(olympusSharpness)},
233
    {0x1010, "FlashChargeLevel", N_("Flash Charge Level"), N_("Flash charge level"), IfdId::olympusId,
234
     SectionId::makerTags, unsignedShort, -1, printValue},
235
    {0x1011, "ColorMatrix", N_("Color Matrix"), N_("Color matrix"), IfdId::olympusId, SectionId::makerTags,
236
     unsignedShort, -1, printValue},
237
    {0x1012, "BlackLevel", N_("BlackLevel"), N_("Black level"), IfdId::olympusId, SectionId::makerTags, unsignedShort,
238
     -1, printValue},
239
    {0x1013, "0x1013", "0x1013", N_("Unknown"), IfdId::olympusId, SectionId::makerTags, unsignedShort, -1, printValue},
240
    {0x1014, "0x1014", "0x1014", N_("Unknown"), IfdId::olympusId, SectionId::makerTags, unsignedShort, -1, printValue},
241
    {0x1015, "WhiteBalance", N_("White Balance"), N_("White balance mode"), IfdId::olympusId, SectionId::makerTags,
242
     unsignedShort, -1, print0x1015},
243
    {0x1016, "0x1016", "0x1016", N_("Unknown"), IfdId::olympusId, SectionId::makerTags, unsignedShort, -1, printValue},
244
    {0x1017, "RedBalance", N_("Red Balance"), N_("Red balance"), IfdId::olympusId, SectionId::makerTags, unsignedShort,
245
     -1, printValue},
246
    {0x1018, "BlueBalance", N_("Blue Balance"), N_("Blue balance"), IfdId::olympusId, SectionId::makerTags,
247
     unsignedShort, -1, printValue},
248
    {0x1019, "ColorMatrixNumber", N_("Color Matrix Number"), N_("Color matrix number"), IfdId::olympusId,
249
     SectionId::makerTags, unsignedShort, -1, printValue},
250
    {0x101a, "SerialNumber2", N_("Serial Number 2"), N_("Serial number 2"), IfdId::olympusId, SectionId::makerTags,
251
     asciiString, -1, printValue},
252
    {0x101b, "0x101b", "0x101b", N_("Unknown"), IfdId::olympusId, SectionId::makerTags, unsignedLong, -1, printValue},
253
    {0x101c, "0x101c", "0x101c", N_("Unknown"), IfdId::olympusId, SectionId::makerTags, unsignedLong, -1, printValue},
254
    {0x101d, "0x101d", "0x101d", N_("Unknown"), IfdId::olympusId, SectionId::makerTags, unsignedLong, -1, printValue},
255
    {0x101e, "0x101e", "0x101e", N_("Unknown"), IfdId::olympusId, SectionId::makerTags, unsignedLong, -1, printValue},
256
    {0x101f, "0x101f", "0x101f", N_("Unknown"), IfdId::olympusId, SectionId::makerTags, unsignedLong, -1, printValue},
257
    {0x1020, "0x1020", "0x1020", N_("Unknown"), IfdId::olympusId, SectionId::makerTags, unsignedLong, -1, printValue},
258
    {0x1021, "0x1021", "0x1021", N_("Unknown"), IfdId::olympusId, SectionId::makerTags, unsignedLong, -1, printValue},
259
    {0x1022, "0x1022", "0x1022", N_("Unknown"), IfdId::olympusId, SectionId::makerTags, unsignedLong, -1, printValue},
260
    {0x1023, "FlashBias", N_("Flash Bias"), N_("Flash exposure compensation"), IfdId::olympusId, SectionId::makerTags,
261
     signedRational, -1, printValue},
262
    {0x1024, "0x1024", "0x1024", N_("Unknown"), IfdId::olympusId, SectionId::makerTags, unsignedShort, -1, printValue},
263
    {0x1025, "0x1025", "0x1025", N_("Unknown"), IfdId::olympusId, SectionId::makerTags, signedRational, -1, printValue},
264
    {0x1026, "ExternalFlashBounce", N_("External Flash Bounce"), N_("External flash bounce"), IfdId::olympusId,
265
     SectionId::makerTags, unsignedShort, -1, EXV_PRINT_TAG(olympusOffOn)},
266
    {0x1027, "ExternalFlashZoom", N_("External Flash Zoom"), N_("External flash zoom"), IfdId::olympusId,
267
     SectionId::makerTags, unsignedShort, -1, printValue},
268
    {0x1028, "ExternalFlashMode", N_("External Flash Mode"), N_("External flash mode"), IfdId::olympusId,
269
     SectionId::makerTags, unsignedShort, -1, printValue},
270
    {0x1029, "Contrast", N_("Contrast"), N_("Contrast setting"), IfdId::olympusId, SectionId::makerTags, unsignedShort,
271
     -1, EXV_PRINT_TAG(olympusContrast)},
272
    {0x102a, "SharpnessFactor2", N_("Sharpness Factor 2"), N_("Sharpness factor 2"), IfdId::olympusId,
273
     SectionId::makerTags, unsignedShort, -1, printValue},
274
    {0x102b, "ColorControl", N_("Color Control"), N_("Color control"), IfdId::olympusId, SectionId::makerTags,
275
     unsignedShort, -1, printValue},
276
    {0x102c, "ValidBits", N_("ValidBits"), N_("Valid bits"), IfdId::olympusId, SectionId::makerTags, unsignedShort, -1,
277
     printValue},
278
    {0x102d, "CoringFilter", N_("CoringFilter"), N_("Coring filter"), IfdId::olympusId, SectionId::makerTags,
279
     unsignedShort, -1, printValue},
280
    {0x102e, "ImageWidth", N_("Image Width"), N_("Image width"), IfdId::olympusId, SectionId::makerTags, unsignedLong,
281
     -1, printValue},
282
    {0x102f, "ImageHeight", N_("Image Height"), N_("Image height"), IfdId::olympusId, SectionId::makerTags,
283
     unsignedLong, -1, printValue},
284
    {0x1030, "0x1030", "0x1030", N_("Unknown"), IfdId::olympusId, SectionId::makerTags, unsignedShort, -1, printValue},
285
    {0x1031, "0x1031", "0x1031", N_("Unknown"), IfdId::olympusId, SectionId::makerTags, unsignedLong, -1, printValue},
286
    {0x1032, "0x1032", "0x1032", N_("Unknown"), IfdId::olympusId, SectionId::makerTags, unsignedShort, -1, printValue},
287
    {0x1033, "0x1033", "0x1033", N_("Unknown"), IfdId::olympusId, SectionId::makerTags, unsignedLong, -1, printValue},
288
    {0x1034, "CompressionRatio", N_("Compression Ratio"), N_("Compression ratio"), IfdId::olympusId,
289
     SectionId::makerTags, unsignedRational, -1, printValue},
290
    {0x1035, "Thumbnail", N_("Thumbnail"), N_("Preview image embedded"), IfdId::olympusId, SectionId::makerTags,
291
     unsignedLong, -1, EXV_PRINT_TAG(olympusOffOn)},
292
    {0x1036, "ThumbnailOffset", N_("Thumbnail Offset"), N_("Offset of the preview image"), IfdId::olympusId,
293
     SectionId::makerTags, unsignedLong, -1, printValue},
294
    {0x1037, "ThumbnailLength", N_("Thumbnail Length"), N_("Size of the preview image"), IfdId::olympusId,
295
     SectionId::makerTags, unsignedLong, -1, printValue},
296
    {0x1039, "CCDScanMode", N_("CCD Scan Mode"), N_("CCD scan mode"), IfdId::olympusId, SectionId::makerTags,
297
     unsignedShort, -1, EXV_PRINT_TAG(olympusCCDScanMode)},
298
    {0x103a, "NoiseReduction", N_("Noise Reduction"), N_("Noise reduction"), IfdId::olympusId, SectionId::makerTags,
299
     unsignedShort, -1, EXV_PRINT_TAG(olympusOffOn)},
300
    {0x103b, "InfinityLensStep", N_("Infinity Lens Step"), N_("Infinity lens step"), IfdId::olympusId,
301
     SectionId::makerTags, unsignedShort, -1, printValue},
302
    {0x103c, "NearLensStep", N_("Near Lens Step"), N_("Near lens step"), IfdId::olympusId, SectionId::makerTags,
303
     unsignedShort, -1, printValue},
304
    {0x2010, "Equipment", N_("Equipment Info"), N_("Camera equipment sub-IFD"), IfdId::olympusId, SectionId::makerTags,
305
     unsignedLong, -1, printValue},
306
    {0x2020, "CameraSettings", N_("Camera Settings"), N_("Camera Settings sub-IFD"), IfdId::olympusId,
307
     SectionId::makerTags, unsignedLong, -1, printValue},
308
    {0x2030, "RawDevelopment", N_("Raw Development"), N_("Raw development sub-IFD"), IfdId::olympusId,
309
     SectionId::makerTags, unsignedLong, -1, printValue},
310
    {0x2031, "RawDevelopment2", N_("Raw Development 2"), N_("Raw development 2 sub-IFD"), IfdId::olympusId,
311
     SectionId::makerTags, unsignedLong, -1, printValue},
312
    {0x2040, "ImageProcessing", N_("Image Processing"), N_("Image processing sub-IFD"), IfdId::olympusId,
313
     SectionId::makerTags, unsignedLong, -1, printValue},
314
    {0x2050, "FocusInfo", N_("Focus Info"), N_("Focus sub-IFD"), IfdId::olympusId, SectionId::makerTags, unsignedLong,
315
     -1, printValue},
316
    {0x3000, "RawInfo", N_("Raw Info"), N_("Raw sub-IFD"), IfdId::olympusId, SectionId::makerTags, unsignedLong, -1,
317
     printValue},
318
    // End of list marker
319
    {0xffff, "(UnknownOlympusMakerNoteTag)", "(UnknownOlympusMakerNoteTag)", N_("Unknown OlympusMakerNote tag"),
320
     IfdId::olympusId, SectionId::makerTags, asciiString, -1, printValue},
321
};
322
323
// Olympus CameraSettings Tags
324
//! ExposureMode, tag 0x0200
325
constexpr TagDetails olympusExposureMode[] = {
326
    {1, N_("Manual")},        {2, N_("Program")}, {3, N_("Aperture-priority AE")}, {4, N_("Shutter speed priority AE")},
327
    {5, N_("Program-shift")},
328
};
329
330
//! MeteringMode, tag 0x0202
331
constexpr TagDetails olympusMeteringMode[] = {
332
    {2, N_("Center-weighted average")},
333
    {3, N_("Spot")},
334
    {5, N_("ESP")},
335
    {261, N_("Pattern+AF")},
336
    {515, N_("Spot+Highlight control")},
337
    {1027, N_("Spot+Shadow control")},
338
};
339
340
//! MacroMode, tag 0x0300
341
constexpr TagDetails olympusMacroMode[] = {
342
    {0, N_("Off")},
343
    {1, N_("On")},
344
    {2, N_("Super Macro")},
345
};
346
347
//! FocusMode, tag 0x0301
348
[[maybe_unused]] constexpr TagDetails olympusCsFocusMode[] = {
349
    {0, N_("Single AF")}, {1, N_("Sequential shooting AF")}, {2, N_("Continuous AF")}, {3, N_("Multi AF")},
350
    {10, N_("MF")},
351
};
352
353
//! FocusProcess, tag 0x0302
354
constexpr TagDetails olympusFocusProcess[] = {
355
    {0, N_("AF Not Used")},
356
    {1, N_("AF Used")},
357
};
358
359
//! AFSearch, tag 0x0303
360
constexpr TagDetails olympusAFSearch[] = {
361
    {0, N_("Not Ready")},
362
    {1, N_("Ready")},
363
};
364
365
//! FlashMode, tag 0x0400
366
constexpr TagDetailsBitmask olympusFlashMode[] = {
367
    {0x0000, N_("Off")},       {0x0001, N_("On")},        {0x0002, N_("Fill-in")},     {0x0004, N_("Red-eye")},
368
    {0x0008, N_("Slow-sync")}, {0x0010, N_("Forced On")}, {0x0020, N_("2nd Curtain")},
369
};
370
371
//! FlashRemoteControl, tag 0x0403
372
constexpr TagDetails olympusFlashRemoteControl[] = {
373
    {0x0, N_("Off")},
374
    {0x1, N_("Channel 1, Low")},
375
    {0x2, N_("Channel 2, Low")},
376
    {0x3, N_("Channel 3, Low")},
377
    {0x4, N_("Channel 4, Low")},
378
    {0x9, N_("Channel 1, Mid")},
379
    {0xa, N_("Channel 2, Mid")},
380
    {0xb, N_("Channel 3, Mid")},
381
    {0xc, N_("Channel 4, Mid")},
382
    {0x11, N_("Channel 1, High")},
383
    {0x12, N_("Channel 2, High")},
384
    {0x13, N_("Channel 3, High")},
385
    {0x14, N_("Channel 4, High")},
386
};
387
388
//! FlashControlMode, tag 0x0404
389
constexpr TagDetails olympusFlashControlMode[] = {
390
    {0, N_("Off")},
391
    {3, N_("TTL")},
392
    {4, N_("Auto")},
393
    {5, N_("Manual")},
394
};
395
396
//! WhiteBalance, tag 0x0500
397
constexpr TagDetails olympusWhiteBalance[] = {
398
    {0, N_("Auto")},
399
    {1, N_("Auto (Keep Warm Color Off)")},
400
    {16, N_("7500K (Fine Weather with Shade)")},
401
    {17, N_("6000K (Cloudy)")},
402
    {18, N_("5300K (Fine Weather)")},
403
    {20, N_("3000K (Tungsten light)")},
404
    {21, N_("3600K (Tungsten light-like)")},
405
    {22, N_("Auto Setup")},
406
    {23, N_("5500K (Flash)")},
407
    {33, N_("6600K (Daylight fluorescent)")},
408
    {34, N_("4500K (Neutral white fluorescent)")},
409
    {35, N_("4000K (Cool white fluorescent)")},
410
    {36, N_("White Fluorescent")},
411
    {48, N_("3600K (Tungsten light-like)")},
412
    {67, N_("Underwater")},
413
    {256, N_("One Touch WB 1")},
414
    {257, N_("One Touch WB 2")},
415
    {258, N_("One Touch WB 3")},
416
    {259, N_("One Touch WB 4")},
417
    {512, N_("Custom WB 1")},
418
    {513, N_("Custom WB 2")},
419
    {514, N_("Custom WB 3")},
420
    {515, N_("Custom WB 4")},
421
};
422
423
//! ModifiedSaturation, tag 0x0504
424
constexpr TagDetails olympusModifiedSaturation[] = {
425
    {0, N_("Off")},
426
    {1, N_("CM1 (Red Enhance)")},
427
    {2, N_("CM2 (Green Enhance)")},
428
    {3, N_("CM3 (Blue Enhance)")},
429
    {4, N_("CM4 (Skin Tones)")},
430
};
431
432
//! ColorSpace, tag 0x0507
433
constexpr TagDetails olympusColorSpace[] = {
434
    {0, N_("sRGB")},
435
    {1, N_("Adobe RGB")},
436
    {2, N_("Pro Photo RGB")},
437
};
438
439
//! NoiseReduction, tag 0x050a
440
constexpr TagDetailsBitmask olympusNoiseReduction[] = {
441
    {0x0001, N_("Noise Reduction")},
442
    {0x0002, N_("Noise Filter")},
443
    {0x0004, N_("Noise Filter (ISO Boost)")},
444
    {0x0008, N_("Auto")},
445
};
446
447
//! PictureMode, tag 0x0520
448
constexpr TagDetails olympusPictureMode[] = {
449
    {1, N_("Vivid")},
450
    {2, N_("Natural")},
451
    {3, N_("Muted")},
452
    {4, N_("Portrait")},
453
    {5, N_("i-Enhance")},
454
    {6, N_("e-Portrait")},
455
    {7, N_("Color Creator")},
456
    {9, N_("Color Profile 1")},
457
    {10, N_("Color Profile 2")},
458
    {11, N_("Color Profile 3")},
459
    {12, N_("Monochrome Profile 1")},
460
    {13, N_("Monochrome Profile 2")},
461
    {14, N_("Monochrome Profile 3")},
462
    {256, N_("Monotone")},
463
    {512, N_("Sepia")},
464
};
465
466
//! PictureModeBWFilter, tag 0x0525
467
constexpr TagDetails olympusPictureModeBWFilter[] = {
468
    {0, N_("n/a")}, {1, N_("Neutral")}, {2, N_("Yellow")}, {3, N_("Orange")}, {4, N_("Red")}, {5, N_("Green")},
469
};
470
471
//! PictureModeTone, tag 0x0526
472
constexpr TagDetails olympusPictureModeTone[] = {
473
    {0, N_("n/a")}, {1, N_("Neutral")}, {2, N_("Sepia")}, {3, N_("Blue")}, {4, N_("Purple")}, {5, N_("Green")},
474
};
475
476
constexpr TagDetails artFilters[] = {
477
    {0, N_("Off")},
478
    {1, N_("Soft Focus")},
479
    {2, N_("Pop Art")},
480
    {3, N_("Pale & Light Color")},
481
    {4, N_("Light Tone")},
482
    {5, N_("Pin Hole")},
483
    {6, N_("Grainy Film")},
484
    {9, N_("Diorama")},
485
    {10, N_("Cross Process")},
486
    {12, N_("Fish Eye")},
487
    {13, N_("Drawing")},
488
    {14, N_("Gentle Sepia")},
489
    {15, N_("Pale & Light Color II")},
490
    {16, N_("Pop Art II")},
491
    {17, N_("Pin Hole II")},
492
    {18, N_("Pin Hole III")},
493
    {19, N_("Grainy Film II")},
494
    {20, N_("Dramatic Tone")},
495
    {21, N_("Punk")},
496
    {22, N_("Soft Focus 2")},
497
    {23, N_("Sparkle")},
498
    {24, N_("Watercolor")},
499
    {25, N_("Key Line")},
500
    {26, N_("Key Line II")},
501
    {27, N_("Miniature")},
502
    {28, N_("Reflection")},
503
    {29, N_("Fragmented")},
504
    {31, N_("Cross Process II")},
505
    {32, N_("Dramatic Tone II")},
506
    {33, N_("Watercolor I")},
507
    {34, N_("Watercolor II")},
508
    {35, N_("Diorama II")},
509
    {36, N_("Vintage")},
510
    {37, N_("Vintage II")},
511
    {38, N_("Vintage III")},
512
    {39, N_("Partial Color")},
513
    {40, N_("Partial Color II")},
514
    {41, N_("Partial Color III")},
515
};
516
517
//! OlympusCs Quality, tag 0x0603
518
constexpr TagDetails olympusCsQuality[] = {
519
    {1, N_("SQ")},
520
    {2, N_("HQ")},
521
    {3, N_("SHQ")},
522
    {4, N_("RAW")},
523
};
524
525
//! Olympus ImageStabilization, tag 0x0604
526
static constexpr TagDetails olympusImageStabilization[] = {
527
    {0, N_("Off")}, {1, N_("S-IS 1")}, {2, N_("S-IS 2")}, {3, N_("S-IS 3")}, {4, N_("S-IS AUTO")},
528
};
529
530
constexpr TagInfo OlympusMakerNote::tagInfoCs_[] = {
531
    {0x0000, "CameraSettingsVersion", N_("Camera Settings Version"), N_("Camera settings version"), IfdId::olympusCsId,
532
     SectionId::makerTags, undefined, -1, printExifVersion},
533
    {0x0100, "PreviewImageValid", N_("PreviewImage Valid"), N_("Preview image valid"), IfdId::olympusCsId,
534
     SectionId::makerTags, unsignedLong, -1, EXV_PRINT_TAG(olympusNoYes)},
535
    {0x0101, "PreviewImageStart", N_("PreviewImage Start"), N_("Preview image start"), IfdId::olympusCsId,
536
     SectionId::makerTags, unsignedLong, -1, printValue},
537
    {0x0102, "PreviewImageLength", N_("PreviewImage Length"), N_("Preview image length"), IfdId::olympusCsId,
538
     SectionId::makerTags, unsignedLong, -1, printValue},
539
    {0x0200, "ExposureMode", N_("Exposure Mode"), N_("Exposure mode"), IfdId::olympusCsId, SectionId::makerTags,
540
     unsignedShort, -1, EXV_PRINT_TAG(olympusExposureMode)},
541
    {0x0201, "AELock", N_("AE Lock"), N_("Auto exposure lock"), IfdId::olympusCsId, SectionId::makerTags, unsignedShort,
542
     -1, EXV_PRINT_TAG(olympusOffOn)},
543
    {0x0202, "MeteringMode", N_("Metering Mode"), N_("Metering mode"), IfdId::olympusCsId, SectionId::makerTags,
544
     unsignedShort, -1, EXV_PRINT_TAG(olympusMeteringMode)},
545
    {0x0203, "ExposureShift", N_("Exposure Shift"), N_("Exposure shift"), IfdId::olympusCsId, SectionId::makerTags,
546
     signedRational, -1, printValue},
547
    {0x0300, "MacroMode", N_("Macro Mode"), N_("Macro mode"), IfdId::olympusCsId, SectionId::makerTags, unsignedShort,
548
     -1, EXV_PRINT_TAG(olympusMacroMode)},
549
    {0x0301, "FocusMode", N_("Focus Mode"), N_("Focus mode"), IfdId::olympusCsId, SectionId::makerTags, unsignedShort,
550
     -1, printCs0x0301},
551
    {0x0302, "FocusProcess", N_("Focus Process"), N_("Focus process"), IfdId::olympusCsId, SectionId::makerTags,
552
     unsignedShort, -1, EXV_PRINT_TAG(olympusFocusProcess)},
553
    {0x0303, "AFSearch", N_("AF Search"), N_("AF search"), IfdId::olympusCsId, SectionId::makerTags, unsignedShort, -1,
554
     EXV_PRINT_TAG(olympusAFSearch)},
555
    {0x0304, "AFAreas", N_("AF Areas"), N_("AF areas"), IfdId::olympusCsId, SectionId::makerTags, unsignedLong, -1,
556
     printValue},
557
    {0x0305, "AFPointSelected", N_("AFPointSelected"), N_("AFPointSelected"), IfdId::olympusCsId, SectionId::makerTags,
558
     signedRational, -1, printValue},
559
    {0x0307, "AFFineTuneAdj", N_("AF Fine Tune Adjust"), N_("AF fine tune adjust"), IfdId::olympusCsId,
560
     SectionId::makerTags, signedShort, -1, printValue},
561
    {0x0400, "FlashMode", N_("Flash Mode"), N_("Flash mode"), IfdId::olympusCsId, SectionId::makerTags, unsignedShort,
562
     -1, EXV_PRINT_TAG_BITMASK(olympusFlashMode)},
563
    {0x0401, "FlashExposureComp", N_("Flash Exposure Compensation"), N_("Flash exposure compensation"),
564
     IfdId::olympusCsId, SectionId::makerTags, signedRational, -1, printValue},
565
    {0x0403, "FlashRemoteControl", N_("Flash Remote Control"), N_("Flash remote control"), IfdId::olympusCsId,
566
     SectionId::makerTags, unsignedShort, -1, EXV_PRINT_TAG(olympusFlashRemoteControl)},
567
    {0x0404, "FlashControlMode", N_("Flash Control Mode"), N_("Flash control mode"), IfdId::olympusCsId,
568
     SectionId::makerTags, unsignedShort, -1, EXV_PRINT_TAG(olympusFlashControlMode)},
569
    {0x0405, "FlashIntensity", N_("Flash Intensity"), N_("Flash intensity"), IfdId::olympusCsId, SectionId::makerTags,
570
     signedRational, -1, printValue},
571
    {0x0406, "ManualFlashStrength", N_("Manual Flash Strength"), N_("Manual flash strength"), IfdId::olympusCsId,
572
     SectionId::makerTags, signedRational, -1, printValue},
573
    {0x0500, "WhiteBalance", N_("White Balance 2"), N_("White balance 2"), IfdId::olympusCsId, SectionId::makerTags,
574
     unsignedShort, -1, EXV_PRINT_TAG(olympusWhiteBalance)},
575
    {0x0501, "WhiteBalanceTemperature", N_("White Balance Temperature"), N_("White balance temperature"),
576
     IfdId::olympusCsId, SectionId::makerTags, unsignedShort, -1, printValue},
577
    {0x0502, "WhiteBalanceBracket", N_("White Balance Bracket"), N_("White balance bracket"), IfdId::olympusCsId,
578
     SectionId::makerTags, signedShort, -1, printValue},
579
    {0x0503, "CustomSaturation", N_("Custom Saturation"), N_("Custom saturation"), IfdId::olympusCsId,
580
     SectionId::makerTags, signedShort, -1, printValue},
581
    {0x0504, "ModifiedSaturation", N_("Modified Saturation"), N_("Modified saturation"), IfdId::olympusCsId,
582
     SectionId::makerTags, unsignedShort, -1, EXV_PRINT_TAG(olympusModifiedSaturation)},
583
    {0x0505, "ContrastSetting", N_("Contrast Setting"), N_("Contrast setting"), IfdId::olympusCsId,
584
     SectionId::makerTags, signedShort, -1, printValue},
585
    {0x0506, "SharpnessSetting", N_("Sharpness Setting"), N_("Sharpness setting"), IfdId::olympusCsId,
586
     SectionId::makerTags, signedShort, -1, printValue},
587
    {0x0507, "ColorSpace", N_("Color Space"), N_("Color space"), IfdId::olympusCsId, SectionId::makerTags,
588
     unsignedShort, -1, EXV_PRINT_TAG(olympusColorSpace)},
589
    {0x0509, "SceneMode", N_("Scene Mode"), N_("Scene mode"), IfdId::olympusCsId, SectionId::makerTags, unsignedShort,
590
     -1, EXV_PRINT_TAG(olympusSceneMode)},
591
    {0x050a, "NoiseReduction", N_("Noise Reduction"), N_("Noise reduction"), IfdId::olympusCsId, SectionId::makerTags,
592
     unsignedShort, -1, EXV_PRINT_TAG_BITMASK(olympusNoiseReduction)},
593
    {0x050b, "DistortionCorrection", N_("Distortion Correction"), N_("Distortion correction"), IfdId::olympusCsId,
594
     SectionId::makerTags, unsignedShort, -1, EXV_PRINT_TAG(olympusOffOn)},
595
    {0x050c, "ShadingCompensation", N_("Shading Compensation"), N_("Shading compensation"), IfdId::olympusCsId,
596
     SectionId::makerTags, unsignedShort, -1, EXV_PRINT_TAG(olympusOffOn)},
597
    {0x050d, "CompressionFactor", N_("Compression Factor"), N_("Compression factor"), IfdId::olympusCsId,
598
     SectionId::makerTags, unsignedRational, -1, printValue},
599
    {0x050f, "Gradation", N_("Gradation"), N_("Gradation"), IfdId::olympusCsId, SectionId::makerTags, signedShort, -1,
600
     print0x050f},
601
    {0x0520, "PictureMode", N_("Picture Mode"), N_("Picture mode"), IfdId::olympusCsId, SectionId::makerTags,
602
     unsignedShort, -1, EXV_PRINT_TAG(olympusPictureMode)},
603
    {0x0521, "PictureModeSaturation", N_("Picture Mode Saturation"), N_("Picture mode saturation"), IfdId::olympusCsId,
604
     SectionId::makerTags, signedShort, -1, printValue},
605
    {0x0522, "PictureModeHue", N_("Picture Mode Hue"), N_("Picture mode hue"), IfdId::olympusCsId, SectionId::makerTags,
606
     unsignedShort, -1, printValue},
607
    {0x0523, "PictureModeContrast", N_("Picture Mode Contrast"), N_("Picture mode contrast"), IfdId::olympusCsId,
608
     SectionId::makerTags, signedShort, -1, printValue},
609
    {0x0524, "PictureModeSharpness", N_("Picture Mode Sharpness"), N_("Picture mode sharpness"), IfdId::olympusCsId,
610
     SectionId::makerTags, signedShort, -1, printValue},
611
    {0x0525, "PictureModeBWFilter", N_("Picture Mode BW Filter"), N_("Picture mode BW filter"), IfdId::olympusCsId,
612
     SectionId::makerTags, signedShort, -1, EXV_PRINT_TAG(olympusPictureModeBWFilter)},
613
    {0x0526, "PictureModeTone", N_("Picture Mode Tone"), N_("Picture mode tone"), IfdId::olympusCsId,
614
     SectionId::makerTags, signedShort, -1, EXV_PRINT_TAG(olympusPictureModeTone)},
615
    {0x0527, "NoiseFilter", N_("Noise Filter"), N_("Noise filter"), IfdId::olympusCsId, SectionId::makerTags,
616
     signedShort, -1, print0x0527},
617
    {0x0529, "ArtFilter", N_("Art Filter"), N_("Art filter"), IfdId::olympusCsId, SectionId::makerTags, unsignedShort,
618
     -1, print0x0529},
619
    {0x052c, "MagicFilter", N_("Magic Filter"), N_("Magic filter"), IfdId::olympusCsId, SectionId::makerTags,
620
     unsignedShort, -1, print0x0529},
621
    {0x0600, "DriveMode", N_("Drive Mode"), N_("Drive mode"), IfdId::olympusCsId, SectionId::makerTags, unsignedShort,
622
     -1, printValue},
623
    {0x0601, "PanoramaMode", N_("Panorama Mode"), N_("Panorama mode"), IfdId::olympusCsId, SectionId::makerTags,
624
     unsignedShort, -1, printValue},
625
    {0x0603, "Quality", N_("Image Quality 2"), N_("Image quality 2"), IfdId::olympusCsId, SectionId::makerTags,
626
     unsignedShort, -1, EXV_PRINT_TAG(olympusCsQuality)},
627
    {0x0604, "ImageStabilization", N_("Image Stabilization"), N_("Image stabilization"), IfdId::olympusCsId,
628
     SectionId::makerTags, unsignedLong, -1, EXV_PRINT_TAG(olympusImageStabilization)},
629
    {0x0900, "ManometerPressure", N_("Manometer Pressure"), N_("Manometer pressure"), IfdId::olympusCsId,
630
     SectionId::makerTags, unsignedShort, -1, printValue},
631
    {0x0901, "ManometerReading", N_("Manometer Reading"), N_("Manometer reading"), IfdId::olympusCsId,
632
     SectionId::makerTags, signedLong, -1, printValue},
633
    {0x0902, "ExtendedWBDetect", N_("Extended WB Detect"), N_("Extended WB detect"), IfdId::olympusCsId,
634
     SectionId::makerTags, unsignedShort, -1, EXV_PRINT_TAG(olympusOffOn)},
635
    {0x0903, "LevelGaugeRoll", N_("Level Gauge Roll"), N_("Level gauge roll"), IfdId::olympusCsId, SectionId::makerTags,
636
     unsignedShort, -1, EXV_PRINT_TAG(olympusOffOn)},
637
    {0x0904, "LevelGaugePitch", N_("Level Gauge Pitch"), N_("Level gauge pitch"), IfdId::olympusCsId,
638
     SectionId::makerTags, unsignedShort, -1, EXV_PRINT_TAG(olympusOffOn)},
639
    // End of list marker
640
    {0xffff, "(UnknownOlympusCsTag)", "(UnknownOlympusCsTag)", N_("Unknown OlympusCs tag"), IfdId::olympusCsId,
641
     SectionId::makerTags, asciiString, -1, printValue},
642
};
643
644
//! OlympusEq FlashType, tag 0x1000
645
constexpr TagDetails olympusEqFlashType[] = {
646
    {0, N_("None")},
647
    {2, N_("Simple E-System")},
648
    {3, N_("E-System")},
649
};
650
651
//! OlympusEq FlashModel, tag 0x1001
652
constexpr TagDetails olympusEqFlashModel[] = {
653
    {0, N_("None")}, {1, "FL-20"},  {2, "FL-50"},  {3, "RF-11"}, {4, "TF-22"},
654
    {5, "FL-36"},    {6, "FL-50R"}, {7, "FL-36R"}, {9, "FL-14"}, {11, "FL-600R"},
655
};
656
657
constexpr TagInfo OlympusMakerNote::tagInfoEq_[] = {
658
    {0x0000, "EquipmentVersion", N_("Equipment Version"), N_("Equipment version"), IfdId::olympusEqId,
659
     SectionId::makerTags, undefined, -1, printExifVersion},
660
    {0x0100, "CameraType", N_("Camera Type"), N_("Camera type"), IfdId::olympusEqId, SectionId::makerTags, asciiString,
661
     -1, printValue},
662
    {0x0101, "SerialNumber", N_("Serial Number"), N_("Serial number"), IfdId::olympusEqId, SectionId::makerTags,
663
     asciiString, -1, printValue},
664
    {0x0102, "InternalSerialNumber", N_("Internal Serial Number"), N_("Internal serial number"), IfdId::olympusEqId,
665
     SectionId::makerTags, asciiString, -1, printValue},
666
    {0x0103, "FocalPlaneDiagonal", N_("Focal Plane Diagonal"), N_("Focal plane diagonal"), IfdId::olympusEqId,
667
     SectionId::makerTags, unsignedRational, -1, printValue},
668
    {0x0104, "BodyFirmwareVersion", N_("Body Firmware Version"), N_("Body firmware version"), IfdId::olympusEqId,
669
     SectionId::makerTags, unsignedLong, -1, printValue},
670
    {0x0201, "LensType", N_("Lens Type"), N_("Lens type"), IfdId::olympusEqId, SectionId::makerTags, unsignedByte, -1,
671
     print0x0201},
672
    {0x0202, "LensSerialNumber", N_("Lens Serial Number"), N_("Lens serial number"), IfdId::olympusEqId,
673
     SectionId::makerTags, asciiString, -1, printValue},
674
    {0x0203, "LensModel", N_("Lens Model"), N_("Lens model"), IfdId::olympusEqId, SectionId::makerTags, asciiString, -1,
675
     printValue},
676
    {0x0204, "LensFirmwareVersion", N_("Lens Firmware Version"), N_("Lens firmware version"), IfdId::olympusEqId,
677
     SectionId::makerTags, unsignedLong, -1, printValue},
678
    {0x0205, "MaxApertureAtMinFocal", N_("Max Aperture At Min Focal"), N_("Max aperture at min focal"),
679
     IfdId::olympusEqId, SectionId::makerTags, unsignedShort, -1, printValue},
680
    {0x0206, "MaxApertureAtMaxFocal", N_("Max Aperture At Max Focal"), N_("Max aperture at max focal"),
681
     IfdId::olympusEqId, SectionId::makerTags, unsignedShort, -1, printValue},
682
    {0x0207, "MinFocalLength", N_("Min Focal Length"), N_("Min focal length"), IfdId::olympusEqId, SectionId::makerTags,
683
     unsignedShort, -1, printValue},
684
    {0x0208, "MaxFocalLength", N_("Max Focal Length"), N_("Max focal length"), IfdId::olympusEqId, SectionId::makerTags,
685
     unsignedShort, -1, printValue},
686
    {0x020a, "MaxApertureAtCurrentFocal", N_("Max Aperture At Current Focal"), N_("Max aperture at current focal"),
687
     IfdId::olympusEqId, SectionId::makerTags, unsignedShort, -1, printValue},
688
    {0x020b, "LensProperties", N_("Lens Properties"), N_("Lens properties"), IfdId::olympusEqId, SectionId::makerTags,
689
     unsignedShort, -1, printValue},
690
    {0x0301, "Extender", N_("Extender"), N_("Extender"), IfdId::olympusEqId, SectionId::makerTags, unsignedByte, -1,
691
     printEq0x0301},
692
    {0x0302, "ExtenderSerialNumber", N_("Extender Serial Number"), N_("Extender serial number"), IfdId::olympusEqId,
693
     SectionId::makerTags, asciiString, -1, printValue},
694
    {0x0303, "ExtenderModel", N_("Extender Model"), N_("Extender model"), IfdId::olympusEqId, SectionId::makerTags,
695
     asciiString, -1, printValue},
696
    {0x0304, "ExtenderFirmwareVersion", N_("Extender Firmware Version"), N_("Extender firmware version"),
697
     IfdId::olympusEqId, SectionId::makerTags, unsignedLong, -1, printValue},
698
    {0x0403, "ConversionLens", N_("Conversion Lens"), N_("Conversion lens"), IfdId::olympusEqId, SectionId::makerTags,
699
     asciiString, -1, printValue},
700
    {0x1000, "FlashType", N_("Flash Type"), N_("Flash type"), IfdId::olympusEqId, SectionId::makerTags, unsignedShort,
701
     -1, EXV_PRINT_TAG(olympusEqFlashType)},
702
    {0x1001, "FlashModel", N_("Flash Model"), N_("Flash model"), IfdId::olympusEqId, SectionId::makerTags,
703
     unsignedShort, -1, EXV_PRINT_TAG(olympusEqFlashModel)},
704
    {0x1002, "FlashFirmwareVersion", N_("Flash Firmware Version"), N_("Flash firmware version"), IfdId::olympusEqId,
705
     SectionId::makerTags, unsignedLong, -1, printValue},
706
    {0x1003, "FlashSerialNumber", N_("FlashSerialNumber"), N_("FlashSerialNumber"), IfdId::olympusEqId,
707
     SectionId::makerTags, asciiString, -1, printValue},
708
    // End of list marker
709
    {0xffff, "(UnknownOlympusEqTag)", "(UnknownOlympusEqTag)", N_("Unknown OlympusEq tag"), IfdId::olympusEqId,
710
     SectionId::makerTags, asciiString, -1, printValue},
711
};
712
713
//! OlympusRd ColorSpace, tag 0x0108
714
constexpr TagDetails olympusRdColorSpace[] = {
715
    {0, N_("sRGB")},
716
    {1, N_("Adobe RGB")},
717
    {2, N_("Pro Photo RGB")},
718
};
719
720
//! OlympusRd Engine, tag 0x0109
721
constexpr TagDetails olympusRdEngine[] = {
722
    {0, N_("High Speed")},
723
    {1, N_("High Function")},
724
    {2, N_("Advanced High Speed")},
725
    {3, N_("Advanced High Function")},
726
};
727
728
//! OlympusRd EditStatus, tag 0x010b
729
constexpr TagDetails olympusRdEditStatus[] = {
730
    {0, N_("Original")},
731
    {1, N_("Edited (Landscape)")},
732
    {6, N_("Edited (Portrait)")},
733
    {8, N_("Edited (Portrait)")},
734
};
735
736
//! OlympusRd Settings, tag 0x010c
737
constexpr TagDetailsBitmask olympusRdSettings[] = {
738
    {0x0001, N_("WB Color Temp")}, {0x0004, N_("WB Gray Point")},   {0x0008, N_("Saturation")},
739
    {0x0010, N_("Contrast")},      {0x0020, N_("Sharpness")},       {0x0040, N_("Color Space")},
740
    {0x0080, N_("High Function")}, {0x0100, N_("Noise Reduction")},
741
};
742
743
constexpr TagInfo OlympusMakerNote::tagInfoRd_[] = {
744
    {0x0000, "RawDevVersion", N_("Raw Development Version"), N_("Raw development version"), IfdId::olympusRdId,
745
     SectionId::makerTags, undefined, -1, printExifVersion},
746
    {0x0100, "ExposureBiasValue", N_("Exposure Bias Value"), N_("Exposure bias value"), IfdId::olympusRdId,
747
     SectionId::makerTags, signedRational, -1, printValue},
748
    {0x0101, "WhiteBalanceValue", N_("White Balance Value"), N_("White balance value"), IfdId::olympusRdId,
749
     SectionId::makerTags, unsignedShort, -1, printValue},
750
    {0x0102, "WBFineAdjustment", N_("WB Fine Adjustment"), N_("WB fine adjustment"), IfdId::olympusRdId,
751
     SectionId::makerTags, signedShort, -1, printValue},
752
    {0x0103, "GrayPoint", N_("Gray Point"), N_("Gray point"), IfdId::olympusRdId, SectionId::makerTags, unsignedShort,
753
     -1, printValue},
754
    {0x0104, "SaturationEmphasis", N_("Saturation Emphasis"), N_("Saturation emphasis"), IfdId::olympusRdId,
755
     SectionId::makerTags, signedShort, -1, printValue},
756
    {0x0105, "MemoryColorEmphasis", N_("Memory Color Emphasis"), N_("Memory color emphasis"), IfdId::olympusRdId,
757
     SectionId::makerTags, unsignedShort, -1, printValue},
758
    {0x0106, "ContrastValue", N_("Contrast Value"), N_("Contrast value"), IfdId::olympusRdId, SectionId::makerTags,
759
     signedShort, -1, printValue},
760
    {0x0107, "SharpnessValue", N_("Sharpness Value"), N_("Sharpness value"), IfdId::olympusRdId, SectionId::makerTags,
761
     signedShort, -1, printValue},
762
    {0x0108, "ColorSpace", N_("Color Space"), N_("Color space"), IfdId::olympusRdId, SectionId::makerTags,
763
     unsignedShort, -1, EXV_PRINT_TAG(olympusRdColorSpace)},
764
    {0x0109, "Engine", N_("Engine"), N_("Engine"), IfdId::olympusRdId, SectionId::makerTags, unsignedShort, -1,
765
     EXV_PRINT_TAG(olympusRdEngine)},
766
    {0x010a, "NoiseReduction", N_("Noise Reduction"), N_("Noise reduction"), IfdId::olympusRdId, SectionId::makerTags,
767
     unsignedShort, -1, EXV_PRINT_TAG_BITMASK(olympusNoiseReduction)},
768
    {0x010b, "EditStatus", N_("Edit Status"), N_("Edit status"), IfdId::olympusRdId, SectionId::makerTags,
769
     unsignedShort, -1, EXV_PRINT_TAG(olympusRdEditStatus)},
770
    {0x010c, "Settings", N_("Settings"), N_("Settings"), IfdId::olympusRdId, SectionId::makerTags, unsignedShort, -1,
771
     EXV_PRINT_TAG_BITMASK(olympusRdSettings)},
772
    // End of list marker
773
    {0xffff, "(UnknownOlympusRdTag)", "(UnknownOlympusRdTag)", N_("Unknown OlympusRd tag"), IfdId::olympusRdId,
774
     SectionId::makerTags, asciiString, -1, printValue},
775
};
776
777
//! OlympusRd2 WhiteBalance, tag 0x0101
778
constexpr TagDetails olympusRd2WhiteBalance[] = {
779
    {1, N_("Color Temperature")},
780
    {2, N_("Gray Point")},
781
};
782
783
//! OlympusRd2 ColorSpace, tag 0x0109
784
constexpr TagDetails olympusRd2ColorSpace[] = {
785
    {0, N_("sRGB")},
786
    {1, N_("Adobe RGB")},
787
    {2, N_("Pro Photo RGB")},
788
};
789
790
//! OlympusRd2 Engine, tag 0x010b
791
constexpr TagDetails olympusRd2Engine[] = {
792
    {0, N_("High Speed")},
793
    {1, N_("High Function")},
794
};
795
796
//! OlympusRd2 PictureMode, tag 0x010c
797
constexpr TagDetails olympusRd2PictureMode[] = {
798
    {1, N_("Vivid")}, {2, N_("Natural")}, {3, N_("Muted")}, {256, N_("Monotone")}, {512, N_("Sepia")},
799
};
800
801
//! OlympusRd2 PM_BWFilter, tag 0x0110
802
constexpr TagDetails olympusRd2PM_BWFilter[] = {
803
    {1, N_("Neutral")}, {2, N_("Yellow")}, {3, N_("Orange")}, {4, N_("Red")}, {5, N_("Green")},
804
};
805
806
//! OlympusRd2 PMPictureTone, tag 0x0111
807
constexpr TagDetails olympusRd2PMPictureTone[] = {
808
    {1, N_("Neutral")}, {2, N_("Sepia")}, {3, N_("Blue")}, {4, N_("Purple")}, {5, N_("Green")},
809
};
810
811
constexpr TagInfo OlympusMakerNote::tagInfoRd2_[] = {
812
    {0x0000, "RawDev2Version", N_("Raw Development 2 Version"), N_("Raw development 2 version"), IfdId::olympusRd2Id,
813
     SectionId::makerTags, undefined, -1, printExifVersion},
814
    {0x0100, "ExposureBiasValue", N_("Exposure Bias Value"), N_("Exposure bias value"), IfdId::olympusRd2Id,
815
     SectionId::makerTags, signedRational, -1, printValue},
816
    {0x0101, "WhiteBalance", N_("White Balance"), N_("White balance"), IfdId::olympusRd2Id, SectionId::makerTags,
817
     unsignedShort, -1, EXV_PRINT_TAG(olympusRd2WhiteBalance)},
818
    {0x0102, "WhiteBalanceValue", N_("White Balance Value"), N_("White balance value"), IfdId::olympusRd2Id,
819
     SectionId::makerTags, unsignedShort, -1, printValue},
820
    {0x0103, "WBFineAdjustment", N_("WB Fine Adjustment"), N_("White balance fine adjustment"), IfdId::olympusRd2Id,
821
     SectionId::makerTags, signedShort, -1, printValue},
822
    {0x0104, "GrayPoint", N_("Gray Point"), N_("Gray point"), IfdId::olympusRd2Id, SectionId::makerTags, unsignedShort,
823
     -1, printValue},
824
    {0x0105, "ContrastValue", N_("Contrast Value"), N_("Contrast value"), IfdId::olympusRd2Id, SectionId::makerTags,
825
     signedShort, -1, printValue},
826
    {0x0106, "SharpnessValue", N_("Sharpness Value"), N_("Sharpness value"), IfdId::olympusRd2Id, SectionId::makerTags,
827
     signedShort, -1, printValue},
828
    {0x0107, "SaturationEmphasis", N_("Saturation Emphasis"), N_("Saturation emphasis"), IfdId::olympusRd2Id,
829
     SectionId::makerTags, signedShort, -1, printValue},
830
    {0x0108, "MemoryColorEmphasis", N_("Memory Color Emphasis"), N_("Memory color emphasis"), IfdId::olympusRd2Id,
831
     SectionId::makerTags, unsignedShort, -1, printValue},
832
    {0x0109, "ColorSpace", N_("Color Space"), N_("Color space"), IfdId::olympusRd2Id, SectionId::makerTags,
833
     unsignedShort, -1, EXV_PRINT_TAG(olympusRd2ColorSpace)},
834
    {0x010a, "NoiseReduction", N_("Noise Reduction"), N_("Noise reduction"), IfdId::olympusRd2Id, SectionId::makerTags,
835
     unsignedShort, -1, EXV_PRINT_TAG_BITMASK(olympusNoiseReduction)},
836
    {0x010b, "Engine", N_("Engine"), N_("Engine"), IfdId::olympusRd2Id, SectionId::makerTags, unsignedShort, -1,
837
     EXV_PRINT_TAG(olympusRd2Engine)},
838
    {0x010c, "PictureMode", N_("Picture Mode"), N_("Picture mode"), IfdId::olympusRd2Id, SectionId::makerTags,
839
     unsignedShort, -1, EXV_PRINT_TAG(olympusRd2PictureMode)},
840
    {0x010d, "PMSaturation", N_("PM Saturation"), N_("Picture mode saturation"), IfdId::olympusRd2Id,
841
     SectionId::makerTags, signedShort, -1, printValue},
842
    {0x010e, "PMContrast", N_("PM Contrast"), N_("Picture mode contrast"), IfdId::olympusRd2Id, SectionId::makerTags,
843
     signedShort, -1, printValue},
844
    {0x010f, "PMSharpness", N_("PM Sharpness"), N_("Picture mode sharpness"), IfdId::olympusRd2Id, SectionId::makerTags,
845
     signedShort, -1, printValue},
846
    {0x0110, "PM_BWFilter", N_("PM BW Filter"), N_("PM BW filter"), IfdId::olympusRd2Id, SectionId::makerTags,
847
     unsignedShort, -1, EXV_PRINT_TAG(olympusRd2PM_BWFilter)},
848
    {0x0111, "PMPictureTone", N_("PM Picture Tone"), N_("PM picture tone"), IfdId::olympusRd2Id, SectionId::makerTags,
849
     unsignedShort, -1, EXV_PRINT_TAG(olympusRd2PMPictureTone)},
850
    {0x0112, "Gradation", N_("Gradation"), N_("Gradation"), IfdId::olympusRd2Id, SectionId::makerTags, signedShort, -1,
851
     printValue},
852
    {0x0113, "Saturation", N_("Saturation"), N_("Saturation"), IfdId::olympusRd2Id, SectionId::makerTags, signedShort,
853
     -1, printValue},
854
    {0x0119, "AutoGradation", N_("Auto Gradation"), N_("Auto gradation"), IfdId::olympusRd2Id, SectionId::makerTags,
855
     unsignedShort, -1, EXV_PRINT_TAG(olympusOffOn)},
856
    {0x0120, "PMNoiseFilter", N_("PM Noise Filter"), N_("Picture mode noise filter"), IfdId::olympusRd2Id,
857
     SectionId::makerTags, unsignedShort, -1, printValue},
858
    // End of list marker
859
    {0xffff, "(UnknownOlympusRd2Tag)", "(UnknownOlympusRd2Tag)", N_("Unknown OlympusRd2 tag"), IfdId::olympusRd2Id,
860
     SectionId::makerTags, asciiString, -1, printValue},
861
};
862
863
//! OlympusIp MultipleExposureMode, tag 0x101c
864
constexpr TagDetails olympusIpMultipleExposureMode[] = {
865
    {0, N_("Off")},
866
    {2, N_("On (2 frames)")},
867
    {3, N_("On (3 frames)")},
868
};
869
870
//! OlympusIp olympusIpAspectRatio, tag 0x101c
871
constexpr TagDetails olympusIpAspectRatio[] = {
872
    {1, "4:3"}, {2, "3:2"}, {3, "16:9"}, {4, "6:6"}, {5, "5:4"}, {6, "7:6"}, {7, "6:5"}, {8, "7:5"}, {9, "3:4"},
873
};
874
875
constexpr TagInfo OlympusMakerNote::tagInfoIp_[] = {
876
    {0x0000, "ImageProcessingVersion", N_("Image Processing Version"), N_("Image processing version"),
877
     IfdId::olympusIpId, SectionId::makerTags, undefined, -1, printExifVersion},
878
    {0x0100, "WB_RBLevels", N_("WB RB Levels"), N_("WB RB levels"), IfdId::olympusIpId, SectionId::makerTags,
879
     unsignedShort, -1, printValue},
880
    {0x0102, "WB_RBLevels3000K", N_("WB RB Levels 3000K"), N_("WB RB levels 3000K"), IfdId::olympusIpId,
881
     SectionId::makerTags, unsignedShort, -1, printValue},
882
    {0x0103, "WB_RBLevels3300K", N_("WB RB Levels 3300K"), N_("WB RB levels 3300K"), IfdId::olympusIpId,
883
     SectionId::makerTags, unsignedShort, -1, printValue},
884
    {0x0104, "WB_RBLevels3600K", N_("WB RB Levels 3600K"), N_("WB RB levels 3600K"), IfdId::olympusIpId,
885
     SectionId::makerTags, unsignedShort, -1, printValue},
886
    {0x0105, "WB_RBLevels3900K", N_("WB RB Levels 3900K"), N_("WB RB levels 3900K"), IfdId::olympusIpId,
887
     SectionId::makerTags, unsignedShort, -1, printValue},
888
    {0x0106, "WB_RBLevels4000K", N_("WB RB Levels 4000K"), N_("WB RB levels 4000K"), IfdId::olympusIpId,
889
     SectionId::makerTags, unsignedShort, -1, printValue},
890
    {0x0107, "WB_RBLevels4300K", N_("WB RB Levels 4300K"), N_("WB RB levels 4300K"), IfdId::olympusIpId,
891
     SectionId::makerTags, unsignedShort, -1, printValue},
892
    {0x0108, "WB_RBLevels4500K", N_("WB RB Levels 4500K"), N_("WB RB levels 4500K"), IfdId::olympusIpId,
893
     SectionId::makerTags, unsignedShort, -1, printValue},
894
    {0x0109, "WB_RBLevels4800K", N_("WB RB Levels 4800K"), N_("WB RB levels 4800K"), IfdId::olympusIpId,
895
     SectionId::makerTags, unsignedShort, -1, printValue},
896
    {0x010a, "WB_RBLevels5300K", N_("WB RB Levels 5300K"), N_("WB RB levels 5300K"), IfdId::olympusIpId,
897
     SectionId::makerTags, unsignedShort, -1, printValue},
898
    {0x010b, "WB_RBLevels6000K", N_("WB RB Levels 6000K"), N_("WB RB levels 6000K"), IfdId::olympusIpId,
899
     SectionId::makerTags, unsignedShort, -1, printValue},
900
    {0x010c, "WB_RBLevels6600K", N_("WB RB Levels 6600K"), N_("WB RB levels 6600K"), IfdId::olympusIpId,
901
     SectionId::makerTags, unsignedShort, -1, printValue},
902
    {0x010d, "WB_RBLevels7500K", N_("WB RB Levels 7500K"), N_("WB RB levels 7500K"), IfdId::olympusIpId,
903
     SectionId::makerTags, unsignedShort, -1, printValue},
904
    {0x010e, "WB_RBLevelsCWB1", N_("WB RB Levels CWB1"), N_("WB RB levels CWB1"), IfdId::olympusIpId,
905
     SectionId::makerTags, unsignedShort, -1, printValue},
906
    {0x010f, "WB_RBLevelsCWB2", N_("WB RB Levels CWB2"), N_("WB RB levels CWB2"), IfdId::olympusIpId,
907
     SectionId::makerTags, unsignedShort, -1, printValue},
908
    {0x0110, "WB_RBLevelsCWB3", N_("WB RB Levels CWB3"), N_("WB RB levels CWB3"), IfdId::olympusIpId,
909
     SectionId::makerTags, unsignedShort, -1, printValue},
910
    {0x0111, "WB_RBLevelsCWB4", N_("WB RB Levels CWB4"), N_("WB RB levels CWB4"), IfdId::olympusIpId,
911
     SectionId::makerTags, unsignedShort, -1, printValue},
912
    {0x0113, "WB_GLevel3000K", N_("WB G Level 3000K"), N_("WB G level 3000K"), IfdId::olympusIpId, SectionId::makerTags,
913
     unsignedShort, -1, printValue},
914
    {0x0114, "WB_GLevel3300K", N_("WB G Level 3300K"), N_("WB G level 3300K"), IfdId::olympusIpId, SectionId::makerTags,
915
     unsignedShort, -1, printValue},
916
    {0x0115, "WB_GLevel3600K", N_("WB G Level 3600K"), N_("WB G level 3600K"), IfdId::olympusIpId, SectionId::makerTags,
917
     unsignedShort, -1, printValue},
918
    {0x0116, "WB_GLevel3900K", N_("WB G Level 3900K"), N_("WB G level 3900K"), IfdId::olympusIpId, SectionId::makerTags,
919
     unsignedShort, -1, printValue},
920
    {0x0117, "WB_GLevel4000K", N_("WB G Level 4000K"), N_("WB G level 4000K"), IfdId::olympusIpId, SectionId::makerTags,
921
     unsignedShort, -1, printValue},
922
    {0x0118, "WB_GLevel4300K", N_("WB G Level 4300K"), N_("WB G level 4300K"), IfdId::olympusIpId, SectionId::makerTags,
923
     unsignedShort, -1, printValue},
924
    {0x0119, "WB_GLevel4500K", N_("WB G Level 4500K"), N_("WB G level 4500K"), IfdId::olympusIpId, SectionId::makerTags,
925
     unsignedShort, -1, printValue},
926
    {0x011a, "WB_GLevel4800K", N_("WB G Level 4800K"), N_("WB G level 4800K"), IfdId::olympusIpId, SectionId::makerTags,
927
     unsignedShort, -1, printValue},
928
    {0x011b, "WB_GLevel5300K", N_("WB G Level 5300K"), N_("WB G level 5300K"), IfdId::olympusIpId, SectionId::makerTags,
929
     unsignedShort, -1, printValue},
930
    {0x011c, "WB_GLevel6000K", N_("WB G Level 6000K"), N_("WB G level 6000K"), IfdId::olympusIpId, SectionId::makerTags,
931
     unsignedShort, -1, printValue},
932
    {0x011d, "WB_GLevel6600K", N_("WB G Level 6600K"), N_("WB G level 6600K"), IfdId::olympusIpId, SectionId::makerTags,
933
     unsignedShort, -1, printValue},
934
    {0x011e, "WB_GLevel7500K", N_("WB G Level 7500K"), N_("WB G level 7500K"), IfdId::olympusIpId, SectionId::makerTags,
935
     unsignedShort, -1, printValue},
936
    {0x011f, "WB_GLevel", N_("WB G Level"), N_("WB G level"), IfdId::olympusIpId, SectionId::makerTags, unsignedShort,
937
     -1, printValue},
938
    {0x0200, "ColorMatrix", N_("Color Matrix"), N_("Color matrix"), IfdId::olympusIpId, SectionId::makerTags,
939
     unsignedShort, -1, printValue},
940
    {0x0300, "Enhancer", N_("Enhancer"), N_("Enhancer"), IfdId::olympusIpId, SectionId::makerTags, unsignedShort, -1,
941
     printValue},
942
    {0x0301, "EnhancerValues", N_("Enhancer Values"), N_("Enhancer values"), IfdId::olympusIpId, SectionId::makerTags,
943
     unsignedShort, -1, printValue},
944
    {0x0310, "CoringFilter", N_("Coring Filter"), N_("Coring filter"), IfdId::olympusIpId, SectionId::makerTags,
945
     unsignedShort, -1, printValue},
946
    {0x0311, "CoringValues", N_("Coring Values"), N_("Coring values"), IfdId::olympusIpId, SectionId::makerTags,
947
     unsignedShort, -1, printValue},
948
    {0x0600, "BlackLevel", N_("Black Level"), N_("Black level"), IfdId::olympusIpId, SectionId::makerTags,
949
     unsignedShort, -1, printValue},
950
    {0x0610, "GainBase", N_("Gain Base"), N_("Gain base"), IfdId::olympusIpId, SectionId::makerTags, unsignedShort, -1,
951
     printValue},
952
    {0x0611, "ValidBits", N_("Valid Bits"), N_("Valid bits"), IfdId::olympusIpId, SectionId::makerTags, unsignedShort,
953
     -1, printValue},
954
    {0x0612, "CropLeft", N_("Crop Left"), N_("Crop left"), IfdId::olympusIpId, SectionId::makerTags, unsignedShort, -1,
955
     printValue},
956
    {0x0613, "CropTop", N_("Crop Top"), N_("Crop top"), IfdId::olympusIpId, SectionId::makerTags, unsignedShort, -1,
957
     printValue},
958
    {0x0614, "CropWidth", N_("Crop Width"), N_("Crop width"), IfdId::olympusIpId, SectionId::makerTags, unsignedLong,
959
     -1, printValue},
960
    {0x0615, "CropHeight", N_("Crop Height"), N_("Crop height"), IfdId::olympusIpId, SectionId::makerTags, unsignedLong,
961
     -1, printValue},
962
    {0x1010, "NoiseReduction", N_("Noise Reduction"), N_("Noise reduction"), IfdId::olympusIpId, SectionId::makerTags,
963
     unsignedShort, -1, EXV_PRINT_TAG_BITMASK(olympusNoiseReduction)},
964
    {0x1011, "DistortionCorrection", N_("Distortion Correction"), N_("Distortion correction"), IfdId::olympusIpId,
965
     SectionId::makerTags, unsignedShort, -1, EXV_PRINT_TAG(olympusOffOn)},
966
    {0x1012, "ShadingCompensation", N_("Shading Compensation"), N_("Shading compensation"), IfdId::olympusIpId,
967
     SectionId::makerTags, unsignedShort, -1, EXV_PRINT_TAG(olympusOffOn)},
968
    {0x101c, "MultipleExposureMode", N_("Multiple Exposure Mode"), N_("Multiple exposure mode"), IfdId::olympusIpId,
969
     SectionId::makerTags, unsignedShort, -1, EXV_PRINT_TAG(olympusIpMultipleExposureMode)},
970
    {0x1112, "AspectRatio", N_("Aspect Ratio"), N_("Aspect ratio"), IfdId::olympusIpId, SectionId::makerTags,
971
     unsignedByte, -1, EXV_PRINT_TAG(olympusIpAspectRatio)},
972
    {0x1113, "AspectFrame", N_("Aspect Frame"), N_("Aspect frame"), IfdId::olympusIpId, SectionId::makerTags,
973
     unsignedShort, -1, printValue},
974
    {0x1200, "FaceDetect", N_("Face Detect"), N_("Face detect"), IfdId::olympusIpId, SectionId::makerTags, unsignedLong,
975
     -1, EXV_PRINT_TAG(olympusOffOn)},
976
    {0x1201, "FaceDetectArea", N_("Face Detect Area"), N_("Face detect area"), IfdId::olympusIpId, SectionId::makerTags,
977
     signedShort, -1, printValue},
978
    // End of list marker
979
    {0xffff, "(UnknownOlympusIpTag)", "(UnknownOlympusIpTag)", N_("Unknown OlympusIp tag"), IfdId::olympusIpId,
980
     SectionId::makerTags, asciiString, -1, printValue},
981
};
982
983
//! OlympusFi ExternalFlashBounce, tag 0x1204
984
constexpr TagDetails olympusFiExternalFlashBounce[] = {
985
    {0, N_("Bounce or Off")},
986
    {1, N_("Direct")},
987
};
988
989
constexpr TagInfo OlympusMakerNote::tagInfoFi_[] = {
990
    {0x0000, "FocusInfoVersion", N_("Focus Info Version"), N_("Focus info version"), IfdId::olympusFiId,
991
     SectionId::makerTags, undefined, -1, printExifVersion},
992
    {0x0209, "AutoFocus", N_("Auto Focus"), N_("Auto focus"), IfdId::olympusFiId, SectionId::makerTags, unsignedShort,
993
     -1, EXV_PRINT_TAG(olympusOffOn)},
994
    {0x0210, "SceneDetect", N_("Scene Detect"), N_("Scene detect"), IfdId::olympusFiId, SectionId::makerTags,
995
     unsignedShort, -1, printValue},
996
    {0x0211, "SceneArea", N_("Scene Area"), N_("Scene area"), IfdId::olympusFiId, SectionId::makerTags, unsignedLong,
997
     -1, printValue},
998
    {0x0212, "SceneDetectData", N_("Scene Detect Data"), N_("Scene detect data"), IfdId::olympusFiId,
999
     SectionId::makerTags, unsignedLong, -1, printValue},
1000
    {0x0300, "ZoomStepCount", N_("Zoom Step Count"), N_("Zoom step count"), IfdId::olympusFiId, SectionId::makerTags,
1001
     unsignedShort, -1, printValue},
1002
    {0x0301, "FocusStepCount", N_("Focus Step Count"), N_("Focus step count"), IfdId::olympusFiId, SectionId::makerTags,
1003
     unsignedShort, -1, printValue},
1004
    {0x0303, "FocusStepInfinity", N_("Focus Step Infinity"), N_("Focus step infinity"), IfdId::olympusFiId,
1005
     SectionId::makerTags, unsignedShort, -1, printValue},
1006
    {0x0304, "FocusStepNear", N_("Focus Step Near"), N_("Focus step near"), IfdId::olympusFiId, SectionId::makerTags,
1007
     unsignedShort, -1, printValue},
1008
    {0x0305, "FocusDistance", N_("Focus Distance"), N_("Focus distance"), IfdId::olympusFiId, SectionId::makerTags,
1009
     unsignedRational, -1, print0x0305},
1010
    {0x0308, "AFPoint", N_("AF Point"), N_("AF point"), IfdId::olympusFiId, SectionId::makerTags, unsignedShort, -1,
1011
     print0x0308},
1012
    {0x1201, "ExternalFlash", N_("External Flash"), N_("External flash"), IfdId::olympusFiId, SectionId::makerTags,
1013
     unsignedShort, -1, EXV_PRINT_TAG(olympusOffOn)},
1014
    {0x1203, "ExternalFlashGuideNumber", N_("External Flash Guide Number"), N_("External flash guide number"),
1015
     IfdId::olympusFiId, SectionId::makerTags, signedRational, -1, printValue},
1016
    {0x1204, "ExternalFlashBounce", N_("External Flash Bounce"), N_("External flash bounce"), IfdId::olympusFiId,
1017
     SectionId::makerTags, unsignedShort, -1, EXV_PRINT_TAG(olympusFiExternalFlashBounce)},
1018
    {0x1205, "ExternalFlashZoom", N_("External Flash Zoom"), N_("External flash zoom"), IfdId::olympusFiId,
1019
     SectionId::makerTags, unsignedRational, -1, printValue},
1020
    {0x1208, "InternalFlash", N_("Internal Flash"), N_("Internal flash"), IfdId::olympusFiId, SectionId::makerTags,
1021
     unsignedShort, -1, EXV_PRINT_TAG(olympusOffOn)},
1022
    {0x1209, "ManualFlash", N_("Manual Flash"), N_("Manual flash"), IfdId::olympusFiId, SectionId::makerTags,
1023
     unsignedShort, -1, print0x1209},
1024
    {0x1500, "SensorTemperature", N_("Sensor Temperature"), N_("Sensor temperature"), IfdId::olympusFiId,
1025
     SectionId::makerTags, signedShort, -1, printValue},
1026
    {0x1600, "ImageStabilization", N_("Image Stabilization"), N_("Image stabilization"), IfdId::olympusFiId,
1027
     SectionId::makerTags, unsignedLong, -1, printValue},
1028
    // End of list marker
1029
    {0xffff, "(UnknownOlympusFiTag)", "(UnknownOlympusFiTag)", N_("Unknown OlympusFi tag"), IfdId::olympusFiId,
1030
     SectionId::makerTags, asciiString, -1, printValue},
1031
};
1032
1033
constexpr TagInfo OlympusMakerNote::tagInfoFe_[] = {
1034
    {0x0100, "BodyFirmwareVersion", N_("Body Firmware Version"), N_("Body firmware version"), IfdId::olympusFe1Id,
1035
     SectionId::makerTags, asciiString, -1, printValue},
1036
    // End of list marker
1037
    {0xffff, "(UnknownOlympusFeTag)", "(UnknownOlympusFeTag)", N_("Unknown OlympusFe tag"), IfdId::olympusFe1Id,
1038
     SectionId::makerTags, asciiString, -1, printValue},
1039
};
1040
1041
//! OlympusRi LightSource, tag 0x1000
1042
constexpr TagDetails olympusRiLightSource[] = {
1043
    {0, N_("Unknown")},
1044
    {16, N_("Shade")},
1045
    {17, N_("Cloudy")},
1046
    {18, N_("Fine Weather")},
1047
    {20, N_("Tungsten (incandescent)")},
1048
    {22, N_("Evening Sunlight")},
1049
    {33, N_("Daylight Fluorescent (D 5700 - 7100K)")},
1050
    {34, N_("Day White Fluorescent (N 4600 - 5400K)")},
1051
    {35, N_("Cool White Fluorescent (W 3900 - 4500K)")},
1052
    {36, N_("White Fluorescent (WW 3200 - 3700K)")},
1053
    {256, N_("One Touch White Balance")},
1054
    {512, N_("Custom 1-4")},
1055
};
1056
1057
constexpr TagInfo OlympusMakerNote::tagInfoRi_[] = {
1058
    {0x0000, "RawInfoVersion", N_("Raw Info Version"), N_("Raw info version"), IfdId::olympusRiId, SectionId::makerTags,
1059
     undefined, -1, printValue},
1060
    {0x0100, "WB_RBLevelsUsed", N_("WB_RB Levels Used"), N_("WB_RB levels used"), IfdId::olympusRiId,
1061
     SectionId::makerTags, unsignedShort, -1, printValue},
1062
    {0x0110, "WB_RBLevelsAuto", N_("WB_RB Levels Auto"), N_("WB_RB levels auto"), IfdId::olympusRiId,
1063
     SectionId::makerTags, unsignedShort, -1, printValue},
1064
    {0x0120, "WB_RBLevelsShade", N_("WB_RB Levels Shade"), N_("WB_RB levels shade"), IfdId::olympusRiId,
1065
     SectionId::makerTags, unsignedShort, -1, printValue},
1066
    {0x0121, "WB_RBLevelsCloudy", N_("WB_RB Levels Cloudy"), N_("WB_RB levels cloudy"), IfdId::olympusRiId,
1067
     SectionId::makerTags, unsignedShort, -1, printValue},
1068
    {0x0122, "WB_RBLevelsFineWeather", N_("WB_RB Levels Fine Weather"), N_("WB_RB levels fine weather"),
1069
     IfdId::olympusRiId, SectionId::makerTags, unsignedShort, -1, printValue},
1070
    {0x0123, "WB_RBLevelsTungsten", N_("WB_RB Levels Tungsten"), N_("WB_RB levels tungsten"), IfdId::olympusRiId,
1071
     SectionId::makerTags, unsignedShort, -1, printValue},
1072
    {0x0124, "WB_RBLevelsEveningSunlight", N_("WB_RB Levels Evening Sunlight"), N_("WB_RB levels evening sunlight"),
1073
     IfdId::olympusRiId, SectionId::makerTags, unsignedShort, -1, printValue},
1074
    {0x0130, "WB_RBLevelsDaylightFluor", N_("WB_RB Levels Daylight Fluor"), N_("WB_RB levels daylight fluor"),
1075
     IfdId::olympusRiId, SectionId::makerTags, unsignedShort, -1, printValue},
1076
    {0x0131, "WB_RBLevelsDayWhiteFluor", N_("WB_RB Levels Day White Fluor"), N_("WB_RB levels day white fluor"),
1077
     IfdId::olympusRiId, SectionId::makerTags, unsignedShort, -1, printValue},
1078
    {0x0132, "WB_RBLevelsCoolWhiteFluor", N_("WB_RB Levels Cool White Fluor"), N_("WB_RB levels cool white fluor"),
1079
     IfdId::olympusRiId, SectionId::makerTags, unsignedShort, -1, printValue},
1080
    {0x0133, "WB_RBLevelsWhiteFluorescent", N_("WB_RB Levels White Fluorescent"), N_("WB_RB levels white fluorescent"),
1081
     IfdId::olympusRiId, SectionId::makerTags, unsignedShort, -1, printValue},
1082
    {0x0200, "ColorMatrix2", N_("Color Matrix2"), N_("Color matrix 2"), IfdId::olympusRiId, SectionId::makerTags,
1083
     unsignedShort, -1, printValue},
1084
    {0x0310, "CoringFilter", N_("Coring Filter"), N_("Coring filter"), IfdId::olympusRiId, SectionId::makerTags,
1085
     unsignedShort, -1, printValue},
1086
    {0x0311, "CoringValues", N_("Coring Values"), N_("Coring values"), IfdId::olympusRiId, SectionId::makerTags,
1087
     unsignedShort, -1, printValue},
1088
    {0x0600, "BlackLevel2", N_("Black Level 2"), N_("Black level 2"), IfdId::olympusRiId, SectionId::makerTags,
1089
     unsignedShort, -1, printValue},
1090
    {0x0601, "YCbCrCoefficients", N_("YCbCr Coefficients"), N_("YCbCr coefficients"), IfdId::olympusRiId,
1091
     SectionId::makerTags, unsignedShort, -1, printValue},
1092
    {0x0611, "ValidPixelDepth", N_("Valid Pixel Depth"), N_("Valid pixel depth"), IfdId::olympusRiId,
1093
     SectionId::makerTags, unsignedShort, -1, printValue},
1094
    {0x0612, "CropLeft", N_("Crop Left"), N_("Crop left"), IfdId::olympusRiId, SectionId::makerTags, unsignedShort, -1,
1095
     printValue},
1096
    {0x0613, "CropTop", N_("Crop Top"), N_("Crop top"), IfdId::olympusRiId, SectionId::makerTags, unsignedShort, -1,
1097
     printValue},
1098
    {0x0614, "CropWidth", N_("Crop Width"), N_("Crop width"), IfdId::olympusRiId, SectionId::makerTags, unsignedLong,
1099
     -1, printValue},
1100
    {0x0615, "CropHeight", N_("Crop Height"), N_("Crop height"), IfdId::olympusRiId, SectionId::makerTags, unsignedLong,
1101
     -1, printValue},
1102
    {0x1000, "LightSource", N_("Light Source"), N_("Light source"), IfdId::olympusRiId, SectionId::makerTags,
1103
     unsignedShort, -1, EXV_PRINT_TAG(olympusRiLightSource)},
1104
    {0x1001, "WhiteBalanceComp", N_("White Balance Comp"), N_("White balance comp"), IfdId::olympusRiId,
1105
     SectionId::makerTags, signedShort, -1, printValue},
1106
    {0x1010, "SaturationSetting", N_("Saturation Setting"), N_("Saturation setting"), IfdId::olympusRiId,
1107
     SectionId::makerTags, signedShort, -1, printValue},
1108
    {0x1011, "HueSetting", N_("Hue Setting"), N_("Hue setting"), IfdId::olympusRiId, SectionId::makerTags, signedShort,
1109
     -1, printValue},
1110
    {0x1012, "ContrastSetting", N_("Contrast Setting"), N_("Contrast setting"), IfdId::olympusRiId,
1111
     SectionId::makerTags, signedShort, -1, printValue},
1112
    {0x1013, "SharpnessSetting", N_("Sharpness Setting"), N_("Sharpness setting"), IfdId::olympusRiId,
1113
     SectionId::makerTags, signedShort, -1, printValue},
1114
    {0x2000, "CMExposureCompensation", N_("CM Exposure Compensation"), N_("CM exposure compensation"),
1115
     IfdId::olympusRiId, SectionId::makerTags, signedRational, -1, printValue},
1116
    {0x2001, "CMWhiteBalance", N_("CM White Balance"), N_("CM white balance"), IfdId::olympusRiId, SectionId::makerTags,
1117
     unsignedShort, -1, printValue},
1118
    {0x2002, "CMWhiteBalanceComp", N_("CM White Balance Comp"), N_("CM white balance comp"), IfdId::olympusRiId,
1119
     SectionId::makerTags, signedShort, -1, printValue},
1120
    {0x2010, "CMWhiteBalanceGrayPoint", N_("CM White Balance Gray Point"), N_("CM white balance gray point"),
1121
     IfdId::olympusRiId, SectionId::makerTags, unsignedShort, -1, printValue},
1122
    {0x2020, "CMSaturation", N_("CM Saturation"), N_("CM saturation"), IfdId::olympusRiId, SectionId::makerTags,
1123
     signedShort, -1, printValue},
1124
    {0x2021, "CMHue", N_("CM Hue"), N_("CM hue"), IfdId::olympusRiId, SectionId::makerTags, signedShort, -1,
1125
     printValue},
1126
    {0x2022, "CMContrast", N_("CM Contrast"), N_("CM contrast"), IfdId::olympusRiId, SectionId::makerTags, signedShort,
1127
     -1, printValue},
1128
    {0x2023, "CMSharpness", N_("CM Sharpness"), N_("CM sharpness"), IfdId::olympusRiId, SectionId::makerTags,
1129
     signedShort, -1, printValue},
1130
    // End of list marker
1131
    {0xffff, "(UnknownOlympusRiTag)", "(UnknownOlympusRiTag)", N_("Unknown OlympusRi tag"), IfdId::olympusRiId,
1132
     SectionId::makerTags, asciiString, -1, printValue},
1133
};
1134
1135
// Gradation
1136
0
std::ostream& OlympusMakerNote::print0x050f(std::ostream& os, const Value& value, const ExifData*) {
1137
0
  if ((value.count() != 3 && value.count() != 4) || value.typeId() != signedShort) {
1138
0
    return os << value;
1139
0
  }
1140
1141
0
  if (value.toInt64(0) == -1 && value.toInt64(1) == -1 && value.toInt64(2) == 1)
1142
0
    os << _("Low Key");
1143
0
  else if (value.toInt64(0) == 0 && value.toInt64(1) == -1 && value.toInt64(2) == 1)
1144
0
    os << _("Normal");
1145
0
  else if (value.toInt64(0) == 1 && value.toInt64(1) == -1 && value.toInt64(2) == 1)
1146
0
    os << _("High Key");
1147
0
  else
1148
0
    os << value.toInt64(0) << " " << value.toInt64(1) << " " << value.toInt64(2);
1149
1150
0
  if (value.count() == 4) {
1151
0
    switch (value.toInt64(3)) {
1152
0
      case 0:
1153
0
        os << ", " << _("User-Selected");
1154
0
        break;
1155
0
      case 1:
1156
0
        os << ", " << _("Auto-Override");
1157
0
        break;
1158
0
      default:
1159
0
        os << value.toInt64(3);
1160
0
        break;
1161
0
    }
1162
0
  }
1163
0
  return os;
1164
0
}
1165
1166
// Olympus CameraSettings tag 0x0527 NoiseFilter
1167
0
std::ostream& OlympusMakerNote::print0x0527(std::ostream& os, const Value& value, const ExifData*) {
1168
0
  if (value.count() != 3 || value.typeId() != signedShort || value.toInt64(1) != -2 || value.toInt64(2) != 1) {
1169
0
    return os << value;
1170
0
  }
1171
1172
0
  switch (value.toInt64(0)) {
1173
0
    case -2:
1174
0
      os << _("Off");
1175
0
      break;
1176
0
    case -1:
1177
0
      os << _("Low");
1178
0
      break;
1179
0
    case 0:
1180
0
      os << _("Standard");
1181
0
      break;
1182
0
    case 1:
1183
0
      os << _("High");
1184
0
      break;
1185
0
    default:
1186
0
      os << value.toInt64(0);
1187
0
      break;
1188
0
  }
1189
1190
0
  return os;
1191
0
}
1192
1193
0
std::ostream& OlympusMakerNote::print0x0200(std::ostream& os, const Value& value, const ExifData*) {
1194
0
  if (value.count() != 3 || value.typeId() != unsignedLong) {
1195
0
    return os << value;
1196
0
  }
1197
0
  const auto l0 = value.toInt64(0);
1198
0
  switch (l0) {
1199
0
    case 0:
1200
0
      os << _("Normal");
1201
0
      break;
1202
0
    case 2:
1203
0
      os << _("Fast");
1204
0
      break;
1205
0
    case 3:
1206
0
      os << _("Panorama");
1207
0
      break;
1208
0
    default:
1209
0
      os << "(" << l0 << ")";
1210
0
      break;
1211
0
  }
1212
0
  if (l0 != 0) {
1213
0
    os << ", ";
1214
0
    const auto l1 = value.toInt64(1);
1215
0
    os << _("Sequence number") << " " << l1;
1216
0
  }
1217
0
  if (l0 != 0 && l0 != 2) {
1218
0
    os << ", ";
1219
0
    const auto l2 = value.toInt64(2);
1220
0
    switch (l2) {
1221
0
      case 1:
1222
0
        os << _("Left to right");
1223
0
        break;
1224
0
      case 2:
1225
0
        os << _("Right to left");
1226
0
        break;
1227
0
      case 3:
1228
0
        os << _("Bottom to top");
1229
0
        break;
1230
0
      case 4:
1231
0
        os << _("Top to bottom");
1232
0
        break;
1233
0
      default:
1234
0
        os << "(" << l2 << ")";
1235
0
        break;
1236
0
    }
1237
0
  }
1238
0
  return os;
1239
0
}  // OlympusMakerNote::print0x0200
1240
1241
0
std::ostream& OlympusMakerNote::print0x0204(std::ostream& os, const Value& value, const ExifData*) {
1242
0
  if (value.count() == 0 || value.toRational().second == 0) {
1243
0
    return os << "(" << value << ")";
1244
0
  }
1245
0
  float f = value.toFloat();
1246
0
  if (f == 0.0F || f == 1.0F)
1247
0
    return os << _("None");
1248
0
  return os << stringFormat("{:.1f}x", f);
1249
0
}  // OlympusMakerNote::print0x0204
1250
1251
0
std::ostream& OlympusMakerNote::print0x1015(std::ostream& os, const Value& value, const ExifData*) {
1252
0
  if (value.typeId() != unsignedShort) {
1253
0
    return os << value;
1254
0
  }
1255
0
  if (value.count() == 1) {
1256
0
    auto l0 = value.toInt64(0);
1257
0
    if (l0 == 1) {
1258
0
      os << _("Auto");
1259
0
    } else {
1260
0
      return os << value;
1261
0
    }
1262
0
  } else if (value.count() == 2) {
1263
0
    auto l0 = value.toInt64(0);
1264
0
    auto l1 = value.toInt64(1);
1265
0
    if (l0 == 1) {
1266
0
      if (l1 == 0)
1267
0
        os << _("Auto");
1268
0
      else
1269
0
        os << _("Auto") << " (" << l1 << ")";
1270
0
    } else if (l0 == 2) {
1271
0
      switch (l1) {
1272
0
        case 2:
1273
0
          os << _("3000 Kelvin");
1274
0
          break;
1275
0
        case 3:
1276
0
          os << _("3700 Kelvin");
1277
0
          break;
1278
0
        case 4:
1279
0
          os << _("4000 Kelvin");
1280
0
          break;
1281
0
        case 5:
1282
0
          os << _("4500 Kelvin");
1283
0
          break;
1284
0
        case 6:
1285
0
          os << _("5500 Kelvin");
1286
0
          break;
1287
0
        case 7:
1288
0
          os << _("6500 Kelvin");
1289
0
          break;
1290
0
        case 8:
1291
0
          os << _("7500 Kelvin");
1292
0
          break;
1293
0
        default:
1294
0
          os << value;
1295
0
          break;
1296
0
      }
1297
0
    } else if (l0 == 3) {
1298
0
      if (l1 == 0)
1299
0
        os << _("One-touch");
1300
0
      else
1301
0
        os << value;
1302
0
    } else
1303
0
      return os << value;
1304
0
  } else {
1305
0
    return os << value;
1306
0
  }
1307
0
  return os;
1308
0
}  // OlympusMakerNote::print0x1015
1309
1310
//! OlympusEq LensType, tag 0x201
1311
0
std::ostream& OlympusMakerNote::print0x0201(std::ostream& os, const Value& value, const ExifData*) {
1312
  // #1034
1313
0
  const std::string undefined("undefined");
1314
0
  const std::string section("olympus");
1315
0
  if (Internal::readExiv2Config(section, value.toString(), undefined) != undefined) {
1316
0
    return os << Internal::readExiv2Config(section, value.toString(), undefined);
1317
0
  }
1318
1319
  // 6 numbers: 0. Make, 1. Unknown, 2. Model, 3. Sub-model, 4-5. Unknown.
1320
  // Only the Make, Model and Sub-model are used to determine the lens model
1321
0
  static constexpr struct {
1322
0
    byte val[3];
1323
0
    const char* label;
1324
0
  } lensTypes[] = {
1325
0
      {{0, 0, 0}, N_("None")},
1326
0
      {{0, 1, 0}, "Olympus Zuiko Digital ED 50mm F2.0 Macro"},
1327
0
      {{0, 1, 1}, "Olympus Zuiko Digital 40-150mm F3.5-4.5"},
1328
0
      {{0, 1, 16}, "Olympus M.Zuiko Digital ED 14-42mm F3.5-5.6"},
1329
0
      {{0, 2, 0}, "Olympus Zuiko Digital ED 150mm F2.0"},
1330
0
      {{0, 2, 16}, "Olympus M.Zuiko Digital 17mm F2.8 Pancake"},
1331
0
      {{0, 3, 0}, "Olympus Zuiko Digital ED 300mm F2.8"},
1332
0
      {{0, 3, 16}, "Olympus M.Zuiko Digital ED 14-150mm F4.0-5.6"},
1333
0
      {{0, 4, 16}, "Olympus M.Zuiko Digital ED 9-18mm F4.0-5.6"},
1334
0
      {{0, 5, 0}, "Olympus Zuiko Digital 14-54mm F2.8-3.5"},
1335
0
      {{0, 5, 1}, "Olympus Zuiko Digital Pro ED 90-250mm F2.8"},
1336
0
      {{0, 5, 16}, "Olympus M.Zuiko Digital ED 14-42mm F3.5-5.6 L"},
1337
0
      {{0, 6, 0}, "Olympus Zuiko Digital ED 50-200mm F2.8-3.5"},
1338
0
      {{0, 6, 1}, "Olympus Zuiko Digital ED 8mm F3.5 Fisheye"},
1339
0
      {{0, 6, 16}, "Olympus M.Zuiko Digital ED 40-150mm F4.0-5.6"},
1340
0
      {{0, 7, 0}, "Olympus Zuiko Digital 11-22mm F2.8-3.5"},
1341
0
      {{0, 7, 1}, "Olympus Zuiko Digital 18-180mm F3.5-6.3"},
1342
0
      {{0, 7, 16}, "Olympus M.Zuiko Digital ED 12mm F2.0"},
1343
0
      {{0, 8, 1}, "Olympus Zuiko Digital 70-300mm F4.0-5.6"},
1344
0
      {{0, 8, 16}, "Olympus M.Zuiko Digital ED 75-300mm F4.8-6.7"},
1345
0
      {{0, 9, 16}, "Olympus M.Zuiko Digital 14-42mm F3.5-5.6 II"},
1346
0
      {{0, 16, 1}, "Kenko Tokina Reflex 300mm F6.3 MF Macro"},
1347
0
      {{0, 16, 16}, "Olympus M.Zuiko Digital ED 12-50mm F3.5-6.3 EZ"},
1348
0
      {{0, 17, 16}, "Olympus M.Zuiko Digital 45mm F1.8"},
1349
0
      {{0, 18, 16}, "Olympus M.Zuiko Digital ED 60mm F2.8 Macro"},
1350
0
      {{0, 19, 16}, "Olympus M.Zuiko Digital 14-42mm F3.5-5.6 II R"},
1351
0
      {{0, 20, 16}, "Olympus M.Zuiko Digital ED 40-150mm F4.0-5.6 R"},
1352
0
      {{0, 21, 0}, "Olympus Zuiko Digital ED 7-14mm F4.0"},
1353
0
      {{0, 21, 16}, "Olympus M.Zuiko Digital ED 75mm F1.8"},
1354
0
      {{0, 22, 16}, "Olympus M.Zuiko Digital 17mm F1.8"},
1355
0
      {{0, 23, 0}, "Olympus Zuiko Digital Pro ED 35-100mm F2.0"},
1356
0
      {{0, 24, 0}, "Olympus Zuiko Digital 14-45mm F3.5-5.6"},
1357
0
      {{0, 24, 16}, "Olympus M.Zuiko Digital ED 75-300mm F4.8-6.7 II"},
1358
0
      {{0, 25, 16}, "Olympus M.Zuiko Digital ED 12-40mm F2.8 Pro"},
1359
0
      {{0, 32, 0}, "Olympus Zuiko Digital 35mm F3.5 Macro"},
1360
0
      {{0, 32, 16}, "Olympus M.Zuiko Digital ED 40-150mm F2.8 Pro"},
1361
0
      {{0, 33, 16}, "Olympus M.Zuiko Digital ED 14-42mm F3.5-5.6 EZ"},
1362
0
      {{0, 34, 0}, "Olympus Zuiko Digital 17.5-45mm F3.5-5.6"},
1363
0
      {{0, 34, 16}, "Olympus M.Zuiko Digital 25mm F1.8"},
1364
0
      {{0, 35, 0}, "Olympus Zuiko Digital ED 14-42mm F3.5-5.6"},
1365
0
      {{0, 35, 16}, "Olympus M.Zuiko Digital ED 7-14mm F2.8 Pro"},
1366
0
      {{0, 36, 0}, "Olympus Zuiko Digital ED 40-150mm F4.0-5.6"},
1367
0
      {{0, 36, 16}, "Olympus M.Zuiko Digital ED 300mm F4.0 IS Pro"},
1368
0
      {{0, 37, 16}, "Olympus M.Zuiko Digital ED 8mm F1.8 Fisheye Pro"},
1369
0
      {{0, 38, 16}, "Olympus M.Zuiko Digital ED 12-100mm F4.0 IS Pro"},
1370
0
      {{0, 39, 16}, "Olympus M.Zuiko Digital ED 30mm F3.5 Macro"},
1371
0
      {{0, 40, 16}, "Olympus M.Zuiko Digital ED 25mm F1.2 Pro"},
1372
0
      {{0, 41, 16}, "Olympus M.Zuiko Digital ED 17mm F1.2 Pro"},
1373
0
      {{0, 48, 0}, "Olympus Zuiko Digital ED 50-200mm F2.8-3.5 SWD"},
1374
0
      {{0, 49, 0}, "Olympus Zuiko Digital ED 12-60mm F2.8-4.0 SWD"},
1375
0
      {{0, 50, 0}, "Olympus Zuiko Digital ED 14-35mm F2.0 SWD"},
1376
0
      {{0, 51, 0}, "Olympus Zuiko Digital 25mm F2.8"},
1377
0
      {{0, 52, 0}, "Olympus Zuiko Digital ED 9-18mm F4.0-5.6"},
1378
0
      {{0, 52, 16}, "Olympus M.Zuiko Digital ED 12-45mm F4.0 Pro"},
1379
0
      {{0, 53, 0}, "Olympus Zuiko Digital 14-54mm F2.8-3.5 II"},
1380
0
      {{1, 1, 0}, "Sigma 18-50mm F3.5-5.6 DC"},
1381
0
      {{1, 1, 16}, "Sigma 30mm F2.8 EX DN"},
1382
0
      {{1, 2, 0}, "Sigma 55-200mm F4.0-5.6 DC"},
1383
0
      {{1, 2, 16}, "Sigma 19mm F2.8 EX DN"},
1384
0
      {{1, 3, 0}, "Sigma 18-125mm F3.5-5.6 DC"},
1385
0
      {{1, 3, 16}, "Sigma 30mm F2.8 DN | A"},
1386
0
      {{1, 4, 0}, "Sigma 18-125mm F3.5-5.6"},
1387
0
      {{1, 4, 16}, "Sigma 19mm F2.8 DN | A"},
1388
0
      {{1, 5, 0}, "Sigma 30mm F1.4"},
1389
0
      {{1, 5, 16}, "Sigma 60mm F2.8 DN | A"},
1390
0
      {{1, 6, 0}, "Sigma 50-500mm F4.0-6.3 EX DG APO HSM RF"},
1391
0
      {{1, 6, 16}, "Sigma 30mm F1.4 DC DN | C"},
1392
0
      {{1, 7, 0}, "Sigma 105mm F2.8 DG"},
1393
0
      {{1, 8, 0}, "Sigma 150mm F2.8 DG HSM"},
1394
0
      {{1, 9, 0}, "Sigma 18-50mm F2.8 EX DC Macro"},
1395
0
      {{1, 16, 0}, "Sigma 24mm F1.8 EX DG Aspherical Macro"},
1396
0
      {{1, 17, 0}, "Sigma 135-400mm F4.5-5.6 DG ASP APO RF"},
1397
0
      {{1, 18, 0}, "Sigma 300-800mm F5.6 EX DG APO"},
1398
0
      {{1, 19, 0}, "Sigma 30mm F1.4 EX DC HSM"},
1399
0
      {{1, 20, 0}, "Sigma 50-500mm F4.0-6.3 EX DG APO HSM RF"},
1400
0
      {{1, 21, 0}, "Sigma 10-20mm F4.0-5.6 EX DC HSM"},
1401
0
      {{1, 22, 0}, "Sigma 70-200mm F2.8 EX DG Macro HSM II"},
1402
0
      {{1, 23, 0}, "Sigma 50mm F1.4 EX DG HSM"},
1403
0
      {{2, 1, 0}, "Leica D Vario Elmarit 14-50mm F2.8-3.5 Asph."},
1404
0
      {{2, 1, 16}, "Lumix G Vario 14-45mm F3.5-5.6 Asph. Mega OIS"},
1405
0
      {{2, 2, 0}, "Leica D Summilux 25mm F1.4 Asph."},
1406
0
      {{2, 2, 16}, "Lumix G Vario 45-200mm F4.0-5.6 Mega OIS"},
1407
0
      {{2, 3, 0}, "Leica D Vario Elmar 14-50mm F3.8-5.6 Asph. Mega OIS"},
1408
0
      {{2, 3, 1}, "Leica D Vario Elmar 14-50mm F3.8-5.6 Asph."},
1409
0
      {{2, 3, 16}, "Lumix G Vario HD 14-140mm F4.0-5.8 Asph. Mega OIS"},
1410
0
      {{2, 4, 0}, "Leica D Vario Elmar 14-150mm F3.5-5.6"},
1411
0
      {{2, 4, 16}, "Lumix G Vario 7-14mm F4.0 Asph."},
1412
0
      {{2, 5, 16}, "Lumix G 20mm F1.7 Asph."},
1413
0
      {{2, 6, 16}, "Leica DG Macro-Elmarit 45mm F2.8 Asph. Mega OIS"},
1414
0
      {{2, 7, 16}, "Lumix G Vario 14-42mm F3.5-5.6 Asph. Mega OIS"},
1415
0
      {{2, 8, 16}, "Lumix G Fisheye 8mm F3.5"},
1416
0
      {{2, 9, 16}, "Lumix G Vario 100-300mm F4.0-5.6 Mega OIS"},
1417
0
      {{2, 16, 16}, "Lumix G 14mm F2.5 Asph."},
1418
0
      {{2, 17, 16}, "Lumix G 3D 12.5mm F12"},
1419
0
      {{2, 18, 16}, "Leica DG Summilux 25mm F1.4 Asph."},
1420
0
      {{2, 19, 16}, "Lumix G X Vario PZ 45-175mm F4.0-5.6 Asph. Power OIS"},
1421
0
      {{2, 20, 16}, "Lumix G X Vario PZ 14-42mm F3.5-5.6 Asph. Power OIS"},
1422
0
      {{2, 21, 16}, "Lumix G X Vario 12-35mm F2.8 Asph. Power OIS"},
1423
0
      {{2, 22, 16}, "Lumix G Vario 45-150mm F4.0-5.6 Asph. Mega OIS"},
1424
0
      {{2, 23, 16}, "Lumix G X Vario 35-100mm F2.8 Power OIS"},
1425
0
      {{2, 24, 16}, "Lumix G Vario 14-42mm F3.5-5.6 II Asph. Mega OIS"},
1426
0
      {{2, 25, 16}, "Lumix G Vario 14-140mm F3.5-5.6 Asph. Power OIS"},
1427
0
      {{2, 32, 16}, "Lumix G Vario 12-32mm F3.5-5.6 Asph. Mega OIS"},
1428
0
      {{2, 33, 16}, "Leica DG Nocticron 42.5mm F1.2 Asph. Power OIS"},
1429
0
      {{2, 34, 16}, "Leica DG Summilux 15mm F1.7 Asph."},
1430
0
      {{2, 35, 16}, "Lumix G Vario 35-100mm F4.0-5.6 Asph. Mega OIS"},
1431
0
      {{2, 36, 16}, "Lumix G Macro 30mm F2.8 Asph. Mega OIS"},
1432
0
      {{2, 37, 16}, "Lumix G 42.5mm F1.7 Asph. Power OIS"},
1433
0
      {{2, 38, 16}, "Lumix G 25mm F1.7 Asph."},
1434
0
      {{2, 39, 16}, "Leica DG Vario-Elmar 100-400mm F4.0-6.3 Asph. Power OIS"},
1435
0
      {{2, 40, 16}, "Lumix G Vario 12-60mm F3.5-5.6 Asph. Power OIS"},
1436
0
      {{3, 1, 0}, "Leica D Vario Elmarit 14-50mm F2.8-3.5 Asph."},
1437
0
      {{3, 2, 0}, "Leica D Summilux 25mm F1.4 Asph."},
1438
0
      {{5, 1, 16}, "Tamron 14-150mm F3.5-5.8 Di III"},
1439
0
  };
1440
1441
0
  if (value.count() != 6 || value.typeId() != unsignedByte) {
1442
0
    return os << value;
1443
0
  }
1444
1445
0
  auto v0 = static_cast<byte>(value.toInt64(0));
1446
0
  auto v2 = static_cast<byte>(value.toInt64(2));
1447
0
  auto v3 = static_cast<byte>(value.toInt64(3));
1448
1449
0
  for (const auto& type : lensTypes) {
1450
0
    if (type.val[0] == v0 && type.val[1] == v2 && type.val[2] == v3) {
1451
0
      return os << type.label;
1452
0
    }
1453
0
  }
1454
0
  return os << value;
1455
0
}  // OlympusMakerNote::print0x0201
1456
1457
// Olympus tag 0x0209 CameraID
1458
0
std::ostream& OlympusMakerNote::print0x0209(std::ostream& os, const Value& value, const ExifData*) {
1459
0
  if (value.typeId() != asciiString && value.typeId() != undefined) {
1460
0
    return os << value;
1461
0
  }
1462
1463
0
  char ch;
1464
0
  size_t size = value.size();
1465
0
  for (size_t i = 0; i < size && ((ch = static_cast<char>(value.toInt64(i))) != '\0'); i++) {
1466
0
    os << ch;
1467
0
  }
1468
0
  return os;
1469
0
}  // OlympusMakerNote::print0x0209
1470
1471
//! OlympusEq Extender, tag 0x0301
1472
0
std::ostream& OlympusMakerNote::printEq0x0301(std::ostream& os, const Value& value, const ExifData*) {
1473
  // 6 numbers: 0. Make, 1. Unknown, 2. Model, 3. Sub-model, 4-5. Unknown.
1474
  // Only the Make and Model are used to determine the extender model
1475
0
  static constexpr struct {
1476
0
    byte val[2];
1477
0
    const char* label;
1478
0
  } extenderModels[] = {
1479
0
      {{0, 0}, N_("None")},
1480
0
      {{0, 4}, "Olympus Zuiko Digital EC-14 1.4x Teleconverter"},
1481
0
      {{0, 8}, "Olympus EX-25 Extension Tube"},
1482
0
      {{0, 16}, "Olympus Zuiko Digital EC-20 2.0x Teleconverter"},
1483
0
  };
1484
1485
0
  if (value.count() != 6 || value.typeId() != unsignedByte) {
1486
0
    return os << value;
1487
0
  }
1488
1489
0
  auto v0 = static_cast<byte>(value.toInt64(0));
1490
0
  auto v2 = static_cast<byte>(value.toInt64(2));
1491
1492
0
  for (const auto& model : extenderModels) {
1493
0
    if (model.val[0] == v0 && model.val[1] == v2) {
1494
0
      return os << model.label;
1495
0
    }
1496
0
  }
1497
0
  return os << value;
1498
0
}  // OlympusMakerNote::printEq0x0301
1499
1500
//! OlympusCs FocusMode, tag 0x0301
1501
// (1 or 2 values)
1502
0
std::ostream& OlympusMakerNote::printCs0x0301(std::ostream& os, const Value& value, const ExifData*) {
1503
0
  using mode = std::pair<uint16_t, const char*>;
1504
0
  static constexpr mode focusModes0[] = {
1505
0
      {0, N_("Single AF")},     {1, N_("Sequential shooting AF")},
1506
0
      {2, N_("Continuous AF")}, {3, N_("Multi AF")},
1507
0
      {4, N_("Face detect")},   {10, N_("MF")},
1508
0
  };
1509
1510
0
  static constexpr mode focusModes1[] = {
1511
0
      {0x0001, N_("S-AF")},        {0x0004, N_("C-AF")},      {0x0010, N_("MF")},
1512
0
      {0x0020, N_("Face detect")}, {0x0040, N_("Imager AF")}, {0x0100, N_("AF sensor")},
1513
0
  };
1514
1515
0
  if (value.count() < 1 || value.typeId() != unsignedShort) {
1516
0
    return os << "(" << value << ")";
1517
0
  }
1518
0
  auto v = static_cast<uint16_t>(value.toInt64(0));
1519
1520
  // If value 2 is present, it is used instead of value 1.
1521
0
  if (value.count() > 1) {
1522
0
    std::string p;  // Used to enable ',' separation
1523
1524
0
    v = static_cast<uint16_t>(value.toInt64(1));
1525
0
    for (auto&& [val, label] : focusModes1) {
1526
0
      if ((v & val) != 0) {
1527
0
        if (!p.empty()) {
1528
0
          os << ", ";
1529
0
        }
1530
0
        p = label;
1531
0
        os << p;
1532
0
      }
1533
0
    }
1534
0
  } else {
1535
0
    for (auto&& [val, label] : focusModes0) {
1536
0
      if (val == v) {
1537
0
        os << label;
1538
0
        break;
1539
0
      }
1540
0
    }
1541
0
  }
1542
0
  return os << v;
1543
1544
0
}  // OlympusMakerNote::printCs0x0301
1545
1546
//! OlympusCs ArtFilter, tag 0x0529, OlympusCs MagicFilter, tag 0x052c
1547
0
std::ostream& OlympusMakerNote::print0x0529(std::ostream& os, const Value& value, const ExifData* metadata) {
1548
0
  if (value.count() != 4 || value.typeId() != unsignedShort)
1549
0
    return os << "(" << value << ")";
1550
1551
0
  const auto v0 = value.toInt64(0);
1552
0
  EXV_PRINT_TAG(artFilters)(os, v0, metadata);
1553
1554
0
  if (v0 == 39) {  // The "Partial color" option also has a color choice
1555
0
    const auto v3 = value.toInt64(3);
1556
0
    return os << " (" << _("position") << " " << (v3 + 1) << ")";
1557
0
  }
1558
1559
0
  return os;
1560
0
}  // OlympusMakerNote::print0x0529
1561
1562
// Olympus FocusInfo tag 0x1209 ManualFlash
1563
0
std::ostream& OlympusMakerNote::print0x1209(std::ostream& os, const Value& value, const ExifData*) {
1564
0
  if (value.count() != 2 || value.typeId() != unsignedShort) {
1565
0
    return os << value;
1566
0
  }
1567
1568
0
  switch (value.toInt64(0)) {
1569
0
    case 0:
1570
0
      os << _("Off");
1571
0
      break;
1572
0
    case 1:
1573
0
      os << _("On");
1574
0
      break;
1575
0
    default:
1576
0
      os << value.toInt64(0);
1577
0
      break;
1578
0
  }
1579
0
  os << " ";
1580
0
  os << value.toInt64(1);
1581
1582
0
  return os;
1583
0
}  // OlympusMakerNote::print0x1209
1584
1585
// Olympus FocusDistance 0x0305
1586
0
std::ostream& OlympusMakerNote::print0x0305(std::ostream& os, const Value& value, const ExifData*) {
1587
0
  if (value.count() != 1 || value.typeId() != unsignedRational) {
1588
0
    return os << value;
1589
0
  }
1590
1591
0
  auto [r, s] = value.toRational();
1592
0
  if (static_cast<uint32_t>(r) == 0xffffffff) {
1593
0
    return os << _("Infinity");
1594
0
  }
1595
0
  return os << stringFormat("{:.2f} m", static_cast<float>(r) / 1000);
1596
0
}
1597
1598
// Olympus FocusInfo tag 0x0308 AFPoint
1599
0
std::ostream& OlympusMakerNote::print0x0308(std::ostream& os, const Value& value, const ExifData* metadata) {
1600
0
  static constexpr std::pair<uint16_t, const char*> afPoints[] = {
1601
0
      {0, N_("Left (or n/a)")}, {1, N_("Center (horizontal)")}, {2, N_("Right")}, {3, N_("Center (vertical)")},
1602
0
      {255, N_("None")},
1603
0
  };
1604
1605
0
  static constexpr std::pair<byte, const char*> afPointsE3[] = {
1606
0
      {0x00, N_("None")},
1607
0
      {0x01, N_("Top-left (horizontal)")},
1608
0
      {0x02, N_("Top-center (horizontal)")},
1609
0
      {0x03, N_("Top-right (horizontal)")},
1610
0
      {0x04, N_("Left (horizontal)")},
1611
0
      {0x05, N_("Mid-left (horizontal)")},
1612
0
      {0x06, N_("Center (horizontal)")},
1613
0
      {0x07, N_("Mid-right (horizontal)")},
1614
0
      {0x08, N_("Right (horizontal)")},
1615
0
      {0x09, N_("Bottom-left (horizontal)")},
1616
0
      {0x0a, N_("Bottom-center (horizontal)")},
1617
0
      {0x0b, N_("Bottom-right (horizontal)")},
1618
0
      {0x0c, N_("Top-left (vertical)")},
1619
0
      {0x0d, N_("Top-center (vertical)")},
1620
0
      {0x0e, N_("Top-right (vertical)")},
1621
0
      {0x0f, N_("Left (vertical)")},
1622
0
      {0x10, N_("Mid-left (vertical)")},
1623
0
      {0x11, N_("Center (vertical)")},
1624
0
      {0x12, N_("Mid-right (vertical)")},
1625
0
      {0x13, N_("Right (vertical)")},
1626
0
      {0x14, N_("Bottom-left (vertical)")},
1627
0
      {0x15, N_("Bottom-center (vertical)")},
1628
0
      {0x16, N_("Bottom-right (vertical)")},
1629
0
  };
1630
1631
0
  if (value.count() != 1 || value.typeId() != unsignedShort) {
1632
0
    return os << value;
1633
0
  }
1634
1635
0
  bool E3_E30model = false;
1636
1637
0
  if (metadata) {
1638
0
    auto pos = metadata->findKey(ExifKey("Exif.Image.Model"));
1639
0
    if (pos != metadata->end() && pos->count() != 0) {
1640
0
      std::string model = pos->toString();
1641
0
      if (Internal::contains(model, "E-3 ") || Internal::contains(model, "E-30 ")) {
1642
0
        E3_E30model = true;
1643
0
      }
1644
0
    }
1645
0
  }
1646
1647
0
  auto v = static_cast<uint16_t>(value.toInt64(0));
1648
1649
0
  if (!E3_E30model) {
1650
0
    for (auto&& [val, label] : afPoints) {
1651
0
      if (val == v) {
1652
0
        return os << label;
1653
0
      }
1654
0
    }
1655
0
  } else {
1656
    // E-3 and E-30
1657
0
    for (auto&& [val, label] : afPointsE3) {
1658
0
      if (val == (v & 0x1f)) {
1659
0
        os << label;
1660
0
        os << ", ";
1661
0
        if ((v & 0xe0) == 0)
1662
0
          return os << N_("Single Target");
1663
0
        if (v & 0x40)
1664
0
          return os << N_("All Target");
1665
0
        if (v & 0x80)
1666
0
          return os << N_("Dynamic Single Target");
1667
0
      }
1668
0
    }
1669
0
  }
1670
0
  return os << v;
1671
0
}  // OlympusMakerNote::print0x0308
1672
1673
}  // namespace Exiv2::Internal