Changeset 1007 for trunk/include/camera.h
- Timestamp:
- 12/31/10 04:42:33 (2 years ago)
- File:
-
- 1 edited
-
trunk/include/camera.h (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/camera.h
r1006 r1007 52 52 53 53 #define ZOOM_OVERRIDE 0 // Shall zoom-override be used? default 0 becoz not implemented right now 54 #undef DNG_SUPPORT 55 #undef CAM_REAR_CURTAIN // Camera do not have front/rear curtain flash sync in menu 54 55 #undef DNG_SUPPORT // Camera supports DNG format for saving of RAW images 56 #undef DNG_DOUBLE_BUF // Camera has two RAW buffers that can be used to optimise DNG creation 57 58 #undef CAM_REAR_CURTAIN // Camera do not have front/rear curtain flash sync in menu 56 59 #undef CAM_BRACKETING // Cameras that have bracketing (focus & ev) in original firmware already, most likely s- & g-series (propcase for digic III not found yet!) 57 60 #undef CAM_EXT_TV_RANGE // CHDK can make exposure time longer than 64s … … 73 76 //zebra adjust buffer height: show use at sx200is: needed for save memory space 74 77 #define ZEBRA_HMARGIN0 0 78 79 // Viewport memory buffer is wider than viewport (G12) 80 #undef CAM_VIEWPORT_BUFFER_WIDTH_FIX // Set to 1 if viewport memory buffer width is not the same as the viewport width 75 81 76 82 //aspect corrections … … 95 101 // also used by some cameras with normal bitmap layouts for memory saving ? 96 102 #undef CAM_ZEBRA_NOBUF // zebra draws directly on bitmap buffer. Requires above as well 103 104 #undef CAM_DATE_FOLDER_NAMING // set if camera uses date based folder naming and get_target_dir_name is implemented 97 105 //---------------------------------------------------------- 98 106 // Overridden values for each camera … … 3075 3083 //---------------------------------------------------------- 3076 3084 3085 #elif defined (CAMERA_sx30) 3086 #define CAM_PROPSET 4 3087 #define CAM_DRYOS 1 3088 #define CAM_DRYOS_2_3_R39 1 3089 3090 #define CAM_RAW_ROWPIX 4464 3091 #define CAM_RAW_ROWS 3276 3092 3093 #define CAM_SWIVEL_SCREEN 1 3094 #define CAM_ADJUSTABLE_ALT_BUTTON 1 3095 #undef CAM_CAN_SD_OVER_NOT_IN_MF 3096 #undef CAM_CAN_UNLOCK_OPTICAL_ZOOM_IN_VIDEO 3097 #define CAM_HAS_VIDEO_BUTTON 1 3098 #define CAM_VIDEO_QUALITY_ONLY 1 3099 #define CAM_BRACKETING 1 3100 #undef CAM_VIDEO_CONTROL 3101 #define CAM_MULTIPART 1 3102 #define CAM_HAS_JOGDIAL 1 3103 #undef CAM_USE_ZOOM_FOR_MF 3104 #undef CAM_UNCACHED_BIT // shut up compiler 3105 #define CAM_UNCACHED_BIT 0x40000000 3106 3107 #define DNG_SUPPORT 1 3108 #define DNG_DOUBLE_BUF 1 3109 // pattern 3110 #define cam_CFAPattern 0x01000201 // Green Blue Red Green 3111 // color 3112 3113 // TODO - Still needs work 3114 #define cam_CalibrationIlluminant1 1 // Daylight 3115 3116 #define CAM_COLORMATRIX1 \ 3117 1301431, 1000000, -469837, 1000000, -102652, 1000000, \ 3118 -200195, 1000000, 961551, 1000000, 238645, 1000000, \ 3119 -16441, 1000000, 142319, 1000000, 375979, 1000000 3120 3121 // cropping 3122 #define CAM_JPEG_WIDTH 4368 //4320 3123 #define CAM_JPEG_HEIGHT 3254 //3240 3124 #define CAM_ACTIVE_AREA_X1 24 3125 #define CAM_ACTIVE_AREA_Y1 10 3126 #define CAM_ACTIVE_AREA_X2 (4464-72) 3127 #define CAM_ACTIVE_AREA_Y2 (3276-12) 3128 // camera name 3129 #define PARAM_CAMERA_NAME 4 // parameter number for GetParameterData 3130 #undef CAM_SENSOR_BITS_PER_PIXEL 3131 #undef CAM_WHITE_LEVEL 3132 #undef CAM_BLACK_LEVEL 3133 #define CAM_SENSOR_BITS_PER_PIXEL 12 3134 #define CAM_WHITE_LEVEL ((1<<CAM_SENSOR_BITS_PER_PIXEL)-1) 3135 #define CAM_BLACK_LEVEL 127 3136 3137 #define CAM_EXT_TV_RANGE 1 3138 #define CAM_QUALITY_OVERRIDE 1 3139 3140 // copied from the SX200 which has the same video buffer size 3141 #undef CAM_USES_ASPECT_CORRECTION 3142 #undef CAM_USES_ASPECT_YCORRECTION 3143 #define CAM_USES_ASPECT_CORRECTION 1 //camera uses the modified graphics primitives to map screens an viewports to buffers more sized 3144 #define CAM_USES_ASPECT_YCORRECTION 0 //only uses mappings on x coordinate 3145 3146 #undef ASPECT_XCORRECTION 3147 #define ASPECT_XCORRECTION(x) ( ( ((x)<<3) + (x) ) >>2 ) //correction x*screen_buffer_width/screen_width = x*720/320 = x*9/4 = (x<<3 + x)>>2 3148 3149 #undef ASPECT_GRID_XCORRECTION 3150 #define ASPECT_GRID_XCORRECTION(x) ( ((x)<<3)/9 ) //grids are designed on a 360x240 basis and screen is 320x240, we need x*320/360=x*8/9 3151 #undef ASPECT_GRID_YCORRECTION 3152 #define ASPECT_GRID_YCORRECTION(y) ( (y) ) //y correction for grids made on a 360x240 As the buffer is 720x240 we have no correction here. 3153 3154 #undef ASPECT_VIEWPORT_XCORRECTION 3155 #define ASPECT_VIEWPORT_XCORRECTION(x) ASPECT_GRID_XCORRECTION(x) //viewport is 360x240 and screen 320x240, we need x*320/360=x*8/9, equal than grids, used by edgeoverlay 3156 #undef ASPECT_VIEWPORT_YCORRECTION 3157 #define ASPECT_VIEWPORT_YCORRECTION(y) ( (y) ) 3158 3159 #undef ASPECT_GAMES_XCORRECTION 3160 // 720/360=2 same aspect than grids and viewport but another approach: there is a lot of corrections to do in game's code, and we decide to paint directly on display buffer wirh another resolution 3161 // used by gui.c that configures the draw environment (trhough new draw_gui function) depending on gui_mode: we have then 360x240 for games (but deformed output:circles are not circles) and 320x240 for 3162 // other modes in perfect aspect ratio 4/3: slightly better visualization: file menus more readable, ... 3163 #define ASPECT_GAMES_XCORRECTION(x) ( ((x)<<1) ) 3164 #undef ASPECT_GAMES_YCORRECTION 3165 #define ASPECT_GAMES_YCORRECTION(y) ( (y) ) //none 3166 3167 //games mappings 3168 #undef GAMES_SCREEN_WIDTH 3169 #undef GAMES_SCREEN_HEIGHT 3170 #define GAMES_SCREEN_WIDTH 360 3171 #define GAMES_SCREEN_HEIGHT 240 3172 3173 #define CAM_ZEBRA_ASPECT_ADJUST 1 3174 #define CAM_ZEBRA_NOBUF 1 3175 3176 #undef CAM_BITMAP_PALETTE 3177 #define CAM_BITMAP_PALETTE 7 3178 3179 //zebra letterbox for saving memory 3180 #undef ZEBRA_HMARGIN0 3181 #define ZEBRA_HMARGIN0 30 //this 30 rows are not used by the display buffer is 720x240 effective, no 960x270, i.e. (270-240) reduction in widht possible but not done (more difficult to manage it and slower). 3182 3183 #undef EDGE_HMARGIN 3184 #define EDGE_HMARGIN 2 3185 #undef CAM_CHDK_PTP 3186 //#define CAM_CHDK_PTP 1 3187 3188 #define CAM_DATE_FOLDER_NAMING 1 3189 3190 //---------------------------------------------------------- 3191 #elif defined (CAMERA_g12) 3192 #define CAM_PROPSET 4 3193 #define CAM_DRYOS 1 3194 #define CAM_DRYOS_2_3_R39 1 3195 3196 #define CAM_RAW_ROWPIX 3744 3197 #define CAM_RAW_ROWS 2784 3198 3199 #define CAM_SWIVEL_SCREEN 1 3200 //#define CAM_ADJUSTABLE_ALT_BUTTON 1 3201 3202 #undef CAM_EMUL_KEYPRESS_DURATION 3203 #define CAM_EMUL_KEYPRESS_DURATION 10 3204 #undef CAM_MENU_BORDERWIDTH 3205 #define CAM_MENU_BORDERWIDTH 10 3206 #define CAM_AF_SCAN_DURING_VIDEO_RECORD 1 3207 #define CAM_MULTIPART 1 3208 #define CAM_HAS_JOGDIAL 1 3209 #undef CAM_USE_ZOOM_FOR_MF 3210 #undef CAM_CONSOLE_LOG_ENABLED // Development: internal camera stdout -> A/stdout.txt 3211 #define CAM_BRACKETING 1 3212 #undef CAM_VIDEO_CONTROL 3213 #define CAM_VIDEO_QUALITY_ONLY 1 3214 #define CAM_EXT_TV_RANGE 1 3215 #define CAM_QUALITY_OVERRIDE 1 3216 #undef OPT_CURVES 3217 #undef CAM_UNCACHED_BIT 3218 #define CAM_UNCACHED_BIT 0x40000000 // S90 @FF8875FC(via ExMem.FreeCacheable) 3219 #define CAM_SHOW_OSD_IN_SHOOT_MENU 1 3220 3221 // camera name 3222 #define PARAM_CAMERA_NAME 4 // parameter number for GetParameterData 3223 #undef CAM_SENSOR_BITS_PER_PIXEL 3224 #define CAM_SENSOR_BITS_PER_PIXEL 12 3225 #undef CAM_WHITE_LEVEL 3226 #define CAM_WHITE_LEVEL ((1<<CAM_SENSOR_BITS_PER_PIXEL)-1) 3227 #undef CAM_BLACK_LEVEL 3228 #define CAM_BLACK_LEVEL 127 3229 3230 #undef CAM_BITMAP_PALETTE 3231 #define CAM_BITMAP_PALETTE 7 3232 3233 #undef CAM_USES_ASPECT_CORRECTION 3234 #define CAM_USES_ASPECT_CORRECTION 1 //camera uses the modified graphics primitives to map screens an viewports to buffers more sized 3235 #undef CAM_USES_ASPECT_YCORRECTION 3236 #define CAM_USES_ASPECT_YCORRECTION 0 //only uses mappings on x coordinate 3237 3238 #undef ASPECT_XCORRECTION 3239 #define ASPECT_XCORRECTION(x) ( ( ((x)<<3) + (x) ) >>2 ) 3240 3241 #undef ASPECT_GRID_XCORRECTION 3242 #define ASPECT_GRID_XCORRECTION(x) ( ((x)<<3)/9 ) //grids are designed on a 360x240 basis and screen is 320x240, we need x*320/360=x*8/9 3243 #undef ASPECT_GRID_YCORRECTION 3244 #define ASPECT_GRID_YCORRECTION(y) ( (y) ) //y correction for grids made on a 360x240 As the buffer is 720x240 we have no correction here. 3245 3246 #undef ASPECT_VIEWPORT_XCORRECTION 3247 #define ASPECT_VIEWPORT_XCORRECTION(x) ASPECT_GRID_XCORRECTION(x) //viewport is 360x240 and screen 320x240, we need x*320/360=x*8/9, equal than grids, used by edgeoverlay 3248 #undef ASPECT_VIEWPORT_YCORRECTION 3249 #define ASPECT_VIEWPORT_YCORRECTION(y) (y) 3250 3251 #undef EDGE_HMARGIN 3252 #define EDGE_HMARGIN 2 3253 3254 #define DNG_SUPPORT 1 3255 #define DNG_DOUBLE_BUF 1 3256 // pattern 3257 #define cam_CFAPattern 0x02010100 // Red Green Green Blue 3258 // color 3259 //need fixing ***************************************************** 3260 #define CAM_COLORMATRIX1 \ 3261 14134, 1000000, -5576, 1000000, -1527, 1000000, \ 3262 -1991, 1000000, 10719, 1000000, 1273, 1000000, \ 3263 -1158, 1000000, 1929, 1000000, 3581, 1000000 3264 #define cam_CalibrationIlluminant1 17 // Standard Light A 3265 3266 // cropping 3267 #define CAM_JPEG_WIDTH 3684 3268 #define CAM_JPEG_HEIGHT 2760 3269 #define CAM_ACTIVE_AREA_X1 52 3270 #define CAM_ACTIVE_AREA_Y1 12 3271 #define CAM_ACTIVE_AREA_X2 (CAM_RAW_ROWPIX-8) 3272 #define CAM_ACTIVE_AREA_Y2 (CAM_RAW_ROWS-12) 3273 3274 #undef ASPECT_GAMES_XCORRECTION 3275 #define ASPECT_GAMES_XCORRECTION(x) ( ((x)<<1) ) 3276 #undef ASPECT_GAMES_YCORRECTION 3277 #define ASPECT_GAMES_YCORRECTION(y) ( (y) ) //none 3278 3279 //games mappings 3280 #undef GAMES_SCREEN_WIDTH 3281 #define GAMES_SCREEN_WIDTH 360 3282 #undef GAMES_SCREEN_HEIGHT 3283 #define GAMES_SCREEN_HEIGHT 240 3284 3285 #define CAM_ZEBRA_ASPECT_ADJUST 1 3286 3287 #define CAM_VIEWPORT_BUFFER_WIDTH_FIX 1 3288 3289 #define CAM_DATE_FOLDER_NAMING 1 3290 //---------------------------------------------------------- 3291 3077 3292 3078 3293 #else
Note: See TracChangeset
for help on using the changeset viewer.