2012-08-04, 22:51
(2012-08-04, 22:50)bobo1on1 Wrote: Congratulations on your excellent feature request, you've just requested something that has been available in XBMC for over two years.Now that's quick service or what
(2012-08-04, 22:50)bobo1on1 Wrote: Congratulations on your excellent feature request, you've just requested something that has been available in XBMC for over two years.Now that's quick service or what
else if ( g_settings.m_currentVideoSettings.m_ViewMode == VIEW_MODE_WIDE_ZOOM ||
(is43 && g_guiSettings.GetInt("videoplayer.stretch43") == VIEW_MODE_WIDE_ZOOM))
{ // super zoom
float stretchAmount = (screenWidth / screenHeight) * g_settings.m_ResInfo[res].fPixelRatio / sourceFrameRatio;
g_settings.m_fPixelRatio = pow(stretchAmount, float(2.0/3.0));
g_settings.m_fZoomAmount = pow(stretchAmount, float((stretchAmount < 1.0) ? -1.0/3.0 : 1.0/3.0));
g_settings.m_bNonLinStretch = true;
}
// our transform should map [0..1] to itself, with f(0) = 0, f(1) = 1, f(0.5) = 0.5, and f'(0.5) = b.
// a simple curve to do this is g(x) = b(x-0.5) + (1-b)2^(n-1)(x-0.5)^n + 0.5
// where the power preserves sign. n = 2 is the simplest non-linear case (required when b != 1)
float x = pos.x - 0.5;
return vec2(mix(x * abs(x) * 2.0, x, m_stretch) + 0.5, pos.y);