source: trunk/include/camera.h @ 740

Revision 740, 67.0 KB checked in by reyalp, 4 years ago (diff)

IXUS 980/ SD 990 beta
disable fi2 for sx1, viewport_width for 990 merge

  • Property svn:eol-style set to native
Line 
1#ifndef CAMERA_H
2#define CAMERA_H
3
4//==========================================================
5// Camera-dependent settings
6//==========================================================
7
8//----------------------------------------------------------
9// Default values
10//----------------------------------------------------------
11    #undef  CAM_RAW_ROWPIX                  // Number of pixels in RAW row
12    #undef  CAM_RAW_ROWS                    // Number of rows in RAW
13   
14    #undef  CAM_DRYOS                       // Camera is DryOS-based
15    #undef  CAM_PROPSET                     // Camera's properties group (the generation)
16   
17    #undef  CAM_SWIVEL_SCREEN               // Camera has rotated LCD screen
18    #define CAM_USE_ZOOM_FOR_MF         1   // Zoom lever can be used for manual focus adjustments
19    #undef  CAM_ADJUSTABLE_ALT_BUTTON       // ALT-button can be set from menu
20    #define CAM_REMOTE                  1   // Camera supports USB-remote
21    #define CAM_SYNCH                   1   // Camera supports SDM precision synch
22    #undef  CAM_MULTIPART                   // Camera supports SD-card multipartitioning
23    #define CAM_HAS_ZOOM_LEVER          1   // Camera has dedicated zoom buttons
24    #undef  CAM_DRAW_EXPOSITION             // Output expo-pair on screen (for cameras which (sometimes) don't do that)
25    #define CAM_HAS_ERASE_BUTTON        1   // Camera has dedicated erase button
26    #define CAM_HAS_IRIS_DIAPHRAGM      1   // Camera has real diaphragm mechanism
27    #undef  CAM_HAS_ND_FILTER               // Camera has build-in ND filter
28    #define CAM_CAN_SD_OVER_NOT_IN_MF   1   // Camera allows subject distance (focus) override when not in manual focus mode
29    #define CAM_CAN_SD_OVERRIDE         1   // Camera allows to do subject distance override
30    #define CAM_HAS_MANUAL_FOCUS        1   // Camera has manual focus mode
31    #define CAM_HAS_USER_TV_MODES       1   // Camera has tv-priority or manual modes with ability to set tv value
32    #undef  CAM_SHOW_OSD_IN_SHOOT_MENU      // On some cameras Canon shoot menu has additional functionality and useful in this case to see CHDK OSD in this mode 
33    #define CAM_CAN_UNLOCK_OPTICAL_ZOOM_IN_VIDEO  1 // Camera can unlock optical zoom in video (if it is locked)
34    #undef  CAM_FEATURE_FEATHER             // Cameras with "feather" or touch wheel.
35    #define CAM_HAS_IS                  1   // Camera has image stabilizer
36    #undef  CAM_HAS_JOGDIAL                 // Camera has a "jog dial"
37
38    #undef  CAM_CONSOLE_LOG_ENABLED         // Development: internal camera stdout -> A/stdout.txt
39    #define CAM_CHDK_HAS_EXT_VIDEO_MENU 1   // In CHDK for this camera realized adjustable video compression
40    #undef  CAM_CAN_MUTE_MICROPHONE         // Camera has function to mute microphone
41
42    #define CAM_EMUL_KEYPRESS_DELAY     40  // Delay to interpret <alt>-button press as longpress
43    #define CAM_EMUL_KEYPRESS_DURATION  5   // Length of keypress emulation
44
45    #undef  CAM_AF_SCAN_DURING_VIDEO_RECORD // CHDK can make single AF scan during video record
46    #undef  CAM_HAS_VIDEO_BUTTON            // Camera can take stills in video mode, and vice versa
47    #undef  CAM_EV_IN_VIDEO                 // CHDK can change exposure in video mode
48    #define CAM_VIDEO_CONTROL      1   // pause / unpause video recordings
49
50    #define ZOOM_OVERRIDE               0   // Shall zoom-override be used? default 0 becoz not implemented right now
51    #undef  DNG_SUPPORT                 
52    #undef  CAM_REAR_CURTAIN                // Camera do not have front/rear curtain flash sync in menu
53    #undef  CAM_BRACKETING                // Cameras that have bracketing (focus & ev) in original firmware already, most likely s- & g-series (propcase for digic III not found yet!)
54    #undef  CAM_EXT_TV_RANGE             // CHDK can make exposure time lonher than 64s
55
56    #define CAM_UNCACHED_BIT    0x10000000 // bit indicating the uncached memory
57
58    #define CAM_MAKE                    "Canon"
59    #define CAM_SENSOR_BITS_PER_PIXEL   10  // Bits per pixel. 10 is standard, 12 is supported except for curves
60    #define CAM_WHITE_LEVEL             ((1<<CAM_SENSOR_BITS_PER_PIXEL)-1)
61    #define CAM_BLACK_LEVEL             31
62
63    #define CAM_BITMAP_PALETTE          1 // which color set is used for this camera
64
65//----------------------------------------------------------
66// Overridden values for each camera
67//----------------------------------------------------------
68
69//==========================================================
70// G-series
71//==========================================================
72#if   defined (CAMERA_g7)
73    #define CAM_PROPSET                 1
74
75    #define CAM_RAW_ROWPIX              3736   // for 10 MP
76    #define CAM_RAW_ROWS                2772   // for 10 MP
77   
78    #undef  CAM_USE_ZOOM_FOR_MF
79    #define CAM_ADJUSTABLE_ALT_BUTTON   1
80    #define CAM_MULTIPART               1
81    #define CAM_HAS_ND_FILTER           1
82    #define CAM_AF_SCAN_DURING_VIDEO_RECORD 1
83        #define CAM_HAS_JOGDIAL             1
84    #define DNG_SUPPORT                 1
85    // pattern
86    #define cam_CFAPattern 0x02010100 // Red  Green  Green  Blue
87    // color
88    #define CAM_COLORMATRIX1                              \
89      575419, 1000000,-185557, 1000000, -77898,  1000000, \
90     -213702, 1000000, 733569, 1000000,   81514, 1000000, \
91      -24604, 1000000, 131906, 1000000,  280378, 1000000
92   
93    #define cam_CalibrationIlluminant1 1 // Daylight
94    // cropping
95    #define CAM_JPEG_WIDTH  3648
96    #define CAM_JPEG_HEIGHT 2736
97    #define CAM_ACTIVE_AREA_X1 14
98    #define CAM_ACTIVE_AREA_Y1 8
99    #define CAM_ACTIVE_AREA_X2 3682
100    #define CAM_ACTIVE_AREA_Y2 2764
101    // camera name
102    #define PARAM_CAMERA_NAME 4 // parameter number for GetParameterData
103    #define CAM_BRACKETING              1   
104    #define DNG_EXT_FROM ".DPS"
105 //----------------------------------------------------------
106#elif defined (CAMERA_g9)
107    #define CAM_PROPSET                 2
108    #define CAM_DRYOS                   1
109
110    #define CAM_RAW_ROWPIX              4104   // for 12 MP
111    #define CAM_RAW_ROWS                3048   // for 12 MP
112    #define CAM_HAS_ND_FILTER           1
113    #define CAM_ADJUSTABLE_ALT_BUTTON   1
114    #undef  CAM_EMUL_KEYPRESS_DURATION
115    #define CAM_EMUL_KEYPRESS_DURATION  10
116    #define CAM_AF_SCAN_DURING_VIDEO_RECORD 1
117    #define CAM_HAS_JOGDIAL             1
118//      #define CAM_CONSOLE_LOG_ENABLED     1
119    #define CAM_BRACKETING              1
120    #define CAM_MULTIPART               1
121//==========================================================
122// A-series
123//==========================================================
124#elif defined (CAMERA_a450)
125    #define CAM_PROPSET                 2
126
127    #define CAM_RAW_ROWPIX              2664   // for 5 MP 1/3" sensor size
128    #define CAM_RAW_ROWS                1968   // for 5 MP 1/3" sensor size
129
130    #undef  CAM_USE_ZOOM_FOR_MF
131    #undef  CAM_HAS_ZOOM_LEVER
132    #define CAM_DRAW_EXPOSITION         1
133    #undef  CAM_HAS_ERASE_BUTTON
134    #undef  CAM_HAS_IRIS_DIAPHRAGM
135    #define CAM_HAS_ND_FILTER           1
136    #undef  CAM_HAS_MANUAL_FOCUS
137    #undef  CAM_HAS_USER_TV_MODES
138    #define CAM_SHOW_OSD_IN_SHOOT_MENU  1
139    #undef  CAM_HAS_IS
140    #define CAM_CAN_MUTE_MICROPHONE     1
141    #define CAM_AF_SCAN_DURING_VIDEO_RECORD 1
142    #define CAM_EV_IN_VIDEO             1
143    #define DNG_SUPPORT                 1
144    // pattern
145    #define cam_CFAPattern 0x02010100 // Red  Green  Green  Blue
146    // color
147    #define CAM_COLORMATRIX1                               \
148      652279,  1000000,-199279, 1000000, -101833, 1000000, \
149     -159819,  1000000, 619308, 1000000,   78172, 1000000, \
150      -58827,  1000000, 150963, 1000000,  264216, 1000000
151   
152    #define cam_CalibrationIlluminant1 1 // Daylight
153    // cropping
154    #define CAM_JPEG_WIDTH  2592
155    #define CAM_JPEG_HEIGHT 1944
156    #define CAM_ACTIVE_AREA_X1 6
157    #define CAM_ACTIVE_AREA_Y1 6
158    #define CAM_ACTIVE_AREA_X2 2618
159    #define CAM_ACTIVE_AREA_Y2 1962
160    // camera name
161    #define PARAM_CAMERA_NAME 4 // parameter number for GetParameterData
162
163   
164//----------------------------------------------------------
165#elif defined (CAMERA_a460)
166    #define CAM_PROPSET                 2
167
168    #define CAM_RAW_ROWPIX              2664   // for 5 MP 1/3" sensor size
169    #define CAM_RAW_ROWS                1968   // for 5 MP 1/3" sensor size
170
171    #undef  CAM_USE_ZOOM_FOR_MF
172    #undef  CAM_HAS_ZOOM_LEVER
173    #define CAM_DRAW_EXPOSITION         1
174    #undef  CAM_HAS_ERASE_BUTTON
175    #undef  CAM_HAS_IRIS_DIAPHRAGM
176    #define CAM_HAS_ND_FILTER           1
177    #undef  CAM_HAS_MANUAL_FOCUS
178    #undef  CAM_HAS_USER_TV_MODES
179    #define CAM_SHOW_OSD_IN_SHOOT_MENU  1
180    #undef  CAM_HAS_IS
181    #define CAM_CAN_MUTE_MICROPHONE     1
182    #define CAM_AF_SCAN_DURING_VIDEO_RECORD 1
183    #define CAM_EV_IN_VIDEO             1
184    #define DNG_SUPPORT                 1
185    // pattern
186    #define cam_CFAPattern 0x02010100 // Red  Green  Green  Blue
187    // color
188    #define CAM_COLORMATRIX1                               \
189      649324,  1000000,-233893, 1000000, -88521, 1000000,  \
190     -158955,  1000000, 593407, 1000000,  69775, 1000000,  \
191      -44551,  1000000, 136891, 1000000, 254362, 1000000   
192   
193    #define cam_CalibrationIlluminant1 1 // Daylight
194    // cropping
195    #define CAM_JPEG_WIDTH  2592
196    #define CAM_JPEG_HEIGHT 1944
197    #define CAM_ACTIVE_AREA_X1 6
198    #define CAM_ACTIVE_AREA_Y1 6
199    #define CAM_ACTIVE_AREA_X2 2618
200    #define CAM_ACTIVE_AREA_Y2 1962
201    // camera name
202    #define PARAM_CAMERA_NAME 4 // parameter number for GetParameterData
203    #define DNG_EXT_FROM ".DPS"
204
205//----------------------------------------------------------
206#elif defined (CAMERA_a470)
207        #define CAM_PROPSET                 2
208        #define CAM_DRYOS                   1
209
210    #define CAM_RAW_ROWPIX              3152   // for 7 MP
211    #define CAM_RAW_ROWS                2340   // for 7 MP
212
213        #define DNG_SUPPORT                 1
214        #define CAM_AF_SCAN_DURING_VIDEO_RECORD 1
215    #define CAM_EV_IN_VIDEO             1
216    // pattern
217    #define cam_CFAPattern 0x02010100 // Red  Green  Green  Blue
218    // color
219    #define CAM_COLORMATRIX1                               \
220      649324,  1000000,-233893, 1000000, -88521, 1000000,  \
221     -158955,  1000000, 593407, 1000000,  69775, 1000000,  \
222      -44551,  1000000, 136891, 1000000, 254362, 1000000   
223   
224    #define cam_CalibrationIlluminant1 1 // Daylight
225    // cropping
226    #define CAM_JPEG_WIDTH  2592
227    #define CAM_JPEG_HEIGHT 1944
228    #define CAM_ACTIVE_AREA_X1 6
229    #define CAM_ACTIVE_AREA_Y1 6
230    #define CAM_ACTIVE_AREA_X2 2618
231    #define CAM_ACTIVE_AREA_Y2 1962
232    // camera name
233    #define PARAM_CAMERA_NAME 4 // parameter number for GetParameterData
234    //#define DNG_EXT_FROM ".DPS"       
235       
236//----------------------------------------------------------
237#elif defined (CAMERA_a530)
238    #define CAM_PROPSET                 1
239
240//  2672x1968 image - like most other 5m sensors
241    #define CAM_RAW_ROWPIX              2672   // for 5 MP
242    #define CAM_RAW_ROWS                1968   // for 5 MP
243//  2672x1992 image - eventually probably real sensor size
244//  #define CAM_RAW_ROWPIX              2672   // for 5 MP
245//  #define CAM_RAW_ROWS                1992   // for 5 MP
246
247    #undef  CAM_USE_ZOOM_FOR_MF
248    #define CAM_HAS_ERASE_BUTTON        1
249    #undef  CAM_HAS_IRIS_DIAPHRAGM
250    #define CAM_HAS_ND_FILTER           1
251    #define CAM_HAS_MANUAL_FOCUS        1
252    #define CAM_DRAW_EXPOSITION         1
253    #define CAM_SHOW_OSD_IN_SHOOT_MENU  1
254    #undef  CAM_CAN_SD_OVER_NOT_IN_MF
255    #undef  CAM_HAS_IS
256    #define CAM_CAN_MUTE_MICROPHONE     1
257    #define CAM_AF_SCAN_DURING_VIDEO_RECORD 2
258    #define CAM_EV_IN_VIDEO             1
259    #define DNG_SUPPORT                 1
260    // pattern
261    #define cam_CFAPattern 0x02010100 // Red  Green  Green  Blue
262    // color
263    #define CAM_COLORMATRIX1                               \
264      725264,  1000000,-240542, 1000000, -122310, 1000000, \
265     -210248,  1000000, 656077, 1000000,  52390,  1000000, \
266      -11282,  1000000, 70400,  1000000,  300712, 1000000
267   
268    #define cam_CalibrationIlluminant1 1 // Daylight
269    // cropping
270    #define CAM_JPEG_WIDTH  2592
271    #define CAM_JPEG_HEIGHT 1944
272    #define CAM_ACTIVE_AREA_X1 12
273    #define CAM_ACTIVE_AREA_Y1 20
274    #define CAM_ACTIVE_AREA_X2 2628
275    #define CAM_ACTIVE_AREA_Y2 1968
276    // camera name
277    #define PARAM_CAMERA_NAME 3 // parameter number for GetParameterData
278    #define DNG_EXT_FROM ".DPS"
279
280    #define CAM_EXT_TV_RANGE            1
281
282//----------------------------------------------------------
283#elif defined (CAMERA_a540)
284    #define CAM_PROPSET                 1
285
286    #define CAM_RAW_ROWPIX              2888   // for 6 MP
287    #define CAM_RAW_ROWS                2136   // for 6 MP
288
289    #undef  CAM_USE_ZOOM_FOR_MF
290    #define CAM_HAS_ERASE_BUTTON        1
291    #define CAM_HAS_IRIS_DIAPHRAGM      1
292    #undef  CAM_HAS_ND_FILTER
293    #define CAM_HAS_MANUAL_FOCUS        1
294    #undef  CAM_DRAW_EXPOSITION
295    #define CAM_SHOW_OSD_IN_SHOOT_MENU  1
296    #undef  CAM_HAS_IS
297    #define CAM_CAN_MUTE_MICROPHONE     1
298    #define CAM_AF_SCAN_DURING_VIDEO_RECORD 2
299    #define CAM_EV_IN_VIDEO             1
300    #define DNG_SUPPORT                 1
301    // pattern
302    #define cam_CFAPattern 0x02010100 // Red  Green  Green  Blue
303    // color
304    #define CAM_COLORMATRIX1                               \
305      687147,  1000000,-201964, 1000000, -125024, 1000000, \
306     -148403,  1000000, 566810, 1000000,   45401, 1000000, \
307     -9472,    1000000, 63186,  1000000,  208602, 1000000
308   
309    #define cam_CalibrationIlluminant1 1 // Daylight
310    // cropping
311    #define CAM_JPEG_WIDTH  2816
312    #define CAM_JPEG_HEIGHT 2112
313    #define CAM_ACTIVE_AREA_X1 44
314    #define CAM_ACTIVE_AREA_Y1 8
315    #define CAM_ACTIVE_AREA_X2 2884
316    #define CAM_ACTIVE_AREA_Y2 2136
317    // camera name
318    #define PARAM_CAMERA_NAME 3 // parameter number for GetParameterData
319    #define DNG_EXT_FROM ".DPS"
320
321//----------------------------------------------------------
322#elif defined (CAMERA_a550)
323    #define CAM_PROPSET                 2
324
325    #define CAM_RAW_ROWPIX              3152   // for 7 MP
326    #define CAM_RAW_ROWS                2340   // for 7 MP
327
328    #undef  CAM_USE_ZOOM_FOR_MF
329    #define CAM_MULTIPART               1
330    #undef  CAM_HAS_ERASE_BUTTON
331    #undef  CAM_HAS_IRIS_DIAPHRAGM
332    #define CAM_HAS_ND_FILTER           1
333    #undef  CAM_HAS_MANUAL_FOCUS
334    #undef  CAM_HAS_USER_TV_MODES
335    #define CAM_SHOW_OSD_IN_SHOOT_MENU  1
336    #undef  CAM_HAS_IS
337    #define CAM_CAN_MUTE_MICROPHONE     1
338    #define CAM_AF_SCAN_DURING_VIDEO_RECORD 1
339    #define DNG_SUPPORT                 1
340    // pattern
341    #define cam_CFAPattern 0x02010100 // Red  Green  Green  Blue
342    // color
343    #define CAM_COLORMATRIX1                               \
344      673251,  1000000,-200684, 1000000, -98680, 1000000,  \
345     -163638,  1000000, 651247, 1000000,  74004, 1000000,  \
346      14221,   1000000, 52979,  1000000, 265291, 1000000
347   
348    #define cam_CalibrationIlluminant1 1 // Daylight
349    // cropping
350    #define CAM_JPEG_WIDTH  3072
351    #define CAM_JPEG_HEIGHT 2304
352    #define CAM_ACTIVE_AREA_X1 36
353    #define CAM_ACTIVE_AREA_Y1 12
354    #define CAM_ACTIVE_AREA_X2 3148
355    #define CAM_ACTIVE_AREA_Y2 2340
356    // camera name
357    #define PARAM_CAMERA_NAME 4 // parameter number for GetParameterData
358    #define DNG_EXT_FROM ".DPS"
359
360    #define CAM_EXT_TV_RANGE            1
361   
362//----------------------------------------------------------
363#elif defined (CAMERA_a560)
364    #define CAM_PROPSET                 2
365
366    #define CAM_RAW_ROWPIX              3152   // for 7 MP
367    #define CAM_RAW_ROWS                2340   // for 7 MP
368
369    #undef  CAM_USE_ZOOM_FOR_MF
370    #define CAM_MULTIPART               1
371    #undef  CAM_HAS_ERASE_BUTTON
372    #undef  CAM_HAS_IRIS_DIAPHRAGM
373    #define CAM_HAS_ND_FILTER           1
374    #undef  CAM_HAS_MANUAL_FOCUS
375    #undef  CAM_HAS_USER_TV_MODES
376    #define CAM_SHOW_OSD_IN_SHOOT_MENU  1
377    #undef  CAM_HAS_IS
378    #define CAM_CAN_MUTE_MICROPHONE     1
379    #define CAM_AF_SCAN_DURING_VIDEO_RECORD 1
380    #define DNG_SUPPORT                 1
381    // pattern
382    #define cam_CFAPattern 0x02010100 // Red  Green  Green  Blue
383    // color
384    #define CAM_COLORMATRIX1                               \
385      15265, 1, -6193, 1, -1558, 1,                        \
386     -4125,  1, 12116, 1,  2010, 1,                        \
387     -888,   1, 1639,  1,  5220, 1                         
388   
389    #define cam_CalibrationIlluminant1 17 // Standard light A
390    // cropping
391    #define CAM_JPEG_WIDTH  3072
392    #define CAM_JPEG_HEIGHT 2304
393    #define CAM_ACTIVE_AREA_X1 38
394    #define CAM_ACTIVE_AREA_Y1 14
395    #define CAM_ACTIVE_AREA_X2 3146
396    #define CAM_ACTIVE_AREA_Y2 2338
397    // camera name
398    #define PARAM_CAMERA_NAME 4 // parameter number for GetParameterData
399    #define DNG_EXT_FROM ".DPS"
400   
401//----------------------------------------------------------
402#elif defined (CAMERA_a570)
403    #define CAM_PROPSET                 2
404
405    #define CAM_RAW_ROWPIX              3152   // for 7 MP
406    #define CAM_RAW_ROWS                2340   // for 7 MP
407    #define CAM_MULTIPART               1
408    #define CAM_CAN_MUTE_MICROPHONE     1
409    #define CAM_AF_SCAN_DURING_VIDEO_RECORD 1
410    #define CAM_EV_IN_VIDEO             1
411    #define DNG_SUPPORT                 1
412    #define CAM_REAR_CURTAIN            1
413    // pattern
414    #define cam_CFAPattern 0x02010100 // Red  Green  Green  Blue
415    // color
416    #define CAM_COLORMATRIX1                               \
417      528283,  1000000,-144259, 1000000, -85966, 1000000,  \
418     -202789,  1000000, 736563, 1000000,  73008, 1000000,  \
419     -27130,   1000000, 107702, 1000000, 264543, 1000000
420   
421    #define cam_CalibrationIlluminant1 1 // Daylight
422    // cropping
423    #define CAM_JPEG_WIDTH  3072
424    #define CAM_JPEG_HEIGHT 2304
425    #define CAM_ACTIVE_AREA_X1 38
426    #define CAM_ACTIVE_AREA_Y1 14
427    #define CAM_ACTIVE_AREA_X2 3146
428    #define CAM_ACTIVE_AREA_Y2 2338
429    // camera name
430    #define PARAM_CAMERA_NAME 4 // parameter number for GetParameterData
431
432    #define DNG_EXT_FROM ".DPS"
433
434//----------------------------------------------------------
435#elif defined (CAMERA_a590)
436#define CAM_PROPSET                 2
437#define CAM_DRYOS                   1
438
439#define CAM_RAW_ROWPIX              3336   // for new 8 MP
440#define CAM_RAW_ROWS                2480   // for new 8 MP
441
442#define CAM_USE_ZOOM_FOR_MF         1
443
444// cannot mute during video-zoom through CHDK, it can mute in general firmware settings (non CHDK)
445#undef  CAM_CAN_MUTE_MICROPHONE            // Camera has no function to mute microphone
446
447#define CAM_HAS_IRIS_DIAPHRAGM      1
448#undef  CAM_HAS_ND_FILTER
449
450#define CAM_HAS_MANUAL_FOCUS        1
451
452#define CAM_AF_SCAN_DURING_VIDEO_RECORD 1
453//#define CAM_EV_IN_VIDEO             1      // not working on 101b!!!
454#define DNG_SUPPORT                 1
455// pattern
456#define cam_CFAPattern 0x01000201 // Green  Blue  Red  Green
457// color                                                     
458#define CAM_COLORMATRIX1                              \
459 726857, 1000000, -176454, 1000000, -124118, 1000000, \
460 -71340, 1000000,  592001, 1000000,   75622, 1000000, \
461  63222, 1000000,   50547, 1000000,  219582, 1000000
462
463#define cam_CalibrationIlluminant1 1 // Daylight
464// cropping
465#define CAM_JPEG_WIDTH  3264
466#define CAM_JPEG_HEIGHT 2448
467#define CAM_ACTIVE_AREA_X1 8
468#define CAM_ACTIVE_AREA_Y1 8
469#define CAM_ACTIVE_AREA_X2 3304
470#define CAM_ACTIVE_AREA_Y2 2480
471
472// camera name
473#define PARAM_CAMERA_NAME 4 // parameter number for GetParameterData
474
475
476//----------------------------------------------------------
477#elif defined (CAMERA_a610)
478    #define CAM_PROPSET                 1
479
480    #define CAM_RAW_ROWPIX              2672   // for 5 MP
481    #define CAM_RAW_ROWS                1968   // for 5 MP
482   
483    #define CAM_SWIVEL_SCREEN           1
484    #undef  CAM_CAN_SD_OVER_NOT_IN_MF
485    #undef  CAM_HAS_IS
486    #define CAM_CAN_MUTE_MICROPHONE     1
487    #define CAM_AF_SCAN_DURING_VIDEO_RECORD 2
488    #define CAM_EV_IN_VIDEO             1
489    #define DNG_SUPPORT                 1
490    // pattern
491    #define cam_CFAPattern 0x02010100 // Red  Green  Green  Blue
492    // color
493    #define CAM_COLORMATRIX1                               \
494      15887,  10000, -6524, 10000, -1622, 10000,           \
495     -5467,   10000, 13449, 10000,  2209, 10000,           \
496     -1325,   10000, 1859,  10000,  5172, 10000
497   
498    #define cam_CalibrationIlluminant1 17 // Standard light A
499    // cropping
500    #define CAM_JPEG_WIDTH  2592
501    #define CAM_JPEG_HEIGHT 1944
502    #define CAM_ACTIVE_AREA_X1 14
503    #define CAM_ACTIVE_AREA_Y1 10
504    #define CAM_ACTIVE_AREA_X2 2626
505    #define CAM_ACTIVE_AREA_Y2 1966
506    // camera name
507    #define PARAM_CAMERA_NAME 3 // parameter number for GetParameterData
508
509    #define DNG_EXT_FROM ".DPS"
510
511
512//----------------------------------------------------------
513#elif defined (CAMERA_a620)
514    #define CAM_PROPSET                 1
515
516    #define CAM_RAW_ROWPIX              3152   // for 7 MP
517    #define CAM_RAW_ROWS                2340   // for 7 MP
518   
519    #define CAM_SWIVEL_SCREEN           1
520    #undef  CAM_CAN_SD_OVER_NOT_IN_MF
521    #undef  CAM_HAS_IS   
522    #define CAM_CAN_MUTE_MICROPHONE     1
523    #define CAM_AF_SCAN_DURING_VIDEO_RECORD 2
524    #define CAM_EV_IN_VIDEO             1
525    #define DNG_SUPPORT                 1
526    // pattern
527    #define cam_CFAPattern 0x02010100 // Red  Green  Green  Blue
528    // color
529    #define CAM_COLORMATRIX1                               \
530     15265, 10000, -6193, 10000, -1558, 10000,             \
531     -4125, 10000, 12116, 10000,  2010, 10000,             \
532     -888,  10000,  1639, 10000,  5220, 10000
533   
534    #define cam_CalibrationIlluminant1 17 // Standard light A
535    // cropping
536    #define CAM_JPEG_WIDTH  3072
537    #define CAM_JPEG_HEIGHT 2304
538    #define CAM_ACTIVE_AREA_X1 38
539    #define CAM_ACTIVE_AREA_Y1 14
540    #define CAM_ACTIVE_AREA_X2 3146
541    #define CAM_ACTIVE_AREA_Y2 2338
542    // camera name
543    #define PARAM_CAMERA_NAME 3 // parameter number for GetParameterData
544    #define DNG_EXT_FROM ".DPS"
545
546//----------------------------------------------------------
547#elif defined (CAMERA_a630)
548    #define CAM_PROPSET                 1
549
550    #define CAM_RAW_ROWPIX              3344   // for 8 MP
551    #define CAM_RAW_ROWS                2484   // for 8 MP
552   
553    #define CAM_SWIVEL_SCREEN           1
554    #define CAM_MULTIPART               1
555    #undef  CAM_CAN_SD_OVER_NOT_IN_MF
556    #undef  CAM_HAS_IS
557    #define CAM_CAN_MUTE_MICROPHONE     1
558    #define CAM_AF_SCAN_DURING_VIDEO_RECORD 1
559    #define CAM_EV_IN_VIDEO             1
560    #define DNG_SUPPORT                 1
561    // pattern
562    #define cam_CFAPattern 0x02010100 // Red  Green  Green  Blue
563    // color
564    #define CAM_COLORMATRIX1                               \
565      656080,  1000000,-226478, 1000000, -85884, 1000000,  \
566     -194636,  1000000, 687905, 1000000,  37862, 1000000,  \
567       22873,  1000000,  75523, 1000000, 265822, 1000000
568   
569    #define cam_CalibrationIlluminant1 1 // Daylight
570    // cropping
571    #define CAM_JPEG_WIDTH  3264
572    #define CAM_JPEG_HEIGHT 2448
573    #define CAM_ACTIVE_AREA_X1 14
574    #define CAM_ACTIVE_AREA_Y1 8
575    #define CAM_ACTIVE_AREA_X2 3298
576    #define CAM_ACTIVE_AREA_Y2 2476
577    // camera name
578    #define PARAM_CAMERA_NAME 4 // parameter number for GetParameterData
579    #define DNG_EXT_FROM ".DPS"
580
581//----------------------------------------------------------
582#elif defined (CAMERA_a640)
583    #define CAM_PROPSET                 1
584
585    #define CAM_RAW_ROWPIX              3736   // for 10 MP
586    #define CAM_RAW_ROWS                2772   // for 10 MP
587   
588    #define CAM_SWIVEL_SCREEN           1
589    #define CAM_MULTIPART               1
590    #undef  CAM_CAN_SD_OVER_NOT_IN_MF
591    #undef  CAM_HAS_IS
592    #define CAM_CAN_MUTE_MICROPHONE     1
593    #define CAM_AF_SCAN_DURING_VIDEO_RECORD 1
594    #define CAM_EV_IN_VIDEO             1
595    #define DNG_SUPPORT                 1
596    // pattern
597    #define cam_CFAPattern 0x02010100 // Red  Green  Green  Blue
598    // color
599    #define CAM_COLORMATRIX1                               \
600      13124,  10000, -5329, 10000, -1390, 10000,           \
601      -3602,  10000, 11658, 10000,  1944, 10000,           \
602      -1612,  10000,  2863, 10000,  4885, 10000
603   
604    #define cam_CalibrationIlluminant1 17 // Standard light A
605    // cropping
606    #define CAM_JPEG_WIDTH  3648
607    #define CAM_JPEG_HEIGHT 2736
608    #define CAM_ACTIVE_AREA_X1 14
609    #define CAM_ACTIVE_AREA_Y1 8
610    #define CAM_ACTIVE_AREA_X2 3682
611    #define CAM_ACTIVE_AREA_Y2 2764
612    // camera name
613    #define PARAM_CAMERA_NAME 4 // parameter number for GetParameterData
614    #define DNG_EXT_FROM ".DPS"
615
616//----------------------------------------------------------
617#elif defined (CAMERA_a650)
618    #define CAM_PROPSET                 2
619    #define CAM_DRYOS                   1
620
621    #define CAM_RAW_ROWPIX              4104   // for 12 MP
622    #define CAM_RAW_ROWS                3048   // for 12 MP
623   
624    #define CAM_ADJUSTABLE_ALT_BUTTON   1
625    #define CAM_SWIVEL_SCREEN           1
626    #define CAM_CAN_MUTE_MICROPHONE     1
627
628    #undef  CAM_EMUL_KEYPRESS_DURATION
629    #define CAM_EMUL_KEYPRESS_DURATION  10
630    #define CAM_AF_SCAN_DURING_VIDEO_RECORD 1
631    #define CAM_EV_IN_VIDEO             1
632    #define DNG_SUPPORT                 1
633    // pattern
634    #define cam_CFAPattern 0x02010100 // Red  Green  Green  Blue
635    // color
636    #define CAM_COLORMATRIX1                               \
637      913762, 1000000, -261578, 1000000, -135582, 1000000, \
638     -99049,  1000000, 1067089, 1000000,   61442, 1000000, \
639      48717,  1000000, 96802,   1000000,  412056, 1000000
640   
641    #define cam_CalibrationIlluminant1 1 // Daylight
642    // cropping
643    #define CAM_JPEG_WIDTH  4000
644    #define CAM_JPEG_HEIGHT 3000
645    #define CAM_ACTIVE_AREA_X1 52
646    #define CAM_ACTIVE_AREA_Y1 14
647    #define CAM_ACTIVE_AREA_X2 4076
648    #define CAM_ACTIVE_AREA_Y2 3030
649    // camera name
650    #define PARAM_CAMERA_NAME 4 // parameter number for GetParameterData
651
652    #define DNG_EXT_FROM ".CR2"
653
654//----------------------------------------------------------
655#elif defined (CAMERA_a700)
656    #define CAM_PROPSET                 1
657
658    #define CAM_RAW_ROWPIX              2888   // for 6 MP
659    #define CAM_RAW_ROWS                2136   // for 6 MP
660
661    #undef  CAM_HAS_IS
662    #define CAM_CAN_MUTE_MICROPHONE     1
663    #define CAM_AF_SCAN_DURING_VIDEO_RECORD 2
664    #define CAM_EV_IN_VIDEO             1
665    #define DNG_SUPPORT                 1
666    // pattern
667    #define cam_CFAPattern 0x02010100 // Red  Green  Green  Blue
668    // color
669    #define CAM_COLORMATRIX1                               \
670     14062, 10000, -5199, 10000, -1446, 10000,             \
671     -4712, 10000, 12470, 10000,  2243, 10000,             \
672     -1286, 10000,  2028, 10000,  4836, 10000
673   
674    #define cam_CalibrationIlluminant1 17 // Standard light A
675    // cropping
676    #define CAM_JPEG_WIDTH  2816
677    #define CAM_JPEG_HEIGHT 2112
678    #define CAM_ACTIVE_AREA_X1 44
679    #define CAM_ACTIVE_AREA_Y1 8
680    #define CAM_ACTIVE_AREA_X2 2884
681    #define CAM_ACTIVE_AREA_Y2 2136
682    // camera name
683    #define PARAM_CAMERA_NAME 3 // parameter number for GetParameterData
684    #define DNG_EXT_FROM ".DPS"
685
686//----------------------------------------------------------
687#elif defined (CAMERA_a710)
688    #define CAM_PROPSET                 1
689
690    #define CAM_RAW_ROWPIX              3152   // for 7 MP
691    #define CAM_RAW_ROWS                2340   // for 7 MP
692
693    #define CAM_MULTIPART               1
694    #define CAM_CAN_MUTE_MICROPHONE     1
695    #define CAM_AF_SCAN_DURING_VIDEO_RECORD 1
696    #define CAM_EV_IN_VIDEO             1
697    #define DNG_SUPPORT                 1
698    // pattern
699    #define cam_CFAPattern 0x02010100 // Red  Green  Green  Blue
700    // color
701    #define CAM_COLORMATRIX1                   \
702     13349, 10000, -4141, 10000, -2128, 10000, \
703     -4189, 10000, 13178, 10000,  1044, 10000, \
704     -1037, 10000,  2326, 10000,  4720, 10000   
705   
706    #define cam_CalibrationIlluminant1 1 // Daylight
707    // cropping
708    #define CAM_JPEG_WIDTH  3072
709    #define CAM_JPEG_HEIGHT 2304
710    #define CAM_ACTIVE_AREA_X1 38
711    #define CAM_ACTIVE_AREA_Y1 14
712    #define CAM_ACTIVE_AREA_X2 3146
713    #define CAM_ACTIVE_AREA_Y2 2338
714    // camera name
715    #define PARAM_CAMERA_NAME 4 // parameter number for GetParameterData
716
717    #define DNG_EXT_FROM ".DPS"
718
719    #define CAM_EXT_TV_RANGE            1
720
721//----------------------------------------------------------
722#elif defined (CAMERA_a720)
723    #define CAM_PROPSET                 2
724    #define CAM_DRYOS                   1
725
726    #define CAM_RAW_ROWPIX              3336   // for new 8 MP
727    #define CAM_RAW_ROWS                2480   // for new 8 MP
728    #define CAM_CAN_MUTE_MICROPHONE     1
729    #define CAM_AF_SCAN_DURING_VIDEO_RECORD 1
730    #define CAM_EV_IN_VIDEO             1
731    #undef  CAM_VIDEO_CONTROL
732    #define DNG_SUPPORT                 1
733    // pattern
734    #define cam_CFAPattern 0x01000201 // Green  Blue  Red  Green
735    // color
736    #define CAM_COLORMATRIX1                               \
737      640019, 1000000, -220031, 1000000, -96241, 1000000,  \
738     -77419,  1000000, 639766,  1000000,  44009, 1000000,  \
739      17965,  1000000, 78396,   1000000, 231868, 1000000
740   
741    #define cam_CalibrationIlluminant1 1 // Daylight
742    // cropping
743    #define CAM_JPEG_WIDTH  3264
744    #define CAM_JPEG_HEIGHT 2448
745    #define CAM_ACTIVE_AREA_X1 10
746    #define CAM_ACTIVE_AREA_Y1 8
747    #define CAM_ACTIVE_AREA_X2 3302
748    #define CAM_ACTIVE_AREA_Y2 2474
749    // camera name
750    #define PARAM_CAMERA_NAME 4 // parameter number for GetParameterData
751
752    #define DNG_EXT_FROM ".CR2"
753
754//==========================================================
755// SD-Series (IXUS-Series)
756//==========================================================
757#elif defined (CAMERA_ixus40_sd300)
758    #define CAM_PROPSET                 1
759
760    #define CAM_RAW_ROWPIX              2400
761    #define CAM_RAW_ROWS                1766
762
763    #define CAM_USE_ZOOM_FOR_MF 1
764    #undef  CAM_HAS_ERASE_BUTTON
765    #undef  CAM_HAS_IRIS_DIAPHRAGM
766    #define CAM_HAS_ND_FILTER           1
767    #undef  CAM_HAS_MANUAL_FOCUS
768    #undef  CAM_HAS_USER_TV_MODES
769    #define CAM_SHOW_OSD_IN_SHOOT_MENU  1
770    #undef  CAM_CAN_UNLOCK_OPTICAL_ZOOM_IN_VIDEO
771    #undef  CAM_HAS_IS
772    #undef CAM_CONSOLE_LOG_ENABLED
773
774
775    #define DNG_SUPPORT                 1
776    // pattern
777    #define cam_CFAPattern 0x02010100 // Red  Green  Green  Blue
778    // color
779    #define CAM_COLORMATRIX1                                 \
780      652674,  1000000, -172074, 1000000, -107575,  1000000, \
781      -139063, 1000000, 594517,  1000000,  60252,   1000000, \
782      -9088,   1000000, 82013,   1000000,  238080,  1000000
783   
784    #define cam_CalibrationIlluminant1 1 // Daylight
785    // cropping
786    #define CAM_JPEG_WIDTH  2272
787    #define CAM_JPEG_HEIGHT 1704
788    #define CAM_ACTIVE_AREA_X1 12
789    #define CAM_ACTIVE_AREA_Y1 12
790    #define CAM_ACTIVE_AREA_X2 2356
791    #define CAM_ACTIVE_AREA_Y2 1764
792    // camera name
793    #define PARAM_CAMERA_NAME 2 // parameter number for GetParameterData
794
795//----------------------------------------------------------
796
797#elif defined (CAMERA_ixus50_sd400)
798    #define CAM_PROPSET                 1
799
800    #define CAM_RAW_ROWPIX              2672   // for 5 MP
801    #define CAM_RAW_ROWS                1968   // for 5 MP
802
803    #undef  CAM_SYNCH 
804    #undef  CAM_USE_ZOOM_FOR_MF
805    #undef  CAM_HAS_ERASE_BUTTON
806    #undef  CAM_HAS_IRIS_DIAPHRAGM
807    #define CAM_HAS_ND_FILTER           1
808    #undef  CAM_HAS_MANUAL_FOCUS
809    #undef  CAM_HAS_USER_TV_MODES
810    #define CAM_SHOW_OSD_IN_SHOOT_MENU  1
811    #undef  CAM_HAS_IS
812        //#define CAM_CONSOLE_LOG_ENABLED     1
813    #undef  CAM_VIDEO_CONTROL
814    #define DNG_SUPPORT                 1
815    // pattern
816    #define cam_CFAPattern 0x02010100 // Red  Green  Green  Blue
817    // color
818    #define CAM_COLORMATRIX1                                  \
819      685247,  1000000, -204939,  1000000, -106531,  1000000, \
820     -267616,  1000000,  790509,  1000000,   73359,  1000000, \
821       32401,  1000000,   15655,  1000000,  314892,  1000000
822   
823    #define cam_CalibrationIlluminant1 1 // Daylight
824    // cropping
825    #define CAM_JPEG_WIDTH  2592
826    #define CAM_JPEG_HEIGHT 1944
827    #define CAM_ACTIVE_AREA_X1 12
828    #define CAM_ACTIVE_AREA_Y1 8
829    #define CAM_ACTIVE_AREA_X2 2628
830    #define CAM_ACTIVE_AREA_Y2 1968
831    // camera name
832    #define PARAM_CAMERA_NAME 2 // parameter number for GetParameterData
833
834
835//----------------------------------------------------------
836
837#elif defined (CAMERA_ixusizoom_sd30)
838    #define CAM_PROPSET                 1
839
840    #define CAM_RAW_ROWPIX              2672   // for 5 MP
841    #define CAM_RAW_ROWS                1968   // for 5 MP
842
843    #undef  CAM_SYNCH 
844    #undef  CAM_USE_ZOOM_FOR_MF
845    #undef  CAM_HAS_ERASE_BUTTON
846    #undef  CAM_HAS_IRIS_DIAPHRAGM
847    #define CAM_HAS_ND_FILTER           1
848    #undef  CAM_HAS_MANUAL_FOCUS
849    #undef  CAM_HAS_USER_TV_MODES
850    #define CAM_SHOW_OSD_IN_SHOOT_MENU  1
851    #undef  CAM_HAS_IS
852        //#define CAM_CONSOLE_LOG_ENABLED     1
853    #undef  CAM_VIDEO_CONTROL
854
855//----------------------------------------------------------
856
857//----------------------------------------------------------
858#elif defined (CAMERA_ixus55_sd450)
859    #define CAM_PROPSET                 1
860
861    #define CAM_RAW_ROWPIX              2672   // for 5 MP
862    #define CAM_RAW_ROWS                1968   // for 5 MP
863
864    #undef  CAM_USE_ZOOM_FOR_MF
865    #undef  CAM_HAS_ERASE_BUTTON
866    #undef  CAM_HAS_IRIS_DIAPHRAGM
867    #define CAM_HAS_ND_FILTER           1
868    #undef  CAM_HAS_MANUAL_FOCUS
869    #undef  CAM_HAS_USER_TV_MODES
870    #define CAM_SHOW_OSD_IN_SHOOT_MENU  1
871    #undef  CAM_HAS_IS
872    #define CAM_AF_SCAN_DURING_VIDEO_RECORD 2
873    #define DNG_SUPPORT                 1
874    // pattern
875    #define cam_CFAPattern 0x02010100 // Red  Green  Green  Blue
876    // color
877    #define CAM_COLORMATRIX1                                \
878      536034,  1000000, -173429, 1000000, -89823,  1000000, \
879      -290416, 1000000, 735807,  1000000,  47894,  1000000, \
880      -71455,  1000000, 114314,  1000000,  274533, 1000000         
881   
882    #define cam_CalibrationIlluminant1 1 // Daylight
883    // cropping
884    #define CAM_JPEG_WIDTH  2592
885    #define CAM_JPEG_HEIGHT 1944
886    #define CAM_ACTIVE_AREA_X1 12
887    #define CAM_ACTIVE_AREA_Y1 8
888    #define CAM_ACTIVE_AREA_X2 2628
889    #define CAM_ACTIVE_AREA_Y2 1968
890    // camera name
891    #define PARAM_CAMERA_NAME 3 // parameter number for GetParameterData
892    #define DNG_EXT_FROM ".DPS"
893
894//----------------------------------------------------------
895#elif defined (CAMERA_ixus60_sd600)
896    #define CAM_PROPSET                 1
897
898    #define CAM_RAW_ROWPIX              2888   // for 6 MP
899    #define CAM_RAW_ROWS                2136   // for 6 MP
900
901    #undef  CAM_SYNCH
902    #undef  CAM_USE_ZOOM_FOR_MF
903    #undef  CAM_HAS_ERASE_BUTTON
904    #undef  CAM_HAS_IRIS_DIAPHRAGM
905    #define CAM_HAS_ND_FILTER           1
906    #undef  CAM_HAS_MANUAL_FOCUS
907    #undef  CAM_HAS_USER_TV_MODES
908    #define CAM_DRAW_EXPOSITION             1
909    #define CAM_SHOW_OSD_IN_SHOOT_MENU  1
910    #define CAM_FEATURE_FEATHER         1
911
912//    #define CAM_CONSOLE_LOG_ENABLED     1  //100a won't compile if this is defined ("undefined reference to `_iosDevFind'")
913    #undef  CAM_CHDK_HAS_EXT_VIDEO_MENU
914    #undef  CAM_HAS_IS
915    #define DNG_SUPPORT                 1
916    // pattern
917    #define cam_CFAPattern 0x02010100 // Red  Green  Green  Blue
918    // color
919    #define CAM_COLORMATRIX1                                \
920      767398,  1000000, -227658, 1000000, -144213, 1000000, \
921      -217466, 1000000, 669319,  1000000,  38180,  1000000, \
922      -23152,  1000000, 77743,  1000000,   238669, 1000000
923   
924    #define cam_CalibrationIlluminant1 1 // Daylight
925    // cropping
926    #define CAM_JPEG_WIDTH  2816
927    #define CAM_JPEG_HEIGHT 2112
928    #define CAM_ACTIVE_AREA_X1 44
929    #define CAM_ACTIVE_AREA_Y1 8
930    #define CAM_ACTIVE_AREA_X2 2884
931    #define CAM_ACTIVE_AREA_Y2 2136
932    // camera name
933    #define PARAM_CAMERA_NAME 3 // parameter number for GetParameterData
934
935//----------------------------------------------------------
936#elif defined (CAMERA_ixus65_sd630)
937    #define CAM_PROPSET                 1
938
939    #define CAM_RAW_ROWPIX              2888   // for 6 MP
940    #define CAM_RAW_ROWS                2136   // for 6 MP
941
942    #undef  CAM_USE_ZOOM_FOR_MF
943    #undef  CAM_HAS_ERASE_BUTTON
944    #undef  CAM_HAS_IRIS_DIAPHRAGM
945    #define CAM_HAS_ND_FILTER           1
946    #undef  CAM_HAS_MANUAL_FOCUS
947    #undef  CAM_HAS_USER_TV_MODES
948    #define CAM_DRAW_EXPOSITION             1
949    #define CAM_SHOW_OSD_IN_SHOOT_MENU  1
950    #undef  CAM_CAN_UNLOCK_OPTICAL_ZOOM_IN_VIDEO
951    #define CAM_FEATURE_FEATHER         1
952
953    #define CAM_CONSOLE_LOG_ENABLED     1
954    #undef  CAM_HAS_IS
955    #undef  CAM_CHDK_HAS_EXT_VIDEO_MENU
956    #define DNG_SUPPORT                 1
957    // pattern
958    #define cam_CFAPattern 0x02010100 // Red  Green  Green  Blue
959    // color
960    #define CAM_COLORMATRIX1                                \
961      783384,  1000000, -227078, 1000000, -127919, 1000000, \
962      -181247, 1000000, 661743,  1000000,  58868,  1000000, \
963       25727,  1000000, 43891,   1000000,  247655, 1000000         
964   
965    #define cam_CalibrationIlluminant1 1 // Daylight
966    // cropping
967    #define CAM_JPEG_WIDTH  2816
968    #define CAM_JPEG_HEIGHT 2112
969    #define CAM_ACTIVE_AREA_X1 44
970    #define CAM_ACTIVE_AREA_Y1 8
971    #define CAM_ACTIVE_AREA_X2 2884
972    #define CAM_ACTIVE_AREA_Y2 2136
973    // camera name
974    #define PARAM_CAMERA_NAME 3 // parameter number for GetParameterData
975    #define DNG_EXT_FROM ".DPS"
976
977//----------------------------------------------------------
978
979#elif defined (CAMERA_ixus75_sd750)
980    #define CAM_PROPSET                 2
981
982    #define CAM_RAW_ROWPIX              3152   // for 7 MP
983    #define CAM_RAW_ROWS                2340   // for 7 MP
984
985/*
986    #undef  CAM_USE_ZOOM_FOR_MF
987    #undef  CAM_HAS_ERASE_BUTTON
988    #undef  CAM_HAS_IRIS_DIAPHRAGM
989    #define CAM_HAS_ND_FILTER           1
990    #undef  CAM_HAS_MANUAL_FOCUS
991    #undef  CAM_HAS_USER_TV_MODES
992    #define CAM_SHOW_OSD_IN_SHOOT_MENU  1
993    #undef  CAM_HAS_IS
994    */
995   
996    #undef  CAM_SWIVEL_SCREEN               // Camera has rotated LCD screen
997    #undef CAM_USE_ZOOM_FOR_MF            // Zoom lever can be used for manual focus adjustments
998    #undef  CAM_ADJUSTABLE_ALT_BUTTON       // ALT-button can be set from menu
999    #undef CAM_REMOTE                     // Camera supports USB-remote
1000    #define CAM_MULTIPART               1   // Camera supports SD-card multipartitioning
1001    #define CAM_HAS_ZOOM_LEVER          1   // Camera has dedicated zoom buttons
1002    #undef  CAM_DRAW_EXPOSITION             // Output expo-pair on screen (for cameras which (sometimes) don't do that)
1003    #undef CAM_HAS_ERASE_BUTTON           // Camera has dedicated erase button
1004    #undef  CAM_HAS_IRIS_DIAPHRAGM
1005    #define  CAM_HAS_ND_FILTER         1      // Camera has build-in ND filter
1006    #undef CAM_CAN_SD_OVER_NOT_IN_MF      // Camera allows subject distance (focus) override when not in manual focus mode
1007    #undef CAM_CAN_SD_OVERRIDE            // Camera allows to do subject distance override
1008    #undef CAM_HAS_MANUAL_FOCUS           // Camera has manual focus mode
1009    #define CAM_HAS_USER_TV_MODES       1   // Camera has tv-priority or manual modes with ability to set tv value
1010    #define  CAM_SHOW_OSD_IN_SHOOT_MENU   1   // On some cameras Canon shoot menu has additional functionality and useful in this case to see CHDK OSD in this mode 
1011//    #undef  CAM_CAN_UNLOCK_OPTICAL_ZOOM_IN_VIDEO // adress for zoom_status missing, probably more
1012    #define CAM_CAN_UNLOCK_OPTICAL_ZOOM_IN_VIDEO  1 // Camera can unlock optical zoom in video (if it is locked)
1013    #define  CAM_FEATURE_FEATHER        1     // Cameras with "feather" or touch wheel.
1014    #undef CAM_HAS_IS                     // Camera has image stabilizer
1015
1016//    #define  CAM_CONSOLE_LOG_ENABLED   1      // Development: internal camera stdout -> A/stdout.txt       
1017    #define DNG_SUPPORT                 1
1018    // pattern
1019    #define cam_CFAPattern 0x02010100 // Red  Green  Green  Blue
1020    // color
1021    #define CAM_COLORMATRIX1                                \
1022      689833,  1000000, -198299, 1000000, -101299, 1000000, \
1023      -164267, 1000000, 667466,  1000000,  74132,  1000000, \
1024       -36515,  1000000, 123872,   1000000,  248498, 1000000
1025   
1026    #define cam_CalibrationIlluminant1 1 // Daylight
1027    // cropping
1028    #define CAM_JPEG_WIDTH  3072
1029    #define CAM_JPEG_HEIGHT 2304
1030    #define CAM_ACTIVE_AREA_X1 38
1031    #define CAM_ACTIVE_AREA_Y1 14
1032    #define CAM_ACTIVE_AREA_X2 3146
1033    #define CAM_ACTIVE_AREA_Y2 2338
1034    // camera name
1035    #define PARAM_CAMERA_NAME 4 // parameter number for GetParameterData
1036   
1037    #define DNG_EXT_FROM ".DPS"
1038
1039//----------------------------------------------------------
1040#elif defined (CAMERA_ixus70_sd1000)
1041    #define CAM_PROPSET                 2
1042
1043    #define CAM_RAW_ROWPIX              3152   // for 7 MP
1044    #define CAM_RAW_ROWS                2340   // for 7 MP
1045
1046    #undef  CAM_USE_ZOOM_FOR_MF
1047    #undef  CAM_HAS_ERASE_BUTTON
1048    #undef  CAM_HAS_IRIS_DIAPHRAGM
1049    #define CAM_HAS_ND_FILTER           1
1050    #undef  CAM_HAS_MANUAL_FOCUS
1051    #undef  CAM_HAS_USER_TV_MODES
1052    #define CAM_SHOW_OSD_IN_SHOOT_MENU  1
1053    #undef  CAM_HAS_IS
1054    #define CAM_AF_SCAN_DURING_VIDEO_RECORD 1
1055    #define DNG_SUPPORT                 1
1056    #define CAM_MULTIPART               1
1057    // pattern
1058    #define cam_CFAPattern 0x02010100 // Red  Green  Green  Blue
1059    // color
1060    #define CAM_COLORMATRIX1                                \
1061      652674,  1000000, -172074, 1000000, -107575, 1000000, \
1062      -139063, 1000000, 594517,  1000000,  60252,  1000000, \
1063       -9088,  1000000, 82013,   1000000,  238048, 1000000
1064   
1065    #define cam_CalibrationIlluminant1 1 // Daylight
1066    // cropping
1067    #define CAM_JPEG_WIDTH  3072
1068    #define CAM_JPEG_HEIGHT 2304
1069    #define CAM_ACTIVE_AREA_X1 38
1070    #define CAM_ACTIVE_AREA_Y1 14
1071    #define CAM_ACTIVE_AREA_X2 3146
1072    #define CAM_ACTIVE_AREA_Y2 2338
1073    // camera name
1074    #define PARAM_CAMERA_NAME 4 // parameter number for GetParameterData
1075
1076    #define DNG_EXT_FROM ".DPS"
1077
1078
1079//----------------------------------------------------------
1080#elif defined (CAMERA_ixus80_sd1100)
1081    #define CAM_PROPSET                 2
1082    #define CAM_DRYOS                   1
1083
1084    #define CAM_RAW_ROWPIX              3336   // for new 8 MP
1085    #define CAM_RAW_ROWS                2480   // for new 8 MP
1086
1087    #undef  CAM_USE_ZOOM_FOR_MF
1088    #undef  CAM_HAS_ERASE_BUTTON
1089    #undef  CAM_HAS_IRIS_DIAPHRAGM
1090    #define CAM_HAS_ND_FILTER           1
1091    #undef  CAM_HAS_MANUAL_FOCUS
1092    #undef  CAM_HAS_USER_TV_MODES
1093    #define CAM_SHOW_OSD_IN_SHOOT_MENU  1
1094        // TODO / test
1095        #undef  CAM_REMOTE
1096        #define CAM_CAN_UNLOCK_OPTICAL_ZOOM_IN_VIDEO 1
1097    #undef  CAM_CAN_MUTE_MICROPHONE
1098    #define CAM_AF_SCAN_DURING_VIDEO_RECORD 0
1099    #define DNG_SUPPORT                 1
1100    // pattern
1101    #define cam_CFAPattern 0x01000201 // Green  Blue  Red  Green
1102    // color
1103    #define CAM_COLORMATRIX1                                \
1104      893969,  1000000, -343107, 1000000, -119590, 1000000, \
1105      -41350,  1000000, 581255,  1000000,  49523,  1000000, \
1106       24221,  1000000, 47554,   1000000,  209996, 1000000
1107   
1108    #define cam_CalibrationIlluminant1 1 // Daylight
1109    // cropping
1110    #define CAM_JPEG_WIDTH  3264
1111    #define CAM_JPEG_HEIGHT 2448
1112    #define CAM_ACTIVE_AREA_X1 6
1113    #define CAM_ACTIVE_AREA_Y1 6
1114    #define CAM_ACTIVE_AREA_X2 3304
1115    #define CAM_ACTIVE_AREA_Y2 2476
1116    // camera name
1117    #define PARAM_CAMERA_NAME 4 // parameter number for GetParameterData
1118
1119    #define CAM_EXT_TV_RANGE            1
1120
1121//----------------------------------------------------------
1122#elif defined (CAMERA_ixus700_sd500)
1123    #define CAM_PROPSET                 1
1124
1125    #define CAM_RAW_ROWPIX              3152   // for 7 MP
1126    #define CAM_RAW_ROWS                2340   // for 7 MP
1127
1128    #undef  CAM_SYNCH
1129    #undef  CAM_USE_ZOOM_FOR_MF
1130    #define CAM_DRAW_EXPOSITION         1
1131    #undef  CAM_HAS_ERASE_BUTTON
1132    #undef  CAM_HAS_IRIS_DIAPHRAGM
1133    #define CAM_HAS_ND_FILTER           1
1134    #undef  CAM_HAS_MANUAL_FOCUS
1135    #undef  CAM_HAS_USER_TV_MODES
1136    #undef  CAM_CAN_SD_OVERRIDE
1137    #define CAM_SHOW_OSD_IN_SHOOT_MENU  1
1138    #undef  CAM_HAS_IS
1139    #define CAM_MULTIPART               1
1140    #define CAM_AF_SCAN_DURING_VIDEO_RECORD 1
1141    #define DNG_SUPPORT                 1
1142    // pattern
1143    #define cam_CFAPattern 0x02010100 // Red  Green  Green  Blue
1144    // color
1145    #define CAM_COLORMATRIX1         \
1146      15265, 1, -6193,  1, -1558, 1, \
1147     -4125,  1,  12116, 1,  2010, 1, \
1148      -888,  1,  1639,  1,  5220, 1
1149   
1150    #define cam_CalibrationIlluminant1 17 // Standard light A
1151    // cropping
1152    #define CAM_JPEG_WIDTH  3072
1153    #define CAM_JPEG_HEIGHT 2304
1154    #define CAM_ACTIVE_AREA_X1 38
1155    #define CAM_ACTIVE_AREA_Y1 14
1156    #define CAM_ACTIVE_AREA_X2 3146
1157    #define CAM_ACTIVE_AREA_Y2 2338
1158    // camera name
1159    #define PARAM_CAMERA_NAME 2 // parameter number for GetParameterData
1160    #define DNG_EXT_FROM ".DPS"
1161
1162//----------------------------------------------------------
1163
1164#elif defined (CAMERA_ixus750_sd550)
1165    #define CAM_PROPSET                1
1166
1167    #define CAM_RAW_ROWPIX              3152  // for 7 MP
1168    #define CAM_RAW_ROWS                2340  // for 7 MP
1169
1170    #define  CAM_USE_ZOOM_FOR_MF    1
1171    #define CAM_DRAW_EXPOSITION        1
1172    #undef  CAM_HAS_ERASE_BUTTON
1173    #undef  CAM_HAS_IRIS_DIAPHRAGM
1174    #define CAM_HAS_ND_FILTER          1
1175    #undef  CAM_HAS_MANUAL_FOCUS
1176    #undef  CAM_HAS_USER_TV_MODES
1177    #define  CAM_CAN_SD_OVERRIDE    1
1178    #define CAM_SHOW_OSD_IN_SHOOT_MENU  1
1179    #undef  CAM_HAS_IS
1180    #define CAM_MULTIPART              1
1181    #undef CAM_SYNCH
1182    #define DNG_SUPPORT                 1
1183    // pattern
1184    #define cam_CFAPattern 0x02010100 // Red  Green  Green  Blue
1185    // color
1186    #define CAM_COLORMATRIX1                               \
1187      580280, 1000000, -172239, 1000000, -89707,  1000000, \
1188     -206596, 1000000,  634926, 1000000,  63877,  1000000, \
1189      10377,  1000000,  62053,  1000000,  242646, 1000000
1190   
1191    #define cam_CalibrationIlluminant1 1 // Daylight
1192    // cropping
1193    #define CAM_JPEG_WIDTH  3072
1194    #define CAM_JPEG_HEIGHT 2304
1195    #define CAM_ACTIVE_AREA_X1 36
1196    #define CAM_ACTIVE_AREA_Y1 12
1197    #define CAM_ACTIVE_AREA_X2 3148
1198    #define CAM_ACTIVE_AREA_Y2 2340
1199    // camera name
1200    #define PARAM_CAMERA_NAME 3 // parameter number for GetParameterData
1201
1202//----------------------------------------------------------
1203#elif defined (CAMERA_ixus800_sd700)
1204    #define CAM_PROPSET                 1
1205
1206    #define CAM_RAW_ROWPIX              2888   // for 6 MP
1207    #define CAM_RAW_ROWS                2136   // for 6 MP
1208
1209    #undef  CAM_USE_ZOOM_FOR_MF
1210    #define CAM_DRAW_EXPOSITION         1
1211    #undef  CAM_HAS_ERASE_BUTTON
1212    #undef  CAM_HAS_IRIS_DIAPHRAGM
1213    #define CAM_HAS_ND_FILTER           1
1214    #undef  CAM_HAS_MANUAL_FOCUS
1215    #undef  CAM_HAS_USER_TV_MODES
1216    #define CAM_SHOW_OSD_IN_SHOOT_MENU  1
1217    #define CAM_AF_SCAN_DURING_VIDEO_RECORD 2
1218    #define DNG_SUPPORT                 1
1219
1220 // Warning! DNG4PS2 has both ixus800 and sd700 support with different CFA patterns and color matrices.
1221 // Used settings for IXUS800
1222
1223    // pattern
1224    #define cam_CFAPattern 0x02010100 // Red  Green  Green  Blue
1225    // color
1226    #define CAM_COLORMATRIX1          \
1227      14062, 1, -5199,  1, -1446,  1, \
1228      -4712, 1,  12470, 1,  2243,  1, \
1229      -1286, 1,  2028,  1,  4836,  1
1230   
1231    #define cam_CalibrationIlluminant1 17 // Standard light A
1232    // cropping
1233    #define CAM_JPEG_WIDTH  2816
1234    #define CAM_JPEG_HEIGHT 2112
1235    #define CAM_ACTIVE_AREA_X1 44
1236    #define CAM_ACTIVE_AREA_Y1 8
1237    #define CAM_ACTIVE_AREA_X2 2884
1238    #define CAM_ACTIVE_AREA_Y2 2136
1239    // camera name
1240    #define PARAM_CAMERA_NAME 3 // parameter number for GetParameterData
1241    #define DNG_EXT_FROM ".DPS"
1242   
1243//----------------------------------------------------------
1244#elif defined (CAMERA_ixus850_sd800)
1245    #define CAM_PROPSET                 1
1246
1247    #define CAM_RAW_ROWPIX              3152   // for 7 MP
1248    #define CAM_RAW_ROWS                2340   // for 7 MP
1249
1250    #undef  CAM_USE_ZOOM_FOR_MF
1251    #undef  CAM_HAS_ERASE_BUTTON
1252    #undef  CAM_HAS_IRIS_DIAPHRAGM
1253    #define CAM_HAS_ND_FILTER           1
1254    #undef  CAM_HAS_MANUAL_FOCUS
1255    #undef  CAM_HAS_USER_TV_MODES
1256    #define CAM_SHOW_OSD_IN_SHOOT_MENU  1
1257    #define CAM_AF_SCAN_DURING_VIDEO_RECORD 1
1258    #define CAM_MULTIPART               1
1259    #define DNG_SUPPORT                 1
1260    // pattern
1261    #define cam_CFAPattern 0x02010100 // Red  Green  Green  Blue
1262    // color
1263    #define CAM_COLORMATRIX1                               \
1264      661014, 1000000, -189364, 1000000, -115797, 1000000, \
1265     -168772, 1000000,  661827, 1000000,   47392, 1000000, \
1266      -35846, 1000000,  107148, 1000000,  233705, 1000000
1267   
1268    #define cam_CalibrationIlluminant1 17 // Standard light A
1269    // cropping
1270    #define CAM_JPEG_WIDTH  3072
1271    #define CAM_JPEG_HEIGHT 2304
1272    #define CAM_ACTIVE_AREA_X1 12
1273    #define CAM_ACTIVE_AREA_Y1 8
1274    #define CAM_ACTIVE_AREA_X2 3108
1275    #define CAM_ACTIVE_AREA_Y2 2332
1276    // camera name
1277    #define PARAM_CAMERA_NAME 4 // parameter number for GetParameterData
1278
1279    #define DNG_EXT_FROM ".DPS"
1280   
1281//----------------------------------------------------------
1282#elif defined (CAMERA_ixus860_sd870)
1283    #define CAM_PROPSET                 2
1284    #define CAM_DRYOS                   1
1285
1286    #define CAM_RAW_ROWPIX              3336   // for new 8 MP
1287    #define CAM_RAW_ROWS                2480   // for new 8 MP
1288
1289    #undef  CAM_USE_ZOOM_FOR_MF
1290    #undef  CAM_HAS_ERASE_BUTTON
1291    #undef  CAM_HAS_IRIS_DIAPHRAGM
1292    #define CAM_HAS_ND_FILTER           1
1293    #undef  CAM_HAS_MANUAL_FOCUS
1294    #undef  CAM_HAS_USER_TV_MODES
1295    #define CAM_SHOW_OSD_IN_SHOOT_MENU  1
1296        #define CAM_CAN_UNLOCK_OPTICAL_ZOOM_IN_VIDEO 1
1297    #undef  CAM_CAN_MUTE_MICROPHONE
1298    #undef  CAM_VIDEO_CONTROL
1299    #define DNG_SUPPORT                 1
1300    // pattern
1301    #define cam_CFAPattern 0x01000201 // Green  Blue  Red  Green
1302    // color
1303    #define CAM_COLORMATRIX1                               \
1304      747939, 1000000, -268233, 1000000, -129266, 1000000, \
1305     -50633,  1000000, 515687,  1000000,  23509,  1000000, \
1306     -21341,  1000000, 76495,   1000000, 186385,  1000000
1307   
1308    #define cam_CalibrationIlluminant1 1 // Daylight                   
1309    // cropping
1310    #define CAM_JPEG_WIDTH  3264
1311    #define CAM_JPEG_HEIGHT 2448
1312    #define CAM_ACTIVE_AREA_X1 10
1313    #define CAM_ACTIVE_AREA_Y1 8
1314    #define CAM_ACTIVE_AREA_X2 3302
1315    #define CAM_ACTIVE_AREA_Y2 2474
1316    // camera name
1317    #define PARAM_CAMERA_NAME 4 // parameter number for GetParameterData
1318
1319    #define DNG_EXT_FROM ".CR2"
1320
1321//----------------------------------------------------------
1322#elif defined (CAMERA_ixus950_sd850)
1323
1324    #define CAM_EXT_TV_RANGE            1
1325    #define CAM_PROPSET                 2
1326
1327    #define CAM_RAW_ROWPIX              3336   // for new 8 MP
1328    #define CAM_RAW_ROWS                2480   // for new 8 MP
1329
1330    #undef  CAM_USE_ZOOM_FOR_MF
1331    #undef  CAM_HAS_ERASE_BUTTON
1332    #undef  CAM_HAS_IRIS_DIAPHRAGM
1333    #define CAM_HAS_ND_FILTER           1
1334    #undef  CAM_HAS_MANUAL_FOCUS
1335    #undef  CAM_HAS_USER_TV_MODES
1336    #define CAM_SHOW_OSD_IN_SHOOT_MENU  1
1337    #define CAM_MULTIPART               1
1338    #define CAM_AF_SCAN_DURING_VIDEO_RECORD 1
1339    #define DNG_SUPPORT                 1
1340    // pattern
1341    #define cam_CFAPattern 0x01000201 // Green  Blue  Red  Green
1342    // color
1343    #define CAM_COLORMATRIX1        \
1344      14573, 1, -5482, 1, -1546, 1, \
1345     -1266,  1, 9799,  1, 1468,  1, \
1346     -1040,  1, 1912,  1, 3810,  1
1347   
1348    #define cam_CalibrationIlluminant1 1 // Daylight                   
1349    // cropping
1350    #define CAM_JPEG_WIDTH  3264
1351    #define CAM_JPEG_HEIGHT 2448
1352    #define CAM_ACTIVE_AREA_X1 10
1353    #define CAM_ACTIVE_AREA_Y1 8
1354    #define CAM_ACTIVE_AREA_X2 3302
1355    #define CAM_ACTIVE_AREA_Y2 2474
1356    // camera name
1357    #define PARAM_CAMERA_NAME 4 // parameter number for GetParameterData
1358    #define DNG_EXT_FROM ".DPS"
1359   
1360//----------------------------------------------------------
1361#elif defined (CAMERA_ixus960_sd950)
1362    #define CAM_PROPSET                 2
1363    #define CAM_DRYOS                   1
1364
1365    #define CAM_RAW_ROWPIX              4104   
1366    #define CAM_RAW_ROWS                3048   
1367
1368    #undef  CAM_USE_ZOOM_FOR_MF
1369    #undef  CAM_HAS_ERASE_BUTTON
1370    #undef  CAM_HAS_IRIS_DIAPHRAGM
1371    #define CAM_HAS_ND_FILTER           1
1372    #undef  CAM_HAS_MANUAL_FOCUS
1373    #undef  CAM_HAS_USER_TV_MODES
1374    #define CAM_SHOW_OSD_IN_SHOOT_MENU  1
1375    #define DNG_SUPPORT                 1
1376    // pattern
1377    #define cam_CFAPattern 0x02010100 // Red  Green  Green  Blue
1378    // color
1379    #define CAM_COLORMATRIX1                               \
1380      913762, 1000000, -261578, 1000000, -135582, 1000000, \
1381      -99049, 1000000, 1067089, 1000000,  61442,  1000000, \
1382      48717,  1000000, 96802,   1000000,  412056, 1000000
1383   
1384    #define cam_CalibrationIlluminant1 1 // Daylight
1385    // cropping
1386    #define CAM_JPEG_WIDTH  4000
1387    #define CAM_JPEG_HEIGHT 3000
1388    #define CAM_ACTIVE_AREA_X1 48
1389    #define CAM_ACTIVE_AREA_Y1 12
1390    #define CAM_ACTIVE_AREA_X2 4080
1391    #define CAM_ACTIVE_AREA_Y2 3036
1392    // camera name
1393    #define PARAM_CAMERA_NAME 4 // parameter number for GetParameterData
1394
1395    #define DNG_EXT_FROM ".CR2"
1396
1397//----------------------------------------------------------
1398 #elif defined (CAMERA_ixus970_sd890)
1399    #define CAM_PROPSET                 2
1400    #define CAM_DRYOS                   1
1401
1402    #define CAM_RAW_ROWPIX              3720
1403    #define CAM_RAW_ROWS                2772
1404
1405    #undef CAM_USE_ZOOM_FOR_MF
1406    #undef CAM_HAS_ERASE_BUTTON
1407    #undef CAM_HAS_IRIS_DIAPHRAGM
1408    #define CAM_HAS_ND_FILTER           1
1409    #undef CAM_HAS_MANUAL_FOCUS
1410    #define CAM_MULTIPART               1
1411    #define CAM_HAS_JOGDIAL             1
1412    #define CAM_CAN_UNLOCK_OPTICAL_ZOOM_IN_VIDEO 1
1413    #define CAM_SHOW_OSD_IN_SHOOT_MENU  1
1414    #define DNG_SUPPORT                 1
1415    #define CAM_EXT_TV_RANGE            1
1416
1417    // pattern
1418    #define cam_CFAPattern 0x02010100 // Red  Green  Green  Blue
1419
1420    // color
1421    #define CAM_COLORMATRIX1                               \
1422      827547, 1000000, -290458, 1000000, -126086, 1000000, \
1423     -12829,  1000000, 530507,  1000000, 50537,   1000000, \
1424      5181,   1000000, 48183,   1000000, 245014,  1000000
1425    #define cam_CalibrationIlluminant1 1 // Daylight
1426
1427    // cropping
1428    #define CAM_JPEG_WIDTH  3648
1429    #define CAM_JPEG_HEIGHT 2736
1430    #define CAM_ACTIVE_AREA_X1 6
1431    #define CAM_ACTIVE_AREA_Y1 12
1432    #define CAM_ACTIVE_AREA_X2 3690
1433    #define CAM_ACTIVE_AREA_Y2 2772
1434
1435    // camera name
1436    #define PARAM_CAMERA_NAME 4 // parameter number for GetParameterData
1437
1438    // 12 bit support
1439    #undef  CAM_SENSOR_BITS_PER_PIXEL
1440    #undef  CAM_WHITE_LEVEL
1441    #undef  CAM_BLACK_LEVEL
1442    #define CAM_SENSOR_BITS_PER_PIXEL   12
1443    #define CAM_WHITE_LEVEL             ((1<<CAM_SENSOR_BITS_PER_PIXEL)-1)
1444    #define CAM_BLACK_LEVEL             127
1445
1446#elif defined (CAMERA_ixus980_sd990)
1447    #define CAM_PROPSET                 2 // all values checked so far match propset 2
1448    #define CAM_DRYOS                   1
1449
1450    #define CAM_RAW_ROWPIX              4480 // 14.7 MP 12bpp
1451    #define CAM_RAW_ROWS                3348   
1452
1453    #undef  CAM_USE_ZOOM_FOR_MF
1454    #undef  CAM_HAS_ERASE_BUTTON
1455    #define CAM_MULTIPART               1
1456    #undef  CAM_HAS_IRIS_DIAPHRAGM
1457    #define CAM_HAS_ND_FILTER           1
1458    #define  CAM_HAS_MANUAL_FOCUS               1
1459    #define  CAM_HAS_USER_TV_MODES              1 //include M/P ? needed to make Tv bracketing work
1460    #define CAM_SHOW_OSD_IN_SHOOT_MENU  1
1461    #undef CAM_CHDK_HAS_EXT_VIDEO_MENU
1462    #undef CAM_UNCACHED_BIT  // shut up compiler
1463    #define CAM_UNCACHED_BIT    0x40000000
1464    #undef CAM_BITMAP_PALETTE
1465    #define CAM_BITMAP_PALETTE    2
1466
1467        #undef CAM_BLACK_LEVEL
1468    #define CAM_BLACK_LEVEL             127
1469//    #define CAM_HAS_JOGDIAL             1
1470//    #define CAM_AF_SCAN_DURING_VIDEO_RECORD 1
1471    #define CAM_CAN_UNLOCK_OPTICAL_ZOOM_IN_VIDEO 1
1472//    #define CAM_REMOTE 1
1473//   #define CAM_SYNCH  1
1474        #undef CAM_SENSOR_BITS_PER_PIXEL
1475    #define CAM_SENSOR_BITS_PER_PIXEL   12
1476        #undef CAM_WHITE_LEVEL
1477    #define CAM_WHITE_LEVEL             ((1<<CAM_SENSOR_BITS_PER_PIXEL)-1)
1478
1479    #define DNG_SUPPORT                 1
1480    // pattern
1481//    #define cam_CFAPattern 0x02010100 // Red  Green  Green  Blue
1482    #define cam_CFAPattern 0x01000201 // Green  Blue  Red  Green
1483    // color TODO
1484    #define CAM_COLORMATRIX1                               \
1485      837237, 1000000, -290137, 1000000, -128156, 1000000, \
1486      -127762, 1000000, 643909, 1000000,  52973,  1000000, \
1487      4446,  1000000, 88354,   1000000,  224246, 1000000
1488   
1489    #define cam_CalibrationIlluminant1 1 // Daylight
1490    // cropping
1491        // TODO, capture the full frame for now
1492    #define CAM_JPEG_WIDTH  4416
1493    #define CAM_JPEG_HEIGHT 3312
1494    #define CAM_ACTIVE_AREA_X1 12
1495    #define CAM_ACTIVE_AREA_Y1 12
1496    #define CAM_ACTIVE_AREA_X2 4444
1497    #define CAM_ACTIVE_AREA_Y2 3324
1498    // camera name
1499    #define PARAM_CAMERA_NAME 4 // parameter number for GetParameterData sd990: OK
1500
1501//    #define DNG_EXT_FROM ".CR2"
1502
1503//==========================================================
1504// S-Series
1505//==========================================================
1506#elif defined (CAMERA_s2is)
1507    #define CAM_PROPSET                 1
1508
1509    #define CAM_RAW_ROWPIX              2672   // for 5 MP
1510    #define CAM_RAW_ROWS                1968   // for 5 MP
1511   
1512    #undef  CAM_SYNCH   
1513    #define CAM_SWIVEL_SCREEN           1
1514    #define CAM_ADJUSTABLE_ALT_BUTTON   1
1515    #undef  CAM_CAN_UNLOCK_OPTICAL_ZOOM_IN_VIDEO
1516    #define  CAM_HAS_VIDEO_BUTTON       1
1517    #undef  CAM_VIDEO_CONTROL
1518    #define DNG_SUPPORT                 1
1519    // pattern
1520    #define cam_CFAPattern 0x02010100 // Red  Green  Green  Blue
1521    // color
1522    #define CAM_COLORMATRIX1                                \
1523      547708,  1000000, -143462, 1000000,  -99243, 1000000, \
1524     -186838,  1000000, 663925,  1000000,   50970, 1000000, \
1525     -5810,    1000000, 79162,   1000000,  266988, 1000000
1526   
1527    #define cam_CalibrationIlluminant1 1 // Daylight
1528    // cropping
1529    #define CAM_JPEG_WIDTH  2592
1530    #define CAM_JPEG_HEIGHT 1944
1531    #define CAM_ACTIVE_AREA_X1 14
1532    #define CAM_ACTIVE_AREA_Y1 10
1533    #define CAM_ACTIVE_AREA_X2 2626
1534    #define CAM_ACTIVE_AREA_Y2 1966
1535    // camera name
1536    #define PARAM_CAMERA_NAME 2 // parameter number for GetParameterData
1537    #define CAM_BRACKETING              1
1538    #define DNG_EXT_FROM ".DPS"
1539
1540//----------------------------------------------------------
1541#elif defined (CAMERA_s3is)
1542    #define CAM_PROPSET                 1
1543
1544    #define CAM_RAW_ROWPIX              2888   // for 6 MP
1545    #define CAM_RAW_ROWS                2136   // for 6 MP
1546   
1547    #undef  CAM_SYNCH 
1548    #define CAM_SWIVEL_SCREEN           1
1549    #define CAM_ADJUSTABLE_ALT_BUTTON   1
1550    #define CAM_MULTIPART               1
1551    #undef  CAM_CAN_SD_OVER_NOT_IN_MF
1552    #undef  CAM_CAN_UNLOCK_OPTICAL_ZOOM_IN_VIDEO
1553    #define  CAM_HAS_VIDEO_BUTTON       1
1554    #define DNG_SUPPORT                 1
1555    // pattern
1556    #define cam_CFAPattern 0x02010100 // Red  Green  Green  Blue
1557    // color
1558    #define CAM_COLORMATRIX1                               \
1559     14062, 10000, -5199, 10000, -1446, 10000,             \
1560     -4712, 10000, 12470, 10000,  2243, 10000,             \
1561     -1286, 10000,  2028, 10000,  4836, 10000
1562   
1563    #define cam_CalibrationIlluminant1 17 // Standard light A
1564    // cropping
1565    #define CAM_JPEG_WIDTH  2816
1566    #define CAM_JPEG_HEIGHT 2112
1567    #define CAM_ACTIVE_AREA_X1 44
1568    #define CAM_ACTIVE_AREA_Y1 8
1569    #define CAM_ACTIVE_AREA_X2 2884
1570    #define CAM_ACTIVE_AREA_Y2 2136
1571    // camera name
1572    #define PARAM_CAMERA_NAME 3 // parameter number for GetParameterData
1573    #define CAM_BRACKETING              1
1574    #define DNG_EXT_FROM ".DPS"
1575
1576    #define CAM_EXT_TV_RANGE            1
1577
1578//----------------------------------------------------------
1579#elif defined (CAMERA_s5is)
1580    #define CAM_PROPSET                 2
1581    #define CAM_DRYOS                   1
1582
1583    #define CAM_RAW_ROWPIX              3336   // for new 8 MP
1584    #define CAM_RAW_ROWS                2480   // for new 8 MP
1585   
1586    #define CAM_SWIVEL_SCREEN           1
1587    #define CAM_ADJUSTABLE_ALT_BUTTON   1
1588    #undef  CAM_CAN_SD_OVER_NOT_IN_MF
1589    #undef  CAM_CAN_UNLOCK_OPTICAL_ZOOM_IN_VIDEO
1590    #define CAM_HAS_VIDEO_BUTTON       1
1591    #define DNG_SUPPORT                 1
1592    // pattern
1593    #define cam_CFAPattern 0x01000201 // Green  Blue  Red  Green
1594    // color
1595    #define CAM_COLORMATRIX1                               \
1596      650591, 1000000, -199585, 1000000, -123118, 1000000, \
1597     -69617,  1000000, 583926,  1000000,  34354,  1000000, \
1598     -19113,  1000000, 82163,   1000000, 210786,  1000000
1599   
1600    #define cam_CalibrationIlluminant1 1 // Daylight
1601    // cropping
1602    #define CAM_JPEG_WIDTH  3264
1603    #define CAM_JPEG_HEIGHT 2448
1604    #define CAM_ACTIVE_AREA_X1 10
1605    #define CAM_ACTIVE_AREA_Y1 8
1606    #define CAM_ACTIVE_AREA_X2 3302
1607    #define CAM_ACTIVE_AREA_Y2 2474
1608    // camera name
1609    #define PARAM_CAMERA_NAME 4 // parameter number for GetParameterData
1610    #define CAM_BRACKETING              1
1611    #define DNG_EXT_FROM ".DPS"
1612
1613//==========================================================
1614// TX-Series
1615//==========================================================
1616#elif defined (CAMERA_tx1)
1617    #define CAM_PROPSET                 2
1618   
1619    #define CAM_RAW_ROWPIX              3152   // for 7 MP
1620    #define CAM_RAW_ROWS                2340   // for 7 MP
1621
1622    #define CAM_SWIVEL_SCREEN           1
1623    #define CAM_HAS_ND_FILTER           1
1624    #undef  CAM_HAS_ERASE_BUTTON
1625    #undef  CAM_HAS_MANUAL_FOCUS
1626    #undef  CAM_CAN_UNLOCK_OPTICAL_ZOOM_IN_VIDEO
1627    #define CAM_MULTIPART               1
1628    #define CAM_AF_SCAN_DURING_VIDEO_RECORD 1
1629    #define  CAM_HAS_VIDEO_BUTTON       1
1630    #define DNG_SUPPORT                 1
1631    // pattern
1632    #define cam_CFAPattern 0x02010100 // Red  Green  Green  Blue
1633    // color
1634    #define CAM_COLORMATRIX1                                \
1635      510370,  1000000, -68998,  1000000, -86859,  1000000, \
1636      -279980, 1000000, 766686,  1000000,  67944,  1000000, \
1637      -14382,  1000000, 113688,  1000000, 239853,  1000000
1638   
1639    #define cam_CalibrationIlluminant1 1 // Daylight
1640    // cropping
1641    #define CAM_JPEG_WIDTH  3072
1642    #define CAM_JPEG_HEIGHT 2304
1643    #define CAM_ACTIVE_AREA_X1 12
1644    #define CAM_ACTIVE_AREA_Y1 8
1645    #define CAM_ACTIVE_AREA_X2 3108
1646    #define CAM_ACTIVE_AREA_Y2 2332
1647    // camera name
1648    #define PARAM_CAMERA_NAME 4 // parameter number for GetParameterData
1649    #define DNG_EXT_FROM ".DPS"
1650
1651//==========================================================
1652// SX-Series
1653//==========================================================
1654#elif defined (CAMERA_sx100is)
1655    #define CAM_PROPSET                 2
1656    #define CAM_DRYOS                   1
1657
1658    #define CAM_RAW_ROWPIX              3336   // for new 8 MP
1659    #define CAM_RAW_ROWS                2480   // for new 8 MP
1660    #undef CAM_SYNCH
1661    #define CAM_CAN_MUTE_MICROPHONE     1
1662    #define CAM_AF_SCAN_DURING_VIDEO_RECORD 1
1663    #define CAM_ADJUSTABLE_ALT_BUTTON   1
1664    #define CAM_SHOW_OSD_IN_SHOOT_MENU  1
1665    #undef  CAM_VIDEO_CONTROL
1666    #define DNG_SUPPORT                 1
1667    #define CAM_REAR_CURTAIN            1
1668    #define CAM_HAS_JOGDIAL             1
1669    // pattern
1670    #define cam_CFAPattern 0x01000201 // Green  Blue  Red  Green
1671    // color
1672    #define CAM_COLORMATRIX1                               \
1673      656793, 1000000, -168702, 1000000, -108030, 1000000, \
1674      -2711,  1000000, 661538,  1000000,  37919,  1000000, \
1675      77255,  1000000, 48834,   1000000, 241797,  1000000
1676   
1677    #define cam_CalibrationIlluminant1 1 // Daylight
1678    // cropping
1679    #define CAM_JPEG_WIDTH  3264
1680    #define CAM_JPEG_HEIGHT 2448
1681    #define CAM_ACTIVE_AREA_X1 10
1682    #define CAM_ACTIVE_AREA_Y1 8
1683    #define CAM_ACTIVE_AREA_X2 3302
1684    #define CAM_ACTIVE_AREA_Y2 2474
1685    // camera name
1686    #define PARAM_CAMERA_NAME 4 // parameter number for GetParameterData
1687
1688    #define DNG_EXT_FROM ".CR2"
1689    #define CAM_MULTIPART               1
1690
1691
1692//----------------------------------------------------------
1693
1694#elif defined (CAMERA_sx10)
1695    #define CAM_PROPSET                 2
1696    #define CAM_DRYOS                   1
1697
1698    #define CAM_RAW_ROWPIX              3720   
1699    #define CAM_RAW_ROWS                2772   
1700   
1701    #define CAM_SWIVEL_SCREEN           1
1702    #define CAM_ADJUSTABLE_ALT_BUTTON   1
1703    #undef  CAM_CAN_SD_OVER_NOT_IN_MF
1704    #undef  CAM_CAN_UNLOCK_OPTICAL_ZOOM_IN_VIDEO
1705    #define CAM_HAS_VIDEO_BUTTON       1
1706    #define VIDEO_QUALITY_ONLY          1 
1707    #define CAM_BRACKETING              1
1708    #undef  CAM_VIDEO_CONTROL
1709    #define CAM_MULTIPART               1
1710    #define CAM_HAS_JOGDIAL             1
1711    #undef  CAM_USE_ZOOM_FOR_MF
1712    #undef  CAM_UNCACHED_BIT  // shut up compiler
1713    #define CAM_UNCACHED_BIT    0x40000000
1714
1715
1716    #define DNG_SUPPORT                 1
1717    // pattern
1718    #define cam_CFAPattern 0x02010100 // Red  Green  Green  Blue
1719    // color
1720
1721    #define CAM_COLORMATRIX1                               \
1722      827547, 1000000, -290458, 1000000, -126086, 1000000, \
1723     -12829,  1000000, 530507,  1000000, 50537,   1000000, \
1724      5181,   1000000, 48183,   1000000, 245014,  1000000
1725
1726    #define cam_CalibrationIlluminant1 1 // Daylight
1727    // cropping
1728    #define CAM_JPEG_WIDTH  3648
1729    #define CAM_JPEG_HEIGHT 2736
1730    #define CAM_ACTIVE_AREA_X1 6
1731    #define CAM_ACTIVE_AREA_Y1 12
1732    #define CAM_ACTIVE_AREA_X2 3690
1733    #define CAM_ACTIVE_AREA_Y2 2772
1734    // camera name
1735    #define PARAM_CAMERA_NAME 4 // parameter number for GetParameterData
1736    #undef  CAM_SENSOR_BITS_PER_PIXEL
1737    #undef  CAM_WHITE_LEVEL
1738    #undef  CAM_BLACK_LEVEL
1739    #define CAM_SENSOR_BITS_PER_PIXEL   12
1740    #define CAM_WHITE_LEVEL             ((1<<CAM_SENSOR_BITS_PER_PIXEL)-1)
1741    #define CAM_BLACK_LEVEL             127
1742
1743    #define CAM_EXT_TV_RANGE            1
1744
1745#elif defined (CAMERA_sx1)
1746    #define CAM_PROPSET                 2
1747    #define CAM_DRYOS                   1
1748
1749    #define CAM_RAW_ROWPIX              4152
1750    #define CAM_RAW_ROWS                2772 
1751   
1752    #define CAM_SWIVEL_SCREEN           1
1753    #define CAM_ADJUSTABLE_ALT_BUTTON   1
1754    #undef  CAM_CAN_SD_OVER_NOT_IN_MF
1755    #undef  CAM_CAN_UNLOCK_OPTICAL_ZOOM_IN_VIDEO
1756    #define CAM_HAS_VIDEO_BUTTON       1
1757    #define VIDEO_QUALITY_ONLY          1 
1758    #define CAM_BRACKETING              1
1759    #undef  CAM_VIDEO_CONTROL
1760    #define CAM_MULTIPART               1
1761    #define CAM_HAS_JOGDIAL             1
1762    #undef  CAM_USE_ZOOM_FOR_MF
1763    #undef  CAM_UNCACHED_BIT  // shut up compiler
1764    #define CAM_UNCACHED_BIT    0x40000000
1765
1766
1767    #define DNG_SUPPORT                 1
1768    // pattern
1769    #define cam_CFAPattern 0x02010100 // Red  Green  Green  Blue
1770    // color
1771
1772    #define CAM_COLORMATRIX1                               \
1773      827547, 1000000, -290458, 1000000, -126086, 1000000, \
1774     -12829,  1000000, 530507,  1000000, 50537,   1000000, \
1775      5181,   1000000, 48183,   1000000, 245014,  1000000
1776
1777    #define cam_CalibrationIlluminant1 1 // Daylight
1778    // cropping
1779    #define CAM_JPEG_WIDTH  3648
1780    #define CAM_JPEG_HEIGHT 2736
1781    #define CAM_ACTIVE_AREA_X1 344
1782    #define CAM_ACTIVE_AREA_Y1 24
1783    #define CAM_ACTIVE_AREA_X2 3991
1784    #define CAM_ACTIVE_AREA_Y2 2759 
1785    // camera name
1786    #define PARAM_CAMERA_NAME 4 // parameter number for GetParameterData
1787    #undef  CAM_SENSOR_BITS_PER_PIXEL
1788    #undef  CAM_WHITE_LEVEL
1789    #undef  CAM_BLACK_LEVEL
1790    #define CAM_SENSOR_BITS_PER_PIXEL   12
1791    #define CAM_WHITE_LEVEL             ((1<<CAM_SENSOR_BITS_PER_PIXEL)-1)
1792    #define CAM_BLACK_LEVEL             127
1793 
1794     #define CAM_EXT_TV_RANGE            1
1795//----------------------------------------------------------
1796
1797#else
1798    #error camera type not defined
1799
1800#endif
1801
1802// curves only work in 10bpp for now
1803#if CAM_SENSOR_BITS_PER_PIXEL != 10
1804#undef OPT_CURVES
1805#endif
1806
1807#endif /* CAMERA_H */
Note: See TracBrowser for help on using the repository browser.