supplierdeeply

raw code cleanup

  • 0 Replies
  • 622 Views
*

Offline reyalp

  • ******
  • 11441
raw code cleanup
« on: 23 / June / 2013, 22:58:11 »
Advertisements
Some things I ran into while working on the PTP code:

is_raw_enabled
In the remote capture branch I split the is_raw_enabled logic into two functions:
is_raw_exception - whether optional setting disables raw in the current mode (plus the native raw check mentioned below)

is_raw_possible - does the current mode generate a valid raw buffer. This isn't currently very complete, many cameras have high iso / iso3200  etc modes that aren't listed. Some newer cameras also don't have a valid raw in auto or easy mode. I think it might be cleaner to make this a camera lib.c function rather than a having a bunch of camera.h ifdefs for every mode.

The old code checked for shooting_get_resolution()==5, which was canon native raw mode on early cameras with native raw support. Newer cameras apparently don't use this check, so can shoot CHDK raw and canon raw at the same time. It would be nice to make this behavior consistent. It seems to me that for the most part, people wouldn't want to shoot both, the only reason to do so would be for comparison.  If someone wants to switch between CHDK raw and canon raw, it is nice to only have to change one setting. If we want to allow it, it seems like it should be an "exception" that defaults to on (i.e. disable chdk raw when native raw is enabled).

raw postprocess
raw_savefile (which I renamed to raw_process in the remotecap branch) returns a value to signal wither raw_postprocess is needed, but raw_postprocess has never done anything in all the time I've been involved in CHDK. I'd like to remove this and the accompanying logic.

only first raw in series
In the current trunk code, the check for this looks like it would prevent curves from being applied. The reorganization in the remotecap branch should fix this.
Don't forget what the H stands for.

 

Related Topics