Changeset 324
- Timestamp:
- 03/12/08 18:38:02 (5 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 16 edited
-
core/conf.c (modified) (2 diffs)
-
core/gui.c (modified) (10 diffs)
-
core/gui_calendar.c (modified) (1 diff)
-
core/gui_fselect.c (modified) (1 diff)
-
core/gui_menu.c (modified) (3 diffs)
-
core/gui_osd.c (modified) (2 diffs)
-
core/gui_reversi.c (modified) (2 diffs)
-
core/gui_sokoban.c (modified) (1 diff)
-
core/raw.c (modified) (3 diffs)
-
core/raw.h (modified) (2 diffs)
-
core/raw_merge.c (modified) (7 diffs)
-
include/camera.h (added)
-
include/platform.h (modified) (5 diffs)
-
lib/ubasic/ubasic.c (modified) (1 diff)
-
makefile.inc (modified) (1 diff)
-
platform/generic/main.c (modified) (2 diffs)
-
platform/generic/wrappers.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/core/conf.c
r312 r324 4 4 #include "histogram.h" 5 5 #include "font.h" 6 #include "camera.h" 6 7 #include "raw.h" 7 8 #include "gui_draw.h" … … 302 303 303 304 static void conf_change_alt_mode_button() { 304 #if defined(CAMERA_s2is) || defined(CAMERA_s3is) || defined(CAMERA_g7)305 #if CAM_ADJUSTABLE_ALT_BUTTON 305 306 kbd_set_alt_mode_key_mask(conf.alt_mode_button); 306 307 #else -
trunk/core/gui.c
r323 r324 4 4 #include "keyboard.h" 5 5 #include "conf.h" 6 #include "camera.h" 6 7 #include "ubasic.h" 7 8 #include "font.h" … … 39 40 // #define KEY_NONE (KEY_DUMMY+1) 40 41 41 #if defined(CAMERA_ixus700_sd500) || defined(CAMERA_ixus800_sd700) || defined(CAMERA_ixus65_sd630) || defined(CAMERA_a560) || defined(CAMERA_ixus850_sd800) || defined (CAMERA_ixus70_sd1000) || defined (CAMERA_ixus950_sd850) || defined(CAMERA_ixus55_sd450) || defined(CAMERA_a550)42 #if !CAM_HAS_ERASE_BUTTON 42 43 //Alt mode 43 44 #define SHORTCUT_TOGGLE_RAW KEY_DISPLAY … … 136 137 static const char* gui_show_values_enum(int change, int arg); 137 138 static const char* gui_dof_show_value_enum(int change, int arg); 138 #if defined(CAMERA_s2is) || defined(CAMERA_s3is) || defined(CAMERA_g7)139 #if CAM_ADJUSTABLE_ALT_BUTTON 139 140 static const char* gui_alt_mode_button_enum(int change, int arg); 140 141 #endif … … 183 184 {LANG_MENU_SCRIPT_AUTOSTART, MENUITEM_BOOL, &conf.script_startup }, 184 185 185 #if !defined (CAMERA_a560) && !defined (CAMERA_a700)186 #if CAM_REMOTE 186 187 {LANG_MENU_SCRIPT_REMOTE_ENABLE, MENUITEM_BOOL, &conf.remote_enable}, 187 188 #endif … … 229 230 {LANG_MENU_MISC_TEXT_READER, MENUITEM_SUBMENU, (int*)&reader_submenu }, 230 231 {LANG_MENU_MISC_GAMES, MENUITEM_SUBMENU, (int*)&games_submenu }, 231 #if defined(CAMERA_a610) || defined(CAMERA_a620) || defined(CAMERA_a630) || defined(CAMERA_a640) || defined(CAMERA_a650) || defined (CAMERA_s2is) || defined (CAMERA_s3is) || defined (CAMERA_s5is)232 #if CAM_SWIVEL_SCREEN 232 233 {LANG_MENU_MISC_FLASHLIGHT, MENUITEM_BOOL, &conf.flashlight }, 233 234 #endif 234 235 {LANG_MENU_MISC_SHOW_SPLASH, MENUITEM_BOOL, &conf.splash_show }, 235 #if !defined(CAMERA_g7) && !defined (CAMERA_ixus700_sd500) && !defined (CAMERA_ixus800_sd700) && !defined (CAMERA_a560) && !defined (CAMERA_ixus850_sd800) && !defined (CAMERA_ixus70_sd1000) && !defined (CAMERA_ixus950_sd850) && !defined (CAMERA_a460) && !defined(CAMERA_ixus55_sd450) && !defined(CAMERA_a550)236 #if CAM_USE_ZOOM_FOR_MF 236 237 {LANG_MENU_MISC_ZOOM_FOR_MF, MENUITEM_BOOL, &conf.use_zoom_mf }, 237 238 #endif 238 #if defined(CAMERA_s2is) || defined(CAMERA_s3is) || defined(CAMERA_g7)239 #if CAM_ADJUSTABLE_ALT_BUTTON 239 240 {LANG_MENU_MISC_ALT_BUTTON, MENUITEM_ENUM, (int*)gui_alt_mode_button_enum }, 240 241 #endif … … 258 259 {LANG_MENU_DEBUG_DUMP_RAM, MENUITEM_BOOL, &conf.ns_enable_memdump }, 259 260 {LANG_MENU_DEBUG_MAKE_BOOTABLE, MENUITEM_PROC, (int*)gui_menuproc_mkbootdisk }, 260 #if defined (CAMERA_MULTIPART)261 #if CAM_MULTIPART 261 262 {LANG_MENU_DEBUG_CREATE_MULTIPART , MENUITEM_PROC, (int*)gui_menuproc_break_card }, 262 263 {LANG_MENU_DEBUG_SWAP_PART, MENUITEM_PROC, (int*)gui_menuproc_swap_patitons }, … … 798 799 799 800 //------------------------------------------------------------------- 800 #if defined(CAMERA_s2is) || defined(CAMERA_s3is) || defined(CAMERA_g7)801 #if CAM_ADJUSTABLE_ALT_BUTTON 801 802 const char* gui_alt_mode_button_enum(int change, int arg) { 802 803 #if defined(CAMERA_s2is) || defined(CAMERA_s3is) … … 1154 1155 //------------------------------------------------------------------- 1155 1156 1156 #if defined (CAMERA_MULTIPART)1157 #if CAM_MULTIPART 1157 1158 void card_break_proc(unsigned int btn){ 1158 1159 if (btn==MBOX_BTN_YES) create_partitions(); … … 1444 1445 } 1445 1446 else 1446 switch (kbd_get_autoclicked_key()) {1447 #if defined (CAMERA_a460)1448 case KEY_RIGHT:1447 switch (kbd_get_autoclicked_key()) { 1448 #if CAM_HAS_ZOOM_LEVER 1449 case KEY_ZOOM_IN: 1449 1450 #else 1450 case KEY_ZOOM_IN:1451 #endif 1452 gui_subj_dist_override_value_enum(1,0);1453 shooting_set_focus(shooting_get_subject_distance_override_value(),SET_NOW);1454 break;1455 #if defined (CAMERA_a460)1456 case KEY_LEFT:1451 case KEY_RIGHT: 1452 #endif 1453 gui_subj_dist_override_value_enum(1,0); 1454 shooting_set_focus(shooting_get_subject_distance_override_value(),SET_NOW); 1455 break; 1456 #if CAM_HAS_ZOOM_LEVER 1457 case KEY_ZOOM_OUT: 1457 1458 #else 1458 case KEY_ZOOM_OUT:1459 #endif 1460 gui_subj_dist_override_value_enum(-1,0);1461 shooting_set_focus(shooting_get_subject_distance_override_value(), SET_NOW);1462 break;1459 case KEY_LEFT: 1460 #endif 1461 gui_subj_dist_override_value_enum(-1,0); 1462 shooting_set_focus(shooting_get_subject_distance_override_value(), SET_NOW); 1463 break; 1463 1464 } 1464 1465 } … … 1693 1694 } 1694 1695 1695 #if defined (CAMERA_ixus700_sd500) || defined (CAMERA_ixus800_sd700) || defined (CAMERA_ixus850_sd800) || defined (CAMERA_a460)1696 if (gui_mode==GUI_MODE_NONE && kbd_is_key_pressed(KEY_SHOOT_HALF) && ((m&MODE_MASK)==MODE_REC) && ((m&MODE_SHOOTING_MASK))!=MODE_VIDEO_STD && (m&MODE_SHOOTING_MASK)!=MODE_VIDEO_COMPACT) { 1696 #if CAM_DRAW_EXPOSITION 1697 if (gui_mode==GUI_MODE_NONE && kbd_is_key_pressed(KEY_SHOOT_HALF) && ((m&MODE_MASK)==MODE_REC) && ((m&MODE_SHOOTING_MASK))!=MODE_VIDEO_STD && (m&MODE_SHOOTING_MASK)!=MODE_VIDEO_COMPACT) { 1697 1698 strcpy(osd_buf,shooting_get_tv_str()); 1698 1699 strcat(osd_buf,"\" F"); -
trunk/core/gui_calendar.c
r323 r324 111 111 need_redraw = 1; 112 112 break; 113 #if defined (CAMERA_ixus700_sd500) || defined (CAMERA_ixus800_sd700) || defined (CAMERA_a560) || defined (CAMERA_ixus850_sd800) || defined (CAMERA_ixus70_sd1000) || defined (CAMERA_a460) || defined(CAMERA_ixus55_sd450) || defined(CAMERA_a550) 113 #if CAM_HAS_ERASE_BUTTON 114 case KEY_ERASE: 115 #else 114 116 case KEY_DISPLAY: 115 #else116 case KEY_ERASE:117 117 #endif 118 118 calendar_goto_today(); -
trunk/core/gui_fselect.c
r323 r324 707 707 } 708 708 break; 709 #if defined (CAMERA_ixus700_sd500) || defined (CAMERA_ixus800_sd700) || defined (CAMERA_a560) || defined (CAMERA_ixus850_sd800) || defined (CAMERA_ixus70_sd1000) || defined (CAMERA_a460) || defined(CAMERA_ixus55_sd450) || defined(CAMERA_a550) 709 #if CAM_HAS_ERASE_BUTTON 710 case KEY_ERASE: 711 #else 710 712 case KEY_DISPLAY: 711 #else 712 case KEY_ERASE: 713 #endif 713 #endif 714 714 if (selected && selected->attr != 0xFF) { 715 715 if (selected->attr & DOS_ATTR_DIRECTORY) { -
trunk/core/gui_menu.c
r321 r324 94 94 #if !defined (CAMERA_a460) 95 95 96 #if defined(CAMERA_ixus700_sd500) || defined(CAMERA_ixus800_sd700) || defined(CAMERA_a560) || defined(CAMERA_ixus850_sd800) || defined(CAMERA_ixus70_sd1000) || defined(CAMERA_ixus950_sd850)97 case KEY_SHOOT_HALF:96 #if CAM_HAS_ERASE_BUTTON 97 case KEY_ERASE: 98 98 #else 99 case KEY_ERASE:99 case KEY_SHOOT_HALF: 100 100 #endif 101 101 if (conf.user_menu_enable == 3) { … … 317 317 break; 318 318 319 #if defined (CAMERA_a460) 319 #if CAM_HAS_ZOOM_LEVER 320 case KEY_ZOOM_IN: 321 if (int_incr >= 10){ 322 int_incr /= 10; 323 } 324 sprintf(sbuf, "±%d",int_incr); 325 draw_string(FONT_WIDTH*2,0," ", MAKE_COLOR(COLOR_TRANSPARENT, COLOR_TRANSPARENT)); 326 draw_string(0,0,sbuf,MAKE_COLOR(COLOR_SELECTED_BG, COLOR_SELECTED_FG)); 327 break; 328 329 case KEY_ZOOM_OUT: 330 if (int_incr <= 1000){ 331 int_incr *= 10; 332 } 333 sprintf(sbuf, "±%d",int_incr); 334 draw_string(0,0,sbuf,MAKE_COLOR(COLOR_SELECTED_BG, COLOR_SELECTED_FG)); 335 break; 336 337 case KEY_DISPLAY: 338 if (gui_menu_stack_ptr > 0){ 339 gui_menu_stack_ptr--; 340 gui_menu_set_curr_menu(gui_menu_stack[gui_menu_stack_ptr].menu, gui_menu_stack[gui_menu_stack_ptr].toppos, gui_menu_stack[gui_menu_stack_ptr].curpos); 341 gui_menu_redraw=2; 342 draw_restore(); 343 gui_force_restore(); 344 } 345 break; 346 #else 320 347 case KEY_DISPLAY: 321 348 if (conf.user_menu_enable == 2) { … … 338 365 } 339 366 draw_string(0,0,sbuf,MAKE_COLOR(COLOR_SELECTED_BG, COLOR_SELECTED_FG)); 340 }341 break;342 343 #else344 case KEY_ZOOM_IN:345 if (int_incr >= 10){346 int_incr /= 10;347 }348 sprintf(sbuf, "±%d",int_incr);349 draw_string(FONT_WIDTH*2,0," ", MAKE_COLOR(COLOR_TRANSPARENT, COLOR_TRANSPARENT));350 draw_string(0,0,sbuf,MAKE_COLOR(COLOR_SELECTED_BG, COLOR_SELECTED_FG));351 break;352 353 case KEY_ZOOM_OUT:354 if (int_incr <= 1000){355 int_incr *= 10;356 }357 sprintf(sbuf, "±%d",int_incr);358 draw_string(0,0,sbuf,MAKE_COLOR(COLOR_SELECTED_BG, COLOR_SELECTED_FG));359 break;360 361 case KEY_DISPLAY:362 if (gui_menu_stack_ptr > 0){363 gui_menu_stack_ptr--;364 gui_menu_set_curr_menu(gui_menu_stack[gui_menu_stack_ptr].menu, gui_menu_stack[gui_menu_stack_ptr].toppos, gui_menu_stack[gui_menu_stack_ptr].curpos);365 gui_menu_redraw=2;366 draw_restore();367 gui_force_restore();368 367 } 369 368 break; -
trunk/core/gui_osd.c
r323 r324 469 469 //long lfpfl=lens_get_focus_pos_fl(); 470 470 471 #if defined(CAMERA_ixus700_sd500) || defined(CAMERA_ixus800_sd700) || defined(CAMERA_ixus65_sd630) || defined(CAMERA_a560) || defined(CAMERA_ixus850_sd800) || defined(CAMERA_ixus70_sd1000) || defined(CAMERA_ixus950_sd850) || defined(CAMERA_a460) || defined(CAMERA_ixus55_sd450) || defined(CAMERA_a550) 471 #if CAM_HAS_IRIS_DIAPHRAGM 472 av=shooting_get_real_aperture(); 473 #else 472 474 av=shooting_get_min_real_aperture(); 473 #else474 av=shooting_get_real_aperture();475 475 #endif 476 476 fl=get_focal_length(lens_get_zoom_point()); … … 713 713 } 714 714 if (conf.av_override_value || gui_mode==GUI_MODE_OSD) gui_print_osd_state_string_float("AV:", "%d.%02d ", 100, shooting_get_aperture_from_av96(shooting_get_av96_override_value())); 715 #if defined (CAMERA_ixus700_sd500) || defined (CAMERA_ixus800_sd700) || defined (CAMERA_ixus850_sd800) || defined (CAMERA_ixus70_sd1000) || defined (CAMERA_ixus950_sd850) || defined (CAMERA_a560) || defined (CAMERA_a570) || defined (CAMERA_a710) || defined (CAMERA_g7) || defined(CAMERA_ixus55_sd450) || defined(CAMERA_a550)715 #if CAM_HAS_ND_FILTER 716 716 if (conf.nd_filter_state || gui_mode==GUI_MODE_OSD) gui_print_osd_state_string_chr("NDFILTER:", ((conf.nd_filter_state==1)?"IN":"OUT")); 717 717 #endif -
trunk/core/gui_reversi.c
r323 r324 378 378 need_redraw = 1; 379 379 break; 380 #if defined (CAMERA_ixus700_sd500) || defined (CAMERA_ixus800_sd700) || defined (CAMERA_a560) || defined (CAMERA_ixus850_sd800) || defined (CAMERA_ixus70_sd1000) || defined (CAMERA_a460) || defined(CAMERA_ixus55_sd450) || defined(CAMERA_a550) 380 #if CAM_HAS_ERASE_BUTTON 381 case KEY_ERASE: 382 #else 381 383 case KEY_DISPLAY: 382 #else 383 case KEY_ERASE: 384 #endif 384 #endif 385 385 if (InGame) 386 386 Computer=COMPUTER_ONLY; … … 389 389 need_redraw = 1; 390 390 break; 391 #if !defined (CAMERA_ixus700_sd500) && !defined (CAMERA_ixus800_sd700) && !defined (CAMERA_a560) && !defined (CAMERA_ixus850_sd800) && !defined (CAMERA_ixus70_sd1000) && !defined (CAMERA_a460) && !defined(CAMERA_ixus55_sd450) && !defined(CAMERA_a550)391 #if CAM_HAS_ERASE_BUTTON 392 392 case KEY_DISPLAY: 393 393 gui_mbox_init(LANG_MBOX_ABOUT_TITLE, (int)"REVERSI\n(c) GrAnd, 2007", MBOX_TEXT_CENTER, NULL); 394 394 need_redraw_all = 1; 395 395 break; 396 #endif396 #endif 397 397 } 398 398 } -
trunk/core/gui_sokoban.c
r323 r324 259 259 need_redraw = 1; 260 260 break; 261 #if defined (CAMERA_ixus700_sd500) || defined (CAMERA_ixus800_sd700) || defined (CAMERA_a560) || defined (CAMERA_ixus850_sd800) || defined (CAMERA_ixus70_sd1000) || defined (CAMERA_a460) || defined(CAMERA_ixus55_sd450) || defined(CAMERA_a550) 261 #if CAM_HAS_ERASE_BUTTON 262 case KEY_ERASE: 263 #else 262 264 case KEY_DISPLAY: 263 #else 264 case KEY_ERASE: 265 #endif 265 #endif 266 266 sokoban_set_level(conf.sokoban_level); 267 267 need_redraw = 1; 268 268 break; 269 #if !defined (CAMERA_ixus700_sd500) && !defined (CAMERA_ixus800_sd700) && !defined (CAMERA_a560) && !defined (CAMERA_ixus850_sd800) && !defined (CAMERA_ixus70_sd1000) && !defined (CAMERA_a460) && !defined(CAMERA_ixus55_sd450) && !defined(CAMERA_a550)269 #if CAM_HAS_ERASE_BUTTON 270 270 case KEY_DISPLAY: 271 271 gui_mbox_init(LANG_MBOX_ABOUT_TITLE, (int)"SOKOBAN\n(c) GrAnd, 2007", MBOX_TEXT_CENTER, NULL); -
trunk/core/raw.c
r258 r324 112 112 113 113 void set_raw_pixel(unsigned int x, unsigned int y, unsigned short value){ 114 unsigned char* addr=hook_raw_image_addr()+y*R OWLEN+(x/8)*10;114 unsigned char* addr=hook_raw_image_addr()+y*RAW_ROWLEN+(x/8)*10; 115 115 switch (x%8) { 116 116 case 0: addr[0]=(addr[0]&0x3F)|(value<<6); addr[1]=value>>2; break; … … 127 127 //------------------------------------------------------------------- 128 128 unsigned short get_raw_pixel(unsigned int x,unsigned int y){ 129 unsigned char* addr=hook_raw_image_addr()+y*R OWLEN+(x/8)*10;129 unsigned char* addr=hook_raw_image_addr()+y*RAW_ROWLEN+(x/8)*10; 130 130 switch (x%8) { 131 131 case 0: return ((0x3fc&(((unsigned short)addr[1])<<2)) | (addr[0] >> 6)); … … 143 143 //------------------------------------------------------------------- 144 144 void patch_bad_pixel(unsigned int x,unsigned int y){ 145 if ((x>=2) && (x< ROWPIX-2) && (y>=2) && (y<ROWS-2))145 if ((x>=2) && (x<CAM_RAW_ROWPIX-2) && (y>=2) && (y<CAM_RAW_ROWS-2)) 146 146 set_raw_pixel(x,y,(get_raw_pixel(x-2,y)+get_raw_pixel(x+2,y)+get_raw_pixel(x,y-2)+get_raw_pixel(x,y+2))/4); 147 147 } -
trunk/core/raw.h
r323 r324 1 1 #ifndef RAW_H 2 2 #define RAW_H 3 4 #include "camera.h" 3 5 4 6 //------------------------------------------------------------------- … … 15 17 //------------------------------------------------------------------- 16 18 17 #if defined (CAMERA_g7) || (CAMERA_a640) 18 #define ROWPIX 3736 // for 10 MP 19 #define ROWS 2772 // for 10 MP 20 21 #elif defined (CAMERA_a630) 22 #define ROWPIX 3344 // for 8 MP 23 #define ROWS 2484 // for 8 MP 24 25 #elif defined (CAMERA_a620) || defined (CAMERA_a710) || defined (CAMERA_a560) || defined (CAMERA_a570) || defined (CAMERA_ixus700_sd500) || defined (CAMERA_ixus850_sd800) || defined (CAMERA_ixus70_sd1000) || defined(CAMERA_a550) 26 #define ROWPIX 3152 // for 7 MP 27 #define ROWS 2340 // for 7 MP 28 29 #elif defined (CAMERA_a700) || defined (CAMERA_s3is) || defined (CAMERA_ixus65_sd630) || defined (CAMERA_ixus800_sd700) 30 #define ROWPIX 2888 // for 6 MP 31 #define ROWS 2136 // for 6 MP 32 33 #elif defined (CAMERA_a610) || defined (CAMERA_s2is) || defined (CAMERA_ixus55_sd450) 34 #define ROWPIX 2672 // for 5 MP 35 #define ROWS 1968 // for 5 MP 36 37 #elif defined (CAMERA_a720) || defined (CAMERA_s5is) || defined (CAMERA_ixus950_sd850) 38 #define ROWPIX 3336 // for new 8 MP 39 #define ROWS 2480 // for new 8 MP 40 41 #elif defined (CAMERA_a650) 42 #define ROWPIX 4104 // for 12 MP 43 #define ROWS 3048 // for 12 MP 44 45 #elif defined (CAMERA_a460) 46 #define ROWPIX 2664 // for 5 MP 1/3" sensor size 47 #define ROWS 1968 // for 5 MP 1/3" sensor size 48 49 #else 50 #error camera type not defined 51 52 #endif 53 54 #define ROWLEN ((ROWPIX*10)/8) 19 #define RAW_ROWLEN ((CAM_RAW_ROWPIX*10)/8) 55 20 56 21 //------------------------------------------------------------------- -
trunk/core/raw_merge.c
r254 r324 21 21 int raw_merge_start(int action){ 22 22 unsigned int req, avail; 23 req=(( ROWPIX*ROWS)>>18)+1;23 req=((CAM_RAW_ROWPIX*CAM_RAW_ROWS)>>18)+1; 24 24 avail=GetFreeCardSpaceKb()>>10; 25 25 if (avail<req) { … … 30 30 raw_action=action; 31 31 raw_count=0; 32 row=malloc( ROWPIX*sizeof(unsigned short));32 row=malloc(CAM_RAW_ROWPIX*sizeof(unsigned short)); 33 33 if (!row) return 0; 34 rawrow=malloc(R OWLEN);34 rawrow=malloc(RAW_ROWLEN); 35 35 if (!rawrow) { free(row); return 0;} 36 36 return 1; … … 54 54 fbrawout=fopen(TEMP_FILE_NAME_1,"w+b"); 55 55 if (fbrawout){ 56 fread(rawrow, 1, R OWLEN, fcraw);57 if (raw_count) fread(row, 1, ROWPIX*sizeof(unsigned short), fbrawin); else for (i=0;i<ROWPIX;i++) row[i]=0;56 fread(rawrow, 1, RAW_ROWLEN, fcraw); 57 if (raw_count) fread(row, 1, CAM_RAW_ROWPIX*sizeof(unsigned short), fbrawin); else for (i=0;i<CAM_RAW_ROWPIX;i++) row[i]=0; 58 58 59 for (nrow=0,j=0;nrow< ROWS;nrow++,j++){59 for (nrow=0,j=0;nrow<CAM_RAW_ROWS;nrow++,j++){ 60 60 61 for (i=0,src=0; i< ROWPIX; i+=8, src+=10){61 for (i=0,src=0; i<CAM_RAW_ROWPIX; i+=8, src+=10){ 62 62 63 63 row[i+0]+=((0x3fc&(((unsigned short)rawrow[src+1])<<2)) | (rawrow[src+0] >> 6)); … … 71 71 72 72 } 73 fwrite(row, 1, ROWPIX*sizeof(unsigned short), fbrawout);74 if (raw_count) fread(row, 1, ROWPIX*sizeof(unsigned short), fbrawin); else for (i=0;i<ROWPIX;i++) row[i]=0;75 fread(rawrow, 1, R OWLEN, fcraw);76 if (j>= ROWS/10) {j-=ROWS/10; gui_browser_progress_show(filename, nrow*100/ROWS);}73 fwrite(row, 1, CAM_RAW_ROWPIX*sizeof(unsigned short), fbrawout); 74 if (raw_count) fread(row, 1, CAM_RAW_ROWPIX*sizeof(unsigned short), fbrawin); else for (i=0;i<CAM_RAW_ROWPIX;i++) row[i]=0; 75 fread(rawrow, 1, RAW_ROWLEN, fcraw); 76 if (j>=CAM_RAW_ROWS/10) {j-=CAM_RAW_ROWS/10; gui_browser_progress_show(filename, nrow*100/CAM_RAW_ROWS);} 77 77 } 78 78 raw_count++; … … 101 101 fcraw=fopen(namebuf,"w+b"); 102 102 if (fcraw) { 103 fread(row, 1, ROWPIX*sizeof(unsigned short), fbraw);104 for (nrow=0,j=0;nrow< ROWS;nrow++,j++){105 for (i=0;i< ROWPIX;i++){103 fread(row, 1, CAM_RAW_ROWPIX*sizeof(unsigned short), fbraw); 104 for (nrow=0,j=0;nrow<CAM_RAW_ROWS;nrow++,j++){ 105 for (i=0;i<CAM_RAW_ROWPIX;i++){ 106 106 if (raw_action==RAW_OPERATIOM_AVERAGE) row[i]/=raw_count; else { 107 107 if (row[i]>BLACK_LEVEL*(raw_count-1)) row[i]-=BLACK_LEVEL*(raw_count-1); else row[i]=0; … … 110 110 } 111 111 112 for (i=0,src=0;i< ROWPIX;i+=8,src+=10) {112 for (i=0,src=0;i<CAM_RAW_ROWPIX;i+=8,src+=10) { 113 113 rawrow[src+0]=(row[i+0]<<6)|(row[i+1]>>4); 114 114 rawrow[src+1]=(row[i+0]>>2); … … 122 122 rawrow[src+9]=(row[i+6]<<2)|(row[i+7]>>8); 123 123 } 124 fwrite(rawrow, 1, R OWLEN, fcraw);125 fread(row, 1, ROWPIX*sizeof(unsigned short), fbraw);126 if (j>= ROWS/5) {j-=ROWS/5; gui_browser_progress_show(namebuf, nrow*100/ROWS);}124 fwrite(rawrow, 1, RAW_ROWLEN, fcraw); 125 fread(row, 1, CAM_RAW_ROWPIX*sizeof(unsigned short), fbraw); 126 if (j>=CAM_RAW_ROWS/5) {j-=CAM_RAW_ROWS/5; gui_browser_progress_show(namebuf, nrow*100/CAM_RAW_ROWS);} 127 127 } 128 128 fclose(fcraw); -
trunk/include/platform.h
r323 r324 1 1 #ifndef PLATFORM_H 2 2 #define PLATFORM_H 3 4 #include "camera.h" 3 5 4 6 #define SSID_INVALID (-32767) … … 52 54 }; 53 55 54 #if defined(CAMERA_a570) || defined(CAMERA_a560) || defined(CAMERA_a720) || defined (CAMERA_ixus70_sd1000) || defined (CAMERA_ixus950_sd850) || defined(CAMERA_a650) || defined(CAMERA_a460) || defined(CAMERA_a550)56 #if CAM_DIGIC3 55 57 #define PROPCASE_DRIVE_MODE 102 56 58 #define PROPCASE_FOCUS_MODE 133 … … 73 75 #define PROPCASE_SHOOTING_MODE 49 74 76 75 #el se77 #elif CAM_DIGIC2 76 78 #define PROPCASE_DRIVE_MODE 6 77 79 #define PROPCASE_FOCUS_MODE 12 … … 93 95 #define PROPCASE_OVEREXPOSURE 76 94 96 #define PROPCASE_SHOOTING_MODE 0 97 98 #else 99 #error unknown camera processor 95 100 #endif 96 101 … … 109 114 #define ASID_MIN (aperture_sizes_table[0].id) 110 115 #define ASID_MAX (aperture_sizes_table[AS_SIZE-1].id) 111 112 #if defined (CAMERA_g7) || defined (CAMERA_a710) || defined (CAMERA_s3is) || defined (CAMERA_a630) || defined (CAMERA_a640) || defined (CAMERA_a560) || defined (CAMERA_a570) || defined(CAMERA_a550)113 #define CAMERA_MULTIPART114 #endif115 116 116 117 /* Keyboard repeat and initial delays */ -
trunk/lib/ubasic/ubasic.c
r323 r324 46 46 #include "platform.h" 47 47 #include "script.h" 48 #include "camera.h" 48 49 #endif 49 50 #include "tokenizer.h" -
trunk/makefile.inc
r323 r324 134 134 CFLAGS+=-mthumb-interwork 135 135 CFLAGS+=-I$(topdir)include $(PLFLAGS) $(CPPFLAGS) 136 CFLAGS+=-DPLATFORM=\"$(PLATFORM)\" -DPLATFORMSUB=\"$(PLATFORMSUB)\" -DHDK_VERSION=\"$(VER)\" -DBUILD_NUMBER=\"$(BUILD_NUMBER)\" -DCAMERA_$(PLATFORM) 136 CFLAGS+=-DPLATFORM=\"$(PLATFORM)\" -DPLATFORMSUB=\"$(PLATFORMSUB)\" -DHDK_VERSION=\"$(VER)\" -DBUILD_NUMBER=\"$(BUILD_NUMBER)\" -DCAMERA_$(PLATFORM)=1 137 137 CFLAGS+=-Wall -Wno-unused -Wno-format 138 138 LDFLAGS=-L$(topdir)lib/math -L$(topdir)lib/font -
trunk/platform/generic/main.c
r300 r324 1 #include "camera.h" 1 2 #include "lolevel.h" 2 3 #include "platform.h" … … 101 102 if (my_ncmp(name, "tInitFileM", 10) == 0){ 102 103 init_file_modules_prev = (void*)(*entry); 103 #if defined (CAMERA_MULTIPART)104 #if CAM_MULTIPART 104 105 *entry = (long)init_file_modules_task; 105 106 #else -
trunk/platform/generic/wrappers.c
r316 r324 1 #include "camera.h" 1 2 #include "lolevel.h" 2 3 #include "platform.h" … … 444 445 } 445 446 446 #if defined(CAMERA_MULTIPART)447 #if CAM_MULTIPART 447 448 static char mbr_buf[512]; 448 449 static unsigned long drive_sectors;
Note: See TracChangeset
for help on using the changeset viewer.