-
Notifications
You must be signed in to change notification settings - Fork 290
/
Copy pathsonymn_int.cpp
2309 lines (2051 loc) · 119 KB
/
sonymn_int.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// SPDX-License-Identifier: GPL-2.0-or-later
// included header files
#include "sonymn_int.hpp"
#include "error.hpp"
#include "exif.hpp"
#include "i18n.h" // NLS support.
#include "minoltamn_int.hpp"
#include "tiffcomposite_int.hpp"
#include "utils.hpp"
#include "value.hpp"
#include <array>
#include <cmath>
// *****************************************************************************
// class member definitions
namespace Exiv2::Internal {
// -- Standard Sony Makernotes tags ---------------------------------------------------------------
//! Lookup table to translate Sony image quality values to readable labels
constexpr TagDetails sonyImageQuality[] = {{0, N_("RAW")},
{1, N_("Super Fine")},
{2, N_("Fine")},
{3, N_("Standard")},
{4, N_("Economy")},
{5, N_("Extra Fine")},
{6, N_("RAW + JPEG/HEIF")},
{7, N_("Compressed RAW")},
{8, N_("Compressed RAW + JPEG")},
{9, N_("Light")},
{0xffffffff, N_("n/a")}};
//! Lookup table to translate Sony white balance (main group) values to readable labels
constexpr TagDetails sonyWhiteBalanceStd[] = {{0x00, N_("Auto")}, {0x01, N_("Color Temperature/Color Filter")},
{0x10, N_("Daylight")}, {0x20, N_("Cloudy")},
{0x30, N_("Shade")}, {0x40, N_("Tungsten")},
{0x50, N_("Flash")}, {0x60, N_("Fluorescent")},
{0x70, N_("Custom")}, {0x80, N_("Underwater")}};
//! Lookup table to translate Sony auto HDR (part 1) values to readable labels
constexpr TagDetails sonyHDRStdPart1[] = {{0x00, N_("Off")}, {0x01, N_("Auto")}, {0x10, "1.0 EV"}, {0x11, "1.5 EV"},
{0x12, "2.0 EV"}, {0x13, "2.5 EV"}, {0x14, "3.0 EV"}, {0x15, "3.5 EV"},
{0x16, "4.0 EV"}, {0x17, "4.5 EV"}, {0x18, "5.0 EV"}, {0x19, "5.5 EV"},
{0x1a, "6.0 EV"}};
//! Lookup table to translate Sony auto HDR (part 2) values to readable labels
constexpr TagDetails sonyHDRStdPart2[] = {
{0, N_("Uncorrected image")}, {1, N_("HDR image (good)")}, {2, N_("HDR (fail 1)")}, {3, N_("HDR (fail 2)")}};
//! Lookup table to translate Sony off/on/(n/a) (1) values to readable labels
constexpr TagDetails sonyOffOnNA1[] = {{0, N_("Off")}, {1, N_("On")}, {256, N_("n/a")}};
//! Lookup table to translate Sony off/on/(n/a) (2) values to readable labels
constexpr TagDetails sonyOffOnNA2[] = {{0, N_("Off")}, {1, N_("On")}, {0xffffffff, N_("n/a")}};
//! Lookup table to translate Sony no/yes values to readable labels
constexpr TagDetails sonyNoYes[] = {{0, N_("No")}, {1, N_("Yes")}};
//! Lookup table to translate Sony picture effect values to readable labels
constexpr TagDetails sonyPictureEffect[] = {{0, N_("Off")},
{1, N_("Toy Camera")},
{2, N_("Pop Color")},
{3, N_("Posterization")},
{4, N_("Posterization B/W")},
{5, N_("Retro Photo")},
{6, N_("Soft High Key")},
{7, N_("Partial Color (red)")},
{8, N_("Partial Color (green)")},
{9, N_("Partial Color (blue)")},
{10, N_("Partial Color (yellow)")},
{13, N_("High Contrast Monochrome")},
{16, N_("Toy Camera (normal)")},
{17, N_("Toy Camera (cool)")},
{18, N_("Toy Camera (warm)")},
{19, N_("Toy Camera (green)")},
{20, N_("Toy Camera (magenta)")},
{32, N_("Soft Focus (low)")},
{33, N_("Soft Focus")},
{34, N_("Soft Focus (high)")},
{48, N_("Miniature (auto)")},
{49, N_("Miniature (top)")},
{50, N_("Miniature (middle horizontal)")},
{51, N_("Miniature (bottom)")},
{52, N_("Miniature (left)")},
{53, N_("Miniature (middle vertical)")},
{54, N_("Miniature (right)")},
{64, N_("HDR Painting (low)")},
{65, N_("HDR Painting")},
{66, N_("HDR Painting (high)")},
{80, N_("Rich-tone Monochrome")},
{97, N_("Watercolor")},
{98, N_("Watercolor 2")},
{112, N_("Illustration (low)")},
{113, N_("Illustration")},
{114, N_("Illustration (high)")}};
//! Lookup table to translate Sony soft skin effect values to readable labels
constexpr TagDetails sonySoftSkinEffect[] = {
{0, N_("Off")}, {1, N_("Low")}, {2, N_("Mid")}, {3, N_("High")}, {0xffffffff, N_("n/a")}};
//! Lookup table to translate Sony vignetting correction values to readable labels
constexpr TagDetails sonyVignettingCorrection[] = {{0, N_("Off")}, {2, N_("Auto")}, {0xffffffff, N_("n/a")}};
//! Lookup table to translate Sony lateral chromatic aberration values to readable labels
constexpr TagDetails sonyLateralChromaticAberration[] = {{0, N_("Off")}, {2, N_("Auto")}, {0xffffffff, N_("n/a")}};
//! Lookup table to translate Sony distortion correction settings values to readable labels
constexpr TagDetails sonyDistortionCorrectionSettings[] = {{0, N_("Off")}, {2, N_("Auto")}, {0xffffffff, N_("n/a")}};
//! Lookup table to translate Sony flash action values to readable labels
constexpr TagDetails sonyFlashAction[] = {{0, N_("Did not fire")},
{1, N_("Flash fired")},
{2, N_("External flash fired")},
{3, N_("Wireless controlled flash fired")}};
//! Lookup table to translate Sony auto focus point selected (set 1) values to readable labels
constexpr TagDetails sonyAFPointSelectedSet1[] = {{0, N_("Auto")},
{1, N_("Center")},
{2, N_("Top")},
{3, N_("Upper-right")},
{4, N_("Right")},
{5, N_("Lower-right")},
{6, N_("Bottom")},
{7, N_("Lower-left")},
{8, N_("Left")},
{9, N_("Upper-left")},
{10, N_("Far Right")},
{11, N_("Far Left")},
{12, N_("Upper-middle")},
{13, N_("Near Right")},
{14, N_("Lower-middle")},
{15, N_("Near Left")},
{16, N_("Upper Far Right")},
{17, N_("Lower Far Right")},
{18, N_("Lower Far Left")},
{19, N_("Upper Far Left")}};
//! Lookup table to translate Sony auto focus point selected (set 2) values to readable labels
constexpr TagDetails sonyAFPointSelectedSet2[] = {
{0, N_("Auto")}, {1, "A6"}, {2, "A7"}, {3, "B2"}, {4, "B3"},
{5, "B4"}, {6, "B5"}, {7, "B6"}, {8, "B7"}, {9, "B8"},
{10, "B9"}, {11, "B10"}, {12, "C1"}, {13, "C2"}, {14, "C3"},
{15, "C4"}, {16, "C5"}, {17, "C6"}, {18, "C7"}, {19, "C8"},
{20, "C9"}, {21, "C10"}, {22, "C11"}, {23, "D1"}, {24, "D2"},
{25, "D3"}, {26, "D4"}, {27, "D5"}, {28, "D6"}, {29, "D7"},
{30, "D8"}, {31, "D9"}, {32, "D10"}, {33, "D11"}, {34, "E1"},
{35, "E2"}, {36, "E3"}, {37, "E4"}, {38, "E5"}, {39, N_("E6 (Center)")},
{40, "E7"}, {41, "E8"}, {42, "E9"}, {43, "E10"}, {44, "E11"},
{45, "F1"}, {46, "F2"}, {47, "F3"}, {48, "F4"}, {49, "F5"},
{50, "F6"}, {51, "F7"}, {52, "F8"}, {53, "F9"}, {54, "F10"},
{55, "F11"}, {56, "G1"}, {57, "G2"}, {58, "G3"}, {59, "G4"},
{60, "G5"}, {61, "G6"}, {62, "G7"}, {63, "G8"}, {64, "G9"},
{65, "G10"}, {66, "G11"}, {67, "H2"}, {68, "H3"}, {69, "H4"},
{70, "H5"}, {71, "H6"}, {72, "H7"}, {73, "H8"}, {74, "H9"},
{75, "H10"}, {76, "I5"}, {77, "I6"}, {78, "I7"}, {128, N_("Auto")}};
//! Lookup table to translate Sony auto focus point selected (set 3) values to readable labels
constexpr TagDetails sonyAFPointSelectedSet3[] = {{0, N_("Auto")},
{93, "A5"},
{94, "A6"},
{95, "A7"},
{106, "B2"},
{107, "B3"},
{108, "B4"},
{110, "B5"},
{111, "B6"},
{112, "B7"},
{114, "B8"},
{115, "B9"},
{116, "B10"},
{122, "C1"},
{123, "C2"},
{124, "C3"},
{215, "C4"},
{127, "C5"},
{128, "C6"},
{129, "C7"},
{131, "C8"},
{132, "C9"},
{133, "C10"},
{134, "C11"},
{139, "D1"},
{140, "D2"},
{141, "D3"},
{142, "D4"},
{144, "D5"},
{145, "D6"},
{146, "D7"},
{148, "D8"},
{149, "D9"},
{150, "D10"},
{151, "D11"},
{156, "E1"},
{157, "E2"},
{158, "E3"},
{159, "E4"},
{161, "E5"},
{162, N_("E6 (Center")},
{163, "E7"},
{165, "E8"},
{166, "E9"},
{167, "E10"},
{168, "E11"},
{173, "F1"},
{174, "F2"},
{175, "F3"},
{176, "F4"},
{178, "F5"},
{179, "F6"},
{180, "F7"},
{182, "F8"},
{183, "F9"},
{184, "F10"},
{185, "F11"},
{190, "G1"},
{191, "G2"},
{192, "G3"},
{193, "G4"},
{195, "G5"},
{196, "G6"},
{197, "G7"},
{199, "G8"},
{200, "G9"},
{201, "G10"},
{202, "G11"},
{208, "H2"},
{209, "H3"},
{210, "H4"},
{212, "H5"},
{213, "H6"},
{214, "H7"},
{216, "H8"},
{217, "H9"},
{218, "H10"},
{229, "I5"},
{230, "I6"},
{231, "I7"}};
//! Lookup table to translate Sony auto focus point selected (set 4) values to readable labels
constexpr TagDetails sonyAFPointSelectedSet4[] = {
{0, N_("n/a")}, {1, N_("Top Left Zone")}, {2, N_("Top Zone")}, {3, N_("Top Right Zone")},
{4, N_("Left Zone")}, {5, N_("Center Zone")}, {6, N_("Right Zone")}, {7, N_("Bottom Left Zone")},
{8, N_("Bottom Zone")}, {9, N_("Bottom Right Zone")}};
//! Lookup table to translate Sony auto focus point selected (set 5) values to readable labels
constexpr TagDetails sonyAFPointSelectedSet5[] = {
{0, N_("n/a")}, {1, N_("Center Zone")}, {2, N_("Top Zone")}, {3, N_("Right Zone")},
{4, N_("Left Zone")}, {5, N_("Bottom Zone")}, {6, N_("Bottom Right Zone")}, {7, N_("Bottom Left Zone")},
{8, N_("Top Left Zone")}, {9, N_("Top Right Zone")}};
//! Lookup table to translate Sony auto focus points used (set 1) values to readable labels
constexpr TagDetailsBitlistSorted sonyAFPointsUsedSet1[] = {{0, N_("Center")}, {1, N_("Top")},
{2, N_("Upper-right")}, {3, N_("Right")},
{4, N_("Lower-right")}, {5, N_("Bottom")},
{6, N_("Lower-left")}, {7, N_("Left")},
{8, N_("Upper-left")}, {9, N_("Far right")},
{10, N_("Far left")}, {11, N_("Upper-middle")},
{12, N_("Near right")}, {13, N_("Lower-middle")},
{14, N_("Near left")}, {15, N_("Upper far right")},
{16, N_("Lower far right")}, {17, N_("Lower far left")},
{18, N_("Upper far left")}};
//! Lookup table to translate Sony auto focus points used (set 2) values to readable labels
constexpr TagDetailsBitlistSorted sonyAFPointsUsedSet2[] = {
{0, "A5"}, {1, "A6"}, {2, "A7"}, {3, "B2"}, {4, "B3"}, {5, "B4"}, {6, "B5"}, {7, "B6"},
{8, "B7"}, {9, "B8"}, {10, "B9"}, {11, "B10"}, {12, "C1"}, {13, "C2"}, {14, "C3"}, {15, "C4"},
{16, "C5"}, {17, "C6"}, {18, "C7"}, {19, "C8"}, {20, "C9"}, {21, "C10"}, {22, "C11"}, {23, "D1"},
{24, "D2"}, {25, "D3"}, {26, "D4"}, {27, "D5"}, {28, "D6"}, {29, "D7"}, {30, "D8"}, {31, "D9"},
{32, "D10"}, {33, "D11"}, {34, "E1"}, {35, "E2"}, {36, "E3"}, {37, "E4"}, {38, "E5"}, {39, N_("E6")},
{40, "E7"}, {41, "E8"}, {42, "E9"}, {43, "E10"}, {44, "E11"}, {45, "F1"}, {46, "F2"}, {47, "F3"},
{48, "F4"}, {49, "F5"}, {50, "F6"}, {51, "F7"}, {52, "F8"}, {53, "F9"}, {54, "F10"}, {55, "F11"},
{56, "G1"}, {57, "G2"}, {58, "G3"}, {59, "G4"}, {60, "G5"}, {61, "G6"}, {62, "G7"}, {63, "G8"},
{64, "G9"}, {65, "G10"}, {66, "G11"}, {67, "H2"}, {68, "H3"}, {69, "H4"}, {70, "H5"}, {71, "H6"},
{72, "H7"}, {73, "H8"}, {74, "H9"}, {75, "H10"}, {76, "I5"}, {77, "I6"}, {78, "I7"}, {128, N_("Auto")}};
//! Lookup table to translate Sony focus mode 2 values to readable labels
constexpr TagDetails sonyFocusMode2[] = {{0, N_("Manual")}, {2, N_("AF-S")}, {3, N_("AF-C")},
{4, N_("AF-A")}, {6, N_("DMF")}, {7, N_("AF-D")}};
//! Lookup table to translate Sony auto focus area mode setting (set 1) values to readable labels
constexpr TagDetails sonyAFAreaModeSettingSet1[] = {
{0, N_("Wide")}, {4, N_("Local")}, {8, N_("Zone")}, {9, N_("Spot")}};
//! Lookup table to translate Sony auto focus area mode setting (set 2) values to readable labels
constexpr TagDetails sonyAFAreaModeSettingSet2[] = {{0, N_("Wide")},
{1, N_("Center")},
{3, N_("Flexible Spot")},
{4, N_("Flexible Spot (LA-EA4)")},
{9, N_("Center (LA-EA4)")},
{11, N_("Zone")},
{12, N_("Expanded flexible spot")}};
//! Lookup table to translate Sony auto focus area mode setting (set 3) values to readable labels
constexpr TagDetails sonyAFAreaModeSettingSet3[] = {
{0, N_("Wide")}, {4, N_("Flexible spot")}, {8, N_("Zone")}, {9, N_("Center")}, {12, N_("Expanded flexible spot")}};
//! Lookup table to translate Sony auto focus tracking values to readable labels
constexpr TagDetails sonyAFTracking[] = {{0, N_("Off")}, {1, N_("Face tracking")}, {2, N_("Lock on AF")}};
//! Lookup table to translate Sony multi-frame noise reduction effect values to readable labels
constexpr TagDetails sonyMultiFrameNREffect[] = {{0, N_("Normal")}, {1, N_("High")}};
//! Lookup table to translate Sony variable low pass filter values to readable labels
constexpr StringTagDetails sonyVariableLowPassFilter[] = {
{"0 0", N_("n/a")}, {"1 0", N_("Off")}, {"1 1", N_("Standard")}, {"1 2", N_("High")}, {"65535 65535", N_("n/a")}};
//! Lookup table to translate Sony RAW file type values to readable labels
constexpr TagDetails sonyRAWFileType[] = {
{0, N_("Compressed RAW")}, {1, N_("Uncompressed RAW")}, {2, N_("Lossless Compressed RAW")}, {0xffff, N_("n/a")}};
//! Lookup table to translate Sony metering mode 2 values to readable labels
constexpr TagDetails sonyMeteringMode2[] = {{0x100, N_("Multi-segment")}, {0x200, N_("Center-weighted average")},
{0x301, N_("Spot (Standard)")}, {0x302, N_("Spot (Large)")},
{0x400, N_("Average")}, {0x500, N_("Highlight")}};
//! Lookup table to translate Sony priority set in automatic white balance values to readable labels
constexpr TagDetails sonyPrioritySetInAWB[] = {{0, N_("Standard")}, {1, N_("Ambience")}, {2, N_("White")}};
//! Lookup table to translate Sony quality 2 (main group) values to readable labels
constexpr StringTagDetails sonyQuality2Std[] = {{"0 0", N_("n/a")},
{"0 1", N_("Standard")},
{"0 2", N_("Fine")},
{"0 3", N_("Extra fine")},
{"0 4", N_("Light")},
{"1 0", N_("RAW")},
{"1 1", N_("RAW + standard")},
{"1 2", N_("RAW + fine")},
{"1 3", N_("RAW + extra fine")},
{"1 4", N_("RAW + light")}};
//! Lookup table to translate Sony JPEG/HEIF switch values to readable labels
constexpr TagDetails sonyJPEGHEIFSwitch[] = {{0, "JPEG"}, {1, "HEIF"}, {0xffff, N_("n/a")}};
//! Lookup table to translate Sony model ID values to readable labels
// FORMAT: Uses a space before alternative models and caveats
// NOTE: Keep the array format in sync with the getModel() function
constexpr TagDetails sonyModelId[] = {{0, N_("Multiple camera models")},
{2, "DSC-R1"},
{256, "DSLR-A100"},
{257, "DSLR-A900"},
{258, "DSLR-A700"},
{259, "DSLR-A200"},
{260, "DSLR-A350"},
{261, "DSLR-A300"},
{262, "DSLR-A900 (APS-C mode)"},
{263, "DSLR-A380 / DSLR-A390"},
{264, "DSLR-A330"},
{265, "DSLR-A230"},
{266, "DSLR-A290"},
{269, "DSLR-A850"},
{270, "DSLR-A850 (APS-C mode)"},
{273, "DSLR-A550"},
{274, "DSLR-A500"},
{275, "DSLR-A450"},
{278, "NEX-5"},
{279, "NEX-3"},
{280, "SLT-A33"},
{281, "SLT-A55 / SLT-A55V"},
{282, "DSLR-A560"},
{283, "DSLR-A580"},
{284, "NEX-C3"},
{285, "SLT-A35"},
{286, "SLT-A65 / SLT-A65V"},
{287, "SLT-A77 / SLT-A77V"},
{288, "NEX-5N"},
{289, "NEX-7"},
{290, "NEX-VG20E"},
{291, "SLT-A37"},
{292, "SLT-A57"},
{293, "NEX-F3"},
{294, "SLT-A99 / SLT-A99V"},
{295, "NEX-6"},
{296, "NEX-5R"},
{297, "DSC-RX100"},
{298, "DSC-RX1"},
{299, "NEX-VG900"},
{300, "NEX-VG30E"},
{302, "ILCE-3000 / ILCE-3500"},
{303, "SLT-A58"},
{305, "NEX-3N"},
{306, "ILCE-7"},
{307, "NEX-5T"},
{308, "DSC-RX100M2"},
{309, "DSC-RX10"},
{310, "DSC-RX1R"},
{311, "ILCE-7R"},
{312, "ILCE-6000"},
{313, "ILCE-5000"},
{317, "DSC-RX100M3"},
{318, "ILCE-7S"},
{319, "ILCA-77M2"},
{339, "ILCE-5100"},
{340, "ILCE-7M2"},
{341, "DSC-RX100M4"},
{342, "DSC-RX10M2"},
{344, "DSC-RX1RM2"},
{346, "ILCE-QX1"},
{347, "ILCE-7RM2"},
{350, "ILCE-7SM2"},
{353, "ILCA-68"},
{354, "ILCA-99M2"},
{355, "DSC-RX10M3"},
{356, "DSC-RX100M5"},
{357, "ILCE-6300"},
{358, "ILCE-9"},
{360, "ILCE-6500"},
{362, "ILCE-7RM3"},
{363, "ILCE-7M3"},
{364, "DSC-RX0"},
{365, "DSC-RX10M4"},
{366, "DSC-RX100M6"},
{367, "DSC-HX99"},
{369, "DSC-RX100M5A"},
{371, "ILCE-6400"},
{372, "DSC-RX0M2"},
{374, "DSC-RX100M7"},
{375, "ILCE-7RM4"},
{376, "ILCE-9M2"},
{378, "ILCE-6600"},
{379, "ILCE-6100"},
{380, "ZV-1"},
{381, "ILCE-7C"},
{382, "ZV-E10"},
{383, "ILCE-7SM3"},
{384, "ILCE-1"},
{385, "ILME-FX3"},
{386, "ILCE-7RM3A"},
{387, "ILCE-7RM4A"},
{388, "ILCE-7M4"},
{389, "ZV-1F"},
{390, "ILCE-7RM5"},
{391, "ILME-FX30"},
{392, "ILCE-9M3"},
{393, "ZV-E1"},
{394, "ILCE-6700"},
{395, "ZV-1M2"},
{396, "ILCE-7CR"},
{397, "ILCE-7CM2"},
{398, "ILX-LR1"},
{400, "ILCE-1M2"}};
//! Lookup table to translate Sony creative style (main group) values to readable labels
constexpr StringTagDetails sonyCreativeStyleStd[] = {{"AdobeRGB", N_("Adobe RGB")},
{"Autumnleaves", N_("Autumn leaves")},
{"BW", N_("Black and White")},
{"Clear", N_("Clear")},
{"Deep", N_("Deep")},
{"FL", N_("FL")},
{"IN", "IN"},
{"Landscape", N_("Landscape")},
{"Light", N_("Light")},
{"Neutral", N_("Neutral")},
{"None", N_("None")},
{"Portrait", N_("Portrait")},
{"Real", N_("Real")},
{"SH", N_("SH")},
{"Sepia", N_("Sepia")},
{"Standard", N_("Standard")},
{"Sunset", N_("Sunset")},
{"Vivid", N_("Vivid")},
{"VV2", N_("VV2")}};
//! Lookup table to translate Sony file format values to readable labels
constexpr StringTagDetails sonyFileFormat[] = {
{"0 0 0 2", "JPEG"}, {"1 0 0 0", "SR2 1.0"}, {"2 0 0 0", "ARW 1.0"}, {"3 0 0 0", "ARW 2.0"},
{"3 1 0 0", "ARW 2.1"}, {"3 2 0 0", "ARW 2.2"}, {"3 3 0 0", "ARW 2.3"}, {"3 3 1 0", "ARW 2.3.1"},
{"3 3 2 0", "ARW 2.3.2"}, {"3 3 3 0", "ARW 2.3.3"}, {"3 3 5 0", "ARW 2.3.5"}, {"4 0 0 0", "ARW 4.0"},
{"4 0 1 0", "ARW 4.0.1"}, {"5 0 0 0", "ARW 5.0.0"}, {"5 0 1 0", "ARW 5.0.1"}};
//! Lookup table to translate Sony dynamic range optimizer values to readable labels
constexpr TagDetails print0xb025[] = {{0, N_("Off")},
{1, N_("Standard")},
{2, N_("Advanced Auto")},
{3, N_("Auto")},
{8, N_("Advanced Lv1")},
{9, N_("Advanced Lv2")},
{10, N_("Advanced Lv3")},
{11, N_("Advanced Lv4")},
{12, N_("Advanced Lv5")},
{16, "Lv1"},
{17, "Lv2"},
{18, "Lv3"},
{19, "Lv4"},
{20, "Lv5"}};
//! Lookup table to translate Sony color mode values to readable labels
constexpr TagDetails sonyColorMode[] = {
{0, N_("Standard")}, {1, N_("Vivid")}, {2, N_("Portrait")},
{3, N_("Landscape")}, {4, N_("Sunset")}, {5, N_("Night View/Portrait")},
{6, N_("Black & White")}, {7, N_("Adobe RGB")}, {12, N_("Neutral")},
{13, N_("Clear")}, {14, N_("Deep")}, {15, N_("Light")},
{16, N_("Autumn leaves")}, {17, N_("Sepia")}, {18, N_("FL")},
{19, N_("Vivid 2")}, {20, N_("IN")}, {21, N_("SH")},
{100, N_("Neutral")}, {101, N_("Clear")}, {102, N_("Deep")},
{103, N_("Light")}, {104, N_("Night view")}, {105, N_("Autumn leaves")},
{255, N_("Off")}, {0xffffffff, N_("n/a")}};
//! Lookup table to translate Sony exposure mode values to readable labels
constexpr TagDetails sonyExposureMode[] = {{0, N_("Program AE")},
{1, N_("Portrait")},
{2, N_("Beach")},
{3, N_("Sports")},
{4, N_("Snow")},
{5, N_("Landscape")},
{6, N_("Auto")},
{7, N_("Aperture-priority AE")},
{8, N_("Shutter speed priority AE")},
{9, N_("Night Scene/Twilight")},
{10, N_("Hi-Speed Shutter")},
{11, N_("Twilight Portrait")},
{12, N_("Soft Snap/Portrait")},
{13, N_("Fireworks")},
{14, N_("Smile Shutter")},
{15, N_("Manual")},
{18, N_("High Sensitivity")},
{19, N_("Macro")},
{20, N_("Advanced Sports Shooting")},
{29, N_("Underwater")},
{33, N_("Food")},
{34, N_("Sweep Panorama")},
{35, N_("Handheld Night Shot")},
{36, N_("Anti Motion Blur")},
{37, N_("Pet")},
{38, N_("Backlight Correction HDR")},
{39, N_("Superior Auto")},
{40, N_("Background Defocus")},
{41, N_("Soft Skin")},
{42, N_("3D Image")},
{0xffff, N_("n/a")}};
//! Lookup table to translate Sony JPEG quality values to readable labels
constexpr TagDetails sonyJPEGQuality[] = {
{0, N_("Standard")}, {1, N_("Fine")}, {2, N_("Extra Fine")}, {0xffff, N_("n/a")}};
//! Lookup table to translate Sony anti-blur values to readable labels
constexpr TagDetails sonyAntiBlur[] = {
{0, N_("Off")}, {1, N_("On (Continuous)")}, {2, N_("On (Shooting)")}, {0xffff, N_("n/a")}};
//! Lookup table to translate Sony dynamic range optimizer 2 values to readable labels
constexpr TagDetails print0xb04f[] = {{0, N_("Off")}, {1, N_("Standard")}, {2, N_("Plus")}};
//! Lookup table to translate Sony intelligent auto values to readable labels
constexpr TagDetails sonyIntelligentAuto[] = {{0, N_("Off")}, {1, N_("On")}, {2, N_("Advanced")}};
//! Lookup table to translate Sony white balance 2 values to readable labels
constexpr TagDetails sonyWhiteBalance2[] = {{0, N_("Auto")},
{4, N_("Manual")},
{5, N_("Daylight")},
{6, N_("Cloudy")},
{7, N_("Cool White Fluorescent")},
{8, N_("Day White Fluorescent")},
{9, N_("Daylight Fluorescent")},
{10, N_("Incandescent2")},
{11, N_("Warm White Fluorescent")},
{14, N_("Incandescent")},
{15, N_("Flash")},
{17, N_("Underwater 1 (Blue Water)")},
{18, N_("Underwater 2 (Green Water)")},
{19, N_("Underwater Auto")}};
//! Lookup table to translate Sony focus mode values to readable labels
constexpr TagDetails sonyFocusMode[] = {{1, "AF-S"}, {2, "AF-C"}, {4, N_("Permanent-AF")}, {0xffff, N_("n/a")}};
//! Lookup table to translate Sony auto focus mode (set 1) values to readable labels
constexpr TagDetails sonyAFModeSet1[] = {{0, N_("Default")}, {1, N_("Multi")}, {2, N_("Center")},
{3, N_("Spot")}, {4, N_("Flexible Spot")}, {6, N_("Touch")},
{14, N_("Tracking")}, {15, N_("Face Detected")}, {0xffff, N_("n/a")}};
//! Lookup table to translate Sony auto focus mode (set 2) values to readable labels
constexpr TagDetails sonyAFModeSet2[] = {{0, N_("Multi")},
{1, N_("Center")},
{2, N_("Spot")},
{3, N_("Flexible spot")},
{10, N_("Selective (for miniature effect)")},
{14, N_("Tracking")},
{15, N_("Face tracking")},
{255, N_("Manual")}};
//! Lookup table to translate Sony auto focus illuminator values to readable labels
constexpr TagDetails sonyAFIlluminator[] = {{0, N_("Off")}, {1, N_("Auto")}, {0xffff, N_("n/a")}};
//! Lookup table to translate Sony macro values to readable labels
constexpr TagDetails sonyMacro[] = {{0, N_("Off")}, {1, N_("On")}, {2, N_("Close Focus")}, {0xffff, N_("n/a")}};
//! Lookup table to translate Sony flash level values to readable labels
constexpr TagDetails sonyFlashLevel[] = {
{-32768, N_("Low")}, {-9, "-3.0 EV"}, {-8, "-2.7 EV"}, {-7, "-2.3 EV"}, {-6, "-2.0 EV"}, {-5, "-1.7 EV"},
{-4, "-1.3 EV"}, {-3, "-1.0 EV"}, {-2, "-0.7 EV"}, {-1, "-0.3 EV"}, {0, N_("Normal")}, {1, "+0.3 EV"},
{2, "+0.7 EV"}, {3, "+1.0 EV"}, {4, "+1.3 EV"}, {5, "+1.7 EV"}, {6, "+2.0 EV"}, {7, "+2.3 EV"},
{8, "+2.7 EV"}, {9, "+3.0 EV"}, {128, N_("n/a")}, {32767, N_("High")}};
//! Lookup table to translate Sony release mode values to readable labels
constexpr TagDetails sonyReleaseMode[] = {{0, N_("Normal")},
{2, N_("Continuous")},
{5, N_("Exposure Bracketing")},
{6, N_("White Balance Bracketing")},
{8, N_("DRO Bracketing")},
{0xffff, N_("n/a")}};
//! Lookup table to translate Sony sequence number values to readable labels
constexpr TagDetails sonySequenceNumber[] = {{0, N_("Single")}, {0xffff, N_("n/a")}};
//! Lookup table to translate Sony focus mode 3 values to readable labels
constexpr TagDetails sonyFocusMode3[] = {
{0, N_("Manual")}, {2, N_("AF-S")}, {3, N_("AF-C")}, {5, N_("Semi-manual")}, {6, N_("DMF")}};
//! Lookup table to translate Sony high ISO noise reduction 2 values to readable labels
constexpr TagDetails sonyHighISONoiseReduction2[] = {
{0, N_("Normal")}, {1, N_("High")}, {2, N_("Low")}, {3, N_("Off")}, {0xffff, N_("n/a")}};
//! Lookup table to translate Sony release mode 2 values to readable labels
constexpr TagDetails sonyReleaseMode2[] = {{0, N_("Normal")},
{1, N_("Continuous")},
{2, N_("Continuous - Exposure Bracketing")},
{3, N_("DRO or White Balance Bracketing")},
{5, N_("Continuous - Burst")},
{6, N_("Single Frame - Capture During Movie")},
{7, N_("Continuous - Sweep Panorama")},
{8, N_("Continuous - Anti-Motion Blur, Hand-held Twilight")},
{9, N_("Continuous - HDR")},
{10, N_("Continuous - Background defocus")},
{13, N_("Continuous - 3D Sweep Panorama")},
{15, N_("Continuous - High Resolution Sweep Panorama")},
{16, N_("Continuous - 3D Image")},
{17, N_("Continuous - Burst 2")},
{18, N_("Normal - iAuto+")},
{19, N_("Continuous - Speed/Advance Priority")},
{20, N_("Continuous - Multi-Frame NR")},
{23, N_("Single-frame - Exposure Bracketing")},
{26, N_("Continuous Low")},
{27, N_("Continuous - High Sensitivity")},
{28, N_("Smile Shutter")},
{29, N_("Continuous - Tele-zoom Advance Priority")},
{146, N_("Single Frame - Movie Capture")}};
//! Lookup table to translate Sony long exposure noise reduction values to readable labels
constexpr TagDetails sonyLongExposureNoiseReduction[] = {
{0x00000000, N_("Off")}, {0x00000001, N_("On (unused)")}, {0x00010001, N_("On (dark subtracted)")},
{0xffff0000, N_("Off (65535)")}, {0xffff0001, N_("On (65535)")}, {0xffffffff, N_("n/a")}};
//! Lookup table to translate Sony high ISO Noise reduction values to readable labels
constexpr TagDetails sonyHighISONoiseReductionStd[] = {{0, N_("Off")}, {1, N_("Low")}, {2, N_("Normal")},
{3, N_("High")}, {256, N_("Auto")}, {0xffff, N_("n/a")}};
static auto getModel(const ExifData* metadata, std::string& val) {
auto pos = metadata->findKey(ExifKey("Exif.Image.Model"));
if (pos != metadata->end() && pos->size() != 0 && pos->typeId() == asciiString) {
val = pos->toString(0);
return true;
}
// NOTE: As using the translated SonyModelID value, need to be synchronized with the array format
pos = metadata->findKey(ExifKey("Exif.Sony1.SonyModelID"));
if (pos != metadata->end() && pos->size() != 0 && pos->typeId() == unsignedShort) {
if (auto temp = pos->print(metadata); !Internal::contains(temp, ' ')) {
val = temp;
return true;
}
val = "";
return false;
}
pos = metadata->findKey(ExifKey("Exif.Sony2.SonyModelID"));
if (pos != metadata->end() && pos->size() != 0 && pos->typeId() == unsignedShort) {
if (auto temp = pos->print(metadata); !Internal::contains(temp, ' ')) {
val = temp;
return true;
}
val = "";
return false;
}
val = "";
return false;
}
static auto getAFAreaModeSetting(const ExifData* metadata, uint32_t& val) {
auto pos = metadata->findKey(ExifKey("Exif.Sony1.AFAreaModeSetting"));
if (pos != metadata->end() && pos->size() != 0 && pos->typeId() == unsignedByte) {
std::ostringstream oss;
pos->write(oss, metadata);
if (oss.str() == _("n/a")) {
val = 0;
return false;
}
val = pos->toUint32(0);
return true;
}
pos = metadata->findKey(ExifKey("Exif.Sony2.AFAreaModeSetting"));
if (pos != metadata->end() && pos->size() != 0 && pos->typeId() == unsignedByte) {
std::ostringstream oss;
pos->write(oss, metadata);
if (oss.str() == _("n/a")) {
val = 0;
return false;
}
val = pos->toUint32(0);
return true;
}
val = 0;
return false;
}
static auto getMetaVersion(const ExifData* metadata, std::string& val) {
const auto pos = metadata->findKey(ExifKey("Exif.SonySInfo1.MetaVersion"));
if (pos != metadata->end() && pos->typeId() == asciiString) {
std::string temp = pos->toString();
if (temp.length() != 0) {
val = temp;
return true;
}
}
val = "";
return false;
}
static auto getFocusMode2(const ExifData* metadata, uint32_t& val) {
auto pos = metadata->findKey(ExifKey("Exif.Sony1.FocusMode2"));
if (pos != metadata->end() && pos->size() != 0 && pos->typeId() == unsignedByte) {
std::ostringstream oss;
pos->write(oss, metadata);
if (oss.str() == _("n/a")) {
val = 0;
return false;
}
val = pos->toUint32(0);
return true;
}
pos = metadata->findKey(ExifKey("Exif.Sony2.FocusMode2"));
if (pos != metadata->end() && pos->size() != 0 && pos->typeId() == unsignedByte) {
std::ostringstream oss;
pos->write(oss, metadata);
if (oss.str() == _("n/a")) {
val = 0;
return false;
}
val = pos->toUint32(0);
return true;
}
val = 0;
return false;
}
std::ostream& SonyMakerNote::printWhiteBalanceFineTune(std::ostream& os, const Value& value, const ExifData*) {
if (value.count() != 1 || value.typeId() != unsignedLong) {
os << "(" << value << ")";
return os;
}
// Sony writes the tag as an unsignedLong but treat it as a signedLong. Source:
// https://github.com/exiftool/exiftool/blob/1e17485cbb372a502e5b9d052d01303db735e6fa/lib/Image/ExifTool/Sony.pm#L681
os << static_cast<int32_t>(value.toUint32(0));
return os;
}
std::ostream& SonyMakerNote::printMultiBurstMode(std::ostream& os, const Value& value, const ExifData* metadata) {
if (value.count() != 1 || value.typeId() != undefined) {
os << "(" << value << ")";
return os;
}
// Some cameras do not set the type to undefined. Source:
// https://github.com/exiftool/exiftool/blob/1e17485cbb372a502e5b9d052d01303db735e6fa/lib/Image/ExifTool/Sony.pm#L763
printMinoltaSonyBoolValue(os, value, metadata);
return os;
}
std::ostream& SonyMakerNote::printMultiBurstSize(std::ostream& os, const Value& value, const ExifData*) {
if (value.count() != 1 || value.typeId() != unsignedShort) {
os << "(" << value << ")";
return os;
}
// Some cameras do not set the type to unsignedShort. Source:
// https://github.com/exiftool/exiftool/blob/1e17485cbb372a502e5b9d052d01303db735e6fa/lib/Image/ExifTool/Sony.pm#L771
os << value.toUint32(0);
return os;
}
std::ostream& SonyMakerNote::printAutoHDRStd(std::ostream& os, const Value& value, const ExifData* metadata) {
if (value.count() != 1 || value.typeId() != unsignedLong) {
os << "(" << value << ")";
return os;
}
// Sony writes the tag as an unsignedLong but treat it as 2 unsignedShort values. Source:
// https://github.com/exiftool/exiftool/blob/1e17485cbb372a502e5b9d052d01303db735e6fa/lib/Image/ExifTool/Sony.pm#L887
const auto v0 = value.toUint32(0);
EXV_PRINT_TAG(sonyHDRStdPart1)(os, (v0 & 0x00ff), metadata);
os << ", ";
EXV_PRINT_TAG(sonyHDRStdPart2)(os, (v0 >> 16), metadata);
return os;
}
std::ostream& SonyMakerNote::printWBShiftABGM(std::ostream& os, const Value& value, const ExifData*) {
if (value.count() != 2 || value.typeId() != signedLong) {
os << "(" << value << ")";
return os;
}
// Examples of Output:
// 1. "A/B: 0, G/M: 0"
// 2. "A/B: 1B, G/M: 2M"
const auto v0 = value.toInt64(0);
const auto v1 = value.toInt64(1);
os << "A/B: ";
if (v0 == 0) {
os << 0;
} else if (v0 < 0) {
os << "A" << -v0;
} else {
os << "B" << v0;
}
os << ", G/M: ";
if (v1 == 0) {
os << 0;
} else if (v1 < 0) {
os << "G" << -v1;
} else {
os << "M" << v1;
}
return os;
}
std::ostream& SonyMakerNote::printFocusMode2(std::ostream& os, const Value& value, const ExifData* metadata) {
if (value.count() != 1 || value.typeId() != unsignedByte || !metadata) {
os << "(" << value << ")";
return os;
}
// Tag only valid for certain camera models. See
// https://github.com/exiftool/exiftool/blob/1e17485cbb372a502e5b9d052d01303db735e6fa/lib/Image/ExifTool/Sony.pm#L1123
std::string model;
if (!getModel(metadata, model)) {
os << "(" << value << ")";
return os;
}
const auto v0 = value.toUint32(0);
constexpr std::array models{"DSC-RX10M4", "DSC-RX100M6", "DSC-RX100M7", "DSC-RX100M5A", "DSC-HX99", "DSC-RX0M2"};
if (!startsWith(model, "DSC-") ||
std::any_of(models.begin(), models.end(), [&model](auto& m) { return startsWith(model, m); })) {
EXV_PRINT_TAG(sonyFocusMode2)(os, v0, metadata);
return os;
}
os << _("n/a");
return os;
}
std::ostream& SonyMakerNote::printAFAreaModeSetting(std::ostream& os, const Value& value, const ExifData* metadata) {
if (value.count() != 1 || value.typeId() != unsignedByte || !metadata) {
os << "(" << value << ")";
return os;
}
// Tag only valid for certain camera models. See
// https://github.com/exiftool/exiftool/blob/1e17485cbb372a502e5b9d052d01303db735e6fa/lib/Image/ExifTool/Sony.pm#L1139
std::string model;
if (!getModel(metadata, model)) {
os << "(" << value << ")";
return os;
}
const auto v0 = value.toUint32(0);
constexpr std::array models1{"SLT-", "HV"};
if (std::any_of(models1.begin(), models1.end(), [&model](auto& m) { return startsWith(model, m); })) {
EXV_PRINT_TAG(sonyAFAreaModeSettingSet1)(os, v0, metadata);
return os;
}
constexpr std::array models2{"NEX-", "ILCE-", "ILME-", "DSC-RX10M4", "DSC-RX100M6",
"DSC-RX100M7", "DSC-RX100M5A", "DSC-HX99", "DSC-RX0M2"};
if (std::any_of(models2.begin(), models2.end(), [&model](auto& m) { return startsWith(model, m); })) {
EXV_PRINT_TAG(sonyAFAreaModeSettingSet2)(os, v0, metadata);
return os;
}
if (startsWith(model, "ILCA-")) {
EXV_PRINT_TAG(sonyAFAreaModeSettingSet3)(os, v0, metadata);
return os;
}
os << _("n/a");
return os;
}
std::ostream& SonyMakerNote::printFlexibleSpotPosition(std::ostream& os, const Value& value, const ExifData* metadata) {
if (value.count() != 2 || value.typeId() != unsignedShort || !metadata) {
os << "(" << value << ")";
return os;
}
// Tag only valid for certain camera models. See
// https://github.com/exiftool/exiftool/blob/1e17485cbb372a502e5b9d052d01303db735e6fa/lib/Image/ExifTool/Sony.pm#L1189
std::string model;
if (!getModel(metadata, model)) {
os << "(" << value << ")";
return os;
}
constexpr std::array models{"NEX-", "ILCE-", "ILME-", "DSC-RX10M4", "DSC-RX100M6",
"DSC-RX100M7", "DSC-RX100M5A", "DSC-HX99", "DSC-RX0M2"};
if (std::any_of(models.begin(), models.end(), [&model](auto& m) { return startsWith(model, m); })) {
os << value.toUint32(0) << ", " << value.toUint32(1);
return os;
}
os << _("n/a");
return os;
}
std::ostream& SonyMakerNote::printAFPointSelected(std::ostream& os, const Value& value, const ExifData* metadata) {
if (value.count() != 1 || value.typeId() != unsignedByte || !metadata) {
os << "(" << value << ")";
return os;
}
// Tag only valid for certain camera models. See
// https://github.com/exiftool/exiftool/blob/1e17485cbb372a502e5b9d052d01303db735e6fa/lib/Image/ExifTool/Sony.pm#L1203
std::string model;
if (!getModel(metadata, model)) {
os << "(" << value << ")";
return os;
}
uint32_t aFAreaModeSetting = 0;
const auto status = getAFAreaModeSetting(metadata, aFAreaModeSetting);
constexpr std::array models1{"SLT-", "HV-"};
constexpr std::array models2{"ILCE-", "ILME-"};
constexpr std::array models3{"ILCA-68", "ILCA-77M2"};
constexpr std::array models4{"NEX-", "ILCE-", "ILME-"};
if (std::any_of(models1.begin(), models1.end(), [&model](auto& m) { return startsWith(model, m); })) {
EXV_PRINT_TAG(sonyAFPointSelectedSet1)(os, value.toUint32(0), metadata);
return os;
}
if (std::any_of(models2.begin(), models2.end(), [&model](auto& m) { return startsWith(model, m); }) && status &&
aFAreaModeSetting == 4) {
EXV_PRINT_TAG(sonyAFPointSelectedSet1)(os, value.toUint32(0), metadata);
return os;
}
if (std::any_of(models3.begin(), models3.end(), [&model](auto& m) { return startsWith(model, m); }) && status &&
aFAreaModeSetting != 8) {
EXV_PRINT_TAG(sonyAFPointSelectedSet2)(os, value, metadata);
return os;
}
if (startsWith(model, "ILCA-99M2") && status && aFAreaModeSetting != 8) {
EXV_PRINT_TAG(sonyAFPointSelectedSet3)(os, value, metadata);
return os;
}
if (startsWith(model, "ILCA-") && status && aFAreaModeSetting == 8) {
EXV_PRINT_TAG(sonyAFPointSelectedSet4)(os, value.toUint32(0), metadata);
return os;
}
if (std::any_of(models4.begin(), models4.end(), [&model](auto& m) { return startsWith(model, m); })) {
EXV_PRINT_TAG(sonyAFPointSelectedSet5)(os, value.toUint32(0), metadata);
return os;
}
os << _("n/a");
return os;
}
std::ostream& SonyMakerNote::printAFPointsUsed(std::ostream& os, const Value& value, const ExifData* metadata) {
if (value.typeId() != unsignedByte || !metadata) {
os << "(" << value << ")";
return os;
}
std::string model;
if (!getModel(metadata, model)) {
os << "(" << value << ")";
return os;
}
constexpr std::array models1{"ILCA-", "DSC-"};
constexpr std::array models2{"ILCA-68", "ILCA-77M2"};
if (std::none_of(models1.begin(), models1.end(), [&model](auto& m) { return startsWith(model, m); })) {
EXV_PRINT_TAG_BITLIST_ALL_LE(sonyAFPointsUsedSet1)(os, value, metadata);
return os;
}
if (std::any_of(models2.begin(), models2.end(), [&model](auto& m) { return startsWith(model, m); })) {
EXV_PRINT_TAG_BITLIST_ALL_LE(sonyAFPointsUsedSet2)(os, value, metadata);
return os;
}
os << _("n/a");
return os;