Kodi DSPlayer – DirectShow Player for Windows
6. SAMPLE SETTINGS PROFILES, PROFILE RULES & ADVANCED SETTINGS

It is important to know your graphics card when using madVR, as the program relies heavily on this hardware. Due to the large performance variability in graphics cards and the breadth of possible madVR configurations, it can be difficult to recommend settings for specific GPUs. However, I’ll attempt to provide a starting pointing for settings by using some examples with my personal hardware. The example below demonstrates the difference in madVR performance between an integrated graphics card and a dedicated gaming card.

I have a laptop with an Intel HD 3000 graphics processor and Sandy Bridge i7. I can run madVR with the following settings:
  • Chroma: Bicubic100 + AR
  • Image: Lanczos3 + AR
  • Image doubling: Off
  • Upscaling refinement: Off
  • Artifact removal - Debanding: Off
  • Image enhancements: Off
  • Dithering: Ordered
I am upscaling primarily 24 fps content to 1080p24. Subjectively, the picture quality is superior to Kodi DXVA upscaling with less noise, noticeable color banding and improved color accuracy. DXVA upscaling with Intel processors uses something similar to Lanczos3 + AR already. This is probably why the picture seems similar: Lanczos produces a crisp, coarse scaling that is very identifiable.

Integrated graphics cards are best used with Artifact removal turned off and Dithering set to Ordered.

I also have an older HTPC with a Nvidia GTS 450 and Core 2 Duo CPU.

A dedicated gaming card allows the flexibility to use more demanding scaling algorithms, add sharpening, debanding and increase the quality of dithering. Settings assume all trade quality for performance checkboxes are unchecked save the one related to subtitles.

Given the flexibility a gaming card provides, I will offer three different scenarios based on common resizes:

Display: 1920 x 1080p

Resizes:
  • 1080p -> 1080p
  • 720p -> 1080p
  • SD -> 1080p
Scaling factor: Increase in vertical resolution or pixels per inch.

Profile: "1080p"

1080p -> 1080p
1920 x 1080 -> 1920 x 1080
Increase in pixels: 0
Scaling factor: 0

At 1080p, image upscaling is unnecessary. Instead, the settings to be concerned with are Chroma upscaling, which is applied to all videos, Image enhancements — the lone form of image sharpening available for native content and Dithering. Debanding is also useful for 8-bit sources, which often display some form of banding even when the source is uncompressed.
  • Chroma: super-xbr100 + AR
  • Image: Jinc3 + AR
  • Image doubling: Off
  • Upscaling refinement: Off
  • Artifact removal - Debanding: Medium/High
  • Image enhancements: crispen edges (0.6)
  • Dithering: Error Diffusion 2
Profile: "720p"

720p -> 1080p
1280 x 720 -> 1920 x 1080
Increase in pixels: 2.25x
Scaling factor: 1.5x

At 720p, image upscaling is introduced. Upscaling the luma channel is most important in resolving image detail. As such, settings for Image upscaling followed with Upscaling refinement are most important for upscaled sources.

When resizing, any added sharpening should be applied from Upscaling refinement. This due to the fact sharpening is applied to the post-resized as opposed to the pre-resized image. The result is more natural with less likelihood of oversharpening.

SuperRes is my preferred post-resize sharpener, which is added at a low level to enhance perceived detail. I also like crispen edges; just turning it on to counter the soft edges left by SuperRes.
  • Chroma: super-xbr100 + AR
  • Image: Jinc3 + AR
  • Image doubling: Off
  • Upscaling refinement: crispen edges (0.1), SuperRes (1)
  • Artifact removal - Debanding: Medium/High
  • Image enhancements: Off
  • Dithering: Ordered
If your GPU is capable, overscaling the image with Image doubling and downscaling may yield greater results.

Profile: "SD"

SD -> 1080p
640 x 480 -> 1920 x 1080
Increase in pixels: 6.75x
Scaling factor: 2.25x

By the time SD content is reached, the scaling factor starts to become quite large (2.25x). Here, the image becomes soft due to the errors introduced by upscaling. Countering this soft appearance is possible by introducing more sophisticated image upscaling provided by madVR's Image doubling. Image doubling does just that – it takes the full resolution luma and chroma information and scales it by factors of two to reach the desired resolution (2x for a double and 4x for a quadruple). If larger than needed, the result is interpolated down to the target.

