root/platform/g16/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 #include "stdlib.h"
   7 #include "platform.h"
   8 #include "stdio.h"
   9 
  10 #define PARAM_FILE_COUNTER      0x1        // see comments in ixus140 port
  11 
  12 // aperture values recorded at wide angle
  13 
  14 const ApertureSize aperture_sizes_table[] = {
  15     { 9,  171, "1.8" },
  16     { 10, 192, "2.0" },
  17     { 11, 224, "2.2" },
  18     { 12, 256, "2.5" },
  19     { 13, 288, "2.8" },
  20     { 14, 320, "3.2" },
  21     { 15, 352, "3.5" },
  22     { 16, 369, "4.0" },
  23     { 17, 401, "4.5" },
  24     { 18, 433, "5.0" },
  25     { 19, 465, "5.6" },
  26     { 20, 497, "6.3" },
  27     { 21, 529, "7.1" },
  28     { 22, 561, "8.0" },
  29 };
  30 
  31 const ShutterSpeed shutter_speeds_table[] = {
  32     { -12, -384, "15", 15000000 },
  33     { -11, -352, "13", 13000000 },
  34     { -10, -320, "10", 10000000 },
  35     {  -9, -288, "8",   8000000 },
  36     {  -8, -256, "6",   6000000 },
  37     {  -7, -224, "5",   5000000 },
  38     {  -6, -192, "4",   4000000 },
  39     {  -5, -160, "3.2", 3200000 },
  40     {  -4, -128, "2.5", 2500000 },
  41     {  -3,  -96, "2",   2000000 },
  42     {  -2,  -64, "1.6", 1600000 },
  43     {  -1,  -32, "1.3", 1300000 },
  44     {   0,    0, "1",   1000000 },
  45     {   1,   32, "0.8",  800000 },
  46     {   2,   64, "0.6",  600000 },
  47     {   3,   96, "0.5",  500000 },
  48     {   4,  128, "0.4",  400000 },
  49     {   5,  160, "0.3",  300000 },
  50     {   6,  192, "1/4",  250000 },
  51     {   7,  224, "1/5",  200000 },
  52     {   8,  256, "1/6",  166667 },
  53     {   9,  288, "1/8",  125000 },
  54     {  10,  320, "1/10", 100000 },
  55     {  11,  352, "1/13",  76923 },
  56     {  12,  384, "1/15",  66667 },
  57     {  13,  416, "1/20",  50000 },
  58     {  14,  448, "1/25",  40000 },
  59     {  15,  480, "1/30",  33333 },
  60     {  16,  512, "1/40",  25000 },
  61     {  17,  544, "1/50",  20000 },
  62     {  18,  576, "1/60",  16667 },
  63     {  19,  608, "1/80",  12500 },
  64     {  20,  640, "1/100", 10000 },
  65     {  21,  672, "1/125",  8000 },
  66     {  22,  704, "1/160",  6250 },
  67     {  23,  736, "1/200",  5000 },
  68     {  24,  768, "1/250",  4000 },
  69     {  25,  800, "1/320",  3125 },
  70     {  26,  832, "1/400",  2500 },
  71     {  27,  864, "1/500",  2000 },
  72     {  28,  896, "1/640",  1563 },
  73     {  29,  928, "1/800",  1250 },
  74     {  30,  960, "1/1000", 1000 },
  75     {  31,  992, "1/1250",  800 },
  76     {  32, 1024, "1/1600",  625 },
  77     {  33, 1056, "1/2000",  500 },
  78     {  34, 1088, "1/2500",  400 },
  79     {  35, 1120, "1/3200",  313 },
  80     {  36, 1152, "1/4000",  250 },
  81 };
  82 
  83 const ISOTable iso_table[] = {
  84     {  0,    0, " Auto", -1},
  85     {  1,   80,   "80", -1},
  86     {  2,  100,   "100", -1},
  87     {  3,  125,   "125", -1},
  88     {  4,  160,   "160", -1},
  89     {  5,  200,   "200", -1},
  90     {  6,  250,   "250", -1},
  91     {  7,  320,   "320", -1},
  92     {  8,  400,   "400", -1},
  93     {  9,  500,   "500", -1},
  94     { 10,  640,   "640", -1},
  95     { 11,  800,   "800", -1},
  96     { 12, 1000,  "1000", -1},
  97     { 13, 1250,  "1250", -1},
  98     { 14, 1600,  "1600", -1},
  99     { 15, 2000,  "2000", -1},
 100     { 16, 2500,  "2500", -1},
 101     { 18, 3200,  "3200", -1},
 102     { 19, 4000,  "4000", -1},
 103     { 20, 5000,  "5000", -1},
 104     { 21, 6400,  "6400", -1},
 105     { 22, 8000,  "8000", -1},
 106     { 23,10000, "10000", -1},
 107     { 24,12800, "12800", -1},
 108 };
 109 
 110 // Unknown values from canon_mode_list 0xfc7f8a3c Found @0xfc124510
 111 // 32830  0x803e In firmware but not in current modemap 
 112 // 32777  0x8009 In firmware but not in current modemap
 113 // 33332  0x8234 In firmware but not in current modemap
 114 // 33295  0x820f In firmware but not in current modemap
 115 //  4163  0x1043 In firmware but not in current modemap  <- invokes C1 when written to PROPCASE_SHOOTING_MODE 
 116 //  4164  0x1044 In firmware but not in current modemap  <- invokes C2 when written to PROPCASE_SHOOTING_MODE
 117 
 118 const CapturemodeMap modemap[] = {
 119 
 120 { MODE_VIDEO_STD             ,2633 }, //
 121 { MODE_VIDEO_SUPER_SLOW      ,2638 }, //
 122 { MODE_NOSTALGIC             ,8747 }, //
 123 { MODE_SUPER_VIVID           ,8748 }, //
 124 { MODE_POSTER_EFFECT         ,8749 }, //
 125 { MODE_FISHEYE               ,8753 }, //
 126 { MODE_MINIATURE             ,8754 }, //
 127 { MODE_TOY_CAMERA            ,8757 }, //
 128 { MODE_BACKGROUND_DEFOCUS    ,8758 }, //
 129 { MODE_SOFTFOCUS             ,8759 }, //
 130 { MODE_MONOCHROME            ,8761 }, //
 131 { MODE_HDR                   ,8769 }, //
 132 
 133 
 134 { MODE_PORTRAIT             ,16403 }, //
 135 { MODE_SNOW                 ,16411 }, //
 136 { MODE_FIREWORK             ,16413 }, //
 137 { MODE_STAR_NIGHTSCAPE      ,16447 }, //
 138 { MODE_STAR_TRAILS          ,16448 }, //
 139 { MODE_VIDEO_STAR_TIME_LAPSE,16465 }, //
 140 { MODE_UNDERWATER           ,16926 }, //
 141 { MODE_FACE_SELF_TIMER      ,16942 }, //
 142 { MODE_SMART_SHUTTER        ,16943 }, //
 143 { MODE_WINK_SELF_TIMER      ,16944 }, //
 144 { MODE_NIGHT_SCENE          ,16947 }, //
 145 
 146 { MODE_AUTO                 ,32768 }, //
 147 { MODE_M                    ,32769 }, //
 148 { MODE_AV                   ,32770 }, //
 149 { MODE_TV                   ,32771 }, //
 150 { MODE_P                    ,32772 }, //
 151 { MODE_HYBRID_AUTO          ,33296 }, //
 152 
 153 };
 154 
 155 #include "../generic/shooting.c"
 156 
 157 long get_file_next_counter() 
 158 {
 159     return get_file_counter();
 160 }
 161 
 162 long get_target_file_num() 
 163 {
 164     return get_exposure_counter();
 165 }
 166 
 167 #if defined(CAM_DATE_FOLDER_NAMING)
 168 /*
 169   CAM_DATE_FOLDER_NAMING should be 0x80, otherwise various filenames are returned
 170   this _GetImageFolder version only seems to take 3 arguments, but it doesn't hurt if a 4th one is provided
 171 */
 172 void get_target_dir_name(char *out)
 173 {
 174     extern void _GetImageFolder(char*,int,int,int);
 175     _GetImageFolder(out,get_file_next_counter(),CAM_DATE_FOLDER_NAMING,time(NULL));
 176 }
 177 #else
 178 long get_target_dir_num()
 179 {
 180     return 0;
 181 }
 182 #endif

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