[RESOLVED] HEVC/H.265 10/12-bit Support

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

Re: [RESOLVED] HEVC/H.265 10/12-bit Support

Post by admin »

What is the provenance of this file? It's title shows 2160p but the coded height is only 1612, with no black bars, so it can't be real ripped UHDBD content.
DAE avatar
Guest

Re: [RESOLVED] HEVC/H.265 10/12-bit Support

Post by Guest »

UHD hasn't been "cracked" by any of the known software
I believe there are two files out there that claim to be UHD rips
The first one might be, I believe it was mentioned somewhere, a resize of HD to UHD.
The second was still an unknown means, possibly thru a capture card or HDCP stripper.
I realize I used the expression "I believe" a few times but this issue is a bit of an enigma wrapped in a mystery
DAE avatar
Guest

Re: [RESOLVED] HEVC/H.265 10/12-bit Support

Post by Guest »

Hacksaw Ridge was derived from 3.4K source, rendered from a 2K DI, and up-converted to 4K. With the limited exposure to Ultra HD either sourced from 2K or 4K Digital Intermediates we are left to judge based upon what we have seen thus far.
from this site
http://ultrahd.highdefdigest.com/42357/ ... luray.html
User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

Re: [RESOLVED] HEVC/H.265 10/12-bit Support

Post by admin »

The Hacksaw Ridge sample was re-encoded with x265 (possibly from some kind of capture, or even just a cheap upsampling) and the encoding parameters are included in an SEI. So I will try to see which if any of these parameters may be giving problems for CUVID.

Anybody see anything problematic here? Other than uhd-bd=0? :wow:

x265 (build 103) - 2.2+2-998d4520d1cf:[Windows][GCC 6.2.0][64 bit] 10bit - H.265/HEVC codec - Copyright 2013-2016 (c) Multicoreware Inc - http://x265.org - options: cpuid=1173503 frame-threads=5 numa-pools=16 wpp no-pmode no-pme no-psnr no-ssim log-level=2 bitdepth=10 input-csp=1 fps=23976/1000 input-res=3840x1612 interlace=0 total-frames=0 level-idc=0 high-tier=1 uhd-bd=0 ref=1 no-allow-non-conformance repeat-headers annexb aud hrd info hash=0 no-temporal-layers open-gop min-keyint=23 keyint=250 bframes=3 b-adapt=2 b-pyramid bframe-bias=0 rc-lookahead=40 lookahead-slices=0 scenecut=40 no-intra-refresh ctu=32 min-cu-size=8 no-rect no-amp max-tu-size=32 tu-inter-depth=1 tu-intra-depth=1 limit-tu=0 rdoq-level=2 signhide no-tskip nr-intra=0 nr-inter=0 no-constrained-intra strong-intra-smoothing max-merge=2 limit-refs=0 no-limit-modes me=2 subme=7 merange=57 temporal-mvp weightp weightb no-analyze-src-pics no-deblock no-sao no-sao-non-deblock rd=6 no-early-skip no-rskip fast-intra no-tskip-fast no-cu-lossless no-b-intra rdpenalty=0 psy-rd=4.00 psy-rdoq=8.00 no-rd-refine analysis-mode=0 no-lossless cbqpoffs=0 crqpoffs=0 rc=crf crf=21.5 qcomp=0.80 qpstep=1 stats-write=0 stats-read=0 vbv-maxrate=100000 vbv-bufsize=100000 vbv-init=0.9 crf-max=0.0 crf-min=0.0 ipratio=1.10 pbratio=1.00 aq-mode=3 aq-strength=1.00 no-cutree zone-count=0 no-strict-cbr qg-size=32 no-rc-grain qpmax=51 qpmin=0 sar=0 overscan=0 videoformat=5 range=0 colorprim=9 transfer=16 colormatrix=9 chromaloc=1 chromaloc-top=2 chromaloc-bottom=2 display-window=0 master-display=G(13250,34500)B(7500,3000)R(34000,16000)WP(15635,16450)L(10000000,0) max-cll=1000,321 min-luma=0 max-luma=1023 log2-max-poc-lsb=8 vui-timing-info vui-hrd-info slices=1 opt-qp-pps opt-ref-list-length-pps no-multi-pass-opt-rps scenecut-bias=0.05
User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

Re: [RESOLVED] HEVC/H.265 10/12-bit Support

Post by admin »

I just had a look at a sample of the Smurfs "rip" linked at reddit. The poster says it's a one-minute sample of the original M2TS but the file is an MKV. It crashes at the end in all players (bad upload/download?). The portion that plays correctly in all players also plays fine in DGDecNV. There are no encoding parameters or other identifiable strings in the elementary stream. The dimensions are correct and the black bars are present. The bitrate seems appropriately high. It has appropriate audio. It contains the mastering SEI. It was muxed by mkvmerge on May 3, 2017.
User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

Re: [RESOLVED] HEVC/H.265 10/12-bit Support

Post by admin »

I had the byte order wrong on my colour mastering SEI fields. I also needed to add the content light level SEI. I'll slipstream those fixes tomorrow.
DAE avatar
jpsdr
Posts: 214
Joined: Tue Sep 21, 2010 4:16 am

Re: [RESOLVED] HEVC/H.265 10/12-bit Support

Post by jpsdr »

