root/platform/sx280hs/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 recorded at wide angle
  10 
  11 const ApertureSize aperture_sizes_table[] = {
  12     { 9, 352, "3.5" },
  13     { 10, 384, "4.0" },
  14     { 11, 416, "4.5" },
  15     { 12, 448, "5.0" },
  16     { 13, 480, "5.6" },
  17     { 14, 512, "6.3" },
  18     { 15, 544, "7.1" },
  19     { 16, 576, "8.0" }
  20 };
  21 
  22 const ShutterSpeed shutter_speeds_table[] = {
  23     { -12, -384, "15", 15000000 },
  24     { -11, -352, "13", 13000000 },
  25     { -10, -320, "10", 10000000 },
  26     {  -9, -288, "8",   8000000 },
  27     {  -8, -256, "6",   6000000 },
  28     {  -7, -224, "5",   5000000 },
  29     {  -6, -192, "4",   4000000 },
  30     {  -5, -160, "3.2", 3200000 },
  31     {  -4, -128, "2.5", 2500000 },
  32     {  -3,  -96, "2",   2000000 },
  33     {  -2,  -64, "1.6", 1600000 },
  34     {  -1,  -32, "1.3", 1300000 },
  35     {   0,    0, "1",   1000000 },
  36     {   1,   32, "0.8",  800000 },
  37     {   2,   64, "0.6",  600000 },
  38     {   3,   96, "0.5",  500000 },
  39     {   4,  128, "0.4",  400000 },
  40     {   5,  160, "0.3",  300000 },
  41     {   6,  192, "1/4",  250000 },
  42     {   7,  224, "1/5",  200000 },
  43     {   8,  256, "1/6",  166667 },
  44     {   9,  288, "1/8",  125000 },
  45     {  10,  320, "1/10", 100000 },
  46     {  11,  352, "1/13",  76923 },
  47     {  12,  384, "1/15",  66667 },
  48     {  13,  416, "1/20",  50000 },
  49     {  14,  448, "1/25",  40000 },
  50     {  15,  480, "1/30",  33333 },
  51     {  16,  512, "1/40",  25000 },
  52     {  17,  544, "1/50",  20000 },
  53     {  18,  576, "1/60",  16667 },
  54     {  19,  608, "1/80",  12500 },
  55     {  20,  640, "1/100", 10000 },
  56     {  21,  672, "1/125",  8000 },
  57     {  22,  704, "1/160",  6250 },
  58     {  23,  736, "1/200",  5000 },
  59     {  24,  768, "1/250",  4000 },
  60     {  25,  800, "1/320",  3125 },
  61     {  26,  832, "1/400",  2500 },
  62     {  27,  864, "1/500",  2000 },
  63     {  28,  896, "1/640",  1563 },
  64     {  29,  928, "1/800",  1250 },
  65     {  30,  960, "1/1000", 1000 },
  66     {  31,  992, "1/1250",  800 },
  67     {  32, 1024, "1/1600",  625 },
  68     {  33, 1056, "1/2000",  500 },
  69     {  34, 1088, "1/2500",  400 },
  70     {  35, 1120, "1/3200",  313 },
  71 };
  72 
  73 const ISOTable iso_table[] = {
  74     {  0,    0, "Auto", -1},
  75     {  1,  100,  "100", -1},
  76     {  2,  200,  "200", -1},
  77     {  3,  400,  "400", -1},
  78     {  4,  800,  "800", -1},
  79     {  5, 1600, "1600", -1},
  80     {  6, 3200, "3200", -1},
  81 };
  82 
  83 /*
  84 http://www.usa.canon.com/cusa/consumer/products/cameras/digital_cameras/powershot_sx280_hs#Specifications
  85 */
  86 /*
  87 modelist @ 0xfc731150
  88 fc731150: 8001
  89 fc731152: 8003
  90 fc731154: 8002
  91 fc731156: 8004
  92 fc731158: 823b
  93 fc73115a: 823a
  94 fc73115c: 820d
  95 fc73115e: 2232
  96 fc731160: 2231
  97 fc731162: 2235
  98 fc731164: 2236
  99 fc731166: 2238
 100 fc731168: 8223
 101 fc73116a: 8224
 102 fc73116c: 222c
 103 fc73116e: 222d
 104 fc731170: 401b
 105 fc731172: 4013
 106 fc731174: 8214
 107 fc731176: 4233
 108 fc731178: 4009
 109 fc73117a: 401e
 110 fc73117c: 401d
 111 fc73117e: 8207
 112 fc731180: 820f
 113 fc731182: 8010
 114 fc731184: 8000
 115 fc731186: 422e
 116 fc731188: 422f
 117 fc73118a: 4230
 118 fc73118c: 8037
 119 fc73118e: 0a44
 120 fc731190: 0a49
 121 fc731192: ffff
 122 */
 123 
 124 const CapturemodeMap modemap[] = {
 125 
 126 { MODE_VIDEO_STD             ,2628 },
 127 { MODE_VIDEO_SUPER_SLOW      ,2633 },
 128 { MODE_SUPER_VIVID           ,8748 },
 129 { MODE_POSTER_EFFECT         ,8749 },
 130 { MODE_FISHEYE               ,8753 },
 131 { MODE_MINIATURE             ,8754 },
 132 { MODE_TOY_CAMERA            ,8757 },
 133 { MODE_SOFTFOCUS             ,8758 },
 134 { MODE_MONOCHROME            ,8760 },
 135 { MODE_HIGHSPEED_BURST | MODE_DISABLE_RAW ,16393 }, // highspeed burst hq
 136 { MODE_PORTRAIT             ,16403 },
 137 { MODE_SNOW                 ,16411 },
 138 { MODE_FIREWORK             ,16413 },
 139 { MODE_UNDERWATER           ,16414 },
 140 { MODE_FACE_SELF_TIMER      ,16942 }, // smart shutter, face self timer
 141 { MODE_SMART_SHUTTER        ,16943 }, // smart shutter, smile detection
 142 { MODE_WINK_SELF_TIMER      ,16944 }, // smart shutter, wink self timer
 143 { MODE_NIGHT_SCENE | MODE_DISABLE_RAW ,16947 }, // handheld night scene
 144 { MODE_AUTO | MODE_DISABLE_RAW ,32768 },
 145 { MODE_M                    ,32769 },
 146 { MODE_AV                   ,32770 },
 147 { MODE_TV                   ,32771 },
 148 { MODE_P                    ,32772 },
 149 { MODE_HYBRID_AUTO | MODE_DISABLE_RAW ,32784 },
 150 { MODE_DISCREET             ,32823 },
 151 { MODE_SPORTS | MODE_DISABLE_RAW ,33287 },
 152 { MODE_STITCH               ,33293 }, // stitch, unofficial, may crash
 153 //{                         ,  33295 }, // crash and lock up :(
 154 { MODE_SMOOTH_SKIN          ,33300 }, // unofficial?
 155 { MODE_COLOR_ACCENT         ,33315 }, // color accent
 156 { MODE_COLOR_SWAP           ,33316 }, // color swap
 157 { MODE_LIVE                 ,33338 },
 158 { MODE_VIDEO_MOVIE_DIGEST   ,33339 }  // movie digest, unofficial (same functionality under hybrid auto)
 159 
 160 };
 161 
 162 #include "../generic/shooting.c"
 163 
 164 long get_file_next_counter() {
 165     return get_file_counter();
 166 }
 167 
 168 long get_target_file_num() {
 169     return get_exposure_counter();
 170 }
 171 #if defined(CAM_DATE_FOLDER_NAMING)
 172 /*
 173   CAM_DATE_FOLDER_NAMING should be 0x80, otherwise various filenames are returned
 174   this _GetImageFolder version only seems to take 3 arguments, but it doesn't hurt if a 4th one is provided
 175 */
 176 void get_target_dir_name(char *out)
 177 {
 178     extern void _GetImageFolder(char*,int,int,int);
 179     _GetImageFolder(out,get_file_next_counter(),CAM_DATE_FOLDER_NAMING,time(NULL));
 180 }
 181 #else
 182 long get_target_dir_num() 
 183 {
 184     return 0;
 185 }
 186 #endif

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