Doubling a 720p source to 1080p involves overscaling by 0.5x and downscaling back to the target resolution. Improvements in image quality may go unnoticed in this case. However, image doubling applied to larger resizes of 480p to 1080p or 1080p to 2160p will, in most cases, result in the highest-quality image.

Given its importance, other settings may have to be reduced to accommodate Image doubling. Outside of this change, other settings resemble those for 720p sources.

SD content can still appear soft after image doubling. SuperRes is applied from Upscaling refinement to sharpen things further. Lastly, I use crispen edges to counter the soft edges and bloat left by SuperRes.

SD Image doubling:
  • Chroma: super-xbr100 + AR
  • Image: Jinc3 + AR
  • Double Luma: 2x or greater - super-xbr100
  • Double Chroma: 2x or greater - super-xbr100
  • Upscaling refinement: crispen edges (1.0), SuperRes (3)
  • Artifact removal - Debanding: Medium/High
  • Image enhancements: Off
  • Dithering: Ordered
Replacing super-xbr with Jinc is an alternative. When combined with high SuperRes values, super-xbr can produce an image that is quite sharp. Jinc is softer but also produces less ringing. This will lead to an image that some may find is more natural in contrast to the stark sharpness of super-xbr. If your card can tolerate NNEDI3 Image doubling, by all means use it.

SD Regular upscaling:
  • Chroma: super-xbr100 + AR
  • Image: Jinc3 + AR
  • Image doubling: Off
  • Upscaling refinement: crispen edges (1.0), SuperRes (3)
  • Artifact removal - Debanding: Medium/High
  • Image enhancements: Off
  • Dithering: Ordered
Creating madVR Profiles

The above profiles are translated into madVR profile rules.

Add this code to each profile group (as pictured):

if (srcWidth > 1280) "1080p"
else if (srcWidth <= 1280) and (srcHeight > 720) "1080p"

else if (srcWidth > 960) and (srcWidth <= 1280) "720p"
else if (srcWidth <= 960) and ((srcHeight > 540) and (srcHeight <= 720)) "720p"

else if (srcWidth <= 960) and (srcHeight <= 540) "SD"

deintFps (the source frame rate after deinterlacing) is another factor on top of the source resolution that greatly impacts the load placed on madVR. Doubling the frame rate, for example, doubles the load placed on madVR. Profile rules such as (deintFps <= 24) and (deintFps > 24) may be combined with srcWidth and srcHeight to create additional profiles.

A more "fleshed-out" set of profiles incorporating the source frame rate might look like this:
  • "1080p24"
  • "1080p60"
  • "720p24"
  • "720p60"
  • "SD24"
  • "SD60"
Disabling Image upscaling for Cropped 1080p Videos:

You may encounter some 1080p videos cropped just short of their original size (e.g. width = 1916). Those few missing pixels will put an abnormal strain on madVR as it tries to resize to the original display resolution. zoom control in the madVR control panel contains a setting to disable image upscaling if the video falls within a certain range (e.g. 10 lines or less). Disabling scaling adds a few black pixels to the video and prevents the image upscaling algorithm from resizing the image. This may prevent cropped videos from pushing madVR over the rendering queue.

madVR Profile Rules:
Image
Link: How to Configure madVR Profile Rules

Let's repeat this process, this time assuming the display resolution is 3840 x 2160p (4K UHD). Two graphics cards will be used for reference. A Medium-level card such as the GTX 960, and a High-level card similar to a GTX 980. Again, the source frame rate is assumed to be 24 fps.

Display: 3840 x 2160p

Resizes:
  • 2160p -> 2160p
  • 1080p -> 2160p
  • 720p -> 2160p
  • SD -> 2160p
Scaling factor: Increase in vertical resolution or pixels per inch.

Profile: "2160p"

2160p -> 2160p
3840 x 2160 -> 3840 x 2160
Increase in pixels: 0
Scaling factor: 0

This profile is identical in appearance to that for a 1080p display. Without image upscaling, the focus is on settings for Chroma upscaling, Image enhancements, Debanding and Dithering.

