Ignore:
Timestamp:
01/07/11 04:26:07 (2 years ago)
Author:
reyalP
Message:

g12 and sx30 updates from philmoz in http://chdk.setepontos.com/index.php?topic=650.msg59326#msg59326

  • Cleaned up the image offset code.
  • minor bug fixes and corrected address for exmem_alloc
  • moved SCREEN_COLOR define into gui_draw.h so it can be easily overridden (found in five places and default value was white on the SX30 and G12).
  • added some defines configured in makefile.inc so that gui_debug_draw_values can be used to show memory properly (was hard wired to VX addresses).
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/platform/g12/lib.c

    r1017 r1024  
    103103        return vp_h[shooting_get_prop(PROPCASE_ASPECT_RATIO)]; 
    104104} 
     105 
     106// viewport image offset - used when image size != viewport size (zebra, histogram, motion detect & edge overlay) 
     107// returns the byte offset into the viewport buffer where the image pixels start (to skip any black borders) 
     108int vid_get_viewport_image_offset() { 
     109        return (vid_get_viewport_yoffset() * vid_get_viewport_buffer_width() + vid_get_viewport_xoffset()) * 3; 
     110} 
     111 
     112// viewport image offset - used when image size != viewport size (zebra, histogram, motion detect & edge overlay) 
     113// returns the byte offset to skip at the end of a viewport buffer row to get to the next row. 
     114int vid_get_viewport_row_offset() { 
     115        return (vid_get_viewport_buffer_width() - vid_get_viewport_width()) * 3; 
     116} 
Note: See TracChangeset for help on using the changeset viewer.