| 1 | // Camera - G10 - platform_camera.h
|
|---|
| 2 |
|
|---|
| 3 | // This file contains the various settings values specific to the G10 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_DRYOS 1
|
|---|
| 24 | #define CAM_DRYOS_2_3_R31 1 // note : structure used by stat changes in R39
|
|---|
| 25 |
|
|---|
| 26 | #define CAM_PROPSET 2
|
|---|
| 27 |
|
|---|
| 28 | #undef CAM_USE_ZOOM_FOR_MF
|
|---|
| 29 | #define CAM_HAS_ND_FILTER 1
|
|---|
| 30 |
|
|---|
| 31 | #undef CAM_EMUL_KEYPRESS_DURATION
|
|---|
| 32 | #define CAM_EMUL_KEYPRESS_DURATION 10
|
|---|
| 33 |
|
|---|
| 34 | #define CAM_RAW_ROWPIX 4480 // G10 auto found @0xffacde38
|
|---|
| 35 | #define CAM_RAW_ROWS 3348 // G10 auto found @0xffacde3c
|
|---|
| 36 |
|
|---|
| 37 | #define CAM_JPEG_WIDTH 4416 // taken from G10 jpg header info
|
|---|
| 38 | #define CAM_JPEG_HEIGHT 3312 // "
|
|---|
| 39 |
|
|---|
| 40 | #define CAM_ACTIVE_AREA_X1 12 // calibrated with G10 RAW picture converted with rawconvert.exe (rawconvert -12to8 -pgm -w=4480 -h=3348 g10.crw g10.pgm)
|
|---|
| 41 | #define CAM_ACTIVE_AREA_Y1 12 // "
|
|---|
| 42 | #define CAM_ACTIVE_AREA_X2 4440 // "
|
|---|
| 43 | #define CAM_ACTIVE_AREA_Y2 3334 // "
|
|---|
| 44 |
|
|---|
| 45 | #undef CAM_MENU_BORDERWIDTH
|
|---|
| 46 | #define CAM_MENU_BORDERWIDTH 10
|
|---|
| 47 |
|
|---|
| 48 | #define CAM_QUALITY_OVERRIDE 1
|
|---|
| 49 | #define CAM_AF_SCAN_DURING_VIDEO_RECORD 1
|
|---|
| 50 | #define CAM_HAS_JOGDIAL 1
|
|---|
| 51 | #undef CAM_CONSOLE_LOG_ENABLED // Development: internal camera stdout -> A/stdout.txt
|
|---|
| 52 | #define CAM_BRACKETING 1
|
|---|
| 53 | #define CAM_MULTIPART 1
|
|---|
| 54 | #define CAM_EXT_TV_RANGE 1
|
|---|
| 55 | #undef OPT_CURVES
|
|---|
| 56 | #undef CAM_UNCACHED_BIT
|
|---|
| 57 | #define CAM_UNCACHED_BIT 0x40000000 // G10 auto found @0xff828844
|
|---|
| 58 |
|
|---|
| 59 | #define CAM_SHOW_OSD_IN_SHOOT_MENU 1
|
|---|
| 60 | #define CAM_CAN_UNLOCK_OPTICAL_ZOOM_IN_VIDEO 1
|
|---|
| 61 |
|
|---|
| 62 | #define PARAM_CAMERA_NAME 4 // parameter number for GetParameterData
|
|---|
| 63 | #undef CAM_SENSOR_BITS_PER_PIXEL
|
|---|
| 64 |
|
|---|
| 65 | #undef CAM_BITMAP_PALETTE
|
|---|
| 66 | #define CAM_BITMAP_PALETTE 2
|
|---|
| 67 |
|
|---|
| 68 | #undef CAM_WHITE_LEVEL
|
|---|
| 69 | #undef CAM_BLACK_LEVEL
|
|---|
| 70 | #define CAM_SENSOR_BITS_PER_PIXEL 12
|
|---|
| 71 | #define CAM_WHITE_LEVEL ((1<<CAM_SENSOR_BITS_PER_PIXEL)-1)
|
|---|
| 72 | #define CAM_BLACK_LEVEL 127
|
|---|
| 73 |
|
|---|
| 74 | #undef CAM_USES_ASPECT_CORRECTION
|
|---|
| 75 | #undef CAM_USES_ASPECT_YCORRECTION
|
|---|
| 76 | #define CAM_USES_ASPECT_CORRECTION 1 //camera uses the modified graphics primitives to map screens an viewports to buffers more sized
|
|---|
| 77 | #define CAM_USES_ASPECT_YCORRECTION 0 //only uses mappings on x coordinate
|
|---|
| 78 | //games mappings
|
|---|
| 79 | #undef GAMES_SCREEN_WIDTH
|
|---|
| 80 | #undef GAMES_SCREEN_HEIGHT
|
|---|
| 81 | #define GAMES_SCREEN_WIDTH 360
|
|---|
| 82 | #define GAMES_SCREEN_HEIGHT 240
|
|---|
| 83 |
|
|---|
| 84 |
|
|---|
| 85 | #undef ASPECT_XCORRECTION
|
|---|
| 86 | #define ASPECT_XCORRECTION(x) ((x)<<1) // 9/4 = ( ( ((x)<<3) + (x) ) >>2 )
|
|---|
| 87 | #undef ASPECT_GAMES_XCORRECTION
|
|---|
| 88 | #define ASPECT_GAMES_XCORRECTION(x) ((x)<<1)
|
|---|
| 89 | #undef ASPECT_GAMES_YCORRECTION
|
|---|
| 90 | #define ASPECT_GAMES_YCORRECTION(y) (y) //none
|
|---|
| 91 |
|
|---|
| 92 | #undef ASPECT_GRID_XCORRECTION
|
|---|
| 93 | #define ASPECT_GRID_XCORRECTION(x) (x) // 9/4 = ((x)<<1) //grids are designed on a 360x240 basis and screen is 320x240, we need x*320/360=x*8/9
|
|---|
| 94 | #undef ASPECT_GRID_YCORRECTION
|
|---|
| 95 | #define ASPECT_GRID_YCORRECTION(y) (y) //y correction for grids made on a 360x240 As the buffer is 720x240 we have no correction here.
|
|---|
| 96 |
|
|---|
| 97 | #undef ASPECT_VIEWPORT_XCORRECTION
|
|---|
| 98 | #define ASPECT_VIEWPORT_XCORRECTION(x) ASPECT_GRID_XCORRECTION(x) //viewport is 360x240 and screen 320x240, we need x*320/360=x*8/9, equal than grids, used by edgeoverlay
|
|---|
| 99 | #undef ASPECT_VIEWPORT_YCORRECTION
|
|---|
| 100 | #define ASPECT_VIEWPORT_YCORRECTION(y) (y)
|
|---|
| 101 | #undef EDGE_HMARGIN
|
|---|
| 102 | #define EDGE_HMARGIN 28
|
|---|
| 103 |
|
|---|
| 104 | // G10 pattern
|
|---|
| 105 | #define cam_CFAPattern 0x01000201 // 0x01000201 = Green Blue Red Green
|
|---|
| 106 | // 0x02010100 = Red Green Green Blue
|
|---|
| 107 |
|
|---|
| 108 | // G10 color - values from dcraw for G10 Canon RAW files
|
|---|
| 109 | #define cam_CalibrationIlluminant1 17 // standard light A
|
|---|
| 110 | #define CAM_COLORMATRIX1 \
|
|---|
| 111 | 11093, 1000000, -3906, 1000000, -1028, 1000000, \
|
|---|
| 112 | -5047, 1000000, 12492, 1000000, 2879, 1000000, \
|
|---|
| 113 | -1003, 1000000, 1750, 1000000, 5561, 1000000
|
|---|
| 114 |
|
|---|
| 115 |
|
|---|
| 116 | // zebra
|
|---|
| 117 | #define CAM_ZEBRA_ASPECT_ADJUST 1
|
|---|
| 118 | #define CAM_ZEBRA_NOBUF 1
|
|---|
| 119 | #undef ZEBRA_HMARGIN0
|
|---|
| 120 | #define ZEBRA_HMARGIN0 30 //this 30 rows are not used by the display buffer is 720x240 effective, no 960x270, i.e. (270-240) reduction in widht possible but not done (more difficult to manage it and slower).
|
|---|
| 121 |
|
|---|
| 122 | #undef CAM_DATE_FOLDER_NAMING // not needed for G10
|
|---|
| 123 |
|
|---|
| 124 | #define CAM_STARTUP_CRASH_FILE_OPEN_FIX 1 // enable fix for camera crash at startup when opening the conf / font files
|
|---|
| 125 | // see http://chdk.setepontos.com/index.php?topic=6179.0
|
|---|
| 126 | #define CAM_FIRMWARE_MEMINFO 1 // Use 'GetMemInfo' to get free memory size.
|
|---|
| 127 |
|
|---|
| 128 | #define CAM_DRIVE_MODE_FROM_TIMER_MODE 1 // use PROPCASE_TIMER_MODE to check for multiple shot custom timer.
|
|---|
| 129 | // Used to enabled bracketing in custom timer, required on many recent cameras
|
|---|
| 130 | // see http://chdk.setepontos.com/index.php/topic,3994.405.html
|
|---|
| 131 |
|
|---|
| 132 | #define CAM_DETECT_SCREEN_ERASE 1 // http://chdk.setepontos.com/index.php?topic=6705.msg71062#msg71062
|
|---|
| 133 |
|
|---|
| 134 |
|
|---|
| 135 | //----------------------------------------------------------
|
|---|
| 136 |
|
|---|