root/platform/ixus1000_sd4500/sub/102b/lib.c

/* [<][>][^][v][top][bottom][index][help] */

DEFINITIONS

This source file includes following definitions.
  1. hook_raw_image_addr
  2. hook_alt_raw_image_addr
  3. vid_get_viewport_live_fb
  4. vid_get_bitmap_fb
  5. vid_get_viewport_fb
  6. vid_get_viewport_fb_d
  7. vid_get_viewport_byte_width
  8. vid_get_viewport_width
  9. vid_get_viewport_display_xoffset
  10. vid_get_viewport_height
  11. camera_jpeg_count_str

   1 #include "platform.h"
   2 
   3 /*
   4 *********************
   5 IXUS1000IS
   6 **********************
   7 note sensor size for camera.h is from  //ASM1989
   8 @ FFB500D4         -> SX210: FFB2FC6C
   9 0xF32880 = 15935616                                             sx210-> 0x14D2400  = 21832704
  10 
  11 15935616 / 12 * 8 = 10623744                            sx210 -> 21832704 / 12 * 8 = 14555136
  12 ---
  13                               |
  14 @ FFB4FC20     -> SX210: FFB2F7C0                    |
  15 =0xEE8  x 0xAE0                                         -> SX210  -> 0x1140 by 0xCE0 =             |
  16 3816 x 2784 =   10623744                sx210 ->  4416 * 3296  = 14555136  ---
  17 */
  18 
  19 char *hook_raw_image_addr()   //ASM1989  DONE FOR IXUS 1000
  20 {
  21         if (*((int*)0x34D0) != 0)    //  34C4 + C  ->   FF885154  ->FF885180   (ixus 1000)
  22                 return (char*)(0x46000000);     // at FFB8ECF4  pointed at aSsimgprocbuf_c DCB "SsImgProcBuf.c",0
  23         else
  24                 return (char*) 0x4132CD20;      // found at[search CRAW BUF]
  25 } 
  26 
  27 char *hook_alt_raw_image_addr()
  28 {
  29         // Appears to be two raw buffers (this returns inactive buffer)
  30         // Addresses below found in table at FFB9922C, ref at FF88883C
  31         // used in _sub_FF888630__SsImgProcBuf.c__0 
  32         // checks [0x36a0 + 0xc] --> defines which buffer is active
  33 
  34         if (*((int*)0x34D0) == 0)
  35                 return (char*) 0x46000000;
  36         else
  37                 return (char*) 0x4132CD20;      
  38 } 
  39 
  40 // Live picture buffer (shoot not pressed) //ASM1989  keept like sx210
  41 void *vid_get_viewport_live_fb()
  42 {
  43 
  44 
  45     return 0x0;
  46 /*
  47   //sx210 code left
  48     void **fb=(void **)0x2180;                               // 0x2150 or 0x2180 (old SX200) ???? What for SX210
  49     unsigned char buff = *((unsigned char*)0x2058);          // found at FF84FA18 (guess work)
  50     if (buff == 0) buff = 2;  else buff--;
  51     return fb[buff];*/
  52 
  53 
  54 }
  55 
  56 
  57 
  58 // OSD buffer  //ASM1989 ixsu1000
  59 void *vid_get_bitmap_fb()
  60 {
  61         return (void*)0x40471000;                              // found at FFA97414
  62 }
  63 
  64 
  65 
  66 // Live picture buffer (shoot half-pressed) //ASM1989 ixus1000
  67 void *vid_get_viewport_fb()
  68 {
  69         return (void*)0x40587700;                              // found by search for VRAM Address @FFB4CB2C
  70 }
  71 
  72 
  73 // Histo etc. when in play mode maybe ?
  74 void *vid_get_viewport_fb_d()
  75 {
  76 
  77         return (void*)(*(int*)(0x3230+0x58));                  // found at FF877D10  (0x58 atFF877D48)
  78 }
  79 
  80 // begin 16:9 support
  81 
  82 // Physical width of viewport row in bytes
  83 int vid_get_viewport_byte_width() {
  84         return 960 * 6 / 4;     // IXUS 1000 - wide screen LCD is 960 pixels wide, each group of 4 pixels uses 6 bytes (UYVYYY)
  85 }
  86 
  87 int vid_get_viewport_width()
  88 {
  89     //extern int kbd_debug1;
  90     //kbd_debug1 = mode_get();
  91     if (get_movie_status() > 1){return 480;}
  92     if (shooting_get_prop(PROPCASE_ASPECT_RATIO) == 1 ) // on 16:9 shoot mode its 1.switch to video is 100
  93                 return 480; 
  94     else
  95        return 360; 
  96 }
  97 
  98 int vid_get_viewport_display_xoffset()
  99 {
 100     if (get_movie_status() > 1){return 0;}
 101         if (shooting_get_prop(PROPCASE_ASPECT_RATIO) == 1  || ((mode_get()&MODE_MASK)== 100 ))  
 102            return 0;
 103         else
 104        return 60;
 105 }
 106 
 107 // end 16:9 support
 108 
 109 long vid_get_viewport_height()
 110 {
 111     return 240;
 112 }
 113 
 114 
 115 char *camera_jpeg_count_str()
 116 {
 117  return (void*)0xB7E00;                                      // found at FFA23818
 118 }

/* [<][>][^][v][top][bottom][index][help] */