root/platform/a3100/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 #define PARAM_FILE_COUNTER      0x3A 
   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 // aperture_sizes_table[].id is just a serial number.
   9 const ApertureSize aperture_sizes_table[] = { // PROPCASE 23 at different zoom steps
  10     {  9, 274, "2.7" }, 
  11     { 10, 297, "2.8" }, 
  12     { 11, 321, "3.2" },
  13     { 12, 349, "3.5" },
  14     { 13, 379, "4.0" },
  15     { 14, 413, "4.5" },
  16     { 15, 447, "5.0" },
  17     { 16, 483, "5.6" },
  18         /* With ND Filter*/
  19         { 17, 562, "8.0" },
  20         { 18, 585, "8.0" },
  21         { 19, 609, "9.0" },
  22         { 20, 637, "10.0" },
  23         { 21, 667, "11.0" },
  24         { 22, 701, "13.0" },
  25         { 23, 735, "14.0" },
  26 };
  27 
  28 const ShutterSpeed shutter_speeds_table[] = {
  29     { -12, -384, "15", 15000000 },
  30     { -11, -352, "13", 13000000 },
  31     { -10, -320, "10", 10000000 },
  32     {  -9, -288, "8",   8000000 },
  33     {  -8, -256, "6",   6000000 },
  34     {  -7, -224, "5",   5000000 },
  35     {  -6, -192, "4",   4000000 },
  36     {  -5, -160, "3.2", 3200000 },
  37     {  -4, -128, "2.5", 2500000 },
  38     {  -3,  -96, "2",   2000000 },
  39     {  -2,  -64, "1.6", 1600000 },
  40     {  -1,  -32, "1.3", 1300000 },
  41     {   0,    0, "1",   1000000 },
  42     {   1,   31, "0.8",  800000 },
  43     {   2,   71, "0.6",  600000 },
  44     {   3,   87, "0.5",  500000 },
  45     {   4,  128, "0.4",  400000 },
  46     {   5,  147, "0.3",  300000 },
  47     {   6,  178, "1/4",  250000 },
  48     {   7,  224, "1/5",  200000 },
  49     {   8,  250, "1/6",  166667 },
  50     {   9,  291, "1/8",  125000 },
  51     {  10,  334, "1/10", 100000 },
  52     {  11,  359, "1/13",  76923 },
  53     {  12,  376, "1/15",  66667 },
  54     {  13,  421, "1/20",  50000 },
  55     {  14,  448, "1/25",  40000 },
  56     {  15,  480, "1/30",  33333 },
  57     {  16,  525, "1/40",  25000 },
  58     {  17,  529, "1/50",  20000 },
  59     {  18,  574, "1/60",  16667 },
  60     {  19,  615, "1/80",  12500 },
  61     {  20,  652, "1/100", 10000 },
  62     {  21,  672, "1/125",  8000 },
  63     {  22,  702, "1/160",  6250 },
  64     {  23,  736, "1/200",  5000 },
  65     {  24,  761, "1/250",  4000 },
  66     {  25,  815, "1/320",  3125 },
  67     {  26,  827, "1/400",  2500 },
  68     {  27,  864, "1/500",  2000 },
  69     {  28,  906, "1/640",  1563 },
  70     {  29,  915, "1/800",  1250 },
  71     {  30,  971, "1/1000", 1000 },
  72     {  31,  992, "1/1250",  800 },
  73     {  32, 1024, "1/1600",  625 }
  74 };
  75 
  76 const ISOTable iso_table[] = {
  77     {  0,     0,  "Auto", -1},
  78     {  1,   100,   "100", -1},
  79     {  2,   200,   "200", -1},
  80     {  3,   400,   "400", -1},
  81     {  4,   800,   "800", -1},
  82     {  5,  1600,  "1600", -1}
  83 };        
  84 
  85 const CapturemodeMap modemap[] = { // a3100 prop 49
  86         { MODE_AUTO,               32768  },
  87         { MODE_P,                  32772  },
  88         { MODE_VIDEO_STD,          2609 },
  89         { MODE_EASY,               33314  },
  90         { MODE_PORTRAIT,           32783  },
  91         { MODE_LANDSCAPE,              32782  },
  92         { MODE_NIGHT_SCENE,        32781  },
  93         { MODE_KIDS_PETS,          32786  },
  94         { MODE_INDOOR,                 32787  },
  95         { MODE_FACE_SELF_TIMER,    16936  },
  96         // modes in mode map but not on dial:
  97     { MODE_LOWLIGHT,               16417  },
  98     { MODE_SUPER_VIVID,            16934  },
  99     { MODE_POSTER_EFFECT,      16935  },
 100     { MODE_BEACH,              16407  },
 101     { MODE_FOLIAGE,                16405  },
 102     { MODE_SNOW,               16406  },
 103     { MODE_FIREWORK,               16408  },
 104     { MODE_LONG_SHUTTER,       16390  }
 105 };
 106 
 107 
 108 #include "../generic/shooting.c"
 109 
 110 const int dof_tbl[] = {6200, 7780, 9410, 11370, 13790, 16770, 20180, 24800};
 111 const int dof_tbl_size = sizeof(dof_tbl)/sizeof(dof_tbl[0]);
 112 
 113 long get_file_next_counter() {
 114     return get_file_counter();
 115 }
 116 
 117 long get_target_file_num() {
 118     long n;
 119     
 120     n = get_file_next_counter();
 121     n = (n>>4)&0x3FFF;
 122     return n;
 123 }
 124 
 125 #if defined(CAM_DATE_FOLDER_NAMING)
 126 void get_target_dir_name(char *out)
 127 {
 128         extern void _GetImageFolder(char*,int,int,int);
 129         out[0] = 'A';
 130         _GetImageFolder(out+1,get_file_next_counter(),CAM_DATE_FOLDER_NAMING,time(NULL));
 131 }
 132 #else
 133 long get_target_dir_num() {
 134         long n;
 135         
 136         n = get_file_next_counter();
 137         n = (n>>18)&0x3FF;
 138         return n;
 139 }
 140 #endif

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