CHDKPTP: S90 Primary Focal Plane Configuration - hacking out the CCD - page 41 - Creative Uses of CHDK - CHDK Forum

CHDKPTP: S90 Primary Focal Plane Configuration - hacking out the CCD

  • 704 Replies
  • 140829 Views
*

Offline SticK

  • *****
  • 779
Re: CHDKPTP: S90 Primary Focal Plane Configuration - hacking out the CCD
« Reply #400 on: 02 / March / 2013, 23:28:34 »
Advertisements
QUESTION ......

re: DIGITAL ZOOM

These are from propcase4.  When I set the Canon menu to the 4 possible states, digital zoom works as expected,  and if I get (read) the propcases, everything agrees with the table.
Code: [Select]
                             --  OFF   Standard    1.4X    2.3X
  DIGITAL_ZOOM_MODE=91,      --   0       0         1       3
  DIGITAL_ZOOM_STATE=94,     --   0       1         1       1
  DIGITAL_ZOOM_POSITION=95,  --   0       0         1       3
However, if I try to this programmatically by setting propcases, they do set correctly if I read them, but, the live zoom remains unchanged.  It's as though there must be some other call that needs to be made to activate the settings once the propcases have been set.

Does anyone know?

*

Offline reyalp

  • ******
  • 13840
Re: CHDKPTP: S90 Primary Focal Plane Configuration - hacking out the CCD
« Reply #401 on: 02 / March / 2013, 23:38:57 »
It's as though there must be some other call that needs to be made to activate the settings once the propcases have been set.
I very much doubt there's some extra step that lets you control digital zoom using the propcases. Many propcases work like this, they are effectively read-only even though you can set arbitrary values in them. Some other function is needed to change the state, and that function also updates the propcase values.

You can send presses to the zoom keys to control zoom.

On my a540, the following seems to control digital zoom:
Code: [Select]
con 2> =return call_event_proc('RegisterShootSeqEvent')
3:return:0
con 3> =return call_event_proc('MoveDigitalZoomToTele')
4:return:0
con 4> =return call_event_proc('MoveDigitalZoomToWide')
5:return:0
The registration function may be different on later cameras.

edit:
"MoveDigitalZoomAt" also exists, as does "StopDigitalZoom"
I haven't tried them.

