Porting a camera sx530hs - page 25 - DryOS Development - CHDK Forum

Porting a camera sx530hs

  • 300 Replies
  • 150033 Views
*

Offline srsa_4c

  • ******
  • 4451
Re: Porting a camera sx530hs
« Reply #240 on: 12 / June / 2017, 20:38:26 »
Advertisements
I don't have a feel for what is extra long or extra short exposure.  Long=5min?  60?  Short=?
Anything outside of official Canon specs. The Canon manual lists exposure times between 15 seconds and 1/2000 seconds.
Try finding out what you can actually achieve, without the exp_drv_task hook.
You should obviously be using CHDK overrides for that, from the Enhanced photo operations menu (or do the same with script commands).
Quote
Battery temp is not an issue to me.  But camera temp might be.  Not sure what you mean, - not sure how battery temp after heavy use relates to the exp_drv_task . ? .
I was quoting the whole sentence, but only because it mentioned 64 second exposures (which is outside Canon spec). Forget the part about temperature, it's not relevant here.

Please explain why it is rather pointless - it will greatly help me understand what's going on.
The point of hooking exp_drv_task is solely to provide longer (and perhaps shorter) exposures than the ones you can get using the Canon UI. If you can get those out-of-range exposure times without hooking exp_drv_task, then you don't need the exp_drv_task hook.

Re: Porting a camera sx530hs
« Reply #241 on: 13 / June / 2017, 00:03:48 »
As @reyalp mentioned, the sx60hs port implemented "jogdial" using the rotating dial just behind the shutter which rotates left and right in the plane of the lens ( 90 deg to the shutter press and also 90 deg to the mode select dial).  It's convenient for navigating chdk menus. 

*

Offline reyalp

  • ******
  • 14125
Re: Porting a camera sx530hs
« Reply #242 on: 13 / June / 2017, 00:42:45 »
I don't have a feel for what is extra long or extra short exposure.  Long=5min?  60?  Short=?
Anything outside of official Canon specs. The Canon manual lists exposure times between 15 seconds and 1/2000 seconds.
Small clarification:
On many cameras, normal CHDK overrides (without exp_drv) can go beyond the Canon values, up to 64 seconds, and as short as the hardware can manage. The exp_drv_task was originally added to allow > 64 second exposures. Subsequently, some cameras were also found to need it for short exposures. Traditionally, we have used "extra long exposure" to refer to > 64.

tl;dr: Testing whether exp_drv is required, and verifying it works should include > 64 sec.
« Last Edit: 13 / June / 2017, 00:44:44 by reyalp »
Don't forget what the H stands for.

*

Offline reyalp

  • ******
  • 14125
Re: Porting a camera sx530hs
« Reply #243 on: 13 / June / 2017, 00:47:20 »
Cam has rotary dial with different shooting modes associated to each rotary knob detent position.  Two of the knob selections, AUTO and auto-movie-hybrid? are silkscreened Green in color.  This knob is immediately right of the power-On button.
We call this the mode dial. CHDK does not directly interface with it.
Quote
Cam *also* has rotary dial behind the shutter, its plane of rotation is 90 deg from shutter, ie, holding cam normally, you rotate this dial ccw or cw with your right index finger.
This is what we'd call a control dial or control wheel, which could be used for CHDK "jogdial" functionality.
Don't forget what the H stands for.

*

Offline axman

  • ***
  • 145
Re: Porting a camera sx530hs
« Reply #244 on: 13 / June / 2017, 02:06:44 »
@srsa_4c, thank you *very much* for the detailed explanation.  It makes more sense now, why the exp_drv_task hook was where it was, in with capt_seq.

Can you please test extra long (and extra short) exposures, using vanilla, unaltered svn? I had the impression that at least extra long ones are already working.

I build with vanilla src sx530hs, trunk revision_4826. 

tl;dr:  Yes, vanilla src can exceed Canon firmware values on both sides of the range.  Tested Short=.00039, Long=2:00.

So, either way, I can do this;  I made what I had posted previously work with exp_drv_task present, and now I've tested vanilla src with exp_drv_task absent.  Works either way.  Let me know which approach is preferred, I'll work through code_gen.txt, and submit.

Thanks again for the extra words.


test details long/short exposure sx530hs
----------
Short exposure test; 3 shots, same indoor target & lighting

1st = .001 sec
2nd = .00049 sec
3rd = .00039 sec

All tests took pictures, no errors, no CHDK complaints.   Exifprobe data 'ShutterSpeedValue' for the images reports the first and second exposures correctly.

At .00039, the exifprobe data still says = 10.9688 APEX = '0.000498973 sec', even though CHDK-MainMenu -> EnhancedPhotoOps -> Override Tv ->
ShortExposureValue is set at 0.00039
-----------
Long exposure test; 2 shots, outdoors on clear night

1st = 1:30
2nd = 2:00

No errors, no CHDK complaints.  exifprobe says

ShutterSpeedValue           = 1.34218e+08 APEX = '0 sec'

Wow, images are striking; it looks like funny daylight, except you can see stars and a good sized planet, even with no real zoom in effect.  Noise is visible in the "darker" areas of images.  The 2min image is "brighter", and has more noise..

Test images and exifprobe data from above are available if useful.

*

Offline axman

  • ***
  • 145
