source: trunk/platform/a460/shooting.c @ 880

Revision 880, 4.4 KB checked in by msl, 3 years ago (diff)

Correction various coc values

  • Subject: A450, A460, A650, G9, G11, Ixus40 SD300, Ixus50 SD400, Ixus60 SD600, Ixus65 SD630, ixus960 SD950, Ixus980 SD990, Ixusizoom SD30, SX200
  • CoC (Circles of Confusion) is required for a correct DOF calculation.
  • Base for the values is the table from DOFMaster: http://www.dofmaster.com/digital_coc.html

Lua mathlib math.abs

  • It was commented out. I don't know why. It's work correctly.
  • Property svn:eol-style set to native
Line 
1#define PARAM_FILE_COUNTER      0x37
2
3#include "platform.h"
4
5const ApertureSize aperture_sizes_table[] = {
6    {  9, 292, "2.8" },
7    { 10, 303, "3.2" },
8    { 11, 320, "3.5" },
9    { 12, 342, "3.5" },
10    { 13, 367, "4.0" },
11    { 14, 395, "4.5" },
12    { 15, 427, "5.0" },
13    { 16, 461, "5.8" },
14    { 17, 553, "8.0 ND" },
15    { 18, 572, "9.0 ND" },
16    { 19, 592, "10.0 ND" },
17    { 20, 615, "10.0 ND" },
18    { 21, 642, "11.0 ND" },
19    { 22, 670, "13.0 ND" },
20    { 23, 704, "16.0 ND" },
21    { 24, 739, "18.0 ND" },
22};
23
24const ShutterSpeed shutter_speeds_table[] = {
25    { -12, -384, "15", 15000000 },
26    { -11, -352, "13", 13000000 },
27    { -10, -320, "10", 10000000 },
28    {  -9, -288, "8",   8000000 },
29    {  -8, -256, "6",   6000000 },
30    {  -7, -224, "5",   5000000 },
31    {  -6, -192, "4",   4000000 },
32    {  -5, -160, "3.2", 3200000 },
33    {  -4, -128, "2.5", 2500000 },
34    {  -3,  -96, "2",   2000000 },
35    {  -2,  -64, "1.6", 1600000 },
36    {  -1,  -32, "1.3", 1300000 },
37    {   0,    0, "1",   1000000 },
38    {   1,   32, "0.8",  800000 },
39    {   2,   64, "0.6",  600000 },
40    {   3,   96, "0.5",  500000 },
41    {   4,  128, "0.4",  400000 },
42    {   5,  160, "0.3",  300000 },
43    {   6,  192, "1/4",  250000 },
44    {   7,  224, "1/5",  200000 },
45    {   8,  256, "1/6",  166667 },
46    {   9,  288, "1/8",  125000 },
47    {  10,  320, "1/10", 100000 },
48    {  11,  352, "1/13",  76923 },
49    {  12,  384, "1/15",  66667 },
50    {  13,  416, "1/20",  50000 },
51    {  14,  448, "1/25",  40000 },
52    {  15,  480, "1/30",  33333 },
53    {  16,  512, "1/40",  25000 },
54    {  17,  544, "1/50",  20000 },
55    {  18,  576, "1/60",  16667 },
56    {  19,  608, "1/80",  12500 },
57    {  20,  640, "1/100", 10000 },
58    {  21,  672, "1/125",  8000 },
59    {  22,  704, "1/160",  6250 },
60    {  23,  736, "1/200",  5000 },
61    {  24,  768, "1/250",  4000 },
62    {  25,  800, "1/320",  3125 },
63    {  26,  832, "1/400",  2500 },
64    {  27,  864, "1/500",  2000 },
65    {  28,  896, "1/640",  1563 },
66    {  29,  928, "1/800",  1250 },
67    {  30,  960, "1/1000", 1000 },
68    {  31,  992, "1/1250",  800 },
69    {  32, 1021, "1/1600",  625 },
70    {  33, 1053, "1/2000",  500 },
71};
72
73const ISOTable iso_table[] = {
74    {  0,    0, "Auto", -1},
75    {  1,   80,   "80", -1},
76    {  2,  100,  "100", -1},
77    {  3,  200,  "200", -1},
78    {  4,  400,  "400", -1},
79};         
80
81/*
82http://www.usa.canon.com/consumer/controller?act=ModelInfoAct&fcategoryid=221&modelid=14825#ModelTechSpecsAct
83
84Shooting Modes
85    Auto, Camera M, Special Scene
86        (Portrait, Foliage, Snow, Beach, Fireworks, Indoor, Kids & Pets, Night Snapshot)
87    Super Macro, Movie
88video resolutions
89640 x 480 (10 fps) / 320 x 240 (30 fps) available up to 1GB or 1 hour for each file size,
90160 x 120 (3 min. at 15 fps)
91
92canon mode list FFEAB860 in 100d
93*/
94static const CapturemodeMap modemap[] = {
95    { MODE_LONG_SHUTTER,       32774 },
96    { MODE_SUPER_MACRO,        33289 },
97//    { MODE_STITCH,               33290 }, // reported as functional stitch assist in forum, not in official specs
98    { MODE_AUTO,               32768 },
99    { MODE_P,                  32772 },
100    { MODE_SCN_PORTRAIT,       16397 },
101    { MODE_VIDEO_STD,          2597  },
102    { MODE_VIDEO_COMPACT,      2599  },
103    { MODE_SCN_NIGHT_SNAPSHOT, 16395 },
104    { MODE_SCN_KIDS_PETS,      16400 },
105    { MODE_SCN_INDOOR,         16401 },
106    { MODE_SCN_FOLIAGE,        16402 },
107    { MODE_SCN_SNOW,           16403 },
108    { MODE_SCN_BEACH,          16404 },
109    { MODE_SCN_FIREWORK,       16405 },
110};
111
112#include "../generic/shooting.c"
113
114long get_file_next_counter() {
115    return get_file_counter();
116}
117
118long get_target_file_num() {
119    long n;
120   
121    n = get_file_next_counter();
122    n = (n>>4)&0x3FFF;
123    return n;
124}
125
126long get_target_dir_num() {
127    long n;
128   
129    n = get_file_next_counter();
130    n = (n>>18)&0x3FF;
131    return n;
132}
133
134int circle_of_confusion = 4;
135
136char* shooting_get_tv_str()
137{
138    short int tvv;
139    long i;
140    _GetPropertyCase(PROPCASE_TV, &tvv, sizeof(tvv));
141    for (i=0;i<SS_SIZE;i++){
142      if (shutter_speeds_table[i].prop_id >= tvv)
143        return (char*)shutter_speeds_table[i].name;
144    }
145    return (void*)"?";
146}
147
148char* shooting_get_av_str()
149{
150    short int avv;
151    long i;
152    _GetPropertyCase(PROPCASE_AV, &avv, sizeof(avv));
153    for (i=0;i<AS_SIZE;i++){
154      if (aperture_sizes_table[i].prop_id == avv)
155        return (char*)aperture_sizes_table[i].name;
156    }
157    return (char*) "?";
158}
159
Note: See TracBrowser for help on using the repository browser.