source: trunk/platform/a580/shooting.c @ 1136

Revision 1136, 4.0 KB checked in by reyalP, 2 years ago (diff)

a580 work in progress, not added to batch builds. From various authors in http://chdk.setepontos.com/index.php?topic=2900.105 via horape in http://chdk.setepontos.com/index.php?topic=650.msg64412#msg64412

  • Property svn:eol-style set to native
Line 
1#define PARAM_FILE_COUNTER      0x38
2
3// DRYOS-Notes:
4// propertycase
5//   196 - overall brightness (of viewport?)
6
7#include "platform.h"
8
9const ApertureSize aperture_sizes_table[] = {
10    {  9, 273, "2.6" },
11    { 10, 285, "2.8" },
12    { 11, 304, "3.2" },
13    { 12, 337, "3.5" },
14    { 13, 372, "4.0" },
15    { 14, 409, "4.5" },
16    { 15, 448, "5.0" },
17    { 16, 480, "5.5" }
18};
19
20const ShutterSpeed shutter_speeds_table[] = {
21    { -12, -384, "15", 15000000 },
22    { -11, -352, "13", 13000000 },
23    { -10, -320, "10", 10000000 },
24    {  -9, -288, "8",   8000000 },
25    {  -8, -256, "6",   6000000 },
26    {  -7, -224, "5",   5000000 },
27    {  -6, -192, "4",   4000000 },
28    {  -5, -160, "3.2", 3200000 },
29    {  -4, -128, "2.5", 2500000 },
30    {  -3,  -96, "2",   2000000 },
31    {  -2,  -64, "1.6", 1600000 },
32    {  -1,  -32, "1.3", 1300000 },
33    {   0,    0, "1",   1000000 },
34    {   1,   32, "0.8",  800000 },
35    {   2,   64, "0.6",  600000 },
36    {   3,   96, "0.5",  500000 },
37    {   4,  128, "0.4",  400000 },
38    {   5,  160, "0.3",  300000 },
39    {   6,  192, "1/4",  250000 },
40    {   7,  224, "1/5",  200000 },
41    {   8,  256, "1/6",  166667 },
42    {   9,  288, "1/8",  125000 },
43    {  10,  320, "1/10", 100000 },
44    {  11,  352, "1/13",  76923 },
45    {  12,  384, "1/15",  66667 },
46    {  13,  416, "1/20",  50000 },
47    {  14,  448, "1/25",  40000 },
48    {  15,  480, "1/30",  33333 },
49    {  16,  512, "1/40",  25000 },
50    {  17,  544, "1/50",  20000 },
51    {  18,  576, "1/60",  16667 },
52    {  19,  608, "1/80",  12500 },
53    {  20,  640, "1/100", 10000 },
54    {  21,  672, "1/125",  8000 },
55    {  22,  704, "1/160",  6250 },
56    {  23,  736, "1/200",  5000 },
57    {  24,  768, "1/250",  4000 },
58    {  25,  800, "1/320",  3125 },
59    {  26,  832, "1/400",  2500 },
60    {  27,  864, "1/500",  2000 },
61    {  28,  896, "1/640",  1563 },
62    {  29,  928, "1/800",  1250 },
63    {  30,  960, "1/1000", 1000 },
64    {  31,  992, "1/1250",  800 },
65    {  32, 1021, "1/1600",  625 },
66    {  33, 1053, "1/2000",  500 },
67};
68
69const ISOTable iso_table[] = {
70    { -1,    1,   "HI", -1},
71    {  0,    0, "Auto", -1},
72    {  1,   80,   "80", -1},
73    {  2,  100,  "100", -1},
74    {  3,  200,  "200", -1},
75    {  4,  400,  "400", -1},
76    {  5,  800,  "800", -1},
77    {  6, 1600, "1600", -1},
78};
79
80/*
81http://www.usa.canon.com/cusa/support/consumer/digital_cameras/powershot_a_series/powershot_a580#Specifications
82
83Shooting Modes
84        Auto, Easy, Camera M, Portrait, Landscape,
85        Special Scene
86                (Foliage, Snow, Beach, Sunset, Fireworks, Night Scene, Aquarium),
87        Indoor, Kids & Pets, Night Snapshot, Movie
88Movie: 640 x 480 (20 fps/20 fps LP), 320 x 240 (30 fps) available up to 4GB or 60 minutes, 160 x 120 (up to 3 minutes at 15 fps)
89
90canon mode list in FFE7CFFC 100c
91*/
92// 32774 - ?????? ????? ? ?????? ???????
93static const CapturemodeMap modemap[] = {
94    { MODE_AUTO,               32768 },//OK
95    { MODE_P,                  32772 },//OK
96    { MODE_VIDEO_STD,          2599  },//OK
97    { MODE_VIDEO_COMPACT,      2601  },//OK
98    { MODE_SCN_AQUARIUM,       16408 },//OK
99    { MODE_SCN_NIGHT_SCENE,    16398 },//OK
100    { MODE_SCN_FOLIAGE,        16403 },//OK
101    { MODE_SCN_SNOW,           16404 },//OK
102    { MODE_SCN_BEACH,          16405 },//OK
103    { MODE_SCN_FIREWORK,       16406 },//OK
104    { MODE_INDOOR,             32785 },//OK
105    { MODE_KIDS_PETS,          32784 },//OK
106    { MODE_NIGHT_SNAPSHOT,     32779 },//OK
107    { MODE_LANDSCAPE,          32780 },//OK
108    { MODE_PORTRAIT,           32781 },//OK
109};
110
111#include "../generic/shooting.c"
112
113const int dof_tbl[] = {5800, 6420, 7060, 7700, 8340, 9950, 11550, 13160, 14750, 17150, 19570, 22760, 26750, 30750, 34800};
114const int dof_tbl_size = sizeof(dof_tbl)/sizeof(dof_tbl[0]);
115
116long get_file_next_counter() {
117    return get_file_counter();
118}
119
120long get_target_file_num() {
121    long n;
122
123    n = get_file_next_counter();
124    n = (n>>4)&0x3FFF;
125    return n;
126}
127
128long get_target_dir_num() {
129    long n;
130
131    n = get_file_next_counter();
132    n = (n>>18)&0x3FF;
133    return n;
134}
135
136int circle_of_confusion = 5;
137
Note: See TracBrowser for help on using the repository browser.