Changeset 1871
- Timestamp:
- 05/28/12 21:42:36 (13 months ago)
- Location:
- branches/reyalp-ptp-live/core
- Files:
-
- 2 edited
-
live_view.c (modified) (1 diff)
-
live_view.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/reyalp-ptp-live/core/live_view.c
r1837 r1871 13 13 lv.version_minor = LIVE_VIEW_VERSION_MINOR; 14 14 15 lv.lcd_aspect_ratio = vid_get_aspect_ratio(); 16 17 lv.vp.logical_width = vid_get_viewport_fullscreen_width(); 18 lv.vp.logical_height = vid_get_viewport_fullscreen_height(); 15 lv.lcd_aspect_ratio = vid_get_aspect_ratio(); 19 16 20 17 lv.vp.buffer_width = vid_get_viewport_buffer_width_proper(); 21 22 // TODO23 lv.vp.buffer_logical_xoffset = vid_get_viewport_display_xoffset_proper();24 lv.vp.buffer_logical_yoffset = vid_get_viewport_display_yoffset_proper();25 18 26 19 lv.vp.visible_width = vid_get_viewport_width_proper(); 27 20 lv.vp.visible_height = vid_get_viewport_height_proper(); 28 21 29 lv.bm.logical_width = ASPECT_XCORRECTION(camera_screen.width); 30 lv.bm.logical_height = camera_screen.height; 22 lv.vp.margin_left = vid_get_viewport_display_xoffset_proper(); 23 lv.vp.margin_top = vid_get_viewport_display_yoffset_proper(); 24 25 // TODO returning margins from lib.c might be better 26 // can end up with negative if size and offset sources don't update at exactly the same time 27 lv.vp.margin_right = vid_get_viewport_fullscreen_width() - lv.vp.visible_width - lv.vp.margin_left; 28 lv.vp.margin_bot = vid_get_viewport_fullscreen_height() - lv.vp.visible_height - lv.vp.margin_top; 31 29 32 30 lv.bm.buffer_width = camera_screen.buffer_width; 33 31 34 lv.bm.buffer_logical_xoffset = 0; 35 lv.bm.buffer_logical_yoffset = 0; 32 lv.bm.margin_left = 0; 33 lv.bm.margin_top = 0; 34 lv.bm.margin_right = 0; 35 lv.bm.margin_bot = 0; 36 36 37 lv.bm.visible_width = lv.bm.logical_width;38 lv.bm.visible_height = lv.bm.logical_height;37 lv.bm.visible_width = ASPECT_XCORRECTION(camera_screen.width); 38 lv.bm.visible_height = camera_screen.height; 39 39 40 40 lv.palette_type = vid_get_palette_type(); -
branches/reyalp-ptp-live/core/live_view.h
r1831 r1871 17 17 18 18 typedef struct { 19 int data_start; // offset of data from start of live view header 19 20 /* 20 logical screen 21 descibes how big the buffer would be in pixels, if it exactly filled the physical screen 22 may be larger or smaller than the buffer data, due to letter boxing or unused data 23 using lcd_aspect_ratio, you can create a correct representation of the screen 24 */ 25 int logical_width; 26 int logical_height; 27 /* 28 buffer - describes the actual data sent 29 data size is always buffer_width*buffer_height*(buffer bpp implied by type) 30 offsets represent the position of the data on the logical screen, 31 > 0 for sub images (16:9 on a 4:3 screen, stitch window, etc) 21 buffer width in pixels 22 data size is always buffer_width*visible_height*(buffer bpp implied by type) 32 23 */ 33 24 int buffer_width; 34 35 int buffer_logical_xoffset;36 int buffer_logical_yoffset;37 38 25 /* 39 visible - describes data within the buffer which contains image data to be displayed 40 offsets are relative to buffer 41 width must be <= logical_width - buffer_logical_xoffset and width + xoffset must be <= buffer_width 26 visible size in pixels 27 describes data within the buffer which contains image data to be displayed 28 any offsets within buffer data are added before sending, so the top left 29 pixel is always the first first byte of data. 30 width must always be <= buffer_width 31 if buffer_width is > width, the additional data should be skipped 32 visible_height also defines the number of data rows 42 33 */ 43 34 int visible_width; 44 35 int visible_height; 45 36 46 int data_start; // offset of data 37 /* 38 margins 39 pixels offsets needed to replicate display position on cameras screen 40 not used for any buffer offsets 41 */ 42 int margin_left; 43 int margin_top; 44 45 int margin_right; 46 int margin_bot; 47 47 } lv_framebuffer_desc; 48 48
Note: See TracChangeset
for help on using the changeset viewer.