[RESOLVED] 4K HDR: failed to create video decoder on 43x.xx

Support forum for DGDecNV
User avatar
admin
Site Admin
Posts: 4394
Joined: Thu Sep 09, 2010 3:08 pm

Re: 4K HDR: failed to create video decoder on 43x.xx

Post by admin » Wed Aug 21, 2019 7:14 am

Bummer. First I'll try to run nVidia decode samples under the new driver.

User avatar
admin
Site Admin
Posts: 4394
Joined: Thu Sep 09, 2010 3:08 pm

Re: 4K HDR: failed to create video decoder on 43x.xx

Post by admin » Thu Aug 22, 2019 11:15 am

It's all clear now. When 10-bit came along and before nVidia officially supported it, some people discovered that with a little hack you could decode the 10-bit and the driver would downsample it to 8-bit (NV12). The decoder was set up with an NV12 surface and everything worked fine. For DGIndexNV there is a CUDA kernel to convert that NV12 to RGB24 for display.

Now, the 436.02 driver does not support this hack anymore, and the decode surface must be P016 for 10-bit decoding. That is what DGDecodeNV currently does for 10-bit sources with fulldepth=true. To test this, I hacked DGIndexNV to not decode but still allow the stream to be indexed (using one of tormento's streams). Then I made a script with DGSource() delivering fulldepth=true. Everything worked fine with 436.02. But of course, fulldepth=false is broken as it still tries to decode with an NV12 surface.

So, I have to redesign things to always decode 10-bit to a P016 surface. There are a couple ways to go and I need to think about it thoroughly. It could take weeks once you add regression testing and documentation.

The good news is that things are understood and it definitely can be fixed. The bad news is that it will take a while.

User avatar
admin
Site Admin
Posts: 4394
Joined: Thu Sep 09, 2010 3:08 pm

Re: 4K HDR: failed to create video decoder on 43x.xx

Post by admin » Thu Aug 22, 2019 2:47 pm

We need a P016->RGB24 kernel for DGIndexNV. DGSource() can always automatically deliver YV12 or P016 depending on the input stream bit depth (no more fulldepth option).

gonca
Posts: 763
Joined: Sun Apr 08, 2012 6:12 pm

Re: 4K HDR: failed to create video decoder on 43x.xx

Post by gonca » Thu Aug 22, 2019 4:29 pm

Would it be possible to deliver P016 all the time and the user could then use ConvertBits(8) if 8 bit output was desired?

User avatar
admin
Site Admin
Posts: 4394
Joined: Thu Sep 09, 2010 3:08 pm

Re: 4K HDR: failed to create video decoder on 43x.xx

Post by admin » Thu Aug 22, 2019 7:52 pm

Yes, and there are much better dithering options available when converting with Avsynth+/Vapoursynth.

User avatar
hydra3333
Posts: 171
Joined: Wed Oct 06, 2010 3:34 am
Contact:

Re: 4K HDR: failed to create video decoder on 43x.xx

Post by hydra3333 » Thu Aug 22, 2019 11:06 pm

gonca wrote:
Thu Aug 22, 2019 4:29 pm
Would it be possible to deliver P016 all the time and the user could then use ConvertBits(8) if 8 bit output was desired?
It would be interesting to see if any existing end-user scripts need changing to suit.
From the way you are talking, I suspect not.
Great ! :D

User avatar
tormento
Posts: 252
Joined: Mon Sep 20, 2010 2:18 pm

Re: 4K HDR: failed to create video decoder on 43x.xx

Post by tormento » Fri Aug 23, 2019 1:38 am

admin wrote:
Thu Aug 22, 2019 7:52 pm
Yes, and there are much better dithering options available when converting with Avsynth+/Vapoursynth.
I am thinking about older system that rely mostly on graphic cards to decode/encode media.

Why not to expand functionalities of HDR to SDR CUDA to apply transformation with dithering?

User avatar
admin
Site Admin
Posts: 4394
Joined: Thu Sep 09, 2010 3:08 pm

Re: 4K HDR: failed to create video decoder on 43x.xx

Post by admin » Fri Aug 23, 2019 8:12 am

hydra3333 wrote:
Thu Aug 22, 2019 11:06 pm
It would be interesting to see if any existing end-user scripts need changing to suit.
Any script that has DGSource() opening a 10-bit stream with explicit or implicit fulldepth=false will need to be changed.

I don't think it is a source filter's job to be doing bit-depth conversions.

User avatar
admin
Site Admin
Posts: 4394
Joined: Thu Sep 09, 2010 3:08 pm

Re: 4K HDR: failed to create video decoder on 43x.xx

Post by admin » Fri Aug 23, 2019 8:13 am

tormento wrote:
Fri Aug 23, 2019 1:38 am
Why not to expand functionalities of HDR to SDR CUDA to apply transformation with dithering?
Yes, everything is on the table.

User avatar
admin
Site Admin
Posts: 4394
Joined: Thu Sep 09, 2010 3:08 pm

Re: 4K HDR: failed to create video decoder on 43x.xx

Post by admin » Mon Aug 26, 2019 6:37 pm

Good news guys! I have it coded and working fine under 436.xx. I did it just as earlier described. As expected, the hardest part was getting the P016->RGB24 CUDA kernel working. Debugging is difficult for kernel development; even doing a printf from kernel code is a nightmare. But I got lucky after 6 hours of poking and prodding. ;) I just convert to 8-bit for display by truncating; there's no need for anything fancier for DGIndexNV.

Now I need to regression test and update the documentation. Maybe I can make a slipstream tomorrow.

Post Reply