root/platform/ixus1000_sd4500/sub/100f/lib.c

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

DEFINITIONS

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

   1 #include "platform.h"
   2 
   3 /*  OK FOR 100F
   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 
  20 char *hook_raw_image_addr()   //ASM1989  DONE FOR IXUS 1000
  21 {
  22         //found at FFB4FF90
  23 
  24         //ROM:FFB4FF90                 LDR     R6, =0x4132CD20
  25         //..
  26         //ROM:FFB4FFE8                 MOV     R1, R6
  27     //ROM:FFB4FFEC                 ADR     R0, aCrawBuffP  ; "CRAW BUFF       %p"
  28 
  29         //GOOD ONE
  30         //return (char*)(0x4132CD20);
  31 //NO: 44CF6800 ni 420F85B2 ni 46DCB892 ni 433FCF80
  32 
  33 
  34         if (*((int*)0x34D0) != 0)    //  34C4 + C  ->   FF885154  ->FF885180   (ixus 1000)
  35                 return (char*)(0x46000000);     // found by dumping all memory and searching for raw image bytes at FFB8ECF4  pointed at aSsimgprocbuf_c DCB "SsImgProcBuf.c",0
  36         else
  37                 return (char*) 0x4132CD20;      // found at[search CRAW BUF]
  38 
  39 
  40 
  41         //return (char*)(0x4132CD20);
  42 
  43         //Testing  this is SX210 code and addresses keept for if its needed in this cam
  44         //return (char*) (*(int*)(0x3310+0x18) ? 0x43289400 : 0x415D7CC0);   //0x3310 at FF880698 others at FF86AA48
  45 
  46         //testing the other raw method FAILS
  47 //      return (char*) (*(int*)(0x34C4+0x18) ? 0x47209000 : 0x44A345C4);   //0x34C4 at FF885B94  others at FF86C7D4
  48 
  49 
  50 
  51 }
  52 
  53 //WITH this buffer all white: 0x44CF6800
  54 
  55 
  56 /*
  57 sensor size for ixus100:
  58 
  59 @FFB4FC24 = 0xEE8 = 3816        // raw sensor size
  60 @FFB4FC2C = 0xAE0 = 2784
  61 
  62 @FFB4FC34 = 0xE40 = 3648        // cropped size = JPG SIZE
  63 @FFB4FC3C = 0xab0 = 2736
  64 */
  65 
  66 //Testing Sx30 style
  67 /*
  68 char *hook_raw_image_addr()
  69 {
  70 
  71         if (*((int*)0x34D0) != 0)
  72                 return (char*) 0x44CF6800;      // found by dumping all memory and searching for raw image bytes
  73         else
  74                 return (char*) 0x4132CD20;      // found at (0xFFB59F40) [search CRAW BUF]
  75 }
  76 
  77 char *hook_alt_raw_image_addr()
  78 {
  79         if (*((int*)0x34D0) == 0)
  80                 return (char*) 0x44CF6800;      // found by dumping all memory and searching for raw image bytes
  81         else
  82                 return (char*) 0x4132CD20;      // found at (0xFFB59F40) [search CRAW BUF]
  83 }
  84 */
  85 
  86 // Live picture buffer (shoot not pressed) //ASM1989  keept like sx210
  87 void *vid_get_viewport_live_fb()
  88 {
  89 
  90 
  91     return 0x0;
  92 /*
  93   //sx210 code left
  94     void **fb=(void **)0x2180;                               // 0x2150 or 0x2180 (old SX200) ???? What for SX210
  95     unsigned char buff = *((unsigned char*)0x2058);          // found at FF84FA18 (guess work)
  96     if (buff == 0) buff = 2;  else buff--;
  97     return fb[buff];*/
  98 
  99 
 100 }
 101 
 102 
 103 
 104 // OSD buffer  //ASM1989 ixsu1000
 105 void *vid_get_bitmap_fb()
 106 {
 107         return (void*)0x40471000;                              // found at FFA97414
 108 }
 109 
 110 
 111 
 112 // Live picture buffer (shoot half-pressed) //ASM1989 ixus1000
 113 void *vid_get_viewport_fb()
 114 {
 115         return (void*)0x40587700;                              // found by search for VRAM Address @FFB4CB2C
 116 }
 117 
 118 
 119 
 120 // Histo etc. when in play mode maybe ?
 121 void *vid_get_viewport_fb_d()
 122 {
 123 
 124         return (void*)(*(int*)(0x3230+0x58));                  // found at FF877D10  (0x58 atFF877D48)
 125 }
 126 
 127 
 128 // begin 16:9 support
 129 
 130 // Physical width of viewport row in bytes
 131 int vid_get_viewport_byte_width() {
 132         return 960 * 6 / 4;     // IXUS 1000 - wide screen LCD is 960 pixels wide, each group of 4 pixels uses 6 bytes (UYVYYY)
 133 }
 134 
 135 int vid_get_viewport_width()
 136 {
 137     //extern int kbd_debug1;
 138     //kbd_debug1 = mode_get();
 139     if (get_movie_status() > 1){return 480;}
 140     if (shooting_get_prop(PROPCASE_ASPECT_RATIO) == 1 ) // on 16:9 shoot mode its 1.switch to video is 100
 141                 return 480; 
 142     else
 143        return 360; 
 144 }
 145 
 146 int vid_get_viewport_display_xoffset()
 147 {
 148     if (get_movie_status() > 1){return 0;}
 149         if (shooting_get_prop(PROPCASE_ASPECT_RATIO) == 1  || ((mode_get()&MODE_MASK)== 100 ))  
 150            return 0;
 151         else
 152        return 60;
 153 }
 154 
 155 // end 16:9 support
 156 
 157 long vid_get_viewport_height()
 158 {
 159     return 240;
 160 }
 161 
 162 
 163 char *camera_jpeg_count_str()
 164 {
 165  return (void*)0xB7E00;                                      // found at FFA23818
 166 }

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