HDR video experiments - page 2 - General Discussion and Assistance - CHDK Forum

HDR video experiments

  • 23 Replies
  • 6730 Views
Re: HDR video experiments
« Reply #10 on: 18 / March / 2012, 12:23:29 »
Advertisements
For me this code works without crashing

and for me with the S95.

certainly far simpler code as the stubs are already defined.
maybe the occasional frame is not overriden or maybe it is just a VirtualDub error reading directly from the movie on the card (on this old PC).

« Last Edit: 20 / March / 2012, 21:11:44 by Microfunguy »

Re: HDR video experiments
« Reply #11 on: 20 / March / 2012, 21:13:08 »
@funnel

Have you tried overriding ISO yet ?

On the S95,  _SetCDSGain() does not seem to exist.
Will continue to search.

*

Offline funnel

  • ****
  • 349
Re: HDR video experiments
« Reply #12 on: 21 / March / 2012, 05:29:59 »
Yes. I tried to change the iso with cds_gain and works but after every recording I have to restart the camera because the ISO gets stuck. I tried almost every AE function I could find but one that restores the original AE.


cds_gain for s95 100h is located here

Code: [Select]
ROM:FF34B700 dword_FF34B700  DCD 0xC0F13100          ; DATA XREF: sub_FF34B3FC+108r
ROM:FF34B700                                         ; sub_FF34B688+4r
ROM:FF34B704 dword_FF34B704  DCD 0xC0F13128          ; DATA XREF: sub_FF34B688+10r
ROM:FF34B708 dword_FF34B708  DCD 0xC0F13140          ; DATA XREF: sub_FF34B688+1Cr
ROM:FF34B70C aForlife_c      DCB "ForLife.c",0       ; DATA XREF: sub_FF34B6B4+Co
ROM:FF34B716                 DCB    0
ROM:FF34B717                 DCB    0
ROM:FF34B718
ROM:FF34B718 ; --------------- S U B R O U T I N E ---------------------------------------
ROM:FF34B718
ROM:FF34B718
ROM:FF34B718 sub_FF34B718                            ; CODE XREF: ROM:FF34B78Cp
ROM:FF34B718                                         ; ROM:FF34B7FCj
ROM:FF34B718                 STMFD   SP!, {R4,LR}
ROM:FF34B71C                 MOV     R4, R0,LSL#16
ROM:FF34B720                 MOV     R4, R4,LSR#16
ROM:FF34B724                 MOV     R1, R4
ROM:FF34B728                 ADR     R0, unk_FF34B918
ROM:FF34B72C                 BL      sub_FF1479AC
ROM:FF34B730                 MOV     R0, R4
ROM:FF34B734                 LDMFD   SP!, {R4,LR}
ROM:FF34B738                 B       sub_FF0F3FA8
ROM:FF34B738 ; End of function sub_FF34B718
« Last Edit: 21 / March / 2012, 05:52:04 by funnel »

Re: HDR video experiments
« Reply #13 on: 21 / March / 2012, 08:52:30 »
cds_gain for s95 100h is located here

I do not think so.

Do you mean 0xFFB5B718 ?

Did you find out if the required value is a 10-bit programmable-gain amplifier setting with 800 ISO maximum ?

Also, for current ISO setting, is it possible to get the current gain value ?


*

Offline funnel

  • ****
  • 349
Re: HDR video experiments
« Reply #14 on: 21 / March / 2012, 11:29:54 »
Do you mean 0xFFB5B718 ?
Yes, I have a wrong rom start address in ida.

Quote
Did you find out if the required value is a 10-bit programmable-gain amplifier setting with 800 ISO maximum ?
On my camera I can go up to 768.

Quote
Also, for current ISO setting, is it possible to get the current gain value ?
Yes. Look at the functions around the setcdsgain function to find a ram address. From the s95 100h dump I have is probably 0x57b4.

Re: HDR video experiments
« Reply #15 on: 21 / March / 2012, 13:11:41 »


I'd just like to share some HDR video experiments I was doing in the last few days.

I

It would be very interesting to compare this video with the one taken normally ( with no HDR) .

Re: HDR video experiments
« Reply #16 on: 22 / March / 2012, 18:44:30 »
@funnel

have not managed to override ISO yet.

With A570 100E, are you using the function 0xFFE05694 (->0xFFE056B4 -> 0xFFD60CE4) ?
CDS gain value at 0x6374 ?

On my S95 100K, similar sequence at 0xFFB60E50 -> 0xFFB5B740 -> 0xFF903FA8 and cds gain value at 0x57B4.
0xFFB60E50 has no effect on exposure with any value, 0xFFB5B740 overexposes with any value including zero.

Any ideas ?

*

Offline srsa_4c

  • ******
  • 4106
Re: HDR video experiments
« Reply #17 on: 23 / March / 2012, 00:17:30 »
On my S95 100K, similar sequence at 0xFFB60E50 -> 0xFFB5B740 -> 0xFF903FA8 and cds gain value at 0x57B4.
0xFFB60E50 has no effect on exposure with any value, 0xFFB5B740 overexposes with any value including zero.

Any ideas ?

Code: [Select]
ffb60e50: e59f005c ldr r0, [pc, #92] ; ffb60eb4: (00105070)
ffb60e54: e5900004 ldr r0, [r0, #4]
ffb60e58: eaffea38 b ffb5b740
As you can see, this function has no parameters. It loads the value stored at the address 0x105070+4 and calls sub_ffb5b740 with that. The value is a halfword (16 bits). (No, I'm not currently experimenting with this, just a bit of help.)
Code: [Select]
ffb5b740: e92d4010 push {r4, lr}
ffb5b744: e1a04800 lsl r4, r0, #16
ffb5b748: e1a04824 lsr r4, r4, #16
ffb5b74c: e1a01004 mov r1, r4
ffb5b750: e28f0f7a add r0, pc, #488 ; ffb5b940: (50746553)  *"SetPgaGain %d"
ffb5b754: ebf7f094 bl ff9579ac
ffb5b758: e1a00004 mov r0, r4
ffb5b75c: e8bd4010 pop {r4, lr}
ffb5b760: eaf6a210 b ff903fa8


Re: HDR video experiments
« Reply #18 on: 23 / March / 2012, 07:20:26 »
I'm not currently experimenting with this, just a bit of help.

Yes, thanks.

I need to become more familiar with ARM assembler.

EDIT

Writing a short to 0x105070+4 and calling 0xFFB5B740 with no parameters does indeed change exposure.

The value in 0x105070+4 is normally zero so maybe this is a delta-ISO function.
« Last Edit: 23 / March / 2012, 08:42:52 by Microfunguy »

Re: HDR video experiments
« Reply #19 on: 27 / March / 2012, 17:39:47 »

In the future I'll also add the formula to calculate the ISO for a correct exposure.

Have you done any more with this ?

On your A570, where did you monitor the override ISO value ?
Also, where did you monitor the actual gain value ?

On the S95 the value in 0x105070+4 is always '0' until I change it.

ISO override does not seem to be working as expected, shutter-speed override is fine.


 

Related Topics