CHDKPTP - PC Remote Control Performance Analysis - page 34 - RAW Shooting and Processing - CHDK Forum

CHDKPTP - PC Remote Control Performance Analysis

  • 465 Replies
  • 120302 Views
*

Offline SticK

  • *****
  • 779
Re: CHDKPTP - PC Remote Control Performance Analysis
« Reply #330 on: 30 / September / 2012, 14:59:55 »
Advertisements
Digital magnification.  The S90 has a nice feature that the S50 does not have is that when in the M mode you enable manual focus, it gives you digitally-magnified view of camera LCD center.  From the user's perspective, this magnified view is ignored by CHDK // in essence the liveview remains the same, as if it were not enabled.  This would be very useful if CHDK could support it ... Is it possible to implement? big deal?

*

Offline reyalp

  • ******
  • 14080
Re: CHDKPTP - PC Remote Control Performance Analysis
« Reply #331 on: 30 / September / 2012, 16:55:41 »
Digital magnification.  The S90 has a nice feature that the S50 does not have is that when in the M mode you enable manual focus, it gives you digitally-magnified view of camera LCD center.  From the user's perspective, this magnified view is ignored by CHDK // in essence the liveview remains the same, as if it were not enabled.  This would be very useful if CHDK could support it ... Is it possible to implement? big deal?
AFAIK, it's not currently known where this framebuffer is, or even for certain whether it is a separate framebuffer rather than a digital blowup of the normal live view. I think it actually has more detail, but I wouldn't bet too much on that.

Assuming it actually contains more data, it would be good to add. This should only require minor changes the the live view protocol, but possibly significant reverse engineering on each supported camera.
Don't forget what the H stands for.

*

Offline reyalp

  • ******
  • 14080
Re: CHDKPTP - PC Remote Control Performance Analysis
« Reply #332 on: 30 / September / 2012, 17:04:45 »
What would be a good way to test the effectiveness of this?
Try to download a file as soon as shoot() completes. On my D10, this would reliably trigger the FsIoNotify assert. If shoot is completely done with files, then it shouldn't. If you are trying this on your cameras, you should verify the error occurs with the unmodified builds first, of course. VxWorks may not have this problem. If you don't hit the open file limit, you might get incomplete data I guess.

Quote
Furthermore, I wonder whether it is a good idea to always run those event procedures at startup (which I currently do).
I don't know. The register functions have some other side effects (like setting the variable that lets you use hooks, possibly others). Registering eventprocs also takes some memory, normally this shouldn't be a big deal, but there's one that registers all the named levents (UI_RegistDebugEventProc, but it's possible this is called implicitly by others)

That said, if this is shown to work without harmful side effects, the other "hooks" might be quite useful, so it's worth testing.

The last builds I made for stick should be stock 1.1 svn with native calls enabled.

An alternative would be just be to register your own event procs and twiddle the variable. In this case, you might have to register them all, and they might get blown away if the regular registration function was called.
« Last Edit: 30 / September / 2012, 17:06:16 by reyalp »
Don't forget what the H stands for.

*

Offline srsa_4c

  • ******
  • 4451
Re: CHDKPTP - PC Remote Control Performance Analysis
« Reply #333 on: 30 / September / 2012, 17:40:09 »
AFAIK, it's not currently known where this framebuffer is, or even for certain whether it is a separate framebuffer rather than a digital blowup of the normal live view. I think it actually has more detail, but I wouldn't bet too much on that.
I have done some research on the A470 :) on this (many months ago). The regular liveview is 720x240. This feature is known as "AF point zoom" on this camera. The magnified screen portion has a separate buffer with a resolution of 360x121. The data in that buffer is not a simple digitally magnified part of the image, it actually holds more data. To achieve this, the DIGIC has to sample the sensor at a higher resolution than the usual 720x240. No idea what happens on the S90 though. I have found this in a RAM dump.

Try to download a file as soon as shoot() completes.
Now I remember, I have noted this earlier in my "how to prevent..." topic. I was not able to save a memory dump after filewritetask has opened a file for writing.

Quote
That said, if this is shown to work without harmful side effects, the other "hooks" might be quite useful, so it's worth testing.
I'm thinking about using this to disable hooking filewritetask when all filetypes are done. The start of recreview could be also easily detected, as there's an eventproc for that too.
http://pastebin.com/jb27n6pt

Quote
An alternative would be just be to register your own event procs and twiddle the variable. In this case, you might have to register them all, and they might get blown away if the regular registration function was called.
That sounds riskier and requires one to find that variable. I'll keep using System.Create and SS.Create then (this will need to be adjusted to support older - or newer - models).


*

Offline SticK

  • *****
  • 779
Re: CHDKPTP - PC Remote Control Performance Analysis
« Reply #334 on: 30 / September / 2012, 19:09:17 »
reyalp Quote "or even for certain whether it is a separate framebuffer rather than a digital blowup of the normal live view"

srsa Quote "The data in that buffer is not a simple digitally magnified part of the image, it actually holds more data. To achieve this, the DIGIC has to sample the sensor at a higher resolution than the usual 720x240. No idea what happens on the S90 though. "

