Changeset 935
- Timestamp:
- 09/06/10 01:06:37 (3 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
-
core/gui_osd.c (modified) (8 diffs)
-
include/camera.h (modified) (9 diffs)
-
platform/d10/notes.txt (modified) (2 diffs)
-
platform/ixus980_sd990/notes.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/core/gui_osd.c
r928 r935 52 52 static int step; 53 53 54 55 #if defined (CAM_ZEBRA_NOBUF) && !defined(CAM_ZEBRA_ASPECT_ADJUST) 56 // old sx20 #ifdefs were roughly equivalent of both 57 #error "defined (CAM_ZEBRA_NOBUF) && !defined(CAM_ZEBRA_ASPECT_ADJUST). Remove this if you've verified it will work!" 58 #endif 59 60 #ifdef CAM_ZEBRA_ASPECT_ADJUST 61 // TODO should just not save anything at all instead of 1 px. Also, this shouldn't be tied to aspect correct 62 #define ZEBRA_CANONOSD_BORDER_RESTORE 1 63 #define ZFIX_TOP 1 64 #define ZFIX_BOTTOM 1 65 #else 54 66 // Width (in pixels) of half-shoot Canon OSD area of the screen buffer, for restore during 55 67 // Zebra draw, to limit RAM usage of zebra. Only these border areas are stored in RAM. 56 68 // Only top and bottom are restored, not left&right. 57 #define ZEBRA_CANONOSD_BORDER_RESTORE 1 58 59 #if defined (CAMERA_sx200is) || defined(CAMERA_g11) || defined (CAMERA_ixus100_sd780) || defined (CAMERA_ixus95_sd1200) || defined (CAMERA_s90) || defined (CAMERA_sx20) 60 //there are no memory for that (the screen buffer is big): 960x270 61 //TODO use a buffer of screen dimensions 62 #define ZFIX_TOP 1 63 #define ZFIX_BOTTOM 1 64 #else 69 #define ZEBRA_CANONOSD_BORDER_RESTORE 1 65 70 #define ZFIX_TOP 29 66 71 #define ZFIX_BOTTOM 30 … … 76 81 static int timer = 0; 77 82 static unsigned char *buf = NULL; 78 #if defined (CAMERA_sx200is) || defined(CAMERA_g11) || defined (CAMERA_ixus100_sd780) || defined (CAMERA_ixus95_sd1200) || defined (CAMERA_s90) || defined (CAMERA_sx20) 83 84 #ifdef CAM_ZEBRA_ASPECT_ADJUST 79 85 static int buffer_size; 80 86 #endif … … 221 227 // free and NULL zebra buffers. free(NULL) is always OK. 222 228 static void gui_osd_zebra_free() { 223 #if !defined (CAMERA_sx20)229 #if !defined (CAM_ZEBRA_NOBUF) 224 230 free(buf); 225 #endif231 #endif 226 232 buf=NULL; 227 233 #if ZEBRA_CANONOSD_BORDER_RESTORE … … 245 251 { 246 252 timer = 0; 247 #if defined (CAMERA_sx200is) || defined(CAMERA_g11) || defined (CAMERA_ixus100_sd780) || defined (CAMERA_ixus95_sd1200) || defined (CAMERA_s90) //nandoide sept-2009 253 #if defined (CAM_ZEBRA_NOBUF) 254 buffer_size=screen_buffer_size-ZEBRA_HMARGIN0*screen_buffer_width; 255 buf=vid_get_bitmap_fb(); 256 #elif defined (CAM_ZEBRA_ASPECT_ADJUST) 248 257 buffer_size=screen_buffer_size-ZEBRA_HMARGIN0*screen_buffer_width; 249 258 buf = malloc(buffer_size); … … 252 261 buf=vid_get_bitmap_fb(); //without new buffer: directly into screen buffer: we got some flickering in OSD and histogram but it's usable 253 262 //~ msleep(50); 254 #elif defined (CAMERA_sx20)255 buffer_size=screen_buffer_size-ZEBRA_HMARGIN0*screen_buffer_width;256 buf=vid_get_bitmap_fb();257 263 #else 258 264 buf = malloc(screen_buffer_size); … … 262 268 cur_buf_top = malloc(screen_buffer_width * ZFIX_TOP); 263 269 cur_buf_bot = malloc(screen_buffer_width * ZFIX_BOTTOM); 264 #if defined (CAM ERA_g11) || defined (CAMERA_s90)270 #if defined (CAM_ZEBRA_ASPECT_ADJUST) 265 271 if (cur_buf_top) memset(cur_buf_top,0,screen_buffer_width * ZFIX_TOP); 266 272 if (cur_buf_bot) memset(cur_buf_bot,0,screen_buffer_width * ZFIX_BOTTOM); … … 297 303 //------------------------------------------------------------------- 298 304 static void draw_pixel_buffered(unsigned int offset, color cl) { 299 #if defined (CAMERA_sx200is) || defined (CAMERA_sx20) 305 // shouldn't this be checked on all cams ? 306 #if defined CAM_ZEBRA_ASPECT_ADJUST 300 307 if (offset < buffer_size) 301 308 buf[offset] = cl; … … 377 384 } 378 385 379 // reyalp - TODO this SHOULD NOT BE CAMERA SPECIFIC. Should be generalized to work with all cameras 380 // having a copy/paste/modified version for individual cameras will be a maintenance nightmare. 381 #if defined (CAMERA_sx200is) || defined (CAMERA_g11) || defined (CAMERA_ixus100_sd780) || defined (CAMERA_ixus95_sd1200) || defined (CAMERA_s90) || defined (CAMERA_sx20) 386 // reyalp - TODO this should be rewritten so there is one generic zebra func for all cameras 387 #if defined(CAM_ZEBRA_ASPECT_ADJUST) 382 388 //nandoide sept-2009 383 389 // viewport is 360x240 and screen buffer 960x270, we need to expand the x coordinate 390 //reyalp - applies to other cameras where the real bitmap width is is different from what lib.c reports. Also used on some other cameras ... 384 391 int gui_osd_draw_zebra(int show) { 385 392 unsigned int v, s, x, y, f, over; -
trunk/include/camera.h
r934 r935 88 88 #undef CAM_QUALITY_OVERRIDE //camera may need shooting quality override (sx200is lacks SuperFine quality) 89 89 90 90 #undef CAM_ZEBRA_ASPECT_ADJUST // zebra needs to account for real bitmap size being different from what lib.c reports 91 // also used by some cameras with normal bitmap layouts for memory saving ? 92 #undef CAM_ZEBRA_NOBUF // zebra draws directly on bitmap buffer. Requires above as well 91 93 //---------------------------------------------------------- 92 94 // Overridden values for each camera … … 1069 1071 #define ASPECT_GAMES_YCORRECTION(y) ( (y) ) //none 1070 1072 1073 #define CAM_ZEBRA_ASPECT_ADJUST 1 1074 1071 1075 //---------------------------------------------------------- 1072 1076 … … 1919 1923 #define ASPECT_GAMES_YCORRECTION(y) ( (y) ) //none 1920 1924 1925 #define CAM_ZEBRA_ASPECT_ADJUST 1 1926 1921 1927 // #define DNG_EXT_FROM ".CR2" 1922 1928 //---------------------------------------------------------- … … 2003 2009 // camera name 2004 2010 #define PARAM_CAMERA_NAME 4 // parameter number for GetParameterData sd990: OK 2011 // TODO this was in the original zebra mess, not clear if needed or just for mem saving ? 2012 #define CAM_ZEBRA_ASPECT_ADJUST 1 2005 2013 //---------------------------------------------------------- 2006 2014 … … 2176 2184 // camera name 2177 2185 #define PARAM_CAMERA_NAME 4 // parameter number for GetParameterData 2186 // TODO this was in the original zebra mess, not clear if needed or just for mem saving ? 2187 #define CAM_ZEBRA_ASPECT_ADJUST 1 2178 2188 //---------------------------------------------------------- 2179 2189 … … 2625 2635 #define CAM_QUALITY_OVERRIDE 1 2626 2636 #define CAM_AF_SCAN_DURING_VIDEO_RECORD 1 2637 #define CAM_ZEBRA_ASPECT_ADJUST 1 2627 2638 //---------------------------------------------------------- 2628 2639 … … 2713 2724 #define CAM_ACTIVE_AREA_Y2 2736 2714 2725 /**** From SX200IS, ok for G11 END?*/ 2726 #define CAM_ZEBRA_ASPECT_ADJUST 1 2715 2727 //---------------------------------------------------------- 2716 2728 … … 2800 2812 #define CAM_ACTIVE_AREA_Y2 2736 2801 2813 /**** From SX200IS, ok for S90 END?*/ 2814 2815 #define CAM_ZEBRA_ASPECT_ADJUST 1 2802 2816 //---------------------------------------------------------- 2803 2817 … … 2886 2900 #define ASPECT_GAMES_YCORRECTION(y) ( (y) ) //none 2887 2901 2902 #define CAM_ZEBRA_ASPECT_ADJUST 1 2903 #define CAM_ZEBRA_NOBUF 1 2904 2888 2905 #undef CAM_BITMAP_PALETTE 2889 2906 #define CAM_BITMAP_PALETTE 6 -
trunk/platform/d10/notes.txt
r933 r935 10 10 Not implemented/Not Working 11 11 - movie_rec: meaning all movie related functions 12 - zebra13 12 - dark frame subtraction control. Don't try to use this, it will break horribly. 14 13 - USB remote support … … 27 26 - DNG matrix (DavidB) 28 27 - OSD size/aspect (DavidB,reyalP) 28 - zebra 29 29 30 30 Scripts tested successfully -
trunk/platform/ixus980_sd990/notes.txt
r934 r935 23 23 Features known BROKEN or NOT supported: 24 24 - DNG extension over USB. 25 - Zebra26 - Edge overlay27 25 - Custom curves 28 26 - Microphone mute/unmute
Note: See TracChangeset
for help on using the changeset viewer.