Project

General

Profile

Patch #704 ยป exiv2-pentax-update.patch

Anonymous, 06 May 2010 04:07

View differences:

src/pentaxmn.hpp (working copy)
88 88
      @brief Print function to translate Pentax "combi-values" to a description
89 89
             by looking up a reference table.
90 90
     */
91
    template <int N, const TagDetails (&array)[N], int count, int ignoredcount>
91
    template <int N, const TagDetails (&array)[N], int count, int ignoredcount, int ignoredcountmax>
92 92
    std::ostream& printCombiTag(std::ostream& os, const Value& value, const ExifData* metadata)
93 93
    {
94
        if ((value.count() != count && value.count() != (count + ignoredcount)) || count > 4) {
94
        if ((value.count() != count && (value.count() < (count + ignoredcount) || value.count() > (count + ignoredcountmax))) || count > 4) {
95 95
            return printValue(os, value, metadata);
96 96
        }
97 97
        unsigned long l = 0;
......
115 115
    }
116 116

  
117 117
//! Shortcut for the printCombiTag template which requires typing the array name only once.
118
#define EXV_PRINT_COMBITAG(array, count, ignoredcount) printCombiTag<EXV_COUNTOF(array), array, count, ignoredcount>
118
#define EXV_PRINT_COMBITAG(array, count, ignoredcount) printCombiTag<EXV_COUNTOF(array), array, count, ignoredcount, ignoredcount>
119
#define EXV_PRINT_COMBITAG_MULTI(array, count, ignoredcount, ignoredcountmax) printCombiTag<EXV_COUNTOF(array), array, count, ignoredcount, ignoredcountmax>
119 120

  
120 121
}                                       // namespace Exiv2
121 122

  
src/pentaxmn.cpp (working copy)
100 100
        {    0x12b9c, N_("K100D") },
101 101
        {    0x12b9d, N_("K110D") },
102 102
        {    0x12ba2, N_("K100D Super") },
103
        {    0x12bb0, N_("Optio T10") },
103
        {    0x12bb0, N_("Optio T10/T20") },
104 104
        {    0x12be2, N_("Optio W10") },
105 105
        {    0x12bf6, N_("Optio M10") },
106 106
        {    0x12c1e, N_("K10D") },
107 107
        {    0x12c20, N_("Samsung GX10") },
108 108
        {    0x12c28, N_("Optio S7") },
109
        {    0x12c2d, N_("Optio L20") },
109 110
        {    0x12c32, N_("Optio M20") },
110 111
        {    0x12c3c, N_("Optio W20") },
111 112
        {    0x12c46, N_("Optio A20") },
112 113
        {    0x12c8c, N_("Optio M30") },
113 114
        {    0x12c78, N_("Optio E30") },
115
        {    0x12c7d, N_("Optio E35") },
114 116
        {    0x12c82, N_("Optio T30") },
115 117
        {    0x12c96, N_("Optio W30") },
116 118
        {    0x12ca0, N_("Optio A30") },
117 119
        {    0x12cb4, N_("Optio E40") },
118 120
        {    0x12cbe, N_("Optio M40") },
119 121
        {    0x12cc8, N_("Optio Z10") },
120
        {    0x12cdc, N_("Optio S10") },
121
        {    0x12ce6, N_("Optio A40") },
122
        {    0x12cf0, N_("Optio V10") },
123 122
        {    0x12cd2, N_("K20D") },
123
        {    0x12cd4, N_("Samsung GX20") },
124 124
        {    0x12cdc, N_("Optio S10") },
125 125
        {    0x12ce6, N_("Optio A40") },
126 126
        {    0x12cf0, N_("Optio V10") },
127 127
        {    0x12cfa, N_("K200D") },
128
        {    0x12d04, N_("Optio S12") },
128 129
        {    0x12d0e, N_("Optio E50") },
129 130
        {    0x12d18, N_("Optio M50") },
131
        {    0x12d2c, N_("Optio V20") },
132
        {    0x12d40, N_("Optio W60") },
133
        {    0x12d4a, N_("Optio M60") },
134
        {    0x12d68, N_("Optio E60") },
135
        {    0x12d72, N_("K2000") },
136
        {    0x12d73, N_("K-m") },
137
        {    0x12d86, N_("Optio P70") },
138
        {    0x12d9a, N_("Optio E70") },
139
        {    0x12dae, N_("X70") },
