• 1(current)
  • 2
  • 3
  • 4
  • 5
  • 10
v19 D3D11 and DXVA updates - Beta test builds (merged)
#1
Once the HDR code is already in the master branch there are still some things to improve especially for NVIDIA (Intel has always been perfect from day one Big Grin ).

The reason for this build are test these improvements, both d3d11 (rendering) and DXVA (HEVC decoding) that try to be general but can also improve things for NVIDIA.

The most notable changes are:
 
  • Updated include headers to D3D 11.4 API and DX feature level 12_1.
  • Removed advancedsettings options "disableDXVAdiscretedecoder" and "allowdiscretedecoder" (if all goes well they will no longer be necessary).
  • Improved detection of NV12 shared textures capability using more up to date D3D11_FEATURE_DATA_D3D11_OPTIONS4.
  • Improved calculation of number buffers need for DXVA HEVC decoding (fix a "hidden" bug in the current code).
  • Improved textures copy function with safe "wait to completed operation" (fix NVIDIA stuttering closer to the root cause).
  • Use multi-threading protection only when necessary (cause a little overload).
  • Improved Kodi logging with graphics card model and DX feature level used without need activate debug mode.
  • DXVA2 check if video memory available is sufficient for 4K decoding (fix crash on low video memory systems).

DOWNLOAD

https://github.com/thexai/xbmc/releases

Builds with merged code at v4.2.0 state (from 20-08-2020):
http://mirrors.kodi.tv/nightlies/windows/win64/master/


CODE

https://github.com/thexai/xbmc


HOW TO TEST IT

