testing sync among more cameras - page 4 - General Discussion and Assistance - CHDK Forum  

testing sync among more cameras

  • 121 Replies
  • 55759 Views
Re: testing sync among more cameras
« Reply #30 on: 23 / October / 2012, 20:06:18 »
Advertisements
If you can provide a CHDK S95 100H build I know someone who can test that, but the synch is fine on that camera.

By 'choice', SDM users do not have any of the problem cameras as far as I know.

The SX230HS user swapped them for S95's.

The only other 2011 and 2012 cameras I have access to are S100 and A810.

The A810 synch is excellent !

I will ask the S100 user if he is able to test synch.


Re: testing sync among more cameras
« Reply #31 on: 23 / October / 2012, 20:17:30 »
If you can provide a CHDK S95 100H build I know someone who can test that, but the synch is fine on that camera.
As I understand the current definition of "sync",   it's done as the average difference between two cameras over many exposures.   Good sync essentially means the statistical standard deviation is fairly small and the average is close to zero.   So it seems possible that if vnd is on to something here,  you might still get good sync but a much tighter statistical standard deviation with the S95's ?

Ported :   A1200    SD940   G10    Powershot N    G16

Re: testing sync among more cameras
« Reply #32 on: 23 / October / 2012, 20:44:23 »
We express the results as a median value.
50% of shots will be as good or better than that value, 50% will not.

Presumably as a consequence of the nature of multi-tasking (tasks having to yield at random times), most results have sub-millisecond error whilst the rogue shots are many milliseconds in error.

There is not a continuum of errors.

Re: testing sync among more cameras
« Reply #33 on: 23 / October / 2012, 21:11:29 »
We express the results as a median value.
50% of shots will be as good or better than that value, 50% will not.
A statistically valid observation and quite useful.  The mean and standard deviations can also be derived from the same data set and quite frankly,  it's probably the standard deviation that is more interesting in determining sync "quality".

Quote
Presumably as a consequence of the nature of multi-tasking (tasks having to yield at random times), most results have sub-millisecond error whilst the rogue shots are many milliseconds in error.
Agreed.   So if vnd has found a way to get closer to the point at which the shutter releases, then these errors will go down and your variance (s.d. ** 2)  will decrease.


Quote
There is not a continuum of errors.
Not sure what you meant by this.
Ported :   A1200    SD940   G10    Powershot N    G16


*

Offline philmoz

  • *****
  • 3450
    • Photos
Re: testing sync among more cameras
« Reply #34 on: 24 / October / 2012, 03:39:11 »
And it seems that it is possible to move the wait_until_remote_button_is_released() call directly to taskCreateHook. For S95 100h the code looks like this:

Code: [Select]
void taskCreateHook(int *p)
{
        p-=17;

        if (p[0] == 0xFF88322C)
                p[0] = (int) capt_seq_task;

        if (p[0] == 0xFF98642C)
                p[0] = (int) movie_record_task;

        if (p[0] == 0xFF8A0AA0)
                p[0] = (int) init_file_modules_task;

        if (p[0] == 0xFF8CF1A8)
                p[0] = (int) exp_drv_task;

        if (p[0] == 0xFF865894)
                p[0] = (int) JogDial_task_my;

        if (strcmp((char *) p[6], "TgTask") == 0)
                _wait_until_remote_button_is_released();
}

At the moment I can't test it with CRT, so I don't know how it helps with sync.


Not sure how safe this would be.

AFAIK the taskCreateHook function is called in the firmware IRQ handler which is tied to the 10ms clock.

So you could potentially be blocking the IRQ handler until the remote was released.

Phil.
CHDK ports:
  sx30is (1.00c, 1.00h, 1.00l, 1.00n & 1.00p)
  g12 (1.00c, 1.00e, 1.00f & 1.00g)
  sx130is (1.01d & 1.01f)
  ixus310hs (1.00a & 1.01a)
  sx40hs (1.00d, 1.00g & 1.00i)
  g1x (1.00e, 1.00f & 1.00g)
  g5x (1.00c, 1.01a, 1.01b)
  g7x2 (1.01a, 1.01b, 1.10b)

*

Offline vnd

  • *
  • 36
Re: testing sync among more cameras
« Reply #35 on: 24 / October / 2012, 05:02:33 »
The code above is not completely correct. wait_until_remote_button_is_released is sometimes called too early. So TgTask is not created there but runs all the time.

It will need another condition to make sure wait_until_remote_button_is_released is called _after_ the point in CaptSeqTask.

Not sure how safe this would be.

AFAIK the taskCreateHook function is called in the firmware IRQ handler which is tied to the 10ms clock.

So you could potentially be blocking the IRQ handler until the remote was released.

I guess that this particular context switch is triggered by some event or semaphore - outside of IRQ handler. According to the log it is not aligned to 10ms.

Re: testing sync among more cameras
« Reply #36 on: 24 / October / 2012, 06:45:05 »
Not sure what you meant by this.


Most errors are very small and of similar value.
The rest are 'outliers' with far greater values.

*

Offline vnd

  • *
  • 36
Re: testing sync among more cameras
« Reply #37 on: 24 / October / 2012, 16:33:08 »
Here is a patch that contains both task logging and sync code for s95 100h. Most of the code is in boot.c file for now. The logging code is disabled in main.c because it crashed the camera several times, probably on  write().

The sync code seems to work relatively well:
- get_usb_bit works (so the IRQ handler works too if it depends on it as was mentioned earlier in this thread)
- get_tick_count value is not updated, so the max pulse length test does not work and the camera crashes after 20s or so





Re: testing sync among more cameras
« Reply #38 on: 24 / October / 2012, 16:38:17 »
Here is a patch

I do not work with CHDK builds at all on my system.
I have never downloaded  the files.
I have no idea if it would cause lots of compilation problems that I do not have time to get into right now.

The S100 user does have a crt monitor .. somewhere .. if it is still working.

If so, he will test synch.

*

Offline vnd

  • *
  • 36
Re: testing sync among more cameras
« Reply #39 on: 25 / October / 2012, 05:25:47 »
I have found a CRT monitor and tested it quickly. The results seem to be the same as before - 80% of shots is under 1ms, 20% is around 4 ms.
The next step will be checking if the logs can show what happens there.

 

Related Topics