root/platform/ixus140_elph130/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_name
  4. get_target_dir_num

   1 // TODO this holds an exposure count of some kind, but it only updates when rebooting or switching to play!
   2 #define PARAM_FILE_COUNTER      0x1
   3 
   4 #include "platform.h"
   5 
   6 // These F-numbers are the "mock" values shown by the cam.
   7 // They're linked to FL (zoom) and ND filter.
   8 // aperture_sizes_table[].id is just a serial number.
   9 // note av96 varies continously with zoom, the following values are just representative
  10 const ApertureSize aperture_sizes_table[] = { // PROPCASE 23
  11     {  9, 328, "3.2" },
  12     { 10, 331, "3.5" }, 
  13     { 11, 379, "4.0" }, 
  14     { 12, 425, "4.5" },
  15     { 13, 463, "5.0" },
  16     { 14, 474, "5.6" },
  17     { 15, 502, "6.3" },
  18     { 16, 541, "6.9" },
  19 
  20 // The rest are the same physical apertures as above, but with ND:
  21     { 17, 604, "9.0" },
  22     { 18, 613, "10.0" },
  23     { 19, 657, "11.0" },
  24     { 20, 687, "13.0" },
  25     { 21, 710, "14.0" },
  26     { 22, 750, "16.0" },
  27     { 23, 790, "18.0" },
  28     { 24, 817, "20.0" },
  29 };
  30 
  31 // OLD copied comment!
  32 // TODO copied from 850
  33 // Another set of "mock" values, which can probably
  34 // be derived from the table found at FFB4E258 in FW.
  35 // At the moment, I see no reason to amend it.
  36 const ShutterSpeed shutter_speeds_table[] = {
  37     { -12, -384, "15", 15000000 },
  38     { -11, -352, "13", 13000000 },
  39     { -10, -320, "10", 10000000 },
  40     {  -9, -288, "8",   8000000 },
  41     {  -8, -256, "6",   6000000 },
  42     {  -7, -224, "5",   5000000 },
  43     {  -6, -192, "4",   4000000 },
  44     {  -5, -160, "3.2", 3200000 },
  45     {  -4, -128, "2.5", 2500000 },
  46     {  -3,  -96, "2",   2000000 },
  47     {  -2,  -64, "1.6", 1600000 },
  48     {  -1,  -32, "1.3", 1300000 },
  49     {   0,    0, "1",   1000000 },
  50     {   1,   32, "0.8",  800000 },
  51     {   2,   64, "0.6",  600000 },
  52     {   3,   96, "0.5",  500000 },
  53     {   4,  128, "0.4",  400000 },
  54     {   5,  160, "0.3",  300000 },
  55     {   6,  192, "1/4",  250000 },
  56     {   7,  224, "1/5",  200000 },
  57     {   8,  256, "1/6",  166667 },
  58     {   9,  288, "1/8",  125000 },
  59     {  10,  320, "1/10", 100000 },
  60     {  11,  352, "1/13",  76923 },
  61     {  12,  384, "1/15",  66667 },
  62     {  13,  416, "1/20",  50000 },
  63     {  14,  448, "1/25",  40000 },
  64     {  15,  480, "1/30",  33333 },
  65     {  16,  512, "1/40",  25000 },
  66     {  17,  544, "1/50",  20000 },
  67     {  18,  576, "1/60",  16667 },
  68     {  19,  608, "1/80",  12500 },
  69     {  20,  640, "1/100", 10000 },
  70     {  21,  672, "1/125",  8000 },
  71     {  22,  704, "1/160",  6250 },
  72     {  23,  736, "1/200",  5000 },
  73     {  24,  768, "1/250",  4000 },
  74     {  25,  800, "1/320",  3125 },
  75     {  26,  832, "1/400",  2500 },
  76     {  27,  864, "1/500",  2000 },
  77     {  28,  896, "1/640",  1563 },
  78     {  29,  928, "1/800",  1250 },
  79     {  30,  960, "1/1000", 1000 },
  80     {  31,  992, "1/1250",  800 },
  81     {  32, 1021, "1/1600",  625 },
  82 };
  83 
  84 const ISOTable iso_table[] = {
  85 //    { -1,     1,    "HI", -1},
  86     {  0,     0,  "Auto", -1},
  87     {  1,    80,    "80", -1}, // note, camera does not support 80
  88     {  2,   100,   "100", -1},
  89     {  3,   200,   "200", -1},
  90     {  4,   400,   "400", -1},
  91     {  5,   800,   "800", -1},
  92     {  6,  1600,  "1600", -1},
  93 };          
  94 
  95 /*
  96 http://www.usa.canon.com/cusa/consumer/products/cameras/digital_cameras/powershot_elph_130_is#Specifications
  97 
  98 Shooting Modes
  99         Auto, P, Portrait, Smart shutter (Smile, Wink self timer, Face Self timer),
 100     Low light, Fisheye Effect, Miniature Effect, Toy Camera Effect, Monochrome,
 101     Super Vivid, Poster Effect, Color Accent, Color Swap, Snow, Fireworks, 
 102     Long Shutter, Stitch assist
 103         Movie
 104                 1280 x 720 (25 fps), 640 x 480 (30 fps) 
 105         
 106 
 107 canon mode list FF61C088 in 100a
 108 
 109 */
 110 const CapturemodeMap modemap[] = {
 111     { MODE_LONG_SHUTTER,        32774 },
 112     { MODE_P,                   32772 },
 113     { MODE_STITCH,              33293 }, // either direction
 114     { MODE_MINIATURE,           33330 },
 115     { MODE_FISHEYE,             33329 },
 116     { MODE_TOY_CAMERA,          33333 },
 117     { MODE_LOWLIGHT,            32807 },
 118     { MODE_COLOR_ACCENT,        33315 },
 119     { MODE_COLOR_SWAP,          33316 },
 120     { MODE_MONOCHROME,          33336 },
 121     { MODE_SUPER_VIVID,         33324 },
 122     { MODE_POSTER_EFFECT,       33325 },
 123     { MODE_PORTRAIT,            32787 },
 124     { MODE_SNOW,                32795 },
 125     { MODE_FIREWORK,            32797 },
 126     { MODE_AUTO,                32768 },
 127     { MODE_FACE_SELF_TIMER,     33326 },
 128     { MODE_SMART_SHUTTER,       33327 },
 129     { MODE_WINK_SELF_TIMER,     33328 },
 130 // TODO - camera has no distinct video modes, current mode +1024 while recording
 131 };
 132 
 133 #include "../generic/shooting.c"
 134 
 135 long get_file_next_counter() {
 136     return get_file_counter();
 137 }
 138 
 139 long get_target_file_num() {
 140     return get_exposure_counter();
 141 }
 142 #if defined(CAM_DATE_FOLDER_NAMING)
 143 void get_target_dir_name(char *out)
 144 {
 145     extern void _GetImageFolder(char*,int,int,int);
 146     _GetImageFolder(out,get_file_next_counter(),CAM_DATE_FOLDER_NAMING,time(NULL));
 147 }
 148 #else
 149 long get_target_dir_num() 
 150 {
 151     return 0;
 152 }
 153 #endif
 154 

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