Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Hardware & Software > Software players

Reply
 
Thread Tools Search this Thread Display Modes
Old 6th April 2018, 20:14   #50101  |  Link
huhn
Registered User
 
Join Date: Oct 2012
Posts: 7,903
and how do you tell a display to not tone map.

the closes to that is a HDR 3D LUT.
huhn is offline   Reply With Quote
Old 6th April 2018, 20:27   #50102  |  Link
Asmodian
Registered User
 
Join Date: Feb 2002
Location: San Jose, California
Posts: 4,406
Quote:
Originally Posted by Warner306 View Post
This user wants to know if you can somehow send the PQ transfer function to the display to trigger HDR mode and use madVR's adjustable and sometimes superior tone mapping to replace the display's tone mapping? Sounds technically impossible, but would be nice.
Isn't that what both "process HDR content by using pixel shader math" and "process HDR content by using an external 3DLUT" are for? At least as far as it can go, you cannot tell the display to turn off its tone mapping. However, you do get some of the benefits from madVR's superior tone mapping, or DisplayCal's when using a 3DLUT, and you can set the metadata so you can influence the display's tone mapping.
__________________
madVR options explained
Asmodian is offline   Reply With Quote
Old 6th April 2018, 20:54   #50103  |  Link
Polopretress
Registered User
 
Join Date: Sep 2017
Posts: 46
Quote:
Originally Posted by LigH View Post
Running x86-64 (AMD64) Windows applications requires both a CPU with x86-64 instruction set and a 64-bit code variant of a Windows operating system (optional and common as private user OS since Vista, more or less mandatory since 8).

Thanks to the extended compatibility in the x86-64 architecture developed by AMD (in contrast to the Itanium IA-64 architecture by intel which is incompatible to x86 / IA-32), 32-bit x86 processes still run in a SysWoW64 (Windows on Windows-64) environment, but all DLL's used by a 32-bit process must also be programmed for 32-bit x86 architecture, and all DLL's used by a 64-bit process must be programmed for 64-bit x86-64 architecture. Windows will check the DLL header and refuse to load libraries not matching the bitness of the calling process.

To be able to load the 64-bit variant of madVR (and LAV Filters), you have to run a 64-bit player application on a 64-bit Windows.

64-bit code can already be faster simply because CPU registers in 64-bit mode have a) twice the width and b) twice the number, compared to the 32-bit mode. Every instruction which can avoid RAM access by using data still stored in another CPU register is a little improvement.
OK, i was maybe not enough clear.
System is in Win10 64 bits.
The installation included lav32bits, reclock32bits, mpc-be32bits and madVR.
Linked to the issue with CPU 4k hevc decoding (multiple drop with "queue decoder" at 1 while CPU is not above 40% of usage), player potplayer64 bits has been installed without any other modification and fixed the problem.
Lav is still in 32 bits. Reclok also (of course)

It seems to work fine. i was surprised.

Question is : in this case, what is the mode used by madVR (32 or 64 bits) ?

Last edited by Polopretress; 6th April 2018 at 21:00.
Polopretress is offline   Reply With Quote
Old 6th April 2018, 21:03   #50104  |  Link
huhn
Registered User
 
Join Date: Oct 2012
Posts: 7,903
if you use a 64 bit player everything else it 64 bit too.
huhn is offline   Reply With Quote
Old 6th April 2018, 22:26   #50105  |  Link
thighhighs
Registered User
 
Join Date: Sep 2016
Posts: 70
Quote:
Originally Posted by Asmodian View Post
I still think using 2.4x would be more appropriate, direct 4x does take a little more GPU power than 2x and it would be consistent. Upscaling to 4x and then downscaling to 2.05x is not ideal.
I agree. Because "always" quadrupling in some cases does not improve the quality, but it might hurt performance.
thighhighs is offline   Reply With Quote
Old 6th April 2018, 22:28   #50106  |  Link
Warner306
Registered User
 
