root/platform/sx730hs/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, using propcase AV after half press 
  10 // propcase USER_AV slightly different.
  11 // Oddly most are ~1/3 stop from formal conversion
  12 const ApertureSize aperture_sizes_table[] = {
  13     { 9,  333, "3.3" },
  14     { 10, 337, "3.5" },
  15     { 11, 369, "4.0" },
  16     { 12, 401, "4.5" },
  17     { 13, 433, "5.0" },
  18     { 14, 466, "5.6" },
  19     { 15, 497, "6.3" },
  20     { 16, 529, "7.1" },
  21     { 17, 561, "8.0" },
  22 };
  23 
  24 const ShutterSpeed shutter_speeds_table[] = {
  25     { -12, -384, "15",   15000000 },
  26     { -11, -352, "13",   13000000 },
  27     { -10, -320, "10",   10000000 },
  28     {  -9, -288, "8",     8000000 },
  29     {  -8, -256, "6",     6000000 },
  30     {  -7, -224, "5",     5000000 },
  31     {  -6, -192, "4",     4000000 },
  32     {  -5, -160, "3.2",   3200000 },
  33     {  -4, -128, "2.5",   2500000 },
  34     {  -3,  -96, "2",     2000000 },
  35     {  -2,  -64, "1.6",   1600000 },
  36     {  -1,  -32, "1.3",   1300000 },
  37     {   0,    0, "1",     1000000 },
  38     {   1,   32, "0.8",    800000 },
  39     {   2,   64, "0.6",    600000 },
  40     {   3,   96, "0.5",    500000 },
  41     {   4,  128, "0.4",    400000 },
  42     {   5,  160, "0.3",    300000 },
  43     {   6,  192, "1/4",    250000 },
  44     {   7,  224, "1/5",    200000 },
  45     {   8,  256, "1/6",    166667 },
  46     {   9,  288, "1/8",    125000 },
  47     {  10,  320, "1/10",   100000 },
  48     {  11,  352, "1/13",    76923 },
  49     {  12,  384, "1/15",    66667 },
  50     {  13,  416, "1/20",    50000 },
  51     {  14,  448, "1/25",    40000 },
  52     {  15,  480, "1/30",    33333 },
  53     {  16,  512, "1/40",    25000 },
  54     {  17,  544, "1/50",    20000 },
  55     {  18,  576, "1/60",    16667 },
  56     {  19,  608, "1/80",    12500 },
  57     {  20,  640, "1/100",   10000 },
  58     {  21,  672, "1/125",    8000 },
  59     {  22,  704, "1/160",    6250 },
  60     {  23,  736, "1/200",    5000 },
  61     {  24,  768, "1/250",    4000 },
  62     {  25,  800, "1/320",    3125 },
  63     {  26,  832, "1/400",    2500 },
  64     {  27,  864, "1/500",    2000 },
  65     {  28,  896, "1/640",    1563 },
  66     {  29,  928, "1/800",    1250 },
  67     {  30,  960, "1/1000",   1000 },
  68     {  31,  992, "1/1250",    800 },
  69     {  32, 1024, "1/1600",    625 },
  70     {  33, 1056, "1/2000",    500 },
  71     {  34, 1088, "1/2500",    400 },
  72     {  35, 1120, "1/3200",    313 },
  73 };
  74 
  75 const ISOTable iso_table[] = {
  76         {  0,    0, " Auto", -1},
  77         {  1,   80,    "80", -1},
  78         {  2,  100,   "100", -1},
  79         {  3,  200,   "200", -1},
  80         {  4,  400,   "400", -1},
  81         {  5,  800,   "800", -1},
  82         {  6, 1600,  "1600", -1},
  83         {  7, 3200,  "3200", -1},
  84 };
  85 
  86 const CapturemodeMap modemap[] = {
  87 { MODE_AUTO                 ,32768 },
  88 { MODE_M                    ,32770 },
  89 { MODE_AV                   ,32771 },
  90 { MODE_TV                   ,32772 },
  91 { MODE_P                    ,32773 },
  92 { MODE_FISHEYE              ,16953 },
  93 { MODE_MINIATURE            ,16954 },
  94 { MODE_TOY_CAMERA           ,16957 },
  95 { MODE_SOFTFOCUS            ,16959 },
  96 { MODE_MONOCHROME           ,16961 },
  97 { MODE_SUPER_VIVID          ,16948 },
  98 { MODE_POSTER_EFFECT        ,16949 },
  99 { MODE_PORTRAIT             ,16406 },
 100 { MODE_SMOOTH_SKIN          ,16919 },
 101 { MODE_SMART_SHUTTER        ,16951 }, // smile detection
 102 { MODE_WINK_SELF_TIMER      ,16952 },
 103 { MODE_FACE_SELF_TIMER      ,16950 },
 104 { MODE_NIGHT_SCENE | MODE_DISABLE_RAW ,16955 }, // handheld night scene
 105 { MODE_LOWLIGHT             ,16431 },
 106 { MODE_FIREWORK             ,16416 },
 107 { MODE_CREATIVE_EFFECT      ,33299 }, // Creative shot, various sub modes all use same number
 108 { MODE_HYBRID_AUTO | MODE_DISABLE_RAW ,33298 }, // like movie digest
 109 { MODE_SPORTS               ,33288 },
 110 { MODE_SELFIE               ,32806 },
 111 //{                         ,33297 }, // ? seems to be related to face ID
 112 { MODE_VIDEO_STD             ,2646 }, // standard video on dial
 113 { MODE_VIDEO_SHORT_CLIP      ,2655 },
 114 };
 115 
 116 #include "../generic/shooting.c"
 117 
 118 long get_file_next_counter() {
 119     return get_file_counter();
 120 }
 121 
 122 long get_target_file_num() {
 123     return get_exposure_counter();
 124 }
 125 /*
 126 CAM_DATE_FOLDER_NAMING values - from sx710, presumed same since it works
 127 0x000   A/DCIM/1nn___nn/MRK_nnnn.MRK
 128 0x001   A/DCIM/1nn___nn/ETC_nnnn.TMP
 129 0x002   A/DCIM/1nn___nn/IMG_nnnn.JPG
 130 0x004   A/DCIM/1nn___nn/MVI_nnnn.THM
 131 0x008   A/DCIM/1nn___nn/SND_nnnn.WAV
 132 0x010   A/DCIM/1nn___nn/IMG_nnnn.CR2
 133 0x020   A/DCIM/1nn___nn/MVI_nnnn.MOV
 134 0x040   A/DCIM/1nn___nn/MVI_nnnn.MP4
 135 0x080   A/DCIM/1nn___nn
 136 0x100   A/DCIM/1nn___nn/ETC_nnnn.TMP
 137 larger values and multiple bits also seem to be ETC_nnnn.TMP
 138 */
 139 #if defined(CAM_DATE_FOLDER_NAMING)
 140 void get_target_dir_name(char *out)
 141 {
 142     extern void _GetImageFolder(char*,int,int,int);
 143     _GetImageFolder(out,get_file_next_counter(),CAM_DATE_FOLDER_NAMING,time(NULL));
 144 }
 145 #else
 146 long get_target_dir_num() 
 147 {
 148     return 0;
 149 }
 150 #endif

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