Medium:
  • Chroma: super-xbr100 + AR
  • Image: Jinc3 + AR
  • Image doubling: Off
  • Upscaling refinement: Off
  • Artifact removal - Debanding: Medium/High
  • Image enhancements: crispen edges (0.6)
  • Dithering: Error Diffusion 2
High:
  • Chroma: NNEDI3 128 neurons
  • Image: Jinc3 + AR
  • Image doubling: Off
  • Upscaling refinement: Off
  • Artifact removal - Debanding: Medium/High
  • Image enhancements: crispen edges (0.6)
  • Dithering: Error Diffusion 2
Profile: "1080p"

1080p -> 2160p
1920 x 1080 -> 3840 x 2160
Increase in pixels: 4x
Scaling factor: 2x

At an even 2x resize, Image doubling is an ideal match for HD content upscaled to UHD. For this purpose, I've picked NNEDI3 and super-xbr as the image upscalers. NNEDI3 is very resource-hungry, but its sharp, artifact-free scaling remains the gold standard of madVR image scaling. super-xbr is a more reasonable choice for mid-range cards.

To reduce the load created by NNEDI3, only Luma doubling is used. Chroma doubling is unnecessary, anyways, and the bulk of the improvement in image quality will come from the luma channel. Other settings, especially Dithering and Chroma upscaling should be downgraded to accommodate Image doubling if resources are strained.

Medium:
  • Chroma: super-xbr100 + AR
  • Image: Jinc3 + AR
  • Double Luma: 2x or greater - super-xbr100
  • Double Chroma: 2x or greater - super-xbr100
  • Upscaling refinement: crispen edges (1.0), SuperRes (3)
  • Artifact removal - Debanding: Medium/High
  • Image enhancements: Off
  • Dithering: Ordered
High:
  • Chroma: NNEDI3 32 neurons
  • Image: Jinc3 + AR
  • Double Luma: 2x or greater - NNEDI3 32 to 256 neurons
  • Double Chroma: Off
  • Upscaling refinement: crispen edges (1.0), SuperRes (3)
  • Artifact removal - Debanding: Medium/High
  • Image enhancements: Off
  • Dithering: Error Diffusion 2
Profile: "720p"

720p -> 2160p
1280 x 720 -> 3840 x 2160
Increase in pixels: 9x
Scaling factor: 3x

At a 3x scaling factor, Image quadrupling becomes possible. The image is upscaled 4x and downscaled by 1x (reduced 25%) to match the output resolution. This is the lone change from Profile 1080p.

Image quadrupling may not be a realistic setting for many graphics cards, especially when scaled via NNEDI3. In either case, some form of Image doubling remains desirable given the large scaling factor.

Medium:
  • Chroma: super-xbr100 + AR
  • Image: Jinc3 + AR
  • Double Luma: 2x or greater - super-xbr100
  • Double Chroma: 2x or greater - super-xbr100
  • Upscaling refinement: crispen edges (1.0), SuperRes (3)
  • Artifact removal - Debanding: Medium/High
  • Image enhancements: Off
  • Dithering: Ordered
High:
  • Chroma: NNEDI3 32 neurons
  • Image: Jinc3 + AR
  • Quadruple Luma: 3x or greater - NNEDI3 32 to 256 neurons
  • Quadruple Chroma: Off
  • Downscaling: SSIM + AR + LL
  • Upscaling refinement: crispen edges (1.0), SuperRes (3)
  • Artifact removal - Debanding: Medium/High
  • Image enhancements: Off
  • Dithering: Error Diffusion 2
Profile: "SD"

SD -> 2160p
640 x 480 -> 3840 x 2160
Increase in pixels: 27x
Scaling factor: 4.5x

The final resize, SD to 2160p, is a monster (4.5x!). This is perhaps the only scenario where Image quadrupling is not only useful but necessary to maintain the integrity of the original image. The image is upscaled 4x by Image doubling and the remaining 0.5x by the Image upscaling algorithm. Again, if pushed for resources, other settings should be accommodated around Image doubling, particularly Dithering and Chroma upscaling.

