Skip to content

Commit

Permalink
[video] rework dimensions
Browse files Browse the repository at this point in the history
  • Loading branch information
DaVukovic committed Jan 19, 2024
1 parent a01c2d4 commit 73ea9a6
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions xbmc/utils/StreamDetails.cpp
Expand Up @@ -582,14 +582,15 @@ std::string CStreamDetails::VideoDimsToResolutionDescription(int iWidth, int iHe
if (iWidth == 0 || iHeight == 0)
return "";

else if (iWidth <= 720 && iHeight <= 480)
// Anamorphic NTSC DVD
else if (iWidth <= 854 && iHeight <= 480)
return "480";
// 720x576 (PAL) (768 when rescaled for square pixels)
else if (iWidth <= 768 && iHeight <= 576)
return "576";
// 960x540 (sometimes 544 which is multiple of 16)
else if (iWidth <= 960 && iHeight <= 544)
return "540";
// includes 768x576, 720x576 and 1024x576
else if (iWidth <= 1024 && iHeight <= 576)
return "576";
// 1280x720
else if (iWidth <= 1280 && iHeight <= 962)
return "720";
Expand Down

0 comments on commit 73ea9a6

Please sign in to comment.