View Full Version : madVR - high quality video renderer (GPU assisted)
nand chan
11th September 2011, 10:12
Edit: After reading your edit, my reply isn't needed?
Indeed so.
As of step (6), the video has been converted to gamma of 2.2.
In step (7) the video which has a gamma of 2.2 is converted to linear light.
If you use 1/2.35 as the encoding for the 3dlut, everything will get brighter in step (7) since the video isn't 2.35, it's 2.2.
Don't forget that steps (6) through (9) are *not* done by madVR - they are contained within the .3dlut. But I'm cutting out all of those steps (performed by yCMS) and doing my *own* calculations in place of them. So the conversion to linear light never happens in my version of things (or, well, it does if I want it to).
The .3dlut encompasses the entire process from 8 bit to 16 bit, madVR never uses 64 bit values.
The only things madVR does after the .3dlut output are the steps below the second “madVR:”, aka dither down to screen depth.
IIRC, madVR does read the 3dlut header to decide how to convert to linear light for step (7), but madshi would need to confirm. The longer I go on trying the explain things, the more likely I'm going to get something wrong.
It does not (for reasons described above) - the only things madVR reads is the Input_Primaries information, and it makes sure the strings “0 255”, “RGB_PC” and “YCbCr” are not present - that's all; I know this because I work closely with .3dluts myself and generate madVR-compatible headers, also the information is taken from an earlier post of madshi in this thread.
Encoding gamma (3dlut) = madVR gamma (gamma correction setting) is equivalent to no gamma correction. In other words, the 3dlut set with an encoding of 1/2.35 and madVR set to 2.35, it means no gamma correction is performed by madVR shaders.
I guess you could consider it 'after', but it's really 'during'. In step (9), madVR shaders manipulate the 3dlut data to perform gamma correction if needed. Take a look at how the headers of 3DLUTs created within madVR look when gamma correction is enabled and set to 2.35, to get an idea how this is signaled
Actually, there's no need for guesswork - I forgot I already had a special .3dlut which would change the output color based on the input luminosity (blue = 0, red = 1; all other color information is discarded). madVR does in fact adjust the gamma /before/ it enters the .3dlut. So if gamma correction is /disabled/, the input values will be x'=x^(1/2.2), if gamma correction is /enabled/, the input values will be x'=((x^(1/2.2))^(y))^(1/2.2). where y is the simulated gamma, eg. 2.35.
As such, no matter what gamma the user desires, the input value will always be on the scale ^(1/2.2) which is what the monitor has to work with, and all of my edits should be transferred back to such.
Btw, what is referred to as “Display corrected gamma” in step (9) means yCMS fixes the gamma to account for any display inaccuracies - eg. it “simulates” a true 2.2 display - this has /nothing/ to do with the madVR “enable gamma processing” feature.
yesgrey would be your man for questions such as these. This is the limits of my knowledge on the subject, since I stay the hell away from gamma correction done by yCMS+madVR in my setup.
Unfortunately yesgrey is terribly busy. Nonetheless, your earlier post has been extremely helpful as I was able to guess the exact workings with my knowledge + yours.
Ps. I'd also like to correct step (4) - madVR does in fact adapt the white point to the display's as well.
nand chan
11th September 2011, 10:36
Having done some experimenting, it seems like the usage of ICC profiles and .ti3 files and yCMS and all of that fancy stuff is, at least partially, completely unnecessary! I'm doing some experiments with madVR's built in chromatic adaption - it's basically just as precise as gamut mapping with ICC profiles or yCMS, even white point adaption.
Since ArgyllCMS's .cal files take care gamma fixing as well (making sure that if a perfect 2.2 enters the .cal, a perfect 2.2 leaves the screen), all we have to do is 1. tag the input primaries of the monitor profile and 2. load the calfile!
A simple madVR-compatible .3ls for gamut and gamma fixing could look something like this:
# Set the properties properly
!Filetype(3DLUT)
!Input_Range(Limited)
!Output_Range(Limited)
!Input_Primaries(0.6821358317, 0.303858037, 0.19746212, 0.70357813, 0.14572444, 0.0486, 0.31289517, 0.33084743)
!Pixel(CalFile("standard.ti3"))
No more yCMS, no more LittleCMS - just madVR + my CalFile loader.
Of course, this isn't a real 3D LUT implementation - it's just a 3x1D LUT, no better than the graphics card's CLUTs will provide (except maybe with 64 bit interpolation) - but that can be easily fixed from there.
Given a known input gamma (1/2.2), one can construct a virtual RGB profile with the exact same primaries as the output profile and the (1/2.2) gamma, eg. using LittleCMS, and then just use the ICC to fix all inconsistencies. One could even then encode the difference only and LZO compress it, which will result in a remarkably small .3dl2 since all of the complex gamut mapping code will be abstracted away within the madVR's GPU chain. As such, we could expect much faster load times as well.
I will be experimenting around with this solution. With the addition of the video card's CLUTs, we might not even need the .3dlut at all (except for a “blank” .3dlut that tags the primaries - madshi, consider allowing us to set the primaries without using a .3dlut?)
Edit: The only skepticism I have right now is what happens if the monitor's gamut is /smaller/ than BT.709. Does madVR simply clip values, or does it properly convert them to L*Ch (polar coordinates of L*ab) and reduce the chromaticity? (I'm guessing it doesn't, or does linear pulling, or some other cheap trick)
I'll have to ask madshi about this: How does madVR behave if the .3dlut's input primaries are smaller than the BT.709 primaries?
QBhd
11th September 2011, 10:38
I must say i'm getting a bit annoyed getting MadVR to work.
I'm on Win7-64, using 32 bit version of MPC-HT (current).
I downloaded madVR 074 and put it in C:\MadVR. I'm logged in as admin and runned install.bat, even tried activating the administrator account with the 'net user ...' command.
When i want to open madVR's setting page, it keeps complaining that the instance cannot be found, and to make sure the firewall isnt blocking madvr. But even if i disable the firewall it wont work.
What to do ?
Are you trying to access the settings whilst playing a video? madVR needs to be running to use the settings.
QB
G_M_C
11th September 2011, 10:41
Are you trying to access the settings whilst playing a video? madVR needs to be running to use the settings.
QB
Thx, that was one of the problems ;)
I also used the install manager to reset te register to the state it was before running install.bat. It's running now.
cyberbeing
11th September 2011, 10:45
don't forget that steps (6) through (9) are *not* done by madvr - they are contained within the .3dlut. But i'm cutting out all of those steps (performed by ycms) and doing my *own* calculations in place of them. So the conversion to linear light never happens in my version of things (or, well, it does if i want it to).
The .3dlut encompasses the entire process from 8 bit to 16 bit, madvr never uses 64 bit values.
Hmm... Thanks for the info, it sounds completely different than what madshi and yesgrey told me, but is probably correct. I always had the feeling that yesgrey must have coded all the new 3dlut related stuff in 0.62 by the way madshi explained things.
madshi, when you come back around, can you clarify the above for me? Once again, how does madVR interact with the 3DLUT during steps (6) through (9) in >=0.62 compared to <=0.61? What does the 64bit refer to in the steps you listed? It's beginning to seem that many of my complaints about the new 3dlut limitations introduced in 0.62 from the 'dumb' 3dlut behavior in 0.61, were all just yCMS limitations imposed by yesgrey???
Budtz
11th September 2011, 10:48
I found a setup that works. running videos at 25p and then having 50hz at the tv. but now i get glitches. i did not at 24p60 or 24p24. are there any settings that work better in 50hz? It seems the glitches are not rerlated to 25p playback. only when i switch the resolution to 50hz
Edit: seems to work to enable the glitch hacks.
Is it a bug maybe that madvr dosnt work as well with 50hz as 60hz or 24hz?
6233638
12th September 2011, 01:37
I found a setup that works. running videos at 25p and then having 50hz at the tv. but now i get glitches. i did not at 24p60 or 24p24. are there any settings that work better in 50hz? It seems the glitches are not rerlated to 25p playback. only when i switch the resolution to 50hz
Edit: seems to work to enable the glitch hacks.
Is it a bug maybe that madvr dosnt work as well with 50hz as 60hz or 24hz?A while back, around the time when the new rendering path was introduced, videos running at multiples of the refresh rate started having presentation glitches for me.
24/25p@24/60 was fine, but 25@50 or 30@60 did not work correctly.
If your card supports it, use D3D11 presentation, and enable the "limit rendering times to avoid glitches" option.
Everything else as far as rendering is concerned should be left at the defaults. (though you may want to increase the buffer sizes)
It would be interesting to know if the "limit rendering times to avoid glitches" option causes problems for anyone, regardless of whether or not they are experiencing this issue. It seems like it could maybe be enabled by default.
Defiler
12th September 2011, 04:14
madVR is the best thing. Sorry if that doesn't add much to the conversation.
G_M_C
12th September 2011, 07:38
A while back, around the time when the new rendering path was introduced, videos running at multiples of the refresh rate started having presentation glitches for me.
[...]
Hope that is looked at. Cause here in PAL-land (yes, the NTSC/PAL regions still excist) multiples of 25 are seen often.
ex: 1080i50 -> deinterlaced to 1080p25 and displayed on 1080p50.
e-t172
12th September 2011, 07:42
@madshi: I don't know if you're actively following the thread about the 3dlut processing tools from nand chan, but I think you should take a look at the the discussion with Graeme Gill (http://forum.doom9.org/search.php?do=finduser&u=201615) (the author of ArgyllCMS, no less), who doesn't seem convinced that using 256x256x256 lookup tables is the best idea ever. Maybe you could tell him your side of the story :)
Fadeout
12th September 2011, 21:50
So, this problem:
lots of glitches on MadVR, even if the queues stay all full. The display used is a projector going at 60Hz.
If in window mode I get lots of skipped and delayed frames. If in exclusive mode I get zero missed or delayed, but plenty of presentation glitches.
On a PC monitor, all smooth. On Evr-CP all smooth on both PC & projector.
So what's the problem?
dansrfe
13th September 2011, 07:35
madVR is the best thing. Sorry if that doesn't add much to the conversation.
Couldn't agree more.
mitsurugi77
13th September 2011, 10:40
Hi. Im using madvr render, and i think it have the best quality. Its great!!
Today coreavc can support hardware aceleration with ati graphics.
Can it be combinated with madvr? Ati gpu aceleration with cuda+madvr render.
Thanks.
hoborg
13th September 2011, 10:56
Hi. Im using madvr render, and i think it have the best quality. Its great!!
Today coreavc can support hardware aceleration with ati graphics.
Can it be combinated with madvr? Ati gpu aceleration with cuda+madvr render.
Thanks.
CUDA is nVidia only. DXVA won't work with madVR.
renq
13th September 2011, 14:53
AMD vidcard owners who want to have HW acceleration of videos are bound to use Cyberlink HAM decoder.
nand chan
13th September 2011, 16:41
Pic related? (http://img803.imageshack.us/img803/3100/cmsa.jpg)
I just realized another reason to color correct subtitles - videos with embedded bitmap softsubs, eg. the Koharubi Bakemonogatari subs, which cover entire regions of the original frame with a color eg. red will appear significantly incorrectly.
Some frames are fully overlaid with a red background which is simply blinding in comparison to the color corrected red of the source file, which matches BT.709's red (rather orange in comparison).
It's a huge issue, and not just because it's inconsistent.
What I would propose is rendering subtitles directly onto the video stream, /after/ upscaling and RGB conversion but /before/ color management, and then adding the black borders as a last step before rendering - this way, we would not only fix the color management issue but also the bug where bitmap subtitles would display 60 pixels too high. (and, of course, the MPC-HC internal subtitle renderer should be fed the upscaled image sizes /before/ aspect ratio compensation for the monitor - the issue seems to be with the ISR so the only fix would be to give it incorrect values)
It would also mean the black borders for the padding are not color corrected, which might make them a bit brighter than they have to.
Xaurus
13th September 2011, 18:28
Hi madshi,
I have a suggestion that I think would be very useful.
Make an option in the configuration to either:
1: Display the info (CTRL-J) for 10 seconds after opening a video file.
2: Simply only show the display refresh rate for about 10 seconds.
leeperry
13th September 2011, 23:17
hi madshi, I remember you complaining about some buggy behaviors in the nvidia drivers..did you try to contact their tech support? As much as AMD doesn't give a damn about customers reports, I just contacted them to complain about buggy FLASH DXVA on XPSP3 that locks up any system w/ drivers >266.58 and GF8/9 series (http://forums.nvidia.com/index.php?showtopic=209205). I got an instant and very thorough reply...and even an ETA, all this under an hour :eek:
@madshi: I don't know if you're actively following the thread about the 3dlut processing tools from nand chan, but I think you should take a look at the the discussion with Graeme Gill (http://forum.doom9.org/search.php?do=finduser&u=201615) (the author of ArgyllCMS, no less), who doesn't seem convinced that using 256x256x256 lookup tables is the best idea ever. Maybe you could tell him your side of the story :)
yep, I'm really thrilled to see Mr Gill on doom9, he's teh colorimetry guru! Hopefully his advices will serve all the colorimetry OCD'ed ppl out there :)
Neeto
14th September 2011, 04:43
So, this problem:
lots of glitches on MadVR, even if the queues stay all full. The display used is a projector going at 60Hz.
If in window mode I get lots of skipped and delayed frames. If in exclusive mode I get zero missed or delayed, but plenty of presentation glitches.
On a PC monitor, all smooth. On Evr-CP all smooth on both PC & projector.
So what's the problem?
I've a few suggestions.
1. Check that the refresh rate is "really" 60hz on both.
Look at both the madVR stats & reclock if you're using that.
2. I've had problems with video cards behaving differently due to the length of HDMI cable
3. Have you told madVR that the screen types are different?
4. Are you using the auto refresh rate changer?
5. Are you using reclock? make sure that vsync in reclock turned off
6. Are you using MPC-HT? Make sure 3D is turned off
7. The screens are the same resolution?
8. Through the EID info, the screens & projector might be telling the video card something different. Check in the video driver for modes supported and stats.
9. Does changing scaling algorithms make any difference?
10. latest drivers, ffdshow, etc all installed & up to date?
11. Get a log and post it.
TheShadowRunner
14th September 2011, 11:39
When using both madVR + Reclock, is it recommended to "Give high CPU priority to player" (Reclock feature) or not?
Google gives me mixed results XD
Thanks for any info.
mzso
14th September 2011, 12:49
When using both madVR + Reclock, is it recommended to "Give high CPU priority to player" (Reclock feature) or not?
Google gives me mixed results XD
Thanks for any info.
BTW is recklock any use when playing 23.976 fps files? (on a 60hz monitor)
TheShadowRunner
14th September 2011, 13:26
Hmm yes, but it will still stutter of course, just more "regularly".
From the readme:
For example, if you play a 23.976 fps media file on a 60 Hz display (this is 2.5025025 frames per video refresh cycle), it will be speeded up to 24 fps (this is exactly 2.5 frames per video refresh cycle), because 24 is a multiple of 60x2.
If you do decide to use it though, don't enable ReClock's VSYNC correction, it will just fight with madVR's own VSYNC implementation.
dansrfe
15th September 2011, 03:11
Why is it that I see "movie 25.000 fps [says source filter]" in madVR's OSD but I see 29.970 fps in ffdshow's info tab? Is madVR using 29.970 fps from the source in spite of what it says on the OSD? This happens only with .flv files. Using internal MPC-HC flv splitter.
kerimcem
15th September 2011, 10:45
windows 8 8102 e.mode dont work :(
Thunderbolt8
15th September 2011, 13:02
windows 8 sucks.
nand chan
15th September 2011, 17:11
windows 8 sucks.
This, stop using a silly tablet OS and expecting to play back video.
nevcairiel
15th September 2011, 17:22
A Windows powered tablet with all the playback power of DirectShow, including madVR .. sounds like an awesome mobile media center. HDMI port included. :)
Thunderbolt8
15th September 2011, 17:43
I like the german term mäusekino...movies should be watched on a proper screen -.-
and there are HTPCs, no need for a tablet to play hi-res movie files at all
nevcairiel
15th September 2011, 17:44
Why get a HTPC when the Tablet that i already own can play all files just perfectly over HDMI? :D
Just plug it in, and start watching!
nurbs
15th September 2011, 17:51
Why get a HTPC when the Tablet that i already own can play all files just perfectly over HDMI? :D
Out of interest, what tablet do you own? Nothing with Tegra 2 I guess.
nevcairiel
15th September 2011, 18:11
Out of interest, what tablet do you own? Nothing with Tegra 2 I guess.
I'm speculating for the future with Windows 8 tablets, nothing available right now.
I do own a Samsung Galaxy Tab 10.1 though, which is Tegra 2, but i didn't try playing something over HDMI yet.
CruNcher
15th September 2011, 18:18
I wonder if this only works for the EVR renderer or is Renderer Agnostic counting DWM frames ?
http://forum.doom9.org/showthread.php?t=162540
Though im really unhappy with the Playback Quality (could be though Silverlight 5 debug code) this stuttering is strange doesn't experience that with Adobes Player on GT1
Hmm still not smooth in Fullscreen with Silverlight 4 very strange (the movements are totally hacked up i wonder what happens if i turn Aero off)
MaxMan23
15th September 2011, 18:44
Hi,
can you add 3D Vision support, please. There is no free Renderer that can shutter the 3d vision. The commercial software (Stereoscopic player, Powerdvd,..) does not work outside of their software. I want to use it with MPC OR Mediaportal (in future).
nurbs
15th September 2011, 19:29
I'm speculating for the future with Windows 8 tablets, nothing available right now.
I do own a Samsung Galaxy Tab 10.1 though, which is Tegra 2, but i didn't try playing something over HDMI yet.
I see. I misread and thought you already had tablet with great media support. I understand that the Tegra 2 chips are somewhat limited when it comes to media playback due to the lack of NEON.
Gser
16th September 2011, 00:15
Hi,
can you add 3D Vision support, please. There is no free Renderer that can shutter the 3d vision. The commercial software (Stereoscopic player, Powerdvd,..) does not work outside of their software. I want to use it with MPC OR Mediaportal (in future).
Because that wouldn't be difficult at all. :rolleyes:
CruNcher
16th September 2011, 05:04
I see. I misread and thought you already had tablet with great media support. I understand that the Tegra 2 chips are somewhat limited when it comes to media playback due to the lack of NEON.
Also the DSP Decoder itself isn't as powerfull as the Desktop Core one but with Tegra 3 this gonna change fundamentally and partly most probably also with Kepler, after the Boxeebox disaster and the smack from Intel being more performant with their Atom SOC and the same Decoder that is in current GT1/2s which is still beating Nvidia performance wise even their newer update VP5.
mzso
16th September 2011, 11:44
Is it possible to disable the very annoying win7 notification when aero is disabled? Since I set madvr to do so I get that darn ballon every time I go fullscreen, and it even prevents exclusive mode. (I don't want to disable all, the others are mostly useful)
mindbomb
16th September 2011, 20:50
yea, you just click on the notification and it will open a window to disable it.
mzso
16th September 2011, 21:08
yea, you just click on the notification and it will open a window to disable it.
Now this if funny. :) I naturally always clicked on the wrench icon...
CruNcher
16th September 2011, 22:54
Slowly we get the Info how WDDM evolved and in which direction http://msdn.microsoft.com/en-us/library/windows/desktop/hh404490%28v=vs.85%29.aspx
http://msdn.microsoft.com/en-us/windows/hardware/br259098
Finally we see more stages of Preemption :)
Superb
17th September 2011, 02:10
Yeah... I have a feeling Windows 8 will shine (eventually) when it comes to video playback, but this is totally OT... :)
Shinobu
17th September 2011, 09:30
Hello.
thanks for this great renderer, it's to my mind the best video renderer.
i often use my own gui to config my video filter (some media files have differents config files ...) but i don't understand how the madvr setting works in the windows registry.
the only options of the madvr renderer i would like to enable/disable often is the decoding options because on some hd file on my low power computer i need to enable it.
so here is my question: is there any way to enable/disable the decoding options of madvr without launch madvr (with regedit or command line ?)
thnaks a lot and keep the good work, madvr is the best ^^
pirlouy
17th September 2011, 14:15
Yeah... I have a feeling Windows 8 will shine (eventually) when it comes to video playback, but this is totally OT... :)
Just supposition or you tried the recent release or you read stuff about that ?
Or just hopes ? :-)
In fact, Windows Seven (or XP) are quite good for video playback (especially when compared to limited all-in-one hardware stuff). From what I've read, the difficult part comes from accessing GPU stuff (drivers, language, etc.) so it should still be difficult with Windows 8...:)
Fullmetal Encoder
17th September 2011, 18:05
madshi, is there any chance you could implement your optimized algorithm to provide Lanczos scaling without ringing into madVR? You could call the option madLanczos :D
As discussed here (http://forum.doom9.org/showthread.php?t=145358) I believe the consensus was that nnedi3 was superior but your algorithm is obviously far superior to regular Lanczos.
Thank you for all your great works.
ajp_anton
17th September 2011, 18:48
Random fact:
Sandy Bridge GT2 is 5 times faster than a Radeon X1600XT at madVR rendering.
Needed to plug in that ancient card because it has analog video capture input. Was going to watch some movies while recording old tapes. Didn't work so well... =)
TheElix
18th September 2011, 00:46
madshi, is there any chance you could implement your optimized algorithm to provide Lanczos scaling without ringing into madVR? You could call the option madLanczos :D
Wow, that resizer is good!
whitestar999
18th September 2011, 09:46
reporting an issue here of madvr with norton IS 2012.i installed norton IS 2012 & immediately started getting a very unusual problem with madvr.some videos(anime mkv with .ass subs,avc/x264 codec) start fine but after playing for 20-30 sec renderer queue & backbuffer queue started getting empty with only 0-1 value & no. of frames dropped starts increasing steadily(observation using ctrl+J).i tried pot player latest stable version & MPC-HC latest released & both displayed this same problem.nothing was changed on system(laptop C2D 2.00GHz,radeon 4570)after installing norton 2012.tried different madvr versions(0.54,0.73,0.74) & all have this same problem.i uninstalled norton IS 2012 & installed 2011 version & everything went back to normal as it was before installing norton 2012.
TheProfosist
18th September 2011, 18:33
hey everyone i was hoping that you could help me im having problem when i try to play a fullscreen video with madVR and MPC-HC. After a few seconds i it crashes and i get this error from windows:
Problem signature:
Problem Event Name: BEX
Application Name: mpc-hc.exe
Application Version: 1.5.2.3456
Application Timestamp: 4e29d332
Fault Module Name: madVR.ax
Fault Module Version: 0.74.0.0
Fault Module Timestamp: 4e516bc2
Exception Offset: 0003231a
Exception Code: c000000d
Exception Data: 00000000
OS Version: 6.1.7601.2.1.0.256.1
Locale ID: 1033
Additional Information 1: cfd3
Additional Information 2: cfd39af6f2554026609aee2812317e49
Additional Information 3: ba1d
Additional Information 4: ba1d1af66b681e7b15d51afc345f34da
mzso
18th September 2011, 20:00
madshi, is there any chance you could implement your optimized algorithm to provide Lanczos scaling without ringing into madVR? You could call the option madLanczos :D
As discussed here (http://forum.doom9.org/showthread.php?t=145358) I believe the consensus was that nnedi3 was superior but your algorithm is obviously far superior to regular Lanczos.
Thank you for all your great works.
Looks nice! (at least for a layman like me)
Wonder why isn't it included already, since its madshi's creation.
WontonNoodle
18th September 2011, 23:40
madshi, is there any chance you could implement your optimized algorithm to provide Lanczos scaling without ringing into madVR? You could call the option madLanczos :D
As discussed here (http://forum.doom9.org/showthread.php?t=145358) I believe the consensus was that nnedi3 was superior but your algorithm is obviously far superior to regular Lanczos.
Thank you for all your great works.
whoah! +1 for this
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.