Medium:
  • Chroma: super-xbr100 + AR
  • Image: Jinc3 + AR
  • Quadruple Luma: 3x or greater - super-xbr100
  • Quadruple Chroma: 3x or greater - super-xbr100
  • Upscaling refinement: crispen edges (1.0), SuperRes (3)
  • Artifact removal - Debanding: Medium/High
  • Image enhancements: Off
  • Dithering: Ordered
High:
  • Chroma: NNEDI3 32 neurons
  • Image: Jinc3 + AR
  • Quadruple Luma: 3x or greater - NNEDI3 32 to 256 neurons
  • Quadruple Chroma: Off
  • Upscaling refinement: crispen edges (1.0), SuperRes (3)
  • Artifact removal - Debanding: Medium/High
  • Image enhancements: Off
  • Dithering: Error Diffusion 2
Creating madVR Profiles

These profiles can be translated into madVR profile rules.

Add this code to each profile group:

if (srcWidth > 1920) "2160p"
else if (srcWidth <= 1920) and (srcHeight > 1080) "2160p"

else if (srcWidth > 1280) and (srcWidth <= 1920) "1080p"
else if (srcWidth <= 1280) and ((srcHeight > 720) and (srcHeight <= 1080)) "1080p"

else if (srcWidth > 960) and (srcWidth <= 1280) "720p"
else if (srcWidth <= 960) and ((srcHeight > 540) and (srcHeight <= 720)) "720p"

else if (srcWidth <= 960) and (srcHeight <= 540) "SD"

madVR Image Settings Hierarchy

Beyond the above profiles, I will offer some general settings advice...

Each settings category in madVR has a minimum and maximum value, where each setting offers the possibility of higher performance at the expense of greater resources use. However, the maximum value of each category can have a dramatically different impact in improving overall image fidelity. For example, the highest level of dithering will produce a very small improvement in image quality compared to the highest level of image upscaling.

Because most settings profiles involve a compromise: where one setting must be turned down so another can be turned up. It is important to understand which settings are important and which are luxuries only to be used when extra processing resources are available.

General Rules and Caveats:
  • The human eye has difficulty detecting changes to the chroma layer compared to the black and white luma. This is why chroma subsampling is so widely-used. As such, it can be difficult to see the difference in chroma upscaling settings beyond Catmull-Rom without good eyes and appropriate test patterns.
  • Detecting the difference in dither patterns between Ordered Dithering and Error Diffusion with real-world content can be equally as challenging, especially with output bit depths of 8 bits or greater.
  • Image enhancements and upscaling refinement are forms of image enhancement — but only when applied to high-quality sources. Enhancing artifacts in low-quality sources may end up making them appear worse.
  • Debanding will benefit low-quality sources the most, where these artifacts are most present.
Video Rendering is Divided into Three Cases:
  • Image Doubling is used as the primary means to resize the image;
  • Regular Upscaling is used to resize the image;
  • Native Sources are involved, where the image is shown at its native resolution.
Settings Hierarchy: Rank order of each setting based on its relative impact in improving picture quality.

Image

Image

Tips for the Use of Image enhancements & Upscaling refinement

The use of any post-process image sharpening can be a matter of preference. It can be a great way to increase the perceived detail of a soft encode or replace some of the sharpness lost by upscaling. In madVR, sharpening is applied from either image enhancements or upscaling refinement. The drawbacks of image sharpening include possible oversharpening and the enhancement or addition of aliasing and ringing. For best practice, image sharpening should be applied under the following conditions:
  • Sharpening should only be applied once during image upscaling — at the beginning or at the end, not at the beginning and end.
  • Sharpening is most natural when applied to the post-resized image from upscaling refinement.
  • Content already resized will benefit from image enhancements.
  • Sharpening should only be applied to high-quality sources — or, garbage in, garbage out.
  • A little sharpening is better than a lot of sharpening.
  • The amount of sharpening a source can handle increases with the amount of upscaling applied.
madVR Rendering Path

The chart below is a summary of the rendering process. The image is taken directly from this thread.

Image
Reply


Messages In This Thread
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
RE: Kodi DSPlayer – DirectShow Player for Windows - by Warner306 - 2015-11-25, 23:03
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