Intel NUC - Haswell (4th Generation CPU)
Can someone explain to me where the wmm and hmm variables are being populated from and what is their meaning?

From my xbmc-xrandr output (not on haswell hardware here, but I have the same issue with pixel ratios on my nvidia hardware, which I had so far worked around by editing the values to 1.0000 by hand in guisettings.xml)

<output name="DVI-I-2" connected="true" w="1920" h="1080" x="0" y="0" wmm="598" hmm="336">

The fact that 598/336 != 16/9 is obviously the underlying issue here, and I would like to understand where these numbers come from.

(2014-01-19, 01:42)fritsch Wrote: @lmyllari, use ceil on the result and compare with the correct division, if it's smaller epsilon -> use the ceil.

Code:
From 3eb236cd04dc43e0b5d3b26f421eb13eea2c6116 Mon Sep 17 00:00:00 2001
From: fritsch <[email protected]>
Date: Sun, 19 Jan 2014 00:56:07 +0100
Subject: [PATCH] WinSystemX11: Don't try to scale scale values near to 1.0f

---
xbmc/windowing/X11/WinSystemX11.cpp | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/xbmc/windowing/X11/WinSystemX11.cpp b/xbmc/windowing/X11/WinSystemX11.cpp
index 083d1e9..5a821fd 100644
--- a/xbmc/windowing/X11/WinSystemX11.cpp
+++ b/xbmc/windowing/X11/WinSystemX11.cpp
@@ -277,8 +277,13 @@ void CWinSystemX11::UpdateResolutions()
       res.iHeight = mode.h;
       res.iScreenWidth  = mode.w;
       res.iScreenHeight = mode.h;
-      if (mode.h>0 && mode.w>0 && out.hmm>0 && out.wmm>0)
+      if (mode.h > 0 && mode.w > 0 && out.hmm > 0 && out.wmm > 0)
+      {
         res.fPixelRatio = ((float)out.wmm/(float)mode.w) / (((float)out.hmm/(float)mode.h));
+        float ceilRatio = ceil(res.fPixelRatio);
+        if (fabs(ceilRatio - res.fPixelRatio) < 0.01)
+          res.fPixelRatio = ceilRatio;
+      }
       else
         res.fPixelRatio = 1.0f;

--
1.8.3.2

If difference between ceil and direct value < 0.01 use the ceil. E.g. 0.998f will be 1.0f
Reply


