diff options
author | Vincent Bermel <palob@users.noreply.github.com> | 2022-01-03 20:31:32 +0100 |
---|---|---|
committer | palob <willovince@openmailbox.org> | 2022-01-09 19:02:26 +0100 |
commit | 52a14a434d442e3e6d4a566457f63ed9f46a7f5c (patch) | |
tree | 4c8e1a999ab2b9e39b8154eef88399d2a0a1a566 | |
parent | 1144ff231464ef07b40841efee97922e7a37c93d (diff) |
[xbmc/utils] StreamDetails: additional common aspect ratios
new possible values for fAspect
added label graphics and GUIInfoManager code comment
moved 9 up by 1px
correct smoothing for 1.19.png
-rw-r--r-- | addons/skin.estouchy/media/flagging/aspectratio/1.00.png | bin | 0 -> 1076 bytes | |||
-rw-r--r-- | addons/skin.estouchy/media/flagging/aspectratio/1.19.png | bin | 0 -> 1049 bytes | |||
-rw-r--r-- | addons/skin.estouchy/media/flagging/aspectratio/2.00.png | bin | 0 -> 1205 bytes | |||
-rw-r--r-- | addons/skin.estuary/media/flags/aspectratio/1.00.png | bin | 0 -> 1076 bytes | |||
-rw-r--r-- | addons/skin.estuary/media/flags/aspectratio/1.19.png | bin | 0 -> 1049 bytes | |||
-rw-r--r-- | addons/skin.estuary/media/flags/aspectratio/2.00.png | bin | 0 -> 1205 bytes | |||
-rw-r--r-- | xbmc/GUIInfoManager.cpp | 3 | ||||
-rw-r--r-- | xbmc/utils/StreamDetails.cpp | 10 |
8 files changed, 11 insertions, 2 deletions
diff --git a/addons/skin.estouchy/media/flagging/aspectratio/1.00.png b/addons/skin.estouchy/media/flagging/aspectratio/1.00.png Binary files differnew file mode 100644 index 0000000000..eb41c15f7f --- /dev/null +++ b/addons/skin.estouchy/media/flagging/aspectratio/1.00.png diff --git a/addons/skin.estouchy/media/flagging/aspectratio/1.19.png b/addons/skin.estouchy/media/flagging/aspectratio/1.19.png Binary files differnew file mode 100644 index 0000000000..80289ae466 --- /dev/null +++ b/addons/skin.estouchy/media/flagging/aspectratio/1.19.png diff --git a/addons/skin.estouchy/media/flagging/aspectratio/2.00.png b/addons/skin.estouchy/media/flagging/aspectratio/2.00.png Binary files differnew file mode 100644 index 0000000000..cd8ff2569f --- /dev/null +++ b/addons/skin.estouchy/media/flagging/aspectratio/2.00.png diff --git a/addons/skin.estuary/media/flags/aspectratio/1.00.png b/addons/skin.estuary/media/flags/aspectratio/1.00.png Binary files differnew file mode 100644 index 0000000000..eb41c15f7f --- /dev/null +++ b/addons/skin.estuary/media/flags/aspectratio/1.00.png diff --git a/addons/skin.estuary/media/flags/aspectratio/1.19.png b/addons/skin.estuary/media/flags/aspectratio/1.19.png Binary files differnew file mode 100644 index 0000000000..80289ae466 --- /dev/null +++ b/addons/skin.estuary/media/flags/aspectratio/1.19.png diff --git a/addons/skin.estuary/media/flags/aspectratio/2.00.png b/addons/skin.estuary/media/flags/aspectratio/2.00.png Binary files differnew file mode 100644 index 0000000000..cd8ff2569f --- /dev/null +++ b/addons/skin.estuary/media/flags/aspectratio/2.00.png diff --git a/xbmc/GUIInfoManager.cpp b/xbmc/GUIInfoManager.cpp index a1f594ddf2..efcbdad053 100644 --- a/xbmc/GUIInfoManager.cpp +++ b/xbmc/GUIInfoManager.cpp @@ -5801,11 +5801,14 @@ const infomap container_str[] = {{ "property", CONTAINER_PROPERTY }, /// \anchor ListItem_VideoAspect /// _string_, /// @return The aspect ratio of the currently selected video. Possible values: +/// - <b>1.00</b> +/// - <b>1.19</b> /// - <b>1.33</b> /// - <b>1.37</b> /// - <b>1.66</b> /// - <b>1.78</b> /// - <b>1.85</b> +/// - <b>2.00</b> /// - <b>2.20</b> /// - <b>2.35</b> /// - <b>2.40</b> diff --git a/xbmc/utils/StreamDetails.cpp b/xbmc/utils/StreamDetails.cpp index acc644e109..99cef5795e 100644 --- a/xbmc/utils/StreamDetails.cpp +++ b/xbmc/utils/StreamDetails.cpp @@ -590,7 +590,11 @@ std::string CStreamDetails::VideoAspectToAspectDescription(float fAspect) // aspect ratios, particularly when cropping prior to video encoding is taken into account // the best we can do is take the "common" aspect ratios, and return the closest one available. // The cutoffs are the geometric mean of the two aspect ratios either side. - if (fAspect < 1.3499f) // sqrt(1.33*1.37) + if (fAspect < 1.0909f) // sqrt(1.00*1.19) + return "1.00"; + else if (fAspect < 1.2581f) // sqrt(1.19*1.33) + return "1.19"; + else if (fAspect < 1.3499f) // sqrt(1.33*1.37) return "1.33"; else if (fAspect < 1.5080f) // sqrt(1.37*1.66) return "1.37"; @@ -598,8 +602,10 @@ std::string CStreamDetails::VideoAspectToAspectDescription(float fAspect) return "1.66"; else if (fAspect < 1.8147f) // sqrt(1.78*1.85) return "1.78"; - else if (fAspect < 2.0174f) // sqrt(1.85*2.20) + else if (fAspect < 1.9235f) // sqrt(1.85*2.00) return "1.85"; + else if (fAspect < 2.0976f) // sqrt(2.00*2.20) + return "2.00"; else if (fAspect < 2.2738f) // sqrt(2.20*2.35) return "2.20"; else if (fAspect < 2.3749f) // sqrt(2.35*2.40) |