SX60HS Porting - page 50 - DryOS Development - CHDK Forum  

SX60HS Porting

  • 915 Replies
  • 297824 Views
*

Offline reyalp

  • ******
  • 13621
Re: SX60HS Porting
« Reply #490 on: 10 / September / 2016, 14:33:14 »
Advertisements
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...
You need to re-write that code to match what your camera actually does, I don't where the code that's there now came from and I wouldn't bother trying to make sense of it.

Look at the PROPCASE_ASPECT_RATIO values, and make vp_xo and vp_yo with the appropriate values. I think your current code is missing vp_yo completely. May sure the _proper functions return the same value as the others, no 2x.

Quote
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
Yes. In pre digic 6 ports, the "CHDK" sizes were half the real width. In digic 6, we have been using real widths (this may change but I received no feedback on https://chdk.setepontos.com/index.php?topic=12788.msg129512#msg129512)
Don't forget what the H stands for.

Re: SX60HS Porting
« Reply #491 on: 11 / September / 2016, 16:54:20 »
I've fixed lib.c to properly deal with offsets (no factors of two) in REC and Video modes. But I've noticed a problem;

1. camera start up connected to USB, connect gui chdkptp, I get
this
2. enter REC mode, test VIDEO, everything is good
3. reenter PLAY, I only have the UI overlay

 
I've tried reupdating svn live_view.c and .h
I've tried going back to my original lib.c (which I don't think had this problem)
I'm confused.
« Last Edit: 11 / September / 2016, 16:57:30 by 62ndidiot »

*

Offline Ant

  • ****
  • 497
Re: SX60HS Porting
« Reply #492 on: 11 / September / 2016, 17:00:21 »
There are more than one playback framebuffer. But we can't detect actual yet...
I've found pointer to actual playback framebuffer in RAM dump up to 15 times, but it's not enough.
« Last Edit: 11 / September / 2016, 17:12:27 by Ant »

*

Offline reyalp

  • ******
  • 13621
Re: SX60HS Porting
« Reply #493 on: 11 / September / 2016, 17:20:59 »
Ant is correct that we need the *current* playback buffer.

However, video probably adds another twist, on pre-digic 6 cameras there are issues if a video is the selected image on startup.
Don't forget what the H stands for.


Re: SX60HS Porting
« Reply #494 on: 11 / September / 2016, 17:24:35 »
 Hmmm still looking. Restored diskboot.bin from my build that I published. Same problem . I'm not in a video mode....just still mode.


When I press play (after viewing REC which works fine), a momentary flash shows a good version of the play screen, then it disappears, and only the UI is there.

*

Offline reyalp

  • ******
  • 13621
Re: SX60HS Porting
« Reply #495 on: 11 / September / 2016, 17:30:22 »
Hmmm still looking. Restored diskboot.bin from my build that I published. Same problem . I'm not in a video mode....just still mode.
It appears that you have (or had) a video selected in playback mode.

Anyway, the bottom line is we need the current playback buffer. Until we have that, it will be wrong some of the time.
Don't forget what the H stands for.

Re: SX60HS Porting
« Reply #496 on: 11 / September / 2016, 17:38:53 »
Quote
It appears that you have (or had) a video selected in playback mode.

Anyway, the bottom line is we need the current playback buffer. Until we have that, it will be wrong some of the time.

Ah...thanks. That was it.  Thought I'd completely lost my mind. If a video clip thumb is showing, then I get this problem. Going back to a still shot and the problem disappears.  So which addressing function is wrong? or needs to have changes made if its a video clip?  i have no idea how I'd detect that, except perhaps from the file name.

*

Offline Ant

  • ****
  • 497
Re: SX60HS Porting
« Reply #497 on: 11 / September / 2016, 17:47:13 »
You can find pointers to playback framebuffers in ROM, and then analysing RAM dump find pointer to current playback framebuffer or its index.


*

Offline reyalp

  • ******
  • 13621
Re: SX60HS Porting
« Reply #498 on: 11 / September / 2016, 17:50:26 »
So which addressing function is wrong?  or needs to have changes made if its a video clip?  i have no idea how I'd detect that, except perhaps from the file name.
vid_get_viewport_fb_d() is used for the playback viewport address.

There are two (probably) separate issues:
1) Finding the current playback buffer for stills. Even outside of the video problem, you will probably notice that scrolling that you sometimes see the wrong image when scrolling through stills. Pre digic 6 ports mostly do this correctly, but so far the equivalent variable has not been found in digic 6.
2) The buffer used when a video is selected. As I mentioned earlier, even pre-digic 6 ports have problems in this case. I'm not aware of a way to detect whether a video or still is being shown in playback.

edit:
I found the playback buffers for g7x (see comments on vid_get_viewport_fb_d) but as yet I have not figured out how to determine the active buffer. I have also not looked at the video case beyond noticing it has similar problems to earlier ports.
Don't forget what the H stands for.

*

Offline reyalp

  • ******
  • 13621
Re: SX60HS Porting
« Reply #499 on: 12 / September / 2016, 00:30:46 »
On g7x, the contents of 0xa804 seems to contain a pointer to a more current buffer, but it's not quite right. If you zoom out so multiple thumbnails are shown, it still only contains one. It also doesn't show the image moving if you swipe on the touch screen.

It doesn't show anything if a video is selected whens witching to play, although actually playing the video seems OK.

I found this by searching RAM, haven't looked for it in ROM code yet.

The possible playback display buffers I have found are
0x5e208000
0x5e608000
0x5ea08000
0x5ee08000
Don't forget what the H stands for.

 

Related Topics