source: trunk/platform/g11/platform_camera.h @ 1140

Revision 1140, 4.9 KB checked in by reyalP, 2 years ago (diff)

split camera.h into individual files for each camera, from philmoz in http://chdk.setepontos.com/index.php?topic=650.msg64552#msg64552 + minor cleanup in camera.h

  • Property svn:eol-style set to native
Line 
1// Camera - G11 - platform_camera.h
2
3// This file contains the various settings values specific to the G11 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_2_3_R39                   1
24    #define CAM_PROPSET                 3
25    #define CAM_DRYOS                   1
26    #undef  CAM_USE_ZOOM_FOR_MF
27    #define CAM_HAS_ND_FILTER           1
28    #define CAM_RAW_ROWPIX              3744   // See g11 lib.c
29    #define CAM_RAW_ROWS                2784   // See g11 lib.c
30    #undef  CAM_EMUL_KEYPRESS_DURATION
31    #define CAM_EMUL_KEYPRESS_DURATION  10
32
33    #undef CAM_MENU_BORDERWIDTH
34    #define CAM_MENU_BORDERWIDTH        10
35
36        #define CAM_QUALITY_OVERRIDE 1
37    #define CAM_AF_SCAN_DURING_VIDEO_RECORD 1
38    #define CAM_HAS_JOGDIAL             1
39    #undef  CAM_CONSOLE_LOG_ENABLED         // Development: internal camera stdout -> A/stdout.txt
40    #define CAM_BRACKETING              1
41    #define CAM_MULTIPART               1
42    #define CAM_EXT_TV_RANGE            1
43    #undef OPT_CURVES
44    #undef CAM_UNCACHED_BIT
45    #define CAM_UNCACHED_BIT            0x40000000  // G11 @FF888204(via ExMem.FreeCacheable)
46
47        #define CAM_SWIVEL_SCREEN                       1
48        #define CAM_SHOW_OSD_IN_SHOOT_MENU  1
49
50    // camera name
51    #define PARAM_CAMERA_NAME 4 // parameter number for GetParameterData
52    #undef  CAM_SENSOR_BITS_PER_PIXEL
53    #undef  CAM_WHITE_LEVEL
54    #undef  CAM_BLACK_LEVEL
55    #define CAM_SENSOR_BITS_PER_PIXEL   12
56    #define CAM_WHITE_LEVEL             ((1<<CAM_SENSOR_BITS_PER_PIXEL)-1)
57    #define CAM_BLACK_LEVEL             127
58
59    #undef CAM_USES_ASPECT_CORRECTION   
60    #undef CAM_USES_ASPECT_YCORRECTION 
61    #define CAM_USES_ASPECT_CORRECTION  1  //camera uses the modified graphics primitives to map screens an viewports to buffers more sized
62    #define CAM_USES_ASPECT_YCORRECTION  0  //only uses mappings on x coordinate
63    //games mappings
64        #undef GAMES_SCREEN_WIDTH
65        #undef GAMES_SCREEN_HEIGHT
66        #define GAMES_SCREEN_WIDTH 360
67        #define GAMES_SCREEN_HEIGHT 240
68
69    #undef CAM_BITMAP_PALETTE
70    #define CAM_BITMAP_PALETTE    4
71
72
73    #undef ASPECT_XCORRECTION
74        #define ASPECT_XCORRECTION(x)  ( ( ((x)<<3) + (x) )  >>2 )
75        #undef ASPECT_GAMES_XCORRECTION
76        #define ASPECT_GAMES_XCORRECTION(x)   ( ((x)<<1) ) 
77        #undef ASPECT_GAMES_YCORRECTION
78        #define ASPECT_GAMES_YCORRECTION(y)   ( (y) )  //none
79
80    #undef ASPECT_GRID_XCORRECTION
81    #define ASPECT_GRID_XCORRECTION(x)  ( ((x)<<3)/9  )  //grids are designed on a 360x240 basis and screen is 320x240, we need x*320/360=x*8/9
82    #undef ASPECT_GRID_YCORRECTION
83    #define ASPECT_GRID_YCORRECTION(y)  ( (y) )       //y correction for grids  made on a 360x240 As the buffer is 720x240 we have no correction here.
84
85    #undef ASPECT_VIEWPORT_XCORRECTION
86    #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
87    #undef ASPECT_VIEWPORT_YCORRECTION
88    #define ASPECT_VIEWPORT_YCORRECTION(y) ( (y) )
89    #undef EDGE_HMARGIN
90    #define EDGE_HMARGIN 28
91
92        /**** From SX200IS, ok for G11 ?*/
93    // pattern
94    #define cam_CFAPattern 0x02010100 // Red  Green  Green  Blue
95    // color
96    //need fixing *****************************************************
97    #define CAM_COLORMATRIX1                               \
98      14134, 1000000, -5576, 1000000, -1527, 1000000, \
99     -1991,  1000000, 10719,  1000000, 1273,   1000000, \
100      -1158,   1000000, 1929,   1000000, 3581,  1000000
101    #define cam_CalibrationIlluminant1 17 // Standard Light A
102
103    // cropping
104        //g11 values from Amit Talwar
105    #define CAM_JPEG_WIDTH  3648
106    #define CAM_JPEG_HEIGHT 2736
107    #define CAM_ACTIVE_AREA_X1 16
108    #define CAM_ACTIVE_AREA_Y1 8
109    #define CAM_ACTIVE_AREA_X2 3692
110    #define CAM_ACTIVE_AREA_Y2 2776
111       
112          /**** From SX200IS, ok for G11 END?*/
113   #define CAM_ZEBRA_ASPECT_ADJUST 1
114//----------------------------------------------------------
115
Note: See TracBrowser for help on using the repository browser.