Changeset 1915
- Timestamp:
- 06/11/12 08:08:25 (11 months ago)
- Location:
- trunk
- Files:
-
- 13 edited
-
core/conf.c (modified) (1 diff)
-
core/dng.c (modified) (12 diffs)
-
core/games/gui_reversi.c (modified) (1 diff)
-
core/games/gui_sokoban.c (modified) (1 diff)
-
core/games/gui_sudoku.c (modified) (2 diffs)
-
core/games/gui_tetris.c (modified) (1 diff)
-
core/gui_calendar.c (modified) (1 diff)
-
core/gui_osd_edit.c (modified) (2 diffs)
-
core/main.c (modified) (2 diffs)
-
core/modules/Makefile (modified) (1 diff)
-
core/motion_detector.c (modified) (1 diff)
-
include/camera.h (modified) (2 diffs)
-
include/conf.h (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/core/conf.c
r1874 r1915 350 350 CONF_INFO(205, conf.fast_movie_quality_control, CONF_DEF_VALUE, i:1, NULL), 351 351 CONF_INFO(206, conf.remote_zoom_enable, CONF_DEF_VALUE, i:0, NULL), 352 CONF_INFO(207, conf.zoom_timeout, CONF_DEF_VALUE, i:5, NULL), 352 // CONF_INFO(207, conf.zoom_timeout, CONF_DEF_VALUE, i:5, NULL), // Not used 353 353 CONF_INFO(208, conf.start_sound, CONF_DEF_VALUE, i:0, NULL), 354 354 CONF_INFO(209, conf.sub_batch_prefix, CONF_DEF_VALUE, i:RAW_PREFIX_SND, NULL), // SND_ -
trunk/core/dng.c
r1866 r1915 1 #include "camera.h"2 3 1 #include "stdlib.h" 4 2 #include "string.h" … … 48 46 static char copyright[64] = ""; 49 47 const short cam_PreviewBitsPerSample[] = {8,8,8}; 50 const char cam_chdk_ver[] = HDK_VERSION" ver. "BUILD_NUMBER;51 48 const int cam_Resolution[] = {180,1}; 52 49 static int cam_AsShotNeutral[] = {1000,1000,1000,1000,1000,1000}; … … 75 72 #define BE(v) ((v&0x000000FF)<<24)|((v&0x0000FF00)<<8)|((v&0x00FF0000)>>8)|((v&0xFF000000)>>24) // Convert to big_endian 76 73 74 #define BADPIX_CFA_INDEX 6 // Index of CFAPattern value in badpixel_opcodes array 75 77 76 static unsigned int badpixel_opcode[] = 78 77 { … … 86 85 BE(8), // Opcode length = 8 bytes 87 86 BE(0), // Constant = 0 88 #if cam_CFAPattern == 0x02010100 89 BE(1), // BayerPhase = 1 (top left pixel is green in a green/red row) 90 #elif cam_CFAPattern == 0x01020001 91 BE(0), // BayerPhase = 0 (top left pixel is red) 92 #elif cam_CFAPattern == 0x01000201 93 BE(3), // BayerPhase = 3 (top left pixel is blue) 94 #elif cam_CFAPattern == 0x00010102 95 BE(2), // BayerPhase = 2 (top left pixel is green in a green/blue row) 96 #endif 87 BE(0), // CFAPattern (set in code below) 97 88 }; 98 89 … … 104 95 #define THUMB_DATA_INDEX 9 // tag 0x111 105 96 #define ORIENTATION_INDEX 10 // tag 0x112 97 #define CHDK_VER_INDEX 15 // tag 0x131 106 98 #define ARTIST_NAME_INDEX 17 // tag 0x13B 107 99 #define SUBIFDS_INDEX 18 // tag 0x14A … … 134 126 {0x117, T_LONG, 1, DNG_TH_WIDTH*DNG_TH_HEIGHT*3}, // StripByteCounts = preview size 135 127 {0x11C, T_SHORT, 1, 1}, // PlanarConfiguration: 1 136 {0x131, T_ASCII , sizeof(cam_chdk_ver), (int)cam_chdk_ver},//Software128 {0x131, T_ASCII|T_PTR,32, 0}, // Software 137 129 {0x132, T_ASCII, 20, (int)cam_datetime}, // DateTime 138 130 {0x13B, T_ASCII|T_PTR,64, (int)artist_name}, // Artist: Filled at header generation. … … 173 165 {0x102, T_SHORT|T_PTR,1, (int)&camera_sensor.bits_per_pixel},// BitsPerSample 174 166 {0x103, T_SHORT, 1, 1}, // Compression: Uncompressed 175 {0x106, T_SHORT, 1, 0x8023}, // PhotometricInterpretation: CFA176 {0x111, T_LONG, 1, 0}, // StripOffsets: Offset167 {0x106, T_SHORT, 1, 0x8023}, // PhotometricInterpretation: CFA 168 {0x111, T_LONG, 1, 0}, // StripOffsets: Offset 177 169 {0x115, T_SHORT, 1, 1}, // SamplesPerPixel: 1 178 {0x116, T_SHORT|T_PTR,1, (int)&camera_sensor.raw_rows}, // RowsPerStrip170 {0x116, T_SHORT|T_PTR,1, (int)&camera_sensor.raw_rows}, // RowsPerStrip 179 171 {0x117, T_LONG|T_PTR, 1, (int)&camera_sensor.raw_size}, // StripByteCounts = CHDK RAW size 180 172 {0x11A, T_RATIONAL, 1, (int)cam_Resolution}, // XResolution … … 306 298 ifd0[DNG_VERSION_INDEX].offset = BE(0x01030000); 307 299 ifd1[BADPIXEL_OPCODE_INDEX].type &= ~T_SKIP; 300 // Set CFAPattern value 301 switch (camera_sensor.cfa_pattern) 302 { 303 case 0x02010100: 304 badpixel_opcode[BADPIX_CFA_INDEX] = BE(1); // BayerPhase = 1 (top left pixel is green in a green/red row) 305 break; 306 case 0x01020001: 307 badpixel_opcode[BADPIX_CFA_INDEX] = BE(0); // BayerPhase = 0 (top left pixel is red) 308 break; 309 case 0x01000201: 310 badpixel_opcode[BADPIX_CFA_INDEX] = BE(3); // BayerPhase = 3 (top left pixel is blue) 311 break; 312 case 0x00010102: 313 badpixel_opcode[BADPIX_CFA_INDEX] = BE(2); // BayerPhase = 2 (top left pixel is green in a green/blue row) 314 break; 315 } 308 316 } 309 317 … … 327 335 328 336 ifd0[CAMERA_NAME_INDEX].count = ifd0[UNIQUE_CAMERA_MODEL_INDEX].count = strlen(cam_name) + 1; 337 ifd0[CHDK_VER_INDEX].offset = (int)camera_info.chdk_ver; 338 ifd0[CHDK_VER_INDEX].count = strlen(camera_info.chdk_ver) + 1; 329 339 ifd0[ARTIST_NAME_INDEX].count = strlen(artist_name) + 1; 330 340 ifd0[COPYRIGHT_INDEX].count = strlen(copyright) + 1; … … 724 734 for (c[1]=camera_sensor.active_area.y1; c[1]<camera_sensor.active_area.y2; c[1]++) 725 735 { 726 if (get_raw_pixel(c[0],c[1]) <= DNG_BADPIXEL_VALUE_LIMIT)736 if (get_raw_pixel(c[0],c[1]) <= camera_sensor.dng_badpixel_value_limit) 727 737 { 728 738 unsigned short l; 729 739 for (l=0; l<7 && (c[1]+l+1)<camera_sensor.active_area.y2; l++) 730 if (get_raw_pixel(c[0],c[1]+l+1) > DNG_BADPIXEL_VALUE_LIMIT)740 if (get_raw_pixel(c[0],c[1]+l+1) > camera_sensor.dng_badpixel_value_limit) 731 741 break; 732 742 c[1] = c[1] | (l << 13); … … 794 804 cnt = (ptr[1] >> 13) & 7; 795 805 for (; cnt>=0; cnt--, y++) 796 if (get_raw_pixel(ptr[0], y) <= DNG_BADPIXEL_VALUE_LIMIT)806 if (get_raw_pixel(ptr[0], y) <= camera_sensor.dng_badpixel_value_limit) 797 807 patch_bad_pixel(ptr[0], y); 798 808 } … … 977 987 978 988 ANY_CHDK_BRANCH, 0, // Requirements of CHDK version 979 PLATFORMID,// Specify platform dependency989 ANY_PLATFORM_ALLOWED, // Specify platform dependency 980 990 MODULEINFO_FLAG_SYSTEM, // flag 981 991 (int32_t)"DNG (dll)", // Module name -
trunk/core/games/gui_reversi.c
r1594 r1915 11 11 12 12 #include "module_load.h" 13 #include "module_exportlist.h" 13 14 14 15 void gui_module_menu_kbd_process(); -
trunk/core/games/gui_sokoban.c
r1621 r1915 12 12 13 13 #include "module_load.h" 14 #include "module_exportlist.h" 14 15 15 16 //------------------------------------------------------------------- -
trunk/core/games/gui_sudoku.c
r1865 r1915 22 22 23 23 #include "module_load.h" 24 #include "module_exportlist.h" 24 25 25 26 void gui_module_menu_kbd_process(); … … 874 875 draw|=FIELD|MENU; 875 876 break; 876 #if CAM_HAS_ERASE_BUTTON877 877 case KEY_ERASE: 878 #else879 878 case KEY_SHOOT_HALF: 880 #endif881 879 if (mode & (MODE_VIEW | MODE_EDIT)) 882 880 { -
trunk/core/games/gui_tetris.c
r1612 r1915 11 11 12 12 #include "module_load.h" 13 #include "module_exportlist.h" 13 14 14 15 void gui_module_menu_kbd_process(); -
trunk/core/gui_calendar.c
r1612 r1915 11 11 12 12 #include "module_load.h" 13 #include "module_exportlist.h" 13 14 14 15 void gui_calendar_menu_kbd_process(); -
trunk/core/gui_osd_edit.c
r1865 r1915 13 13 14 14 #include "module_load.h" 15 #include "module_exportlist.h" 15 16 16 17 //------------------------------------------------------------------- … … 202 203 203 204 ANY_CHDK_BRANCH, 0, // Requirements of CHDK version 204 ANY_PLATFORM_ALLOWED, // Specify platform dependency205 PLATFORMID, // Specify platform dependency (uses CAM_EV_IN_VIDEO to create array) 205 206 MODULEINFO_FLAG_SYSTEM, // flag 206 207 (int32_t)"OSD Editor", // Module name -
trunk/core/main.c
r1866 r1915 94 94 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, 95 95 #endif 96 DNG_BADPIXEL_VALUE_LIMIT, 96 97 }; 97 98 … … 163 164 }, 164 165 ROMBASEADDR, MAXRAMADDR, 166 0, 167 HDK_VERSION" ver. "BUILD_NUMBER, 165 168 }; 166 169 -
trunk/core/modules/Makefile
r1874 r1915 41 41 %.flt: %.elf 42 42 @echo \-\> $@ 43 # arm-elf-objdump .exe-d -r -x $< >$<.dumpobj43 # arm-elf-objdump$(EXE) -d -r -x $< >$<.dumpobj 44 44 # $(topdir)/tools/elf2flt/elf2flt$(EXE) $< $@ -e -f -h -r -s -iexportlist.txt -!$(topdir)/tools/elf2flt/stoplist.txt >$@.dump 45 45 $(topdir)/tools/elf2flt/elf2flt$(EXE) $< $@ -iexportlist.txt -!$(topdir)/tools/elf2flt/stoplist.txt > $(DEVNULL) -
trunk/core/motion_detector.c
r1828 r1915 30 30 #include "gui.h" 31 31 #include "gui_draw.h" 32 #include "module_exportlist.h" 32 33 33 34 -
trunk/include/camera.h
r1884 r1915 286 286 int has_forwardmatrix2; 287 287 int forward_matrix2[18]; // DNG Camera Forward Matrix 1 288 int dng_badpixel_value_limit; 288 289 } _cam_sensor; 289 290 … … 330 331 int rombaseaddr, maxramaddr; 331 332 int tick_count_offset; // get_tick_count value at which the clock ticks over 1 second 333 char* chdk_ver; 332 334 } _cam_info; 333 335 -
trunk/include/conf.h
r1874 r1915 39 39 // If add field to the end of structure minor api version should be increased. 40 40 // If any other change (remove something, change order, add not to the end, change meaning), major api version should be increased 41 // Don't make any of the entries conditionally compiled in - this will change the offsets between cameras causing problems with 42 // making the modules camera/platform independant 41 43 typedef struct { 42 44 int api_version; // version of this structure … … 297 299 int edge_overlay_filter; 298 300 int edge_overlay_thresh; 299 int edge_overlay_zoom; // shall zoom be set when *edg file is loaded?300 int edge_overlay_pano; // whether a full press changes back to live mode301 int edge_overlay_pano_overlap; // overlap in % in pano mode302 int edge_overlay_show; // whether to show overlay even when no button is pressed303 int edge_overlay_play; // whether edge overlay is switched on also for play mode301 int edge_overlay_zoom; // shall zoom be set when *edg file is loaded? 302 int edge_overlay_pano; // whether a full press changes back to live mode 303 int edge_overlay_pano_overlap; // overlap in % in pano mode 304 int edge_overlay_show; // whether to show overlay even when no button is pressed 305 int edge_overlay_play; // whether edge overlay is switched on also for play mode 304 306 color edge_overlay_color; 305 307 … … 308 310 int synch_delay_enable; 309 311 int synch_delay_value; 310 int synch_delay_coarse_value;// obsolete - no longer used312 //int synch_delay_coarse_value; // obsolete - no longer used 311 313 int remote_zoom_enable; 312 int zoom_timeout;314 //int zoom_timeout; // obsolete - no longer used 313 315 314 316 int script_param_set; … … 336 338 int remote_enable_scripts; // usb remote activates scripts in <ALT> mode 337 339 338 #if defined(CAM_ZOOM_ASSIST_BUTTON_CONTROL)339 340 int zoom_assist_button_disable; // used to disable the zoom assist button on SX30 & SX40 for people who keep accidentaly pressing it 340 #endif 341 342 #ifdef CAM_HAS_GPS 341 343 342 int gps_record; 344 343 int gps_navi_show; … … 374 373 int gps_beep_warn; 375 374 int gps_on_off; 376 #endif377 375 378 376 int tbox_char_map; // Text input box language/char map
Note: See TracChangeset
for help on using the changeset viewer.