This source file includes following definitions.
- get_file_next_counter
- get_target_file_num
- get_target_dir_name
- get_target_dir_num
1 #include "platform.h"
2
3
4
5
6
7 #define PARAM_FILE_COUNTER 0x3A
8
9
10
11
12 const ApertureSize aperture_sizes_table[] = {
13
14 { 0, 200, "2.0" },
15 { 1, 224, "2.2" },
16 { 2, 256, "2.5" },
17 { 3, 288, "2.8" },
18 { 4, 320, "3.2" },
19 { 5, 352, "3.5" },
20 { 6, 384, "4.0" },
21 { 7, 416, "4.5" },
22 { 8, 448, "5.0" },
23 { 9, 480, "5.6" },
24 { 10, 512, "6.3" },
25 { 11, 544, "7.1" },
26 { 12, 576, "8.0" }
27 };
28
29
30 const ShutterSpeed shutter_speeds_table[] = {
31
32 { -12, -384, "15", 15000000 },
33 { -11, -352, "13", 13000000 },
34 { -10, -320, "10", 10000000 },
35 { -9, -288, "8", 8000000 },
36 { -8, -256, "6", 6000000 },
37 { -7, -224, "5", 5000000 },
38 { -6, -192, "4", 4000000 },
39 { -5, -160, "3.2", 3200000 },
40 { -4, -128, "2.5", 2500000 },
41 { -3, -96, "2", 2000000 },
42 { -2, -64, "1.6", 1600000 },
43 { -1, -32, "1.3", 1300000 },
44 { 0, 0, "1", 1000000 },
45 { 1, 32, "0.8", 800000 },
46 { 2, 64, "0.6", 600000 },
47 { 3, 96, "0.5", 500000 },
48 { 4, 128, "0.4", 400000 },
49 { 5, 160, "0.3", 300000 },
50 { 6, 192, "1/4", 250000 },
51 { 7, 224, "1/5", 200000 },
52 { 8, 256, "1/6", 166667 },
53 { 9, 288, "1/8", 125000 },
54 { 10, 320, "1/10", 100000 },
55 { 11, 352, "1/13", 76923 },
56 { 12, 384, "1/15", 66667 },
57 { 13, 416, "1/20", 50000 },
58 { 14, 448, "1/25", 40000 },
59 { 15, 480, "1/30", 33333 },
60 { 16, 512, "1/40", 25000 },
61 { 17, 544, "1/50", 20000 },
62 { 18, 576, "1/60", 16667 },
63 { 19, 608, "1/80", 12500 },
64 { 20, 640, "1/100", 10000 },
65 { 21, 672, "1/125", 8000 },
66 { 22, 704, "1/160", 6250 },
67 { 23, 736, "1/200", 5000 },
68 { 24, 768, "1/250", 4000 },
69 { 25, 800, "1/320", 3125 },
70 { 26, 832, "1/400", 2500 },
71 { 27, 864, "1/500", 2000 },
72 { 28, 896, "1/640", 1563 },
73 { 29, 928, "1/800", 1250 },
74 { 30, 960, "1/1000", 1000 },
75 { 31, 992, "1/1250", 800 },
76 { 32, 1021, "1/1600", 625 },
77 { 33, 1053, "1/2000", 500 },
78 { 34, 1088, "1/2500", 400 }
79 };
80
81
82 const ISOTable iso_table[] = {
83
84 { 0, 0, "Auto", -1},
85 { 1, 125, "125", -1},
86 { 2, 200, "200", -1},
87 { 3, 400, "400", -1},
88 { 4, 800, "800", -1},
89 { 5, 1600, "1600", -1},
90 { 6, 3200, "3200", -1}
91 };
92
93
94
95
96
97
98
99
100
101
102
103
104
105 const CapturemodeMap modemap[] = {
106 { MODE_AUTO, 32768 },
107 { MODE_P, 32772 },
108 { MODE_TV, 32771 },
109 { MODE_AV, 32770 },
110 { MODE_STITCH, 33292 },
111 { MODE_FOLIAGE, 32789 },
112 { MODE_SNOW, 32790 },
113 { MODE_BEACH, 32791 },
114 { MODE_FIREWORK, 32792 },
115 { MODE_INDOOR, 32787 },
116 { MODE_KIDS_PETS, 32786 },
117 { MODE_NIGHT_SNAPSHOT, 32781 },
118 { MODE_PORTRAIT, 32783 },
119 { MODE_LOWLIGHT, 32801 },
120 { MODE_COLOR_ACCENT, 33309 },
121 { MODE_COLOR_SWAP, 33310 },
122 { MODE_SMART_SHUTTER, 33321 },
123 { MODE_WINK_SELF_TIMER, 33322 },
124 { MODE_FACE_SELF_TIMER, 33320 },
125 { MODE_FISHEYE, 33323 },
126 { MODE_MINIATURE, 33324 },
127 { MODE_HIGHSPEED_BURST, 33288 },
128 { MODE_VIDEO_STD, 2612 },
129 { MODE_VIDEO_SUPER_SLOW, 2617 },
130 { MODE_VIDEO_COLOR_SWAP, 2611 },
131 { MODE_VIDEO_COLOR_ACCENT, 2610 },
132 };
133
134 #include "../generic/shooting.c"
135
136 const int dof_tbl[] = {5800, 6420, 7060, 7700, 8340, 9950, 11550, 13160, 14750, 17150, 19570, 22760, 26750, 30750, 34800};
137 const int dof_tbl_size = sizeof(dof_tbl)/sizeof(dof_tbl[0]);
138
139 long get_file_next_counter() {
140 return get_file_counter();
141 }
142
143 long get_target_file_num() {
144 long n;
145
146 n = get_file_next_counter();
147 n = (n>>4)&0x3FFF;
148 return n;
149 }
150
151
152 #if defined(CAM_DATE_FOLDER_NAMING)
153 void get_target_dir_name(char *out) {
154 extern void _GetImageFolder(char*,int,int,int);
155 out[0] = 'A';
156 _GetImageFolder(out+1,get_file_next_counter(),CAM_DATE_FOLDER_NAMING,time(NULL));
157 out[15] = '\0';
158 }
159 #else
160 long get_target_dir_num() {
161 long n;
162
163 n = get_file_next_counter();
164 n = (n>>18)&0x3FF;
165 return n;
166 }
167 #endif