Re: Porting a camera sx530hs
« Reply #245 on: 13 / June / 2017, 02:10:44 »
As @reyalp mentioned, the sx60hs port implemented "jogdial" using the rotating dial just behind the shutter which rotates left and right in the plane of the lens ( 90 deg to the shutter press and also 90 deg to the mode select dial).  It's convenient for navigating chdk menus.

Cam has rotary dial with different shooting modes associated to each rotary knob detent position.  Two of the knob selections, AUTO and auto-movie-hybrid? are silkscreened Green in color.  This knob is immediately right of the power-On button.
We call this the mode dial. CHDK does not directly interface with it.
Quote
Cam *also* has rotary dial behind the shutter, its plane of rotation is 90 deg from shutter, ie, holding cam normally, you rotate this dial ccw or cw with your right index finger.
This is what we'd call a control dial or control wheel, which could be used for CHDK "jogdial" functionality.

Thanks, guys.  Got it.  Now I know where to look, and kinda what to start looking for, in order to get it to work.

*

Offline axman

  • ***
  • 145
Re: Porting a camera sx530hs
« Reply #246 on: 13 / June / 2017, 17:09:38 »
Test movie_rec

Note - movie_rec was already enabled in vanilla src.  There are zero svn diffs between current src movie_rec.c and my branch.

Canon firmware movie quality setting = 1920x1080.  Create 10sec of video.  Test using CHDK gui+scripts and chdkptp.  10sec video clip is recorded.

ffprobe / ffplay:
  h264 Constrained Baseline (avc1)
  yuvj420p, 1920x1080, 30531 kb/s, 29.97 tbr
mp4 and full ffplay details available if useful.

Play video at full size, it's grainy (but I did nothing at all to improve quality, it was bad light, etc.)  Scale viewing window smaller, and it looks good.

I change Canon setting to VGA.  Record another clip with CHDK script, it's still 1920x1080, so our code is overriding Canon firmware setting?  Must be.  Tried moving the control-dial cw and ccw while recording, seems to have no effect.  Did not go further with poking at addresses while moving control-dial..

Boot cam without CHDK, record a clip, it's 640x480, agreeing with canon firmware setting.

Attached log from vidtst.lua

Related note; liveimage is also re-enabled for this test.  I believe movie_rec relies on liveimage for something, so testing movie_rec also tests that liveimage is returned to vanilla src version?  I think so.

*

Offline axman

  • ***
  • 145
Re: Porting a camera sx530hs
« Reply #247 on: 13 / June / 2017, 17:11:30 »
liveview notes

liveview is present in vanilla src taskhook and code_gen.txt.

In my previous post with tarball, I had commented out liveview to simplify debugging my problem - getting filewrite to work.

liveview is now re-enabled in taskhook and code_gen.txt for my branch.

movie_rec.c contains ref to liveview, and movie_rec is tested, and works.

Also tested chdkptp gui; live view, mode dial = P, all tickboxes ticked.  Live display looks ok, updates ok;  Rec, play, shoot, Mode controls all work, changes reflected in camera osd and in gui's live view.

If there's anything specific needing testing, just let me know.

*

Offline axman

  • ***
  • 145
Re: Porting a camera sx530hs
« Reply #248 on: 13 / June / 2017, 17:14:06 »
about the control-dial behind the shutter and this port's JogDial code;

Camera's manual only refers to that dial in two contexts:

1) Navigate Canon menu from tab to tab, but not selections within a tab.

2) Adjusting the Constant Face Display Size between 4 values, selected via canon osd if automatic zoom enabled.

My version of the current port has this code enabled.  Booting my version and using this control-dial:

In canon menus:
  Control-dial moves selection tab to tab, can be rotated cw or ccw.
  Does not move selections up and down.  Rear donut does that.

In CHDK menus it has no effect during play, rec, Movie Rec.  Other modes not tested.

I suppose the intent with this jogdial code was;  make the Canon control-dial switch between Canon video quality (compression?) modes.  While a nice to have feature, I don't have enough skill yet to complete such a mod on my own.  I'm more interested at the moment to see how all the CHDK pieces fit together - in different cameras of the same arch.

In any case, jogdial code is enabled in my version.  Happy to remove it or not, and make a proper boot.c (in either config.)  Let me know.

*

Offline axman

  • ***
  • 145
Re: Porting a camera sx530hs
« Reply #249 on: 13 / June / 2017, 17:16:30 »
filewrite notes

Zero svn diffs between vanilla src filewrite_hdr.c and my branch.

Svn src does not contain a filewrite.c for this cam/fw.

Construction model was ixus160.  Funcs fall mostly at same markers, with different addrs.  Someone familiar with ixus160 firmware and its generated filewrite.c would be able to look at this sx530hs version and see how it lines up with similar ixus160 markers.  This filewrite is not a copy and paste of ixus160.

Tested as previously mentioned, chdkptp remoteshoot -jpg -shots=1 works.

code-gen.exe generates the attached filewrite.c when using my code_gen.txt.  I can post a code_gen.txt that will generate filewrite.c with or without the other funcs (jogdial, exp_drv_task) if desired.

Please let me know if I should test other chdkptp funcs/aspects.

filewrite.c attached

 

Related Topics


SimplePortal © 2008-2014, SimplePortal