root/platform/a2000/shooting.c

/* [<][>][^][v][top][bottom][index][help] */

DEFINITIONS

This source file includes following definitions.
  1. get_file_next_counter
  2. get_target_file_num
  3. get_target_dir_num

   1 #define PARAM_FILE_COUNTER      0x38
   2 
   3 // DRYOS-Notes:
   4 // propertycase
   5 //   196 - overall brightness (of viewport?)
   6 
   7 #include "platform.h"
   8 
   9 const ApertureSize aperture_sizes_table[] = {
  10 
  11         // Without ND filter
  12         {9,  328, "3.2"},
  13         {10, 331, "3.2"},
  14         {11, 338, "3.5"},
  15         {12, 349, "3.5"},
  16         {13, 364, "3.5"},
  17         {14, 378, "4"},
  18         {15, 390, "4"},
  19         {16, 402, "4.5"},
  20         {17, 414, "4.5"},
  21         {18, 427, "4.5"},
  22         {19, 439, "5"},
  23         {20, 452, "5"},
  24         {21, 468, "5.6"},
  25         {22, 488, "5.6"},
  26         {23, 500, "5.9"},
  27 
  28         // With ND filter
  29         {24, 608, "9"},
  30         {25, 611, "9"},
  31         {26, 618, "10"},
  32         {27, 629, "10"},
  33         {28, 644, "10"},
  34         {29, 658, "11"},
  35         {30, 670, "11"},
  36         {31, 682, "13"},
  37         {32, 694, "13"},
  38         {33, 707, "13"},
  39         {34, 719, "14"},
  40         {35, 732, "14"},
  41         {36, 748, "16"},
  42         {37, 768, "16"},
  43         {38, 780, "17"}
  44 };
  45 
  46 const ShutterSpeed shutter_speeds_table[] = {
  47     { -12, -384, "15", 15000000 },
  48     { -11, -352, "13", 13000000 },
  49     { -10, -320, "10", 10000000 },
  50     {  -9, -288, "8",   8000000 },
  51     {  -8, -256, "6",   6000000 },
  52     {  -7, -224, "5",   5000000 },
  53     {  -6, -192, "4",   4000000 },
  54     {  -5, -160, "3.2", 3200000 },
  55     {  -4, -128, "2.5", 2500000 },
  56     {  -3,  -96, "2",   2000000 },
  57     {  -2,  -64, "1.6", 1600000 },
  58     {  -1,  -32, "1.3", 1300000 },
  59     {   0,    0, "1",   1000000 },
  60     {   1,   32, "0.8",  800000 },
  61     {   2,   64, "0.6",  600000 },
  62     {   3,   96, "0.5",  500000 },
  63     {   4,  128, "0.4",  400000 },
  64     {   5,  160, "0.3",  300000 },
  65     {   6,  192, "1/4",  250000 },
  66     {   7,  224, "1/5",  200000 },
  67     {   8,  256, "1/6",  166667 },
  68     {   9,  288, "1/8",  125000 },
  69     {  10,  320, "1/10", 100000 },
  70     {  11,  352, "1/13",  76923 },
  71     {  12,  384, "1/15",  66667 },
  72     {  13,  416, "1/20",  50000 },
  73     {  14,  448, "1/25",  40000 },
  74     {  15,  480, "1/30",  33333 },
  75     {  16,  512, "1/40",  25000 },
  76     {  17,  544, "1/50",  20000 },
  77     {  18,  576, "1/60",  16667 },
  78     {  19,  608, "1/80",  12500 },
  79     {  20,  640, "1/100", 10000 },
  80     {  21,  672, "1/125",  8000 },
  81     {  22,  704, "1/160",  6250 },
  82     {  23,  736, "1/200",  5000 },
  83     {  24,  768, "1/250",  4000 },
  84     {  25,  800, "1/320",  3125 },
  85     {  26,  832, "1/400",  2500 },
  86     {  27,  864, "1/500",  2000 },
  87     {  28,  896, "1/640",  1563 },
  88     {  29,  928, "1/800",  1250 },
  89     {  30,  960, "1/1000", 1000 },
  90     {  31,  992, "1/1250",  800 },
  91     {  32, 1021, "1/1600",  625 },
  92     {  33, 1053, "1/2000",  500 },
  93 };
  94 
  95 const ISOTable iso_table[] = {
  96     { -1,    1,   "HI", -1},
  97     {  0,    0, "Auto", -1},
  98     {  1,   80,   "80", -1},
  99     {  2,  100,  "100", -1},
 100     {  3,  200,  "200", -1},
 101     {  4,  400,  "400", -1},
 102     {  5,  800,  "800", -1},
 103     {  6, 1600, "1600", -1},
 104 };          
 105 
 106 /*
 107 http://www.usa.canon.com/consumer/controller?act=ModelInfoAct&fcategoryid=221&modelid=17482#ModelTechSpecsAct
 108 Shooting Modes
 109         Auto, Easy, P, Portrait, Landscape, 
 110         Special Scene
 111                 (Night Scene, Foliage, Snow, Beach, Sunset, Fireworks, Aquarium, ISO 3200),
 112         Indoor, Kids & Pets, Night Snapshot, Movie
 113 
 114 Movie: 640 x 480 (30 fps/30 fps LP), 320 x 240 (30 fps) available up to 4GB or 60 minutes per clip, 160 x 120 (15 fps) up to 3 minutes per clip
 115 canon mode list FFEB9B10 in 100c
 116 */
 117 const CapturemodeMap modemap[] = {
 118   { MODE_LONG_SHUTTER,       32774 },  // not verified
 119   { MODE_VIDEO_STD,          2600  },
 120   { MODE_VIDEO_COMPACT,      2602  },
 121   { MODE_AQUARIUM,           16408 },
 122   { MODE_SNOW,               16404 },
 123   { MODE_FOLIAGE,            16403 },
 124   { MODE_SUNSET,             16402 },
 125   { MODE_NIGHT_SCENE,        16398 },
 126   { MODE_ISO_3200,           16413 },
 127   { MODE_FIREWORK,           16406 },
 128   { MODE_BEACH,              16405 },
 129   { MODE_INDOOR,             32785 },
 130   { MODE_KIDS_PETS,          32784 },
 131   { MODE_NIGHT_SNAPSHOT,     32779 },
 132   { MODE_LANDSCAPE,          32780 },
 133   { MODE_PORTRAIT,           32781 },
 134   { MODE_AUTO,               32768 },
 135   { MODE_P,                  32772 },
 136   { MODE_EASY,               33311 } 
 137 };
 138 
 139 #include "../generic/shooting.c"
 140 
 141 const int dof_tbl[] = {5800, 6420, 7060, 7700, 8340, 9950, 11550, 13160, 14750, 17150, 19570, 22760, 26750, 30750, 34800};
 142 const int dof_tbl_size = sizeof(dof_tbl)/sizeof(dof_tbl[0]);
 143 
 144 long get_file_next_counter() {
 145     return get_file_counter();
 146 }
 147 
 148 long get_target_file_num() {
 149     long n;
 150     
 151     n = get_file_next_counter();
 152     n = (n>>4)&0x3FFF;
 153     return n;
 154 }
 155 
 156 long get_target_dir_num() {
 157     long n;
 158     
 159     n = get_file_next_counter();
 160     n = (n>>18)&0x3FF;
 161     return n;
 162 }

/* [<][>][^][v][top][bottom][index][help] */