Changeset 623


Ignore:
Timestamp:
12/07/08 00:05:29 (4 years ago)
Author:
EWAVR
Message:

+added optional DNG extension for DNG files
+added possibility to create badpixel.bin from scripts
-fixed small bug in file browser - http://chdk.kernreaktor.org/mantis/view.php?id=129

Location:
trunk
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • trunk/CHDK/LANG/english.lng

    r603 r623  
    578578437 "Enable flash in video?" 
    579579438 "   Flash Power" 
     580439 "'DNG' file extension" 
  • trunk/core/conf.c

    r604 r623  
    395395    CONF_INFO(232, conf.flash_video_override,     CONF_DEF_VALUE, i:0, NULL), 
    396396    CONF_INFO(233, conf.flash_video_override_power,     CONF_DEF_VALUE, i:0, NULL), 
     397    CONF_INFO(234, conf.raw_dng_ext,     CONF_DEF_VALUE, i:0, NULL), 
    397398    }; 
    398399#define CONF_NUM (sizeof(conf_info)/sizeof(conf_info[0])) 
  • trunk/core/dng_hdr.c

    r605 r623  
    3232 {0x103,  T_SHORT,     1,  1},   // Compression: Uncompressed 
    3333 {0x106,  T_SHORT,     1,  2}, //PhotometricInterpretation: RGB 
     34 {0x10E,  T_ASCII,     0,  0}, // ImageDescription 
    3435 {0x10F,  T_ASCII,     6,  (int)"Canon"}, // Make 
    3536 {0x110,  T_ASCII,     32, (int)cam_name}, //Model: Filled at header generation. 
     
    4142 {0x11C,  T_SHORT,     1,  1}, // PlanarConfiguration: 1 
    4243 {0x131,  T_ASCII,     (sizeof(cam_chdk_ver)/2)*2,  (int)cam_chdk_ver}, //Software 
    43  {0x132,  T_ASCII,     20, 0}, // DataTime 
     44 {0x132,  T_ASCII,     20, 0}, // DateTime 
    4445 {0x14A,  T_LONG,      1,  0}, //SubIFDs offset 
    4546 {0x8298, T_ASCII,     0,  0}, // Copyright 
  • trunk/core/gui.c

    r615 r623  
    774774    {0x5c,LANG_MENU_BAD_PIXEL_REMOVAL,       MENUITEM_ENUM,      (int*)gui_bad_pixel_enum }, 
    775775#if DNG_SUPPORT 
    776     {0x5c, LANG_MENU_DNG_FORMAT,                MENUITEM_BOOL | MENUITEM_ARG_CALLBACK, &conf.dng_raw , (int)cb_change_dng }, 
    777 #endif 
    778     {0x5c,LANG_MENU_RAW_CACHED,          MENUITEM_BOOL,      &conf.raw_cache }, 
     776    {0x5c,LANG_MENU_DNG_FORMAT,              MENUITEM_BOOL | MENUITEM_ARG_CALLBACK, &conf.dng_raw , (int)cb_change_dng }, 
     777    {0x5c,LANG_MENU_RAW_DNG_EXT,             MENUITEM_BOOL,      &conf.raw_dng_ext}, 
     778#endif 
     779    {0x5c,LANG_MENU_RAW_CACHED,              MENUITEM_BOOL,      &conf.raw_cache }, 
    779780    {0x51,LANG_MENU_BACK,                    MENUITEM_UP }, 
    780781    {0} 
  • trunk/core/gui_fselect.c

    r613 r623  
    988988            break; 
    989989        case KEY_SET: 
    990             if (selected && selected->attr != 0xFF) { 
     990            if (selected && selected->attr != 0xFF && gui_fselect_redraw==0) { 
    991991                if (selected->attr & DOS_ATTR_DIRECTORY) { 
    992992                    i=strlen(current_dir); 
  • trunk/core/gui_lang.c

    r603 r623  
    559559"437 \"Enable flash in video?\"\n" 
    560560"438 \"   Power of flash\"\n" 
     561"439 \"'DNG' file extension\"\n" 
    561562; 
    562563 
  • trunk/core/gui_lang.h

    r603 r623  
    549549#define LANG_MENU_FLASH_VIDEO_OVERRIDE     437 
    550550#define LANG_MENU_FLASH_VIDEO_OVERRIDE_POWER     438 
     551#define LANG_MENU_RAW_DNG_EXT              439 
    551552//------------------------------------------------------------------- 
    552553 
    553 #define GUI_LANG_ITEMS                  438 
     554#define GUI_LANG_ITEMS                  439 
    554555 
    555556//------------------------------------------------------------------- 
  • trunk/core/raw.c

    r601 r623  
    4141 else return (char*) ((int)hook_raw_image_addr()&~0x10000000); 
    4242} 
     43 
     44//------------------------------------------------------------------- 
     45 
     46unsigned int get_bad_count_and_write_file(char *fn){ 
     47 int count=0; 
     48 unsigned short c[2]; 
     49 FILE*f; 
     50 f=fopen(fn,"w+b"); 
     51 for (c[1]=0; c[1]<CAM_RAW_ROWS; c[1]++) 
     52   for (c[0]=0; c[0]<CAM_RAW_ROWPIX; c[0]++) 
     53    if (get_raw_pixel(c[0],c[1])==0) { fwrite(c, 1, 4, f); count++;} 
     54 fclose(f); 
     55 return count; 
     56} 
     57 
    4358 
    4459//------------------------------------------------------------------- 
     
    90105    if (state_kbd_script_run && shot_histogram_enabled) build_shot_histogram(); 
    91106 
     107    // ! ! ! exclusively for special script which creates badpixel.bin ! ! ! 
     108    if (conf.save_raw==255) conf.save_raw=get_bad_count_and_write_file("A/CHDK/bad_tmp.bin"); 
     109    // 
     110 
    92111    if (develop_raw) { 
    93112     started(); 
     
    142161            sprintf(fn+strlen(fn), RAW_BRACKETING_FILENAME, img_prefixes[conf.raw_prefix], get_target_file_num(), br_counter, img_exts[conf.raw_ext]); 
    143162        else 
    144             sprintf(fn+strlen(fn), RAW_TARGET_FILENAME, img_prefixes[conf.raw_prefix], get_target_file_num(), img_exts[conf.raw_ext]);  
     163            sprintf(fn+strlen(fn), RAW_TARGET_FILENAME, img_prefixes[conf.raw_prefix], get_target_file_num(), 
     164              conf.dng_raw&&conf.raw_dng_ext ? ".DNG" : img_exts[conf.raw_ext]);  
    145165        fd = open(fn, O_WRONLY|O_CREAT, 0777); 
    146166        if (fd>=0) { 
  • trunk/include/camera.h

    r621 r623  
    392392#define CAM_RAW_ROWS                2480   // for new 8 MP 
    393393 
    394 #define CAM_USE_ZOOM_FOR_MF         1      // Zoom lever can be used for manual focus adjustments 
     394#define CAM_USE_ZOOM_FOR_MF         1 
    395395 
    396396// cannot mute during video-zoom through CHDK, it can mute in general firmware settings (non CHDK) 
    397397#undef  CAM_CAN_MUTE_MICROPHONE            // Camera has no function to mute microphone 
    398398 
    399 #define CAM_HAS_IRIS_DIAPHRAGM      1      // it has a 6 blade iris diaphragm 
     399#define CAM_HAS_IRIS_DIAPHRAGM      1 
    400400#undef  CAM_HAS_ND_FILTER 
    401401 
    402 #define CAM_HAS_MANUAL_FOCUS        1      // Camera has manual focus mode 
    403  
    404 #define CAM_AF_SCAN_DURING_VIDEO_RECORD 1   // Camera adapts focus in video recording 
     402#define CAM_HAS_MANUAL_FOCUS        1 
     403 
     404#define CAM_AF_SCAN_DURING_VIDEO_RECORD 1 
    405405//#define CAM_EV_IN_VIDEO             1      // not working on 101b!!! 
    406406#define DNG_SUPPORT                 1 
    407407// pattern 
    408 // It has indeed Green Blue Red Green, so that makes 01 00 02 01 
    409 #define cam_CFAPattern 0x01000201 // Green  Blue  Red  Green 
    410 // color  
    411 #define CAM_COLORMATRIX1                               \ 
    412 0.647380, 1000000, -0.169846, 1000000, -0.115337, 1000000, \ 
    413 -0.011566, 1000000, 0.451223, 1000000, 0.013279, 1000000, \ 
    414 0.062541, 1000000, 0.054140, 1000000, 0.161148, 1000000 
     408#define cam_CFAPattern 0x01000201 // Green  Blue  Red  Green  
     409// color                                                        // Source? 
     410#define CAM_COLORMATRIX1                              \ 
     411 647380, 1000000, -169846, 1000000, -115337, 1000000, \ 
     412 -11566, 1000000,  451223, 1000000,   13279, 1000000, \ 
     413  62541, 1000000,   54140, 1000000,  161148, 1000000 
    415414 
    416415#define cam_CalibrationIlluminant1 1 // Daylight 
  • trunk/include/conf.h

    r603 r623  
    3333    int dng_raw; 
    3434    int raw_timer; 
     35    int raw_dng_ext; 
    3536 
    3637    int show_osd; 
  • trunk/version.inc

    r621 r623  
    1 BUILD_NUMBER := 0.8.8 
     1BUILD_NUMBER := 0.8.9 
Note: See TracChangeset for help on using the changeset viewer.