root/platform/s95/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 26
  10     {  9, 201, "2.0" },
  11     { 10, 224, "2.2" },
  12     { 11, 256, "2.5" },
  13     { 12, 288, "2.8" },
  14     { 13, 320, "3.2" },
  15     { 14, 352, "3.5" },
  16     { 15, 384, "4.0" },
  17     { 16, 416, "4.5" },
  18     { 17, 448, "5.0" },
  19     { 18, 480, "5.6" },
  20     { 19, 512, "6.3" },
  21     { 20, 544, "7.1" },
  22         { 21, 576, "8.0" },
  23 };
  24 
  25 // id, prop_id, name, usec;
  26 const ShutterSpeed shutter_speeds_table[] = {
  27     { -12, -384, "15", 15000000 },
  28     { -11, -352, "13", 13000000 },
  29     { -10, -320, "10", 10000000 },
  30     {  -9, -288, "8",   8000000 },
  31     {  -8, -256, "6",   6000000 },
  32     {  -7, -224, "5",   5000000 },
  33     {  -6, -192, "4",   4000000 },
  34     {  -5, -160, "3.2", 3200000 },
  35     {  -4, -128, "2.5", 2500000 },
  36     {  -3,  -96, "2",   2000000 },
  37     {  -2,  -64, "1.6", 1600000 },
  38     {  -1,  -32, "1.3", 1300000 },
  39     {   0,    0, "1",   1000000 },
  40     {   1,   32, "0.8",  800000 },
  41     {   2,   64, "0.6",  600000 },
  42     {   3,   96, "0.5",  500000 },
  43     {   4,  128, "0.4",  400000 },
  44     {   5,  160, "0.3",  300000 },
  45     {   6,  192, "1/4",  250000 },
  46     {   7,  224, "1/5",  200000 },
  47     {   8,  256, "1/6",  166667 },
  48     {   9,  288, "1/8",  125000 },
  49     {  10,  320, "1/10", 100000 },
  50     {  11,  352, "1/13",  76923 },
  51     {  12,  384, "1/15",  66667 },
  52     {  13,  416, "1/20",  50000 },
  53     {  14,  448, "1/25",  40000 },
  54     {  15,  480, "1/30",  33333 },
  55     {  16,  512, "1/40",  25000 },
  56     {  17,  544, "1/50",  20000 },
  57     {  18,  576, "1/60",  16667 },
  58     {  19,  608, "1/80",  12500 },
  59     {  20,  640, "1/100", 10000 },
  60     {  21,  672, "1/125",  8000 },
  61     {  22,  704, "1/160",  6250 },
  62     {  23,  736, "1/200",  5000 },
  63     {  24,  768, "1/250",  4000 },
  64     {  25,  800, "1/320",  3125 },
  65     {  26,  832, "1/400",  2500 },
  66     {  27,  864, "1/500",  2000 },
  67     {  28,  896, "1/640",  1563 },
  68     {  29,  928, "1/800",  1250 },
  69     {  30,  960, "1/1000", 1000 },
  70     {  31,  992, "1/1250",  800 },
  71     {  32, 1024, "1/1600",  625 }
  72 };
  73 
  74 const ISOTable iso_table[] = {
  75     {  0,     0,  "Auto", -1},
  76     {  1,    80,    "80", -1},
  77     {  2,   100,   "100", -1},
  78         {  3,   125,   "125", -1},
  79         {  4,   160,   "160", -1},
  80     {  5,   200,   "200", -1},
  81         {  6,   250,   "250", -1},
  82         {  7,   320,   "320", -1},
  83     {  8,   400,   "400", -1},
  84         {  9,   500,   "500", -1},
  85         { 10,   640,   "650", -1},
  86     { 11,   800,   "800", -1},
  87         { 12,  1000,  "1000", -1},
  88         { 13,  1250,  "1250", -1},
  89     { 14,  1600,  "1600", -1},
  90         { 15,  2000,  "2000", -1},
  91         { 16,  2500,  "2500", -1},
  92     { 17,  3200,  "3200", -1}
  93 };
  94 
  95 const CapturemodeMap modemap[] = {
  96         { MODE_P,                  32772  },
  97         { MODE_TV,                 32771  },
  98         { MODE_AV,                 32770  },
  99         { MODE_M,                  32769  },
 100         { MODE_AUTO,               32768  },
 101     { MODE_LOWLIGHT,           32801  },
 102 
 103         { MODE_VIDEO_COLOR_ACCENT, 2612   },
 104         { MODE_VIDEO_COLOR_SWAP,   2613   },
 105     { MODE_VIDEO_MINIATURE,    2620   },
 106         { MODE_VIDEO_STD,          2614   },
 107 
 108         { MODE_PORTRAIT,           16399  },
 109         { MODE_LANDSCAPE,          16398  },
 110         { MODE_KIDS_PETS,          16402  },
 111     { MODE_FACE_SELF_TIMER,    16936  },
 112         { MODE_SMART_SHUTTER,      16937  },
 113     { MODE_WINK_SELF_TIMER,    16938  },
 114         { MODE_SUPER_VIVID,        16934  },
 115         { MODE_POSTER_EFFECT,      16935  },
 116         { MODE_COLOR_ACCENT,       16925  },
 117         { MODE_COLOR_SWAP,         16926  },
 118         { MODE_HDR,                16942  },
 119         { MODE_NOSTALGIC,          16933  },
 120         { MODE_FISHEYE,            16939  },
 121         { MODE_MINIATURE,          16940  },
 122         { MODE_BEACH,              16407  },
 123         { MODE_UNDERWATER,         16409  },
 124         { MODE_FOLIAGE,            16405  },
 125         { MODE_SNOW,               16406  },
 126         { MODE_FIREWORK,           16408  },
 127     { MODE_STITCH,             16908  },
 128 };
 129 
 130 
 131 #include "../generic/shooting.c"
 132 
 133 const int dof_tbl[] = {6000, 6850, 7490, 8560, 9640, 10700, 12850, 14980, 18190, 22500};
 134 const int dof_tbl_size = sizeof(dof_tbl)/sizeof(dof_tbl[0]);
 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 #if defined(CAM_DATE_FOLDER_NAMING)
 149 void get_target_dir_name(char *out) {
 150     extern void _GetImageFolder(char*,int,int,int);
 151     out[0] = 'A';
 152     _GetImageFolder(out+1,get_file_next_counter(),CAM_DATE_FOLDER_NAMING,time(NULL));
 153     out[15] = '\0';
 154 }
 155 #else
 156 long get_target_dir_num() {
 157     long n;
 158 
 159     n = get_file_next_counter();
 160     n = (n>>18)&0x3FF;
 161     return n;
 162 }
 163 #endif
 164 

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