From the few i've understood (but i'm not sure at all i've understood properly), mastering parameters can change on the fly, it's the core purpose of the HDR thing. In that case, how do you correlate the informations of the MASTERING line with the frame number ?
Or asked differently : How do you know what parameters you have to apply on a specific frame ?
I've tested only with the sample on doom9, and didn't see anything in the MASTERING informations who could be a frame number.
I thought for exemple that in the mastering information there would be something like the "start" frame number telling at which frame you have to start using these value. And when they change, the frame number where they change, and the new values.
Something like :
0 [Parameters]
150 [Parameters]
2017 [Parameters]
etc...
... I've a little trouble to make correct english for this, i hope i'm understandable.
User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

Re: [RESOLVED] HEVC/H.265 10/12-bit Support

Post by admin »

SEIs are not associated with individual frames in the stream syntax. Also, look at the syntax in the x265 command line; there is no frame number and only one instance. Finally, the streams I have do not have multiple different SEIs. As things become clearer in practice I can adapt.
DAE avatar
jpsdr
Posts: 214
Joined: Tue Sep 21, 2010 4:16 am

Re: [RESOLVED] HEVC/H.265 10/12-bit Support

Post by jpsdr »

Ok, thanks for the information. As i said, there is a big chance i didn't understood things properly. :scratch:
I think we will probably have to wait for a full true mt2s UHD file to see what happens in real world... ;)
User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

Re: [RESOLVED] HEVC/H.265 10/12-bit Support

Post by admin »

Theoretically, the SEIs can change at any IRAP picture (start of coded sequence), so I have modified the code to print the SEIs whenever they change (it's init'ed to zeros so the first one is considered a change). Thanks for your suggestion.

Will slipstream today.
DAE avatar
jpsdr
Posts: 214
Joined: Tue Sep 21, 2010 4:16 am

Re: [RESOLVED] HEVC/H.265 10/12-bit Support

Post by jpsdr »

Nice. In that case, if possible, put also the frame number before the SEIs (unless it was allready intended to).
After, next step will only be possible if avs+ implement frame properties... :roll:
User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

Re: [RESOLVED] HEVC/H.265 10/12-bit Support

Post by admin »

Frame numbers are already included in the index file. When the SEIs appear, all frames thereafter up to changed SEIs are affected.

SPS 37
PPS 714
MASTERING 13250 34500 7500 3000 34000 16000 15635 16450 40000000 50
LIGHT 1132 923
0:IDR 1551 2 0
1:TRAIL 0 1
2:TRAIL 0 2
3:TRAIL 1 3
4:TRAIL 0 4
5:TRAIL 0 5
6:TRAIL 1 6
7:TRAIL 0 7
8:TRAIL 0 8
9:TRAIL 1 9
10:TRAIL 0 10
etc.
DAE avatar
jpsdr
Posts: 214
Joined: Tue Sep 21, 2010 4:16 am

Re: [RESOLVED] HEVC/H.265 10/12-bit Support

Post by jpsdr »

Ok, i see, nice work.
:bravo:

I think now we'll have to see if in real life it exists files with several SEIs information.
This will probably take a little time.

Edit
I've take a look at the help file of the last version.
You said mastering information follow the HEVC spec.
Can you pinpoint me to where i can have more information about it ? Where i have at least the name of each data ?
If you can tell me something like "Look on the document T-REC-H.264-201602-I!!PDF-E page 214"... :D
(It's an exemple, of course, i know the information in not in the specific document quoted).
User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

Re: [RESOLVED] HEVC/H.265 10/12-bit Support

Post by admin »

T-REC-H.265-201612-I!!PDF-E.pdf

Search for:

mastering_display_colour_volume
content_light_level_info
DAE avatar
jpsdr
Posts: 214
Joined: Tue Sep 21, 2010 4:16 am

Re: [RESOLVED] HEVC/H.265 10/12-bit Support

Post by jpsdr »

Ok, thanks.
Sorry if i'm bothering you, it's just that i have this (little for now) idea to try to make an HDR to SDR plugin converter, so i'm trying to gather information of how this what seems to be a nightmare works... :?
User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

Re: [RESOLVED] HEVC/H.265 10/12-bit Support

Post by admin »

No bother, jp. You've been very helpful. I don't think it's a nightmare. All the specifications are available and quite clear. Squabbling at obscure websites should not cloud your vision.
DAE avatar
jpsdr
Posts: 214
Joined: Tue Sep 21, 2010 4:16 am

Re: [RESOLVED] HEVC/H.265 10/12-bit Support

Post by jpsdr »

According the last 2 of mastering_display_colour_volume are u32, and looking at the values, can i guess that the parameters are in this order :

MASTERING max_content_light_level max_pic_average_light_level display_primaries_x[0] display_primaries_x[1] display_primaries_y[1] display_primaries_x[2] display_primaries_y[2] white_point_x white_point_y max_display_mastering_luminance min_display_mastering_luminance

Maybe you can add this order information in the help file on a next release (i don't think there is a big hurry).
User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

Re: [RESOLVED] HEVC/H.265 10/12-bit Support

Post by admin »

It's described in the specification. I think anyone wanting to use those numbers is going to need to closely look at the specification anyway, so I prefer not to try to duplicate either the syntax or semantics in my documentation.

LIGHT max_content_light_level max_pic_average_light_level
MASTERING display_primaries_x[G] display_primaries_y[G] display_primaries_x display_primaries_y display_primaries_x[R] display_primaries_y[R] white_point_x white_point_y max_display_mastering_luminance min_display_mastering_luminance
Post Reply