Video refocus (half shutter) for A3300 - CHDK Releases - CHDK Forum supplierdeeply

Video refocus (half shutter) for A3300

  • 19 Replies
  • 6382 Views
Video refocus (half shutter) for A3300
« on: 27 / April / 2013, 05:11:11 »
Advertisements
Hello,

 I really miss this function (see the title). An earlier model, the A2200 already has it. Is there any hope of getting it? If not, why?

Have a great day. :)

*

Offline nafraf

  • *****
  • 1308
Re: Video refocus (half shutter) for A3300
« Reply #1 on: 27 / April / 2013, 09:35:37 »
What is the firmware version of your A3300?

*

Offline srsa_4c

  • ******
  • 4426
Re: Video refocus (half shutter) for A3300
« Reply #2 on: 27 / April / 2013, 09:40:14 »
An earlier model, the A2200 already has it.
Not sure what you mean, it's disabled in the official release.
Quote
Is there any hope of getting it? If not, why?
There is hope, but somebody needs to implement it. In the meantime, try the following script while recording (the script will continue to run in the background if you leave ALT mode to use zoom for example).
Use a CHDK 1.2 release, and enable "Lua native calls" in the miscellaneous menu.

Code: (Lua) [Select]
--[[
@title AF lock test
--]]

function restore()
    call_event_proc("PT_UnlockAF")
end

rec,vid,mode=get_mode()
-- don't run in play mode
if rec~=true then
    error("ERR: not in rec mode!")
end

if (type(call_event_proc) ~= "function" ) then
    error("ERR: native calls are disabled!")
end

if (call_event_proc("SS.Create") == -1) then
    error("ERR: SS.Create failed")
end

while true do
    wait_click(5000)
    if is_pressed("down") then
       call_event_proc("PT_UnlockAF")
    elseif is_pressed("up") then
       call_event_proc("PT_DoAFLock")
    elseif is_pressed("menu") then
        break
    end
end

restore()
Use "up" for AF scan while the script is running (in ALT mode) you can interrupt the script with a full shutter press or the "menu" button.

@nafraf: Do you have an implementation for this?

*

Offline nafraf

  • *****
  • 1308
Re: Video refocus (half shutter) for A3300
« Reply #3 on: 27 / April / 2013, 20:08:14 »
@srsa_4c
I have a patch to a3300, it includes:
  • New MakeAFScan address, current address seems to be wrong
  • movie_rec.c changes to support: CAM_AF_SCAN_DURING_VIDEO_RECORD, CAM_CAN_MUTE_MICROPHONE and CAM_CAN_UNLOCK_OPTICAL_ZOOM_IN_VIDEO
  • New loader implementation
Changes are to 100a and 100d only because 100c seems to be compatible with 100a.  I don't have access to A3300. I can't test it.

Have you tested your AF script on other cameras?
Are you trying to replace MakeAFScan by DoAFLock? It worked on A810 :) http://chdk.setepontos.com/index.php?topic=8450.msg90565#msg90565




*

Offline srsa_4c

  • ******
  • 4426
Re: Video refocus (half shutter) for A3300
« Reply #4 on: 27 / April / 2013, 21:22:43 »
@srsa_4c
I have a patch to a3300, it includes:
  • New MakeAFScan address, current address seems to be wrong
  • movie_rec.c changes to support: CAM_AF_SCAN_DURING_VIDEO_RECORD, CAM_CAN_MUTE_MICROPHONE and CAM_CAN_UNLOCK_OPTICAL_ZOOM_IN_VIDEO
  • New loader implementation
Changes are to 100a and 100d only because 100c seems to be compatible with 100a.  I don't have access to A3300. I can't test it.
Me neither. Can you make a test build for nemerdekel1 ?

Quote
Have you tested your AF script on other cameras?
Only on a few newer DryOS ones, it worked.
Quote
Are you trying to replace MakeAFScan by DoAFLock? It worked on A810 :) http://chdk.setepontos.com/index.php?topic=8450.msg90565#msg90565
I know, it's based funnel's (and your) find.

So, are you saying that you have found a better MakeAFScan replacement that doesn't crash?
The issue with this DoAFLock workaround is that you need to track its state, or AF lock remains active until the next mode change (or manual unlock).

Re: Video refocus (half shutter) for A3300
« Reply #5 on: 28 / April / 2013, 01:52:27 »
Hello,
Thank you for all the replies, my camere has 100c firmware version.
I will test the script and come back to tell you the results.  8)

Re: Video refocus (half shutter) for A3300
« Reply #6 on: 28 / April / 2013, 02:10:45 »
Great, the script is working, and it does exactly what I wanted.

I still got a few questions:
-how do I apply that patch?
-could you include optical zoom in the script? I have one that is .bas and I'm not sure how to 'translate' it to .lua as you see I'm a complete beginner.

Thank you guys again for the reply,
Have a great day.

*

Offline nafraf

  • *****
  • 1308
Re: Video refocus (half shutter) for A3300
« Reply #7 on: 28 / April / 2013, 04:00:25 »
A patched version for A3300 attached.  It is  for 100a, but it should works in 100c too.

Firmware update method does not work in this version, you have to use
bootable sd card method to load CHDK.

New options should appears in Video Parameters menu:
Enable Optical Zoom: Enable [●] / Disable [ ]
Mute During Zooming: Enable [●] / Disable [ ]
AF key [Shutter, Set]


Re: Video refocus (half shutter) for A3300
« Reply #8 on: 28 / April / 2013, 05:12:53 »
It's perfectly working. Thank you very much for this. :D

*

Offline nafraf

  • *****
  • 1308
Re: Video refocus (half shutter) for A3300
« Reply #9 on: 28 / April / 2013, 21:45:39 »
So, are you saying that you have found a better MakeAFScan replacement that doesn't crash?
The issue with this DoAFLock workaround is that you need to track its state, or AF lock remains active until the next mode change (or manual unlock).
No, I only replaced MakeAFScan address by DoAFLock address in stubs_entry_2.S.  Camera does not crash, but I can't tell nothing about AF lock issue (I'll have to test better), my test was: start video recording, optical zoom in, AF, optical zoom out, AF, stop. Camera seems to make AF, but zooming In/Out should be equivalent to manual unlock.

It's perfectly working. Thank you very much for this. :D
OK, I'll submit the patch.  I have the same srsa_4c's question, how did you test AF on A2200 if it is not supported in the official release?
If you want to help with A2200 port, I can send you a patched version for testing.

 

Related Topics