root/platform/ixus200_sd980/sub/100c/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_height
  7. vid_get_viewport_byte_width
  8. vid_get_viewport_width
  9. vid_get_viewport_xoffset
  10. camera_jpeg_count_str
  11. get_touch_click_x
  12. get_touch_click_y

   1 #include "platform.h"
   2 
   3 char *hook_raw_image_addr()
   4 {
   5         return (char*)0x421E1120;
   6 }
   7 
   8 void *vid_get_viewport_live_fb()//found in sub_FF8E0788
   9 {
  10     void **fb=(void **)0x5014;
  11     unsigned char buff = *((unsigned char*)0x4E5C);
  12     if (buff == 0) buff = 2;  else buff--;
  13 //    return fb[buff];
  14         if ((mode_get()&MODE_MASK) == MODE_REC)
  15                 return (void*)(fb[buff]-vid_get_viewport_xoffset()*3);
  16         return (void*)fb[buff];
  17 }
  18 
  19 void *vid_get_bitmap_fb()
  20 {
  21         return (void*)0x40431000;
  22 }
  23 
  24 void *vid_get_viewport_fb()
  25 {
  26 //      return (void*)0x408CB700;
  27         if ((mode_get()&MODE_MASK) == MODE_REC)
  28                 return (void*)(0x408CB700-vid_get_viewport_xoffset()*3);
  29         return (void*)0x408CB700;
  30 }
  31 
  32 void *vid_get_viewport_fb_d()
  33 {
  34         return (void*)(*(int*)(0x28F0+0x58));
  35 }
  36 
  37 
  38 long vid_get_viewport_height()       { return 240; }
  39 
  40 // Physical width of viewport row in bytes
  41 int vid_get_viewport_byte_width() {
  42         return 960 * 6 / 4;     // IXUS 200 - wide screen LCD is 960 pixels wide, each group of 4 pixels uses 6 bytes (UYVYYY)
  43 }
  44 
  45 int vid_get_viewport_width()
  46 {
  47     if (shooting_get_prop(PROPCASE_RESOLUTION) == 8)    // widescreen (16:9) image size
  48                 return 480;
  49     else
  50         return 360;
  51 }
  52 
  53 int vid_get_viewport_xoffset()
  54 {
  55         if (shooting_get_prop(PROPCASE_RESOLUTION) == 8)        // widescreen (16:9) image size
  56            return 0;
  57         else
  58        return 60;
  59 }
  60 
  61 char *camera_jpeg_count_str()    
  62 { 
  63         return (char*)0x00084ca4;              // Found @0xff9e8aa8
  64 }
  65 
  66 //only for cameras with a touchscreen
  67 short get_touch_click_x()
  68 {
  69         return *(short*)(0x258C+6);
  70 }
  71 
  72 short get_touch_click_y()
  73 {
  74         return *(short*)(0x258C+8);
  75 }

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