Messages In This Thread
Haswell NUC + XBMC - by solamnic - 2013-10-28, 08:14
RE: Haswell NUC + XBMC - by joelbaby - 2013-10-28, 12:32
RE: Haswell NUC + XBMC - by sheva7 - 2013-10-28, 15:11
RE: Haswell NUC + XBMC - by mgmcube - 2013-10-28, 16:21
RE: Haswell NUC + XBMC - by cecemf - 2013-10-28, 17:21
RE: Haswell NUC + XBMC - by floydje07 - 2013-10-28, 17:56
RE: Haswell NUC + XBMC - by joelbaby - 2013-10-29, 04:09
RE: Haswell NUC + XBMC - by floydje07 - 2013-10-29, 09:42
RE: Haswell NUC + XBMC - by mgmcube - 2013-10-29, 08:55
RE: Haswell NUC + XBMC - by zag - 2013-10-28, 19:37
RE: Haswell NUC + XBMC - by cecemf - 2013-10-30, 13:19
RE: Haswell NUC + XBMC - by voip-ninja - 2013-10-28, 23:58
Haswell NUC + XBMC - by solamnic - 2013-10-29, 11:29
RE: Haswell NUC + XBMC - by joelbaby - 2013-10-29, 13:20
RE: Haswell NUC + XBMC - by Acrobat76 - 2013-10-29, 15:11
RE: Haswell NUC + XBMC - by sheva7 - 2013-10-29, 15:14
RE: Haswell NUC + XBMC - by sheva7 - 2013-10-29, 15:02
RE: Haswell NUC + XBMC - by joelbaby - 2013-10-29, 16:01
RE: Haswell NUC + XBMC - by Camlann - 2013-10-29, 16:38
RE: Haswell NUC + XBMC - by mgmcube - 2013-10-29, 17:45
RE: Haswell NUC + XBMC - by Camlann - 2013-10-29, 19:18
RE: Haswell NUC + XBMC - by zag - 2013-10-29, 17:06
RE: Haswell NUC + XBMC - by voip-ninja - 2013-10-29, 21:28
RE: Haswell NUC + XBMC - by solamnic - 2013-10-29, 17:28
RE: Haswell NUC + XBMC - by Camlann - 2013-10-29, 17:42
RE: Haswell NUC + XBMC - by zag - 2013-10-29, 18:15
RE: Haswell NUC + XBMC - by solamnic - 2013-10-29, 20:45
RE: Haswell NUC + XBMC - by tutu - 2013-10-29, 23:00
RE: Haswell NUC + XBMC - by mattchapman - 2013-10-29, 23:12
RE: Haswell NUC + XBMC - by voip-ninja - 2013-10-29, 23:26
RE: Haswell NUC + XBMC - by Platypus2 - 2013-10-29, 23:29
RE: Haswell NUC + XBMC - by solamnic - 2013-10-29, 23:43
RE: Haswell NUC + XBMC - by cecemf - 2013-10-30, 14:04
RE: Haswell NUC + XBMC - by Budwyzer - 2013-10-29, 23:46
RE: Haswell NUC + XBMC - by Platypus2 - 2013-10-30, 00:31
RE: Haswell NUC + XBMC - by floydje07 - 2013-10-30, 11:44
RE: Haswell NUC + XBMC - by Camlann - 2013-10-30, 11:55
RE: Haswell NUC + XBMC - by solamnic - 2013-10-30, 13:23
RE: Haswell NUC + XBMC - by sheva7 - 2013-10-30, 14:51
RE: Haswell NUC + XBMC - by cecemf - 2013-10-30, 14:55
RE: Haswell NUC + XBMC - by solamnic - 2013-10-30, 14:54
RE: Haswell NUC + XBMC - by sheva7 - 2013-10-30, 15:24
RE: Haswell NUC + XBMC - by 00b5 - 2013-10-30, 15:32
RE: Haswell NUC + XBMC - by Platypus2 - 2013-10-30, 15:49
RE: Haswell NUC + XBMC - by tutu - 2013-10-30, 22:20
RE: Haswell NUC + XBMC - by husky55 - 2013-10-31, 18:02
RE: Haswell NUC + XBMC - by Platypus2 - 2013-10-31, 18:10
RE: Haswell NUC + XBMC - by husky55 - 2013-10-31, 20:11
RE: Haswell NUC + XBMC - by Platypus2 - 2013-10-31, 20:38
RE: Haswell NUC + XBMC - by Camlann - 2013-11-01, 10:18
RE: Haswell NUC + XBMC - by husky55 - 2013-10-31, 20:53
RE: Haswell NUC + XBMC - by solamnic - 2013-10-31, 21:13
RE: Haswell NUC + XBMC - by Platypus2 - 2013-10-31, 21:13
RE: Haswell NUC + XBMC - by MrCrispy - 2013-10-31, 21:17
RE: Haswell NUC + XBMC - by Platypus2 - 2013-10-31, 21:52
RE: Haswell NUC + XBMC - by cecemf - 2013-11-01, 14:28
RE: Haswell NUC + XBMC - by voip-ninja - 2013-11-01, 16:43
RE: Haswell NUC + XBMC - by Platypus2 - 2013-11-01, 17:32
RE: Haswell NUC + XBMC - by cecemf - 2013-11-02, 13:22
RE: Haswell NUC + XBMC - by Camlann - 2013-11-01, 19:39
RE: Haswell NUC + XBMC - by mgmcube - 2013-11-02, 03:58
RE: Haswell NUC + XBMC - by Platypus2 - 2013-11-02, 04:03
RE: Haswell NUC + XBMC - by joelbaby - 2013-11-02, 05:55
RE: Haswell NUC + XBMC - by Platypus2 - 2013-11-02, 11:59
RE: Haswell NUC + XBMC - by joelbaby - 2013-11-02, 15:30
RE: Haswell NUC + XBMC - by mushoss - 2013-11-02, 19:06
RE: Haswell NUC + XBMC - by Platypus2 - 2013-11-02, 15:57
RE: Haswell NUC + XBMC - by tesona1977 - 2013-11-02, 17:41
RE: Haswell NUC + XBMC - by Platypus2 - 2013-11-02, 20:18
RE: Haswell NUC + XBMC - by mushoss - 2013-11-02, 20:42
RE: Haswell NUC + XBMC - by mushoss - 2013-11-02, 21:20
RE: Haswell NUC + XBMC - by Platypus2 - 2013-11-03, 01:42
RE: Haswell NUC + XBMC - by detroitjb - 2013-11-02, 20:30
RE: Haswell NUC + XBMC - by voip-ninja - 2013-11-02, 20:40
RE: Haswell NUC + XBMC - by Selene - 2013-11-04, 19:11
RE: Haswell NUC + XBMC - by Platypus2 - 2013-11-04, 23:48
RE: Haswell NUC + XBMC - by solamnic - 2013-11-05, 00:15
RE: Haswell NUC + XBMC - by Selene - 2013-11-05, 06:54
RE: Haswell NUC + XBMC - by voip-ninja - 2013-11-05, 16:39
RE: Haswell NUC + XBMC - by Platypus2 - 2013-11-05, 17:53
RE: Haswell NUC + XBMC - by Selene - 2013-11-05, 18:16
RE: Haswell NUC + XBMC - by Platypus2 - 2013-11-05, 18:28
RE: Haswell NUC + XBMC - by Selene - 2013-11-05, 18:57
RE: Haswell NUC + XBMC - by Javlin - 2013-11-03, 07:26
RE: Haswell NUC + XBMC - by Platypus2 - 2013-11-03, 21:30
RE: Haswell NUC + XBMC - by ChopD - 2013-11-04, 01:18
RE: Haswell NUC + XBMC - by Platypus2 - 2013-11-04, 01:21
RE: Haswell NUC + XBMC - by ChopD - 2013-11-04, 14:18
RE: Haswell NUC + XBMC - by Javlin - 2013-11-04, 07:07
RE: Haswell NUC + XBMC - by jinkyjim - 2013-11-04, 12:58
AW: RE: Haswell NUC + XBMC - by disrupted - 2013-11-05, 00:32
Haswell NUC + XBMC - by solamnic - 2013-11-05, 09:30
RE: Haswell NUC + XBMC - by voip-ninja - 2013-11-05, 22:34
RE: Haswell NUC + XBMC - by Selene - 2013-11-05, 22:39
RE: Haswell NUC + XBMC - by voip-ninja - 2013-11-05, 23:03
RE: Haswell NUC + XBMC - by Selene - 2013-11-06, 00:38
RE: Haswell NUC + XBMC - by Platypus2 - 2013-11-06, 01:25
RE: Haswell NUC + XBMC - by cecemf - 2013-11-06, 13:35
RE: Haswell NUC + XBMC - by Selene - 2013-11-06, 01:28
RE: Haswell NUC + XBMC - by voip-ninja - 2013-11-06, 17:07
RE: Haswell NUC + XBMC - by zag - 2013-11-06, 00:20
RE: Haswell NUC + XBMC - by solamnic - 2013-11-06, 00:33
RE: Haswell NUC + XBMC - by Selene - 2013-11-06, 19:32
RE: Haswell NUC + XBMC - by cecemf - 2013-11-06, 19:36
RE: Haswell NUC + XBMC - by voip-ninja - 2013-11-06, 19:50
RE: Haswell NUC + XBMC - by renhack - 2013-11-06, 23:16
RE: Haswell NUC + XBMC - by NudistPenguin - 2013-11-07, 02:56
RE: Haswell NUC + XBMC - by Selene - 2013-11-07, 03:42
RE: Haswell NUC + XBMC - by cecemf - 2013-11-07, 09:43
RE: Haswell NUC + XBMC - by cecemf - 2013-11-07, 11:11
RE: Haswell NUC + XBMC - by zag - 2013-11-07, 11:29
RE: Haswell NUC + XBMC - by cecemf - 2013-11-07, 11:43
MCEUSB ir receiver on nuc? - by alexgsz - 2013-12-22, 15:19
RE: Intel NUC - HTPC (Haswell Late 2013 edition) - by theMule - 2014-01-19, 06:58
RE: memory - by nc88keyz - 2014-02-24, 23:52
Help with IRC on Haswell - by Pandysan - 2014-03-05, 22:49
Feedback - by chrissitoelle - 2014-04-27, 19:18
Re: RE: - by nickr - 2014-05-04, 01:25
Logout Mark Read Team Forum Stats Members Help
Intel NUC - Haswell (4th Generation CPU)7