source: trunk/platform/ixus300_sd4000/platform_camera.h @ 1779

Revision 1779, 7.0 KB checked in by philmoz, 15 months ago (diff)

Merged revision(s) 1778 from branches/release-1_0:

  • Property svn:eol-style set to native
Line 
1// Camera - IXUS300_SD4000 - platform_camera.h
2
3// This file contains the various settings values specific to the IXUS300_SD4000 camera.
4// This file is referenced via the 'include/camera.h' file and should not be loaded directly.
5
6// If adding a new settings value put a suitable default in 'include/camera.h',
7// along with documentation on what the setting does and how to determine the correct value.
8// If the setting should not have a default value then add it in 'include/camera.h'
9// using the '#undef' directive along with appropriate documentation.
10
11// Override any default values with your camera specific values in this file. Try and avoid
12// having override values that are the same as the default value.
13
14// When overriding a setting value there are two cases:
15// 1. If removing the value, because it does not apply to your camera, use the '#undef' directive.
16// 2. If changing the value it is best to use an '#undef' directive to remove the default value
17//    followed by a '#define' to set the new value.
18
19// When porting CHDK to a new camera, check the documentation in 'include/camera.h'
20// for information on each setting. If the default values are correct for your camera then
21// don't override them again in here.
22
23    #define CAM_PROPSET                     3       // ToDo
24    #define CAM_DRYOS                       1
25    #define CAM_DRYOS_2_3_R39               1       // ROM:FFB5E1C0, actually its DRYOS version 2.3, release #0043
26
27    #define CAM_HAS_CMOS                    1
28
29    #undef  CAM_BITMAP_PALETTE                      // shut up compiler
30    //#define CAM_BITMAP_PALETTE              8       // canon palette does not contain all colors anymore like on vxworks and palette is different in playback/record modus
31    #define CAM_BITMAP_PALETTE              11      // ToDo
32
33    #undef  CAM_UNCACHED_BIT                        // shut up compiler
34    #define CAM_UNCACHED_BIT                0x40000000   // ROM:FF88A248 via ExMem.FreeCacheable()
35
36    #undef  CAM_HAS_ERASE_BUTTON
37    #undef  CAM_SYNCH
38    #define CAM_HAS_ND_FILTER               1       // ToDo: does camera have ND ?
39
40    //#undef  CAM_HAS_MANUAL_FOCUS                  // ToDo: test if its working
41    //#undef  CAM_CAN_SD_OVERRIDE                   // ToDo: looks like always cause ASSERT Error "FocusLensController.c Line 714" on CaptSeqTask
42    //#undef  CAM_USE_ZOOM_FOR_MF                   // ToDo: test if its working
43
44    //#define CAM_AF_SCAN_DURING_VIDEO_RECORD 1
45    #undef  CAM_CAN_UNLOCK_OPTICAL_ZOOM_IN_VIDEO    // canon firmware allow optical zoom while recording movie
46    //#define CAM_EV_IN_VIDEO                 1
47
48    #define CAM_VIDEO_QUALITY_ONLY          1        // ToDo: Video Bitrate override cause crash
49    #define CAM_HAS_JOGDIAL                 1
50    #define CAM_FEATURE_FEATHER             1
51    //#define CAM_SHOW_OSD_IN_SHOOT_MENU      1         // not required anymore, workaround to force CHDK to display OSD in record mode while canon_shoot_menu_active was wrong
52    #define CAM_MULTIPART                   1        // ToDo: test if its working
53    #define CAM_DATE_FOLDER_NAMING          1
54    //#define CAM_DRAW_EXPOSITION             1      // not required because Canon Firmware does always show it on Shutter half press
55    //#define CAM_ADJUSTABLE_ALT_BUTTON       1      // ToDo
56
57    #define PARAM_CAMERA_NAME               4        // parameter number for GetParameterData to get camera name
58
59    #undef  DNG_BADPIXEL_VALUE_LIMIT
60    #define DNG_BADPIXEL_VALUE_LIMIT        16      // Camera sensor apparently has bad pixels with value > 0 & <=16
61
62    #define CAM_DNG_LENS_INFO               { 49,10, 186,10, 20,10, 53,10 } // See comments in camera.h
63
64    // colors are messed up in DNG if not correct
65    #define cam_CFAPattern                  0x02010100            // Red  Green  Green  Blue, OK
66
67    // ToDo
68    #define CAM_COLORMATRIX1                               \
69      640019, 1000000, -220031, 1000000, -96241, 1000000,  \
70     -77419,  1000000, 639766,  1000000,  44009, 1000000,  \
71      17965,  1000000, 78396,   1000000, 231868, 1000000
72
73    #define cam_CalibrationIlluminant1      1        // ToDo: Daylight ?
74
75    #define CAM_RAW_ROWPIX                  3816     // ROM:FFB28EEC
76    #define CAM_RAW_ROWS                    2784     // ROM:FFB28EF4
77
78    #define CAM_JPEG_WIDTH                  3648     // JPEG Exif data or ROM:FFB28EFC
79    #define CAM_JPEG_HEIGHT                 2736     // JPEG Exif data or ROM:FFB28F04
80
81    // http://chdk.setepontos.com/index.php?topic=6122.0
82    // use exiftool -activearea="24 120 2764 3784" to change values till DNG fit
83    // use even numbers!
84
85    // without Dark Frame
86    #define CAM_ACTIVE_AREA_X1              120      // x offset (right)
87    #define CAM_ACTIVE_AREA_Y1              24       // y offset (down)
88    #define CAM_ACTIVE_AREA_X2              3784
89    #define CAM_ACTIVE_AREA_Y2              2764
90
91    /*
92    // with Dark Frame
93    #define CAM_ACTIVE_AREA_X1          92       // x offset (right)
94    #define CAM_ACTIVE_AREA_Y1          4        // y offset (down)
95    #define CAM_ACTIVE_AREA_X2          3812
96    #define CAM_ACTIVE_AREA_Y2          2784
97    */
98
99    /*
100    // Test values to messure correct "crop" Values
101    #define CAM_ACTIVE_AREA_X1          0
102    #define CAM_ACTIVE_AREA_Y1          0
103    #define CAM_ACTIVE_AREA_X2          3816
104    #define CAM_ACTIVE_AREA_Y2          2784
105    */
106
107    #undef  CAM_SENSOR_BITS_PER_PIXEL
108    #define CAM_SENSOR_BITS_PER_PIXEL       12
109
110    #define PARAM_CAMERA_NAME               4           // parameter number (index) for GetParameterData to get Camera Name
111    #define DNG_EXT_FROM                    ".CR2"
112
113    // everthing below is ToDo !!!!!!!!!!!!!!!!
114
115    //#define CAM_HAS_VARIABLE_ASPECT     1        // ?!? like SX1
116
117    #undef CAM_USES_ASPECT_CORRECTION
118    #define CAM_USES_ASPECT_CORRECTION      1    // camera uses the modified graphics primitives to map screens an viewports to buffers more sized
119    #undef CAM_SCREEN_WIDTH
120    #undef CAM_BITMAP_WIDTH
121    #undef CAM_BITMAP_HEIGHT
122    #define CAM_SCREEN_WIDTH                480 // Width of bitmap screen in CHDK co-ordinates
123    #define CAM_BITMAP_WIDTH                960 // Actual width of bitmap screen in bytes
124    #define CAM_BITMAP_HEIGHT               270 // Actual height of bitmap screen in rows
125
126    // Not required
127    //#undef EDGE_HMARGIN
128    //#define EDGE_HMARGIN 10    // 10 fits video mode of sx210
129       
130//      #define REMOTE_SYNC_STATUS_LED  0xC0xxyyyy              // specifies an LED that turns on while camera waits for USB remote to sync
131
132    #define CAM_DRIVE_MODE_FROM_TIMER_MODE  1   // use PROPCASE_TIMER_MODE to check for multiple shot custom timer.
133                                                // Used to enabled bracketing in custom timer, required on many recent cameras
134                                                // see http://chdk.setepontos.com/index.php/topic,3994.405.html
135
136    #define CAM_QUALITY_OVERRIDE            1 // enable 'super fine' override
137   
138    #define CAM_STARTUP_CRASH_FILE_OPEN_FIX 1     // cameras intermittently crashing on startup with "ASSERT!! FsIoNotify.c Line 457   Task name: SpyTask" in ROMLOG, ToDo: working ?
Note: See TracBrowser for help on using the repository browser.