Kodi Community Forum
Kodi DSPlayer – DirectShow Player for Windows - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: General Support (https://forum.kodi.tv/forumdisplay.php?fid=111)
+---- Forum: Windows (https://forum.kodi.tv/forumdisplay.php?fid=59)
+---- Thread: Kodi DSPlayer – DirectShow Player for Windows (/showthread.php?tid=223175)

Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524


RE: Kodi DSPlayer – DirectShow Player for Windows - ashlar - 2018-04-30

Thanks Warner306 for those test images. RCA is downright miraculous on old/bad sources. With correct profiles handling you can squeeze out every ounce of quality from all sources. madVR is so powerful.

Those pictures should be in the OP, for anybody asking "why are you so keen on this whole DSPlayer thing, the regular Kodi videoplayer does everything I need". Sleepy


RE: Kodi DSPlayer – DirectShow Player for Windows - Warner306 - 2018-04-30

Comparison photos in the first post would actually be helpful. I have images for debanding, deringing and deblocking. I also have have a link for chroma upscaling and images for image upscaling, image doubling and dithering.

These are probably my favorite images:

Dithering to 2-bits:
2 bit Ordered Dithering
2 bit No Dithering

Kodi LibreELEC has finally introduced dithering when converting from Y'CbCr to RGB. The conversion from Y'CbCr to RGB involves floating point data that must be rounded to 10-bits or 8-bits. Without dithering, you end up with small quantization errors that can cause color errors, or, worse yet, subtle banding. There is still no dithering at output after pixel shaders have been applied, but that helps a lot. Dithering to address quantization, or rounding errors, was common in the audio world when reducing from a higher to lower sampling rate. Not dithering would result in audible distortion. madshi was the first to introduce dithering to video rendering; obviously borrowing dithering from the audio world.

More alarming is that a recent commit in the Kodi main branch was made to correct an error when converting from linear RGB to non-linear sRGB. Kodi converts to sRGB with all color spaces at the moment. For years, this calculation had been made incorrectly, I guess. I have no idea what the consequences were of this imperfect math. 10-bit passthrough and dithering from 10-bit to 8-bit are also now available in special LibreELEC test builds. HDR passthrough is already possible on Linux, so Kodi is becoming close to state-of-the art. But not on Windows.


RE: Kodi DSPlayer – DirectShow Player for Windows - Warner306 - 2018-04-30

I actually gave up on RCA after discovering it couldn't handle bad macroblocking in video addon streams. Debanding does a better job.

I first tested debanding again with The 40-Year-Old-Virgin on 1080p Blu-ray. I found a scene where Andy is lying in bed with a bookshelf behind him. The bookshelf has a shadow with terrible banding. Yes, banding on Blu-ray is a real thing. I paused this scene with MPC-HC and set debanding strength to a keyboard shortcut and stood in front of the display. Setting debanding to low didn't seem to make much of a difference at all. A setting of medium removed a lot of the banding. And high removed all of the banding. So, debanding at medium or high is advisable to improve noticeable banding, with only high being able to remove all of it. A setting of low doesn't seem to make much of a difference at all compared to off. Banding can be pretty bad once you see it. You can't correct noise and banding caused by the way a display renders pixels, nor can you fix banding caused by heavy tone mapping. But you can correct some banding in the source.

I then tested RCA. I found a scene with macroblocking in black pixels across most of the screen. I paused with MPC-HC and programmed RCA to the keyboard. Choosing different strengths improved the blocking, but only slightly, and it couldn't be removed completely. On the other hand, setting debanding to high removed most of these artifacts. So, for some reason, these artifacts were being treated as banding. Maybe I need the right source to see the difference? With Warm Bodies, a 1080p Blu-ray rip, I was able to make the algorithm fail. It doesn't know what to do to the persistent film grain, so the image is softened a little. Any softening is very minor and would be hard to notice, but this is clearly unintended. You want to keep all of the gain because it contains image detail. So I have gave up on RCA and went back to debanding on all profiles, while toggling deringing on for sources that use edge enhancement.

Artifact removal is never completely satisfying because the image is altered in some way to remove the artifact. The algorithms in madVR (besides the first attempt at denoising) remove the slightest bit of image detail at times, but not in all scenes, and this detail loss can sometimes be hard to detect unless you are standing right in front of the screen. That has been my experience, anyways. It can't be perfect and it will alter the original source in some way, but sometimes only in some scenes.


RE: Kodi DSPlayer – DirectShow Player for Windows - Warner306 - 2018-05-01

I copy-and-pasted all of my posted links into one post. You can find them here:

Image Gallery of madVR Image Processing Settings

This is not included in the OP, but is linked at the beginning of the DSPlayer Wiki.

Note: Not all images display obvious differences between algorithms. The ones shown do. That's just the nature of how each algorithm works. The same would apply to actual content.


RE: Kodi DSPlayer – DirectShow Player for Windows - Warner306 - 2018-05-02

I’m sure you people think I have nothing better to do than talk about video rendering on the Internet, but that's not true. I wrote this a couple days ago after trying about 30 times to explain how HDR -> HDR or HDR -> SDR tone mapping works. After some reading on a couple of forums related to HDR photography, I think I finally figured it out. The passage below explains how colors are created by video renderers and how this relates to tone mapped images.

Floating Point Math and Illegal RGB Values

When doing color matrixing, we are generally working with floating point numbers. This is true when converting from Y'CbCr to RGB.

Floating point numbers are numbers that contain decimal places that can move up or down (float) to accommodate a wider range of values. For RGB, floating point values for red, green and blue range between 0 and 1.0, where 0 = black and 1.0 = white. Decimal amounts such as 0.804329 are also possible. These decimal values can be converted to 0-255 or 0-1023 bit depths by rounding to the nearest decimal -- 0.804239 floating point = 205 RGB (0.804239 x 255 = 205.080945). Whole numbers without decimals (0-255) are called integers, and this is how color information is presented. So a conversion from floating point (0.804) to integer (205) is required when presenting color information in standard bit depths. A 32-bit floating point number has six significant digits (e.g. 0.523456), where the significance starts after the first nonzero digit. Large floating point, decimal numbers offer a lot of precision in displaying colors to lower bit depths. This makes floating point numbers desirable for color mapping.
Image

Having a floating decimal allows for the values to fluctuate above 1.0 and below 0. This should not occur in a properly graded color space, but is very common after tone mapping. Reducing (Y) luminance and then combining it to produce Y'CbCr will result in many floating point RGB values that are below 0 or above 1.0. This is due to the non-linear relationship between luminance and color. When adjusting white (luminance), other colors will be negatively affected because they contain different amounts of white and will not scale linearly.

Let's use an example.

The image below is taken from a camera and plotted on a standard CIE color diagram:

Image

The dots that fall within the gamut all have RGB values > 0 and less than 1.0, if they fit into the gamut. But, you'll notice some dots fall outside the gamut. Values in the top right have B (blue) < 0. Values in the bottom left have both R (red) < 0, and G (green) < 0. These are negative RGB values, which means the colors are too saturated to fit into the gamut. A color such as this cannot be shown by the available colors of the display. This is all too common in tone mapped images, as many of the dots will fall outside the gamut when converted from Y'CbCr to RGB after tone mapping.

A value such as (-0.5, 0.0, 0.0) means red information would have to be removed from any other color it is combined with. This color must be mapped back into the gamut so it can be converted into a standard integer value. The easiest way to do this is to make it (0.0, 0.0, 0.0). The oversaturated red is now pure black.

It is also possible to have color values greater than 1.0. A standard red would have a value of (1.0, 0.0, 0.0). Yet a tone mapped red can come out with values (2.0, 0.0, 0.0), which would produce a very intense, glowing red. This red pixel has too much luminance and needs to be moved back into the gamut. It becomes (1.0, 0.0, 0.0). It is simply not possible to display a 1,000 nits red on a display calibrated for 1,000 nits white.

In summary, dealing with out-of-gamut colors is a consequence of manipulating luminance and attempting to create new RGB integer values due to the non-linearity of color spaces. Pixels that were previously in gamut will become out of gamut. The techniques to deal with this are varied but will always result in some compromise to reproduce the original position of the color in the CIE diagram. Once moved into the gamut, the color is no longer the same hue, saturation and luminance as when it started, which will change the integrity of the original tone mapped image. Such color inaccuracies should be expected from any HDR display with a peak nits lower than the HDR master.

The recommended approach to handling colors after tone mapping is to preserve the hue as best as possible and adjust the saturation and luminance until the color fits into the target bit depth. This is the approach recommended by Dolby, as changes in hue will be more noticeable than changes in saturation or luminance.

P.S. So, if you download a tone mapping algorithm such as BT.2390 to map Y,  find a Y'CbCr to RGB conversion formula and clamp all RGB values to 0.0 and 1.0, you could create your own "dumb" tone mapping algorithm. This is actually not far off how most HDR displays do it.


RE: Kodi DSPlayer – DirectShow Player for Windows - ashlar - 2018-05-03

Warner306, we're lucky to have you. Thank you for all the efforts in spreading knowledge. Seriously appreciated.


RE: Kodi DSPlayer – DirectShow Player for Windows - mclingo - 2018-05-04

got an odd problem with DS, I cant bitsteam on some of my DTS stuff, if I turn bit stream off it plays fine. I have tried a fresh install to no avail and I know its DS because the same movie audio plays fine in MPC with bitstreaming.

This wont play any audio and nothing comes up on my my screen so its not sending any bitstream info to my receiver.


Audio
ID                             : 2
Format                         : DTS
Format/Info                    : Digital Theater Systems
Mode                           : 16
Format settings, Endianness    : Big
Codec ID                       : A_DTS
Duration                       : 1 h 4 min
Bit rate mode                  : Constant
Bit rate                       : 1 509 kb/s
Channel(s)                     : 6 channels
Channel positions              : Front: L C R, Side: L R, LFE
Sampling rate                  : 48.0 kHz
Frame rate                     : 93.750 FPS (512 SPF)
Bit depth                      : 16 bits
Compression mode               : Lossy
Stream size                    : 697 MiB (16%)
Language                       : English
Default                        : Yes
Forced                         : No



This plays fine however:

Audio
ID                             : 2
Format                         : DTS
Format/Info                    : Digital Theater Systems
Format profile                 : MA / Core
Mode                           : 16
Format settings, Endianness    : Big
Codec ID                       : A_DTS
Duration                       : 2 h 14 min
Bit rate mode                  : Variable / Constant
Bit rate                       : 4 981 kb/s / 1 509 kb/s
Channel(s)                     : 8 channels / 6 channels
Channel positions              : Front: L C R, Side: L R, Back: L R, LFE / Front: L C R, Side: L R, LFE
Sampling rate                  : 48.0 kHz
Frame rate                     : 93.750 FPS (512 SPF)
Bit depth                      : 24 bits
Compression mode               : Lossless / Lossy
Stream size                    : 4.68 GiB (33%)
Language                       : English
Default                        : Yes
Forced                         : No


This also wont bitstream

Audio
ID                             : 2
Format                         : DTS
Format/Info                    : Digital Theater Systems
Mode                           : 16
Format settings, Endianness    : Big
Codec ID                       : A_DTS
Duration                       : 2 h 14 min
Bit rate mode                  : Constant
Bit rate                       : 1 509 kb/s
Channel(s)                     : 6 channels
Channel positions              : Front: L C R, Side: L R, LFE
Sampling rate                  : 48.0 kHz
Frame rate                     : 93.750 FPS (512 SPF)
Bit depth                      : 24 bits
Compression mode               : Lossy
Stream size                    : 1.42 GiB (13%)
Language                       : English
Default                        : Yes
Forced                         : No


Anyone any ideas?


RE: Kodi DSPlayer – DirectShow Player for Windows - mclingo - 2018-05-04

actually hold fire on this, it might be LAV filters, just realized bit streaming was turned off on MPC, I need to check this again.


RE: Kodi DSPlayer – DirectShow Player for Windows - CraftyClown - 2018-05-04

(2018-05-04, 22:13)mclingo Wrote: got an odd problem with DS, I cant bitsteam on some of my DTS stuff, if I turn bit stream off it plays fine. I have tried a fresh install to no avail and I know its DS because the same movie audio plays fine in MPC with bitstreaming.

This wont play any audio and nothing comes up on my my screen so its not sending any bitstream info to my receiver.


Audio
ID                             : 2
Format                         : DTS
Format/Info                    : Digital Theater Systems
Mode                           : 16
Format settings, Endianness    : Big
Codec ID                       : A_DTS
Duration                       : 1 h 4 min
Bit rate mode                  : Constant
Bit rate                       : 1 509 kb/s
Channel(s)                     : 6 channels
Channel positions              : Front: L C R, Side: L R, LFE
Sampling rate                  : 48.0 kHz
Frame rate                     : 93.750 FPS (512 SPF)
Bit depth                      : 16 bits
Compression mode               : Lossy
Stream size                    : 697 MiB (16%)
Language                       : English
Default                        : Yes
Forced                         : No



This plays fine however:

Audio
ID                             : 2
Format                         : DTS
Format/Info                    : Digital Theater Systems
Format profile                 : MA / Core
Mode                           : 16
Format settings, Endianness    : Big
Codec ID                       : A_DTS
Duration                       : 2 h 14 min
Bit rate mode                  : Variable / Constant
Bit rate                       : 4 981 kb/s / 1 509 kb/s
Channel(s)                     : 8 channels / 6 channels
Channel positions              : Front: L C R, Side: L R, Back: L R, LFE / Front: L C R, Side: L R, LFE
Sampling rate                  : 48.0 kHz
Frame rate                     : 93.750 FPS (512 SPF)
Bit depth                      : 24 bits
Compression mode               : Lossless / Lossy
Stream size                    : 4.68 GiB (33%)
Language                       : English
Default                        : Yes
Forced                         : No


This also wont bitstream

Audio
ID                             : 2
Format                         : DTS
Format/Info                    : Digital Theater Systems
Mode                           : 16
Format settings, Endianness    : Big
Codec ID                       : A_DTS
Duration                       : 2 h 14 min
Bit rate mode                  : Constant
Bit rate                       : 1 509 kb/s
Channel(s)                     : 6 channels
Channel positions              : Front: L C R, Side: L R, LFE
Sampling rate                  : 48.0 kHz
Frame rate                     : 93.750 FPS (512 SPF)
Bit depth                      : 24 bits
Compression mode               : Lossy
Stream size                    : 1.42 GiB (13%)
Language                       : English
Default                        : Yes
Forced                         : No


Anyone any ideas?
 Probably a stupid question, but under DSPlayer / Filters / Audio decoder, do you have everything switched on?


RE: Kodi DSPlayer – DirectShow Player for Windows - Warner306 - 2018-05-05

As side to my previous post, this is a tone mapped image from madVR:

1,000 nits BT.2020 -> 200 nits BT.709 (500 target nits)

The bright yellow in the back clearly didn't fit into the gamut, as each algorithm handles this color differently. I have no idea what color it was when the colorist graded the HDR master, but madVR has estimated it to be a bright yellow.

The image is actually a lot brighter on my display. I've tried increasing the brightness of my SDR calibration and I'm already finding HDR content to be very bright. I don't have plans to buy an UHD display in the near future, so HDR -> SDR tone mapping will have to suffice.

It really doesn't look too dim at all. Most people are used to watching 100 nits SDR content at 200-400 nits, so it is washed out. HDR content tone mapped to SDR will have significantly more contrast as 0-100 nits information can't be stretched by a bright display; it is always rendered faithfully as per the PQ gamma standard and most tone mapping algorithms also leave 0-100 nits undisturbed. Some people may find black to white to be a little dark because of the lack of a dynamic gamma. This is done to leave room from 100 to 10,000 nits for spectral highlights.


RE: Kodi DSPlayer – DirectShow Player for Windows - Warner306 - 2018-05-05

MPC-HC uses the same audio renderer as DSPlayer (Sanear). MPC-BE uses a different audio renderer. You might have to try another audio renderer or just play that one file with MPC.


RE: Kodi DSPlayer – DirectShow Player for Windows - mclingo - 2018-05-05

took a system restore to fix my issue, suspect corrupted gfx driver or something

edit - tracked the issue down to use DTS framing for all DTS types, this was ticked, NEV says this shouldnt be used really as it cause problems, its not removed from LAV and DS, all back to fully working Smile


RE: Kodi DSPlayer – DirectShow Player for Windows - CraftyClown - 2018-05-06

Hey fellas,

I think there may be something a bit wonky with my DSPlayer settings but I can't pinpoint where the problem is.

Basically I cannot for the life of me get FSE mode working, whatever I do, however it works perfectly in MPC.

I've adjusted everything I can think of in DSPlayer to get it working, but without success. 

Can anyone help me work out where the problem is?


RE: Kodi DSPlayer – DirectShow Player for Windows - Warner306 - 2018-05-06

(2018-05-06, 02:37)CraftyClown Wrote: Hey fellas,

I think there may be something a bit wonky with my DSPlayer settings but I can't pinpoint where the problem is.

Basically I cannot for the life of me get FSE mode working, whatever I do, however it works perfectly in MPC.

I've adjusted everything I can think of in DSPlayer to get it working, but without success. 

Can anyone help me work out where the problem is?
 Issues with fullscreen exclusive mode are almost always driver related. It is working fine for me with DSPlayer, so I don't think you can blame DSPlayer, even if it is working with MPC. A different driver might fix it, but all drivers might display the same behaviour. You would have to experiment.

There isn't anything you can do that I know of. What is your underlying need for fullscreen exclusive mode? There is almost certainly a workaround that won't impact image quality that involves using windowed mode instead.


RE: Kodi DSPlayer – DirectShow Player for Windows - CraftyClown - 2018-05-06

(2018-05-06, 19:37)Warner306 Wrote:
(2018-05-06, 02:37)CraftyClown Wrote: Hey fellas,

I think there may be something a bit wonky with my DSPlayer settings but I can't pinpoint where the problem is.

Basically I cannot for the life of me get FSE mode working, whatever I do, however it works perfectly in MPC.

I've adjusted everything I can think of in DSPlayer to get it working, but without success. 

Can anyone help me work out where the problem is?
 Issues with fullscreen exclusive mode are almost always driver related. It is working fine for me with DSPlayer, so I don't think you can blame DSPlayer, even if it is working with MPC. A different driver might fix it, but all drivers might display the same behaviour. You would have to experiment.

There isn't anything you can do that I know of. What is your underlying need for fullscreen exclusive mode? There is almost certainly a workaround that won't impact image quality that involves using windowed mode instead. 
 Truthfully there is no reason I need it, i'm just curious as to why DSPlayer has difficulty entering it.

I did some extensive testing today and discovered that it does sometimes enter FSE but there appears to be no rhyme or reason as to when or why it will or won't. In MPC it works consistently.

It does make me think that the problem does lie at either the Kodi or DSPlayer end. I'm wondering if something is pulling focus away from FSE, perhaps a plugin?

On my travels through the settings, it did bring another question I had been meaning to ask you to mind; If I have the "switch to matching display modes" button selected under display modes in MadVR, is there any purpose in having the refresh rate switching options active in Kodi? I ask because in your two guides for MadVR settings and DSPlayer settings, you show both of them as active. Are there any negatives to having both active? Or should I go with one over the other?