140
        {    0x12db8, N_("K-7") },
141
        {    0x12dcc, N_("Optio W80") },
142
        {    0x12dea, N_("Optio P80") },
143
        {    0x12df4, N_("Optio WS80") },
144
        {    0x12dfe, N_("K-x") },
145
        {    0x12e3a, N_("Optio I-10") },
130 146
    };
131 147

  
132 148
    //! Quality, tag 0x0008
......
181 197
        {    1, N_("Macro") },
182 198
        {    2, N_("Infinity") },
183 199
        {    3, N_("Manual") },
200
        {    4, N_("Super Macro") },
184 201
        {    5, N_("Pan Focus") },
185 202
        {    16, N_("AF-S") },
186 203
        {    17, N_("AF-C") },
204
        {    18, N_("AF-A") },
187 205
    };
188 206

  
189 207
    //! AFPoint, tag 0x000e
190 208
    extern const TagDetails pentaxAFPoint[] = {
191 209
        {    0xffff, N_("Auto") },
192 210
        {    0xfffe, N_("Fixed Center") },
211
        {    0xfffd, N_("Automatic Tracking AF") },
212
        {    0xfffc, N_("Face Recognition AF") },
193 213
        {    1, N_("Upper-left") },
194 214
        {    2, N_("Top") },
195 215
        {    3, N_("Upper-right") },
......
203 223
        {    11, N_("Lower-right") },
204 224
    };
205 225

  
226
    //! AFPointInFocus, tag 0x000f
227
    extern const TagDetails pentaxAFPointFocus[] = {
228
        {    0xffff, N_("None") },
229
        {    0, N_("Fixed Center or multiple") },
230
        {    1, N_("Top-left") },
231
        {    2, N_("Top-center") },
232
        {    3, N_("Top-right") },
233
        {    4, N_("Left") },
234
        {    5, N_("Center") },
235
        {    6, N_("Right") },
236
        {    7, N_("Bottom-left") },
237
        {    8, N_("Bottom-center") },
238
        {    9, N_("Bottom-right") },
239
    };
240

  
206 241
    //! ISO, tag 0x0014
207 242
    extern const TagDetails pentaxISO[] = {
208 243
        {    3, N_("50") },
......
221 256
        {    16, N_("1000") },
222 257
        {    17, N_("1250") },
223 258
        {    18, N_("1600") },
259
        {    19, N_("2000") },
260
        {    20, N_("2500") },
224 261
        {    21, N_("3200") },
262
        {    22, N_("4000") },
263
        {    23, N_("5000") },
264
        {    24, N_("6400") },
225 265
        {    50, N_("50") },
226 266
        {    100, N_("100") },
227 267
        {    200, N_("200") },
......
230 270
        {    800, N_("800") },
231 271
        {    1600, N_("1600") },
232 272
        {    3200, N_("3200") },
273
        {    258, N_("50") },
274
        {    259, N_("70") },
275
        {    260, N_("100") },
276
        {    261, N_("140") },
277
        {    262, N_("200") },
278
        {    263, N_("280") },
279
        {    264, N_("400") },
280
        {    265, N_("560") },
281
        {    266, N_("800") },
282
        {    267, N_("1100") },
283
        {    268, N_("1600") },
284
        {    269, N_("2200") },
285
        {    270, N_("3200") },
233 286
    };
234 287

  
235 288
    //! Generic for Off/On switches
......
264 317
        {    8, N_("WhiteFluorescent") },
265 318
        {    9, N_("Flash") },
266 319
        {    10, N_("Cloudy") },
320
        {    17, N_("Kelvin") },
267 321
        {    65534, N_("Unknown") },
268 322
        {    65535, N_("User Selected") },
269 323
    };
......
290 344
        {    4, N_("Med High") },
291 345
        {    5, N_("Very Low") },
292 346
        {    6, N_("Very High") },
347
        {    65535, N_("None") },
293 348
    };
294 349

  
295 350
    //! Contrast, tag 0x0020
......
393 448
        {    68, N_("Amsterdam") },
394 449
        {    69, N_("Stockholm") },
395 450
        {    70, N_("Lisbon") },
451
        {    71, N_("Copenhagen") },
396 452
    };
397 453

  
398 454
    //! ImageProcessing, combi-tag 0x0032 (4 bytes)
......
424 480
        { 0x001000, N_("Pet") },
425 481
        { 0x001100, N_("Candlelight") },
