[RESOLVED] Support for HEVC?

Anything related to video and my tools that is not a support request.
User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

Re: Support for HEVC?

Post by admin »

Major step completed: I am playing raw HEVC video in DGIndexNV. That verifies the CUVID decoding with my video source and NALU parsing. Now I have to do all the ancillary stuff that DGIndex does (timeline navigation, info dialog, indexing, etc.), i.e., the hard part. But theoretically there are no obstacles to completing it now. :wow:
DAE avatar
Sharc
Posts: 233
Joined: Thu Sep 23, 2010 1:53 pm

Re: Support for HEVC?

Post by Sharc »

admin wrote:If 9600GS works with 2048 then you will be fine with the HEVC version.

EDIT: I was wrong. You need a GTX 750/950/960. 9600GS will need to go to the video card graveyard I
'm afraid.
Too bad, your EDIT..... :)
User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

Re: Support for HEVC?

Post by admin »

It should have gone to the graveyard long ago, actually. :ugeek:
DAE avatar
Sharc
Posts: 233
Joined: Thu Sep 23, 2010 1:53 pm

Re: Support for HEVC?

Post by Sharc »

Well, it has served the purpose well, so far ....
DAE avatar
Aleron Ives
Posts: 126
Joined: Fri May 31, 2013 8:36 pm

Re: Support for HEVC?

Post by Aleron Ives »

admin wrote:As far as I can determine, you need VP6 for partial acceleration and VP7 for full acceleration.
Thank you. Perhaps I will upgrade if nVidia releases some useful cards in the 1000 series. :)
User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

Re: Support for HEVC?

Post by admin »

Timeline navigation for HEVC is complete. Moving on to indexing...
User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

Re: Support for HEVC?

Post by admin »

Generation of a rudimentary HEVC index file is complete. It's enough to do correct random access though DGDecodeNV but all the bells and whistles are not there yet (e.g., repeat flag handling, info for debug overlay, etc.) I want to get DGDecodeNV working at least in this mode before going back to add the bells and whistles. Then, too, I need to add support for TS, MKV, and MP4 containers. We also wait for nVidia to support Main10.

The HM reference parser code is ridiculously complex so I rolled my own. :ugeek: Anyway it would have to be heavily modified to work with my per-NALU parsing architecture.

Following is what the index file looks like at this time. The frame count matches MPC-HC so it seems I am detecting new pictures correctly, which is the sine qua non of correct indexing.
__________
DGHEVCIndexFileNV14 DGIndexNV 2050 X64
D:\DGIndexNV\.\x64\Debug\

TearsOfSteelFull12min_720p_24fps_27qp_831kbps_720p_GPSNR_41.65_HM11.hevc 76244512

DEVICE 0
DECODE_MODES 0,0,0
STREAM 0
CLIP 0 0 0 0
RANGE 0 0 76244511 0
AUDIO

VPS 0
SPS 29
PPS 82
IDR 93
0: FRM
1: FRM
2: FRM
3: FRM
4: FRM
5: FRM
6: FRM
7: FRM
8: FRM
9: FRM
10: FRM
11: FRM
12: FRM
13: FRM
14: FRM
15: FRM
16: FRM
17: FRM
18: FRM
19: FRM
20: FRM
21: FRM
22: FRM
23: FRM
24: FRM
25: FRM
26: FRM
27: FRM
28: FRM
29: FRM
30: FRM
31: FRM
32: FRM
33: FRM
34: FRM
35: FRM
36: FRM
37: FRM
38: FRM
39: FRM
40: FRM
41: FRM
42: FRM
43: FRM
44: FRM
45: FRM
46: FRM
47: FRM
VPS 4173
SPS 4202
PPS 4255
IDR 4266
48: FRM
49: FRM
50: FRM
51: FRM
52: FRM
53: FRM
54: FRM
55: FRM
56: FRM
57: FRM
[.....]
VPS 76242178
SPS 76242207
PPS 76242260
IDR 76242271
17568: FRM
17569: FRM
17570: FRM
17571: FRM
17572: FRM
17573: FRM
17574: FRM
17575: FRM
17576: FRM
17577: FRM
17578: FRM
17579: FRM
17580: FRM
17581: FRM
17582: FRM
17583: FRM
17584: FRM
17585: FRM
17586: FRM
17587: FRM
17588: FRM
17589: FRM
17590: FRM
17591: FRM
17592: FRM
17593: FRM
17594: FRM
17595: FRM
17596: FRM
17597: FRM
17598: FRM
17599: FRM
17600: FRM
17601: FRM
17602: FRM
17603: FRM
17604: FRM
17605: FRM
17606: FRM
17607: FRM
17608: FRM
17609: FRM
17610: FRM
17611: FRM
17612: FRM
17613: FRM
17614: FRM
17615: FRM
SIZ 1280 x 720
FPS 25000 / 1000
CODED 17616
ORDER -1
User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

