Skip to content

Commit

Permalink
WIP: nonlinear stretch 16:9 setting for 4:3 video display
Browse files Browse the repository at this point in the history
  • Loading branch information
notspiff committed Jan 28, 2015
1 parent 2719d8a commit 60d265a
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 2 deletions.
5 changes: 5 additions & 0 deletions language/English/strings.po
Expand Up @@ -2732,6 +2732,11 @@ msgctxt "#643"
msgid "Avoid clipping on ReplayGained files"
msgstr ""

#: system/settings/settings.xml
msgctxt "#644"
msgid "Stretch 16:9 - Nonlinear"
msgstr ""

#empty string with id 644

msgctxt "#645"
Expand Down
1 change: 1 addition & 0 deletions system/settings/settings.xml
Expand Up @@ -471,6 +471,7 @@
<option label="633">3</option> <!-- ViewModeWideZoom -->
<option label="634">4</option> <!-- ViewModeStretch16x9 -->
<option label="631">1</option> <!-- ViewModeZoom -->
<option label="644">7</option> <!-- ViewModeStretch16x9 - nonlinear -->
</options>
</constraints>
<control type="spinner" format="string" />
Expand Down
6 changes: 5 additions & 1 deletion xbmc/cores/VideoRenderers/BaseRenderer.cpp
Expand Up @@ -687,7 +687,8 @@ void CBaseRenderer::SetViewMode(int viewMode)
CDisplaySettings::Get().SetNonLinearStretched(true);
}
else if ( CMediaSettings::Get().GetCurrentVideoSettings().m_ViewMode == ViewModeStretch16x9 ||
(is43 && CSettings::Get().GetInt("videoplayer.stretch43") == ViewModeStretch16x9))
(is43 && (CSettings::Get().GetInt("videoplayer.stretch43") == ViewModeStretch16x9 ||
CSettings::Get().GetInt("videoplayer.stretch43") == ViewModeStretch16x9Nonlin)))
{ // stretch image to 16:9 ratio
CDisplaySettings::Get().SetZoomAmount(1.0);
if (res == RES_PAL_4x3 || res == RES_PAL60_4x3 || res == RES_NTSC_4x3 || res == RES_HDTV_480p_4x3)
Expand All @@ -700,6 +701,9 @@ void CBaseRenderer::SetViewMode(int viewMode)
// incorrect behaviour, but it's what the users want, so...
CDisplaySettings::Get().SetPixelRatio((screenWidth / screenHeight) * info.fPixelRatio / sourceFrameRatio);
}
if (is43)
CDisplaySettings::Get().SetNonLinearStretched(CSettings::Get().GetInt("videoplayer.stretch43") == ViewModeStretch16x9Nonlin);

}
else if (CMediaSettings::Get().GetCurrentVideoSettings().m_ViewMode == ViewModeOriginal)
{ // zoom image so that the height is the original size
Expand Down
3 changes: 2 additions & 1 deletion xbmc/settings/VideoSettings.h
Expand Up @@ -114,7 +114,8 @@ typedef enum {
ViewModeWideZoom,
ViewModeStretch16x9,
ViewModeOriginal,
ViewModeCustom
ViewModeCustom,
ViewModeStretch16x9Nonlin
} ViewMode;

class CVideoSettings
Expand Down

0 comments on commit 60d265a

Please sign in to comment.