S95 Porting Thread

  • 1000 Replies
  • 148458 Views
  • Publish
    Re: S95 Porting Thread
    « Reply #360 on: 28 / December / 2010, 17:36:01 »
    Advertisements
    this streak photography thing sounds amazing!!! want! PLEEEEEESE

    So do I, but this S95 is driving me mad.

    I don't know what folder number Waldo is using but I cannot get it to work.

    At least we know why no raw is being saved.

    I will change back to the old code.

    *

    Offline waldo

    • ***
    • 238
  • Publish
    Re: S95 Porting Thread
    « Reply #361 on: 28 / December / 2010, 17:42:07 »
    this streak photography thing sounds amazing!!! want! PLEEEEEESE

    So do I, but this S95 is driving me mad.

    I don't know what folder number Waldo is using but I cannot get it to work.

    At least we know why no raw is being saved.

    I will change back to the old code.

    As far as I know, the folder number is assigned by CHDK.  I'm not "using" any particular number.

  • Publish
    Re: S95 Porting Thread
    « Reply #362 on: 28 / December / 2010, 17:54:52 »
    Are you saying that the standard CHDK raw-saving code works, the only thing you had to change was the value of PARAM_FILE_COUNTER ?

    get_target_dir_num() returns a 'simple' number even though the S95 does not use the xxxCANON subfolder notation ?

    *

    Offline philmoz

    • *****
    • 2936
      • Photos
  • Publish
    Re: S95 Porting Thread
    « Reply #363 on: 28 / December / 2010, 18:17:20 »
    Are you saying that the standard CHDK raw-saving code works, the only thing you had to change was the value of PARAM_FILE_COUNTER ?

    get_target_dir_num() returns a 'simple' number even though the S95 does not use the xxxCANON subfolder notation ?


    Canon used to name the folders 101CANON, 102CANON, ...
    The 'directory' number was stored in the upper bits of the file counter variable and the image number was stored in the lower bits.
    From memory the directory number incremented every 100 images to avoid storing too many files in one directory.

    CHDK by default stores RAW images in 100CANON so they are kept seperate from the JPEGs.
    If you set the 'Store RAW images with JPEGs' option in the CHDK raw settings then CHDK tries to put the RAW image in the directory based on the directory number from the file counter value.

    This used to work with the old directory naming system; but is now broken.
    The new system uses the current date and a counter that does not appear to be based on the file counter at all to name the directory. The new directory names are NNN_ddmm if you select daily rollover of directories or NNN____mm if you select monthly rollover in the camera settings (dd = day, mm = month). The NNN part just seems to increment every time a new directory is created.The DCIM/CANONMSC directory appears to contain a file that relates to the current image directory name; but I haven't worked this out yet.

    This is why I changed the get_target_dir_num function to always return 100 on the SX30 and G12 - effectively disabling the ability to save the RAW images in the same directory as the JPEGs.

    Hope this makes sense,
    Phil.

    CHDK ports:
      sx30is (1.00c, 1.00h, 1.00l, 1.00n & 1.00p)
      g12 (1.00c, 1.00e, 1.00f & 1.00g)
      sx130is (1.01d & 1.01f)
      ixus310hs (1.00a & 1.01a)
      sx40hs (1.00d, 1.00g & 1.00i)
      g1x (1.00e, 1.00f & 1.00g)


  • Publish
    Re: S95 Porting Thread
    « Reply #364 on: 28 / December / 2010, 18:22:26 »
    Thanks Phil, that is exactly what I thought and therefore cannot understand why my RAW's are not being saved to 101CANON (100CANON is used for something else).

    I will try 'hard coding' the path rather than computing it.


    David

    *

    Offline waldo

    • ***
    • 238
  • Publish
    Re: S95 Porting Thread
    « Reply #365 on: 28 / December / 2010, 18:35:45 »
    Are you saying that the standard CHDK raw-saving code works, the only thing you had to change was the value of PARAM_FILE_COUNTER ?

    That and the location of the raw buffers.  My call to capt_seq_hook_raw_here is just after the call to sub_FF98ACE0_my.  Phil said that there may be situations where it doesn't work, but otherwise it seems OK.
    « Last Edit: 28 / December / 2010, 18:39:38 by waldo »

    *

    Offline waldo

    • ***
    • 238
  • Publish
    Re: S95 Porting Thread
    « Reply #366 on: 28 / December / 2010, 18:38:55 »
    Thanks Phil, that is exactly what I thought and therefore cannot understand why my RAW's are not being saved to 101CANON (100CANON is used for something else).

    I will try 'hard coding' the path rather than computing it.


    David

    Maybe I'm stating the obvious, but if you are not executing the call to capt_seq_hook_raw_here, you will not get the raw file.  Also, you might not create the folder the raw files are in, whatever its name.

  • Publish
    Re: S95 Porting Thread
    « Reply #367 on: 29 / December / 2010, 04:56:20 »
    The color of the Raw files is ok for this port?

    Here are the images the tester sent me :-



    *

    Offline asm1989

    • *****
    • 527
    • SX720, SX260, SX210 & SX200
  • Publish
    Re: S95 Porting Thread
    « Reply #368 on: 29 / December / 2010, 05:19:30 »
    Color looks good in s95, moreless like in sx210,

    To be able to save in the same directory as jpg I had to modify code at raw.c in raw_savefile() , just bellow
    Code: [Select]
    mkdir("A/DCIM");
    Code: [Select]
    #if defined (CAMERA_sx210is)
    if (conf.raw_in_dir) {
    int month;
    struct tm *ttm;
    unsigned long t;
    t = time(NULL);
    ttm = localtime(&t);
    month = ttm->tm_mon + 1;
    sprintf(dir, "A/DCIM/%03d___%02d", get_target_dir_num(), month);
    }
    else
    sprintf(dir, "A/DCIM/%03dRAW", get_target_dir_num());
    « Last Edit: 29 / December / 2010, 05:22:17 by asm1989 »

  • Publish
    Re: S95 Porting Thread
    « Reply #369 on: 29 / December / 2010, 05:31:09 »
    Thanks, that is useful.

    I think the DNG colours need quite a bit of tuning to get them as good as the JPG.

     

    Related Topics