Kodi DSPlayer – DirectShow Player for Windows
#51
Sorry, but all those width/height tests so far are no good. E.g. anamorphic PAL after stretching ends up as 1024x576. That is still PAL SD.

The better solution (used by XySubFilter, mpv and XySubFilter) is to take both width and height into account. Here's what madVR does:

Code:
if (width > 1050 || height > 576)
  res = HD;
else
  res = SD;

madVR only needs to differ between SD and HD, to switch to the correct decoding matrix etc. Of course you can add detection for 720p and 1080p and 2160p etc. But always keep in mind that custom encodes often remove the black bars. So e.g. 2.35:1 720p ends up as 1280x540. And 4:3 720p becomes 960x720. Both are still considered HD content, because the original source was 720p. Compare that to anamorphic PAL which is 1024x576. So anamorphic PAL is wider than cropped 4:3 720p, and it has more height than cropped 2.35:1 720p. So you can see that looking at either the height or width alone is no good. You always need to check both. And please do make sure that you don't confuse cropped 720p content with anamorphic PAL.

If I may suggest, consider anamorphic PAL as SD content, and consider 720p sources (even when cropped) as 720p.
Reply


Messages In This Thread
RE: Kodi DSPlayer – DirectShow Player for Windows - by madshi - 2015-04-04, 09:12
Lockup on STOP issue resolved! - by MKANET - 2015-04-11, 21:59
RE: 4G aware patch - by MagikMark - 2015-09-08, 03:27
Alt-F4 no longer quits - by JeffA - 2015-10-31, 20:38
H265 playback - by rew88 - 2017-11-04, 00:41
RE: H265 playback - by ashlar - 2017-11-04, 16:21
RE: H265 playback - by rew88 - 2017-11-05, 01:34
RE: H265 playback - by ashlar - 2017-11-05, 16:48
RE: H265 playback - by rew88 - 2017-11-05, 23:08
RE: H265 playback - by ashlar - 2017-11-06, 12:00
Leia 18 - by terpsarlington - 2017-11-21, 03:51
RE: Leia 18 - by spencerjford - 2017-11-21, 06:24
Display Modes / Refresh Rates - by goofer69 - 2019-09-20, 00:19
RE: Display Modes / Refresh Rates - by ashlar - 2019-09-20, 00:39
RE: Display Modes / Refresh Rates - by ashlar - 2019-09-20, 19:35
DSPlayer 23.810 to 23.976 - by Runakanta - 2018-05-09, 03:24
RE: DSPlayer 23.810 to 23.976 - by Warner306 - 2018-05-10, 01:32
Logout Mark Read Team Forum Stats Members Help
Kodi DSPlayer – DirectShow Player for Windows47