root/platform/a590/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 
   3 // DRYOS-Notes:
   4 // propertycase
   5 //   196 - overall brightness (of viewport?)
   6 
   7 #include "platform.h"
   8 
   9 const ApertureSize aperture_sizes_table[] = {
  10     {  9, 273, "2.6" },
  11         { 10, 288, "2.8" },
  12     { 11, 320, "3.2" },
  13     { 13, 352, "3.5" },
  14     { 13, 384, "4.0" },
  15     { 14, 416, "4.5" },
  16     { 14, 448, "5.0" },
  17     { 15, 480, "5.6" },
  18     { 16, 512, "6.3" },
  19     { 17, 544, "7.1" },
  20     { 18, 576, "8.0" },
  21 };
  22 
  23 const ShutterSpeed shutter_speeds_table[] = {
  24     { -12, -384, "15", 15000000 },
  25     { -11, -352, "13", 13000000 },
  26     { -10, -320, "10", 10000000 },
  27     {  -9, -288, "8",   8000000 },
  28     {  -8, -256, "6",   6000000 },
  29     {  -7, -224, "5",   5000000 },
  30     {  -6, -192, "4",   4000000 },
  31     {  -5, -160, "3.2", 3200000 },
  32     {  -4, -128, "2.5", 2500000 },
  33     {  -3,  -96, "2",   2000000 },
  34     {  -2,  -64, "1.6", 1600000 },
  35     {  -1,  -32, "1.3", 1300000 },
  36     {   0,    0, "1",   1000000 },
  37     {   1,   32, "0.8",  800000 },
  38     {   2,   64, "0.6",  600000 },
  39     {   3,   96, "0.5",  500000 },
  40     {   4,  128, "0.4",  400000 },
  41     {   5,  160, "0.3",  300000 },
  42     {   6,  192, "1/4",  250000 },
  43     {   7,  224, "1/5",  200000 },
  44     {   8,  256, "1/6",  166667 },
  45     {   9,  288, "1/8",  125000 },
  46     {  10,  320, "1/10", 100000 },
  47     {  11,  352, "1/13",  76923 },
  48     {  12,  384, "1/15",  66667 },
  49     {  13,  416, "1/20",  50000 },
  50     {  14,  448, "1/25",  40000 },
  51     {  15,  480, "1/30",  33333 },
  52     {  16,  512, "1/40",  25000 },
  53     {  17,  544, "1/50",  20000 },
  54     {  18,  576, "1/60",  16667 },
  55     {  19,  608, "1/80",  12500 },
  56     {  20,  640, "1/100", 10000 },
  57     {  21,  672, "1/125",  8000 },
  58     {  22,  704, "1/160",  6250 },
  59     {  23,  736, "1/200",  5000 },
  60     {  24,  768, "1/250",  4000 },
  61     {  25,  800, "1/320",  3125 },
  62     {  26,  832, "1/400",  2500 },
  63     {  27,  864, "1/500",  2000 },
  64     {  28,  896, "1/640",  1563 },
  65     {  29,  928, "1/800",  1250 },
  66     {  30,  960, "1/1000", 1000 },
  67     {  31,  992, "1/1250",  800 },
  68     {  32, 1021, "1/1600",  625 },
  69     {  33, 1053, "1/2000",  500 },
  70 };
  71 
  72 const ISOTable iso_table[] = {
  73     { -1,    1,   "HI", -1},
  74     {  0,    0, "Auto", -1},
  75     {  1,   80,   "80", -1},
  76     {  2,  100,  "100", -1},
  77     {  3,  200,  "200", -1},
  78     {  4,  400,  "400", -1},
  79     {  5,  800,  "800", -1},
  80     {  6, 1600, "1600", -1},
  81 };          
  82 
  83 /*
  84 http://www.usa.canon.com/consumer/controller?act=ModelInfoAct&tabact=ModelTechSpecsTabAct&fcategoryid=221&modelid=16336 
  85 Shooting Modes
  86         Auto, Easy, P, Av, Tv, M, Portrait, Landscape,
  87         Special Scene 
  88                 Foliage, Snow, Beach, Sunset, Fireworks, Night Scene, Aquarium
  89         Indoor, Kids & Pets, Night Snapshot, Movie <- yes, these are dial, not scene!
  90 video resolutions
  91 640 x 480 (20 fps/20 fps LP), 320 x 240 (30 fps) available up to 4GB or 60 minutes,
  92 160 x 120 (3 minutes at 15 fps) 
  93 canon mode list @FFEAED68 in 100e
  94 */
  95 // PROPCASE 49, verified by whim in http://chdk.setepontos.com/index.php/topic,3228.msg44199.html#msg44199
  96 const CapturemodeMap modemap[] = {
  97 // common modes
  98         { MODE_M,                  32769 },
  99         { MODE_TV,                 32771 },
 100         { MODE_AV,                 32770 },
 101     { MODE_P,                  32772 },
 102     { MODE_AUTO,               32768 },
 103         { MODE_PORTRAIT,           32781 },
 104         { MODE_INDOOR,             32785 },
 105         
 106         { MODE_KIDS_PETS,          32784 },
 107         { MODE_LANDSCAPE,          32780 },
 108     { MODE_NIGHT_SNAPSHOT,     32779 },
 109     { MODE_NIGHT_SCENE,        16398 },
 110     { MODE_SUNSET,             16402 },
 111     { MODE_FOLIAGE,            16403 },
 112     { MODE_SNOW,               16404 },
 113     { MODE_BEACH,              16405 },
 114 //    { ???,                   32791 }, in canon mode list, has underwater icon ?
 115     { MODE_AQUARIUM,           16408 },
 116     { MODE_FIREWORK,           16406 },
 117     { MODE_VIDEO_STD,           2599 },
 118     { MODE_VIDEO_COMPACT,       2601 },
 119     { MODE_EASY,               33311 },
 120 // not in canon list, but set OK 
 121 // 33306 ?
 122 //  2597 note: this was listed as VIDEO_STD in the old mode map,
 123 //       but that is actually 2599 per whims test. Sets compact mode.
 124 // 33288 macro/digital macro ?
 125 //
 126 };
 127 
 128 #include "../generic/shooting.c"
 129 
 130 const int dof_tbl[] = {5800, 6420, 7060, 7700, 8340, 9950, 11550, 13160, 14750, 17150, 19570, 22760, 26750, 30750, 34800};
 131 const int dof_tbl_size = sizeof(dof_tbl)/sizeof(dof_tbl[0]);
 132 
 133 long get_file_next_counter() {
 134     return get_file_counter();
 135 }
 136 
 137 long get_target_file_num() {
 138     long n;
 139     
 140     n = get_file_next_counter();
 141     n = (n>>4)&0x3FFF;
 142     return n;
 143 }
 144 
 145 long get_target_dir_num() {
 146     long n;
 147     
 148     n = get_file_next_counter();
 149     n = (n>>18)&0x3FF;
 150     return n;
 151 }

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