This source file includes following definitions.
- hook_raw_image_addr
- hook_alt_raw_image_addr
- camera_jpeg_count_str
- vid_get_viewport_fb
- vid_get_viewport_live_fb
- vid_get_viewport_fb_d
- vid_get_bitmap_fb
- vid_get_viewport_byte_width
- vid_get_viewport_width
- vid_get_viewport_display_xoffset
- vid_get_viewport_height
1 #include "platform.h"
2
3 extern int active_raw_buffer;
4 extern char* raw_buffers[];
5
6 char *hook_raw_image_addr()
7 {
8 return raw_buffers[active_raw_buffer*3];
9 }
10
11 char *hook_alt_raw_image_addr()
12 {
13 return raw_buffers[(active_raw_buffer^1)*3];
14 }
15
16 char *camera_jpeg_count_str()
17 {
18 extern char jpeg_count_str[];
19 return jpeg_count_str;
20 }
21
22
23
24
25
26 extern char active_viewport_buffer;
27 extern void* viewport_buffers[];
28
29
30 void *vid_get_viewport_fb()
31 {
32
33 return viewport_buffers[0];
34 }
35
36
37 void *vid_get_viewport_live_fb()
38 {
39 if (MODE_IS_VIDEO(mode_get()))
40 return viewport_buffers[0];
41
42
43 return viewport_buffers[(active_viewport_buffer-1)&3];
44 }
45
46 void *vid_get_viewport_fb_d()
47 {
48 extern char *viewport_fb_d;
49 return viewport_fb_d;
50 }
51
52
53
54 void *vid_get_bitmap_fb()
55 {
56 return (void*)0x40471000;
57 }
58
59
60
61
62
63
64 int vid_get_viewport_byte_width() {
65 return 960 * 6 / 4;
66 }
67
68 int vid_get_viewport_width()
69 {
70 if (get_movie_status() > 1){return 480;}
71 if (shooting_get_prop(PROPCASE_ASPECT_RATIO) == 1 )
72 return 480;
73 else
74 return 360;
75 }
76
77 int vid_get_viewport_display_xoffset()
78 {
79 if (get_movie_status() > 1){return 0;}
80 if (shooting_get_prop(PROPCASE_ASPECT_RATIO) == 1 || ((mode_get()&MODE_MASK)== 100 ))
81 return 0;
82 else
83 return 60;
84 }
85
86
87
88 long vid_get_viewport_height()
89 {
90 return 240;
91 }