root/platform/sx60hs/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 extern void _LogCameraEvent(int id, const char *fmt,...);
  12 // aperture values recorded at wide angle
  13 //sx60 checked with propcase item 26
  14 //!pt=require'extras/proptools'
  15 //con 12> !pl=pt.get(26)
  16 //con 13> !pt.print(pl)
  17 const ApertureSize aperture_sizes_table[] = {
  18     { 9, 352, "3.4" },
  19     { 10, 384, "4.0" },
  20     { 11, 416, "4.5" },
  21     { 12, 448, "5.0" },
  22     { 13, 480, "5.6" },
  23     { 14, 512, "6.3" },
  24     { 15, 544, "7.1" },
  25     { 16, 576, "8.0" }
  26 };
  27 //sx60 verified, up to 2000 propcase item #268
  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,   32, "0.8",  800000 },
  43     {   2,   64, "0.6",  600000 },
  44     {   3,   96, "0.5",  500000 },
  45     {   4,  128, "0.4",  400000 },
  46     {   5,  160, "0.3",  300000 },
  47     {   6,  192, "1/4",  250000 },
  48     {   7,  224, "1/5",  200000 },
  49     {   8,  256, "1/6",  166667 },
  50     {   9,  288, "1/8",  125000 },
  51     {  10,  320, "1/10", 100000 },
  52     {  11,  352, "1/13",  76923 },
  53     {  12,  384, "1/15",  66667 },
  54     {  13,  416, "1/20",  50000 },
  55     {  14,  448, "1/25",  40000 },
  56     {  15,  480, "1/30",  33333 },
  57     {  16,  512, "1/40",  25000 },
  58     {  17,  544, "1/50",  20000 },
  59     {  18,  576, "1/60",  16667 },
  60     {  19,  608, "1/80",  12500 },
  61     {  20,  640, "1/100", 10000 },
  62     {  21,  672, "1/125",  8000 },
  63     {  22,  704, "1/160",  6250 },
  64     {  23,  736, "1/200",  5000 },
  65     {  24,  768, "1/250",  4000 },
  66     {  25,  800, "1/320",  3125 },
  67     {  26,  832, "1/400",  2500 },
  68     {  27,  864, "1/500",  2000 },
  69     {  28,  896, "1/640",  1563 },
  70     {  29,  928, "1/800",  1250 },
  71     {  30,  960, "1/1000", 1000 },
  72     {  31,  992, "1/1250",  800 },
  73     {  32, 1024, "1/1600",  625 },
  74     {  33, 1056, "1/2000",  500 },
  75 //    {  34, 1088, "1/2500",  400 },
  76 //    {  35, 1120, "1/3200",  313 },
  77 };
  78 // verified for sx60 item #152
  79 const ISOTable iso_table[] = {
  80     {  0,    0, "Auto", -1},
  81     {  1,  100,  "100", -1},
  82     {  2,  200,  "200", -1},
  83     {  3,  400,  "400", -1},
  84     {  4,  800,  "800", -1},
  85     {  5, 1600, "1600", -1},
  86     {  6, 3200, "3200", -1},
  87 };
  88 //verified for sx60 from stubs_entry.S
  89 const CapturemodeMap modemap[] = {
  90 // note canon values for P, M etc have shifted by one compared to earlier dryos revs (e.g. M = 32769)
  91 { MODE_AUTO                 ,32768 },
  92 { MODE_M                    ,32770 },
  93 { MODE_AV                   ,32771 },
  94 { MODE_TV                   ,32772 },
  95 { MODE_P                    ,32773 },
  96 { MODE_HDR                  ,8775 },
  97 { MODE_FISHEYE              ,8759 },
  98 { MODE_MINIATURE            ,8760 },
  99 { MODE_TOY_CAMERA           ,8763 },
 100 { MODE_SOFTFOCUS            ,8765 },
 101 { MODE_MONOCHROME           ,8767 },
 102 { MODE_SUPER_VIVID          ,8754 },
 103 { MODE_POSTER_EFFECT        ,8755 },
 104 { MODE_PORTRAIT             ,16406 },
 105 { MODE_LOWLIGHT             ,16429 },
 106 { MODE_FACE_SELF_TIMER      ,16948 },
 107 { MODE_SMART_SHUTTER        ,16949 }, // smile detection
 108 { MODE_WINK_SELF_TIMER      ,16950 },
 109 { MODE_NIGHT_SCENE          ,16953 }, // handheld night scene
 110 { MODE_SNOW                 ,16414 },
 111 { MODE_FIREWORK             ,16416 },
 112 { MODE_SPORTS               ,33288 },
 113 { MODE_CREATIVE_EFFECT      ,33299 }, // Creative shot, various sub modes all use same number
 114 { MODE_HYBRID_AUTO          ,33298 }, // like movie digest
 115 //{                         ,33297 }, // ??? shows something about "adding to registry", possibly face recognition related?
 116 { MODE_VIDEO_STD             ,2643 }, // standard video on dial, regardless of res or FPS
 117 { MODE_VIDEO_IFRAME_MOVIE    ,2650 },
 118 { MODE_VIDEO_M               ,2651 }, // M video
 119 //{                          ,2648 }, // Another M video?
 120 //{                         ,4173 }, // C 
 121 //{                         ,4174 }, // C
 122 };
 123 
 124 #include "../generic/shooting.c"
 125 
 126 long get_file_next_counter() {
 127     return get_file_counter();
 128 }
 129 
 130 long get_target_file_num() {
 131     return get_exposure_counter();
 132 }
 133 #if defined(CAM_DATE_FOLDER_NAMING)
 134 void get_target_dir_name(char *out)
 135 {
 136     extern void _GetImageFolder(char*,int,int,int);
 137     _GetImageFolder(out,get_file_next_counter(),CAM_DATE_FOLDER_NAMING,time(NULL));
 138 }
 139 #else
 140 long get_target_dir_num() 
 141 {
 142     return 0;
 143 }
 144 #endif

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