source: gs2-extensions/parallel-building/trunk/src/perllib/cpan/Image/ExifTool/NikonCustom.pm@ 24626

Last change on this file since 24626 was 24626, checked in by jmt12, 13 years ago

An (almost) complete copy of the perllib directory from a (circa SEP2011) head checkout from Greenstone 2 trunk - in order to try and make merging in this extension a little easier later on (as there have been some major changes to buildcol.pl commited in the main trunk but not in the x64 branch)

  • Property svn:executable set to *
File size: 104.2 KB
Line 
1#------------------------------------------------------------------------------
2# File: NikonCustom.pm
3#
4# Description: Read and write Nikon Custom settings
5#
6# Revisions: 2009/11/25 - P. Harvey Created
7#
8# References: 1) Warren Hatch private communication (D3 with SB-800 and SB-900)
9# 2) Anonymous contribution 2011/05/25 (D700, D7000)
10# JD) Jens Duttke private communication
11#------------------------------------------------------------------------------
12
13package Image::ExifTool::NikonCustom;
14
15use strict;
16use vars qw($VERSION);
17
18$VERSION = '1.06';
19
20# custom settings for the D80 (encrypted) - ref JD
21%Image::ExifTool::NikonCustom::SettingsD80 = (
22 PROCESS_PROC => \&Image::ExifTool::ProcessBinaryData,
23 WRITE_PROC => \&Image::ExifTool::WriteBinaryData,
24 CHECK_PROC => \&Image::ExifTool::CheckBinaryData,
25 WRITABLE => 1,
26 FIRST_ENTRY => 0,
27 GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
28 NOTES => 'Custom settings for the Nikon D80.',
29 0.1 => { # CS1
30 Name => 'Beep',
31 Mask => 0x80,
32 PrintConv => {
33 0x00 => 'On',
34 0x80 => 'Off',
35 },
36 },
37 0.2 => { # CS4
38 Name => 'AFAssist',
39 Mask => 0x40,
40 PrintConv => {
41 0x00 => 'On',
42 0x40 => 'Off',
43 },
44 },
45 0.3 => { # CS5
46 Name => 'NoMemoryCard',
47 Mask => 0x20,
48 PrintConv => {
49 0x00 => 'Release Locked',
50 0x20 => 'Enable Release',
51 },
52 },
53 0.4 => { # CS6
54 Name => 'ImageReview',
55 Mask => 0x10,
56 PrintConv => {
57 0x00 => 'On',
58 0x10 => 'Off',
59 },
60 },
61 0.5 => { # CS17
62 Name => 'Illumination',
63 Mask => 0x08,
64 PrintConv => {
65 0x00 => 'Off',
66 0x08 => 'On',
67 },
68 },
69 0.6 => { # CS11
70 Name => 'MainDialExposureComp',
71 Mask => 0x04,
72 PrintConv => {
73 0x00 => 'Off',
74 0x04 => 'On',
75 },
76 },
77 0.7 => { # CS10
78 Name => 'EVStepSize',
79 Mask => 0x01,
80 PrintConv => {
81 0x00 => '1/3 EV',
82 0x01 => '1/2 EV',
83 },
84 },
85 1.1 => { # CS7
86 Name => 'AutoISO',
87 Mask => 0x40,
88 PrintConv => {
89 0x00 => 'Off',
90 0x40 => 'On',
91 },
92 },
93 1.2 => { # CS7-a
94 Name => 'AutoISOMax',
95 Mask => 0x30,
96 PrintConv => {
97 0x00 => 200,
98 0x10 => 400,
99 0x20 => 800,
100 0x30 => 1600,
101 },
102 },
103 1.3 => { # CS7-b
104 Name => 'AutoISOMinShutterSpeed',
105 Mask => 0x0f,
106 PrintConvColumns => 2,
107 PrintConv => {
108 0x00 => '1/125 s',
109 0x01 => '1/100 s',
110 0x02 => '1/80 s',
111 0x03 => '1/60 s',
112 0x04 => '1/40 s',
113 0x05 => '1/30 s',
114 0x06 => '1/15 s',
115 0x07 => '1/8 s',
116 0x08 => '1/4 s',
117 0x09 => '1/2 s',
118 0x0a => '1 s',
119 },
120 },
121 2.1 => { # CS13
122 Name => 'AutoBracketSet',
123 Mask => 0xc0,
124 PrintConv => {
125 0x00 => 'AE & Flash',
126 0x40 => 'AE Only',
127 0x80 => 'Flash Only',
128 0xc0 => 'WB Bracketing',
129 },
130 },
131 2.2 => { # CS14
132 Name => 'AutoBracketOrder',
133 Mask => 0x20,
134 PrintConv => {
135 0x00 => '0,-,+',
136 0x20 => '-,0,+',
137 },
138 },
139 3.1 => { # CS27
140 Name => 'MonitorOffTime',
141 Mask => 0xe0,
142 PrintConv => {
143 0x00 => '5 s',
144 0x20 => '10 s',
145 0x40 => '20 s',
146 0x60 => '1 min',
147 0x80 => '5 min',
148 0xa0 => '10 min',
149 },
150 },
151 3.2 => { # CS28
152 Name => 'MeteringTime',
153 Mask => 0x1c,
154 PrintConv => {
155 0x00 => '4 s',
156 0x04 => '6 s',
157 0x08 => '8 s',
158 0x0c => '16 s',
159 0x10 => '30 s',
160 0x14 => '30 min',
161 },
162 },
163 3.3 => { # CS29
164 Name => 'SelfTimerTime',
165 Mask => 0x03,
166 PrintConv => {
167 0x00 => '2 s',
168 0x01 => '5 s',
169 0x02 => '10 s',
170 0x03 => '20 s',
171 },
172 },
173 4.1 => { # CS18
174 Name => 'AELockButton',
175 Mask => 0x1e,
176 PrintConv => {
177 0x00 => 'AE/AF Lock',
178 0x02 => 'AE Lock Only',
179 0x04 => 'AF Lock Only',
180 0x06 => 'AE Lock (hold)',
181 0x08 => 'AF-ON',
182 0x0a => 'FV Lock',
183 0x0c => 'Focus Area Selection',
184 0x0e => 'AE-L/AF-L/AF Area',
185 0x10 => 'AE-L/AF Area',
186 0x12 => 'AF-L/AF Area',
187 0x14 => 'AF-ON/AF Area',
188 },
189 },
190 4.2 => { # CS19
191 Name => 'AELock',
192 Mask => 0x01,
193 PrintConv => {
194 0x00 => 'Off',
195 0x01 => 'On',
196 },
197 },
198 4.3 => { # CS30
199 Name => 'RemoteOnDuration',
200 Mask => 0xc0,
201 PrintConv => {
202 0x00 => '1 min',
203 0x40 => '5 min',
204 0x80 => '10 min',
205 0xc0 => '15 min',
206 },
207 },
208 5.1 => { # CS15
209 Name => 'CommandDials',
210 Mask => 0x80,
211 PrintConv => {
212 0x00 => 'Standard (Main Shutter, Sub Aperture)',
213 0x80 => 'Reversed (Main Aperture, Sub Shutter)',
214 },
215 },
216 5.2 => { # CS16
217 Name => 'FunctionButton',
218 Mask => 0x78,
219 PrintConv => {
220 0x00 => 'ISO Display',
221 0x08 => 'Framing Grid',
222 0x10 => 'AF-area Mode',
223 0x18 => 'Center AF Area',
224 0x20 => 'FV Lock',
225 0x28 => 'Flash Off',
226 0x30 => 'Matrix Metering',
227 0x38 => 'Center-weighted',
228 0x40 => 'Spot Metering',
229 },
230 },
231 6.1 => { # CS8
232 Name => 'GridDisplay',
233 Mask => 0x80,
234 PrintConv => {
235 0x00 => 'Off',
236 0x80 => 'On',
237 },
238 },
239 6.2 => { # CS9
240 Name => 'ViewfinderWarning',
241 Mask => 0x40,
242 PrintConv => {
243 0x00 => 'On',
244 0x40 => 'Off',
245 },
246 },
247 6.3 => { # CS12
248 Name => 'CenterWeightedAreaSize',
249 Mask => 0x0c,
250 PrintConv => {
251 0x00 => '6 mm',
252 0x04 => '8 mm',
253 0x08 => '10 mm',
254 },
255 },
256 6.4 => { # CS31
257 Name => 'ExposureDelayMode',
258 Mask => 0x20,
259 PrintConv => {
260 0x00 => 'Off',
261 0x20 => 'On',
262 },
263 },
264 6.5 => { # CS32
265 Name => 'MB-D80Batteries',
266 Mask => 0x03,
267 PrintConv => {
268 0x00 => 'LR6 (AA Alkaline)',
269 0x01 => 'HR6 (AA Ni-MH)',
270 0x02 => 'FR6 (AA Lithium)',
271 0x03 => 'ZR6 (AA Ni-Mg)',
272 },
273 },
274 7.1 => { # CS23
275 Name => 'FlashWarning',
276 Mask => 0x80,
277 PrintConv => {
278 0x00 => 'On',
279 0x80 => 'Off',
280 },
281 },
282 7.2 => { # CS24
283 Name => 'FlashShutterSpeed',
284 Mask => 0x78,
285 ValueConv => '2 ** (($val >> 3) - 6)',
286 ValueConvInv => '$val>0 ? int(log($val)/log(2)+6+0.5) << 3 : 0',
287 PrintConv => 'Image::ExifTool::Exif::PrintExposureTime($val)',
288 PrintConvInv => 'Image::ExifTool::Exif::ConvertFraction($val)',
289 },
290 7.3 => { # CS25
291 Name => 'AutoFP',
292 Mask => 0x04,
293 PrintConv => {
294 0x00 => 'Off',
295 0x04 => 'On',
296 },
297 },
298 7.4 => { # CS26
299 Name => 'ModelingFlash',
300 Mask => 0x02,
301 PrintConv => {
302 0x00 => 'Off',
303 0x02 => 'On',
304 },
305 },
306 8.1 => { # CS22
307 Name => 'InternalFlash',
308 Mask => 0xc0,
309 PrintConv => {
310 0x00 => 'TTL',
311 0x40 => 'Manual',
312 0x80 => 'Repeating Flash',
313 0xc0 => 'Commander Mode',
314 },
315 },
316 8.2 => { # CS22-a
317 Name => 'ManualFlashOutput',
318 Mask => 0x07,
319 ValueConv => '2 ** (-$val)',
320 ValueConvInv => '$val > 0 ? -log($val)/log(2) : 0',
321 PrintConv => q{
322 return 'Full' if $val > 0.99;
323 Image::ExifTool::Exif::PrintExposureTime($val);
324 },
325 PrintConvInv => '$val=~/F/i ? 1 : Image::ExifTool::Exif::ConvertFraction($val)',
326 },
327 9.1 => { # CS22-b
328 Name => 'RepeatingFlashOutput',
329 Mask => 0x70,
330 ValueConv => '2 ** (-($val>>4)-2)',
331 ValueConvInv => '$val > 0 ? int(-log($val)/log(2)-2+0.5)<<4 : 0',
332 PrintConv => 'Image::ExifTool::Exif::PrintExposureTime($val)',
333 PrintConvInv => 'Image::ExifTool::Exif::ConvertFraction($val)',
334 },
335 9.2 => { # CS22-c
336 Name => 'RepeatingFlashCount',
337 Mask => 0x0f,
338 ValueConv => '$val < 10 ? $val + 1 : 5 * ($val - 7)',
339 ValueConvInv => '$val <= 10 ? $val - 1 : $val / 5 + 7',
340 },
341 10.1 => { # CS22-d
342 Name => 'RepeatingFlashRate',
343 Mask => 0xf0,
344 ValueConv => 'my $v=($val>>4); $v < 10 ? $v + 1 : 10 * ($v - 8)',
345 ValueConvInv => 'int(($val <= 10 ? $val - 1 : $val / 10 + 8) + 0.5) << 4',
346 PrintConv => '"$val Hz"',
347 PrintConvInv => '$val=~/(\d+)/; $1 || 0',
348 },
349 10.2 => { # CS22-n
350 Name => 'CommanderChannel',
351 Mask => 0x03,
352 ValueConv => '$val + 1',
353 ValueConvInv => '$val - 1',
354 },
355 11.1 => { # CS22-e
356 Name => 'CommanderInternalFlash',
357 Mask => 0xc0,
358 PrintConv => {
359 0x00 => 'TTL',
360 0x40 => 'Manual',
361 0x80 => 'Off',
362 },
363 },
364 11.2 => { # CS22-h
365 Name => 'CommanderGroupAMode',
366 Mask => 0x30,
367 PrintConv => {
368 0x00 => 'TTL',
369 0x10 => 'Auto Aperture',
370 0x20 => 'Manual',
371 0x30 => 'Off',
372 },
373 },
374 11.3 => { # CS22-k
375 Name => 'CommanderGroupBMode',
376 Mask => 0x0c,
377 PrintConv => {
378 0x00 => 'TTL',
379 0x04 => 'Auto Aperture',
380 0x08 => 'Manual',
381 0x0c => 'Off',
382 },
383 },
384 12.1 => { # CS22-f
385 Name => 'CommanderInternalTTLComp',
386 Mask => 0x1f,
387 ValueConv => '($val - 9) / 3',
388 ValueConvInv => '$val * 3 + 9',
389 PrintConv => '$val ? sprintf("%+.1f",$val) : 0',
390 PrintConvInv => '$val',
391 },
392 12.2 => { # CS22-g
393 Name => 'CommanderInternalManualOutput',
394 Mask => 0xe0,
395 ValueConv => '2 ** (-($val>>5))',
396 ValueConvInv => '$val > 0 ? int(-log($val)/log(2)+0.5) << 5 : 0',
397 PrintConv => q{
398 return 'Full' if $val > 0.99;
399 Image::ExifTool::Exif::PrintExposureTime($val);
400 },
401 PrintConvInv => '$val=~/F/i ? 1 : Image::ExifTool::Exif::ConvertFraction($val)',
402 },
403 13.1 => { # CS22-i
404 Name => 'CommanderGroupA_TTL-AAComp',
405 Mask => 0x1f,
406 ValueConv => '($val - 9) / 3',
407 ValueConvInv => '$val * 3 + 9',
408 PrintConv => '$val ? sprintf("%+.1f",$val) : 0',
409 PrintConvInv => '$val',
410 },
411 13.2 => { # CS22-j
412 Name => 'CommanderGroupAManualOutput',
413 Mask => 0xe0,
414 ValueConv => '2 ** (-($val>>5))',
415 ValueConvInv => '$val > 0 ? int(-log($val)/log(2)+0.5) << 5 : 0',
416 PrintConv => q{
417 return 'Full' if $val > 0.99;
418 Image::ExifTool::Exif::PrintExposureTime($val);
419 },
420 PrintConvInv => '$val=~/F/i ? 1 : Image::ExifTool::Exif::ConvertFraction($val)',
421 },
422 14.1 => { # CS22-l
423 Name => 'CommanderGroupB_TTL-AAComp',
424 Mask => 0x1f,
425 ValueConv => '($val - 9) / 3',
426 ValueConvInv => '$val * 3 + 9',
427 PrintConv => '$val ? sprintf("%+.1f",$val) : 0',
428 PrintConvInv => '$val',
429 },
430 14.2 => { # CS22-m
431 Name => 'CommanderGroupBManualOutput',
432 Mask => 0xe0,
433 ValueConv => '2 ** (-($val>>5))',
434 ValueConvInv => '$val > 0 ? int(-log($val)/log(2)+0.5) << 5 : 0',
435 PrintConv => q{
436 return 'Full' if $val > 0.99;
437 Image::ExifTool::Exif::PrintExposureTime($val);
438 },
439 PrintConvInv => '$val=~/F/i ? 1 : Image::ExifTool::Exif::ConvertFraction($val)',
440 },
441 15.1 => { # CS3
442 Name => 'CenterAFArea',
443 Mask => 0x80,
444 PrintConv => {
445 0x00 => 'Normal Zone',
446 0x80 => 'Wide Zone',
447 },
448 },
449 15.2 => { # CS20
450 Name => 'FocusAreaSelection',
451 Mask => 0x04,
452 PrintConv => {
453 0x00 => 'No Wrap',
454 0x04 => 'Wrap',
455 },
456 },
457 15.3 => { # CS21
458 Name => 'AFAreaIllumination',
459 Mask => 0x03,
460 PrintConv => {
461 0x00 => 'Auto',
462 0x01 => 'Off',
463 0x02 => 'On',
464 },
465 },
466 16.1 => { # CS2
467 Name => 'AFAreaModeSetting',
468 Mask => 0xc0,
469 PrintConv => {
470 0x00 => 'Single Area',
471 0x40 => 'Dynamic Area',
472 0x80 => 'Auto-area',
473 },
474 },
475);
476
477# custom settings for the D40 (encrypted) - ref JD
478%Image::ExifTool::NikonCustom::SettingsD40 = (
479 PROCESS_PROC => \&Image::ExifTool::ProcessBinaryData,
480 WRITE_PROC => \&Image::ExifTool::WriteBinaryData,
481 CHECK_PROC => \&Image::ExifTool::CheckBinaryData,
482 WRITABLE => 1,
483 FIRST_ENTRY => 0,
484 GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
485 NOTES => 'Custom settings for the Nikon D40.',
486 0.1 => { # CS1
487 Name => 'Beep',
488 Mask => 0x80,
489 PrintConv => {
490 0x00 => 'On',
491 0x80 => 'Off',
492 },
493 },
494 0.2 => { # CS9
495 Name => 'AFAssist',
496 Mask => 0x40,
497 PrintConv => {
498 0x00 => 'On',
499 0x40 => 'Off',
500 },
501 },
502 0.3 => { # CS6
503 Name => 'NoMemoryCard',
504 Mask => 0x20,
505 PrintConv => {
506 0x00 => 'Release Locked',
507 0x20 => 'Enable Release',
508 },
509 },
510 0.4 => { # CS7
511 Name => 'ImageReview',
512 Mask => 0x10,
513 PrintConv => {
514 0x00 => 'On',
515 0x10 => 'Off',
516 },
517 },
518 1.1 => { # CS10-a
519 Name => 'AutoISO',
520 Mask => 0x80,
521 PrintConv => {
522 0x00 => 'Off',
523 0x80 => 'On',
524 },
525 },
526 1.2 => { # CS10-b
527 Name => 'AutoISOMax',
528 Mask => 0x30,
529 PrintConv => {
530 0x10 => 400,
531 0x20 => 800,
532 0x30 => 1600,
533 },
534 },
535 1.3 => { # CS10-c
536 Name => 'AutoISOMinShutterSpeed',
537 Mask => 0x07,
538 PrintConvColumns => 2,
539 PrintConv => {
540 0x00 => '1/125 s',
541 0x01 => '1/60 s',
542 0x02 => '1/30 s',
543 0x03 => '1/15 s',
544 0x04 => '1/8 s',
545 0x05 => '1/4 s',
546 0x06 => '1/2 s',
547 0x07 => '1 s',
548 },
549 },
550 2.1 => { # CS15-b
551 Name => 'ImageReviewTime',
552 Mask => 0x07,
553 PrintConv => {
554 0x00 => '4 s',
555 0x01 => '8 s',
556 0x02 => '20 s',
557 0x03 => '1 min',
558 0x04 => '10 min',
559 },
560 },
561 3.1 => { # CS15-a
562 Name => 'MonitorOffTime',
563 Mask => 0xe0,
564 PrintConv => {
565 0x00 => '4 s',
566 0x20 => '8 s',
567 0x40 => '20 s',
568 0x60 => '1 min',
569 0x80 => '10 min',
570 },
571 },
572 3.2 => { # CS15-c
573 Name => 'MeteringTime',
574 Mask => 0x1c,
575 PrintConv => {
576 0x00 => '4 s',
577 0x04 => '8 s',
578 0x08 => '20 s',
579 0x0c => '1 min',
580 0x10 => '30 min',
581 },
582 },
583 3.3 => { # CS16
584 Name => 'SelfTimerTime',
585 Mask => 0x03,
586 PrintConv => {
587 0x00 => '2 s',
588 0x01 => '5 s',
589 0x02 => '10 s',
590 0x03 => '20 s',
591 },
592 },
593 3.4 => { # CS17
594 Name => 'RemoteOnDuration',
595 Mask => 0xc0,
596 PrintConv => {
597 0x00 => '1 min',
598 0x40 => '5 min',
599 0x80 => '10 min',
600 0xc0 => '15 min',
601 },
602 },
603 4.1 => { # CS12
604 Name => 'AELockButton',
605 Mask => 0x0e,
606 PrintConv => {
607 0x00 => 'AE/AF Lock',
608 0x02 => 'AE Lock Only',
609 0x04 => 'AF Lock Only',
610 0x06 => 'AE Lock (hold)',
611 0x08 => 'AF-ON',
612 },
613 },
614 4.2 => { # CS13
615 Name => 'AELock',
616 Mask => 0x01,
617 PrintConv => {
618 0x00 => 'Off',
619 0x01 => 'On',
620 },
621 },
622 5.1 => { # CS4
623 Name => 'ShootingModeSetting',
624 Mask => 0x70,
625 PrintConv => {
626 0x00 => 'Single Frame',
627 0x10 => 'Continuous',
628 0x20 => 'Self-timer',
629 0x30 => 'Delayed Remote',
630 0x40 => 'Quick-response Remote',
631 },
632 },
633 5.2 => { # CS11
634 Name => 'TimerFunctionButton',
635 Mask => 0x07,
636 PrintConv => {
637 0x00 => 'Shooting Mode',
638 0x01 => 'Image Quality/Size',
639 0x02 => 'ISO',
640 0x03 => 'White Balance',
641 0x04 => 'Self-timer',
642 },
643 },
644 6.1 => { # CS5
645 Name => 'Metering',
646 Mask => 0x03,
647 PrintConv => {
648 0x00 => 'Matrix',
649 0x01 => 'Center-weighted',
650 0x02 => 'Spot',
651 },
652 },
653 8.1 => { # CS14-a
654 Name => 'InternalFlash',
655 Mask => 0x10,
656 PrintConv => {
657 0x00 => 'TTL',
658 0x10 => 'Manual',
659 },
660 },
661 8.2 => { # CS14-b
662 Name => 'ManualFlashOutput',
663 Mask => 0x07,
664 ValueConv => '2 ** (-$val)',
665 ValueConvInv => '$val > 0 ? -log($val)/log(2) : 0',
666 PrintConv => q{
667 return 'Full' if $val > 0.99;
668 Image::ExifTool::Exif::PrintExposureTime($val);
669 },
670 PrintConvInv => '$val=~/F/i ? 1 : Image::ExifTool::Exif::ConvertFraction($val)',
671 },
672 9 => { # CS8
673 Name => 'FlashLevel',
674 Format => 'int8s',
675 ValueConv => '$val / 6',
676 ValueConvInv => '$val * 6',
677 PrintConv => 'sprintf("%+.1f",$val)',
678 PrintConvInv => '$val',
679 },
680 10.1 => { # CS2
681 Name => 'FocusModeSetting',
682 # (may differ from FocusMode if lens switch is set to Manual)
683 Mask => 0xc0,
684 PrintConv => {
685 0x00 => 'Manual',
686 0x40 => 'AF-S',
687 0x80 => 'AF-C',
688 0xc0 => 'AF-A',
689 },
690 },
691 11.1 => { # CS3
692 Name => 'AFAreaModeSetting',
693 # (may differ from AFAreaMode for Manual focus)
694 Mask => 0x30,
695 PrintConv => {
696 0x00 => 'Single Area',
697 0x10 => 'Dynamic Area',
698 0x20 => 'Closest Subject',
699 },
700 }
701);
702
703# D90 custom settings (ref PH)
704%Image::ExifTool::NikonCustom::SettingsD90 = (
705 PROCESS_PROC => \&Image::ExifTool::ProcessBinaryData,
706 WRITE_PROC => \&Image::ExifTool::WriteBinaryData,
707 CHECK_PROC => \&Image::ExifTool::CheckBinaryData,
708 WRITABLE => 1,
709 FIRST_ENTRY => 0,
710 GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
711 NOTES => 'Custom settings for the D90.',
712 # Missing:
713 # CSe2 RepeatingFlashRate (needs verification)
714 # CommanderInternalFlash, CommanderGroupAMode, CommanderGroupBMode,
715 # CommanderChannel, CommanderInternalManualOutput,
716 # CommanderGroupAManualOutput, CommanderGroupBManualOutput
717 # CommanderGroupA_TTL-AAComp, CommanderGroupB_TTL-AAComp,
718 # CSe4 AutoBracketSet (some values need verification)
719 # CSf2 OKButton ("Not Used" value needs verification)
720 # CSf5-b CommandDialsChangeMainSub
721 # CSf5-c CommandDialsMenuAndPlayback
722 0.1 => { # CSf1
723 Name => 'LightSwitch',
724 Mask => 0x08,
725 PrintConv => {
726 0x00 => 'LCD Backlight',
727 0x08 => 'LCD Backlight and Shooting Information',
728 },
729 },
730 2.1 => { # CSa1
731 Name => 'AFAreaModeSetting',
732 Mask => 0x60,
733 PrintConv => {
734 0x00 => 'Single Area',
735 0x20 => 'Dynamic Area',
736 0x40 => 'Auto-area',
737 0x60 => '3D-tracking (11 points)',
738 },
739 },
740 2.2 => { # CSa2
741 Name => 'CenterFocusPoint',
742 Mask => 0x10,
743 PrintConv => {
744 0x00 => 'Normal Zone',
745 0x10 => 'Wide Zone',
746 },
747 },
748 2.3 => { # CSa3
749 Name => 'AFAssist',
750 Mask => 0x01,
751 PrintConv => { 0x00 => 'On', 0x01 => 'Off' },
752 },
753 2.4 => { # CSa4
754 Name => 'AFPointIllumination',
755 Mask => 0x06,
756 PrintConv => {
757 0x00 => 'Auto',
758 0x02 => 'On',
759 0x04 => 'Off',
760 },
761 },
762 2.5 => { # CSa5
763 Name => 'FocusPointWrap',
764 Mask => 0x08,
765 PrintConv => {
766 0x00 => 'No Wrap',
767 0x08 => 'Wrap',
768 },
769 },
770 3.1 => { # CSa6
771 Name => 'AELockForMB-D80',
772 Mask => 0x1c,
773 PrintConv => {
774 0x00 => 'AE Lock Only',
775 0x04 => 'AF Lock Only',
776 0x08 => 'AE Lock (hold)',
777 0x0c => 'AF-On',
778 0x10 => 'FV Lock',
779 0x14 => 'Focus Point Selection',
780 0x1c => 'AE/AF Lock',
781 },
782 },
783 3.2 => { # CSd12
784 Name => 'MB-D80BatteryType',
785 Mask => 0x03,
786 PrintConv => {
787 0x00 => 'LR6 (AA alkaline)',
788 0x01 => 'HR6 (AA Ni-MH)',
789 0x02 => 'FR6 (AA lithium)',
790 0x03 => 'ZR6 (AA Ni-Mn)',
791 },
792 },
793 4.1 => { # CSd1
794 Name => 'Beep',
795 Mask => 0x40,
796 PrintConv => {
797 0x40 => 'On',
798 0x00 => 'Off',
799 },
800 },
801 4.2 => { # CSd2
802 Name => 'GridDisplay',
803 Mask => 0x02,
804 PrintConv => { 0x00 => 'Off', 0x02 => 'On' },
805 },
806 4.3 => { # CSd3
807 Name => 'ISODisplay',
808 Mask => 0x0c,
809 PrintConv => {
810 0x00 => 'Show ISO/Easy ISO',
811 0x04 => 'Show ISO Sensitivity',
812 0x0c => 'Show Frame Count',
813 },
814 },
815 4.4 => { # CSd4
816 Name => 'ViewfinderWarning',
817 Mask => 0x01,
818 PrintConv => { 0x00 => 'On', 0x01 => 'Off' },
819 },
820 4.5 => { # CSf6
821 Name => 'NoMemoryCard',
822 Mask => 0x20,
823 PrintConv => {
824 0x00 => 'Release Locked',
825 0x20 => 'Enable Release',
826 },
827 },
828 5.1 => { # CSd5
829 Name => 'ScreenTips',
830 Mask => 0x04,
831 PrintConv => { 0x00 => 'Off', 0x04 => 'On' },
832 },
833 5.2 => { # CSd7
834 Name => 'FileNumberSequence',
835 Mask => 0x08,
836 PrintConv => { 0x00 => 'On', 0x08 => 'Off' },
837 },
838 5.3 => { # CSd8
839 Name => 'ShootingInfoDisplay',
840 Mask => 0xc0,
841 PrintConv => {
842 0x00 => 'Auto',
843 0x80 => 'Manual (dark on light)',
844 0xc0 => 'Manual (light on dark)',
845 },
846 },
847 5.4 => { # CSd9
848 Name => 'LCDIllumination',
849 Mask => 0x20,
850 PrintConv => { 0x00 => 'Off', 0x20 => 'On' },
851 },
852 6.1 => { # CSb2
853 Name => 'EasyExposureComp',
854 Mask => 0x01,
855 PrintConv => { 0x00 => 'Off', 0x01 => 'On' },
856 },
857 6.2 => { # CSf7
858 Name => 'ReverseIndicators',
859 Mask => 0x80,
860 PrintConv => {
861 0x00 => '+ 0 -',
862 0x80 => '- 0 +',
863 },
864 },
865 7.1 => { # CSb1
866 Name => 'ExposureControlStepSize',
867 Mask => 0x40,
868 PrintConv => {
869 0x00 => '1/3 EV',
870 0x40 => '1/2 EV',
871 },
872 },
873 8.1 => { # CSb3
874 Name => 'CenterWeightedAreaSize',
875 Mask => 0x60,
876 PrintConv => {
877 0x00 => '6 mm',
878 0x20 => '8 mm',
879 0x40 => '10 mm',
880 },
881 },
882 8.2 => { # CSb4-a
883 Name => 'FineTuneOptMatrixMetering',
884 Mask => 0x0f,
885 ValueConv => '($val > 0x7 ? $val - 0x10 : $val) / 6',
886 ValueConvInv => 'int($val*6+($val>0?0.5:-0.5)) & 0x0f',
887 PrintConv => '$val ? sprintf("%+.2f", $val) : 0',
888 PrintConvInv => 'Image::ExifTool::Exif::ConvertFraction($val)',
889 },
890 9.1 => { # CSb4-b
891 Name => 'FineTuneOptCenterWeighted',
892 Mask => 0xf0,
893 ValueConv => '($val > 0x70 ? $val - 0x100 : $val) / 0x60',
894 ValueConvInv => '(int($val*6+($val>0?0.5:-0.5))<<4) & 0xf0',
895 PrintConv => '$val ? sprintf("%+.2f", $val) : 0',
896 PrintConvInv => 'Image::ExifTool::Exif::ConvertFraction($val)',
897 },
898 9.2 => { # CSb4-c
899 Name => 'FineTuneOptSpotMetering',
900 Mask => 0x0f,
901 ValueConv => '($val > 0x7 ? $val - 0x10 : $val) / 6',
902 ValueConvInv => 'int($val*6+($val>0?0.5:-0.5)) & 0x0f',
903 PrintConv => '$val ? sprintf("%+.2f", $val) : 0',
904 PrintConvInv => 'Image::ExifTool::Exif::ConvertFraction($val)',
905 },
906 11.1 => { # CSd6
907 Name => 'CLModeShootingSpeed',
908 Mask => 0x07,
909 PrintConv => '"$val fps"',
910 PrintConvInv => '$val=~s/\s*fps//i; $val',
911 },
912 11.2 => { # CSd10
913 Name => 'ExposureDelayMode',
914 Mask => 0x40,
915 PrintConv => {
916 0x00 => 'Off',
917 0x40 => 'On',
918 },
919 },
920 13.1 => { # CSe4
921 Name => 'AutoBracketSet',
922 Mask => 0xe0, #(NC)
923 PrintConv => {
924 0x00 => 'AE & Flash', # default
925 0x20 => 'AE Only',
926 0x40 => 'Flash Only', #(NC)
927 0x60 => 'WB Bracketing', #(NC)
928 0x80 => 'Active D-Lighting', #(NC)
929 },
930 },
931 13.2 => { # CSe6
932 Name => 'AutoBracketOrder',
933 Mask => 0x10,
934 PrintConv => {
935 0x00 => '0,-,+',
936 0x10 => '-,0,+',
937 },
938 },
939 14.1 => { # CSf3
940 Name => 'FuncButton',
941 Mask => 0x78,
942 PrintConv => {
943 0x08 => 'Framing Grid',
944 0x10 => 'AF-area Mode',
945 0x18 => 'Center Focus Point',
946 0x20 => 'FV Lock', # default
947 0x28 => 'Flash Off',
948 0x30 => 'Matrix Metering',
949 0x38 => 'Center-weighted Metering',
950 0x40 => 'Spot Metering',
951 0x48 => 'My Menu Top',
952 0x50 => '+ NEF (RAW)',
953 },
954 },
955 16.1 => { # CSf2
956 Name => 'OKButton',
957 Mask => 0x18,
958 PrintConv => {
959 0x08 => 'Select Center Focus Point',
960 0x10 => 'Highlight Active Focus Point',
961 0x18 => 'Not Used', #(NC)
962 0x00 => 'Not Used', #(NC)
963 },
964 },
965 17.1 => { # CSf4
966 Name => 'AELockButton',
967 Mask => 0x38,
968 PrintConv => {
969 0x00 => 'AE/AF Lock',
970 0x08 => 'AE Lock Only',
971 0x10 => 'AF Lock Only', #(NC)
972 0x18 => 'AE Lock (hold)', #(NC)
973 0x20 => 'AF-ON', #(NC)
974 0x28 => 'FV Lock', #(NC)
975 },
976 },
977 18.1 => { # CSf5-a
978 Name => 'CommandDialsReverseRotation',
979 Mask => 0x80,
980 PrintConv => { 0x00 => 'No', 0x80 => 'Yes' },
981 },
982 18.2 => { # CSc1
983 Name => 'ShutterReleaseButtonAE-L',
984 Mask => 0x02,
985 PrintConv => { 0x00 => 'Off', 0x02 => 'On' },
986 },
987 19.1 => { # CSc2
988 Name => 'MeteringTime',
989 Mask => 0xf0,
990 PrintConvColumns => 2,
991 PrintConv => {
992 0x00 => '4 s',
993 0x10 => '6 s', # default
994 0x20 => '8 s',
995 0x30 => '16 s',
996 0x40 => '30 s',
997 0x50 => '1 min',
998 0x60 => '5 min',
999 0x70 => '10 min',
1000 0x80 => '30 min',
1001 },
1002 },
1003 19.2 => { # CSc5
1004 Name => 'RemoteOnDuration',
1005 Mask => 0x03,
1006 PrintConv => {
1007 0x00 => '1 min',
1008 0x01 => '5 min',
1009 0x02 => '10 min',
1010 0x03 => '15 min',
1011 },
1012 },
1013 20.1 => { # CSc3-a
1014 Name => 'SelfTimerTime',
1015 Mask => 0xc0,
1016 PrintConv => {
1017 0x00 => '2 s',
1018 0x40 => '5 s',
1019 0x80 => '10 s', # default
1020 0xc0 => '20 s',
1021 },
1022 },
1023 20.2 => { # CSc3-b
1024 Name => 'SelfTimerShotCount',
1025 Mask => 0x1e,
1026 ValueConv => '$val >> 1',
1027 ValueConvInv => '$val << 1',
1028 },
1029 21.1 => { # CSc4-a
1030 Name => 'PlaybackMonitorOffTime',
1031 Mask => 0x1c,
1032 PrintConv => {
1033 0x00 => '4 s',
1034 0x04 => '10 s', # default
1035 0x08 => '20 s',
1036 0x0c => '1 min',
1037 0x10 => '5 min',
1038 0x14 => '10 min',
1039 },
1040 },
1041 21.2 => { # CSc4-d
1042 Name => 'ImageReviewTime',
1043 Mask => 0xe0,
1044 PrintConv => {
1045 0x00 => '4 s', # default
1046 0x20 => '10 s',
1047 0x40 => '20 s',
1048 0x60 => '1 min',
1049 0x80 => '5 min',
1050 0xa0 => '10 min',
1051 },
1052 },
1053 22.1 => { # CSc4-b
1054 Name => 'MenuMonitorOffTime',
1055 Mask => 0xe0,
1056 PrintConv => {
1057 0x00 => '4 s',
1058 0x20 => '10 s',
1059 0x40 => '20 s', # default
1060 0x60 => '1 min',
1061 0x80 => '5 min',
1062 0xa0 => '10 min',
1063 },
1064 },
1065 22.2 => { # CSc4-c
1066 Name => 'ShootingInfoMonitorOffTime',
1067 Mask => 0x1c,
1068 PrintConv => {
1069 0x00 => '4 s',
1070 0x04 => '10 s', # default
1071 0x08 => '20 s',
1072 0x0c => '1 min',
1073 0x10 => '5 min',
1074 0x14 => '10 min',
1075 },
1076 },
1077 23.1 => { # CSe1
1078 Name => 'FlashShutterSpeed',
1079 Mask => 0x0f,
1080 PrintConvColumns => 2,
1081 PrintConv => {
1082 0x00 => '1/60 s', # default
1083 0x01 => '1/30 s',
1084 0x02 => '1/15 s',
1085 0x03 => '1/8 s',
1086 0x04 => '1/4 s',
1087 0x05 => '1/2 s',
1088 0x06 => '1 s',
1089 0x07 => '2 s',
1090 0x08 => '4 s',
1091 0x09 => '8 s',
1092 0x0a => '15 s',
1093 0x0b => '30 s',
1094 },
1095 },
1096 24.1 => { # CSe2-a
1097 Name => 'InternalFlash',
1098 Mask => 0xc0,
1099 PrintConv => {
1100 0x00 => 'TTL',
1101 0x40 => 'Manual',
1102 0x80 => 'Repeating Flash',
1103 0xc0 => 'Commander Mode',
1104 },
1105 },
1106 24.2 => { # CSe2-b
1107 Name => 'ManualFlashOutput',
1108 Mask => 0x1f,
1109 ValueConv => '2 ** (-$val/3)',
1110 ValueConvInv => '$val > 0 ? -3*log($val)/log(2) : 0',
1111 PrintConv => q{
1112 return 'Full' if $val > 0.99;
1113 Image::ExifTool::Exif::PrintExposureTime($val);
1114 },
1115 PrintConvInv => '$val=~/F/i ? 1 : Image::ExifTool::Exif::ConvertFraction($val)',
1116 },
1117 25.1 => { # CSe2-ca
1118 Name => 'RepeatingFlashOutput',
1119 Mask => 0x70,
1120 ValueConv => '2 ** (-($val>>4)-2)',
1121 ValueConvInv => '$val > 0 ? int(-log($val)/log(2)-2+0.5)<<4 : 0',
1122 PrintConv => 'Image::ExifTool::Exif::PrintExposureTime($val)',
1123 PrintConvInv => 'Image::ExifTool::Exif::ConvertFraction($val)',
1124 },
1125 25.2 => { # CSe2-cb
1126 Name => 'RepeatingFlashCount',
1127 Mask => 0x0f,
1128 ValueConv => '$val < 10 ? $val + 1 : 5 * ($val - 7)',
1129 ValueConvInv => '$val <= 10 ? $val - 1 : $val / 5 + 7',
1130 },
1131 26.1 => { # CSe2-cc (NC)
1132 Name => 'RepeatingFlashRate',
1133 Mask => 0xf0,
1134 ValueConv => 'my $v=($val>>4); $v < 10 ? $v + 1 : 10 * ($v - 8)',
1135 ValueConvInv => 'int(($val <= 10 ? $val - 1 : $val / 10 + 8) + 0.5) << 4',
1136 PrintConv => '"$val Hz"',
1137 PrintConvInv => '$val=~/(\d+)/; $1 || 0',
1138 },
1139 31.1 => { # CSd11
1140 Name => 'FlashWarning',
1141 Mask => 0x80,
1142 PrintConv => {
1143 0x00 => 'On',
1144 0x80 => 'Off',
1145 },
1146 },
1147 31.2 => { # CSe2-ea
1148 Name => 'CommanderInternalTTLComp',
1149 Mask => 0x1f,
1150 ValueConv => '($val - 9) / 3',
1151 ValueConvInv => '$val * 3 + 9',
1152 PrintConv => '$val ? sprintf("%+.1f",$val) : 0',
1153 PrintConvInv => '$val',
1154 },
1155 31.3 => { # CSe3
1156 Name => 'ModelingFlash',
1157 Mask => 0x20,
1158 PrintConv => { 0x00 => 'On', 0x20 => 'Off' },
1159 },
1160 31.4 => { # CSe5
1161 Name => 'AutoFP',
1162 Mask => 0x40,
1163 PrintConv => {
1164 0x00 => 'Off',
1165 0x40 => 'On',
1166 },
1167 },
1168 32.1 => { # CSe2-eb
1169 Name => 'CommanderGroupA_TTLComp',
1170 Mask => 0x1f,
1171 ValueConv => '($val - 9) / 3',
1172 ValueConvInv => '$val * 3 + 9',
1173 PrintConv => '$val ? sprintf("%+.1f",$val) : 0',
1174 PrintConvInv => '$val',
1175 },
1176 33.1 => { # CSe2-ec
1177 Name => 'CommanderGroupB_TTLComp',
1178 Mask => 0x1f,
1179 ValueConv => '($val - 9) / 3',
1180 ValueConvInv => '$val * 3 + 9',
1181 PrintConv => '$val ? sprintf("%+.1f",$val) : 0',
1182 PrintConvInv => '$val',
1183 },
1184 34.1 => { # CSa7
1185 Name => 'LiveViewAF',
1186 Mask => 0xc0,
1187 PrintConv => {
1188 0x00 => 'Face Priority', #(NC)
1189 0x40 => 'Wide Area',
1190 0x80 => 'Normal Area',
1191 },
1192 },
1193);
1194
1195# D300 (ref JD) and D3 (ref 1/PH) custom settings
1196%Image::ExifTool::NikonCustom::SettingsD3 = (
1197 PROCESS_PROC => \&Image::ExifTool::ProcessBinaryData,
1198 WRITE_PROC => \&Image::ExifTool::WriteBinaryData,
1199 CHECK_PROC => \&Image::ExifTool::CheckBinaryData,
1200 WRITABLE => 1,
1201 FIRST_ENTRY => 0,
1202 GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
1203 NOTES => 'Custom settings for the D3, D3S, D3X, D300 and D300S.',
1204 # these settings have been decoded using the D3 and D300, and
1205 # extrapolated to the other models, but these haven't yet been
1206 # verified, and the following custom settings are missing:
1207 # CSf1-d (D3X,D3S) MultiSelectorLiveView
1208 # CSf1 (D300S) LightSwitch
1209 0.1 => { #1
1210 Name => 'CustomSettingsBank',
1211 Mask => 0x03,
1212 PrintConv => {
1213 0 => 'A',
1214 1 => 'B',
1215 2 => 'C',
1216 3 => 'D',
1217 },
1218 },
1219 0.2 => { #1
1220 Name => 'CustomSettingsAllDefault',
1221 Notes => '"No" if any custom setting for this bank was changed from the default',
1222 Mask => 0x80,
1223 PrintConv => { 0x00 => 'Yes', 0x80 => 'No' },
1224 },
1225 1.1 => { # CSa1
1226 Name => 'AF-CPrioritySelection',
1227 Mask => 0xc0,
1228 PrintConv => {
1229 0x00 => 'Release',
1230 0x40 => 'Release + Focus',
1231 0x80 => 'Focus',
1232 },
1233 },
1234 1.2 => { # CSa2
1235 Name => 'AF-SPrioritySelection',
1236 Mask => 0x20,
1237 PrintConv => {
1238 0x00 => 'Focus',
1239 0x20 => 'Release',
1240 },
1241 },
1242 1.3 => { # CSa8
1243 Name => 'AFPointSelection',
1244 Mask => 0x10,
1245 PrintConv => {
1246 0x00 => '51 Points',
1247 0x10 => '11 Points',
1248 },
1249 },
1250 1.4 => { # CSa3
1251 Name => 'DynamicAFArea',
1252 Mask => 0x0c,
1253 PrintConv => {
1254 0x00 => '9 Points',
1255 0x04 => '21 Points',
1256 0x08 => '51 Points',
1257 0x0c => '51 Points (3D-tracking)',
1258 },
1259 },
1260 1.5 => { # CSa4
1261 Name => 'FocusTrackingLockOn',
1262 Condition => '$$self{Model} !~ /D3S\b/',
1263 Notes => 'not D3S',
1264 Mask => 0x03,
1265 PrintConv => {
1266 0x00 => 'Long',
1267 0x01 => 'Normal',
1268 0x02 => 'Short',
1269 0x03 => 'Off',
1270 },
1271 },
1272 2.1 => { # CSa5
1273 Name => 'AFActivation',
1274 Mask => 0x80,
1275 PrintConv => {
1276 0x00 => 'Shutter/AF-On',
1277 0x80 => 'AF-On Only',
1278 },
1279 },
1280 2.2 => { # CSa7
1281 Name => 'FocusPointWrap',
1282 Mask => 0x08,
1283 PrintConv => {
1284 0x00 => 'No Wrap',
1285 0x08 => 'Wrap',
1286 },
1287 },
1288 2.3 => [ # CSa6
1289 {
1290 Name => 'AFPointIllumination',
1291 Condition => '$$self{Model} =~ /D3[SX]?\b/',
1292 Notes => 'D3',
1293 Mask => 0x60,
1294 PrintConv => {
1295 0x00 => 'On in Continuous Shooting and Manual Focusing',
1296 0x20 => 'On During Manual Focusing',
1297 0x40 => 'On in Continuous Shooting Modes',
1298 0x60 => 'Off',
1299 },
1300 },
1301 {
1302 Name => 'AFPointIllumination',
1303 Notes => 'D300',
1304 Mask => 0x06,
1305 PrintConv => {
1306 0x00 => 'Auto',
1307 0x02 => 'Off',
1308 0x04 => 'On',
1309 },
1310 },
1311 ],
1312 2.4 => { # CSa6-b (D3, added by firmware update)
1313 Name => 'AFPointBrightness',
1314 Condition => '$$self{Model} =~ /D3[SX]?\b/',
1315 Notes => 'D3 only',
1316 Mask => 0x06,
1317 PrintConv => {
1318 0x00 => 'Low',
1319 0x02 => 'Normal',
1320 0x04 => 'High',
1321 0x06 => 'Extra High',
1322 },
1323 },
1324 2.5 => { # CSa9 (D300)
1325 Name => 'AFAssist',
1326 Condition => '$$self{Model} =~ /D300S?\b/',
1327 Notes => 'D300 only',
1328 Mask => 0x01,
1329 PrintConv => { 0x00 => 'On', 0x01 => 'Off' },
1330 },
1331 3.1 => { # CSa9 (D3)
1332 Name => 'AFOnButton',
1333 Condition => '$$self{Model} =~ /D3[SX]?\b/',
1334 Notes => 'D3 only',
1335 Mask => 0x07,
1336 PrintConv => {
1337 0 => 'AF On',
1338 1 => 'AE/AF Lock',
1339 2 => 'AE Lock Only',
1340 3 => 'AE Lock (reset on release)',
1341 4 => 'AE Lock (hold)',
1342 5 => 'AF Lock Only',
1343 },
1344 },
1345 3.2 => { # CSa10 (D3)
1346 Name => 'VerticalAFOnButton',
1347 Condition => '$$self{Model} =~ /D3[SX]?\b/',
1348 Notes => 'D3 only',
1349 Mask => 0x70,
1350 PrintConv => {
1351 0x00 => 'AF On',
1352 0x10 => 'AE/AF Lock',
1353 0x20 => 'AE Lock Only',
1354 0x30 => 'AE Lock (reset on release)',
1355 0x40 => 'AE Lock (hold)',
1356 0x50 => 'AF Lock Only',
1357 0x70 => 'Same as AF On',
1358 },
1359 },
1360 3.3 => { # CSa10 (D300)
1361 Name => 'AF-OnForMB-D10',
1362 Condition => '$$self{Model} =~ /D300S?\b/',
1363 Notes => 'D300 only',
1364 Mask => 0x70,
1365 PrintConv => {
1366 0x00 => 'AF-On',
1367 0x10 => 'AE/AF Lock',
1368 0x20 => 'AE Lock Only',
1369 0x30 => 'AE Lock (reset on release)',
1370 0x40 => 'AE Lock (hold)',
1371 0x50 => 'AF Lock Only',
1372 0x60 => 'Same as FUNC Button',
1373 },
1374 },
1375 4.1 => { # CSa4 (D3S)
1376 Name => 'FocusTrackingLockOn',
1377 Condition => '$$self{Model} =~ /D3S\b/',
1378 Notes => 'D3S only',
1379 Mask => 0x07,
1380 PrintConv => {
1381 0x00 => '5 (Long)',
1382 0x01 => '4',
1383 0x02 => '3 (Normal)',
1384 0x03 => '2',
1385 0x04 => '1 (Short)',
1386 0x05 => 'Off',
1387 },
1388 },
1389 4.2 => { # CSf7 (D3S)
1390 Name => 'AssignBktButton',
1391 Condition => '$$self{Model} =~ /D3S\b/',
1392 Notes => 'D3S only',
1393 Mask => 0x08,
1394 PrintConv => {
1395 0x00 => 'Auto Bracketing',
1396 0x08 => 'Multiple Exposure',
1397 },
1398 },
1399 4.3 => { # CSf1-c (D3S) (ref 1)
1400 Name => 'MultiSelectorLiveView',
1401 Condition => '$$self{Model} =~ /D3S\b/',
1402 Notes => 'D3S only',
1403 Mask => 0xc0,
1404 PrintConv => {
1405 0x00 => 'Reset',
1406 0x40 => 'Zoom On/Off',
1407 0x80 => 'Start Movie Recording',
1408 0xc0 => 'Not Used',
1409 },
1410 },
1411 4.4 => { # CSf1-c2 (D3S) (ref 1)
1412 Name => 'InitialZoomLiveView',
1413 Condition => '$$self{Model} =~ /D3S\b/',
1414 Notes => 'D3S only',
1415 Mask => 0x30,
1416 PrintConv => {
1417 0x00 => 'Low Magnification',
1418 0x10 => 'Medium Magnification',
1419 0x20 => 'High Magnification',
1420 },
1421 },
1422 6.1 => { # CSb1
1423 Name => 'ISOStepSize',
1424 Mask => 0xc0,
1425 PrintConv => {
1426 0x00 => '1/3 EV',
1427 0x40 => '1/2 EV',
1428 0x80 => '1 EV',
1429 },
1430 },
1431 6.2 => { # CSb2
1432 Name => 'ExposureControlStepSize',
1433 Mask => 0x30,
1434 PrintConv => {
1435 0x00 => '1/3 EV',
1436 0x10 => '1/2 EV',
1437 0x20 => '1 EV',
1438 },
1439 },
1440 6.3 => { # CSb3
1441 Name => 'ExposureCompStepSize',
1442 Mask => 0x0c,
1443 PrintConv => {
1444 0x00 => '1/3 EV',
1445 0x04 => '1/2 EV',
1446 0x08 => '1 EV',
1447 },
1448 },
1449 6.4 => { # CSb4
1450 Name => 'EasyExposureCompensation',
1451 Mask => 0x03,
1452 PrintConv => {
1453 0x00 => 'Off',
1454 0x01 => 'On',
1455 0x02 => 'On (auto reset)',
1456 },
1457 },
1458 7.1 => [ # CSb5
1459 {
1460 Name => 'CenterWeightedAreaSize',
1461 Condition => '$$self{Model} =~ /D3[SX]?\b/',
1462 Notes => 'D3',
1463 Mask => 0xe0,
1464 PrintConv => {
1465 0x00 => '8 mm',
1466 0x20 => '12 mm',
1467 0x40 => '15 mm',
1468 0x60 => '20 mm',
1469 0x80 => 'Average',
1470 },
1471 },
1472 {
1473 Name => 'CenterWeightedAreaSize',
1474 Notes => 'D300',
1475 Mask => 0xe0,
1476 PrintConv => {
1477 0x00 => '6 mm',
1478 0x20 => '8 mm',
1479 0x40 => '10 mm',
1480 0x60 => '13 mm',
1481 0x80 => 'Average',
1482 },
1483 },
1484 ],
1485 7.2 => { # CSb6-b
1486 Name => 'FineTuneOptCenterWeighted',
1487 Mask => 0x0f,
1488 ValueConv => '($val > 0x7 ? $val - 0x10 : $val) / 6',
1489 ValueConvInv => 'int($val*6+($val>0?0.5:-0.5)) & 0x0f',
1490 PrintConv => '$val ? sprintf("%+.2f", $val) : 0',
1491 PrintConvInv => 'Image::ExifTool::Exif::ConvertFraction($val)',
1492 },
1493 8.1 => { # CSb6-a
1494 Name => 'FineTuneOptMatrixMetering',
1495 Mask => 0xf0,
1496 ValueConv => '($val > 0x70 ? $val - 0x100 : $val) / 0x60',
1497 ValueConvInv => '(int($val*6+($val>0?0.5:-0.5))<<4) & 0xf0',
1498 PrintConv => '$val ? sprintf("%+.2f", $val) : 0',
1499 PrintConvInv => 'Image::ExifTool::Exif::ConvertFraction($val)',
1500 },
1501 8.2 => { # CSb6-c
1502 Name => 'FineTuneOptSpotMetering',
1503 Mask => 0x0f,
1504 ValueConv => '($val > 0x7 ? $val - 0x10 : $val) / 6',
1505 ValueConvInv => 'int($val*6+($val>0?0.5:-0.5)) & 0x0f',
1506 PrintConv => '$val ? sprintf("%+.2f", $val) : 0',
1507 PrintConvInv => 'Image::ExifTool::Exif::ConvertFraction($val)',
1508 },
1509 9.1 => { # CSf1-a, CSf2-a (D300S)
1510 Name => 'MultiSelectorShootMode',
1511 Mask => 0xc0,
1512 PrintConv => {
1513 0x00 => 'Select Center Focus Point',
1514 0x40 => 'Highlight Active Focus Point',
1515 0x80 => 'Not Used',
1516 },
1517 },
1518 9.2 => { # CSf1-b, CSf2-b (D300S)
1519 Name => 'MultiSelectorPlaybackMode',
1520 Condition => '$$self{Model} !~ /D3S\b/',
1521 Notes => 'all models except D3S', # (not confirmed for D3X)
1522 Mask => 0x30,
1523 PrintConv => {
1524 0x00 => 'Thumbnail On/Off',
1525 0x10 => 'View Histograms',
1526 0x20 => 'Zoom On/Off',
1527 0x30 => 'Choose Folder',
1528 },
1529 },
1530 9.3 => [ # CSf1-b2, CSf2-b2 (D300S)
1531 {
1532 Name => 'InitialZoomSetting',
1533 Condition => '$$self{Model} =~ /D3[SX]?\b/',
1534 Notes => 'D3',
1535 Mask => 0x0c,
1536 PrintConv => { #1
1537 0x00 => 'High Magnification',
1538 0x04 => 'Medium Magnification',
1539 0x08 => 'Low Magnification',
1540 },
1541 },
1542 {
1543 Name => 'InitialZoomSetting',
1544 Notes => 'D300',
1545 Mask => 0x0c,
1546 PrintConv => { #JD
1547 0x00 => 'Low Magnification',
1548 0x04 => 'Medium Magnification',
1549 0x08 => 'High Magnification',
1550 },
1551 },
1552 ],
1553 9.4 => { # CSf2 (D300,D3), CSf3 (D300S)
1554 Name => 'MultiSelector',
1555 Mask => 0x01,
1556 PrintConv => {
1557 0x00 => 'Do Nothing',
1558 0x01 => 'Reset Meter-off Delay',
1559 },
1560 },
1561 10.1 => { # CSd9 (D300,D3S), CSd10 (D300S), CSd8 (D3)
1562 Name => 'ExposureDelayMode',
1563 Mask => 0x40,
1564 PrintConv => { 0x00 => 'Off', 0x40 => 'On' },
1565 },
1566 10.2 => { # CSd4 (D300), CDs5 (D300S), CSd2-a (D3)
1567 Name => 'CLModeShootingSpeed',
1568 Mask => 0x07,
1569 PrintConv => '"$val fps"',
1570 PrintConvInv => '$val=~s/\s*fps//i; $val',
1571 },
1572 10.3 => { # (D3 CSd2-b)
1573 Name => 'CHModeShootingSpeed',
1574 Condition => '$$self{Model} =~ /D3[SX]?\b/',
1575 Notes => 'D3 only',
1576 Mask => 0x30,
1577 PrintConv => {
1578 0x00 => '9 fps',
1579 0x10 => '10 fps',
1580 0x20 => '11 fps',
1581 },
1582 },
1583 11 => { # CSd5 (D300), CSd6 (D300S), CSd3 (D3)
1584 Name => 'MaxContinuousRelease',
1585 # values: 1-100 (D300), 1-130 (D3)
1586 },
1587 12.1 => { # CSf10, CSf11 (D3S,D300S)
1588 Name => 'ReverseIndicators',
1589 Mask => 0x20,
1590 PrintConv => {
1591 0x00 => '+ 0 -',
1592 0x20 => '- 0 +',
1593 },
1594 },
1595 12.2 => [ # CSd6 (D300), CSd7 (D300S), CSd4 (D3)
1596 {
1597 Name => 'FileNumberSequence',
1598 Condition => '$$self{Model} =~ /D3[SX]?\b/',
1599 Notes => 'D3',
1600 Mask => 0x02,
1601 PrintConv => { 0x00 => 'On', 0x02 => 'Off' },
1602 },
1603 {
1604 Name => 'FileNumberSequence',
1605 Notes => 'D300',
1606 Mask => 0x08,
1607 PrintConv => { 0x00 => 'On', 0x08 => 'Off' },
1608 },
1609 ],
1610 12.3 => { # CSd5-a (D3)
1611 Name => 'RearDisplay',
1612 Condition => '$$self{Model} =~ /D3[SX]?\b/',
1613 Notes => 'D3 only',
1614 Mask => 0x80,
1615 PrintConv => {
1616 0x00 => 'ISO',
1617 0x80 => 'Exposures Remaining',
1618 },
1619 },
1620 12.4 => { # CSd5-b (D3)
1621 Name => 'ViewfinderDisplay',
1622 Condition => '$$self{Model} =~ /D3[SX]?\b/',
1623 Notes => 'D3 only',
1624 Mask => 0x40,
1625 PrintConv => {
1626 0x00 => 'Frame Count',
1627 0x40 => 'Exposures Remaining',
1628 },
1629 },
1630 12.5 => { # CSd11 (D300), CSd12 (D300S)
1631 Name => 'BatteryOrder',
1632 Condition => '$$self{Model} =~ /D300S?\b/',
1633 Notes => 'D300 only',
1634 Mask => 0x04,
1635 PrintConv => {
1636 0x00 => 'MB-D10 First',
1637 0x04 => 'Camera Battery First',
1638 },
1639 },
1640 12.6 => { # CSd10 (D300), CSd11 (D300S)
1641 Name => 'MB-D10Batteries',
1642 Condition => '$$self{Model} =~ /D300S?\b/',
1643 Notes => 'D300 only',
1644 Mask => 0x03,
1645 PrintConv => {
1646 0x00 => 'LR6 (AA alkaline)',
1647 0x01 => 'HR6 (AA Ni-MH)',
1648 0x02 => 'FR6 (AA lithium)',
1649 0x03 => 'ZR6 (AA Ni-Mn)',
1650 },
1651 },
1652 12.7 => { # CSd7 (D3S), CSd4, (D300S)
1653 Name => 'ScreenTips',
1654 Condition => '$$self{Model} =~ /(D3S|D300S)\b/',
1655 Mask => 0x10,
1656 PrintConv => {
1657 0x00 => 'On',
1658 0x10 => 'Off',
1659 },
1660 },
1661 13.1 => { # CSd1
1662 Name => 'Beep',
1663 Mask => 0xc0,
1664 PrintConv => {
1665 0x00 => 'High',
1666 0x40 => 'Low',
1667 0x80 => 'Off',
1668 },
1669 },
1670 13.2 => { # CSd7 (D300), CSd8 (D300S), CSd6 (D3)
1671 Name => 'ShootingInfoDisplay',
1672 Mask => 0x30,
1673 PrintConv => {
1674 0x00 => 'Auto', #JD (D300)
1675 0x10 => 'Auto', #1 (D3)
1676 0x20 => 'Manual (dark on light)',
1677 0x30 => 'Manual (light on dark)',
1678 },
1679 },
1680 13.3 => { # CSd2 (D300)
1681 Name => 'GridDisplay',
1682 Condition => '$$self{Model} =~ /D300S?\b/',
1683 Notes => 'D300 only',
1684 Mask => 0x02,
1685 PrintConv => { 0x00 => 'Off', 0x02 => 'On' },
1686 },
1687 13.4 => { # CSd3 (D300)
1688 Name => 'ViewfinderWarning',
1689 Condition => '$$self{Model} =~ /D300S?\b/',
1690 Notes => 'D300 only',
1691 Mask => 0x01,
1692 PrintConv => { 0x00 => 'On', 0x01 => 'Off' },
1693 },
1694 13.5 => { # CSf1-b (D3S) (ref 1)
1695 Name => 'MultiSelectorPlaybackMode',
1696 Condition => '$$self{Model} =~ /D3S\b/',
1697 Notes => 'D3S only',
1698 Mask => 0x03,
1699 PrintConv => {
1700 0x00 => 'Thumbnail On/Off',
1701 0x01 => 'View Histograms',
1702 0x02 => 'Zoom On/Off',
1703 },
1704 },
1705 14.1 => [ # CSf5-a (ref 1), CSf6-a (D300S)
1706 {
1707 Name => 'PreviewButton',
1708 Condition => '$$self{Model} =~ /D3[SX]?\b/',
1709 Notes => 'D3',
1710 Mask => 0xf8,
1711 PrintConv => {
1712 0x00 => 'None',
1713 0x08 => 'Preview',
1714 0x10 => 'FV Lock',
1715 0x18 => 'AE/AF Lock',
1716 0x20 => 'AE Lock Only',
1717 0x28 => 'AE Lock (reset on release)',
1718 0x30 => 'AE Lock (hold)',
1719 0x38 => 'AF Lock Only',
1720 0x40 => 'Flash Off',
1721 0x48 => 'Bracketing Burst',
1722 0x50 => 'Matrix Metering',
1723 0x58 => 'Center-weighted Metering',
1724 0x60 => 'Spot Metering',
1725 0x68 => 'Virtual Horizon',
1726 # 0x70 not used
1727 0x78 => 'Playback',
1728 0x80 => 'My Menu Top',
1729 },
1730 },
1731 { #PH
1732 Name => 'FuncButton',
1733 Notes => 'D300',
1734 Mask => 0xf8,
1735 PrintConv => {
1736 0x00 => 'None',
1737 0x08 => 'Preview',
1738 0x10 => 'FV Lock',
1739 0x18 => 'AE/AF Lock',
1740 0x20 => 'AE Lock Only',
1741 0x28 => 'AE Lock (reset on release)',
1742 0x30 => 'AE Lock (hold)',
1743 0x38 => 'AF Lock Only',
1744 # 0x40 not used
1745 0x48 => 'Flash Off',
1746 0x50 => 'Bracketing Burst',
1747 0x58 => 'Matrix Metering',
1748 0x60 => 'Center-weighted Metering',
1749 0x68 => 'Spot Metering',
1750 0x70 => 'Playback', #PH (guess)
1751 0x78 => 'My Menu Top', #PH (guess)
1752 0x80 => '+ NEF (RAW)', #PH (guess)
1753 },
1754 },
1755 ],
1756 14.2 => [ # CSf5-b (PH,NC), CSf6-b (D300S)
1757 {
1758 Name => 'PreviewButtonPlusDials',
1759 Condition => '$$self{Model} =~ /D3[SX]?\b/',
1760 Notes => 'D3',
1761 Mask => 0x07,
1762 PrintConv => {
1763 0 => 'None',
1764 1 => 'Choose Image Area (FX/DX/5:4)',
1765 2 => 'One Step Speed/Aperture',
1766 3 => 'Choose Non-CPU Lens Number',
1767 # n/a 4 => 'Focus Point Selection',
1768 5 => 'Choose Image Area (FX/DX)',
1769 6 => 'Shooting Bank Menu',
1770 7 => 'Dynamic AF Area', #PH (D3S,D3X,NC)
1771 },
1772 },
1773 { #PH
1774 Name => 'FuncButtonPlusDials',
1775 Notes => 'D300',
1776 Mask => 0x07,
1777 PrintConv => {
1778 0 => 'None',
1779 2 => 'One Step Speed/Aperture',
1780 3 => 'Choose Non-CPU Lens Number',
1781 5 => 'Auto Bracketing',
1782 6 => 'Dynamic AF Area',
1783 },
1784 },
1785 ],
1786 15.1 => [ # CSf4-a (ref 1), CSf5-a (D300S)
1787 {
1788 Name => 'FuncButton',
1789 Condition => '$$self{Model} =~ /D3[SX]?\b/',
1790 Notes => 'D3',
1791 Mask => 0xf8,
1792 PrintConv => {
1793 0x00 => 'None',
1794 0x08 => 'Preview',
1795 0x10 => 'FV Lock',
1796 0x18 => 'AE/AF Lock',
1797 0x20 => 'AE Lock Only',
1798 0x28 => 'AE Lock (reset on release)',
1799 0x30 => 'AE Lock (hold)',
1800 0x38 => 'AF Lock Only',
1801 0x40 => 'Flash Off',
1802 0x48 => 'Bracketing Burst',
1803 0x50 => 'Matrix Metering',
1804 0x58 => 'Center-weighted Metering',
1805 0x60 => 'Spot Metering',
1806 0x68 => 'Virtual Horizon',
1807 # 0x70 not used
1808 0x78 => 'Playback',
1809 0x80 => 'My Menu Top',
1810 },
1811 },
1812 { #PH
1813 Name => 'PreviewButton',
1814 Notes => 'D300',
1815 Mask => 0xf8,
1816 PrintConv => {
1817 0x00 => 'None',
1818 0x08 => 'Preview',
1819 0x10 => 'FV Lock',
1820 0x18 => 'AE/AF Lock',
1821 0x20 => 'AE Lock Only',
1822 0x28 => 'AE Lock (reset on release)',
1823 0x30 => 'AE Lock (hold)',
1824 0x38 => 'AF Lock Only',
1825 # 0x40 not used
1826 0x48 => 'Flash Off',
1827 0x50 => 'Bracketing Burst',
1828 0x58 => 'Matrix Metering',
1829 0x60 => 'Center-weighted Metering',
1830 0x68 => 'Spot Metering',
1831 0x70 => 'Playback', #PH (guess)
1832 0x78 => 'My Menu Top', #PH (guess)
1833 0x80 => '+ NEF (RAW)', #PH (guess)
1834 },
1835 },
1836 ],
1837 15.2 => [ # CSf4-b (ref 1), CSf5-b (D300S)
1838 {
1839 Name => 'FuncButtonPlusDials',
1840 Condition => '$$self{Model} =~ /D3[SX]?\b/',
1841 Notes => 'D3',
1842 Mask => 0x07,
1843 PrintConv => {
1844 0 => 'None',
1845 1 => 'Choose Image Area (FX/DX/5:4)',
1846 2 => 'One Step Speed/Aperture',
1847 3 => 'Choose Non-CPU Lens Number',
1848 4 => 'Focus Point Selection', #(NC)
1849 5 => 'Choose Image Area (FX/DX)',
1850 6 => 'Shooting Bank Menu',
1851 7 => 'Dynamic AF Area', #PH (D3S,D3X,NC)
1852 },
1853 },
1854 { #PH
1855 Name => 'PreviewButtonPlusDials',
1856 Notes => 'D300',
1857 Mask => 0x07,
1858 PrintConv => {
1859 0 => 'None',
1860 2 => 'One Step Speed/Aperture',
1861 3 => 'Choose Non-CPU Lens Number',
1862 5 => 'Auto Bracketing',
1863 6 => 'Dynamic AF Area',
1864 },
1865 },
1866 ],
1867 16.1 => [ # CSf6-a (ref 1), CSf7-a (D300S)
1868 {
1869 Name => 'AELockButton',
1870 Condition => '$$self{Model} =~ /D3[SX]?\b/',
1871 Notes => 'D3',
1872 Mask => 0xf8,
1873 PrintConv => {
1874 0x00 => 'None',
1875 0x08 => 'Preview',
1876 0x10 => 'FV Lock',
1877 0x18 => 'AE/AF Lock',
1878 0x20 => 'AE Lock Only',
1879 0x28 => 'AE Lock (reset on release)',
1880 0x30 => 'AE Lock (hold)',
1881 0x38 => 'AF Lock Only',
1882 0x40 => 'Flash Off',
1883 0x48 => 'Bracketing Burst',
1884 0x50 => 'Matrix Metering',
1885 0x58 => 'Center-weighted Metering',
1886 0x60 => 'Spot Metering',
1887 0x68 => 'Virtual Horizon',
1888 0x70 => 'AF On', # (AE-L/AF-L button only)
1889 0x78 => 'Playback',
1890 0x80 => 'My Menu Top',
1891 },
1892 },
1893 { #PH
1894 Name => 'AELockButton',
1895 Notes => 'D300',
1896 Mask => 0xf8,
1897 PrintConv => {
1898 0x00 => 'None',
1899 0x08 => 'Preview',
1900 0x10 => 'FV Lock',
1901 0x18 => 'AE/AF Lock',
1902 0x20 => 'AE Lock Only',
1903 0x28 => 'AE Lock (reset on release)',
1904 0x30 => 'AE Lock (hold)',
1905 0x38 => 'AF Lock Only',
1906 0x40 => 'AF On', # (AE-L/AF-L button only)
1907 0x48 => 'Flash Off',
1908 0x50 => 'Bracketing Burst',
1909 0x58 => 'Matrix Metering',
1910 0x60 => 'Center-weighted Metering',
1911 0x68 => 'Spot Metering',
1912 0x70 => 'Playback', #PH (guess)
1913 0x78 => 'My Menu Top', #PH (guess)
1914 0x80 => '+ NEF (RAW)', #PH (guess)
1915 },
1916 },
1917 ],
1918 16.2 => [ # CSf6-b (ref 1), CSf7-b (D300S)
1919 {
1920 Name => 'AELockButtonPlusDials',
1921 Condition => '$$self{Model} =~ /D3[SX]?\b/',
1922 Notes => 'D3',
1923 Mask => 0x07,
1924 PrintConv => {
1925 0 => 'None',
1926 1 => 'Choose Image Area (FX/DX/5:4)',
1927 2 => 'One Step Speed/Aperture',
1928 3 => 'Choose Non-CPU Lens Number',
1929 # n/c 4 => 'Focus Point Selection', #(NC)
1930 5 => 'Choose Image Area (FX/DX)',
1931 6 => 'Shooting Bank Menu',
1932 7 => 'Dynamic AF Area', #PH (D3S,D3X,NC)
1933 },
1934 },
1935 { #PH
1936 Name => 'AELockButtonPlusDials',
1937 Notes => 'D300',
1938 Mask => 0x07,
1939 PrintConv => {
1940 0 => 'None',
1941 # n/a 2 => 'One Step Speed/Aperture',
1942 3 => 'Choose Non-CPU Lens Number',
1943 5 => 'Auto Bracketing', #(NC)
1944 6 => 'Dynamic AF Area',
1945 },
1946 },
1947 ],
1948 17.1 => { # CSf7-a, CSf8-a (D3S,D300S)
1949 Name => 'CommandDialsReverseRotation',
1950 Mask => 0x80,
1951 PrintConv => { 0x00 => 'No', 0x80 => 'Yes' },
1952 },
1953 17.2 => { # CSf7-b, CSf8-b (D3S,D300S)
1954 Name => 'CommandDialsChangeMainSub',
1955 Mask => 0x40,
1956 PrintConv => { 0x00 => 'Off', 0x40 => 'On' },
1957 },
1958 17.3 => { # CSf7-c, CSf8-c (D3S,D300S)
1959 Name => 'CommandDialsApertureSetting',
1960 Mask => 0x20,
1961 PrintConv => {
1962 0x00 => 'Sub-command Dial',
1963 0x20 => 'Aperture Ring',
1964 },
1965 },
1966 17.4 => { # CSf7-d, CSf8-d (D3S,D300S)
1967 Name => 'CommandDialsMenuAndPlayback',
1968 Mask => 0x10,
1969 PrintConv => { 0x00 => 'Off', 0x10 => 'On' },
1970 },
1971 17.5 => { # CSd8 (D300,D3S), CSd9 (D300S), CSd7 (D3)
1972 Name => 'LCDIllumination',
1973 Mask => 0x08,
1974 PrintConv => { 0x00 => 'Off', 0x08 => 'On' },
1975 },
1976 17.6 => { # CSf3, CSf4 (D300S)
1977 Name => 'PhotoInfoPlayback',
1978 Mask => 0x04,
1979 PrintConv => {
1980 0x00 => 'Info Up-down, Playback Left-right',
1981 0x04 => 'Info Left-right, Playback Up-down',
1982 },
1983 },
1984 17.7 => { # CSc1
1985 Name => 'ShutterReleaseButtonAE-L',
1986 Mask => 0x02,
1987 PrintConv => { 0x00 => 'Off', 0x02 => 'On' },
1988 },
1989 17.8 => { # CSf8, CSf9 (D3S,D300S)
1990 Name => 'ReleaseButtonToUseDial',
1991 Mask => 0x01,
1992 PrintConv => { 0x00 => 'No', 0x01 => 'Yes' },
1993 },
1994 18.1 => { # CSc3
1995 Name => 'SelfTimerTime',
1996 Mask => 0x18,
1997 PrintConv => {
1998 0x00 => '2 s',
1999 0x08 => '5 s',
2000 0x10 => '10 s',
2001 0x18 => '20 s',
2002 },
2003 },
2004 18.2 => { # CSc4
2005 Name => 'MonitorOffTime',
2006 # NOTE: The D3S and D300S have separate settings for Playback,
2007 # Image Review, Menus, and Information Display times, but these
2008 # have not yet been decoded - PH
2009 Mask => 0x07,
2010 PrintConv => {
2011 0x00 => '10 s',
2012 0x01 => '20 s',
2013 0x02 => '1 min',
2014 0x03 => '5 min',
2015 0x04 => '10 min',
2016 },
2017 },
2018 20.1 => [ # CSe1
2019 {
2020 Name => 'FlashSyncSpeed',
2021 Condition => '$$self{Model} =~ /D3[SX]?\b/',
2022 Notes => 'D3',
2023 Mask => 0xe0,
2024 PrintConv => {
2025 0x00 => '1/250 s (auto FP)',
2026 0x20 => '1/250 s',
2027 0x40 => '1/200 s',
2028 0x60 => '1/160 s',
2029 0x80 => '1/125 s',
2030 0xa0 => '1/100 s',
2031 0xc0 => '1/80 s',
2032 0xe0 => '1/60 s',
2033 },
2034 },
2035 {
2036 Name => 'FlashSyncSpeed',
2037 Notes => 'D300',
2038 Mask => 0xf0,
2039 PrintConv => {
2040 0x00 => '1/320 s (auto FP)',
2041 0x10 => '1/250 s (auto FP)',
2042 0x20 => '1/250 s',
2043 0x30 => '1/200 s',
2044 0x40 => '1/160 s',
2045 0x50 => '1/125 s',
2046 0x60 => '1/100 s',
2047 0x70 => '1/80 s',
2048 0x80 => '1/60 s',
2049 },
2050 },
2051 ],
2052 20.2 => { # CSe2
2053 Name => 'FlashShutterSpeed',
2054 Mask => 0x0f,
2055 PrintConvColumns => 2,
2056 PrintConv => {
2057 0x00 => '1/60 s',
2058 0x01 => '1/30 s',
2059 0x02 => '1/15 s',
2060 0x03 => '1/8 s',
2061 0x04 => '1/4 s',
2062 0x05 => '1/2 s',
2063 0x06 => '1 s',
2064 0x07 => '2 s',
2065 0x08 => '4 s',
2066 0x09 => '8 s',
2067 0x0a => '15 s',
2068 0x0b => '30 s',
2069 },
2070 },
2071 21.1 => { # CSe5 (D300), CSe4 (D3)
2072 Name => 'AutoBracketSet',
2073 Mask => 0xc0,
2074 PrintConv => {
2075 0x00 => 'AE & Flash',
2076 0x40 => 'AE Only',
2077 0x80 => 'Flash Only',
2078 0xc0 => 'WB Bracketing',
2079 # NOTE: D3S/D300S have an "ADL Bracketing" setting not decoded - PH
2080 },
2081 },
2082 21.2 => { # CSe6 (D300), CSe5 (D3)
2083 Name => 'AutoBracketModeM',
2084 Mask => 0x30,
2085 PrintConv => {
2086 0x00 => 'Flash/Speed',
2087 0x10 => 'Flash/Speed/Aperture',
2088 0x20 => 'Flash/Aperture',
2089 0x30 => 'Flash Only',
2090 },
2091 },
2092 21.3 => { # CSe7 (D300), CSe6 (D3)
2093 Name => 'AutoBracketOrder',
2094 Mask => 0x08,
2095 PrintConv => {
2096 0x00 => '0,-,+',
2097 0x08 => '-,0,+',
2098 },
2099 },
2100 21.4 => { # CSe4 (D300), CSe3 (D3)
2101 Name => 'ModelingFlash',
2102 Mask => 0x01,
2103 PrintConv => { 0x00 => 'On', 0x01 => 'Off' },
2104 },
2105 22.1 => { # CSf9, CSf10 (D3S,D300S)
2106 Name => 'NoMemoryCard',
2107 Mask => 0x80,
2108 PrintConv => {
2109 0x00 => 'Release Locked',
2110 0x80 => 'Enable Release',
2111 },
2112 },
2113 22.2 => { # CSc2
2114 Name => 'MeteringTime',
2115 Mask => 0x0f,
2116 PrintConvColumns => 2,
2117 PrintConv => {
2118 0x00 => '4 s',
2119 0x01 => '6 s',
2120 0x02 => '8 s',
2121 0x03 => '16 s',
2122 0x04 => '30 s',
2123 0x05 => '1 min',
2124 0x06 => '5 min',
2125 0x07 => '10 min',
2126 0x08 => '30 min',
2127 0x09 => 'No Limit',
2128 },
2129 },
2130 23.1 => { # CSe3
2131 Name => 'InternalFlash',
2132 Mask => 0xc0,
2133 PrintConv => {
2134 0x00 => 'TTL',
2135 0x40 => 'Manual',
2136 0x80 => 'Repeating Flash',
2137 0xc0 => 'Commander Mode',
2138 },
2139 },
2140);
2141
2142# D700 custom settings (ref 2)
2143%Image::ExifTool::NikonCustom::SettingsD700 = (
2144 PROCESS_PROC => \&Image::ExifTool::ProcessBinaryData,
2145 WRITE_PROC => \&Image::ExifTool::WriteBinaryData,
2146 CHECK_PROC => \&Image::ExifTool::CheckBinaryData,
2147 WRITABLE => 1,
2148 FIRST_ENTRY => 0,
2149 DATAMEMBER => [ 16.1 ],
2150 GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
2151 NOTES => 'Custom settings for the D700.',
2152 0.1 => { #1
2153 Name => 'CustomSettingsBank',
2154 Mask => 0x03,
2155 PrintConv => {
2156 0 => 'A',
2157 1 => 'B',
2158 2 => 'C',
2159 3 => 'D',
2160 },
2161 },
2162 0.2 => { #1
2163 Name => 'CustomSettingsAllDefault',
2164 Notes => '"No" if any custom setting for this bank was changed from the default',
2165 Mask => 0x80,
2166 PrintConv => { 0x00 => 'Yes', 0x80 => 'No' },
2167 },
2168 1.1 => { # CSa1
2169 Name => 'AF-CPrioritySelection',
2170 Mask => 0xc0,
2171 PrintConv => {
2172 0x00 => 'Release',
2173 0x40 => 'Release + Focus',
2174 0x80 => 'Focus',
2175 },
2176 },
2177 1.2 => { # CSa2
2178 Name => 'AF-SPrioritySelection',
2179 Mask => 0x20,
2180 PrintConv => {
2181 0x00 => 'Focus',
2182 0x20 => 'Release',
2183 },
2184 },
2185 1.3 => { # CSa8
2186 Name => 'AFPointSelection',
2187 Mask => 0x10,
2188 PrintConv => {
2189 0x00 => '51 Points',
2190 0x10 => '11 Points',
2191 },
2192 },
2193 1.4 => { # CSa3
2194 Name => 'DynamicAFArea',
2195 Mask => 0x0c,
2196 PrintConv => {
2197 0x00 => '9 Points',
2198 0x04 => '21 Points',
2199 0x08 => '51 Points',
2200 0x0c => '51 Points (3D-tracking)',
2201 },
2202 },
2203 2.1 => { # CSa5
2204 Name => 'AFActivation',
2205 Mask => 0x80,
2206 PrintConv => {
2207 0x00 => 'Shutter/AF-On',
2208 0x80 => 'AF-On Only',
2209 },
2210 },
2211 2.2 => { # CSa7
2212 Name => 'FocusPointWrap',
2213 Mask => 0x08,
2214 PrintConv => {
2215 0x00 => 'No Wrap',
2216 0x08 => 'Wrap',
2217 },
2218 },
2219 2.3 => { # CSa6
2220 Name => 'AFPointIllumination',
2221 Mask => 0x06,
2222 PrintConv => {
2223 0x00 => 'Auto',
2224 0x02 => 'Off',
2225 0x04 => 'On',
2226 },
2227 },
2228 2.4 => { # CSa9
2229 Name => 'AFAssist',
2230 Mask => 0x01,
2231 PrintConv => { 0x00 => 'On', 0x01 => 'Off' },
2232 },
2233 3.1 => { # CSa4
2234 Name => 'FocusTrackingLockOn',
2235 Mask => 0x07,
2236 PrintConv => {
2237 0x00 => '3 Normal',
2238 0x01 => '4',
2239 0x02 => '5 Long',
2240 0x03 => '2',
2241 0x04 => '1 Short',
2242 0x05 => 'Off',
2243 },
2244 },
2245 3.2 => { # CSa10
2246 Name => 'AF-OnForMB-D10',
2247 Mask => 0x70,
2248 PrintConv => {
2249 0x00 => 'AF-On',
2250 0x10 => 'AE/AF Lock',
2251 0x20 => 'AE Lock Only',
2252 0x30 => 'AE Lock (reset on release)',
2253 0x40 => 'AE Lock (hold)',
2254 0x50 => 'AF Lock Only',
2255 0x60 => 'Same as FUNC Button',
2256 },
2257 },
2258 4.1 => { # CSb1
2259 Name => 'ISOStepSize',
2260 Mask => 0xc0,
2261 PrintConv => {
2262 0x00 => '1/3 EV',
2263 0x40 => '1/2 EV',
2264 0x80 => '1 EV',
2265 },
2266 },
2267 4.2 => { # CSb2
2268 Name => 'ExposureControlStepSize',
2269 Mask => 0x30,
2270 PrintConv => {
2271 0x00 => '1/3 EV',
2272 0x10 => '1/2 EV',
2273 0x20 => '1 EV',
2274 },
2275 },
2276 4.3 => { # CSb3
2277 Name => 'ExposureCompStepSize',
2278 Mask => 0x0c,
2279 PrintConv => {
2280 0x00 => '1/3 EV',
2281 0x04 => '1/2 EV',
2282 0x08 => '1 EV',
2283 },
2284 },
2285 4.4 => { # CSb4
2286 Name => 'EasyExposureCompensation',
2287 Mask => 0x03,
2288 PrintConv => {
2289 0x00 => 'Off',
2290 0x01 => 'On',
2291 0x02 => 'On (auto reset)',
2292 },
2293 },
2294 5.1 => { # CSb5
2295 Name => 'CenterWeightedAreaSize',
2296 Mask => 0x70,
2297 PrintConv => {
2298 0x00 => '8 mm',
2299 0x10 => '12 mm',
2300 0x20 => '15 mm',
2301 0x30 => '20 mm',
2302 0x40 => 'Average',
2303 },
2304 },
2305 6.1 => { # CSb6-a
2306 Name => 'FineTuneOptMatrixMetering',
2307 Mask => 0xf0,
2308 ValueConv => '($val > 0x70 ? $val - 0x100 : $val) / 0x60',
2309 ValueConvInv => '(int($val*6+($val>0?0.5:-0.5))<<4) & 0xf0',
2310 PrintConv => '$val ? sprintf("%+.2f", $val) : 0',
2311 PrintConvInv => 'Image::ExifTool::Exif::ConvertFraction($val)',
2312 },
2313 6.2 => { # CSb6-c
2314 Name => 'FineTuneOptSpotMetering',
2315 Mask => 0x0f,
2316 ValueConv => '($val > 0x7 ? $val - 0x10 : $val) / 6',
2317 ValueConvInv => 'int($val*6+($val>0?0.5:-0.5)) & 0x0f',
2318 PrintConv => '$val ? sprintf("%+.2f", $val) : 0',
2319 PrintConvInv => 'Image::ExifTool::Exif::ConvertFraction($val)',
2320 },
2321 7.1 => { # CSc1
2322 Name => 'ShutterReleaseButtonAE-L',
2323 Mask => 0x80,
2324 PrintConv => { 0x00 => 'Off', 0x80 => 'On' },
2325 },
2326 7.2 => { # CSc3
2327 Name => 'SelfTimerTime',
2328 Mask => 0x30,
2329 PrintConv => {
2330 0x00 => '2 s',
2331 0x10 => '5 s',
2332 0x20 => '10 s',
2333 0x30 => '20 s',
2334 },
2335 },
2336 7.3 => { # CSc2
2337 Name => 'MeteringTime',
2338 Mask => 0x0f,
2339 PrintConvColumns => 2,
2340 PrintConv => {
2341 0x00 => '4 s',
2342 0x01 => '6 s',
2343 0x02 => '8 s',
2344 0x03 => '16 s',
2345 0x04 => '30 s',
2346 0x05 => '1 min',
2347 0x06 => '5 min',
2348 0x07 => '10 min',
2349 0x08 => '30 min',
2350 0x09 => 'No Limit',
2351 },
2352 },
2353 8.1 => { # CSc4-a
2354 Name => 'PlaybackMonitorOffTime',
2355 Mask => 0x38,
2356 PrintConv => {
2357 0x00 => '4 s',
2358 0x08 => '10 s',
2359 0x10 => '20 s',
2360 0x18 => '1 min',
2361 0x20 => '5 min',
2362 0x28 => '10 min',
2363 },
2364 },
2365 8.2 => { # CSc4-b
2366 Name => 'MenuMonitorOffTime',
2367 Mask => 0x07,
2368 PrintConv => {
2369 0x00 => '4 s',
2370 0x01 => '10 s',
2371 0x02 => '20 s',
2372 0x03 => '1 min',
2373 0x04 => '5 min',
2374 0x05 => '10 min',
2375 },
2376 },
2377 9.1 => { # CSc4-c
2378 Name => 'ShootingInfoMonitorOffTime',
2379 Mask => 0x38,
2380 PrintConv => {
2381 0x00 => '4 s',
2382 0x08 => '10 s',
2383 0x10 => '20 s',
2384 0x18 => '1 min',
2385 0x20 => '5 min',
2386 0x28 => '10 min',
2387 },
2388 },
2389 9.2 => { # CSc4-d
2390 Name => 'ImageReviewTime',
2391 Mask => 0x07,
2392 PrintConv => {
2393 0x00 => '4 s',
2394 0x01 => '10 s',
2395 0x02 => '20 s',
2396 0x03 => '1 min',
2397 0x04 => '5 min',
2398 0x05 => '10 min',
2399 },
2400 },
2401 10.1 => { # CSd1
2402 Name => 'Beep',
2403 Mask => 0xc0,
2404 PrintConv => {
2405 0x00 => 'High',
2406 0x40 => 'Low',
2407 0x80 => 'Off',
2408 },
2409 },
2410 10.2 => { # CSd7
2411 Name => 'ShootingInfoDisplay',
2412 Mask => 0x30,
2413 PrintConv => {
2414 0x00 => 'Auto', #JD (D300)
2415 0x10 => 'Auto', #1 (D3)
2416 0x20 => 'Manual (dark on light)',
2417 0x30 => 'Manual (light on dark)',
2418 },
2419 },
2420 10.3 => { # CSd8
2421 Name => 'LCDIllumination',
2422 Mask => 0x08,
2423 PrintConv => { 0x00 => 'Off', 0x08 => 'On' },
2424 },
2425 10.4 => { # CSd9
2426 Name => 'ExposureDelayMode',
2427 Mask => 0x04,
2428 PrintConv => { 0x00 => 'Off', 0x04 => 'On' },
2429 },
2430 10.5 => { # CSd2
2431 Name => 'GridDisplay',
2432 Mask => 0x02,
2433 PrintConv => { 0x00 => 'Off', 0x02 => 'On' },
2434 },
2435 11.1 => { # CSd6
2436 Name => 'FileNumberSequence',
2437 Mask => 0x40,
2438 PrintConv => { 0x00 => 'On', 0x40 => 'Off' },
2439 },
2440 11.2 => { # CSd4
2441 Name => 'CLModeShootingSpeed',
2442 Mask => 0x07,
2443 PrintConv => '"$val fps"',
2444 PrintConvInv => '$val=~s/\s*fps//i; $val',
2445 },
2446 12 => { # CSd5
2447 Name => 'MaxContinuousRelease',
2448 # values: 1-100
2449 },
2450 13.1 => { # CSd3
2451 Name => 'ScreenTips',
2452 Mask => 0x08,
2453 PrintConv => { 0x08 => 'On', 0x00 => 'Off' },
2454 },
2455 13.2 => { # CSd11
2456 Name => 'BatteryOrder',
2457 Mask => 0x04,
2458 PrintConv => {
2459 0x00 => 'MB-D10 First',
2460 0x04 => 'Camera Battery First',
2461 },
2462 },
2463 13.3 => { # CSd10
2464 Name => 'MB-D10BatteryType',
2465 Mask => 0x03,
2466 PrintConv => {
2467 0x00 => 'LR6 (AA alkaline)',
2468 0x01 => 'HR6 (AA Ni-MH)',
2469 0x02 => 'FR6 (AA lithium)',
2470 0x03 => 'ZR6 (AA Ni-Mn)',
2471 },
2472 },
2473 15.1 => { # CSe1
2474 Name => 'FlashSyncSpeed',
2475 Mask => 0xf0,
2476 PrintConv => {
2477 0x00 => '1/320 s (auto FP)',
2478 0x10 => '1/250 s (auto FP)',
2479 0x20 => '1/250 s',
2480 0x30 => '1/200 s',
2481 0x40 => '1/160 s',
2482 0x50 => '1/125 s',
2483 0x60 => '1/100 s',
2484 0x70 => '1/80 s',
2485 0x80 => '1/60 s',
2486 },
2487 },
2488 15.2 => { # CSe2
2489 Name => 'FlashShutterSpeed',
2490 Mask => 0x0f,
2491 PrintConvColumns => 2,
2492 PrintConv => {
2493 0x00 => '1/60 s',
2494 0x01 => '1/30 s',
2495 0x02 => '1/15 s',
2496 0x03 => '1/8 s',
2497 0x04 => '1/4 s',
2498 0x05 => '1/2 s',
2499 0x06 => '1 s',
2500 0x07 => '2 s',
2501 0x08 => '4 s',
2502 0x09 => '8 s',
2503 0x0a => '15 s',
2504 0x0b => '30 s',
2505 },
2506 },
2507 16.1 => { # CSe3
2508 Name => 'FlashControlBuilt-in',
2509 # Note If set the Manual, Repeating Flash, Commander Mode
2510 # does not decode the detail settings.
2511 Mask => 0xc0,
2512 RawConv => '$$self{FlashControlBuiltin} = $val & 0xc0',
2513 PrintConv => {
2514 0x00 => 'TTL',
2515 0x40 => 'Manual',
2516 0x80 => 'Repeating Flash',
2517 0xc0 => 'Commander Mode',
2518 },
2519 },
2520 16.2 => { # CSe3-b
2521 Name => 'ManualFlashOutput',
2522 Condition => '$$self{FlashControlBuiltin} == 0x40',
2523 Mask => 0x1f,
2524 ValueConv => '2 ** (-$val/3)',
2525 ValueConvInv => '$val > 0 ? -3*log($val)/log(2) : 0',
2526 PrintConv => q{
2527 return 'Full' if $val > 0.99;
2528 Image::ExifTool::Exif::PrintExposureTime($val);
2529 },
2530 PrintConvInv => '$val=~/F/i ? 1 : Image::ExifTool::Exif::ConvertFraction($val)',
2531 },
2532 17.1 => { # CSe3-ca
2533 Name => 'RepeatingFlashOutput',
2534 Condition => '$$self{FlashControlBuiltin} == 0x80',
2535 Mask => 0x70,
2536 ValueConv => '2 ** (-($val>>4)-2)',
2537 ValueConvInv => '$val > 0 ? int(-log($val)/log(2)-2+0.5)<<4 : 0',
2538 PrintConv => 'Image::ExifTool::Exif::PrintExposureTime($val)',
2539 PrintConvInv => 'Image::ExifTool::Exif::ConvertFraction($val)',
2540 },
2541 17.2 => { # CSe3-cb
2542 Name => 'RepeatingFlashCount',
2543 Condition => '$$self{FlashControlBuiltin} == 0x80',
2544 Mask => 0x0f,
2545 ValueConv => '$val < 10 ? $val + 1 : 5 * ($val - 7)',
2546 ValueConvInv => '$val <= 10 ? $val - 1 : $val / 5 + 7',
2547 },
2548 18.1 => { # CSe3-cc (NC)
2549 Name => 'RepeatingFlashRate',
2550 Condition => '$$self{FlashControlBuiltin} == 0x80',
2551 Mask => 0xf0,
2552 ValueConv => 'my $v=($val>>4); $v < 10 ? $v + 1 : 10 * ($v - 8)',
2553 ValueConvInv => 'int(($val <= 10 ? $val - 1 : $val / 10 + 8) + 0.5) << 4',
2554 PrintConv => '"$val Hz"',
2555 PrintConvInv => '$val=~/(\d+)/; $1 || 0',
2556 },
2557 18.2 => { # CSe3-dd
2558 Name => 'CommanderInternalTTLChannel',
2559 Condition => '$$self{FlashControlBuiltin} == 0xc0',
2560 Mask => 0x03,
2561 PrintConv => {
2562 0x00 => '1 ch',
2563 0x01 => '2 ch',
2564 0x02 => '3 ch',
2565 0x03 => '4 ch',
2566 },
2567 },
2568 20.1 => { # CSe3-da
2569 Name => 'CommanderInternalTTLCompBuiltin',
2570 Condition => '$$self{FlashControlBuiltin} == 0xc0',
2571 Mask => 0x1f,
2572 ValueConv => '($val - 9) / 3',
2573 ValueConvInv => '$val * 3 + 9',
2574 PrintConv => '$val ? sprintf("%+.1f",$val) : 0',
2575 PrintConvInv => '$val',
2576 },
2577 21.1 => { # CSe3-db
2578 Name => 'CommanderInternalTTLCompGroupA',
2579 Condition => '$$self{FlashControlBuiltin} == 0xc0',
2580 Mask => 0x1f,
2581 ValueConv => '($val - 9) / 3',
2582 ValueConvInv => '$val * 3 + 9',
2583 PrintConv => '$val ? sprintf("%+.1f",$val) : 0',
2584 PrintConvInv => '$val',
2585 },
2586 22.1 => { # CSe3-dc
2587 Name => 'CommanderInternalTTLCompGroupB',
2588 Condition => '$$self{FlashControlBuiltin} == 0xc0',
2589 Mask => 0x1f,
2590 ValueConv => '($val - 9) / 3',
2591 ValueConvInv => '$val * 3 + 9',
2592 PrintConv => '$val ? sprintf("%+.1f",$val) : 0',
2593 PrintConvInv => '$val',
2594 },
2595 26.1 => { # CSe5
2596 Name => 'AutoBracketSet',
2597 Mask => 0xc0,
2598 PrintConv => {
2599 0x00 => 'AE & Flash',
2600 0x40 => 'AE Only',
2601 0x80 => 'Flash Only',
2602 0xc0 => 'WB Bracketing',
2603 },
2604 },
2605 26.2 => { # CSe6
2606 Name => 'AutoBracketModeM',
2607 Mask => 0x30,
2608 PrintConv => {
2609 0x00 => 'Flash/Speed',
2610 0x10 => 'Flash/Speed/Aperture',
2611 0x20 => 'Flash/Aperture',
2612 0x30 => 'Flash Only',
2613 },
2614 },
2615 26.3 => { # CSe7
2616 Name => 'AutoBracketOrder',
2617 Mask => 0x08,
2618 PrintConv => {
2619 0x00 => '0,-,+',
2620 0x08 => '-,0,+',
2621 },
2622 },
2623 26.4 => { # CSe4
2624 Name => 'ModelingFlash',
2625 Mask => 0x01,
2626 PrintConv => { 0x00 => 'On', 0x01 => 'Off' },
2627 },
2628 27.1 => { # CSf2-a
2629 Name => 'MultiSelectorShootMode',
2630 Mask => 0xc0,
2631 PrintConv => {
2632 0x00 => 'Select Center Focus Point',
2633 0x40 => 'Highlight Active Focus Point',
2634 0x80 => 'Not Used',
2635 },
2636 },
2637 27.2 => { # CSf2-b
2638 Name => 'MultiSelectorPlaybackMode',
2639 Mask => 0x30,
2640 PrintConv => {
2641 0x00 => 'Thumbnail On/Off',
2642 0x10 => 'View Histograms',
2643 0x20 => 'Zoom On/Off',
2644 0x30 => 'Choose Folder',
2645 },
2646 },
2647 27.3 => { # CSf2-b2
2648 Name => 'InitialZoomSetting',
2649 Mask => 0x0c,
2650 PrintConv => { #1
2651 0x00 => 'Low Magnification',
2652 0x04 => 'Medium Magnification',
2653 0x08 => 'High Magnification',
2654 },
2655 },
2656 27.4 => { # CSf3
2657 Name => 'MultiSelector',
2658 Mask => 0x01,
2659 PrintConv => {
2660 0x00 => 'Do Nothing',
2661 0x01 => 'Reset Meter-off Delay',
2662 },
2663 },
2664 28.1 => { # CSf5-a
2665 Name => 'FuncButton',
2666 Mask => 0xf8,
2667 PrintConv => {
2668 0x00 => 'None',
2669 0x08 => 'Preview',
2670 0x10 => 'FV Lock',
2671 0x18 => 'AE/AF Lock',
2672 0x20 => 'AE Lock Only',
2673 0x28 => 'AE Lock (reset on release)',
2674 0x30 => 'AE Lock (hold)',
2675 0x38 => 'AF Lock Only',
2676 # 0x40 not used
2677 0x48 => 'Flash Off',
2678 0x50 => 'Bracketing Burst',
2679 0x58 => 'Matrix Metering',
2680 0x60 => 'Center-weighted Metering',
2681 0x68 => 'Spot Metering',
2682 0x70 => 'My Menu Top',
2683 0x78 => 'Live View',
2684 0x80 => '+ NEF (RAW)',
2685 0x88 => 'Virtual Horizon',
2686 },
2687 },
2688 29.1 => { # CSf6-a
2689 Name => 'PreviewButton',
2690 Mask => 0xf8,
2691 PrintConv => {
2692 0x00 => 'None',
2693 0x08 => 'Preview',
2694 0x10 => 'FV Lock',
2695 0x18 => 'AE/AF Lock',
2696 0x20 => 'AE Lock Only',
2697 0x28 => 'AE Lock (reset on release)',
2698 0x30 => 'AE Lock (hold)',
2699 0x38 => 'AF Lock Only',
2700 0x40 => 'AF-ON',
2701 0x48 => 'Flash Off',
2702 0x50 => 'Bracketing Burst',
2703 0x58 => 'Matrix Metering',
2704 0x60 => 'Center-weighted Metering',
2705 0x68 => 'Spot Metering',
2706 0x70 => 'My Menu Top',
2707 0x78 => 'Live View',
2708 0x80 => '+ NEF (RAW)',
2709 0x88 => 'Virtual Horizon',
2710 },
2711 },
2712 30.1 => { # CSf7-a
2713 Name => 'AELockButton',
2714 Notes => 'D300',
2715 Mask => 0xf8,
2716 PrintConv => {
2717 0x00 => 'None',
2718 0x08 => 'Preview',
2719 0x10 => 'FV Lock',
2720 0x18 => 'AE/AF Lock',
2721 0x20 => 'AE Lock Only',
2722 0x28 => 'AE Lock (reset on release)',
2723 0x30 => 'AE Lock (hold)',
2724 0x38 => 'AF Lock Only',
2725 0x40 => 'AF-ON',
2726 0x48 => 'Flash Off',
2727 0x50 => 'Bracketing Burst',
2728 0x58 => 'Matrix Metering',
2729 0x60 => 'Center-weighted Metering',
2730 0x68 => 'Spot Metering',
2731 0x70 => 'My Menu Top',
2732 0x78 => 'Live View',
2733 0x80 => '+ NEF (RAW)',
2734 0x88 => 'Virtual Horizon',
2735 },
2736 },
2737 31.1 => { # CSf5-b
2738 Name => 'FuncButtonPlusDials',
2739 Mask => 0x70,
2740 PrintConv => {
2741 0x00 => 'None',
2742 0x10 => 'Choose Image Area',
2743 0x20 => 'One Step Speed/Aperture',
2744 0x30 => 'Choose Non-CPU Lens Number',
2745 # n/a 0x40 => 'Focus Point Selection',
2746 0x50 => 'Auto bracketing',
2747 0x60 => 'Dynamic AF Area',
2748 0x70 => 'Shutter speed & Aperture lock',
2749 },
2750 },
2751 31.2 => { # CSf6-b
2752 Name => 'PreviewButtonPlusDials',
2753 Mask => 0x07,
2754 PrintConv => {
2755 0x00 => 'None',
2756 0x01 => 'Choose Image Area',
2757 0x02 => 'One Step Speed/Aperture',
2758 0x03 => 'Choose Non-CPU Lens Number',
2759 # n/a 0x04 => 'Focus Point Selection',
2760 0x05 => 'Auto bracketing',
2761 0x06 => 'Dynamic AF Area',
2762 0x07 => 'Shutter speed & Aperture lock',
2763 },
2764 },
2765 32.1 => { # CSf7-b
2766 Name => 'AELockButtonPlusDials',
2767 Mask => 0x70,
2768 PrintConv => {
2769 0x00 => 'None',
2770 0x10 => 'Choose Image Area',
2771 0x20 => 'One Step Speed/Aperture',
2772 0x30 => 'Choose Non-CPU Lens Number',
2773 # n/a 0x40 => 'Focus Point Selection',
2774 0x50 => 'Auto bracketing',
2775 0x60 => 'Dynamic AF Area',
2776 0x70 => 'Shutter speed & Aperture lock',
2777 },
2778 },
2779 33.1 => { # CSf9-a
2780 Name => 'CommandDialsReverseRotation',
2781 Mask => 0x80,
2782 PrintConv => { 0x00 => 'No', 0x80 => 'Yes' },
2783 },
2784 33.2 => { # CSf9-b
2785 Name => 'CommandDialsChangeMainSub',
2786 Mask => 0x40,
2787 PrintConv => { 0x00 => 'Off', 0x40 => 'On' },
2788 },
2789 33.3 => { # CSf9-c
2790 Name => 'CommandDialsApertureSetting',
2791 Mask => 0x20,
2792 PrintConv => {
2793 0x00 => 'Sub-command Dial',
2794 0x20 => 'Aperture Ring',
2795 },
2796 },
2797 33.4 => { # CSf9-d
2798 Name => 'CommandDialsMenuAndPlayback',
2799 Mask => 0x10,
2800 PrintConv => { 0x00 => 'Off', 0x10 => 'On' },
2801 },
2802 33.5 => { # CSf12
2803 Name => 'ReverseIndicators',
2804 Mask => 0x08,
2805 PrintConv => {
2806 0x00 => '+ 0 -',
2807 0x08 => '- 0 +',
2808 },
2809 },
2810 33.6 => { # CSf4
2811 Name => 'PhotoInfoPlayback',
2812 Mask => 0x04,
2813 PrintConv => { 0x00 => 'Off', 0x04 => 'On' },
2814 },
2815 33.7 => { # CSf11
2816 Name => 'NoMemoryCard',
2817 Mask => 0x02,
2818 PrintConv => {
2819 0x00 => 'Release Locked',
2820 0x02 => 'Enable Release',
2821 },
2822 },
2823 33.8 => { # CSf10
2824 Name => 'ReleaseButtonToUseDial',
2825 Mask => 0x01,
2826 PrintConv => { 0x00 => 'No', 0x01 => 'Yes' },
2827 },
2828);
2829
2830# D5000 custom settings (ref PH)
2831%Image::ExifTool::NikonCustom::SettingsD5000 = (
2832 PROCESS_PROC => \&Image::ExifTool::ProcessBinaryData,
2833 WRITE_PROC => \&Image::ExifTool::WriteBinaryData,
2834 CHECK_PROC => \&Image::ExifTool::CheckBinaryData,
2835 WRITABLE => 1,
2836 FIRST_ENTRY => 0,
2837 GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
2838 NOTES => 'Custom settings for the D5000.',
2839 # Missing/Incomplete settings:
2840 # CSd7 - LiveViewDisplayOptions [couldn't find in data - try again with live view shots]
2841 0.1 => { # CSa1
2842 Name => 'AFAreaModeSetting',
2843 Mask => 0x60,
2844 PrintConv => {
2845 0x00 => 'Single Area',
2846 0x20 => 'Dynamic Area',
2847 0x40 => 'Auto-area',
2848 0x60 => '3D-tracking (11 points)',
2849 },
2850 },
2851 0.2 => { # CSa2
2852 Name => 'AFAssist',
2853 Mask => 0x01,
2854 PrintConv => {
2855 0 => 'On',
2856 1 => 'Off',
2857 },
2858 },
2859 2.1 => { # CSd1
2860 Name => 'Beep',
2861 Mask => 0xc0,
2862 PrintConv => {
2863 0x00 => 'Off',
2864 0x40 => 'Low',
2865 0x80 => 'High',
2866 },
2867 },
2868 2.2 => { # CSd2
2869 Name => 'GridDisplay',
2870 Mask => 0x02,
2871 PrintConv => {
2872 0x00 => 'On',
2873 0x02 => 'Off',
2874 },
2875 },
2876 2.3 => { # CSd3
2877 Name => 'ISODisplay',
2878 Mask => 0x08,
2879 PrintConv => {
2880 0x08 => 'Off',
2881 0x00 => 'On',
2882 },
2883 },
2884 2.4 => { # CSf4
2885 Name => 'NoMemoryCard',
2886 Mask => 0x20,
2887 PrintConv => {
2888 0x00 => 'Release Locked',
2889 0x20 => 'Enable Release',
2890 },
2891 },
2892 3.1 => { # CSd4
2893 Name => 'FileNumberSequence',
2894 Mask => 0x08,
2895 PrintConv => { 0x00 => 'On', 0x08 => 'Off' },
2896 },
2897 4.1 => { # CSa4
2898 Name => 'RangeFinder',
2899 Mask => 0x10,
2900 PrintConv => { 0x00 => 'Off', 0x10 => 'On' },
2901 },
2902 4.2 => { # CSd6
2903 Name => 'DateImprint',
2904 Mask => 0x08,
2905 PrintConv => {
2906 0x00 => 'Off',
2907 0x08 => 'On',
2908 },
2909 },
2910 4.3 => { # CSf5
2911 Name => 'ReverseIndicators',
2912 Mask => 0x80,
2913 PrintConv => {
2914 0x00 => '+ 0 -',
2915 0x80 => '- 0 +',
2916 },
2917 },
2918 5.1 => { # CSb1
2919 Name => 'EVStepSize',
2920 Mask => 0x40,
2921 PrintConv => {
2922 0x00 => '1/3 EV',
2923 0x40 => '1/2 EV',
2924 },
2925 },
2926 9.1 => { # CSd5
2927 Name => 'ExposureDelayMode',
2928 Mask => 0x40,
2929 PrintConv => {
2930 0x00 => 'Off',
2931 0x40 => 'On',
2932 },
2933 },
2934 11.1 => { # CSe2
2935 Name => 'AutoBracketSet',
2936 Mask => 0xc0,
2937 PrintConv => {
2938 0x00 => 'Exposure',
2939 0x40 => 'Active D-Lighting', #(NC)
2940 0x80 => 'WB Bracketing',
2941 },
2942 },
2943 12.1 => { # CSf1
2944 Name => 'TimerFunctionButton',
2945 Mask => 0x38,
2946 PrintConv => {
2947 0x00 => 'Self-timer',
2948 0x08 => 'Release Mode',
2949 0x10 => 'Image Quality/Size', #(NC)
2950 0x18 => 'ISO', #(NC)
2951 0x20 => 'White Balance', #(NC)
2952 0x28 => 'Active D-Lighting', #(NC)
2953 0x30 => '+ NEF (RAW)',
2954 0x38 => 'Auto Bracketing',
2955 },
2956 },
2957 15.1 => { # CSf2
2958 Name => 'AELockButton',
2959 Mask => 0x38,
2960 PrintConv => {
2961 0x00 => 'AE/AF Lock',
2962 0x08 => 'AE Lock Only', #(NC)
2963 0x10 => 'AF Lock Only', #(NC)
2964 0x18 => 'AE Lock (hold)',
2965 0x20 => 'AF-ON',
2966 },
2967 },
2968 16.1 => { # CSc1
2969 Name => 'ShutterReleaseButtonAE-L',
2970 Mask => 0x02,
2971 PrintConv => { 0x00 => 'Off', 0x02 => 'On' },
2972 },
2973 16.2 => { # CSf3
2974 Name => 'CommandDialsReverseRotation',
2975 Mask => 0x80,
2976 PrintConv => { 0x00 => 'No', 0x80 => 'Yes' },
2977 },
2978 17.1 => { # CSc2-c
2979 Name => 'MeteringTime',
2980 Mask => 0x70,
2981 PrintConv => {
2982 0x00 => '4 s',
2983 0x10 => '8 s',
2984 0x20 => '20 s',
2985 0x30 => '1 min',
2986 0x40 => '30 min',
2987 },
2988 },
2989 17.2 => { # CSc4
2990 Name => 'RemoteOnDuration',
2991 Mask => 0x03,
2992 PrintConv => {
2993 0x00 => '1 min',
2994 0x01 => '5 min',
2995 0x02 => '10 min',
2996 0x03 => '15 min',
2997 },
2998 },
2999 18.1 => { # CSc3-a
3000 Name => 'SelfTimerTime',
3001 Mask => 0xc0,
3002 PrintConv => {
3003 0x00 => '2 s',
3004 0x40 => '5 s',
3005 0x80 => '10 s',
3006 0xc0 => '20 s',
3007 },
3008 },
3009 18.2 => { # CSc3-b
3010 Name => 'SelfTimerShotCount',
3011 Mask => 0x1e,
3012 ValueConv => '$val >> 1',
3013 ValueConvInv => '$val << 1',
3014 },
3015 19.1 => { # CSc2-b
3016 Name => 'ImageReviewTime',
3017 Mask => 0xe0,
3018 PrintConv => {
3019 0x00 => '4 s',
3020 0x20 => '8 s',
3021 0x40 => '20 s',
3022 0x60 => '1 min',
3023 0x80 => '10 min',
3024 },
3025 },
3026 20.1 => { # CSc2-a
3027 Name => 'PlaybackMenusTime',
3028 Mask => 0xe0,
3029 PrintConv => {
3030 0x00 => '8 s',
3031 0x20 => '12 s',
3032 0x40 => '20 s',
3033 0x60 => '1 min',
3034 0x80 => '10 min',
3035 },
3036 },
3037 22.1 => { # CSe1-a
3038 Name => 'InternalFlash',
3039 Mask => 0xc0,
3040 PrintConv => {
3041 0x00 => 'TTL',
3042 0x40 => 'Manual',
3043 },
3044 },
3045 22.2 => { # CSe1-b
3046 Name => 'ManualFlashOutput',
3047 Mask => 0x1f,
3048 ValueConv => '2 ** (-$val/3)',
3049 ValueConvInv => '$val > 0 ? -3*log($val)/log(2) : 0',
3050 PrintConv => q{
3051 return 'Full' if $val > 0.99;
3052 Image::ExifTool::Exif::PrintExposureTime($val);
3053 },
3054 PrintConvInv => '$val=~/F/i ? 1 : Image::ExifTool::Exif::ConvertFraction($val)',
3055 },
3056 32.1 => { # CSa3
3057 Name => 'LiveViewAF',
3058 Mask => 0x60,
3059 PrintConv => {
3060 0x00 => 'Face Priority',
3061 0x20 => 'Wide Area',
3062 0x40 => 'Normal Area',
3063 0x60 => 'Subject Tracking',
3064 },
3065 },
3066);
3067
3068# D7000 custom settings (ref 2)
3069%Image::ExifTool::NikonCustom::SettingsD7000 = (
3070 PROCESS_PROC => \&Image::ExifTool::ProcessBinaryData,
3071 WRITE_PROC => \&Image::ExifTool::WriteBinaryData,
3072 CHECK_PROC => \&Image::ExifTool::CheckBinaryData,
3073 WRITABLE => 1,
3074 FIRST_ENTRY => 0,
3075 DATAMEMBER => [ 23.1 ],
3076 GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
3077 NOTES => 'Custom settings for the D7000.',
3078 0.1 => { # CSa1
3079 Name => 'AF-CPrioritySelection',
3080 Mask => 0x80,
3081 PrintConv => {
3082 0x00 => 'Release',
3083 0x80 => 'Focus',
3084 },
3085 },
3086 0.2 => { # CSa2
3087 Name => 'AF-SPrioritySelection',
3088 Mask => 0x20,
3089 PrintConv => {
3090 0x00 => 'Focus',
3091 0x20 => 'Release',
3092 },
3093 },
3094 0.3 => { # CSa6
3095 Name => 'NumberOfFocusPoints',
3096 Mask => 0x10,
3097 PrintConv => {
3098 0x00 => '39 Points',
3099 0x10 => '11 Points',
3100 },
3101 },
3102 0.4 => { # CSa3
3103 Name => 'FocusTrackingLockOn',
3104 Mask => 0x07,
3105 PrintConv => {
3106 0x05 => '5 Long',
3107 0x04 => '4',
3108 0x03 => '3 Normal',
3109 0x02 => '2',
3110 0x01 => '1 Short',
3111 0x00 => 'Off',
3112 },
3113 },
3114 1.2 => { # CSa5
3115 Name => 'FocusPointWrap',
3116 Mask => 0x08,
3117 PrintConv => {
3118 0x00 => 'No Wrap',
3119 0x08 => 'Wrap',
3120 },
3121 },
3122 1.3 => { # CSa4
3123 Name => 'AFPointIllumination',
3124 Mask => 0x06,
3125 PrintConv => {
3126 0x00 => 'Auto',
3127 0x02 => 'On',
3128 0x04 => 'Off',
3129 },
3130 },
3131 1.4 => { # CSa7
3132 Name => 'AFAssist',
3133 Mask => 0x01,
3134 PrintConv => { 0x00 => 'On', 0x01 => 'Off' },
3135 },
3136 2.1 => { # CSd14
3137 Name => 'BatteryOrder',
3138 Mask => 0x40,
3139 PrintConv => {
3140 0x00 => 'MB-D11 First',
3141 0x40 => 'Camera Battery First',
3142 },
3143 },
3144 2.2 => { # CSa10
3145 Name => 'AF-OnForMB-D11',
3146 Mask => 0x1c,
3147 PrintConv => {
3148 0x00 => 'AE/AF Lock',
3149 0x04 => 'AE Lock Only',
3150 0x08 => 'AF Lock Only',
3151 0x0c => 'AE Lock (hold)',
3152 0x10 => 'AF-ON',
3153 0x14 => 'FV Lock',
3154 0x18 => 'Same as FUNC Button',
3155 },
3156 },
3157 2.3 => { # CSd13
3158 Name => 'MB-D11BatteryType',
3159 Mask => 0x03,
3160 PrintConv => {
3161 0x00 => 'LR6 (AA alkaline)',
3162 0x01 => 'Ni-MH (AA Ni-MH)',
3163 0x02 => 'FR6 (AA lithium)',
3164 },
3165 },
3166 3.1 => { # CSd1-b
3167 Name => 'BeepPitch',
3168 Mask => 0xc0,
3169 PrintConv => {
3170 0x00 => 'Off',
3171 0x40 => 'Low',
3172 0x80 => 'High',
3173 },
3174 },
3175 3.2 => { # CSf8
3176 Name => 'NoMemoryCard',
3177 Mask => 0x20,
3178 PrintConv => {
3179 0x00 => 'Release Locked',
3180 0x20 => 'Enable Release',
3181 },
3182 },
3183 3.3 => { # CSd3
3184 Name => 'ISODisplay',
3185 Mask => 0x0c,
3186 PrintConv => {
3187 0x00 => 'Show ISO/Easy ISO',
3188 0x04 => 'Show ISO Sensitivity',
3189 0x0c => 'Show Frame Count',
3190 },
3191 },
3192 3.4 => { # CSd2
3193 Name => 'GridDisplay',
3194 Mask => 0x02,
3195 PrintConv => { 0x00 => 'On', 0x02 => 'Off' },
3196 },
3197 3.5 => { # CSd4
3198 Name => 'ViewfinderWarning',
3199 Mask => 0x01,
3200 PrintConv => { 0x00 => 'On', 0x01 => 'Off' },
3201 },
3202 4.1 => { # CSd9
3203 Name => 'ShootingInfoDisplay',
3204 Mask => 0xc0,
3205 PrintConv => {
3206 0x00 => 'Auto',
3207 0x80 => 'Manual (dark on light)',
3208 0xc0 => 'Manual (light on dark)',
3209 },
3210 },
3211 4.2 => { # CSd10
3212 Name => 'LCDIllumination',
3213 Mask => 0x20,
3214 PrintConv => { 0x00 => 'Off', 0x20 => 'On' },
3215 },
3216 4.3 => { # CSd8
3217 Name => 'FileNumberSequence',
3218 Mask => 0x08,
3219 PrintConv => { 0x00 => 'On', 0x08 => 'Off' },
3220 },
3221 4.4 => { # CSd5
3222 Name => 'ScreenTips',
3223 Mask => 0x04,
3224 PrintConv => { 0x00 => 'Off', 0x04 => 'On' },
3225 },
3226 4.5 => { # CSd1-a
3227 Name => 'BeepVolume',
3228 Mask => 0x03,
3229 PrintConv => {
3230 0x00 => 'Off',
3231 0x01 => '1',
3232 0x02 => '2',
3233 0x03 => '3',
3234 },
3235 },
3236 5.1 => { # CSf9
3237 Name => 'ReverseIndicators',
3238 Mask => 0x80,
3239 PrintConv => {
3240 0x00 => '+ 0 -',
3241 0x80 => '- 0 +',
3242 },
3243 },
3244 5.2 => { # CSb3
3245 Name => 'EasyExposureCompensation',
3246 Mask => 0x03,
3247 PrintConv => {
3248 0x00 => 'Off',
3249 0x01 => 'On',
3250 0x02 => 'On Auto Reset',
3251 },
3252 },
3253 6.1 => { # CSb2
3254 Name => 'ExposureControlStep',
3255 Mask => 0x40,
3256 PrintConv => {
3257 0x00 => '1/3 EV',
3258 0x40 => '1/2 EV',
3259 },
3260 },
3261 6.2 => { # CSb1
3262 Name => 'ISOSensitivityStep',
3263 Mask => 0x10,
3264 PrintConv => {
3265 0x00 => '1/3 EV',
3266 0x10 => '1/2 EV',
3267 },
3268 },
3269 7.1 => { # CSb4
3270 Name => 'CenterWeightedAreaSize',
3271 Mask => 0xe0,
3272 PrintConv => {
3273 0x00 => '6 mm',
3274 0x20 => '8 mm',
3275 0x40 => '10 mm',
3276 0x60 => '13 mm',
3277 0x80 => 'Average',
3278 },
3279 },
3280 10.1 => { # CSd11
3281 Name => 'ExposureDelayMode',
3282 Mask => 0x40,
3283 PrintConv => {
3284 0x00 => 'Off',
3285 0x40 => 'On',
3286 },
3287 },
3288 10.2 => { # CSd6
3289 Name => 'CLModeShootingSpeed',
3290 Mask => 0x07,
3291 PrintConv => '"$val fps"',
3292 PrintConvInv => '$val=~s/\s*fps//i; $val',
3293 },
3294 11 => { # CSd7
3295 Name => 'MaxContinuousRelease',
3296 # values: 1-100
3297 },
3298 12.1 => { # CSe5
3299 Name => 'AutoBracketSet',
3300 Mask => 0xe0, #(NC)
3301 PrintConv => {
3302 0x00 => 'AE & Flash', # default
3303 0x20 => 'AE Only',
3304 0x40 => 'Flash Only', #(NC)
3305 0x60 => 'WB Bracketing', #(NC)
3306 0x80 => 'Active D-Lighting', #(NC)
3307 },
3308 },
3309 12.2 => { # CSe6
3310 Name => 'AutoBracketOrder',
3311 Mask => 0x10,
3312 PrintConv => {
3313 0x00 => '0,-,+',
3314 0x10 => '-,0,+',
3315 },
3316 },
3317 13.1 => { # CSf3
3318 Name => 'FuncButton',
3319 Mask => 0xf8,
3320 PrintConv => {
3321 0x00 => 'Grid Display',
3322 0x08 => 'FV Lock',
3323 0x10 => 'Flash Off',
3324 0x18 => 'Matrix Metering',
3325 0x20 => 'Center-weighted Metering',
3326 0x28 => 'Spot Metering',
3327 0x30 => 'My Menu Top',
3328 0x38 => '+ NEF (RAW)',
3329 0x40 => 'Active D-Lighting',
3330 0x48 => 'Preview',
3331 0x50 => 'AE/AF Lock',
3332 0x58 => 'AE Lock Only',
3333 0x60 => 'AF Lock Only',
3334 0x68 => 'AE Lock (hold)',
3335 0x70 => 'Bracketing Burst',
3336 0x78 => 'Playback',
3337 0x80 => '1EV Step Speed/Aperture',
3338 0x88 => 'Choose Non-CPU Lens',
3339 0x90 => 'Virtual Horizon',
3340 0x98 => 'Start Movie Recording',
3341 },
3342 },
3343 14.1 => { # CSf4
3344 Name => 'PreviewButton',
3345 Mask => 0xf8,
3346 PrintConv => {
3347 0x00 => 'Grid Display',
3348 0x08 => 'FV Lock',
3349 0x10 => 'Flash Off',
3350 0x18 => 'Matrix Metering',
3351 0x20 => 'Center-weighted Metering',
3352 0x28 => 'Spot Metering',
3353 0x30 => 'My Menu Top',
3354 0x38 => '+ NEF (RAW)',
3355 0x40 => 'Active D-Lighting',
3356 0x48 => 'Preview',
3357 0x50 => 'AE/AF Lock',
3358 0x58 => 'AE Lock Only',
3359 0x60 => 'AF Lock Only',
3360 0x68 => 'AE Lock (hold)',
3361 0x70 => 'Bracketing Burst',
3362 0x78 => 'Playback',
3363 0x80 => '1EV Step Speed/Aperture',
3364 0x88 => 'Choose Non-CPU Lens',
3365 0x90 => 'Virtual Horizon',
3366 0x98 => 'Start Movie Recording',
3367 },
3368 },
3369 16.1 => { # CSf5
3370 Name => 'AELockButton',
3371 Mask => 0x38,
3372 PrintConv => {
3373 0x00 => 'AE/AF Lock',
3374 0x08 => 'AE Lock Only',
3375 0x10 => 'AF Lock Only',
3376 0x18 => 'AE Lock (hold)',
3377 0x20 => 'AF-ON',
3378 0x28 => 'FV Lock',
3379 },
3380 },
3381 15.1 => { # CSf2
3382 Name => 'OKButton',
3383 Mask => 0x18,
3384 PrintConv => {
3385 0x08 => 'Select Center Focus Point',
3386 0x10 => 'Highlight Active Focus Point',
3387 0x18 => 'Not Used', #(NC)
3388 0x00 => 'Off', #(NC)
3389 },
3390 },
3391 17.1 => { # CSf6-a
3392 Name => 'CommandDialsReverseRotation',
3393 Mask => 0x80,
3394 PrintConv => { 0x00 => 'No', 0x80 => 'Yes' },
3395 },
3396 17.2 => { # CSf6-b
3397 Name => 'CommandDialsChangeMainSub',
3398 Mask => 0x60,
3399 PrintConv => {
3400 0x00 => 'Off',
3401 0x20 => 'On',
3402 0x40 => 'On (A mode only)',
3403 },
3404 },
3405 17.3 => { # CSf6-c
3406 Name => 'CommandDialsApertureSetting',
3407 Mask => 0x04,
3408 PrintConv => {
3409 0x00 => 'Sub-command Dial',
3410 0x04 => 'Aperture Ring',
3411 },
3412 },
3413 17.4 => { # CSf6-d
3414 Name => 'CommandDialsMenuAndPlayback',
3415 Mask => 0x18,
3416 PrintConv => {
3417 0x00 => 'On',
3418 0x10 => 'On (Image Review Exclude)',
3419 0x08 => 'Off',
3420 },
3421 },
3422 17.5 => { # CSc1
3423 Name => 'ShutterReleaseButtonAE-L',
3424 Mask => 0x02,
3425 PrintConv => { 0x00 => 'Off', 0x02 => 'On' },
3426 },
3427 17.6 => { # CSf7
3428 Name => 'ReleaseButtonToUseDial',
3429 Mask => 0x01,
3430 PrintConv => { 0x00 => 'No', 0x01 => 'Yes' },
3431 },
3432 18.1 => { # CSc2
3433 Name => 'MeteringTime',
3434 Mask => 0xf0,
3435 PrintConvColumns => 2,
3436 PrintConv => {
3437 0x00 => '4 s',
3438 0x10 => '6 s', # default
3439 0x20 => '8 s',
3440 0x30 => '16 s',
3441 0x40 => '30 s',
3442 0x50 => '1 min',
3443 0x60 => '5 min',
3444 0x70 => '10 min',
3445 0x80 => '30 min',
3446 0x90 => 'No Limit',
3447 },
3448 },
3449 18.2 => { # CSc5
3450 Name => 'RemoteOnDuration',
3451 Mask => 0x03,
3452 PrintConv => {
3453 0x00 => '1 min',
3454 0x01 => '5 min',
3455 0x02 => '10 min',
3456 0x03 => '15 min',
3457 },
3458 },
3459 19.1 => { # CSc3-a
3460 Name => 'SelfTimerTime',
3461 Mask => 0xc0,
3462 PrintConv => {
3463 0x00 => '2 s',
3464 0x40 => '5 s',
3465 0x80 => '10 s', # default
3466 0xc0 => '20 s',
3467 },
3468 },
3469 19.2 => { # CSc3-c
3470 Name => 'SelfTimerInterval',
3471 Mask => 0x30,
3472 PrintConv => {
3473 0x00 => '0.5 s',
3474 0x10 => '1 s',
3475 0x20 => '2 s', # default
3476 0x30 => '3 s',
3477 },
3478 },
3479 19.3 => { # CSc3-b
3480 Name => 'SelfTimerShotCount',
3481 Mask => 0x0f,
3482 },
3483 20.1 => { # CSc4-d
3484 Name => 'ImageReviewTime',
3485 Mask => 0xe0,
3486 PrintConv => { # (NC)
3487 0x00 => '4 s',
3488 0x20 => '10 s', # default
3489 0x40 => '20 s',
3490 0x60 => '1 min',
3491 0x80 => '5 min',
3492 0xa0 => '10 min',
3493 },
3494 },
3495 20.2 => { # CSc4-e
3496 Name => 'LiveViewMonitorOffTime',
3497 Mask => 0x1c,
3498 PrintConv => { # (NC)
3499 0x00 => '4 s',
3500 0x04 => '10 s', # default
3501 0x08 => '20 s',
3502 0x0c => '1 min',
3503 0x10 => '5 min',
3504 0x14 => '10 min',
3505 },
3506 },
3507 21.1 => { # CSc4-b
3508 Name => 'MenuMonitorOffTime',
3509 Mask => 0xe0,
3510 PrintConv => {
3511 0x00 => '4 s',
3512 0x20 => '10 s', # default
3513 0x40 => '20 s',
3514 0x60 => '1 min',
3515 0x80 => '5 min',
3516 0xa0 => '10 min',
3517 },
3518 },
3519 21.2 => { # CSc4-c
3520 Name => 'ShootingInfoMonitorOffTime',
3521 Mask => 0x1c,
3522 PrintConv => { # (NC)
3523 0x00 => '4 s',
3524 0x04 => '10 s', # default
3525 0x08 => '20 s',
3526 0x0c => '1 min',
3527 0x10 => '5 min',
3528 0x14 => '10 min',
3529 },
3530 },
3531 22.1 => { # CSe1
3532 Name => 'FlashSyncSpeed',
3533 Mask => 0xf0,
3534 PrintConv => {
3535 0x00 => '1/320 s (auto FP)',
3536 0x10 => '1/250 s (auto FP)',
3537 0x20 => '1/250 s',
3538 0x30 => '1/200 s',
3539 0x40 => '1/160 s',
3540 0x50 => '1/125 s',
3541 0x60 => '1/100 s',
3542 0x70 => '1/80 s',
3543 0x80 => '1/60 s',
3544 },
3545 },
3546 22.2 => { # CSe2
3547 Name => 'FlashShutterSpeed',
3548 Mask => 0x0f,
3549 PrintConvColumns => 2,
3550 PrintConv => {
3551 0x00 => '1/60 s',
3552 0x01 => '1/30 s',
3553 0x02 => '1/15 s',
3554 0x03 => '1/8 s',
3555 0x04 => '1/4 s',
3556 0x05 => '1/2 s',
3557 0x06 => '1 s',
3558 0x07 => '2 s',
3559 0x08 => '4 s',
3560 0x09 => '8 s',
3561 0x0a => '15 s',
3562 0x0b => '30 s',
3563 },
3564 },
3565 23.1 => { # CSe3
3566 Name => 'FlashControlBuilt-in',
3567 Mask => 0xc0,
3568 RawConv => '$$self{FlashControlBuiltin} = $val & 0xc0',
3569 PrintConv => {
3570 0x00 => 'TTL',
3571 0x40 => 'Manual',
3572 0x80 => 'Repeating Flash',
3573 0xc0 => 'Commander Mode',
3574 },
3575 },
3576 23.2 => { # CSe3-b
3577 Name => 'ManualFlashOutput',
3578 Condition => '$$self{FlashControlBuiltin} == 0x40',
3579 Mask => 0x1f,
3580 ValueConv => '2 ** (-$val/3)',
3581 ValueConvInv => '$val > 0 ? -3*log($val)/log(2) : 0',
3582 PrintConv => q{
3583 return 'Full' if $val > 0.99;
3584 Image::ExifTool::Exif::PrintExposureTime($val);
3585 },
3586 PrintConvInv => '$val=~/F/i ? 1 : Image::ExifTool::Exif::ConvertFraction($val)',
3587 },
3588 24.1 => { # CSe3-ca
3589 Name => 'RepeatingFlashOutput',
3590 Condition => '$$self{FlashControlBuiltin} == 0x80',
3591 Mask => 0x70,
3592 ValueConv => '2 ** (-($val>>4)-2)',
3593 ValueConvInv => '$val > 0 ? int(-log($val)/log(2)-2+0.5)<<4 : 0',
3594 PrintConv => 'Image::ExifTool::Exif::PrintExposureTime($val)',
3595 PrintConvInv => 'Image::ExifTool::Exif::ConvertFraction($val)',
3596 },
3597 24.2 => { # CSe3-cb
3598 Name => 'RepeatingFlashCount',
3599 Condition => '$$self{FlashControlBuiltin} == 0x80',
3600 Mask => 0x0f,
3601 ValueConv => '$val < 10 ? $val + 1 : 5 * ($val - 7)',
3602 ValueConvInv => '$val <= 10 ? $val - 1 : $val / 5 + 7',
3603 },
3604 25.1 => { # CSe3-cc (NC)
3605 Name => 'RepeatingFlashRate',
3606 Condition => '$$self{FlashControlBuiltin} == 0x80',
3607 Mask => 0xf0,
3608 ValueConv => 'my $v=($val>>4); $v < 10 ? $v + 1 : 10 * ($v - 8)',
3609 ValueConvInv => 'int(($val <= 10 ? $val - 1 : $val / 10 + 8) + 0.5) << 4',
3610 PrintConv => '"$val Hz"',
3611 PrintConvInv => '$val=~/(\d+)/; $1 || 0',
3612 },
3613 26.1 => { # CSe3-da
3614 Name => 'CommanderInternalTTLCompBuiltin',
3615 Condition => '$$self{FlashControlBuiltin} == 0xc0',
3616 Mask => 0x1f,
3617 ValueConv => '($val - 9) / 3',
3618 ValueConvInv => '$val * 3 + 9',
3619 PrintConv => '$val ? sprintf("%+.1f",$val) : 0',
3620 PrintConvInv => '$val',
3621 },
3622 27.1 => { # CSe3-db
3623 Name => 'CommanderInternalTTLCompGroupA',
3624 Condition => '$$self{FlashControlBuiltin} == 0xc0',
3625 Mask => 0x1f,
3626 ValueConv => '($val - 9) / 3',
3627 ValueConvInv => '$val * 3 + 9',
3628 PrintConv => '$val ? sprintf("%+.1f",$val) : 0',
3629 PrintConvInv => '$val',
3630 },
3631 28.1 => { # CSe3-dc
3632 Name => 'CommanderInternalTTLCompGroupB',
3633 Condition => '$$self{FlashControlBuiltin} == 0xc0',
3634 Mask => 0x1f,
3635 ValueConv => '($val - 9) / 3',
3636 ValueConvInv => '$val * 3 + 9',
3637 PrintConv => '$val ? sprintf("%+.1f",$val) : 0',
3638 PrintConvInv => '$val',
3639 },
3640 30.1 => { # CSd11
3641 Name => 'FlashWarning',
3642 Mask => 0x80,
3643 PrintConv => {
3644 0x00 => 'On',
3645 0x80 => 'Off',
3646 },
3647 },
3648 30.2 => { # CSe4
3649 Name => 'ModelingFlash',
3650 Mask => 0x20,
3651 PrintConv => { 0x00 => 'On', 0x20 => 'Off' },
3652 },
3653 34.1 => { # CSa8-b
3654 Name => 'LiveViewAFAreaMode',
3655 Mask => 0x60,
3656 PrintConv => {
3657 0x00 => 'Face-Priority',
3658 0x20 => 'NormalArea',
3659 0x40 => 'WideArea',
3660 0x60 => 'SubjectTracking',
3661 },
3662 },
3663 34.2 => { # CSa8-a
3664 Name => 'LiveViewAFMode',
3665 Mask => 0x02,
3666 PrintConv => {
3667 0x00 => 'AF-C',
3668 0x02 => 'AF-F',
3669 },
3670 },
3671 35.1 => { # CSc4-a
3672 Name => 'PlaybackMonitorOffTime',
3673 Mask => 0xe0,
3674 PrintConv => {
3675 0x00 => '4 s',
3676 0x20 => '10 s', # default
3677 0x40 => '20 s',
3678 0x60 => '1 min',
3679 0x80 => '5 min',
3680 0xa0 => '10 min',
3681 },
3682 },
3683);
3684
3685
36861; # end
3687
3688__END__
3689
3690=head1 NAME
3691
3692Image::ExifTool::NikonCustom - Read and Write Nikon custom settings
3693
3694=head1 SYNOPSIS
3695
3696This module is loaded automatically by Image::ExifTool when required.
3697
3698=head1 DESCRIPTION
3699
3700The Nikon custom functions are very specific to the camera model (and
3701sometimes even change with firmware version). The information is stored as
3702unformatted binary data in the ShotInfo record of the Nikon MakerNotes.
3703This module contains the definitions necessary for Image::ExifTool to decode
3704this information.
3705
3706=head1 AUTHOR
3707
3708Copyright 2003-2011, Phil Harvey (phil at owl.phy.queensu.ca)
3709
3710This library is free software; you can redistribute it and/or modify it
3711under the same terms as Perl itself.
3712
3713=head1 ACKNOWLEDGEMENTS
3714
3715Thanks to Jens Duttke and Warren Hatch for their help decoding the D300 and
3716D3 custom settings. And thanks to the customer service personnel at Best
3717Buy for not bugging me while I play with their cameras.
3718
3719=head1 SEE ALSO
3720
3721L<Image::ExifTool::TagNames/Nikon Tags>,
3722L<Image::ExifTool(3pm)|Image::ExifTool>
3723
3724=cut
Note: See TracBrowser for help on using the repository browser.