root/platform/ixus970_sd890/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 #define PARAM_EXPOSURE_COUNTER  0x02
   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 ND8 filter.
   8 //id (hack id), prop_id (canon id), name
   9 const ApertureSize aperture_sizes_table[] = {
  10         /*first row: zoom position using propertycase #195
  11         second row: zoom value in x (100=1x) using misc values
  12         third row: real aperture using misc values
  13         fourth row: aperture using 'standard' Canon on-screen display
  14         fifth row: Av using propertycase #23
  15         0    1.0    3.24    3.2    326
  16         1    1.3    3.41    3.5    340
  17         2    1.6    3.60    3.5    355
  18         3    1.9    3.78    4.0    369
  19         4    2.3    3.98    4.0    383
  20         5    2.7    4.17    4.0    396
  21         6    3.1    4.36    4.5    408
  22         7    3.7    4.58    4.5    422
  23         8    3.7    4.82    5.0    436
  24         9    3.7    5.11    5.0    452
  25         10    3.7    5.47    5.6    471
  26         11    3.7    5.86    5.7    490*/
  27         {  0, 326,  "3.2" },
  28         {  1, 340,  "3.5" },  
  29         {  2, 355,  "3.5" },
  30         {  3, 369,  "4.0" },
  31         {  4, 383,  "4.0" },
  32         {  5, 396,  "4.0" },
  33         {  6, 408,  "4.5" },
  34         {  7, 422,  "4.5" },
  35         {  8, 436,  "5.0" },
  36         {  9, 452,  "5.0" },
  37         { 10, 471,  "5.6" },
  38         { 11, 490,  "5.7" },
  39         /*And the same physical apertures for the firework mode in SCN position
  40         0    1.0    3.24    9.0    601
  41         1    1.3    3.41   10.0    615
  42         2    1.6    3.60   10.0    630
  43         3    1.9    3.78   11.0    644
  44         4    2.3    3.98   11.0    658
  45         5    2.7    4.17   11.0    671
  46         6    3.1    4.36   13.0    683
  47         7    3.7    4.58   13.0    697
  48         8    3.7    4.82   14.0    711
  49         9    3.7    5.11   14.0    727
  50         10    3.7    5.47   16.0    746
  51         11    3.7    5.86   16.0    765*/
  52         { 12, 601,  "9.0" },
  53         { 13, 615, "10.0" },
  54         { 14, 630, "10.0" },
  55         { 15, 644, "11.0" },
  56         { 16, 658, "11.0" },
  57         { 17, 671, "11.0" },
  58         { 18, 683, "13.0" },
  59         { 19, 697, "13.0" },
  60         { 20, 711, "14.0" },
  61         { 21, 727, "14.0" },
  62         { 22, 746, "16.0" },
  63         { 23, 765, "16.0" }
  64 };
  65 
  66 // Another set of "mock" values
  67 // hacks id, prop_id, name[8], usec
  68 const ShutterSpeed shutter_speeds_table[] = {
  69         { -12, -384, "15", 15000000 },
  70         { -11, -352, "13", 13000000 },
  71         { -10, -320, "10", 10000000 },
  72         {  -9, -288, "8",   8000000 },
  73         {  -8, -256, "6",   6000000 },
  74         {  -7, -224, "5",   5000000 },
  75         {  -6, -192, "4",   4000000 },
  76         {  -5, -160, "3.2", 3200000 },
  77         {  -4, -128, "2.5", 2500000 },
  78         {  -3,  -96, "2",   2000000 },
  79         {  -2,  -64, "1.6", 1600000 },
  80         {  -1,  -32, "1.3", 1300000 },
  81         {   0,    0, "1",   1000000 },
  82         {   1,   32, "0.8",  800000 },
  83         {   2,   64, "0.6",  600000 },
  84         {   3,   96, "0.5",  500000 },
  85         {   4,  128, "0.4",  400000 },
  86         {   5,  160, "0.3",  300000 },
  87         {   6,  192, "1/4",  250000 },
  88         {   7,  224, "1/5",  200000 },
  89         {   8,  256, "1/6",  166667 },
  90         {   9,  288, "1/8",  125000 },
  91         {  10,  320, "1/10", 100000 },
  92         {  11,  352, "1/13",  76923 },
  93         {  12,  384, "1/15",  66667 },
  94         {  13,  416, "1/20",  50000 },
  95         {  14,  448, "1/25",  40000 },
  96         {  15,  480, "1/30",  33333 },
  97         {  16,  512, "1/40",  25000 },
  98         {  17,  544, "1/50",  20000 },
  99         {  18,  576, "1/60",  16667 },
 100         {  19,  608, "1/80",  12500 },
 101         {  20,  640, "1/100", 10000 },
 102         {  21,  672, "1/125",  8000 },
 103         {  22,  704, "1/160",  6250 },
 104         {  23,  736, "1/200",  5000 },
 105         {  24,  768, "1/250",  4000 },
 106         {  25,  800, "1/320",  3125 },
 107         {  26,  832, "1/400",  2500 },
 108         {  27,  864, "1/500",  2000 },
 109         {  28,  896, "1/640",  1563 },
 110         {  29,  928, "1/800",  1250 },
 111         {  30,  960, "1/1000", 1000 },
 112         {  31,  992, "1/1250",  800 },
 113         {  32, 1024, "1/1600",  625 },
 114         {  33, 1056, "1/2000",  500 },
 115         {  34, 1088, "1/2500",  400 },
 116         {  35, 1120, "1/3200",  313 }
 117 };
 118 
 119 const ISOTable iso_table[] = {
 120         { -1,    1,   "HI", -1},
 121         {  0,    0, "Auto", -1},
 122         {  1,   80,   "80", -1},
 123         {  2,  100,  "100", -1},
 124         {  3,  200,  "200", -1},
 125         {  4,  400,  "400", -1},
 126         {  5,  800,  "800", -1},
 127         {  6, 1600, "1600", -1},
 128         {  7, 3200, "3200", -1}
 129 };
 130 
 131 /*
 132 http://www.usa.canon.com/consumer/controller?act=ModelInfoAct&tabact=ModelTechSpecsTabAct&fcategoryid=224&modelid=16719
 133 
 134 Shooting Modes
 135         Auto, Camera M,
 136     Special Scene
 137         (Portrait, Foliage, Snow, Beach, Sunset, Fireworks, Aquarium, ISO 3200,
 138         Indoor, Kids & Pets, Night Snapshot),
 139     Color Accent, Color Swap, Digital Macro, Stitch Assist, Movie
 140 Movie: 640 x 480 (30 fps/30 fps LP), 320 x 240 (30 fps) available up to 4GB or 60 minutes,
 141     640 x 480 (up to 2 hours at 0.5 fps/1 fps), 160 x 120 (up to 3 min. at 15 fps)
 142 
 143 canon mode list FFAF9460 in 100b
 144 */
 145 const CapturemodeMap modemap[] = {
 146         { MODE_LONG_SHUTTER,       32774 }, // guessed
 147         { MODE_AUTO,               32768 },
 148         { MODE_P,                  32772 },
 149         { MODE_DIGITAL_MACRO,      33288 },
 150         { MODE_COLOR_ACCENT,       33307 },
 151         { MODE_COLOR_SWAP,         33308 },
 152         { MODE_STITCH,             33290 },
 153         //
 154         { MODE_NIGHT_SNAPSHOT,     16395 },
 155         { MODE_KIDS_PETS,          16400 },
 156         { MODE_INDOOR,             16401 },
 157         { MODE_SUNSET,             16402 },
 158         { MODE_FOLIAGE,            16403 },
 159         { MODE_SNOW,               16404 },
 160         { MODE_BEACH,              16405 },
 161         { MODE_FIREWORK,           16406 },
 162         { MODE_AQUARIUM,           16408 },
 163         { MODE_ISO_3200,           16413 },
 164         { MODE_PORTRAIT,           16397 },
 165         //
 166         { MODE_VIDEO_STD,          2599  },
 167         { MODE_VIDEO_COMPACT,      2601  },
 168         { MODE_VIDEO_COLOR_ACCENT, 2597  },
 169         { MODE_VIDEO_COLOR_SWAP,   2598  },
 170         { MODE_VIDEO_TIME_LAPSE,   2603  },
 171 };
 172 
 173 #include "../generic/shooting.c"
 174 
 175 long get_file_next_counter()
 176 {
 177         return get_file_counter();
 178 }
 179 
 180 long get_target_file_num()
 181 {
 182         long n;
 183 
 184         n = get_file_next_counter();
 185         n = (n>>4)&0x3FFF;
 186         return n;
 187 }
 188 
 189 long get_target_dir_num()
 190 {
 191         long n;
 192 
 193         n = get_file_next_counter();
 194         n = (n>>18)&0x3FF;
 195         return n;
 196 }

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