s-series - enable flash during video recording for still images (in trunk now!) - page 2 - General Discussion and Assistance - CHDK Forum supplierdeeply

s-series - enable flash during video recording for still images (in trunk now!)

  • 38 Replies
  • 12295 Views
*

Offline ewavr

  • ****
  • 1057
  • A710IS
Advertisements
I can confirm that propcase #122 is correct value for digic3.
So, we have for digic3
#define PROPCASE_FLASH_OVERRIDE 122
#define PROPCASE_FLASH_FIRED 122
and for digic2
#define PROPCASE_FLASH_OVERRIDE 79
#define PROPCASE_FLASH_FIRED 78 // but 79 also can be used here

I propose rename all of them to PROPCASE_FLASH_FIRE to avoid duplication and use #79 for digic2 and 122 for digic3.

*

Offline PhyrePhoX

  • *****
  • 2254
  • make RAW not WAR
    • PhyreWorX
ha, my bad, didnt see that they were already defined at the bottom. i had commented out the digicII ones ages ago, didnt see there were new ones :)
will change it.

Noticed a serious bug: camera crashes when after recording and using flash, i flip down the flash. I guess storing the current propcase values in temp vars and then after shooting restoring them should solve this.

*

Offline PhyrePhoX

  • *****
  • 2254
  • make RAW not WAR
    • PhyreWorX
apart from this bug, i also need to implement a way to set whitebalance for the pictures taken with flash.
reason: in movie mode i often use a different white balance than the one i use in taking (flash) pictures (using my external flashes).

edit: not only override whitebalance, but ISO as well (because during recording, ISO is set to AUTO, no matter what you have manually set - canon are fools...)
« Last Edit: 02 / December / 2008, 12:29:35 by PhyrePhoX »


*

Offline fudgey

  • *****
  • 1705
  • a570is
apart from this bug, i also need to implement a way to set whitebalance for the pictures taken with flash.
reason: in movie mode i often use a different white balance than the one i use in taking (flash) pictures (using my external flashes).

edit: not only override whitebalance, but ISO as well (because during recording, ISO is set to AUTO, no matter what you have manually set - canon are fools...)

ISO override shouldn't be a problem since we already do that (unless this video mode shooting is somehow special?). For white balance we have a propcase you could start experimenting with.  Wikia propcase list doesn't seem to specify if it's writeable.

*

Offline PhyrePhoX

  • *****
  • 2254
  • make RAW not WAR
    • PhyreWorX
yeah i am already writing something in these lines. i also will check all available propcases for r/w status.

*

Offline PhyrePhoX

  • *****
  • 2254
  • make RAW not WAR
    • PhyreWorX
okay, this is what i found out: normal iso-override works in video, meaning that if i set it to 80, pictures shot during moviemode will be crisp and clear (though they depend on flash, depending on light situation, but thats a user-problem).
now whitebalance is a way more tricky part: i created a new conf.whitebalance which you can set in the chdk gui, and it sets the propcase of whitebalance in my function shooting_set_flash_video_override (like the rest of the stuff).
BUT, when i half-press shutter, video whitebalance gets changed as well, which is not what i want.
so i tried to write a restore function. when shooting_set_flash_video_override is called, it writes the propcases of flash & whitebalance to some static variables and when shooting_restore_settings(); is called it writes these temp vals into the propcases again.
but here is the catch: i dont know where to call that restore function from. is there a place in chdk somewhere that executes stuff AFTER half-press and shoot_full? this would also benefit the crashing of the cam if unpop the flash...
attached is my diff (my code is really ugly and probably inefficient...)
« Last Edit: 04 / December / 2008, 07:59:02 by PhyrePhoX »

*

Offline fudgey

  • *****
  • 1705
  • a570is
but here is the catch: i dont know where to call that restore function from. is there a place in chdk somewhere that executes stuff AFTER half-press and shoot_full? this would also benefit the crashing of the cam if unpop the flash...
attached is my diff (my code is really ugly and probably inefficient...)

How about detecting (full) shutter release in platform/generic/kbd.c my_kbd_read_keys() similar to the current non-operational print button detection?


*

Offline PhyrePhoX

  • *****
  • 2254
  • make RAW not WAR
    • PhyreWorX
alright, i somehow managed to do it now using very ugly code (calling restore in main.c now, just after raw saving).
at least i got rid of the crashes. BUT: my restore function seems to be too fast for the jpg saving routine, meaning that i restore the whitebalance propcase too, so that the camera saves the picture NOT with the flash whitebalance, but with the balance that was set before shooting. so, i need someplace else to call it. ewavr? :D

btw i couldnt post the code here, i was getting a funky error message (not even an error message, because the serverpage with the error couldnt even be fetched...)
« Last Edit: 05 / December / 2008, 10:33:33 by PhyrePhoX »

*

Offline ewavr

  • ****
  • 1057
  • A710IS
Hmm, restoring white balance in raw.c, before jpeg is created, is not too good idea. Maybe restoring it in main.c, near
if (raw_need_postprocess) raw_postprocess() can work better.

P.S. Overriding of white balance in shooting_expo_param_override() crashes SX100 and I don't know why.

 

Related Topics