Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[3D] Support switching to 3D resolutions #3072

Closed
wants to merge 7 commits into from

Conversation

popcornmix
Copy link
Member

Include matching 3D flags (SBS/TAB) in the score of a resolution to switch to, to enable switching to 3d modes.
Also remove the old code that treated 3D modes differently when assigning a score.

This reinstates auto switching to 3D mode on the PI that was lost in the stereoscopic update.

Note: This is an RFC.
@elupus?

@ghost ghost assigned elupus Aug 7, 2013
int c_weight = MathUtils::round_int(RefreshWeight(curr.fRefreshRate, fRefreshRate * multiplier) * 1000.0);
if (!(m_iFlags & CONF_FLAGS_STEREO_MODE_SBS) != !(curr.dwFlags & D3DPRESENTFLAG_MODE3DSBS) ||
!(m_iFlags & CONF_FLAGS_STEREO_MODE_TAB) != !(curr.dwFlags & D3DPRESENTFLAG_MODE3DTB))
c_weight += 1000;

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

@da-anda
Copy link
Member

da-anda commented Sep 2, 2013

just a FYI - haven't had the time yet to dig into the code - or let's say I started with it but still haven't figured everything

@da-anda
Copy link
Member

da-anda commented Nov 10, 2013

@elupus, you think you can work on the refactoring we talked about (firing new message/signal on before start + stream change ...) so that we can get this in until Gotham hard freeze? (dec 10ths)

@elupus
Copy link
Contributor

elupus commented Nov 10, 2013

Maybe. But it's not high priority.

@da-anda
Copy link
Member

da-anda commented Nov 12, 2013

@elupus well, priority depends. 3D support is one of the major new user noticible XBMC features in Gotham and to me it is important that new promoted stuff works in a good way - independent if I personally need this feature or not. But that's just my opinion.

@elupus
Copy link
Contributor

elupus commented Nov 12, 2013

i meant it's not a high priority for me

On Tue, Nov 12, 2013 at 11:42 AM, da-anda notifications@github.com wrote:

@elupus https://github.com/elupus well, priority depends. 3D support is
one of the major new user noticible XBMC features in Gotham and to me it is
important that new promoted stuff works in a good way - independent if I
personally need this feature or not. But that's just my opinion.


Reply to this email directly or view it on GitHubhttps://github.com//pull/3072#issuecomment-28283554
.

@da-anda
Copy link
Member

da-anda commented Nov 21, 2013

I have serious issues on my HTPC when using "Settings -> Video -> Playback -> Adjust refresh rate to match video" and "Settings -> Video -> Playback -> Playback mode of stereoscopic videos = preferred mode (same as movie)". In my case stereomode is always broken and only the left eye is rendered (video + GUI) and in addition the video only shows a portion of the actual frame in SBS mode (OU seems "fine" besides of the missing second eye). It's 100% reproduceable on my HTPC and gone when I change the prefered playback mode to "ask me". So there seems to be an issue when render mode is switched into stereoscopics before the refresh rate has been adjusted (which seems to happen in my case because I can see the GUI in SBS mode for some ms before refresh rate changes). This is on Windows7 with DXVA. Doesn't seem to happen in software mode, so could also be a pure DXVA issue.

@da-anda
Copy link
Member

da-anda commented Dec 18, 2013

described issue happened again yesterday. @elupus can we work on this PR (which I think would solve the issue) during the holidays maybe?

@koying
Copy link
Contributor

koying commented Jan 6, 2014

/cc @koying

@michbeck100
Copy link

Switching to 3D resolutions doesn't work in XBMC Gotham. I've been using an OpenELEC testbuild before updating to OpenELEC 4.0 aka XBMC Gotham. The testbuilds did switch the TV when playing 3D movies. There might be more commits but I think these might be of interest to fix this issue: popcornmix@5c59dc1 , popcornmix@25993f9 and popcornmix@e79f1a2

@da-anda
Copy link
Member

da-anda commented May 6, 2014

this feature hasn't been added to XBMC yet, so nothing to fix. OpenElec used a experimental patch from popcornmix's newclock3 branch and they seem to have removed it from 4.0. Use a Milhouse nightly (see forum) with the patch in if you want that feature and can't wait until it's ready for all platforms and merged into master.

