the collaborative CHDK build - page 5 - CHDK Releases - CHDK Forum  

the collaborative CHDK build

  • 249 Replies
  • 168215 Views
*

Offline Jucifer

  • *****
  • 251
  • [A710IS]
Re: the collaborative CHDK build - how to improve MD
« Reply #40 on: 17 / July / 2008, 10:43:35 »
Advertisements
This is my attempt to provide a simple guide for finding the needed addresses of frame buffer array and it's index without disassembly skills & tools.

requirements
hardware: if you use CHDK, you should have them... (cam, SD, card reader, computer...)
software: OS capable of running the .exes and .bats needed (I guess at least any version of Windows), a text editor
other: some common sense, possibly (a lot of) patience

- First download the file attached. It's pretty much the same as mx3's md_speedup.rar. Unzip somewhere (with at least 65MB of free space).

- In debug menu, enable "Dump RAM on ALT +/- press".
- Dump RAM twice: once with the display overexposed (point at something bright/select long exposure/...), once underexposed (put a cap on the lens/select short exposure/...). (Dumping is done with +/- key in ALT.)
(- Disable ram dumping.)

- Move the dumps (e.g. I had CRW_0001.JPG and CRW_0002.JPG in DCIM/100CANON, ~32MB each) from SD to the same folder you unzipped md_speedup_mod.zip to.

- Open regions.bat with a text editor. It should have the dump names, e.g. the aforementioned. Modify if necessary, run regions.bat.
- Open (the newly created) regions.txt. It should have 3 lines with a bigger (5-digit) value after "bytes:", they look something like this:
Code: [Select]
(0x005F0CE0 + 0x1900 = 0x005F25E0) bytes: 3CA50
(0x0066F5E0 + 0x1900 = 0x00670EE0) bytes: 3CA50
(0x006EDEE0 + 0x1900 = 0x006EF7E0) bytes: 3CA50
(addresses and/or size will be different)
(- See a710.regions.txt.)
(yvesson had a little different case: his regions.txt had a lot of "bytes: 420" with spacing of 0x438 and two bigger gaps. Those ranges were divided into three groups. Then the first address of each group was used.)

- Open refs.bat. It should have the name of one of the dumps (e.g. CRW_0001.JPG). Also you'll need to replace all 6 of the 8-digit addresses with the addresses from regions.txt, first 3 just copied without 0x (e.g. 005F25E0), last 3 with the first 0 replaced with 1 (e.g. 105F25E0). Run refs.bat.
- Open refs.txt. Find 3 adjacent rows that have values in the first column with uniform spacing (possibly 0x4) and have a different value in the second column. e.g.
Code: [Select]
[0x0000522C] : 105F25E0
[0x00005230] : 10670EE0
[0x00005234] : 106EF7E0
Here 0x522C would be the array address. For some cameras (VxWorks?) the index address is array address +0x10, e.g. 0x522C+0x10=0x523C.
(- See a710.refs.txt.)
(yvesson had only one group of two addresses that looked promising (see below (0x5288 and 0x5290)), so those values were used. Also the index was found at 0x5288+0x10.)

- Check if the index address is array address +0x10. Use memory viewer (in debug menu). Make sure the values are auto-updated (toggle with up). Use left/right to decrease/increase address value, zoom rocker to change increment modifier. The value of the index address is constantly changed between 0, 1 and 2. If it's not... well... then you'll have to find it. Save some of the patience for this. Index may be near or far, for A720 it's array-0x14C. You can start with e.g. array-0x200. Go with 0x4 increments.

(- Once found, the values go to vid_get_viewport_live_fb() in platform/model/sub/version/lib.c:
Code: [Select]
    void **fb=(void **)0x522C;
    unsigned char buff = *((unsigned char*)0x523C);
    if (buff == 0) {
        buff = 2;
    }
    else {
        buff--;
    }
    return fb[buff];
where 0x522C is the array address and 0x523C is the index address.)


If you find the addresses, please share them. ;)
If you need further assistance, ask.
(Should this be in a separate thread?)
« Last Edit: 29 / July / 2008, 08:19:50 by Jucifer »

*

Offline dzsemx

  • ****
  • 302
  • [SX40HS][A650][A630]
Re: the collaborative CHDK build
« Reply #41 on: 17 / July / 2008, 14:01:11 »
no succes with curves
both of my cameras make totally red images when using the posterize presets, for example
and other setting have no effects
and it's too slow :(

*

Offline yvesson

  • ***
  • 209
  • A540 SX10IS
    • poll about some pics (not much serious) ^^
Re: the collaborative CHDK build
« Reply #42 on: 18 / July / 2008, 15:57:46 »
« Last Edit: 19 / July / 2008, 09:36:52 by yvesson »

*

Offline PhyrePhoX

  • *****
  • 2254
  • make RAW not WAR
    • PhyreWorX
