source: trunk/platform/sx40hs/sub/100g/lib.c @ 1430

Revision 1430, 1001 bytes checked in by philmoz, 18 months ago (diff)

Update for G12, SX30, SX40 & IXUS310:

  • improved vid_get_viewport_live_fb, more consistent motion detect speed
  • added entries to stubs_min.S for vid_get_viewport_live_fb
  • moved common code from individual firmware lib.c files to main camera lib.c files
  • Property svn:eol-style set to native
Line 
1#include "platform.h"
2
3char *hook_raw_image_addr()
4{
5        // Appears to be two raw buffers (this returns active buffer)
6        // Addresses below found in table at FF445CFC used in sub_FF0ECCEC
7        // [0x3148 + 0xC] --> defines which buffer is active
8
9        if (*((int*)0x3154) != 0)
10                return (char*) 0x4ADB54A0;
11        else
12                return (char*) 0x44000000;      // found at (FF3E3930) [search CRAW BUF]
13}
14
15char *hook_alt_raw_image_addr()
16{
17        // Appears to be two raw buffers (this returns inactive buffer)
18        // Addresses below found in table at FF445CFC used in sub_FF0ECCEC
19        // [0x3148 + 0xC] --> defines which buffer is active
20
21        if (*((int*)0x3154) == 0)
22                return (char*) 0x4ADB54A0;
23        else
24                return (char*) 0x44000000;      // found at (FF3E3930) [search CRAW BUF]
25}
26
27
28char *camera_jpeg_count_str()    { return (char*)0x000df0e8; } // Found @0xff285438
29long hook_raw_size()             { return 0x01247a60; }        // Found @0xff3e393c
30
31
32void *vid_get_viewport_fb_d()
33{
34        return (void*)(*(int*)(0x2CA0+0x58)); // @FF06B08C & FF06B0C4
35}
Note: See TracBrowser for help on using the repository browser.