root/platform/m10/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 from PROPCASE_USER_AV, step size 1/3EV
  13 const ApertureSize aperture_sizes_table[] = {
  14     { 6,   64, "1.2" },
  15     { 7,   96, "1.4" },
  16     { 8,  128, "1.6" },
  17     { 9,  160, "1.8" },
  18     { 10, 192, "2.0" },
  19     { 11, 224, "2.2" },
  20     { 12, 256, "2.5" },
  21     { 13, 288, "2.8" },
  22     { 14, 320, "3.2" },
  23     { 15, 352, "3.5" },
  24     { 16, 384, "4.0" },
  25     { 17, 416, "4.5" },
  26     { 18, 448, "5.0" },
  27     { 19, 480, "5.6" },
  28     { 20, 512, "6.3" },
  29     { 21, 544, "7.1" },
  30     { 22, 576, "8.0" },
  31     { 23, 608, "9.0" },
  32     { 24, 640, "10.0" },
  33     { 25, 672, "11.0" },
  34     { 26, 704, "13.0" },
  35     { 27, 736, "14.0" },
  36     { 28, 768, "16.0" },
  37     { 29, 800, "18.0" },
  38     { 30, 832, "20.0" },
  39     { 31, 864, "22.0" },
  40 };
  41 
  42 const ShutterSpeed shutter_speeds_table[] = {
  43     { -24, -768, "250", 250000000 },
  44     { -23, -736, "200", 200000000 },
  45     { -22, -704, "160", 160000000 },
  46     { -21, -672, "125", 125000000 },
  47     { -20, -640, "100", 100000000 },
  48     { -19, -608, "80",   80000000 },
  49     { -18, -576, "60",   60000000 },
  50     { -17, -544, "50",   50000000 },
  51     { -16, -512, "40",   40000000 },
  52     { -15, -480, "30",   30000000 },
  53     { -14, -448, "25",   25000000 },
  54     { -13, -416, "20",   20000000 },
  55     { -12, -384, "15",   15000000 },
  56     { -11, -352, "13",   13000000 },
  57     { -10, -320, "10",   10000000 },
  58     {  -9, -288, "8",     8000000 },
  59     {  -8, -256, "6",     6000000 },
  60     {  -7, -224, "5",     5000000 },
  61     {  -6, -192, "4",     4000000 },
  62     {  -5, -160, "3.2",   3200000 },
  63     {  -4, -128, "2.5",   2500000 },
  64     {  -3,  -96, "2",     2000000 },
  65     {  -2,  -64, "1.6",   1600000 },
  66     {  -1,  -32, "1.3",   1300000 },
  67     {   0,    0, "1",     1000000 },
  68     {   1,   32, "0.8",    800000 },
  69     {   2,   64, "0.6",    600000 },
  70     {   3,   96, "0.5",    500000 },
  71     {   4,  128, "0.4",    400000 },
  72     {   5,  160, "0.3",    300000 },
  73     {   6,  192, "1/4",    250000 },
  74     {   7,  224, "1/5",    200000 },
  75     {   8,  256, "1/6",    166667 },
  76     {   9,  288, "1/8",    125000 },
  77     {  10,  320, "1/10",   100000 },
  78     {  11,  352, "1/13",    76923 },
  79     {  12,  384, "1/15",    66667 },
  80     {  13,  416, "1/20",    50000 },
  81     {  14,  448, "1/25",    40000 },
  82     {  15,  480, "1/30",    33333 },
  83     {  16,  512, "1/40",    25000 },
  84     {  17,  544, "1/50",    20000 },
  85     {  18,  576, "1/60",    16667 },
  86     {  19,  608, "1/80",    12500 },
  87     {  20,  640, "1/100",   10000 },
  88     {  21,  672, "1/125",    8000 },
  89     {  22,  704, "1/160",    6250 },
  90     {  23,  736, "1/200",    5000 },
  91     {  24,  768, "1/250",    4000 },
  92     {  25,  800, "1/320",    3125 },
  93     {  26,  832, "1/400",    2500 },
  94     {  27,  864, "1/500",    2000 },
  95     {  28,  896, "1/640",    1563 },
  96     {  29,  928, "1/800",    1250 },
  97     {  30,  960, "1/1000",   1000 },
  98     {  31,  992, "1/1250",    800 },
  99     {  32, 1024, "1/1600",    625 },
 100     {  33, 1056, "1/2000",    500 },
 101 };
 102 
 103 const ISOTable iso_table[] = {
 104         {  0,    0, " Auto", -1},
 105         {  1,  100,   "100", -1},
 106         {  2,  125,   "125", -1},
 107         {  3,  160,   "160", -1},
 108         {  4,  200,   "200", -1},
 109         {  5,  250,   "250", -1},
 110         {  6,  320,   "320", -1},
 111         {  7,  400,   "400", -1},
 112         {  8,  500,   "500", -1},
 113         {  9,  640,   "640", -1},
 114         { 10,  800,   "800", -1},
 115         { 11, 1000,  "1000", -1},
 116         { 12, 1250,  "1250", -1},
 117         { 13, 1600,  "1600", -1},
 118         { 14, 2000,  "2000", -1},
 119         { 15, 2500,  "2500", -1},
 120         { 16, 3200,  "3200", -1},
 121         { 17, 4000,  "4000", -1},
 122         { 18, 5000,  "5000", -1},
 123         { 19, 6400,  "6400", -1},
 124         { 20, 8000,  "8000", -1},
 125         { 21,10000, "10000", -1},
 126         { 22,12800, "12800", -1},
 127 };
 128 
 129 const CapturemodeMap modemap[] = {
 130 // pre-existing mode constants were used for similar modes
 131 { MODE_M                    ,32770 },
 132 { MODE_AV                   ,32771 },
 133 { MODE_TV                   ,32772 },
 134 { MODE_P                    ,32773 },
 135 { MODE_LANDSCAPE            ,32789 }, // landscape
 136 { MODE_PORTRAIT             ,32790 }, // portrait
 137 { MODE_SELFIE               ,32806 }, // self portrait
 138 { MODE_CLOSEUP              ,32807 }, // close-up
 139 { MODE_FOOD                 ,32808 }, // food
 140 { MODE_SPORTS               ,33288 }, // sports
 141 { MODE_CREATIVE_EFFECT      ,33289 }, // creative assist
 142 { MODE_HYBRID_AUTO          ,33298 }, // like movie digest
 143 { MODE_FISHEYE              ,33335 }, // fisheye
 144 { MODE_MINIATURE            ,33336 }, // miniature effect, 34360 during video recording (+1024)
 145 { MODE_NIGHT_SCENE          ,33337 }, // handheld night scene
 146 { MODE_TOY_CAMERA           ,33339 }, // toy camera effect
 147 { MODE_SOFTFOCUS            ,33341 }, // soft focus
 148 { MODE_HDR                  ,33351 }, // hdr
 149 { MODE_WATERPAINTING        ,33352 }, // water painting
 150 { MODE_ART_BOLD             ,33353 }, // art bold
 151 { MODE_MONOCHROME           ,33354 }, // grainy b/w
 152 { MODE_VIDEO_STD             ,2643 }, // movie with autoexposure
 153 { MODE_VIDEO_M               ,2651 }, // manual movie
 154 //{ MODE_AUTO                 ,32768 }, auto, not available on ui, untested
 155 };
 156 
 157 #include "../generic/shooting.c"
 158 
 159 long get_file_next_counter() {
 160     return get_file_counter();
 161 }
 162 
 163 long get_target_file_num() {
 164     return get_exposure_counter();
 165 }
 166 /*
 167 CAM_DATE_FOLDER_NAMING values
 168 0x000   A/DCIM/1nn___nn/MRK_nnnn.MRK
 169 0x001   A/DCIM/1nn___nn/ETC_nnnn.TMP
 170 0x002   A/DCIM/1nn___nn/IMG_nnnn.JPG
 171 0x004   A/DCIM/1nn___nn/MVI_nnnn.THM
 172 0x008   A/DCIM/1nn___nn/SND_nnnn.WAV
 173 0x010   A/DCIM/1nn___nn/IMG_nnnn.CR2
 174 0x020   A/DCIM/1nn___nn/MVI_nnnn.MOV
 175 0x040   A/DCIM/1nn___nn/MVI_nnnn.MP4
 176 0x080   A/DCIM/1nn___nn
 177 0x100   A/DCIM/1nn___nn/ETC_nnnn.TMP
 178 larger values and multiple bits also seem to be ETC_nnnn.TMP
 179 */
 180 #if defined(CAM_DATE_FOLDER_NAMING)
 181 void get_target_dir_name(char *out)
 182 {
 183     extern void _GetImageFolder(char*,int,int,int);
 184     _GetImageFolder(out,get_file_next_counter(),CAM_DATE_FOLDER_NAMING,time(NULL));
 185 }
 186 #else
 187 long get_target_dir_num() 
 188 {
 189     return 0;
 190 }
 191 #endif

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