426 482
        { 0x001200, N_("Museum") },
483
        { 0x001300, N_("Food") },
484
        { 0x001400, N_("Stage Lighting") },
485
        { 0x001500, N_("Night Snap") },
427 486
        /* AUTO PICT modes (auto-selected) */
428 487
        { 0x010400, N_("Auto PICT (Standard)") },
429 488
        { 0x010500, N_("Auto PICT (Portrait)") },
......
461 520
        { 0x100000, N_("Flash X-Sync Speed AE") },
462 521
        { 0x100001, N_("Flash X-Sync Speed AE (1)") },
463 522
        /* other modes */
464
        { 0x000001, N_("Program") }
523
        { 0x000001, N_("Program") },
524
        { 0xfe0000, N_("Video (30 fps)") },
525
        { 0xff0004, N_("Video (24 fps)") },
465 526
    };
466 527

  
467 528
    //! DriveMode, combi-tag 0x0034 (4 bytes)
......
475 536
        { 0x00000100, N_("Remote Control (3 sec)") },
476 537
        { 0x00000200, N_("Remote Control") },
477 538
        { 0x00000001, N_("Multiple Exposure") },
539
        { 0x000000ff, N_("Video") },
478 540
    };
479 541

  
480 542
    //! ColorSpace, tag 0x0037
......
599 661
        { 0x060d, "smc PENTAX-FA* 400mm F5.6 ED[IF]" },
600 662
        { 0x060e, "smc PENTAX-FA* MACRO 200mm F4 ED[IF]" },
601 663
        { 0x0700, "smc PENTAX-DA 21mm F3.2 AL Limited" },
664
        { 0x074b, "Tamron SP AF 70-200mm F2.8 Di LD [IF] Macro (A001)" },
665
        { 0x07d9, "smc PENTAX-DA 50-200mm F4-5.6 ED WR" },
666
        { 0x07da, "smc PENTAX-DA 18-55mm F3.5-5.6 AL WR" },
667
        { 0x07dc, "Tamron SP AF 10-24mm F3.5-4.5 Di II LD Aspherical [IF]" },
668
        { 0x07de, "smc PENTAX-DA 18-55mm F3.5-5.6 AL II" },
669
        { 0x07df, "Samsung D-XENON 18-55mm F3.5-5.6 II" },
670
        { 0x07e0, "smc PENTAX-DA 15mm F4 ED AL Limited" },
671
        { 0x07e1, "Samsung D-XENON 18-250mm F3.5-6.3" },
602 672
        { 0x07e5, "smc PENTAX-DA 18-55mm F3.5-5.6 AL II" },
603 673
        { 0x07e6, "Tamron AF 17-50mm F2.8 XR Di-II LD (Model A16)" },
604 674
        { 0x07e7, "smc PENTAX-DA 18-250mm F3.5-6.3ED AL [IF]" },
605 675
        { 0x07e9, "smc PENTAX-DA 35mm F2.8 Macro Limited" },
606 676
        { 0x07ea, "smc PENTAX-DA* 300 mm F4ED [IF] SDM (SDM not used)" },
607 677
        { 0x07eb, "smc PENTAX-DA* 200mm F2.8 ED [IF] SDM (SDM not used)" },
678
        { 0x07ec, "smc PENTAX-DA 55-300mm F4-5.8 ED" },
608 679
        { 0x07ee, "TAMRON AF 18-250mm F3.5-6.3 Di II LD Aspherical [IF] MACRO" },
609 680
        { 0x07f1, "smc PENTAX-DA* 50-135mm F2.8 ED [IF] SDM (SDM not used)" },
610 681
        { 0x07f2, "smc PENTAX-DA* 16-50mm F2.8 ED AL [IF] SDM (SDM not used)" },
......
822 893
        TagInfo(0x000e, "AFPoint", N_("AF point"),
823 894
                N_("Selected AF point"),
824 895
                pentaxIfdId, makerTags, unsignedLong, EXV_PRINT_TAG(pentaxAFPoint)),
896
        TagInfo(0x000F, "AFPointInFocus", N_("AF point in focus"),
897
                N_("AF point in focus"),
898
                pentaxIfdId, makerTags, unsignedLong, EXV_PRINT_TAG(pentaxAFPointFocus)),
825 899
        /* Some missing ! */
