root/platform/d10/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 // OK
   2 
   3 #include "platform.h"
   4 
   5 // These F-numbers are the "mock" values shown by the cam.
   6 // They're linked to FL (zoom) and ND filter.
   7 // aperture_sizes_table[].id is just a serial number.
   8 const ApertureSize aperture_sizes_table[] = { // PROPCASE 23
   9     {  9, 292, "2.8" }, // zoom 1.0
  10     { 10, 308, "3.2" }, // zoom 1.2
  11     { 11, 326, "3.2" }, // etc.
  12     { 12, 348, "3.5" }, 
  13     { 13, 375, "4.0" }, 
  14     { 14, 409, "4.5" },
  15     { 15, 449, "4.9" },
  16 // The rest are the same physical apertures as above, but with ND:
  17     { 16, 575, "8.0" },
  18     { 17, 591, "9.0" },
  19     { 18, 609, "9.0" },
  20     { 19, 631, "10.0" },
  21     { 20, 658, "11.0" },
  22     { 21, 692, "13.0" },
  23     { 22, 732, "14.0" },
  24 };
  25 
  26 // OLD copied comment!
  27 // TODO copied from 850
  28 // Another set of "mock" values, which can probably
  29 // be derived from the table found at FFB4E258 in FW.
  30 // At the moment, I see no reason to amend it.
  31 const ShutterSpeed shutter_speeds_table[] = {
  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 };
  78 
  79 const ISOTable iso_table[] = {
  80     { -1,     1,    "HI", -1},
  81     {  0,     0,  "Auto", -1},
  82     {  1,    80,    "80", -1},
  83     {  2,   100,   "100", -1},
  84     {  3,   200,   "200", -1},
  85     {  4,   400,   "400", -1},
  86     {  5,   800,   "800", -1},
  87     {  6,  1600,  "1600", -1},
  88 };          
  89 
  90 // TODO setting the DP button as a shortcut to movie in canon menu
  91 // gives a value of (current mode)+1024 while movie is recording, unless
  92 // already in movie mode
  93 /*
  94 http://www.usa.canon.com/consumer/controller?act=ModelInfoAct&tabact=ModelTechSpecsTabAct&fcategoryid=2592&modelid=18332#ModelTechSpecsAct
  95 
  96 Shooting Modes
  97 Shooting Modes
  98         Auto, P, 
  99         Special Scene 
 100                 (Portrait, Landscape, Night Scene, Foliage, Snow, Beach, Sunset, Fireworks,
 101                 Aquarium, Underwater, ISO 3200, Long Shutter, Indoor, Kids & Pets, 
 102                 Night Snapshot, Color Accent, Color Swap, Stitch Assist), 
 103         Movie
 104                 640 x 480 (30 fps), 320 x 240 (30 fps) 
 105 
 106 canon mode list FFB32F18 in 100a
 107 
 108 */
 109 const CapturemodeMap modemap[] = {
 110     { MODE_LONG_SHUTTER,       16390 },
 111     { MODE_P,                  32772 },
 112     { MODE_STITCH,             16906 }, // SCN, either direction
 113     { MODE_COLOR_ACCENT,       16923 },
 114     { MODE_COLOR_SWAP,         16924 },
 115     { MODE_ISO_3200,           16413 },
 116     { MODE_AUTO,               32768 }, 
 117     { MODE_FOLIAGE,            16403 },
 118     { MODE_LANDSCAPE,          16396 },
 119     { MODE_SUNSET,             16402 },
 120     { MODE_PORTRAIT,           16397 },
 121     { MODE_NIGHT_SNAPSHOT,     16395 },
 122     { MODE_SNOW,               16404 },
 123     { MODE_BEACH,              16405 },
 124     { MODE_INDOOR,             16401 },
 125     { MODE_UNDERWATER,         16407 },
 126     { MODE_AQUARIUM,           16408 },
 127     { MODE_KIDS_PETS,          16400 },
 128     { MODE_FIREWORK,           16406 },
 129     { MODE_VIDEO_COLOR_ACCENT, 2599  },
 130     { MODE_VIDEO_STD,          2601  },
 131     { MODE_VIDEO_COLOR_SWAP,   2600  },
 132 
 133 };
 134 
 135 #include "../generic/shooting.c"
 136 
 137 long get_file_next_counter() {
 138     return get_file_counter();
 139 }
 140 
 141 long get_target_file_num() {
 142     long n;
 143     
 144     n = get_file_next_counter();
 145     n = (n>>4)&0x3FFF;
 146     return n;
 147 }
 148 
 149 long get_target_dir_num() {
 150     long n;
 151     
 152     n = get_file_next_counter();
 153     n = (n>>18)&0x3FF;
 154     return n;
 155 }
 156 
 157 // not used ? -> CAM_DRAW_EXPOSITION

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