Re: the collaborative CHDK build
« Reply #43 on: 20 / July / 2008, 07:27:36 »
by the way folks, just to let you know:
it is possible to change the video overrides settings WHILE recording a video.
start a recording session for example with quality set to 0.25, then enter altmode, video overrides and set quality higher. as you can see in my videotimer the kb/s rises, you can even see in realtime when you raise the quality in small steps that the camera will soon show these "red icons" that the card is too slow. useful for measuring out the maximum quality.
i think, and i need opinions from you on that, that it would be useful adding shortcuts that are active during recording, that allow you to set the quality quickly. this would afford adding these shortcuts and also changes in my "remaining time" algorithm, as the algorithm uses the timestamp from the starting of the session to average the time and kb/s. if you double the quality after 5 minutes in a 10 minute recording you will not see the change instantly, i think you know what i mean. so we also need the option to set the "averaging interval" from "whole time" to small intervals like 10 or 30 seconds.

it will be quiete useful for a lot of things, among them: you are in a lenghty session and notice that you are running short on diskspace. you COULD stop the session and set the quality, however that would suck as you have an interruption. this way you can modify video quality settings according to the remaining time you are likely to need. got it?


*

Offline fe50

  • ******
  • 3147
  • IXUS50 & 860, SX10 Star WARs-Star RAWs
    • fe50
Re: the collaborative CHDK build
« Reply #44 on: 20 / July / 2008, 07:58:36 »
Hi PhyrePhoX,

Quote
as you can see in my videotimer the kb/s rises, you can even see in realtime when you raise the quality in small steps that the camera will soon show these "red icons" that the card is too slow. useful for measuring out the maximum quality.
This could also be a helpful new standalone feature, a "video quality benchmark", with this (as an direct callable menu entry, e.g. in the video settings menu or in Misc / Debug) the max. setting for a camera/card combination can be checked easily...

...the thing with the shortcut:
It's getting problematic, there are most (all ?) keys used by something, also the 2nd function keys, furthermore there are some differences between the "big" cameras like your S3 and the "small" Ixus models with fewer buttons.

With this i thought of a 3rd function of the keys: a fast "double press" like a double click with a mouse...but i'm not sure whether this would be workable and reasonable as well...

*

Offline PhyrePhoX

  • *****
  • 2254
  • make RAW not WAR
    • PhyreWorX
Re: the collaborative CHDK build
« Reply #45 on: 20 / July / 2008, 08:01:45 »
well no in video mode, the up/down/left/right keys are not used at all, are they?

*

Offline fe50

  • ******
  • 3147
  • IXUS50 & 860, SX10 Star WARs-Star RAWs
    • fe50
Re: the collaborative CHDK build
« Reply #46 on: 20 / July / 2008, 08:14:33 »
hmm - yes, in video mode ... it'll be time to implement the video settings in the SD870  :(

*

Offline Jucifer

  • *****
  • 251
  • [A710IS]
Re: the collaborative CHDK build
« Reply #47 on: 22 / July / 2008, 09:32:27 »
I compiled builds also for ixus60_sd600.

(requested)


*

Offline PhyrePhoX

  • *****
  • 2254
  • make RAW not WAR
    • PhyreWorX
Re: the collaborative CHDK build
« Reply #48 on: 22 / July / 2008, 20:48:18 »
* added video_overrides, SDHC & touchwheel "patch" from mil22 from here: Added dual boot and video compression support for IXUS860/SD870IS

    -> needs a bit ironing out (supposedly bitrate setting is fubared)

+ added fast movie switches:
it is now possible to quickly change video quality during recording via the up/down buttons
also you can pause a movie by pressing left, unpause it by pressing right
for this feature a new option has been added to the video override menu.

drawbacks: there is no visual feedback yet on quality change/pause/unpause functions also the sound will most likely be not working anymore. not suitable for family parties, better for movies you dont need the sound anyway, or for surveillance modes.
+ new ubasic command: set_movie_status. If you set it to 1, movie will be paused. 2 will unpause movie and 3 will stop movie.

needs proper testing, proper visual representation

thanks to Hacki & ewavr

the movie stuff is experimental, should work stable though. needs a bit of a gui thingy. and perhaps we also find a way to start movies (without actual button press). 't will be difficult though.

edit: this only works when you enable bitrate, not quality in video overrides menu (used the wrong variable names, i know, it is just lacking a few more checks)
« Last Edit: 22 / July / 2008, 20:55:38 by PhyrePhoX »

Re: the collaborative CHDK build
« Reply #49 on: 24 / July / 2008, 08:32:03 »
PhyrePhoX

Sorry for my english.
Please say, what build contains such possibility, as:

+ added fast movie switches:
it is now possible to quickly change video quality during recording via the up/down buttons
also you can pause a movie by pressing left, unpause it by pressing right
for this feature a new option has been added to the video override menu.

and is it work on 570-is?

 

Related Topics