From the sample c_joerg sent me, I noticed the s110 has
#define CAM_ACTIVE_AREA_Y1 11
#define CAM_ACTIVE_AREA_Y2 3059
This is correct in terms of which pixels have data in them, but camera.h says
#undef CAM_ACTIVE_AREA_X1 // Define usable area of the sensor - needs to be divisible by 4 - calibrate using a CHDK RAW image converted with rawconvert.exe (eg :rawconvert -12to8 -pgm -w=4480 -h=3348 photo.crw photo.pgm)
#undef CAM_ACTIVE_AREA_Y1 // Define usable area of the sensor - needs to be divisible by 2 - "
#undef CAM_ACTIVE_AREA_X2 // Define usable area of the sensor - needs to be divisible by 4 - "
#undef CAM_ACTIVE_AREA_Y2 // Define usable area of the sensor - needs to be divisible by 2 = "
The rawop code assumes the the values are even, and IIRC some of the other code depends on this as well. It is not a requirement of the DNG spec, but it makes our code simpler.
I don't recall where the divisible by 4 requirement comes from, quite a few ports seem to violate it. If anyone can remind me, it would be appreciated.
From a quick look s110 is the only port that uses and odd value.
Unless there are objections, I'll make s110 use 12, 3058
Once this is sorted out I'll add some #error checks to camera.h to make the build fail if the values aren't acceptable. A similar check for jpeg area > active area would be a good idea too.