Re: Support for HEVC?

Post by admin »

That didn't take long. I'm serving HEVC video through an AVS script using DGDecodeNV with full random access. Random access is really fast on this GTX 950!
DAE avatar
Sharc
Posts: 233
Joined: Thu Sep 23, 2010 1:53 pm

Re: Support for HEVC?

Post by Sharc »

Nice progress! It looks like I have to think seriously about replacing my 9600GS.....
User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

Re: Support for HEVC?

Post by admin »

Thanks Sharc. You're on to something there. That moldy 9600 won't take you into the coming UHD world. A 950/960 is the way to go right now. At some point horse-drawn carriages must give way to automobiles. :o

If you want to be on the bleeding edge, regular HW upgrades are essential.
DAE avatar
Aleron Ives
Posts: 126
Joined: Fri May 31, 2013 8:36 pm

Re: Support for HEVC?

Post by Aleron Ives »

admin wrote:That moldy 9600 won't take you into the coming UHD world.
On the other hand, unless you can upgrade your eyes, you might not get much benefit from entering the UHD world, anyway. :lol: As far as I can tell, it's more about selling TVs (since the 3D push didn't work) than actually improving the viewing experience. In any event, I'm hoping nVidia comes out with some better upgrades for the 1000 series, as I didn't find the specs of the 960 to be good enough to warrant replacing my 760, so I'll have to forego HEVC support for the time being. My hardware players don't support UHD or HEVC anyway, so I can't use them as input or output formats. A GTX 960 would be a pretty huge upgrade from a 9600, though. I upgraded from a 6800 to my 760. :wow:
DAE avatar
jpsdr
Posts: 214
Joined: Tue Sep 21, 2010 4:16 am

Re: Support for HEVC?

Post by jpsdr »

Aleron Ives wrote: As far as I can tell, it's more about selling TVs (since the 3D push didn't work) than actually improving the viewing experience.
I totaly agree with you on the commercial part, UHD is more to try to sell new TVs. But, nevertheless, there is a viewing improvement, but it's far away less obvious than going from SD to FHD...
User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

Re: Support for HEVC?

Post by admin »

CRA handling is a bit of a challenge, as the decoder discards the preceding RASL pictures, complicating random access. Fortunately, I have a working strategy for it. X265.exe and others use CRAs rather than IDRs (except for the first GOP of the stream).

Anybody ever see BLA pictures? If so, I would appreciate a sample. Thank you.
User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

Re: Support for HEVC?

Post by admin »

Everything is working great with CRAs. I ran into an issue with tiles, basically CUVID fails on any stream using tiles*. But as usual nVidia support is outstanding and I am informed that the bug is trivial and will be fixed in an upcoming driver. Still lots of time to get ready for UHD bluray.

BTW, I am also informed that HEVC 10-bit support will be added to CUVID, so we will be ready to rock and roll. It will support dithering down to 8-bit for feeding 8-bit Avisynth, but will also be able to deliver 10-bit to 10-bit processing chains. It's up to DGDecodeNV to decide what to give to the Avisynth host.

Next up, HEVC in MKV support (TS just works and MP4 comes later). Then I will probably release an alpha as we need to discover any other problematic streams. Also, I changed DGIndexNV to support higher zooms, as UHD was pushing the buttons off screen, oy! I have Zoom 1 for full size, Zoom 1/2 for half size, and Zoom 1/4 for, you guessed it, quarter size. I experimented with moving all the navigation stuff to the top of the window below the menu bar, but it looked ugly, so I went with the different zoom factors instead. We should be using UHD monitors with our development PCs, but until that day zooming works fine.