Install over other v19 build as usual. If you were using advancedsettings options for NVIDIA it will not be taken into account in this build (it doesn't matter if they are or not).

Test in full screen exclusive mode and full screen windowed mode (change from GUI settings > System > Display).

Report general impressions (feedback):
Playback smooth? Go away NVIDIA stuttering? Some new issue? etc.

Data of interest:
Windows build, NVIDIA graphics model, NVIDIA drivers # used.
Attach Kodi log for reference (don't need to be in debug mode) https://paste.kodi.tv/

Can also be tested on non-NVIDIA systems.


If everything goes well and the general feedback is positive I will open a PR to merge the code  Wink
Reply
#2
(2020-07-11, 13:57)jogal Wrote: Once the HDR code is already in the master branch there are still some things to improve especially for NVIDIA (Intel has always been perfect from day one Big Grin ).

The reason for this build are test these improvements, both d3d11 (rendering) and DXVA (HEVC decoding) that try to be general but can also improve things for NVIDIA.

The most notable changes are:
  • Updated include headers to D3D 11.4 API and DX feature level 12_1.
  • Removed advancedsettings options "disableDXVAdiscretedecoding" and "allowdiscretedecoder" (if all goes well they will no longer be necessary).
  • Improved detection of NV12 shared textures capability using more up to date D3D11_FEATURE_DATA_D3D11_OPTIONS4.
  • Improved support for variable refresh rate monitors using DXGI_SWAP_CHAIN_FLAG_ALLOW_TEARING in full screen windowed mode.
  • Improved calculation of number buffers need for DXVA HEVC decoding (I think there possible bug in the current code).
  • Improved textures copy function with safe "wait to completed operation" (I think it can fix NVIDIA stuttering from root cause).
  • Improved Kodi logging with graphics card model and DX feature level used without need activate debug mode.

DOWNLOAD

http://www.mediafire.com/file/por70liphi...4.exe/file


HOW TO TEST IT

Install over other v19 build as usual. If you were using advancedsettings options for NVIDIA it will not be taken into account in this build (it doesn't matter if they are or not).

Test in full screen exclusive mode and full screen windowed mode (change from GUI settings > System > Display).

Report general impressions (feedback):
Smooth? Go away NVIDIA stuttering? Some new issue? etc.

Data of interest:
Windows build, NVIDIA graphics model, NVIDIA drivers # used.
Attach Kodi log for reference (don't need to be in debug mode) https://paste.kodi.tv/

Can also be tested on non-NVIDIA systems.


If everything goes well and the general feedback is positive I will open a PR to merge the code  Wink
"Install over other v19 build as usual"


Can we clean install this aswell yeah?
Reply
#3
Glad to see that you are looking at further making further contributions.
Reply
#4
(2020-07-11, 13:57)jogal Wrote: Once the HDR code is already in the master branch there are still some things to improve especially for NVIDIA (Intel has always been perfect from day one Big Grin ).

The reason for this build are test these improvements, both d3d11 (rendering) and DXVA (HEVC decoding) that try to be general but can also improve things for NVIDIA.

The most notable changes are:
  • Updated include headers to D3D 11.4 API and DX feature level 12_1.
  • Removed advancedsettings options "disableDXVAdiscretedecoding" and "allowdiscretedecoder" (if all goes well they will no longer be necessary).
  • Improved detection of NV12 shared textures capability using more up to date D3D11_FEATURE_DATA_D3D11_OPTIONS4.
  • Improved support for variable refresh rate monitors using DXGI_SWAP_CHAIN_FLAG_ALLOW_TEARING in full screen windowed mode.
  • Improved calculation of number buffers need for DXVA HEVC decoding (I think there possible bug in the current code).
  • Improved textures copy function with safe "wait to completed operation" (I think it can fix NVIDIA stuttering from root cause).
  • Improved Kodi logging with graphics card model and DX feature level used without need activate debug mode.

DOWNLOAD

http://www.mediafire.com/file/por70liphi...4.exe/file


HOW TO TEST IT

Install over other v19 build as usual. If you were using advancedsettings options for NVIDIA it will not be taken into account in this build (it doesn't matter if they are or not).

Test in full screen exclusive mode and full screen windowed mode (change from GUI settings > System > Display).

Report general impressions (feedback):
Smooth? Go away NVIDIA stuttering? Some new issue? etc.

Data of interest:
Windows build, NVIDIA graphics model, NVIDIA drivers # used.
Attach Kodi log for reference (don't need to be in debug mode) https://paste.kodi.tv/

Can also be tested on non-NVIDIA systems.


If everything goes well and the general feedback is positive I will open a PR to merge the code  Wink

Forgive my ignorance but will this improve video quality on lower on file size videos?
Reply
#5
Do you have the source up on github or are you waiting until its been tested first? I like to build Kodi myself so I'd prefer to pull your changes and compile myself if the code is on github.
Reply
#6
Not yet on github. I'd like to wait first for someone with an RTX 20xx to confirm that it fixes stuttering (I don't have any RTX so I can't test it).
Reply
#7
@jogal no matter if it fixes issues with RTX 20xx or not, if you make it public then perhaps @afedchin can comment on whether you are taking the right direction.
Reply
#8
OK I will upload it later... before I will add some comments in the code so that the changes are better understood.

I also need afechin's comments about why HEVC frame refs are calculated taking into account system CPU cores? I find it strange...
Reply
#9
Thanks, I want to do what I can to prevent any frustrations this time around.
Reply
#10
@jjd-uk , @yeahme49 : is now on github

@kikassridec2 : is not necessary clean install if you already using other v19 build but if you want can do clean install. 

@steve11 : bad quality encoded videos still bad quality in any player

@RTX20xx owners : I'm waiting for feedback  Big Grin
Reply
#11
(2020-07-11, 13:57)jogal Wrote: HOW TO TEST IT

Install over other v19 build as usual. If you were using advancedsettings options for NVIDIA it will not be taken into account in this build (it doesn't matter if they are or not).

Test in full screen exclusive mode and full screen windowed mode (change from GUI settings > System > Display).

Report general impressions (feedback):
Playback smooth? Go away NVIDIA stuttering? Some new issue? etc.

Data of interest:
Windows build, NVIDIA graphics model, NVIDIA drivers # used.
Attach Kodi log for reference (don't need to be in debug mode) https://paste.kodi.tv/
Hi jogal! I admire your work, thanks indeed! I think that I can help you with this, since my specs are:

Procesador (CPU) CPU ocho núcleos AMD Ryzen 7 3800X (3,9 GHz-4,5 GHz/36 MB CACHÉ/AM4+)
Placa base ASUS® ROG STRIX X570-F GAMING (USB 3.2 Gen 2, PCIe 4.0) - RGB Ready!
Memoria (RAM) 32 GB Corsair VENGEANCE DDR4 3200 MHz (2 x 16 GB)
Tarjeta gráfica 8 GB NVIDIA GEFORCE RTX 2070 SUPER - HDMI, 3 DP GeForce - RTX VR Ready!
Drivers Geforce Game Ready 451.48 - 06/24/2020
TV Philips OLED 803 65"
Windows 10 - version 2004
https://paste.kodi.tv/eyafupufel.kodi

I had already tested your HDR build, and I did need the advancedsettings option to prevent the stuttering you mentioned. Now I have tested this new version and I'm sorry to tell you that the stuttering is back, both in full screen exclusive mode and full screen windowed mode. I haven't performed an extensive test, since the stuttering is the most important issue to solve now, but it seems to play as smooth as previously.

Thanks for your efforts, much appreciated!
If I have helped you or increased your knowledge, please click the 'thumbs up' button to give thanks :)
Reply
#12
Thank you very much for testing.

There is a possibility that stuttering is also related to the number of CPU cores (16 in your case!!) and this would have a solution. This will be seen when more people try it... there were also cases with GTX 1660 SUPER that needed advancedsettings. The more people try it, the more likely they are to find the relationship.

I think the Kodi code doesn't get the correct number of refs frames of HEVC streams but this is hidden by adding extra buffers depending on the CPU cores. But this is surely only part of the problem and the rest are thread synchronization issues.

Actually (master branch) number of decoding buffers are:

8 + 1 ref frame (due a possible bug) + number CPU cores

In this build is:

8 + 8 (max possible refs frames HEVC spec) and NOT add extra buffers by CPU cores

Ideally should to be:

8 + real refs frames obtained from stream + CPU cores or not (pending to know)


Since in real life number of refs frames is usually < CPU cores maybe bug is "hidden".


EDIT:
To make it even more confusing: too small decoding buffers can cause similar stuttering effect that caused by timing synchronization issues.
Reply
#13
I have the 1660 super and will be able to test Sunday or Monday for you
Reply
#14
I have a 2080ti and a 9900k - Will test tonight and report findings.
Reply
#15
Test carried out, positive result, all ok with 4k HDR movie viewing and with LIVE satellite TV (Rai 4k and HotBird 4k test)
S.O. Windows 10 64b pro 2004
Video Card Geforce 1050 driver 451.48-desktop-win10-64bit-international-nsd-dch-whql-rp
TV LG 65" UHD

https://paste.kodi.tv/ehelabujos.kodi

Marco.

P.S. Thank you for your big work!!!
Reply
  • 1(current)
  • 2
  • 3
  • 4
  • 5
  • 10

Logout Mark Read Team Forum Stats Members Help
D3D11 and DXVA updates - Beta test builds (merged)0