@popcornmix
Copy link
Member Author

I've updated with a new implementation of 3d mode switching.
The first commit is Pi from #4703 and will be dropped when that is merged.

This patch set is in OpenELEC 4.0 for Pi and supports switching to 3D modes.

jenkins build this please.
Ping @elupus @da-anda

@da-anda
Copy link
Member

da-anda commented May 13, 2014

up to elupus to decide. I can only tell that it's working nicely on the PI. The only thing we have to change is that the "ask dialog" in case of stereoscopic movies is triggered earlier, so before the player has rendered the first frame and thus changed resolution already once. We'll probably need a new message sent by the players or move the "on playback start" one.

m_nextStereoMode = stereo_mode;
CSettings::Get().SetInt("videoscreen.stereoscopicmode", (int)m_stereoMode);
}

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

@popcornmix
Copy link
Member Author

jenkins build this please

@Memphiz
Copy link
Member

Memphiz commented May 13, 2014

@popcornmix one more time please

@popcornmix
Copy link
Member Author

jenkins build this please

@popcornmix
Copy link
Member Author

Aha! jenkins obeyed!

@elupus
Copy link
Contributor

elupus commented May 13, 2014

frame packed modes are modes where we have an actual resolution of: 1920x2205. It's a over/under format with square pixels and 45 pixels of blanking between. It's fully supported with current xbmc if window system expose it (you can add a xrandr mode line)

http://www.best-3dtvs.com/what-is-frame-packing-3d/

@MartijnKaijser
Copy link
Member

@popcornmix This needs a rebase

@popcornmix
Copy link
Member Author

@MartijnKaijser rebased
(although I'm not sure if we have agreement on this PR yet).

@elupus
Copy link
Contributor

elupus commented May 24, 2014

Nah. We need a solution that don't break frame packed modes first

@@ -471,6 +450,44 @@ RESOLUTION CGraphicContext::GetVideoResolution() const
return m_Resolution;
}

RESOLUTION CGraphicContext::Get3DVideoResolution(RENDER_STEREO_MODE mode) const

This comment was marked as spam.

@popcornmix
Copy link
Member Author

Ping @elupus
Added commits to address issues raised.

@da-anda
Copy link
Member

da-anda commented May 25, 2014

@popcornmix could you also move the dvdplayer message "onPlaybackStart" (guessed name) to a stage before dvdplayer is adjusting the refresh rate so that the stereoscopicsManager (which is listening to this message) can kick in earlier for the "ask dialog" etc? Or maybe send a new message "onBeforePlaybackStart" if the other is to difficult to move? Current situation is suboptimal, because first refreshrate is adjusted and after that the 3D mode is toggled which might also adjust the refresh rate/resolution again - so two resolution switches right after another. Also the "ask" dialog should kick in before any picture is shown by dvdplayer IMO. My code knowledge is/was not good enough to fix this when I was working on that stuff.

@popcornmix
Copy link
Member Author

@da-anda I agree that would be nice, but I'd prefer to leave it to a future PR.
I suspect a change like that would have a lot of potential side effects on a lot of other code.

@popcornmix
Copy link
Member Author

@elupus
Can you check the additional commits that should resolve the issues you mentioned.
Anything else you want changed before this can go in?

@da-anda
Copy link
Member

da-anda commented Jun 27, 2014

@elupus - would be nice if you could find the time to review so that this can go in during upcoming merge window

@elupus
Copy link
Contributor

elupus commented Jun 29, 2014

if you change how pixelratio is defined for the windowing system when providing stereoscopic modes frame packed modes need to be corrected too. See CDisplaySettings::AddResolutionInfo(const RESOLUTION_INFO &resolution).

… we're switching to a different 3D mode"

This reverts commit 3c4c236.
…request 3D signalling

[rbp] Add ntsc version of 48Hz mode

[rbp] Extract the correct resolution with Pi LCD

[rpb] Change order or CEA and DMT mode probing so CEA modes are preferred

[rbp] Allow interlaced resolutions into supported hdmi mode list 2
We might be changing from a non-3D to a 3D mode
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants