CHDK_DE Vorschauversion  Trunk Rev. 6014
 Alle Datenstrukturen Dateien Funktionen Variablen Typdefinitionen Aufzählungen Aufzählungswerte Makrodefinitionen
lib.c-Dateireferenz
#include "platform.h"
#include "lolevel.h"
#include "debug_led.h"
+ Include-Abhängigkeitsdiagramm für lib.c:

gehe zum Quellcode dieser Datei

Funktionen

char * hook_raw_image_addr ()
 
void * vid_get_viewport_live_fb ()
 
void * vid_get_bitmap_fb ()
 
void * vid_get_viewport_fb ()
 
void * vid_get_viewport_fb_d ()
 
int vid_get_viewport_width_proper ()
 
int vid_get_viewport_height_proper ()
 
char * camera_jpeg_count_str ()
 
void * vid_get_bitmap_active_palette ()
 
void * vid_get_bitmap_active_buffer ()
 
void _orig_MoveFocusLensToDistance (short *dist)
 
void _MoveFocusLensToDistance (short *dist)
 

Variablen

volatile char * bitmap_buffer [2] = { (char*)0x103c79a0, (char*)(0x103c79a0 + 0x15180) }
 

Dokumentation der Funktionen

void _MoveFocusLensToDistance ( short *  dist)

Definiert in Zeile 89 der Datei lib.c.

90 {
91 /*
92  Any use of the original MoveFocusLensToDistance fails with an assert due to a "speed limit" check.
93  However, with disabled check, the use of MoveFocusLensToDistance seems to cause
94  focus miscalibration (when used in AF and MF), which only goes away with power cycling...
95 */
96  int shmode, afl;
99  if (shmode == 19) // MODE_VIDEO_STD
100  {
101  if (get_movie_status() != 4) return; // only allow during recording when in movie mode
102  }
103  else if (!afl) // if not movie mode, AFL has to be active
104  {
105  return;
106  }
107  int speedlimitflag = *(int*)0xb23c;
108  *(int*)0xb23c = 0;
110  *(int*)0xb23c = speedlimitflag;
111 }
void _orig_MoveFocusLensToDistance ( short *  dist)
char* camera_jpeg_count_str ( )

Definiert in Zeile 70 der Datei lib.c.

71 {
72  return (char*)0x81c70;
73 }
char* hook_raw_image_addr ( void  )

Definiert in Zeile 5 der Datei lib.c.

6 {
7  return (char*)0x1056B960; // aA08x_crw, followed sd30
8 }
void* vid_get_bitmap_active_buffer ( )

Definiert in Zeile 79 der Datei lib.c.

80 {
81  return (void*)(*(int*)0x6adc); // @FF92A7D0 DisplayPhysicalScreenWithYUVPalette
82 }
void* vid_get_bitmap_active_palette ( )

Definiert in Zeile 75 der Datei lib.c.

75  {
76  return (void *)0x72cf8; // GetPaletteFromPhysicalScreen
77 }
void* vid_get_bitmap_fb ( )

OSD screen

Definiert in Zeile 31 der Datei lib.c.

32 {
33  return (void*)0x103C79A0; // seems to be the same as a620 and sd30
34 }
void* vid_get_viewport_fb ( )

IMG viewport in 'rec' mode

Definiert in Zeile 36 der Datei lib.c.

37 {
38  return (void*) 0x105F2C4C; //s80
39 }
void* vid_get_viewport_fb_d ( )

IMG viewport in 'play' mode

Definiert in Zeile 41 der Datei lib.c.

42 {
43  return (void*)(*(int*)0x72fdc); //s80
44 }
int vid_get_viewport_height_proper ( )

Definiert in Zeile 58 der Datei lib.c.

58  {
59  int m = mode_get();
60  if((m&MODE_MASK) == MODE_PLAY) {
61  return 240; //no tv-out
62  }
63  // return hard coded width since mode doesn't update at the same time as GetVRAMHPixelsSize
64  if((m&MODE_SHOOTING_MASK) == MODE_STITCH) {
65  return 120;
66  }
67  return *(int*)0x36634; // hopefully
68 }
void* vid_get_viewport_live_fb ( )

Definiert in Zeile 10 der Datei lib.c.

11 {
12 /*
13 0x5364: 0x105f2c4c: 1st regular buffer
14 0x5368: 0x1067262c: 2nd regular buffer
15 0x536c: 0x106f200c: 3rd regular buffer
16 0x5370: 0x1055ae4c: used when half-shooting, otherwise one of the play mode buffers
17 0x5374: 0x107719ec: 1st HD movie buffer (1024x768, Y411) OR the "MF point zoom" buffers (triple, 360x120)
18 0x5378: 0x108919ec: 2nd
19 */
20  void **fb=(void **)0x5364; //@FF8AB03C
21  unsigned char buff = *((unsigned char*)0x537c); //@FF8AB010
22  if (buff == 0) {
23  buff = 2;
24  }
25  else {
26  buff--;
27  }
28  return fb[buff];
29 }
int vid_get_viewport_width_proper ( )

Definiert in Zeile 46 der Datei lib.c.

46  {
47  int m = mode_get();
48  if((m&MODE_MASK) == MODE_PLAY) {
49  return 720; //no tv-out
50  }
51  // return hard coded width since mode doesn't update at the same time as GetVRAMHPixelsSize
52  if((m&MODE_SHOOTING_MASK) == MODE_STITCH) {
53  return 360;
54  }
55  return *(int*)0x36630; // hopefully
56 }

Variablen-Dokumentation

volatile char* bitmap_buffer[2] = { (char*)0x103c79a0, (char*)(0x103c79a0 + 0x15180) }

Definiert in Zeile 84 der Datei lib.c.