SX60HS Porting - page 49 - DryOS Development - CHDK Forum supplierdeeply

SX60HS Porting

  • 915 Replies
  • 297820 Views
Re: SX60HS Porting
« Reply #480 on: 13 / August / 2016, 13:50:03 »
Advertisements
Thanks.  I'm able to use these procs now.

e.g.
con 12> =return call_event_proc('LiveImageTool.ChangeDzoom',4)
13:return:0
Changes zoom instantaneously.

Re: SX60HS Porting-chdkptp-liveview
« Reply #481 on: 13 / August / 2016, 14:57:41 »
Hi, back to using the live_view hack for chdkptp. In REC mode this works well,
in PLAY mode I seem to have a mismatch between the UI layer and the image playback layer?  See attached...


Edit: the mismatch is corrected by eliminating the special case for play mode in live_view.c
« Last Edit: 13 / August / 2016, 15:12:29 by 62ndidiot »

Re: SX60HS Porting
« Reply #482 on: 07 / September / 2016, 19:26:48 »
Posting a diff with r4682 for @reyalp to commit. Supports Live View.
Will rebuild distributions again and update links once committed.

Re: SX60HS Porting
« Reply #483 on: 07 / September / 2016, 23:29:45 »
Posting a diff with r4682 for @reyalp to commit. Supports Live View.
Will rebuild distributions again and update links once committed.
Nice !   FWIW,  patches to the main trunk are usually posted here :
Adding new cameras, applying patches into trunk (with source code prepared)

Makes it a bit easier to keep track of changes.
« Last Edit: 07 / September / 2016, 23:31:16 by waterwingz »
Ported :   A1200    SD940   G10    Powershot N    G16


*

Offline reyalp

  • ******
  • 13621
Re: SX60HS Porting
« Reply #484 on: 08 / September / 2016, 00:56:48 »
Posting a diff with r4682 for @reyalp to commit. Supports Live View.
Will rebuild distributions again and update links once committed.
Thanks, checked in. One comment regarding the vid_*_offset functions.

Since we are currently making CHDK dimensions equal to real dimensions for D6, the _proper variants should not be *2.  This may mean that the vp_xo values need to be changed, but I suspect the current values are not right anyway, because Y uses the same offset array as X.

You should be able to check these in PTP live view: If you change the image aspect ratio (probably only available with canon RAW disabled) the letterboxing in the chdkptp display should match the camera screen.

viewport_yoffset is used when the letter box image is offset from the normal start of the buffer. Cameras like the G7X always put the image in the top left of the buffer, so these are 0.

viewport_display_*offset is used when the image is offset on the screen while the buffer address is unchanged.

These are all fairly cosmetic, but if they aren't implemented, they should just return 0.
Don't forget what the H stands for.

Re: SX60HS Porting
« Reply #485 on: 08 / September / 2016, 14:50:32 »
New versions are available. These include support for Live View using the latest test version of CHDKPTP (by reyalp), and  motion detection.
CHDKPTP details can be found here:
https://chdk.setepontos.com/index.php?topic=6231.msg129812#msg129812

100b is here:
https://chdk.setepontos.com/index.php?topic=12532.msg128722#msg128722
 

100f is here:
https://chdk.setepontos.com/index.php?topic=12532.msg128721#msg128721

Re: SX60HS Porting
« Reply #486 on: 09 / September / 2016, 21:02:43 »
@reyalp wrote:
Quote
You should be able to check these in PTP live view: If you change the image aspect ratio (probably only available with canon RAW disabled) the letterboxing in the chdkptp display should match the camera screen.

Yes I see that I have a problem, I changed the still capture mode to 1x1 and the screen in LiveView misbehaves. See attached


*

Offline reyalp

  • ******
  • 13621
Re: SX60HS Porting
« Reply #487 on: 09 / September / 2016, 22:51:46 »
Yes I see that I have a problem, I changed the still capture mode to 1x1 and the screen in LiveView misbehaves. See attached
Yup. I would make all the *offset return 0, and then work out the correct values.

For example: In 1:1 width and height are 480, physical width is 640, so x offset should be (640 - 480)/2 and y offset should be 0. Probably only the _display offsets are needed.

G7X should be a good starting point, but values will be slightly different since the G7X native aspect ratio is 3:2 while sx60 is 4:3
Don't forget what the H stands for.


Re: SX60HS Porting
« Reply #488 on: 09 / September / 2016, 23:21:13 »
Thx.  Would you say the X offset is correct in the above 1x1 example? ( y is obvious but X may be hidden) I think in my code it was 40.  But I agree it should be 80.
(640-480)/2

I may have other problems which affect this so I will go thru each aspect ratio and figure it out.

Re: SX60HS Porting
« Reply #489 on: 10 / September / 2016, 12:16:56 »
Sx60 still image aspect ratio

16:9 3:2 4:3 1:1 4:5

4:5 gives a black screen because the array vp_xo is only dimensioned to 4...

Edit:
I've fixed all the still modes...
video modes work if I override with zero for offsets, but it seems like I am not
detecting is_video_recording or mode_video correctly.  I modified platform_camera.h to  have     #define CAM_IS_VID_REC_WORKS 1
but still not detecting it.

Edit: I see: simple movie status must be implemented...i think i know a likely memory location.





 
« Last Edit: 10 / September / 2016, 15:46:24 by 62ndidiot »

 

Related Topics