- Timestamp:
- 07/23/11 22:51:40 (2 years ago)
- Location:
- trunk
- Files:
-
- 8 edited
-
core/conf.c (modified) (1 diff)
-
core/gui_osd.c (modified) (2 diffs)
-
core/raw.c (modified) (6 diffs)
-
include/camera.h (modified) (1 diff)
-
include/conf.h (modified) (1 diff)
-
include/propset4.h (modified) (1 diff)
-
platform/g12/platform_camera.h (modified) (2 diffs)
-
platform/sx30/platform_camera.h (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/core/conf.c
r1234 r1245 666 666 667 667 //------------------------------------------------------------------- 668 // Common code extracted from raw.c (raw_savefile) and gui_osd.c (gui_osd_draw_raw_info) 669 // returns 0 if RAW save is disabled due to mode settings, etc, return 1 if RAW save OK 670 int is_raw_enabled() 671 { 672 int m = mode_get() & MODE_SHOOTING_MASK; 673 674 // NOTE: the conf.save_raw_in variables are negative logic 675 // 1 = disable saving raw in this mode, 0 = allow saving raw 676 // variables should be named conf.disable_save_raw_in_XXX 677 678 return !( // Return false if any of these tests are true 679 ((movie_status > 1) && conf.save_raw_in_video) || // True is movie mode and save_raw_in_video is disabled 680 #ifdef CAM_DISABLE_RAW_IN_LOW_LIGHT_MODE 681 (shooting_get_prop(PROPCASE_RESOLUTION)==7) || // True if shooting resolution is 'low light' 682 #endif 683 (shooting_get_prop(PROPCASE_RESOLUTION)==5) || // True if shooting resolution is ??? (what is mode 5) 684 ((m==MODE_SPORTS) && conf.save_raw_in_sports) || // True if sports mode and save_raw_in_sports is disabled 685 ((m==MODE_AUTO) && conf.save_raw_in_auto) || // True if auto mode and save_raw_in_auto is disabled 686 (conf.edge_overlay_enable && conf.save_raw_in_edgeoverlay) || // True if edge overlay on and save_raw_in_edgeoverlay is disabled 687 ((shooting_get_drive_mode()==1) && conf.save_raw_in_burst && !(m==MODE_SPORTS)) || // True if drive mode is continuous and save_raw_in_burst is disabled and not sports mode 688 ((shooting_get_drive_mode()>=2) && conf.save_raw_in_timer) || // True if drive mode is timer and save_raw_in_timer is disabled 689 ((shooting_get_prop(PROPCASE_BRACKET_MODE)==1) && conf.save_raw_in_ev_bracketing) // True if bracketing enabled and save_raw_in_ev_bracketing is disabled 690 ); 691 } 692 693 //------------------------------------------------------------------- -
trunk/core/gui_osd.c
r1187 r1245 1077 1077 void gui_osd_draw_raw_info() 1078 1078 { 1079 int x, m=(mode_get()&MODE_SHOOTING_MASK);1080 1079 static int b; 1081 if ( (!((movie_status > 1) && conf.save_raw_in_video )) && (!(shooting_get_prop(PROPCASE_RESOLUTION)==5)) && (!((m==MODE_SPORTS) && conf.save_raw_in_sports)) && (!((m==MODE_AUTO) && conf.save_raw_in_auto)) && (!(conf.edge_overlay_enable && conf.save_raw_in_edgeoverlay)) && (!((shooting_get_drive_mode()==1) && conf.save_raw_in_burst && !(m==MODE_SPORTS))) && (!((shooting_get_drive_mode()>=2) && conf.save_raw_in_timer)) && (!((shooting_get_prop(PROPCASE_BRACKET_MODE)==1) && conf.save_raw_in_ev_bracketing)))1080 if (is_raw_enabled()) 1082 1081 { 1083 if (conf.show_remaining_raw)1082 if (conf.show_remaining_raw) 1084 1083 { 1085 int raw_count=GetRawCount();1084 int raw_count=GetRawCount(); 1086 1085 if (raw_count>conf.remaining_raw_treshold) 1087 {1088 if (conf.dng_raw) sprintf(osd_buf, "DNG:%3d", raw_count); else sprintf(osd_buf, "RAW:%3d", raw_count);1086 { 1087 sprintf(osd_buf, "%s:%3d", (conf.dng_raw)?"DNG":"RAW", raw_count); 1089 1088 draw_string(conf.mode_raw_pos.x, conf.mode_raw_pos.y, osd_buf, conf.osd_color); 1090 }1089 } 1091 1090 else 1092 { 1093 1094 if (conf.dng_raw) sprintf(osd_buf, "DNG:%3d", raw_count); else sprintf(osd_buf, "RAW:%3d", raw_count); 1091 { 1092 sprintf(osd_buf, "%s:%3d", (conf.dng_raw)?"DNG":"RAW", raw_count); 1095 1093 1096 1094 if (b > 6) … … 1106 1104 } 1107 1105 } 1108 else if (conf.dng_raw) draw_string(conf.mode_raw_pos.x, conf.mode_raw_pos.y, "DNG", conf.osd_color); else draw_string(conf.mode_raw_pos.x, conf.mode_raw_pos.y, "RAW", conf.osd_color); 1106 else 1107 draw_string(conf.mode_raw_pos.x, conf.mode_raw_pos.y, (conf.dng_raw)?"DNG":"RAW", conf.osd_color); 1109 1108 } 1110 1109 else if (conf.raw_exceptions_warn) 1111 { 1112 if (conf.dng_raw) gui_print_osd_state_string_chr("DNG Disabled",""); else gui_print_osd_state_string_chr("RAW Disabled",""); 1113 } 1114 1115 1110 { 1111 gui_print_osd_state_string_chr((conf.dng_raw)?"DNG Disabled":"RAW Disabled",""); 1112 } 1116 1113 } 1117 1114 //------------------------------------------------------------------- -
trunk/core/raw.c
r1122 r1245 137 137 int raw_savefile() { 138 138 int ret = 0; 139 int fd , m=(mode_get()&MODE_SHOOTING_MASK);139 int fd; 140 140 static struct utimbuf t; 141 141 static int br_counter; … … 191 191 state_shooting_progress = SHOOTING_PROGRESS_PROCESSING; 192 192 193 if (conf.save_raw 194 && (!(shooting_get_prop(PROPCASE_RESOLUTION)==5)) 195 && (!((movie_status > 1) && conf.save_raw_in_video)) 196 && (!((m==MODE_SPORTS) && conf.save_raw_in_sports)) 197 && (!((m==MODE_AUTO) && conf.save_raw_in_auto)) 198 && (!(conf.edge_overlay_enable && conf.save_raw_in_edgeoverlay)) 199 && (!((shooting_get_drive_mode()==1) && conf.save_raw_in_burst && !(m==MODE_SPORTS))) 200 && (!((shooting_get_drive_mode()>=2) && conf.save_raw_in_timer)) 201 && (!((shooting_get_prop(PROPCASE_BRACKET_MODE)==1) && conf.save_raw_in_ev_bracketing)) ) 193 if (conf.save_raw && is_raw_enabled()) 202 194 { 203 195 int timer; char txt[30]; … … 237 229 timer=get_tick_count(); 238 230 #if DNG_SUPPORT 239 if (conf.dng_raw) { 231 if (conf.dng_raw) 232 { 240 233 fill_gamma_buf(); 241 234 create_dng_header(exif_data); … … 248 241 reverse_bytes_order2(rawadr, altrawadr, hook_raw_size()); 249 242 } 250 }251 #endif252 if (conf.dng_raw) {253 243 // Write alternate (inactive) buffer that we reversed the bytes into above (if only one buffer then it will be the active buffer instead) 254 244 write(fd, (char*)(((unsigned long)altrawadr)|CAM_UNCACHED_BIT), hook_raw_size()); 255 } else { 245 } 246 else 247 { 256 248 // Write active RAW buffer 257 249 write(fd, (char*)(((unsigned long)rawadr)|CAM_UNCACHED_BIT), hook_raw_size()); … … 259 251 close(fd); 260 252 utime(fn, &t); 261 #if DNG_SUPPORT 253 262 254 if (conf.dng_raw) { 263 255 if (get_dng_header() && thumbnail_buf) { … … 269 261 if (thumbnail_buf) free(thumbnail_buf); 270 262 } 263 #else 264 // Write active RAW buffer 265 write(fd, (char*)(((unsigned long)rawadr)|CAM_UNCACHED_BIT), hook_raw_size()); 266 close(fd); 267 utime(fn, &t); 271 268 #endif 272 269 if (conf.raw_timer) { -
trunk/include/camera.h
r1243 r1245 163 163 #undef CAM_AV_OVERRIDE_IRIS_FIX // for cameras that require _MoveIrisWithAv function to override Av (for bracketing). 164 164 165 #undef CAM_DISABLE_RAW_IN_LOW_LIGHT_MODE // For cameras with 'low light' mode that does now work with raw define this 166 165 167 //---------------------------------------------------------- 166 168 // Override Default values for Camera if necessary -
trunk/include/conf.h
r993 r1245 322 322 extern const char *video_bitrate_strings[VIDEO_BITRATE_STEPS]; 323 323 324 extern int is_raw_enabled(); 325 324 326 #endif -
trunk/include/propset4.h
r1243 r1245 45 45 #define PROPCASE_EV_CORRECTION_2 211 46 46 #define PROPCASE_IS_FLASH_READY 212 47 #define PROPCASE_RESOLUTION 222 47 #define PROPCASE_RESOLUTION 222 // 0 = L, 1 = M1, 2 = M2, 4 = S, 7 = Low Light (G12) 48 48 #define PROPCASE_ORIENTATION_SENSOR 223 49 49 #define PROPCASE_TIMER_MODE 227 -
trunk/platform/g12/platform_camera.h
r1237 r1245 99 99 #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). 100 100 101 #define CAM_DATE_FOLDER_NAMING 1101 #define CAM_DATE_FOLDER_NAMING 1 102 102 103 103 #define CAM_STARTUP_CRASH_FILE_OPEN_FIX 1 // enable fix for camera crash at startup when opening the conf / font files 104 104 // see http://chdk.setepontos.com/index.php?topic=6179.0 105 105 106 #define CAM_FIRMWARE_MEMINFO 1 // Use 'GetMemInfo' to get free memory size.106 #define CAM_FIRMWARE_MEMINFO 1 // Use 'GetMemInfo' to get free memory size. 107 107 108 108 #define CAM_DRIVE_MODE_FROM_TIMER_MODE // use PROPCASE_TIMER_MODE to check for multiple shot custom timer. … … 110 110 // see http://chdk.setepontos.com/index.php/topic,3994.405.html 111 111 112 #define CAM_AV_OVERRIDE_IRIS_FIX 1 // for cameras that require _MoveIrisWithAv function to override Av. 112 #define CAM_AV_OVERRIDE_IRIS_FIX 1 // for cameras that require _MoveIrisWithAv function to override Av in bracketing. 113 114 #define CAM_DISABLE_RAW_IN_LOW_LIGHT_MODE 1 // For cameras with 'low light' mode that does now work with raw define this 115 113 116 //---------------------------------------------------------- 114 117 -
trunk/platform/sx30/platform_camera.h
r1237 r1245 98 98 // see http://chdk.setepontos.com/index.php?topic=6179.0 99 99 100 #define CAM_KEY_CLICK_DELAY 150 // SX30 appears to need extra delay for clicks100 #define CAM_KEY_CLICK_DELAY 150 // SX30 appears to need extra delay for clicks 101 101 102 #define CAM_FIRMWARE_MEMINFO 1 // Use 'GetMemInfo' to get free memory size.102 #define CAM_FIRMWARE_MEMINFO 1 // Use 'GetMemInfo' to get free memory size. 103 103 104 104 #define CAM_DRIVE_MODE_FROM_TIMER_MODE // use PROPCASE_TIMER_MODE to check for multiple shot custom timer. … … 106 106 // see http://chdk.setepontos.com/index.php/topic,3994.405.html 107 107 108 #define CAM_AV_OVERRIDE_IRIS_FIX 1 // for cameras that require _MoveIrisWithAv function to override Av. 108 #define CAM_AV_OVERRIDE_IRIS_FIX 1 // for cameras that require _MoveIrisWithAv function to override Av in bracketing. 109 110 #define CAM_DISABLE_RAW_IN_LOW_LIGHT_MODE 1 // For cameras with 'low light' mode that does now work with raw define this 111 109 112 //----------------------------------------------------------
Note: See TracChangeset
for help on using the changeset viewer.