root/platform/sx510hs/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 and 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 // TODO:Taken from ixus140
   7 // These F-numbers are the "mock" values shown by the cam.
   8 // They're linked to FL (zoom) and ND filter.
   9 // aperture_sizes_table[].id is just a serial number.
  10 // note av96 varies continously with zoom, the following values are just representative
  11 const ApertureSize aperture_sizes_table[] = { // PROPCASE 23
  12     {  9, 328, "3.2" },
  13     { 10, 331, "3.5" }, 
  14     { 11, 379, "4.0" }, 
  15     { 12, 425, "4.5" },
  16     { 13, 463, "5.0" },
  17     { 14, 474, "5.6" },
  18     { 15, 502, "6.3" },
  19     { 16, 541, "6.9" },
  20 
  21 // The rest are the same physical apertures as above, but with ND:
  22     { 17, 604, "9.0" },
  23     { 18, 613, "10.0" },
  24     { 19, 657, "11.0" },
  25     { 20, 687, "13.0" },
  26     { 21, 710, "14.0" },
  27     { 22, 750, "16.0" },
  28     { 23, 790, "18.0" },
  29     { 24, 817, "20.0" },
  30 };
  31 
  32 // OLD copied comment! Taken from ixus140
  33 // TODO copied from 850
  34 // Another set of "mock" values, which can probably
  35 // be derived from the table found at FFB4E258 in FW.
  36 // At the moment, I see no reason to amend it.
  37 const ShutterSpeed shutter_speeds_table[] = {
  38     { -12, -384, "15", 15000000 },
  39     { -11, -352, "13", 13000000 },
  40     { -10, -320, "10", 10000000 },
  41     {  -9, -288, "8",   8000000 },
  42     {  -8, -256, "6",   6000000 },
  43     {  -7, -224, "5",   5000000 },
  44     {  -6, -192, "4",   4000000 },
  45     {  -5, -160, "3.2", 3200000 },
  46     {  -4, -128, "2.5", 2500000 },
  47     {  -3,  -96, "2",   2000000 },
  48     {  -2,  -64, "1.6", 1600000 },
  49     {  -1,  -32, "1.3", 1300000 },
  50     {   0,    0, "1",   1000000 },
  51     {   1,   32, "0.8",  800000 },
  52     {   2,   64, "0.6",  600000 },
  53     {   3,   96, "0.5",  500000 },
  54     {   4,  128, "0.4",  400000 },
  55     {   5,  160, "0.3",  300000 },
  56     {   6,  192, "1/4",  250000 },
  57     {   7,  224, "1/5",  200000 },
  58     {   8,  256, "1/6",  166667 },
  59     {   9,  288, "1/8",  125000 },
  60     {  10,  320, "1/10", 100000 },
  61     {  11,  352, "1/13",  76923 },
  62     {  12,  384, "1/15",  66667 },
  63     {  13,  416, "1/20",  50000 },
  64     {  14,  448, "1/25",  40000 },
  65     {  15,  480, "1/30",  33333 },
  66     {  16,  512, "1/40",  25000 },
  67     {  17,  544, "1/50",  20000 },
  68     {  18,  576, "1/60",  16667 },
  69     {  19,  608, "1/80",  12500 },
  70     {  20,  640, "1/100", 10000 },
  71     {  21,  672, "1/125",  8000 },
  72     {  22,  704, "1/160",  6250 },
  73     {  23,  736, "1/200",  5000 },
  74     {  24,  768, "1/250",  4000 },
  75     {  25,  800, "1/320",  3125 },
  76     {  26,  832, "1/400",  2500 },
  77     {  27,  864, "1/500",  2000 },
  78     {  28,  896, "1/640",  1563 },
  79     {  29,  928, "1/800",  1250 },
  80     {  30,  960, "1/1000", 1000 },
  81     {  31,  992, "1/1250",  800 },
  82     {  32, 1021, "1/1600",  625 },
  83 };
  84 
  85 const ISOTable iso_table[] = {
  86     {  0,     0,  "Auto", -1},
  87     {  1,    80,    "80", -1},
  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     {  7,  3200,  "3200", -1},
  94 };
  95 
  96 //http://chdk.setepontos.com/index.php?topic=5051.msg77808#msg77808
  97 //PROP 49
  98 const CapturemodeMap modemap[] = {
  99     { MODE_VIDEO_STD,            2633 },
 100     { MODE_VIDEO_SUPER_SLOW,     2638 },
 101     { MODE_SUPER_VIVID,          8748 },
 102     { MODE_POSTER_EFFECT,        8749 },
 103     { MODE_FISHEYE,              8753 },
 104     { MODE_MINIATURE,            8754 },
 105     { MODE_TOY_CAMERA,           8757 },
 106     { MODE_MONOCHROME,           8761 },
 107     { MODE_HIGHSPEED_BURST,     16392 },
 108     { MODE_PORTRAIT,            16403 },
 109     { MODE_LOWLIGHT,            16423 },
 110     { MODE_FACE_SELF_TIMER,     16942 },
 111     { MODE_SNOW,                16411 },
 112     { MODE_FIREWORK,            16413 },
 113     { MODE_AUTO,                32768 },
 114     { MODE_M,                   32769 },
 115     { MODE_AV,                  32770 },
 116     { MODE_TV,                  32771 },
 117     { MODE_P,                   32772 },
 118     { MODE_DISCREET,            32824 },
 119     { MODE_NIGHT_SCENE,         33331 }, // This mode is not listed in Canon menu
 120     { MODE_LIVE,                33339 },
 121     { MODE_VIDEO_MOVIE_DIGEST | MODE_DISABLE_RAW, 33340 },
 122 };
 123 
 124 #include "../generic/shooting.c"
 125 
 126 long get_file_next_counter() {
 127     return get_file_counter();
 128 }
 129 
 130 long get_target_file_num() {
 131     return get_exposure_counter();
 132 }
 133 #if defined(CAM_DATE_FOLDER_NAMING)
 134 void get_target_dir_name(char *out)
 135 {
 136     extern void _GetImageFolder(char*,int,int,int);
 137     _GetImageFolder(out,get_file_next_counter(),CAM_DATE_FOLDER_NAMING,time(NULL));
 138 }
 139 #else
 140 long get_target_dir_num() 
 141 {
 142     return 0;
 143 }
 144 #endif

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