826 900
        TagInfo(0x0012, "ExposureTime", N_("Exposure time"),
827 901
                N_("Exposure time"),
......
849 923
        TagInfo(0x001a, "WhiteBallanceMode", N_("White ballance mode"),
850 924
                N_("White ballance mode"),
851 925
                pentaxIfdId, makerTags, undefined, EXV_PRINT_TAG(pentaxWhiteBallanceMode)),
852
        /* Some missing ! */
926
        TagInfo(0x001b, "BlueBalance", N_("Blue balance"),
927
                N_("Blue color balance"),
928
                pentaxIfdId, makerTags, unsignedLong, printValue),
929
        TagInfo(0x001c, "RedBalance", N_("Red balance"),
930
                N_("Red color balance"),
931
                pentaxIfdId, makerTags, unsignedLong, printValue),
853 932
        TagInfo(0x001d, "FocalLength", N_("FocalLength"),
854 933
                N_("FocalLength"),
855 934
                pentaxIfdId, makerTags, undefined, printPentaxFocalLength),
856
        /* Some missing ! */
935
        TagInfo(0x001e, "DigitalZoom", N_("Digital zoom"),
936
                N_("Digital zoom"),
937
                pentaxIfdId, makerTags, unsignedLong, printValue),
857 938
        TagInfo(0x001f, "Saturation", N_("Saturation"),
858 939
                N_("Saturation"),
859 940
                pentaxIfdId, makerTags, undefined, EXV_PRINT_TAG(pentaxSaturation)),
......
905 986
        TagInfo(0x0037, "ColorSpace", N_("Color space"),
906 987
                N_("Color space"),
907 988
                pentaxIfdId, makerTags, unsignedShort, EXV_PRINT_TAG(pentaxColorSpace)),
989
        TagInfo(0x0038, "ImageAreaOffset", N_("Image area offset"),
990
                N_("Image area offset"),
991
                pentaxIfdId, makerTags, unsignedLong, printValue),
992
        TagInfo(0x0039, "RawImageSize", N_("Raw image size"),
993
                N_("Raw image size"),
994
                pentaxIfdId, makerTags, unsignedLong, printValue),
908 995
        /* Some missing ! */
909 996
        TagInfo(0x003e, "PreviewImageBorders", N_("Preview image borders"),
910 997
                N_("Preview image borders"),
911 998
                pentaxIfdId, makerTags, unsignedByte, printValue),
912 999
        TagInfo(0x003f, "LensType", N_("Lens type"),
913 1000
                N_("Lens type"),
914
                pentaxIfdId, makerTags, unsignedByte, EXV_PRINT_COMBITAG(pentaxLensType, 2, 1)),
1001
                pentaxIfdId, makerTags, unsignedByte, EXV_PRINT_COMBITAG_MULTI(pentaxLensType, 2, 1, 2)),
915 1002
        TagInfo(0x0040, "SensitivityAdjust", N_("Sensitivity adjust"),
916 1003
                N_("Sensitivity adjust"),
917 1004
                pentaxIfdId, makerTags, unsignedLong, printValue),
......
952 1039
        TagInfo(0x0071, "HighISONoiseReduction", N_("High ISO noise reduction"),
953 1040
                N_("High ISO noise reduction"),
954 1041
                pentaxIfdId, makerTags, unsignedByte, EXV_PRINT_TAG(pentaxHighISONoiseReduction)),
1042
        TagInfo(0x0072, "AFAdjustment", N_("AF Adjustment"),
1043
                N_("AF Adjustment"),
1044
                pentaxIfdId, makerTags, undefined, printValue),
955 1045
        /* Many missing ! */
956 1046
        TagInfo(0x0200, "BlackPoint", N_("Black point"),
957 1047
                N_("Black point"),
......
1018 1108
        TagInfo(0x0222, "ColorInfo", N_("ColorInfo"),
1019 1109
                N_("ColorInfo"),
1020 1110
                pentaxIfdId, makerTags, undefined, printValue), /* TODO: Decoding missing */
1111
        TagInfo(0x0229, "SerialNumber", N_("Serial Number"),
1112
                N_("Serial Number"),
1113
                pentaxIfdId, makerTags, asciiString, printValue),
1021 1114
        // End of list marker
1022 1115
        TagInfo(0xffff, "(UnknownPentaxMakerNoteTag)", "(UnknownPentaxMakerNoteTag)",
1023 1116
                N_("Unknown PentaxMakerNote tag"),
    (1-1/1)