Scaling AlgorithmsImage scaling is one of the main reasons to use madVR. It offers very high quality scaling options that rival or best anything I have seen.
Most video is stored using
chroma subsampling in a 4:2:0 video format.
In simple terms, what this means is that the video is basically stored as a black-and-white “detail” image (luma) with a lower resolution “color” image (chroma) layered on top.
This works because the detail image helps to mask the low resolution of the color image that is being layered on top.
So the scaling options in madVR are broken down into three different categories:
Chroma Upscaling, which is the color layer.
Image Upscaling, which is the detail (luma) layer.
Image downscaling, which only applies when the image is being displayed at a lower resolution than the source—1080p content on a 720p display, or in a window on a 1080p display for example.
Chroma upscaling is performed on all videos—it takes the quarter resolution chroma image, and upscales it to the native luma resolution of the video. If there is any further scaling to be performed; whether that is upscaling or downscaling, then the image upscaling/downscaling algorithm is applied to both chroma and luma.
There are a number of different scaling algorithms available in madVR, and what you choose depends on both the performance of the video card in your system, and personal preference.
Image scaling is a balancing act (mostly) between three variables:
Sharpness is an obvious one—it's how sharp the image appears.
Aliasing is often seen as jagged edges on diagonal lines/curves rather than smooth edges, or as moiré patterns if you are downscaling.
Ringing often shows as “halo” artefacts or darkened edges around bright objects, which can sometimes give the appearance of additional sharpness.
madVR gives you a rough guide when selecting algorithms, but may be misleading in some cases.
In terms of scaling performance (rendering speed, not image quality) the algorithms in madVR are roughly tiered as:
High Performance:
Medium Performance:
- Mitchell-Netravali
- Catmull-Rom
- Bicubic
- SoftCubic
Low Performance:
Depending on your graphics card, the DXVA2 option may either be a high performance option, or a medium performance one.
There is also an anti-ringing filter, and a linear light option, both of which increase GPU demands when enabled. (though I do not recommend the linear light option in most cases)
Initially, your goal should be smooth video playback rather than the best image quality, so I would recommend setting all scaling algorithms to Bilinear.
I will write up a post later that will go into detail about the differences between scaling algorithms, and which ones I recommend based on their performance and image quality.
As a rough guide,
this image was based on settings I recommended after some discussion over at the
Doom9 madVR topic.
RenderingThis section deals with what are mostly performance-related settings, and options that may be required to get the best performance out of your specific graphics card.
Unless you are actually experiencing performance issues,
most of these settings are best left alone.
General SettingsI have never used madVR on XP, so I couldn't tell you what the
use managed upload textures setting does.
The
delay playback start until render queue is full options will pause the video playback until a number of frames have been rendered in advance of playback. This potentially avoids some stuttering right at the start of video playback, or after seeking through a video—but it will add a slight delay to both. It is disabled by default, but I prefer to have it enabled.
If you are having problems where a video fails to start playing, this is the first option I would disable when troubleshooting.
Enable windowed overlay changes the way that windowed mode is rendered, and will generally give you better performance. The downside to windowed overlay is that you cannot take screenshots of it with the “Print Screen” key on your keyboard, and any transparent aspects of Media Center's UI which overlays the video might look a bit strange. Other than that, it's mostly a “free” performance increase for people running Windows 7/8.
It does not work with AMD graphics cards.Enable automatic fullscreen exclusive mode allows madVR to use “fullscreen exclusive mode” for video rendering. This can potentially give you some big performance improvements, and allows for several frames to be sent to the video card in advance, which can help eliminate random stuttering during playback. It will also prevent things like notifications from other applications being displayed on the screen at the same time, and similar to the Windowed Overlay mode, it stops “Print Screen” from working.
The main downside to Fullscreen Exclusive mode is that when switching in/out of FSE mode, the screen will flash black for a second. (similar to changing refresh rates)
Media Center's mouse-based interface is rendered in such a way that it would not be visible in FSE mode, so madVR gets kicked out of FSE mode any time you use it, and you get that black flash on the screen. I personally find this distracting, and as such, have disabled FSE mode, because I don't need the additional performance for smooth playback on my computer. (I have an Nvidia GTX 570) The "10ft interface" is unaffected, and renders correctly inside FSE mode.
Disable desktop composition This option will disable Aero during video playback. Back in the early days of madVR this may have been necessary on some systems, but I don't recommend enabling this option now. Typically the main thing that happens is that it breaks v-sync and you get
screen tearing. (horizontal lines over the video)
Use a separate device for presentation. By default this option is now disabled, but I see a big increase in performance when it is enabled using Nvidia graphics cards. You will have to experiment with this one.
Use a separate device for DXVA processing similar to the option above, this may or may not improve performance.
CPU/GPU Queue Size This sets the size of the decoder queue (CPU) and upload/render queues. (GPU)
Unless you are experiencing problems, I would leave it at the default settings of 12/8. The higher these queue sizes are, the more memory madVR requires. With larger queues you could potentially have smoother playback on some systems, but increased queue sizes also mean increased delays when seeking if the
delay playback… options are enabled. Depending on your system, if you are having trouble getting smooth playback with madVR, sometimes turning the queue sizes all the way up
or all the way down seems to help. It really depends on the machine.
Updated 13/06/2013: As of madVR 0.86.2, the decoder queue can now be increased to a maximum of 128 frames. In my experience, this increases the amount of RAM madVR uses to around 800MB with 1080p video. It may also greatly slow down seeking or switching between full-screen/windowed modes when
delay playback… is enabled. If you have the memory to spare, and your system is capable of filling the queues, it may result in smoother video playback. (far less chance of dropped frames occurring) In general, the decoder queue should only be set as high as your system can actually fill. There's no point in setting it to 128 frames if your system can only fill 30/128.
Windowed ModeAs the name suggests, these settings apply to madVR running in Windowed Mode. That means they apply when madVR is running in a Window, or when Fullscreen Exclusive mode is disabled.
Increasing the number of backbuffers could potentially result in smoother playback at the cost of increased memory usage. As always, I recommend leaving these settings at the defaults.
However, if you plan on using Smooth Motion, I would recommend setting them to the maximum of 8.
The flush settings could potentially be used to get more performance out of a struggling system, but these days they are largely unnecessary and best left alone.
Exclusive Mode SettingsShow seek bar has no effect if you are using Media Center—it draws a seek bar which can be used in FSE mode without kicking you back to Windowed Mode—but Media Center disables this and uses its own UI anyway.
Delay switch to exclusive mode by 3 seconds. If your media player switches into fullscreen mode, and FSE is enabled, it will always switch instantly.
This option is for when something such as Media Center's mouse-controlled UI breaks FSE mode and kicks it into Windowed Mode. If the option is enabled, it will wait 3 seconds returning to FSE mode, rather than switching instantly.
This can be useful if you are going to make a couple of changes, such as switching subtitle track, and adjusting its size and position, without it going in/out of FSE mode each time you bring up the menus.
Present several frames in advance should always be enabled. Disabling this puts madVR into the legacy FSE mode, which has not been supported for years at this point.
Similar to the Windowed Mode option, I would recommend leaving madVR presenting 4 frames in advance, as is the default, unless you are going to be using Smooth Motion, in which case you should set it to the maximum. You may need to increase the CPU/GPU queues accordingly to fill the buffer.