root/platform/ixus950_sd850/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      0x37
   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 ND8 filter.
   7 // aperture_sizes_table[].id is just a serial number.
   8 const ApertureSize aperture_sizes_table[] = { // PROPCASE 23
   9     {  9, 288, "2.8" }, // zoom 1.0
  10     { 10, 299, "2.8" }, // zoom 1.2
  11     { 11, 312, "3.2" }, // etc.
  12     { 12, 329, "3.2" },
  13     { 13, 347, "3.5" },
  14     { 14, 371, "4.0" },
  15     { 15, 400, "4.0" },
  16     { 16, 438, "5.0" },
  17     { 17, 480, "5.5" },    
  18 // The rest are the same physical apertures as above, but with ND8:
  19     { 18, 563, "8.0" },
  20     { 19, 574, "8.0" },
  21     { 20, 587, "9.0" },
  22     { 21, 604, "9.0" },
  23     { 22, 622, "10.0" },
  24     { 23, 646, "11.0" },
  25     { 24, 675, "11.0" },
  26     { 25, 713, "14.0" },
  27     { 26, 755, "16.0" },
  28 };
  29 
  30 // Another set of "mock" values, which can probably
  31 // be derived from the table found at FFB4E258 in FW.
  32 // At the moment, I see no reason to amend it.
  33 const ShutterSpeed shutter_speeds_table[] = {
  34     { -12, -384, "15", 15000000 },
  35     { -11, -352, "13", 13000000 },
  36     { -10, -320, "10", 10000000 },
  37     {  -9, -288, "8",   8000000 },
  38     {  -8, -256, "6",   6000000 },
  39     {  -7, -224, "5",   5000000 },
  40     {  -6, -192, "4",   4000000 },
  41     {  -5, -160, "3.2", 3200000 },
  42     {  -4, -128, "2.5", 2500000 },
  43     {  -3,  -96, "2",   2000000 },
  44     {  -2,  -64, "1.6", 1600000 },
  45     {  -1,  -32, "1.3", 1300000 },
  46     {   0,    0, "1",   1000000 },
  47     {   1,   32, "0.8",  800000 },
  48     {   2,   64, "0.6",  600000 },
  49     {   3,   96, "0.5",  500000 },
  50     {   4,  128, "0.4",  400000 },
  51     {   5,  160, "0.3",  300000 },
  52     {   6,  192, "1/4",  250000 },
  53     {   7,  224, "1/5",  200000 },
  54     {   8,  256, "1/6",  166667 },
  55     {   9,  288, "1/8",  125000 },
  56     {  10,  320, "1/10", 100000 },
  57     {  11,  352, "1/13",  76923 },
  58     {  12,  384, "1/15",  66667 },
  59     {  13,  416, "1/20",  50000 },
  60     {  14,  448, "1/25",  40000 },
  61     {  15,  480, "1/30",  33333 },
  62     {  16,  512, "1/40",  25000 },
  63     {  17,  544, "1/50",  20000 },
  64     {  18,  576, "1/60",  16667 },
  65     {  19,  608, "1/80",  12500 },
  66     {  20,  640, "1/100", 10000 },
  67     {  21,  672, "1/125",  8000 },
  68     {  22,  704, "1/160",  6250 },
  69     {  23,  736, "1/200",  5000 },
  70     {  24,  768, "1/250",  4000 },
  71     {  25,  800, "1/320",  3125 },
  72     {  26,  832, "1/400",  2500 },
  73     {  27,  864, "1/500",  2000 },
  74     {  28,  896, "1/640",  1563 },
  75     {  29,  928, "1/800",  1250 },
  76     {  30,  960, "1/1000", 1000 },
  77     {  31,  992, "1/1250",  800 },
  78     {  32, 1021, "1/1600",  625 },
  79     {  33, 1053, "1/2000",  500 },
  80 };
  81 
  82 const ISOTable iso_table[] = {
  83     { -1,     1,    "HI", -1},
  84     {  0,     0,  "Auto", -1},
  85     {  1,    80,    "80", -1},
  86     {  2,   100,   "100", -1},
  87     {  3,   200,   "200", -1},
  88     {  4,   400,   "400", -1},
  89     {  5,   800,   "800", -1},
  90     {  6,  1600,  "1600", -1},
  91 };          
  92 
  93 /*
  94 Shooting Modes
  95     Auto, Camera M,
  96     Special Scene
  97         (Portrait, Foliage, Snow, Beach, Fireworks, Aquarium, Underwater,
  98         Indoor, Kids & Pets, Night Snapshot, Creative Light Effect),
  99     Color Accent, Color Swap, Digital Macro, Stitch Assist, Movie
 100 Movie: 640 x 480 / 320 x 240 (30 fps/15 fps) available up to 4GB or 60 minutes per clip, 
 101     640 x 480 (2 hours at 0.5 fps/1 fps), 320 x 240 (1 min. at 60 fps), 160 x 120 (3 min. at 15 fps)
 102 
 103 canon mode list FFB4B564 in 100c
 104 */
 105 const CapturemodeMap modemap[] = {
 106     { MODE_LONG_SHUTTER,       32774 }, // guessed
 107     { MODE_AUTO,               32768 },
 108     { MODE_P,                  32772 },
 109     { MODE_DIGITAL_MACRO,      33288 },
 110     { MODE_PORTRAIT,           16397 },
 111     { MODE_COLOR_ACCENT,       33306 },
 112     { MODE_COLOR_SWAP,         33307 },
 113     { MODE_NIGHT_SNAPSHOT,     16395 },
 114     { MODE_KIDS_PETS,          16400 },
 115     { MODE_INDOOR,             16401 },
 116     { MODE_FOLIAGE,            16402 },
 117     { MODE_SNOW,               16403 },
 118     { MODE_BEACH,              16404 },
 119     { MODE_FIREWORK,           16405 },
 120     { MODE_AQUARIUM,           16407 },
 121     { MODE_UNDERWATER,         16406 },
 122 // scene "creative light effects",  16911
 123     { MODE_CREATIVE_EFFECT,    16911 },
 124     { MODE_VIDEO_STD,          2597  },
 125     { MODE_VIDEO_SPEED,        2598  }, // "fast frame rate"
 126     { MODE_VIDEO_COMPACT,      2599  },
 127     { MODE_VIDEO_COLOR_ACCENT, 2595  },
 128     { MODE_VIDEO_COLOR_SWAP,   2596  },
 129     { MODE_VIDEO_TIME_LAPSE,   2601  },
 130     { MODE_STITCH,             33290 },
 131 };
 132 
 133 #include "../generic/shooting.c"
 134 //#include "shooting_my.c"
 135 
 136 long get_file_next_counter() {
 137     return get_file_counter();
 138 }
 139 
 140 long get_target_file_num() {
 141     long n;
 142     
 143     n = get_file_next_counter();
 144     n = (n>>4)&0x3FFF;
 145     return n;
 146 }
 147 
 148 long get_target_dir_num() {
 149     long n;
 150     
 151     n = get_file_next_counter();
 152     n = (n>>18)&0x3FF;
 153     return n;
 154 }

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