* Introduction of a tile, a new concept, is yet another innovation of H.265/HEVC standard compared to H.264/AVC standard. Tiles divide the frame into a grid of rectangular regions that can be independently decoded/encoded. Tiles opens up new possibilities to increase encoding and decoding efficiency of video data using parallel processing on modern multicore desktop and mobile platforms. [Elecard]
DAE avatar
jpsdr
Posts: 214
Joined: Tue Sep 21, 2010 4:16 am

Re: Support for HEVC?

Post by jpsdr »

... At first glance, it seems similar to slices in H264 (from the few i've read about slices), but i don't know deeply enough, and i may misunderstand things...
User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

Re: Support for HEVC?

Post by admin »

That's right, jpsdr. I think the idea is that tiles are less complex to use than AVC's slices with FMO.

HEVC in MKV is working now in DGDecNV. I'll add MP4 support and then release an alpha.
DAE avatar
jpsdr
Posts: 214
Joined: Tue Sep 21, 2010 4:16 am

Re: Support for HEVC?

Post by jpsdr »

admin wrote:That's right, jpsdr. I think the idea is that tiles are less complex to use than AVC's slices with FMO.
In that case, saying Introduction of a tile, a new concept, is yet another innovation of H.265/HEVC standard compared to H.264/AVC standard may be not totaly true, that's what's somehow bothering me (And if i understand properly, you know you just quote [Elecard], so it's not you claiming that).
That's all.
User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

Re: Support for HEVC?

Post by admin »

I don't see anything "not totally true" there. And the statement continues on to describe tiles compared to slices, but I didn't give the full quote.
User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

Re: Support for HEVC?

Post by admin »

MP4 support for "hvc1" is working. I am looking for an "hev1" sample file to get that working. If anyone has one, please let me know ASAP. Thank you. Then I will release an alpha.
DAE avatar
Sharc
Posts: 233
Joined: Thu Sep 23, 2010 1:53 pm

Re: Support for HEVC?

Post by Sharc »

hev1 seems to be quite uncommon (?). All I found were hvc1. Should you post the request in some of the other forums?
User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

Re: Support for HEVC?

Post by admin »

I've implemented it per spec, so I will just wait and see how it plays out.
User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

Re: Support for HEVC?

Post by admin »

I ran AvsMeter on a UHD 80Mbps HEVC elementary stream (main profile, main tier, level 5.1) and got 100fps with 9% CPU usage on my GTX 950. Interestingly, in DGIndexNV with Disable Display set, I got 130fps. The difference is that DGIndex avoids the NV12-to-YV12 conversion when Disable Display is set [maybe the conversion could be optimized ;) ]. I think 100fps delivered to Avisynth for high-bitrate UHD is pretty good.

I'll make an alpha shortly.
User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

Re: Support for HEVC?

Post by admin »

I have uploaded to the usual binaries area a test version of 2051 adding HEVC support.

http://rationalqm.us/binaries.html

I would appreciate your test results. Even if you do not have a card that supports HEVC, your testing will be appreciated to ensure that I have not broken any existing functionality.

Following is the content of the included file Notes.txt:

DGDecNV 2051 test version
-------------------------

This build adds support for HEVC video. Please be aware of the following
limitations:

* The DGIndexNV.ini file format has changed, so please delete your existing
.ini file.

* HEVC requires an nVidia device that supports HEVC, such as the
GTX 750/950 etc. If your device does not support HEVC and you attempt
to open an HEVC stream, a popup error message will appear.

* 10-bit HEVC streams are not yet supported. Only 4:2:0 streams
are supported.

* Tiles are broken in the current nVidia driver. This will be fixed
in a future release of the driver. Update: Fixed in 358.87.

* Frame/field repeats are not yet implemented. If you have an HEVC
stream with repeat flags, please contact me.

Thank you!
User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

Re: Support for HEVC?

Post by admin »

Fixed a regression: audio detection during play/preview of PS/TS was broken. Please re-download.
DAE avatar
Sharc
Posts: 233
Joined: Thu Sep 23, 2010 1:53 pm

Re: Support for HEVC?

Post by Sharc »

I look forward to trying it out when I will be back home, after Nov. 24.
Thank you for the continued support of DGDecNV.
Post Reply