This source file includes following definitions.
- get_file_next_counter
- get_target_file_num
- get_target_dir_name
- get_target_dir_num
- screen_opened
- screen_rotated
1 #define PARAM_FILE_COUNTER 0x38
2 #define PARAM_EXPOSURE_COUNTER 0x02
3
4 #include "platform.h"
5
6
7
8
9 const ApertureSize aperture_sizes_table[] = {
10 { 9, 293, "2.8" },
11 { 10, 320, "3.2" },
12 { 11, 352, "3.5" },
13 { 12, 384, "4.0" },
14 { 13, 416, "4.5" },
15 { 14, 448, "5.0" },
16 { 15, 480, "5.6" },
17 { 16, 512, "6.3" },
18 { 17, 544, "7.1" },
19 { 18, 576, "8.0" },
20 };
21
22
23 const ShutterSpeed shutter_speeds_table[] = {
24 { -12, -384, "15", 15000000 },
25 { -11, -352, "13", 13000000 },
26 { -10, -320, "10", 10000000 },
27 { -9, -288, "8", 8000000 },
28 { -8, -256, "6", 6000000 },
29 { -7, -224, "5", 5000000 },
30 { -6, -192, "4", 4000000 },
31 { -5, -160, "3.2", 3200000 },
32 { -4, -128, "2.5", 2500000 },
33 { -3, -96, "2", 2000000 },
34 { -2, -64, "1.6", 1600000 },
35 { -1, -32, "1.3", 1300000 },
36 { 0, 0, "1", 1000000 },
37 { 1, 32, "0.8", 800000 },
38 { 2, 64, "0.6", 600000 },
39 { 3, 96, "0.5", 500000 },
40 { 4, 128, "0.4", 400000 },
41 { 5, 160, "0.3", 300000 },
42 { 6, 192, "1/4", 250000 },
43 { 7, 224, "1/5", 200000 },
44 { 8, 256, "1/6", 166667 },
45 { 9, 288, "1/8", 125000 },
46 { 10, 320, "1/10", 100000 },
47 { 11, 352, "1/13", 76923 },
48 { 12, 384, "1/15", 66667 },
49 { 13, 416, "1/20", 50000 },
50 { 14, 448, "1/25", 40000 },
51 { 15, 480, "1/30", 33333 },
52 { 16, 512, "1/40", 25000 },
53 { 17, 544, "1/50", 20000 },
54 { 18, 576, "1/60", 16667 },
55 { 19, 608, "1/80", 12500 },
56 { 20, 640, "1/100", 10000 },
57 { 21, 672, "1/125", 8000 },
58 { 22, 704, "1/160", 6250 },
59 { 23, 736, "1/200", 5000 },
60 { 24, 768, "1/250", 4000 },
61 { 25, 800, "1/320", 3125 },
62 { 26, 832, "1/400", 2500 },
63 { 27, 864, "1/500", 2000 },
64 { 28, 896, "1/640", 1563 },
65 { 29, 928, "1/800", 1250 },
66 { 30, 960, "1/1000", 1000 },
67 { 31, 992, "1/1250", 800 },
68 { 32, 1024, "1/1600", 625 },
69 { 33, 1056, "1/2000", 500 },
70 { 34, 1088, "1/2500", 409 },
71 { 35, 1120, "1/3200", 313 },
72 { 36, 1152, "1/4000", 250 },
73 };
74
75 const ISOTable iso_table[] = {
76
77 { 0, 0, "Auto", -1},
78 { 1, 80, "80", -1},
79 { 2, 100, "100", -1},
80 { 3, 200, "200", -1},
81 { 4, 400, "400", -1},
82 { 5, 800, "800", -1},
83 { 6, 1600, "1600", -1},
84 { 7, 3200, "3200", -1},
85 };
86
87 const CapturemodeMap modemap[] = {
88 { MODE_AUTO, 32768 },
89 { MODE_P, 32772 },
90 { MODE_TV, 32771 },
91 { MODE_AV, 32770 },
92 { MODE_M, 32769 },
93
94 { MODE_VIDEO_COLOR_ACCENT, 2601 },
95 { MODE_VIDEO_COLOR_SWAP, 2602 },
96 { MODE_VIDEO_STD, 2603 },
97
98
99 { MODE_NIGHT_SNAPSHOT, 16395 },
100 { MODE_LANDSCAPE, 16396 },
101 { MODE_PORTRAIT, 16397 },
102 { MODE_NIGHT_SCENE, 16398 },
103 { MODE_KIDS_PETS, 16400 },
104 { MODE_INDOOR, 16401 },
105 { MODE_SUNSET, 16402 },
106 { MODE_FOLIAGE, 16403 },
107 { MODE_SNOW, 16404 },
108 { MODE_BEACH, 16405 },
109 { MODE_FIREWORK, 16406 },
110 { MODE_UNDERWATER, 16407 },
111 { MODE_AQUARIUM, 16408 },
112 { MODE_SPORTS, 16903 },
113 { MODE_STITCH, 16906 },
114 { MODE_COLOR_ACCENT, 16923 },
115 { MODE_COLOR_SWAP, 16924 },
116
117 { MODE_LOWLIGHT, 32799 },
118 { MODE_QUICK, 33313 }
119
120 };
121
122
123 #include "../generic/shooting.c"
124
125 const int dof_tbl[] = {7400, 8210, 9040, 9860, 10670, 12730, 14780, 16820, 18890, 21970, 25030, 29170, 36780, 44400};
126 const int dof_tbl_size = sizeof(dof_tbl)/sizeof(dof_tbl[0]);
127
128 long get_file_next_counter() {
129 return get_file_counter();
130 }
131
132 long get_target_file_num() {
133 long n;
134
135 n = get_file_next_counter();
136 n = (n>>4)&0x3FFF;
137 return n;
138 }
139
140 #if defined(CAM_DATE_FOLDER_NAMING)
141 void get_target_dir_name(char *out) {
142 extern void _GetImageFolder(char*,int,int,int);
143 out[0] = 'A';
144 _GetImageFolder(out+1,get_file_next_counter(),CAM_DATE_FOLDER_NAMING,time(NULL));
145 out[15] = '\0';
146 }
147 #else
148 long get_target_dir_num() {
149 long n;
150
151 n = get_file_next_counter();
152 n = (n>>18)&0x3FF;
153 return n;
154 }
155 #endif
156
157
158 #ifdef CAM_SWIVEL_SCREEN
159
160
161
162
163
164 int screen_opened(void)
165 {
166 if ( physw_status[2] & 0x04000000 )
167 return 1;
168 else
169 return 0;
170 }
171
172 int screen_rotated(void)
173 {
174 if ( physw_status[2] & 0x02000000 )
175 return 1;
176 else
177 return 0;
178 }
179 #endif