root/platform/m3/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 #include "lolevel.h"
   2 #include "platform.h"
   3 #include "core.h"
   4 #include "conf.h"
   5 #include "keyboard.h"
   6 
   7 #define PARAM_FILE_COUNTER      0x1        // see comments in ixus140 port
   8 
   9 // aperture values from PROPCASE_USER_AV, step size 1/3EV
  10 const ApertureSize aperture_sizes_table[] = {
  11     { 6,   64, "1.2" },
  12     { 7,   96, "1.4" },
  13     { 8,  128, "1.6" },
  14     { 9,  160, "1.8" },
  15     { 10, 192, "2.0" },
  16     { 11, 224, "2.2" },
  17     { 12, 256, "2.5" },
  18     { 13, 288, "2.8" },
  19     { 14, 320, "3.2" },
  20     { 15, 352, "3.5" },
  21     { 16, 384, "4.0" },
  22     { 17, 416, "4.5" },
  23     { 18, 448, "5.0" },
  24     { 19, 480, "5.6" },
  25     { 20, 512, "6.3" },
  26     { 21, 544, "7.1" },
  27     { 22, 576, "8.0" },
  28     { 23, 608, "9.0" },
  29     { 24, 640, "10.0" },
  30     { 25, 672, "11.0" },
  31     { 26, 704, "13.0" },
  32     { 27, 736, "14.0" },
  33     { 28, 768, "16.0" },
  34     { 29, 800, "18.0" },
  35     { 30, 832, "20.0" },
  36     { 31, 864, "22.0" },
  37 };
  38 
  39 // note camera supports up to 30s shutter
  40 const ShutterSpeed shutter_speeds_table[] = {
  41     { -15, -480, "30",   30000000 },
  42     { -14, -448, "25",   25000000 },
  43     { -13, -416, "20",   20000000 },
  44     { -12, -384, "15",   15000000 },
  45     { -11, -352, "13",   13000000 },
  46     { -10, -320, "10",   10000000 },
  47     {  -9, -288, "8",     8000000 },
  48     {  -8, -256, "6",     6000000 },
  49     {  -7, -224, "5",     5000000 },
  50     {  -6, -192, "4",     4000000 },
  51     {  -5, -160, "3.2",   3200000 },
  52     {  -4, -128, "2.5",   2500000 },
  53     {  -3,  -96, "2",     2000000 },
  54     {  -2,  -64, "1.6",   1600000 },
  55     {  -1,  -32, "1.3",   1300000 },
  56     {   0,    0, "1",     1000000 },
  57     {   1,   32, "0.8",    800000 },
  58     {   2,   64, "0.6",    600000 },
  59     {   3,   96, "0.5",    500000 },
  60     {   4,  128, "0.4",    400000 },
  61     {   5,  160, "0.3",    300000 },
  62     {   6,  192, "1/4",    250000 },
  63     {   7,  224, "1/5",    200000 },
  64     {   8,  256, "1/6",    166667 },
  65     {   9,  288, "1/8",    125000 },
  66     {  10,  320, "1/10",   100000 },
  67     {  11,  352, "1/13",    76923 },
  68     {  12,  384, "1/15",    66667 },
  69     {  13,  416, "1/20",    50000 },
  70     {  14,  448, "1/25",    40000 },
  71     {  15,  480, "1/30",    33333 },
  72     {  16,  512, "1/40",    25000 },
  73     {  17,  544, "1/50",    20000 },
  74     {  18,  576, "1/60",    16667 },
  75     {  19,  608, "1/80",    12500 },
  76     {  20,  640, "1/100",   10000 },
  77     {  21,  672, "1/125",    8000 },
  78     {  22,  704, "1/160",    6250 },
  79     {  23,  736, "1/200",    5000 },
  80     {  24,  768, "1/250",    4000 },
  81     {  25,  800, "1/320",    3125 },
  82     {  26,  832, "1/400",    2500 },
  83     {  27,  864, "1/500",    2000 },
  84     {  28,  896, "1/640",    1563 },
  85     {  29,  928, "1/800",    1250 },
  86     {  30,  960, "1/1000",   1000 },
  87     {  31,  992, "1/1250",    800 },
  88     {  32, 1024, "1/1600",    625 },
  89     {  33, 1056, "1/2000",    500 },
  90     {  34, 1088, "1/2500",    400 },
  91     {  35, 1120, "1/3200",    313 },
  92     {  36, 1152, "1/4000",    250 },
  93 };
  94 
  95 const ISOTable iso_table[] = {
  96         {  0,    0, " Auto", -1},
  97         {  1,  100,   "100", -1},
  98         {  2,  125,   "125", -1},
  99         {  3,  160,   "160", -1},
 100         {  4,  200,   "200", -1},
 101         {  5,  250,   "250", -1},
 102         {  6,  320,   "320", -1},
 103         {  7,  400,   "400", -1},
 104         {  8,  500,   "500", -1},
 105         {  9,  640,   "640", -1},
 106         { 10,  800,   "800", -1},
 107         { 11, 1000,  "1000", -1},
 108         { 12, 1250,  "1250", -1},
 109         { 13, 1600,  "1600", -1},
 110         { 14, 2000,  "2000", -1},
 111         { 15, 2500,  "2500", -1},
 112         { 16, 3200,  "3200", -1},
 113         { 17, 4000,  "4000", -1},
 114         { 18, 5000,  "5000", -1},
 115         { 19, 6400,  "6400", -1},
 116         { 20, 8000,  "8000", -1},
 117         { 21,10000, "10000", -1},
 118         { 22,12800, "12800", -1},
 119 };
 120 
 121 const CapturemodeMap modemap[] = {
 122 // note canon values for P, M etc have shifted by one 
 123 { MODE_AUTO                 ,32768 },
 124 { MODE_M                    ,32770 },
 125 { MODE_AV                   ,32771 },
 126 { MODE_TV                   ,32772 },
 127 { MODE_P                    ,32773 },
 128 { MODE_HDR                  ,8775 },
 129 { MODE_NOSTALGIC            ,8753 },
 130 { MODE_FISHEYE              ,8759 },
 131 { MODE_MINIATURE            ,8760 },
 132 { MODE_TOY_CAMERA           ,8763 },
 133 { MODE_BACKGROUND_DEFOCUS   ,8764 },
 134 { MODE_SOFTFOCUS            ,8765 },
 135 { MODE_MONOCHROME           ,8767 },
 136 { MODE_SUPER_VIVID          ,8754 },
 137 { MODE_POSTER_EFFECT        ,8755 },
 138 { MODE_PORTRAIT             ,16406 },
 139 { MODE_FACE_SELF_TIMER      ,16948 },
 140 { MODE_SMART_SHUTTER        ,16949 }, // smile detection
 141 { MODE_WINK_SELF_TIMER      ,16950 },
 142 { MODE_STAR_PORTRAIT        ,16452 },
 143 { MODE_STAR_NIGHTSCAPE      ,16453 },
 144 { MODE_STAR_TRAILS          ,16454 },
 145 { MODE_NIGHT_SCENE | MODE_DISABLE_RAW ,16953 }, // handheld night scene
 146 { MODE_UNDERWATER           ,16929 },
 147 { MODE_SNOW                 ,16414 },
 148 { MODE_FIREWORK             ,16416 },
 149 { MODE_CREATIVE_EFFECT      ,33299 }, // Creative shot, various sub modes all use same number
 150 { MODE_HYBRID_AUTO | MODE_DISABLE_RAW ,33298 }, // like movie digest
 151 //{                         ,33297 }, // ???
 152 { MODE_VIDEO_STD             ,2643 }, // standard video on dial, regardless of res or FPS
 153 { MODE_VIDEO_IFRAME_MOVIE    ,2650 },
 154 { MODE_VIDEO_M               ,2651 }, // M video
 155 { MODE_VIDEO_STAR_TIME_LAPSE,16459 }, // VIDEO?
 156 //{                         ,4172 }, // C, in propcase 54
 157 };
 158 
 159 #include "../generic/shooting.c"
 160 
 161 long get_file_next_counter() {
 162     return get_file_counter();
 163 }
 164 
 165 long get_target_file_num() {
 166     return get_exposure_counter();
 167 }
 168 /*
 169 CAM_DATE_FOLDER_NAMING values
 170 0x000   A/DCIM/1nn___nn/MRK_nnnn.MRK
 171 0x001   A/DCIM/1nn___nn/ETC_nnnn.TMP
 172 0x002   A/DCIM/1nn___nn/IMG_nnnn.JPG
 173 0x004   A/DCIM/1nn___nn/MVI_nnnn.THM
 174 0x008   A/DCIM/1nn___nn/SND_nnnn.WAV
 175 0x010   A/DCIM/1nn___nn/IMG_nnnn.CR2
 176 0x020   A/DCIM/1nn___nn/MVI_nnnn.MOV
 177 0x040   A/DCIM/1nn___nn/MVI_nnnn.MP4
 178 0x080   A/DCIM/1nn___nn
 179 0x100   A/DCIM/1nn___nn/ETC_nnnn.TMP
 180 larger values and multiple bits also seem to be ETC_nnnn.TMP
 181 */
 182 #if defined(CAM_DATE_FOLDER_NAMING)
 183 void get_target_dir_name(char *out)
 184 {
 185     extern void _GetImageFolder(char*,int,int,int);
 186     _GetImageFolder(out,get_file_next_counter(),CAM_DATE_FOLDER_NAMING,time(NULL));
 187 }
 188 #else
 189 long get_target_dir_num() 
 190 {
 191     return 0;
 192 }
 193 #endif

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