Video SDK Hybrid Decode HEVC

I’m working on a video player that needs to decode 4K 60Hz HEVC video. Originally, I had planned on using NVDEC but after compiling and installing it, I found that my target platform’s 970 GPU doesn’t have HEVC decode support.

However, I found online references to the fact that the 970 can do hybrid decode [url]Nvidia PureVideo - Wikipedia

Unfortunately I can’t seem to find any documentation within the NVDEC SDK about how to utilize that hybrid decoding. Can anyone point me to where I might be able to find that information?

There’s no difference of treatment; it’s the same API whether the underlying implementation is hybrid or not. Are you asking how to create the decoder for HEVC streams? You just set the correct codec type and carry on. If you need sample code, please advise. Or if your own code is not working perhaps you could post it for review.

Thanks for the reply.

I figured that the API would be different, because on my 970 when I test for HEVC support the returned value is false. Here’s how I’m testing for support:

CUdevice cuDevice = 0;
CUresult dev_res = cuDeviceGet(&cuDevice, 0);
CUcontext ctx = NULL;
CUresult context_res = cuCtxCreate(&ctx, 0, cuDevice);
CUVIDDECODECAPS decodeCaps = {0,};
decodeCaps.eCodecType = cudaVideoCodec_HEVC;
decodeCaps.eChromaFormat = cudaVideoChromaFormat_420;
decodeCaps.nBitDepthMinus8 = 0;
CUresult supported = cuvidGetDecoderCaps(&decodeCaps);
if (decodeCaps.bIsSupported)
  g_print("supported\n");
else
  g_print("not supported\n");
cuCtxDestroy(ctx);

Whereas the 970 should be in feature set E and should have hybrid HEVC decoding available.

You’re welcome. That’s interesting. Maybe it is referring to full HW support. Can you try to play an HEVC file with VLC configured for nVidia HW support? Or MPC-HC (options/internal filters/video decoder). If that works you could go ahead and try to create the decoder. Also maybe DXVA Checker. Or try the dx9 sample decoder app (never could get dx11 sample app working for HEVC, even on my 1080 Ti). You’d have to modify it for an HEVC input file but that’s not difficult (it comes set up for an MPEG2 input file).

On the web you see people saying the 970 plays HEVC but is too slow for 4K. So maybe your plan can’t work out in any case due to performance issues for 4K.

A 1050 Ti would be ideal as a cost-effective upgrade. $150-$200

DXVA checker lists HEVC_VLD_Main, but that’s the only H265 decoder listed.
VLC plays the file, but with hardware decoding on I get a lot of visual corruption. MPC-HC says “Cannot render the file”, regardless of what hardware decoder is selected.

I tried to create the NVDEC decoder anyway, but I get an error returned when using HEVC. It does however with H264.

ffmpeg/ffplay can render the file at 60Hz with, I believe, a SW only decode. So I’d imaging any hybrid decoding would be better than that, albeit perhaps only slightly.

HEVC_VLD_Main is the 8-bit support. 970 does not have Main10. If you are on Win10 be aware that driver support for the older cards is a bit spotty.

I don’t think that’s necessarily true. CPU<->GPU communications over PCIe for large frames can be a significant bottleneck.

I work with an older CUVID SDK (to support older architectures), so I don’t know what may have changed in 8.xx. Thankfully, nVidia has been wonderful with backward compatibility.

I think your best bet is an upgrade but maybe Ryan can add some insight. Hybrid decoding was an interim measure never expected to be a high-performance solution. IMHO of course.

Hi somedude114,

Hybrid HEVC decoder is supported only on Windows when used through DXVA. The driver automatically decides whether to choose hybrid or hardware decoder depending upon the underlying GPU support. From your post, it’s not clear if you are using Linux or Windows. If you are using Windows, you can try using Microsoft DXVA for decoding. GTX 970 driver will internally route the decoding to the hybrid decoder.

Thanks,

Ryan Park