Kodi Community Forum

Full Version: Hardware Deinterlacer is not frame adaptive in Kodi, but it is in MPC-BE
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3
(2023-07-12, 22:07)Klaus1189 Wrote: [ -> ]Nvidia has a very good adaptive Hardware Deinterlacer which is also used in Kodi, but only when using the correct refresh rate in Kodi, in this case 50 Hz for this testfile. But why?

Maybe because this "test file" is 25 fps interlaced and should be played at 50 Hz. Same way that 23.976 progressive videos should be played at 23.976 Hz and all people understands that is "normal" and playing 23.976 video at 60 Hz is not good. 

I wonder why it should work well to play an 25 fps interlaced video at 60 Hz or 165 Hz?

I comment on 165 Hz because of this....  https://forum.kodi.tv/showthread.php?tid...pid3156755

As commented in other post this test video works fine played on Intel NUC8i3BEK connected to Sony AG9 TV using proper 50 Hz refresh rate https://forum.kodi.tv/showthread.php?tid...pid3158516
You are absolutely right Smile
I use 23 Hz, 24 Hz, 50 Hz, 59 Hz and 60 Hz for all types of videos.

I do not use:
25 Hz, 29 Hz and 30 Hz because I want proper motion resolution of interlaced videos

But still, the hardware deinterlacer should be able to do its job even, when the user only has a monitor which supports 60 Hz, it will be juddery, but deinterlacer must work nevertheless.

Just now I had to help a MPC-BE user with refresh rates:
https://forum.doom9.org/showthread.php?t=184973
(2023-07-12, 20:57)CrystalP Wrote: [ -> ]Is the problem with the nVidia RTX 4090? The two initial posts did not refer to it.
It is just as any other Nvidia card, just a bit more beefy for gaming Wink


(2023-07-12, 20:57)CrystalP Wrote: [ -> ]Post #2 has an mpv config. nVidia has multiple acceleration api afaik. To be sure dxva is used, can you try with the option hwdec=d3d11va (instead of "yes").

I tested mpv with only "hwdec=d3d11va" in mpv.conf and hardware deinterlacer is not applied at all with that conf

(2023-07-12, 20:57)CrystalP Wrote: [ -> ]Goes without saying that in addition to checking the flickering of those letters, you should also confirm the absence of combing (especially visible on the white shirt) when pausing.

The default software deinterlacing is pretty good and barely flickers (but not perfect).

The file is perfect for testing the adaptiveness of deinterlacer. If I use any Software deinterlacer in any player, the characters above D88 are flickering.
But if I use the hardware deinterlacer of a GPU, like all Nvidia GPUs are fine, all Intel GPUs are fine and AMD is mostly fine, except:
all RX 5000 and RX6000 models do have major issues with their hardware deinterlacer:
-> Not frame adaptive
-> Strange parts of the image

We discuss stuff like that over @doom9 forum:
https://forum.doom9.org/showthread.php?t=176013
https://forum.doom9.org/showpost.php?p=1...count=2882
Well the post name  "Hardware Deinterlacer is not frame adaptive in Kodi, but it is in MPC-BE" is wrong or inaccurate because at least works in Intel NUC8....
Yes, you are right, at the time of posting I thought it would not work. It does, but it still needs the matching refresh rate, which is strange to me.
Read through the complete thread to see what we found out.

Feel free to adjust the threadtitle. I cannot to figure it out how to change it. I don't even know what title would match. It's a mess ...
(2023-07-16, 10:01)Klaus1189 Wrote: [ -> ] 
(2023-07-12, 20:57)CrystalP Wrote: [ -> ]Post #2 has an mpv config. nVidia has multiple acceleration api afaik. To be sure dxva is used, can you try with the option hwdec=d3d11va (instead of "yes").

I tested mpv with only "hwdec=d3d11va" in mpv.conf and hardware deinterlacer is not applied at all with that conf
I meant for you to change only that option in the config and leave the rest as is. Not to run with that option alone.

If you add a -v option, you get a lot more logging out of mpv, and this section in particular gives confirmation that dxva processor is used, do you have something similar:

........
[vd] Using hardware decoding (d3d11va).
[vd] Decoder format: 1920x1080 d3d11[nv12] bt.709/bt.709/bt.1886/limited/auto CL=mpeg2/4/h264
[vf] [in] 1920x1080 d3d11[nv12] bt.709/bt.709/bt.1886/limited/display SP=1.000000 CL=mpeg2/4/h264
[vf] [userdeint] 1920x1080 d3d11[nv12] bt.709/bt.709/bt.1886/limited/display SP=1.000000 CL=mpeg2/4/h264
[vf] [userdeint] (disabled)
[vf] [d3d11vpp] 1920x1080 d3d11[nv12] bt.709/bt.709/bt.1886/limited/display SP=1.000000 CL=mpeg2/4/h264
[d3d11vpp] Found 1 rate conversion caps. Looking for caps=0x2.
[d3d11vpp]   - 0: 0x0000001e
[d3d11vpp]        (matching)

......

I agree with you that in theory even if there is judder or other sync issues, the deinterlacer should still be able to do the same job regardless of current refresh rate.


"It is just as any other Nvidia card, just a bit more beefy for gaming": within a generation most likely yes, but the drivers have significant differences between generations.
Try this build https://mirrors.kodi.tv/test-builds/wind...ng-x64.exe , based on version 21.
New test build that enables VSR at the same time as deinterlacing: https://mirrors.kodi.tv/test-builds/wind...ng-x64.exe
OK, I test and report back. Thank you
Thank you very much. I know I am late, but I am back.

However I have observed something strange:
I have bought a Blu-ray from a concert and ripped it to my PC to play it without opical drive noise.

However I have problems with the frame adaptive deinterlacer of Nvidia. I did many tests and it looks like the only solution is to disable DXVA2 and use Software Deinterlace. Then I don't get any dropped frame.

But if I use DXVA with hardware deinterlacer i get some dropped frames. Also in other players such as MPC-BE with internal filters and with external Filters like LAV Filters. Also with different Renderers like EVR CP, madVR, MPC Video Renderer.

But an option to disable DXVA for SD / HD would help me, since all these types can be easily decoded by software/CPU.

Is there anything I can do? I don't want to disable DXVA globally on my RTX40 card. I am sure it is an Nvidia issue.

If I should make a new topic please let me know or cut my post here and create a new topic with it.

If anything I just wrote is not understandable please let me know. I will try to describe it with other words. I'll do my best.

Or perhaps a per file DXVA on/off switch can also help.
New thread would be better, it's not about deinterlacing quality but dropped frames right?

A short sample video that shows the problem for you will be needed because I didn't see anything like that with my test videos.

Please also include a debug log of playing the sample, that will provide information on your system and settings.
Pages: 1 2 3