change the way 4K resolution is determined.
authorSam Stenvall <sam@gorbachov.negge.fi>
Mon, 18 Nov 2013 22:45:23 +0000 (00:45 +0200)
committerSam Stenvall <neggelandia@gmail.com>
Mon, 13 Jan 2014 15:36:41 +0000 (17:36 +0200)
Older versions of
tvheadend incorrectly report 1080i channels as having 1088 vertical
pixels so they got classified as 4K. The algorithm is now changed
to consider source as 4K only when the total pixel count exceeds
6 megapixels.

xbmc/utils/StreamDetails.cpp

index a64b5c0..85edbbd 100644 (file)
@@ -560,8 +560,10 @@ CStdString CStreamDetails::VideoDimsToResolutionDescription(int iWidth, int iHei
   else if (iWidth <= 1920 && iHeight <= 1080)
     return "1080";
   // 4K
-  else
+  else if (iWidth * iHeight >= 6000000)
     return "4K";
+  else
+    return "";
 }
 
 CStdString CStreamDetails::VideoAspectToAspectDescription(float fAspect)