Join Date: Dec 2014
Posts: 1,127
Quote:
Originally Posted by Asmodian View Post
Isn't that what both "process HDR content by using pixel shader math" and "process HDR content by using an external 3DLUT" are for? At least as far as it can go, you cannot tell the display to turn off its tone mapping. However, you do get some of the benefits from madVR's superior tone mapping, or DisplayCal's when using a 3DLUT, and you can set the metadata so you can influence the display's tone mapping.
I see. Are you still stuck with the backlight and contrast settings of the display's SDR mode? I don't completely understand how this works. Can you toggle the display's HDR mode by sending it the correct metadata by 3D LUT? Many calibration topics are not completely clear to me.

Last edited by Warner306; 6th April 2018 at 22:34.
Warner306 is offline   Reply With Quote
Old 6th April 2018, 22:46   #50107  |  Link
Asmodian
Registered User
 
Join Date: Feb 2002
Location: San Jose, California
Posts: 4,406
No, you are not stuck in SDR mode. You set the metadata with madTPG (madVR when the 3DLUT is used), measure the display as it responds given that metadata, and construct the 3DLUT based on that. For best results I have found you really need a 3DLUT for every movie, this can be done with DisplayCal's 3DLUT creating utility but it is a bit crazy. Because the TV is always in the same mode you only need to profile once but given that the mastering display's peak white and the video's peak white both influence the 3DLUT most videos would use a different 3DLUT. That said I get decent results as long as the peak whites for the 3DLUT are higher than the peak white in the video (if not they clip generating nasty banding artifacts).

What we need is pixel shader math that takes the source's metadata into account to convert to a specific set of metadata and then send that through an HDR 3DLUT. If that makes sense?
__________________
madVR options explained
Asmodian is offline   Reply With Quote
Old 7th April 2018, 03:18   #50108  |  Link
BetA13
cosmic entity
 
BetA13's Avatar
 
Join Date: May 2011
Location: outside the Box
Posts: 258
Ha, nice one...You sneaky little developer....
Where there some performance improvements?
Because for me its like an early birthday present cause i can use NGU Medium now and still be under 20ms.
Before i could only use NGU Low.

Im impressed..I also think i did understand the whole MadVR now..what each setting does,, how it works, etc..
Using and understanding MadVR is like a study Project at the University, it took me allmost 5 years to figure it all out..
And i learned so freaking much about Video processing and upscaling filters, etc etc..
Everytime theres a new version, i get sweaty hands and start to test and fiddle wich each setting to see whats changed and such, and when iim finished i allways wonder where the Time did go..Its easy for me to get lost for hours while fiddling around with your awesome Programm..
Damn, nothing, really nothing comes close to the quality of MadVR..
Ever since i started using madvr i wondered what all the TVīs use for up and downscaling, because it looks soo bad..

anyway, what i wanted to say to you @madshi, THANK you for all youve done, and thank you for sparking my interesst in this area, this is kinda my hobby now, setting up Home cinemas for my friends haha..

have a good night

Last edited by BetA13; 7th April 2018 at 03:27.
BetA13 is offline   Reply With Quote
Old 7th April 2018, 07:57   #50109  |  Link
sauma144
Registered User
 
Join Date: Sep 2016
Posts: 89
I'm gonna have some more crazy dreams about this new algorithm.
sauma144 is offline   Reply With Quote
Old 7th April 2018, 08:09   #50110  |  Link
Grimsdyke
Registered User
 
Join Date: Nov 2013
Location: Hannover, Germany
Posts: 292
Hi Madshi, nice to have you back and thank you for all the hard work !!
I have an issue with a few PAL-SD files in the following configuration:
-> MPC-BE + LAV (Hardware device to use: Automatic(Native)) + MadVR => File plays normally for a few seconds then screen turns completely green !! File keeps playing and I hear sound.
-> MPC-BE + LAV (Hardware device to use: (GPU selected)) + MadVR => File plays normally
Unfortunately I can' keep this configuration because the drop in performance is too big for 4K. Not that important but maybe you could look into this when you have the time. Thx !!
Grimsdyke is offline   Reply With Quote
Old 7th April 2018, 08:53   #50111  |  Link
nevcairiel
Registered Developer
 
Join Date: Mar 2010
Location: Hamburg/Germany
Posts: 10,344
As a workaround there is always the option to disable HW acceleration for SD files, any half-competent CPU should be able to decode that. Of course it would be best if madshi can figure out whats going wrong with D3D11-Native there, but he may need a sample file that fails for you.
__________________
LAV Filters - open source ffmpeg based media splitter and decoders
nevcairiel is offline   Reply With Quote
Old 7th April 2018, 09:11   #50112  |  Link
zaemon
Registered User
 