On D10, the following seem to be equivalent (edit: and the a540 ones don't exist):
Code: [Select]
con 4> =return call_event_proc('SS.Create')
5:return:0
con 5> =return call_event_proc('PT_MoveDigitalZoomToTele')
6:return:0
con 6> =return call_event_proc('PT_MoveDigitalZoomToWide')
7:return:0

edit:
to set a specific digital zoom step,
Code: [Select]
con 9> =return call_event_proc('PT_MoveDigitalZoomAt',2)
« Last Edit: 02 / March / 2013, 23:48:35 by reyalp »
Don't forget what the H stands for.

*

Offline SticK

  • *****
  • 779
Re: CHDKPTP: S90 Primary Focal Plane Configuration - hacking out the CCD
« Reply #402 on: 02 / March / 2013, 23:56:07 »
Some other function is needed to change the state, and that function also updates the propcase values.
Sort of what I meant ... On your D10, can you set the 1.4X, 2.3X and OFF states with the functions you suggest, for example, is there a "PT_MoveDigitalZoomToMid"?  ... it's a guess.

FYI, setting the propcase for QUALITY *does* activate it too, so some of these it seems might work, but not this one. 

edit:
your edit seems to answer the above ... I'll try it.
« Last Edit: 02 / March / 2013, 23:57:40 by SticK »

*

Offline SticK

  • *****
  • 779
Re: CHDKPTP: S90 Primary Focal Plane Configuration - hacking out the CCD
« Reply #403 on: 03 / March / 2013, 00:03:18 »
For your ......
Code: [Select]
=return call_event_proc('PT_MoveDigitalZoomAt',x)I tried 0, 1, and 3 which are the valid values for the S90, but no effect unfortunately.  I even put it in 2.3X manually and then made the call with 0, and no effect.

edit:  very nice!  it works ... I just didn't do the SS.Create earlier.
« Last Edit: 03 / March / 2013, 00:11:53 by SticK »


*

Offline SticK

  • *****
  • 779
Re: CHDKPTP: S90 Primary Focal Plane Configuration - hacking out the CCD
« Reply #404 on: 03 / March / 2013, 11:00:27 »
Questions about SS.Create usage ...

Does the call use up memory?  How much approximately if known?  Is an instance of SS created at each call if called in series?  that is ... are repeated calls to SS.Create benign, or does memory pile up, and previous SS creations remain unused, only the latest gets used for a subsequent PT_MoveDigitalZoomAt? 

Can SS.Create be called just once after camera PUP, camera operated, and much later, a call to PT_MoveDigitalZoomAt be made, or do the two calls have to be successive?  What is the general rule for Create calls?


*

Offline reyalp

  • ******
  • 13840
Re: CHDKPTP: S90 Primary Focal Plane Configuration - hacking out the CCD
« Reply #405 on: 03 / March / 2013, 15:55:24 »
Questions about SS.Create usage ...

Does the call use up memory?
You can find out yourself:
Code: [Select]
con> =return get_meminfo('sys')
1:return:table:{start_address=1477936,chdk_start=2580648,free_size=359216,chdk_size=139620,allocated_size=1241424,free_block_count=38,allocated_count=1337,name="sys",end_address=3089568,chdk_malloc=false,free_block_max_size=355200,allocated_peak=1244896,total_size=1611632,}
con 1> =return call_event_proc('SS.Create')
2:return:0
con 2> =return get_meminfo('sys')
3:return:table:{start_address=1477936,chdk_start=2580648,free_size=356872,chdk_size=139620,allocated_size=1243088,free_block_count=43,allocated_count=1417,name="sys",end_address=3089568,chdk_malloc=false,free_block_max_size=352664,allocated_peak=1246752,total_size=1611632,}
before:
free_size=359216
after:
free_size=356872
so about 2.3 kb (on my cameras, YMMV)
Quote
Is an instance of SS created at each call if called in series?
I haven't checked if each call uses more memory (I would guess no), but see below...
Quote
Can SS.Create be called just once after camera PUP
Yes. SS.Create just registers the other functions, so only needs to be called once after boot. This is true of anything I call a "registration function". They are typically named like Foo.Create (on newer cameras) or RegisterBlahBlah
Don't forget what the H stands for.

*

Offline SticK

  • *****
  • 779
Re: CHDKPTP: S90 Primary Focal Plane Configuration - hacking out the CCD
« Reply #406 on: 13 / April / 2013, 11:13:20 »
@srsa_4c

Everything is working well so far, including your latest ISOfix.  CCD cooling mechanics should be ready in several weeks.  So far I've tested the chip down to -24C in a test chamber and all's fine: dark noise is eliminated and hot pixels are all gone right up to 32s exposure, w/o dark subtract!

In my tests, I noticed that there seems to be a vignetting correction.  With CCD out now, both neutral JPEG photo (left panel) and RAW dark noise stretched (right panel) appear to have corners and central zone gained up resulting in a darker donut in image center instead of a uniform intensity suggests that this feature is not pattern-related to the shot scene.  I am wondering if this hardwired, part of CCD itself, or there is anti-vignetting code that could be switched OFF like you did with "distcorr."  Could you please look at the FW possibility ?

The latest build for the 101a I am using is this:
https://subversion.assembla.com/svn/chdk-s1.bin/files/s90-101a-1.1.0_2592_disableisdriveerror_nodistcorr_no_startup_lens_check_isofix_trial.zip
« Last Edit: 13 / April / 2013, 11:28:27 by SticK »

*

Offline srsa_4c

  • ******
  • 4450
Re: CHDKPTP: S90 Primary Focal Plane Configuration - hacking out the CCD
« Reply #407 on: 13 / April / 2013, 15:24:24 »
In my tests, I noticed that there seems to be a vignetting correction.  With CCD out now, both neutral JPEG photo (left panel) and RAW dark noise stretched (right panel) appear to have corners and central zone gained up resulting in a darker donut in image center instead of a uniform intensity suggests that this feature is not pattern-related to the shot scene.  I am wondering if this hardwired, part of CCD itself,
I very much doubt it.
Quote
or there is anti-vignetting code that could be switched OFF like you did with "distcorr."  Could you please look at the FW possibility ?
I don't have time for a lengthy research right now.
Recent DIGICs (4, 5) seem to include a "unit" that does this kind of correction.
It's probably the one that is mentioned in the following thread of the Magic Lantern forum:
http://www.magiclantern.fm/forum/index.php?topic=4598.0
I haven't been able to find a direct reference to those addresses (0xC0F08578, 0xC0F0857C) in the S90 firmware, and they would be less useful anyway (they are live view related).

You could try to take dark pictures with the other S90 at wide angle and at tele, and compare the results. You could also compare native and CHDK RAW (DNG).


Some strings that sound suspicious:
Code: [Select]
ff9313c0 DarkShdInteg.c
ff931b18 DarkShadingMan.c

ffb02254 MULTISHDAREAINFO
ffb02268 HIVSHD_MULTIVALUE

fff30000 HIVSHD_V_PARAM_WIDE_C
fff33000 HIVSHD_V_PARAM_WIDE_1
fff36000 HIVSHD_V_PARAM_WIDE_2
fff39000 HIVSHD_V_PARAM_M1_C
fff3c000 HIVSHD_V_PARAM_M1_1
fff3f000 HIVSHD_V_PARAM_M1_2
fff42000 HIVSHD_V_PARAM_M2_C
fff45000 HIVSHD_V_PARAM_M2_1
fff48000 HIVSHD_V_PARAM_M2_2
fff4b000 HIVSHD_V_PARAM_M3_1
fff4e000 HIVSHD_V_PARAM_M3_2
fff51000 HIVSHD_HS_V_PARAM_WIDE_C
fff52800 HIVSHD_HS_V_PARAM_WIDE_1
fff54000 HIVSHD_HS_V_PARAM_WIDE_2
fff55800 HIVSHD_HS_V_PARAM_M1_C
fff57000 HIVSHD_HS_V_PARAM_M1_1
fff58800 HIVSHD_HS_V_PARAM_M1_2
fff5a000 HIVSHD_HS_V_PARAM_M2_C
fff5b800 HIVSHD_HS_V_PARAM_M2_1
fff5d000 HIVSHD_HS_V_PARAM_M2_2
fff5e800 HIVSHD_HS_V_PARAM_M3_1
fff60000 HIVSHD_HS_V_PARAM_M3_2
fff61800 HIVSHD_IR1_PARAM_WIDE
fff61a00 HIVSHD_IR2_PARAM_WIDE
fff61c00 HIVSHD_IR1_PARAM_M1
fff61e00 HIVSHD_IR2_PARAM_M1
fff62000 HIVSHD_IR1_PARAM_M2
fff62200 HIVSHD_IR2_PARAM_M2
fff62400 HIVSHD_IR1_PARAM_NONE
fff62600 HIVSHD_IR2_PARAM_NONE
fff62800 HIVSHD_HS_IR1_PARAM_WIDE
fff62900 HIVSHD_HS_IR2_PARAM_WIDE
fff62a00 HIVSHD_HS_IR1_PARAM_M1
fff62b00 HIVSHD_HS_IR2_PARAM_M1
fff62c00 HIVSHD_HS_IR1_PARAM_M2
fff62d00 HIVSHD_HS_IR2_PARAM_M2
fff62e00 HIVSHD_HS_IR1_PARAM_NONE
fff62f00 HIVSHD_HS_IR2_PARAM_NONE
fff63000 HIVSHD_V_PARAM_WIDE_2_ADJ
« Last Edit: 13 / April / 2013, 15:48:02 by srsa_4c »


*

Offline SticK

  • *****
  • 779
Re: CHDKPTP: S90 Primary Focal Plane Configuration - hacking out the CCD
« Reply #408 on: 13 / April / 2013, 17:08:30 »
Recent DIGICs (4, 5) seem to include a "unit" that does this kind of correction.
The S90 is Digic4.  Would the "unit" relevant, relevant to the literals?  The literals seem to make sense, ballpark.
Quote
You could try to take dark pictures with the other S90 at wide angle and at tele, and compare the results. You could also compare native and CHDK RAW (DNG).
Good idea ... that should validate.

*

Offline SticK

  • *****
  • 779
Re: CHDKPTP: S90 Primary Focal Plane Configuration - hacking out the CCD
« Reply #409 on: 14 / April / 2013, 10:49:02 »
ANTI-VIGNETTING ANALYSIS

All shots are 1/125th ISO100 taken in complete darkness, ie noise only, and tone-curved up so that average brightness is the same for all six images.  Analysis was done in RAWTherapee 4.

Figure 1 is the S90_100c STANDARD CAMERA, matrix of DNG & CR2, WIDE and TELE modes.  DNG WIDE shows a central gained-up disk.  DNG TELE is essentially uniform, the expected behavior if CANON FW is involved for anti-vignetting (not a hardware problem).  However, unlike Fig 2, the WIDE CR2 does not show any obvious gain manipulation.  Comparing to Figure 2 which makes sense, I don't yet know why that is.

Figure 2 is S90_101a IMAGER CAMERA where only WIDE is possible.  Here gain alteration is consistent between the DNG and CR2.

My guess is that gain alteration (dark shading ?) is introduced probably in the same area where dark subtract and distcorr takes place, and is sensitive to ZOOM.  Also worthwhile pointing out that when going from WIDE to TELE, overall image gain is greatly increased.  This is expected because it keeps user-perceived brightness the same during zoom to counteract effective aperture reduction.

Can you give me your thoughts on this?  On the 101a, I do notice the effect in liveview as well.  I am wondering if it could be disabled.

« Last Edit: 14 / April / 2013, 10:58:24 by SticK »

 

Related Topics