The frame buffer in the SX110 is 720x240.  For the S90 it's 640x480.  I did a crude empirical exploration of this by imaging tiny screw threads (camera screws).  I set the focus to 10cm on both cameras.  On the CHDKPTP cam I set Viewfinder 1:1 for a 640x480 view.  I could not see the individual threads clearly defined.  On the cam with AF point zoom at 10cm however on its camera LCD, I could see the threads easily and was able to count them.   Thus I would agree that central part of the CCD does get more resolution attention from the electronics.  Given what I could determine eyeball here, I concur for the S90, but there is no way of really concluding that 100% unless it's implemented.
« Last Edit: 30 / September / 2012, 19:11:50 by SticK »

*

Offline reyalp

  • ******
  • 14080
Re: CHDKPTP - PC Remote Control Performance Analysis
« Reply #335 on: 30 / September / 2012, 19:48:17 »
. The regular liveview is 720x240. This feature is known as "AF point zoom" on this camera. The magnified screen portion has a separate buffer with a resolution of 360x121. The data in that buffer is not a simple digitally magnified part of the image, it actually holds more data. To achieve this, the DIGIC has to sample the sensor at a higher resolution than the usual 720x240. No idea what happens on the S90 though. I have found this in a RAM dump.
Good to know. I expected this to be the case, but hadn't confirmed it carefully myself. I wonder if something like this exists for AF even when point zoom is disabled ? I guess maybe they just sample it once in the AF cycle.

Quote
That sounds riskier and requires one to find that variable. I'll keep using System.Create and SS.Create then (this will need to be adjusted to support older - or newer - models).
Agreed, the eventprocs seem simpler if there's no harmful side effects. It would be worth checking free memory before and after registering.
Don't forget what the H stands for.

*

Offline srsa_4c

  • ******
  • 4451
Re: CHDKPTP - PC Remote Control Performance Analysis
« Reply #336 on: 30 / September / 2012, 20:14:06 »
I wonder if something like this exists for AF even when point zoom is disabled ? I guess maybe they just sample it once in the AF cycle.
I believe that the AF mode image data does not necessarily ends up in RAM as image. Due to its nature its pretty hard to create any useful RAM dump to prove this. However, I tried once creating dumps on a DIGIC 4 cam, and found the remains of some different shaped image buffers, I suspect that some of those are related to either AF or AF point zoom.
CCDs have many operating modes, some of those are for AF purposes (usually with a bad vertical resolution). This is based on one of those few CCD datasheets that can be found on the net.
I think that the funny named ChangeImagerTo* eventprocs can change CCD sampling modes, but I wasn't able to run them successfully.

In the A470 case, the AF point zoom buffer's address equals to the first MJVRAM address (these are the movie buffers on DIGIC III+).

*

Offline SticK

  • *****
  • 779
Re: CHDKPTP - PC Remote Control Performance Analysis
« Reply #337 on: 30 / September / 2012, 20:45:27 »
A small piece of added info on AF point zoom on S90 that I think I was able to determine ... with a vernier I measured subject magnification to be 2X over the 640x480 // like having a "background" 1280x1024 view but just cutting out 1/8th the area from its center and then superposing it on 1/4 of the central area of the 640x480 liveview.  Thus my *guess* is that the AF point zoom buffer is 320x240 on the S90 and has an equivalent resolution of 1280x1024.  If true and can be implemented, that would be slick.


*

Offline SticK

  • *****
  • 779
Re: CHDKPTP - PC Remote Control Performance Analysis
« Reply #338 on: 30 / September / 2012, 23:23:01 »
Two CHDKPTP MENU button problems ///

a) We know that CHDK menus don't work from CHDKPTP.  It would be very useful to fix.

b) New (to me).  Canon menu access to first level is OK ... for example if I change a top-level item like "AF frame," the camera keeps working.  But if I go to "Custom Display.." and then MENU back, it returns to the Top level menu ok, but then if I press MENU again to exit I get "error getting frame: ptp error", and it loses the connection.  The camera freezes and the power switch doesn't respond.  The only way to get it back is to disconnect AC adapter.  Can you fix please?

*

Offline srsa_4c

  • ******
  • 4451
Re: CHDKPTP - PC Remote Control Performance Analysis
« Reply #339 on: 01 / October / 2012, 07:55:54 »
b) New (to me).  Canon menu access to first level is OK ... for example if I change a top-level item like "AF frame," the camera keeps working.  But if I go to "Custom Display.." and then MENU back, it returns to the Top level menu ok, but then if I press MENU again to exit I get "error getting frame: ptp error", and it loses the connection.  The camera freezes and the power switch doesn't respond.  The only way to get it back is to disconnect AC adapter.  Can you fix please?
Some questions:
- does the camera always crash when exiting the menu, or only after "visiting" certain parts of it?
- what happened between the powerup and the crash (rec or play mode, any other activities)?
- can you try with the other build (if you used mine, try reyalp's to prove it's not some compiler toolchain related issue)?
But before anything else, please create a romlog (I very much hope that the camera recorded a new one), and note the CHDK build used at the time of the crash.

 

Related Topics