View Full Version : madVR - high quality video renderer (GPU assisted)
e-t172
21st February 2018, 16:24
Ah, okay. But the ArgyllCMS docs explicitly state that you should not do that (https://www.argyllcms.com/doc/collink.html#q). I can't find where the exact rationale is explained but, IIRC, you don't want to generate too many points because there is a point of diminishing returns where you're basically just optimizing for measurement error and are more likely to create banding and other aberrant behavior than to actually improve color accuracy. This leads to the counter-intuitive result that interpolating provides better results than trying to achieve maximum precision, because the resulting transform is smoother.
Ver Greeneyes
21st February 2018, 16:42
Sure, I mean regardless of the fact that it's possible not to use interpolation, I don't think it really matters since we aren't pushing for madVR to do that. I suppose there is some value in noting that collink is slow despite not producing a 256³ 3DLUT directly, but I think that's just because it does everything to a very high standard. Whatever the reason, there are counterexamples showing that the process doesn't have to be that slow (and there's no reason not to cache the result).
bkrieger
21st February 2018, 16:48
Depends on your content, personally I'd drop chroma or luma scaling back if you need the headroom to hit that sweet SSIM 2D, your decision if you want to stick AR on top of that but personally I'd rather use that headroom for luma and chroma.
I am mainly watching 1080P movies
Should I drop Chroma Upscaling to NGU AA medium, and change downscaling to SSIM 2D?
Also under “ if any more Upscaling/downscaling is needed”, I have set to Let Madvr decide. Should I change these to something else?
Also, under image Upscaling, should I leave the quadrupling settings to “let madvr decide” as well as Chroma set to normal?
Lastly, what do you mean if I want to stock AR on top? What settling is that for and what should it be changed to?
Thanks
fhoech
21st February 2018, 17:33
The 3DLUT is is a better solution, technically, than it would be if madVR used the full contents of the ICC profile.
Creating complex gamut mapping is not really a focus (and doesn't need to be) of applications using ICC profiles to display imagery, irrespective if they are video renderers/players/editors or still image viewers/editors. There is no inherent technical reason why one solution would be superior to the other (pre-computed link/3D LUT vs dynamic linking of, in essence, also pre-computed cLUTs). The practical reason you can do more with a pre-computed link/3D LUT in terms of complex gamut mapping is because ICC color management modules that do the actual color transform, are by design "stupid" (same for programs applying 3D LUTs as they don't have to concern themselves with anything else than straightforward lookup through the cLUT and maybe interpolation) - all the complexity is in the profiles. That allows fast transform creation (linking) and application, and software authors can implement support more easily (even more easily if they just want to support pre-computed links).
But there's a difference between just creating a transform (linking two existing ICC profiles, for example) and inverting the "natural" profile (which for display devices is inverting the device RGB -> CIE values mapping), doing complex gamut mapping and appearance modeling (what Argyll's collink does when used with the -G inverse forward lookup gamut mapping option). The latter bunch is what takes up most time, transform creation (linking) alone is relatively trivial. You could also put all that complexity in the input and/or output profile creation instead of into the link creation (less self-contained approach though).
Also what is in an ICC profile, beyond the simple 1D LUTs, varies wildly. Often they contain simple measurements that can only be used to do a rough conversion with little or no user control over how it is done. madVR's 256x256x256 3DLUT allows full control of the conversion with very fine grained corrections being possible.
Same is true for any 3D LUT, naturally, when it comes to the result. The source and destination color spaces to be linked can come from just a few measurements, or a synthetic color space defined by only primaries and simple tone curve, or thousands of measurements or complex synthetic cLUT-based color spaces.
Wow, EVR uses an ICC profile in Windows 10 now?
That functionality has been around for well over half a decade now (not sure if it's a feature of EVR or MPC-HC).
Unfortunately there are simply too many formats or types of ICC profiles and that tool doesn't support all of them. Proper handling of most ICC profiles is a big job. :(
Argyll supports all types of profiles, but only version ICC v2.x, not ICCv4.
I don't think web browsers use ICC profiles for video, but they do support it (to some extent) for still images. (Although they support it in kind of a retarded way because they don't use the monitor ICC profile - they always use sRGB as the destination. But that's neither here nor there.)
Yes, browsers that do color management, only tend to color manage still images. IE 9+ (prior versions had no notion of color management whatsoever) and Edge use sRGB as display profile though (which is wrong and broken, could as well use no color management), Firefox does work correctly (but you really should set gfx.color_management.enablev4=true to get cLUT profile support), even though its multi-monitor support is lacking. Chrome does color management since a few versions, but it regularly seems to break in all kinds of interesting ways.
Now I imagine Firefox cuts corners to do this, and they replaced LCMS with the in-house qcms because LCMS wasn't fast enough
If I recall correctly the reason for the replacement was not speed but security concerns (which several people, me included, shook their head at at the time, and still do).
The reason the 3DLUT is so large is specifically to front-load the processing requirement, and not have to do it for every single video frame. Thats the entire purpose of such a LUT in first place - solve complex math once.
Photoshop for example isn't going to care if displaying a single image takes 100ms of color processing, its not in any area a user is going to notice. Video playback does care, hence entirely different requirements.
A performant color management solution worth it's salt will cache the transforms and re-use them if it detects same source and destination profiles, and it will apply the created transforms using hardware acceleration via a GPU, e.g. via texture lookups/shaders.
Ver Greeneyes
21st February 2018, 17:45
If I recall correctly the reason for the replacement was not speed but security concerns (which several people, me included, shook their head at at the time, and still do).
Hmm, I don't recall. I do know they designed qcms to be fast.. but they wrote the whole thing in C and gave it an upstream repository, which has resulted in it becoming basically unmaintained. The library works, but I wouldn't call it their finest moment. I wonder if anyone has considered rewriting it in rust..
e-t172
21st February 2018, 17:56
A performant color management solution worth it's salt will cache the transforms and re-use them if it detects same source and destination profiles, and it will apply the created transforms using hardware acceleration via a GPU, e.g. via texture lookups/shaders.
In the case of madVR you could be even smarter and, on top of caching, also compute the transform asynchronously. The video starts playing with slightly wrong colors for maybe a few seconds while the transform is being computed, and as soon as it's done, the transform is swapped in and color correction is active for the rest of the playback session.
fhoech
21st February 2018, 18:04
It is trivial to generate an image that has all possible colors. In fact, a full 3DLUT is, itself, by definition, an image that has all possible colors. You just need to deal with that once (not for every frame), and then you're done. In practice though, you would use sampling (only generate an image with a subset of all possible colors, such as 64³) and then interpolate, as described above.
Exactly. You then push that (e.g.) 64^3 image through your transform, and the resulting image is your 3D LUT. Cache it, use it. Over and over. 60, 120, 240, or any number of times per second that you need. GPUs are made for that, speed is not an issue unless you have texture sizes that no longer fit into the graphics card memory.
Huh? I didn't know that madVR could interpolate from a 64³ 3DLUT.
madVR can load eeColor 3D LUT files, which are 65^3 by design.
fhoech
21st February 2018, 18:14
I do know they designed qcms to be fast..
I have a feeling they achieved speed mostly by leaving out all the parts of a CMM that deal with complex transforms (i.e., cLUT profiles). Naturally, they could be fast when they didn't even do color management :)
In the case of madVR you could be even smarter and, on top of caching, also compute the transform asynchronously. The video starts playing with slightly wrong colors for maybe a few seconds while the transform is being computed, and as soon as it's done, the transform is swapped in and color correction is active for the rest of the playback session.
Not even sure that would be needed. Transform creation using LCMS should take mere milliseconds on a moderately modern system (as it's only linking). I may be wrong, but I think the main time spent is probably reading the files from disk, and then a couple more milliseconds to apply the transform to the input 'cLUT' image (the result of which will be the final 3D LUT).
e-t172
21st February 2018, 18:32
I meant that in case someone wants to go through the full gamut mapping process (i.e. the equivalent of collink -G) on the fly. But as you said, it is debatable whether that's really that useful in the first place.
leeperry
21st February 2018, 18:33
If all you need is gamut mapping, this script works like a charm in mVR: http://www.avsforum.com/forum/26-home-theater-computers/912720-color-correction-htpc-simpler-solution-now-really-works.html
Feel free to use a Windows LUT on top if need be.
IME on test patterns it outputs identical results to 3DLUT's with a perfectly calibrated TV using CMUNDIS + Color.HCFR.
You can setup automatic PotPlayer profiles using different gamut mappings based on resolution and/or framerate, works like a champ and you can roll them with a mouse click too :)
e-t172
21st February 2018, 18:41
leeperry: it looks like your solution is just simple matrix conversion (as opposed to a 3DLUT-based solution). It will do gamut mapping alright, just not in a very accurate way, especially if your monitor is not perfectly linear. Also part of of this discussion is about making it easier for madVR users to get perfect color correction by simply doing the right thing out-of-the-box as soon as an ICC profile is configured for the monitor in which video is playing, and asking them to write shader code or setting up complex profiles goes a bit against that don't you think :)
(I also have the suspicion that naive matrix-based transforms will give poor results if the source gamut is very different from the destination gamut, e.g. DCI-P3 -> BT.709, because the mapping is very inflexible and any non-linearities get magnified. I'm just speculating though.)
ryrynz
21st February 2018, 22:30
I am mainly watching 1080P movies
Should I drop Chroma Upscaling to NGU AA medium, and change downscaling to SSIM 2D?
You should have a bit more performance available than I do so you may get away with high.. but yes, I have chroma set to NGU AA medium, NGU sharp set to high (very high is hardcore, btw madshi setting in between these please? xP)
You can get SSIM 2D by 'use "image downscaling" settings' and having SSIM 2D set there.
Also under “ if any more Upscaling/downscaling is needed”, I have set to Let Madvr decide. Should I change these to something else?
No, that's fine.
Also, under image Upscaling, should I leave the quadrupling settings to “let madvr decide” as well as Chroma set to normal?
Quadrupling doesn't gain you much generally, and certainly you won't be doing this with 1080 content, so leaving it is fine.
Lastly, what do you mean if I want to stock AR on top? What settling is that for and what should it be changed to?
"Stack AR on top" "AR" is Anti-ringing, it's a tick box under 'downscaling'. Personally I prefer the added sharpness with it not being ticked (plus I need the extra headroom) I keep sharpeners for at the end if required, I find supersampling and downscaling first achieves more pleasing results.
bkrieger
21st February 2018, 22:39
Thank You very much. I actually do have the AR filter checked, I have it set to relaxed.
Thanks
Oguignant
22nd February 2018, 01:00
Hi !!! One question, what version of Nvidia driver works MadVr + HDR + 12bits 23hz?
385.26, 385.69 or 390.77
ryrynz
22nd February 2018, 01:16
Use 390.77, I'm aware of no issues with it with madVR.
Asmodian
22nd February 2018, 02:55
Yes, 390.77 has some good fixes for HDR and no regressions I know of. Still weirdness with custom resolutions sometimes but that is in all the options. :(
cremor
22nd February 2018, 07:23
Could you please specify what the problems with custom resolutions in the driver are?
I'm interested because I recently started using the custom display mode optimization in madVR and have problems getting anything better than 1 drop/repeat every 2 hours. Even after 6 optimizations, each with over 30 minutes of data collection time, I'm still usually in the 1 hour range. Is this somehow related?
Asmodian
22nd February 2018, 10:15
No, it is an error message that the mode cannot be applied at all. Your issue may be madVR not switching to the actual custom resolution, try applying it manually. I have had that issue before as well, actually I suppose that might be another driver issue with the custom resolution API, but it wasn't the one I was talking about. :o
jkauff
22nd February 2018, 12:31
I'm interested because I recently started using the custom display mode optimization in madVR and have problems getting anything better than 1 drop/repeat every 2 hours. Even after 6 optimizations, each with over 30 minutes of data collection time, I'm still usually in the 1 hour range. Is this somehow related?
Perhaps you'll do better, but even a one hour range should make the repeated frame totally unnoticeable during actual viewing (as opposed to watching the OSD). My GTX 1080 rejects lots of the optimized settings, but I'm perfectly satisfied with anything one hour or greater.
j82k
22nd February 2018, 16:23
Am I correct in thinking that by having one frame drop/repeat per hour that the audio would slowly go out of sync by up to 42 ms (1 frame) within that hour and then reset back to 0 once the drop/repeat happens?
ashlar42
22nd February 2018, 18:12
It's too bad that an online petition to Nvidia to solve once and for all the clusterfuck they have had for years and years with custom resolutions won't get anywhere. It's absolutely unbelievable that this is still giving problems.
Siso
22nd February 2018, 21:21
It's too bad that an online petition to Nvidia to solve once and for all the clusterfuck they have had for years and years with custom resolutions won't get anywhere. It's absolutely unbelievable that this is still giving problems.
You are very right, but I really doubt that they will ever fix it...
steakhutzeee
22nd February 2018, 22:12
I'm reading a lot and hardly trying to figure out how I know when I simply need to enable deinterlacing and when I need IVTC.
I never seen IVTC turned on automatically, don't know why. Possibile that i never played a telecine source? No. So why my sources are not detected as telecined, so film?
Don't remember who said that automatically source type detection doesn't work. So actually only deinterlacing is turned on when an interlaced source is played.
I understand the difference between interlaced and telecine but don't know how to recognize them...
I have a pal dvd, how I know if I only need deinterlacing or I need IVTC?
I assume that a movie is filmed on film. Not always. So to reproduce it on TV monitors, with a DVD player for example, the telecine process is used. So to reproduce it on a progressive monitor i need IVTC to restore original 24 frames from the 59 resulting from the telecine.
But at the same time, I assume that every movie aired in TV is telecined. But I'm certainly wrong on this.
This for film. Video is interlaced. I can see video in series or on DVD extra for example. In that case I simply need deinterlacing and not IVTC.
Because the source is not film so I don't need to return to the base resolution but just to deinterlace the image.
I'm really trying to figure out this.
I assume, but this is only a suposition, that everything that's not a movie, aired on TV needs only deinterlacing because it's basically a video, like commercials.
Movies instead need IVTC.
Please don't cut my head off if I said someting (or all) wrong. I'm really taking note of the difference.
Atm I created two profiles.
One of these I called DVD. In it I use lighter scalers to avoid dropped frames caused by deinterlacing process.
For the rest I use my other base profile.
But in my dvd profile, how I know if I only need deinterlacing or IVTC?
nussman
22nd February 2018, 22:23
IVTC = inverse telecine? This is for NTSC DVD with 59,xx fields (23,xx source => 3:2 => 29,xx frames => 59,xx fields).
For Pal DVD (23,xx source => pal speedup => 25p => 50 fields) you dont need inverse telecine.
steakhutzeee
22nd February 2018, 22:31
IVTC = inverse telecine? This is for NTSC DVD with 59,xx fields (23,xx source => 3:2 => 29,xx frames => 59,xx fields).
For Pal DVD (23,xx source => pal speedup => 25p => 50 fields) you dont need inverse telecine.So I basically only need deinterlacing on them?
Schwartz
22nd February 2018, 22:38
Got a madVR / Driver Stopped Responding crash here, latest version and latest 18.2.2 AMD drivers on a R9 270X. Windows 8.1.
The crash occured when I was seeking a passthrough Twitch stream in MPC-HC, while a second instance of MPC-HC had a movie paused.
https://pastebin.com/ZvprjHaD
LigH
22nd February 2018, 22:40
@ steakhutzeee:
No, absolutely not basically. "Exotic Interlacing" (originally by scharfis_brain in German, translated to English by StainlessS) lists a bunch of uses and abuses of different ways to norm-convert video. Not all of them can be repaired with satisfying quality anymore...
nussman
22nd February 2018, 22:43
@steakhutzeee : Yes.
"force film mode" = "weave deinterlacing" (50 fields => 25 frames)
"video mode" = GPU deinterlacer (50 fields => 50 frames)
steakhutzeee
22nd February 2018, 22:44
Yeah.
"force film mode" = "weave deinterlacing" (50 fields => 25 frames)
"video mode" = GPU deinerlacer (50 fields => 50 frames)Wait just a moment, can you clarify this a little? Thanks [emoji21]
steakhutzeee
22nd February 2018, 22:48
@ steakhutzeee:
No, absolutely not basically. "Exotic Interlacing" (originally by scharfis_brain in German, translated to English by StainlessS) lists a bunch of uses and abuses of different ways to norm-convert video. Not all of them can be repaired with satisfying quality anymore...Searching it but no luck. Where I can find it? Thanks!
LigH
22nd February 2018, 22:50
In the MediaFire link (https://www.mediafire.com/folder/hb26mthbjz7z6/StainlessS) in the signature of StainlessS (https://forum.doom9.org/member.php?u=175358). In the DATA folder there, I believe.
Interlacing_by_Scharfis_Brain.zip (http://www.mediafire.com/file/kkw0j7z2fme3289/Interlacing_by_Scharfis_Brain.zip)
nussman
22nd February 2018, 23:00
Wait just a moment, can you clarify this a little? Thanks [emoji21]
I am not 100% sure what madVR does in "film mode".
Anyway you do not need inverse telecine for Pal DVD's.
Did you try to disable deinterlacing for DVD's?
steakhutzeee
23rd February 2018, 00:37
In the MediaFire link (https://www.mediafire.com/folder/hb26mthbjz7z6/StainlessS) in the signature of StainlessS (https://forum.doom9.org/member.php?u=175358). In the DATA folder there, I believe.
Interlacing_by_Scharfis_Brain.zip (http://www.mediafire.com/file/kkw0j7z2fme3289/Interlacing_by_Scharfis_Brain.zip)Thanks!!!!
steakhutzeee
23rd February 2018, 00:37
I am not 100% sure what madVR does in "film mode".
Anyway you do not need inverse telecine for Pal DVD's.
Did you try to disable deinterlacing for DVD's?Yes I tried, just now I'm watching a dvd. And I can't see any difference. How possibile?
I thought I need it.
Lav reads that the file is interlaced so send this info to madvr. I think it works this way.
In fact madvr says, deinterlacing on (says upstream).
Ruler...
23rd February 2018, 06:45
Many thanks!
khanmein
23rd February 2018, 07:29
@Ruler FYI, your C32HG70 monitor is not a real 10-bit but, 8-bit + FRC. Apparently, you need a Quadro or Radeon Pro to support it. Literally, no consumer (GeForce/Radeon/Intel) GPUs support true 10-bit rendering.
Asmodian
23rd February 2018, 08:00
No, madVR can render in 10-bit perfectly well on almost any GPU out now but only when fullscreen. Both Nvidia's and AMD's standard consumer GPUs can output 12-bit to anything that supports it.
-sTi-
23rd February 2018, 09:32
I also have some questions regarding deinterlacing/IVTC in MPC-HC with madVR:
1. What is generally better quality, GPU deinterlacing (NVIDIA 1050Ti) or software (YADIF)? If both are equal, which option is more efficient and lets me spend more GPU resources for upscaling etc.?
2. If I choose Software deinterlacing (YADIF), and it is active e.g. for an interlaced PAL DVD, madVR reports the correct framerate (50fps) but tells me "deinterlacing off". Why?
3. If I choose Software deinterlacing with an IVTC source, what exactly happens? Does YADIF correctly perform IVTC or does it (wrongly?) deinterlace? I am asking because there seems to be no way to activate IVTC in madVR because YADIF already sends the double framrate to madVR.
4. IIRC, native D3D11 decoding cannot be used with GPU deinterlacing. But can it be used together with Software (YADIF) deinterlacing?
Thank you for helping me out!
huhn
23rd February 2018, 09:51
1. there is no general answer to that at the moment nvidia deinterlancing is broken and really bad but that doesn't mean it will always looking worse than YADIF.
2. because the source is already deinterlaced no need to deinterlance a deinterlaced source.
3. it get's deinterlaced so no it doesn't get IVTC and sources are either telecine, PsF or interlanced.
4. d3d11 >native< doesn't support hardware deinterlancing and doesn'T work with software deintelrancer d3d11 copyback works fine with YADIF.
-sTi-
23rd February 2018, 10:12
3. it get's deinterlaced so no it doesn't get IVTC and sources are either telecine, PsF or interlanced.
Thank you. But what are the "side effects" (if any) of incorrectly deinterlacing IVTC content? Does it lead to artifacts?
About the Progressive Segmented Frame (PsF): How do I recognize that a source is PsF and what is the correct way of handling this source? Deinterlacing on/off or IVTC?
chros
23rd February 2018, 10:36
In the setting, should i set to 8Bit or 10Bit?
Use 10bit. (My TV panel also 8+frc and I also use 10bit.)
huhn
23rd February 2018, 10:47
a really good deinterlancer doesn't harm PsF it just doubles the frames with "perfect repeats" soy ouz just loose performance.
on a PsF source everything can produce correct results IVTC (by doing nothing), disabling deinterlancing and a really good deinterlacer will just double frames. disabling will always produce the best results if the whole source is PsF with no exception and no strange pattern like 4:2:2:2 else IVTC a really good IVTC is better madVR IVTC is limited in this example (frame times are not corrected).
and again there is no IVTC content there is telecine.
the big benefit of a IVTC algorithm is that it removes judder from the source something a deinterlacer can't do(it'S not made for it). NTSC is know for 3:2 cadences.
so the artifacts you get by deitnerlacing a telecine source is judder for 3:2 sources if the deinterlacer is really good or you will get all kind of known deinterlacer artifacts.
for Psf DXVA or YADIF are neither really good. DXVA was in the past really good for this.
steakhutzeee
23rd February 2018, 16:48
I learned that often pal dvd are encoded as interlaced but they come from progressive source. So deinterlacing is not needed.(here @huhn comes to kill me [emoji23])
Aside of my eyes how I could configure properly my dvd profile? There is some value I have to look at and that I can use as rule for my profiles?
So actually my lav read a movie is encoded as interlaced and madvr starts deinterlacing also when it doesn't need it.
So... how can I check if a content is really a source progressive and doesn't need deinterlacing? In particular with dvds.
-sTi-
23rd February 2018, 17:11
So a DVD flagged as "interlaced" can either be truly interlaced (=> deinterlacing must be on), PsF (=> deinterlacing must be off) or telecined (=> deinterlacing must be off, IVTC on)
This interlacing stuff is killing me...:cool:
nussman
23rd February 2018, 17:16
I am using a hotkey so switch between deinterlaicng (GPU) and deinterlacing off for progressive sources (most Pal DVDs)
Dont think this can be done automatically.
steakhutzeee
23rd February 2018, 17:25
So a DVD flagged as "interlaced" can either be truly interlaced (=> interlacing must be on), PsF (=> interlacing must be off) or telecined (=> deinterlacing must be off, IVTC on)
This interlacing stuff is killing me...:cool:Yes but IVTC is not needed on pal dvds.
steakhutzeee
23rd February 2018, 17:26
So a DVD flagged as "interlaced" can either be truly interlaced (=> interlacing must be on), PsF (=> interlacing must be off) or telecined (=> deinterlacing must be off, IVTC on)
This interlacing stuff is killing me...:cool:You mean deinterlacing when you say interlacing? Can you clarify this?
-sTi-
23rd February 2018, 17:43
You mean deinterlacing when you say interlacing? Can you clarify this?
sorry, I corrected it above. See how confused this makes me:rolleyes:
-sTi-
23rd February 2018, 18:17
Yes but IVTC is not needed on pal dvds.
Maybe not in general, but I have a feeling someone will come along soon and provide us with an exception for this rule...
steakhutzeee
23rd February 2018, 18:19
Maybe not in general, but I have a feeling someone will come along soon and provide us with an exception for this rule...Yes, and I was thinking. If a dvd is encoded as interlaced but it's basically from a progressive source, and I can play it fine on my monitor without deinterlacing.
What happens when this DVD is played inside a DVD player (with or without deinterlacing support) on an Interlaced monitor/tv?
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.