Join Date: Mar 2016
Posts: 27
madVR - high quality video renderer (GPU assisted)

Quote:
Originally Posted by Grimsdyke View Post
Hi Madshi, nice to have you back and thank you for all the hard work !!
I have an issue with a few PAL-SD files in the following configuration:
-> MPC-BE + LAV (Hardware device to use: Automatic(Native)) + MadVR => File plays normally for a few seconds then screen turns completely green !! File keeps playing and I hear sound.
-> MPC-BE + LAV (Hardware device to use: (GPU selected)) + MadVR => File plays normally
Unfortunately I can' keep this configuration because the drop in performance is too big for 4K. Not that important but maybe you could look into this when you have the time. Thx !!
Same problem for me with 10-bit files. Disabling HW acceleration is not an option with HEVC for me unfortunately. And I still got this pink/green blinking at start when HW decoding is running.
zaemon is offline   Reply With Quote
Old 7th April 2018, 10:25   #50113  |  Link
e-t172
Registered User
 
Join Date: Jan 2008
Posts: 589
A general question about achieving proper 24p cadence:

I recently realized after discussing it with someone else that neither 24 Hz nor Smooth Motion is required to achieve proper cadence with modern TVs/projectors. That's because they are capable of automatically recovering a 24p signal from a 24p@60Hz (3:2 pulldown) input, i.e. they are capable of IVTC/decimation. Rtings calls this "Judder-Free 24p via 60p". In theory, if the TV does this right, the process is completely lossless and one has no reason to expect any loss in quality compared to "native" 24p@24Hz.

Of course this still leaves open the issue of audio/video clock mismatch when playing from a PC, causing random hiccups. AFAICT, this can be solved using ReClock or similar (which will "nudge" the clock towards perfect 3:2 pulldown cadence with no discontinuities), or by using custom modes to achieve perfect audio-clock-synchronized 59.940 Hz, which is easier than trying to achieve perfect 23.976 Hz (higher numbers mean higher relative precision).

I don't have a modern TV/projector to test this on right now, but I'm curious about this approach. Has anyone tried it? Are there downsides that I'm missing? This seems interesting to me because this setup is more user-friendly - no need to switch between 24 Hz and 60 Hz when playing video. Also, I seem to remember madshi saying at some point that madVR is not designed to generate a "perfect" 3:2 pulldown cadence when playing 24p@60Hz, which would prevent this solution from working. Is that true?
e-t172 is offline   Reply With Quote
Old 7th April 2018, 10:37   #50114  |  Link
huhn
Registered User
 
Join Date: Oct 2012
Posts: 7,903
this is mostly for interlanced content and you can't get the interlaced content out untouched using a PC.

this often doesn't work in PC mode.
it will obviously increase input lag and you need some kind of motion interpolation.

as far as i know madVR is fine by repeating frame and really bad when it comes to show like 50 FPS at 25 HZ.
huhn is offline   Reply With Quote
Old 7th April 2018, 10:40   #50115  |  Link
e-t172
Registered User
 
Join Date: Jan 2008
Posts: 589
Quote:
Originally Posted by huhn View Post
this is mostly for interlanced content and you can't get the interlaced content out untouched using a PC.
No, it's not about interlaced content. It works for both 60i and 60p.

Quote:
Originally Posted by huhn View Post
this often doesn't work in PC mode.
Interesting, thanks.

Quote:
Originally Posted by huhn View Post
it will obviously increase input lag
Makes sense.

Quote:
Originally Posted by huhn View Post
and you need some kind of motion interpolation.
No. When Rtings tests for 24p recovery from 60 Hz their protocol states "we never use interpolation during these tests".

Quote:
Originally Posted by huhn View Post
as far as i know madVR is fine by repeating frame and really bad when it comes to show like 50 FPS at 25 HZ.
Okay, that's good news then.

Last edited by e-t172; 7th April 2018 at 10:45.
e-t172 is offline   Reply With Quote
Old 7th April 2018, 10:50   #50116  |  Link
huhn
Registered User
 
Join Date: Oct 2012
Posts: 7,903
Quote:
Originally Posted by e-t172 View Post
No, it's not about interlaced content.
It works for both 60i and 60p.

i said mostly

Quote:
No. When Rtings tests for 24p recovery from 60 Hz their protocol states "we never use interpolation during these tests".
so it will just randomly increase input lag as soon as it thinks it get's a 3:2 cadance as input? you need at least 3 frame to make this work that's over 48 ms.

as i said you need >some kind of motion interpolation<
Quote:
To activate judder removal, set 'Auto Motion Plus' to 'Custom', 'Judder Reduction' to 0 and 'Blur Reduction' to 0; this will remove judder without adding soap opera effect.
and rtings is far from perfect they give a PC screen i have here an 8 bit deep rating even through it is the dirtiest 6 bit panel i have seen in my life it's like an ant farm.
huhn is offline   Reply With Quote
Old 7th April 2018, 11:04   #50117  |  Link
e-t172
Registered User
 
Join Date: Jan 2008
Posts: 589
Quote:
Originally Posted by huhn View Post
so it will just randomly increase input lag as soon as it thinks it get's a 3:2 cadance as input? you need at least 3 frame to make this work that's over 48 ms.
That's not necessary. The TV can simply switch to this mode when it detects that, say, the past N (say, 60) frames exhibited a 3:2 pattern. Then, once it's in this mode, it stays in it until it detects that the past N frames do not have the pattern anymore. The TV doesn't need to react immediately - no one cares if it takes a second or so to switch into the proper 24p cadence.

When in this mode, the TV will display in 24p by discarding identical frames. The TV can discard a frame as soon as it gets it because it knows which frames are redundant and when a new 24p frame starts - it knows the cadence. I would expect the minimum required input lag to be around 16 ms (one 60 Hz frame).

What's more, 48 ms input lag is actually very typical of TVs when used in 60 Hz outside "low input lag" mode. It's not a concern for video playback as the lag can be compensated on the audio side. (Although I agree it's a concern in "dual use" scenarios where the TV is used for gaming as well.)

Quote:
Originally Posted by huhn View Post
as i said you need >some kind of motion interpolation<
Decimation/IVTC (which is what the TV is doing in this case) has nothing to do with motion interpolation at all. It's not trying to compute motion vectors or anything like that, it's just decimating frames that are identical, which is a much simpler operation, and can be lossless when done correctly.
e-t172 is offline   Reply With Quote
Old 7th April 2018, 11:20   #50118  |  Link
huhn
Registered User
 
Join Date: Oct 2012
Posts: 7,903
Quote:
That's not necessary. The TV can simply switch to this mode when it detects that, say, the past N (say, 60) frames exhibited a 3:2 pattern. Then, once it's in this mode, it stays in it until it detects that the past N frames do not have the pattern anymore. The TV doesn't need to react immediately - no one cares if it takes a second or so to switch into the proper 24p cadence.
so it supposed to switch between different audio delays?
ok we detected a 3:2 judder let's hold playback until we have enough frames buffered to do IVTC?

no you have to run it all the time or not at all.

Quote:
When in this mode, the TV will display in 24p by discarding identical frames. The TV can discard a frame as soon as it gets it because it knows which frames are redundant and when a new 24p frame starts - it knows the cadence. I would expect the minimum required input lag to be around 16 ms (one 60 Hz frame).
these frames are often not bit identical so can not blindly discard duplicates.

and if you do this you will still get a 3:2 judder the complicated part of IVTC is the frame time correction.
if you just discard frames the frame times will stay the same meaning a with a 3:2 source it will take 48 ms before the next frame come that only shown for 32 ms but both needs to be shown for about 42 ms.

Quote:
What's more, 48 ms input lag is actually very typical of TVs when used in 60 Hz outside "low input lag" mode. It's not a concern for video playback as the lag can be compensated on the audio side. (Although I agree it's a concern in "dual use" scenarios where the TV is used for gaming as well.)
that's just 48 ms ontop of the rest of the input lag. easily reaching 100+

Quote:
Decimation/IVTC (which is what the TV is doing in this case) has nothing to do with motion interpolation at all. It's not trying to compute motion vectors or anything like that, it's just decimating frames that are identical, which is a much simpler operation, and can be lossless when done correctly.
that doesn't change that it is on option under motion interpolation.
huhn is offline   Reply With Quote
Old 7th April 2018, 11:45   #50119  |  Link
nevcairiel
Registered Developer
 
Join Date: Mar 2010
Location: Hamburg/Germany
Posts: 10,344
Quote:
Originally Posted by huhn View Post
so it supposed to switch between different audio delays?
ok we detected a 3:2 judder let's hold playback until we have enough frames buffered to do IVTC?
You don't need to delay anything when decimating 60 fps to 24 fps, you just throw away some frames in between. This is not like encoded 30 fps IVTC content where you get fields that need re-combining into frames. Its full frames on a 3:2 repeat pattern.
__________________
LAV Filters - open source ffmpeg based media splitter and decoders
nevcairiel is offline   Reply With Quote
Old 7th April 2018, 12:01   #50120  |  Link
e-t172
Registered User
 
Join Date: Jan 2008
Posts: 589
Quote:
Originally Posted by huhn View Post
so it supposed to switch between different audio delays?
ok we detected a 3:2 judder let's hold playback until we have enough frames buffered to do IVTC?
You do not need to "hold back" any frames to do IVTC if you already know the cadence. At least not on 60p (not sure about 60i). I think I've made that clear.

Quote:
Originally Posted by huhn View Post
these frames are often not bit identical so can not blindly discard duplicates.
They often are. Why wouldn't they be? They're coming from the same framebuffer on the source side, and there is no lossy temporal processing in between. (Though I guess maybe dithering steps could throw a wrench into this assumption.)

Even if they're not, any IVTC algorithm worth its salt will not assume they are identical. Instead it will compute some kind of difference metric (such as simple RMS) to provide at least some resilience to noise.

And again, please keep in mind that duplicate detection is only used to detect cadence changes. Once you know the cadence, you don't need to do any measurements to know which frames should be discarded and which should be kept.

Quote:
Originally Posted by huhn View Post
and if you do this you will still get a 3:2 judder the complicated part of IVTC is the frame time correction.
I don't see how that's complicated - it's just arithmetic. Detecting the cadence is the complicated part. The decimation part is trivial in comparison. Once the TV knows the cadence (i.e. it knows when the 3:2 pattern starts and when it ends), it knows that it needs to switch to 24p, and it knows which frames need to be displayed and when.

The only case where you incur massive input lag is if you want to detect cadence changes in advance so that you can seamlessly transition from one cadence to the next. That indeed requires you to look far into the future. About 10 years ago I wrote my own IVTC filter that did something like that, and I believe that's also how madVR IVTC works to some extent. The video player can afford to do that because it can preprocess frames in advance; the TV can't. But that's only a "nice to have", not a requirement, especially for high-quality 60p. You can do without it as long as you're not after perfect transitions between different cadences, which is really not a problem for the scenario that this discussion is about (stable 24p@60Hz).

Quote:
Originally Posted by huhn View Post
if you just discard frames the frame times will stay the same meaning a with a 3:2 source it will take 48 ms before the next frame come that only shown for 32 ms but both needs to be shown for about 42 ms.
You can deduce from your own numbers that in the worst case scenario the minimum required input lag is about 6 ms in your very own example. (The worst case scenario is when you're in the middle of the 3:2 pattern, at t+42ms, where you need to display the second 24p frame right now but it will only come at t+48ms - a 6 ms delay.) That's even better than the 16 ms number I mistakenly put forward initially.

Quote:
Originally Posted by huhn View Post
that's just 48 ms ontop of the rest of the input lag. easily reaching 100+
What makes you think that it can't be done in parallel with the rest of image processing? I can very easily imagine an implementation where images can be removed from the internal processing pipeline queue during or after other processing steps have been done.

Quote:
Originally Posted by huhn View Post
that doesn't change that it is on option under motion interpolation.
Oh so we trust the terminology used in TV OSD menus now? Since when?

Last edited by e-t172; 7th April 2018 at 13:56.
e-t172 is offline   Reply With Quote
Reply

Tags
direct compute, dithering, error diffusion, madvr, ngu, nnedi3, quality, renderer, scaling, uhd upscaling, upsampling

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 08:28.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.