Opened 22 months ago

Last modified 4 months ago

#7624 open enhancement

Support IPTPQc2 with chroma reshaping in Dolby Vision samples

Reported by: cehoyos Owned by:
Priority: wish Component: avcodec
Version: git-master Keywords: hevc hdr
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

The Dolby Vision samples show strange colours:
https://4kmedia.org/lg-amaze-dolby-vision-uhd-4k-demo/

$ ffmpeg -i LG\ Amaze\ Dolby\ Vision\ UHD\ 4K\ Demo.ts -qscale 2 out.avi
ffmpeg version N-92729-ga1f0dd2 Copyright (c) 2000-2018 the FFmpeg developers
  built with gcc 6.4.0 (GCC)
  configuration: --enable-gpl --enable-libxml2 --enable-gnutls --enable-gmp --enable-version3 --enable-libx264
  libavutil      56. 24.101 / 56. 24.101
  libavcodec     58. 42.102 / 58. 42.102
  libavformat    58. 24.101 / 58. 24.101
  libavdevice    58.  6.101 / 58.  6.101
  libavfilter     7. 46.101 /  7. 46.101
  libswscale      5.  4.100 /  5.  4.100
  libswresample   3.  4.100 /  3.  4.100
  libpostproc    55.  4.100 / 55.  4.100
[hevc @ 0x283a800] Skipping NAL unit 62
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'LG Amaze Dolby Vision UHD 4K Demo.ts':
  Metadata:
    major_brand     : mp42
    minor_version   : 1
    compatible_brands: mp42dby1isom
    creation_time   : 2017-04-13T20:09:18.000000Z
  Duration: 00:00:56.20, start: 0.000000, bitrate: 28362 kb/s
    Stream #0:0(und): Video: hevc (Main 10) (dvhe / 0x65687664), yuv420p10le(tv), 3840x2160 [SAR 1:1 DAR 16:9], 27713 kb/s, 60 fps, 60 tbr, 60k tbn, 60 tbc (default)
    Metadata:
      creation_time   : 2017-04-13T20:09:18.000000Z
      handler_name    : video handler
      encoder         : DOVI Coding
    Stream #0:1(und): Audio: eac3 (ec-3 / 0x332D6365), 48000 Hz, 5.1(side), fltp, 640 kb/s (default)
    Metadata:
      creation_time   : 2017-04-13T20:09:18.000000Z
      handler_name    : sound handler
    Side data:
      audio service type: main
Please use -q:a or -q:v, -qscale is ambiguous
Stream mapping:
  Stream #0:0 -> #0:0 (hevc (native) -> mpeg4 (native))
  Stream #0:1 -> #0:1 (eac3 (native) -> ac3 (native))
Press [q] to stop, [?] for help
[hevc @ 0x286df00] Skipping NAL unit 62
[hevc @ 0x2868100] Skipping NAL unit 62
[hevc @ 0x287d0c0] Skipping NAL unit 62
[hevc @ 0x28cdf80] Skipping NAL unit 62
[hevc @ 0x28de740] Skipping NAL unit 62
[hevc @ 0x2945bc0] Skipping NAL unit 62
[hevc @ 0x29562c0] Skipping NAL unit 62
[hevc @ 0x2977440] Skipping NAL unit 62
[hevc @ 0x2966ac0] Skipping NAL unit 62
[hevc @ 0x286df00] Skipping NAL unit 62
[hevc @ 0x2868100] Skipping NAL unit 62
Output #0, avi, to 'out.avi':
  Metadata:
    major_brand     : mp42
    minor_version   : 1
    compatible_brands: mp42dby1isom
    ISFT            : Lavf58.24.101
    Stream #0:0(und): Video: mpeg4 (FMP4 / 0x34504D46), yuv420p, 3840x2160 [SAR 1:1 DAR 16:9], q=2-31, 200 kb/s, 60 fps, 60 tbn, 60 tbc (default)
    Metadata:
      creation_time   : 2017-04-13T20:09:18.000000Z
      handler_name    : video handler
      encoder         : Lavc58.42.102 mpeg4
    Side data:
      cpb: bitrate max/min/avg: 0/0/200000 buffer size: 0 vbv_delay: -1
    Stream #0:1(und): Audio: ac3 ([0] [0][0] / 0x2000), 48000 Hz, 5.1(side), fltp, 448 kb/s (default)
    Metadata:
      creation_time   : 2017-04-13T20:09:18.000000Z
      handler_name    : sound handler
      encoder         : Lavc58.42.102 ac3
    Side data:
      audio service type: main
[hevc @ 0x287d0c0] Skipping NAL unit 62
[hevc @ 0x28cdf80] Skipping NAL unit 62

...

[hevc @ 0x28de740] Skipping NAL unit 62
[hevc @ 0x2945bc0] Skipping NAL unit 62
frame= 3372 fps= 31 q=2.0 Lsize= 1769927kB time=00:00:56.20 bitrate=257993.6kbits/s speed=0.51x
video:1766724kB audio:3073kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.007307%

Attachments (1)

Color Bars BT2020 50%_Blue Filter_Dolby_Vision.rar (302.1 KB) - added by Balling 10 months ago.

Download all attachments as: .zip

Change History (6)

comment:1 Changed 22 months ago by JEEB

The colorspace is supposed to be Dolby's skewed ICtCp + BT.2020 + PQ.

This is why I noted that adding the identifiers lets you demux and decode, but not present.

comment:2 Changed 11 months ago by Balling

  • Status changed from new to open
Version 0, edited 11 months ago by Balling (next)

comment:3 Changed 10 months ago by Balling

I just wanted to add another example (besides https://drive.google.com/file/d/1aP276spsqW-EbIIVrzdI9mwTYO87d0ac/view?usp=sharing) which is simpler and which though should be right!
I also added issue https://github.com/sekrit-twc/zimg/issues/117 so maybe this will be finally solved and we will be more close to whole HDR10+ / Dolby Vision / Dolby Atmos decoding!

comment:4 Changed 6 months ago by Balling

  • Summary changed from Improve colours in Dolby Vision samples to Support IPTPQc2 with chroma reshaping in Dolby Vision samples

So, yes, here is the name of it and, to all reverse engineers, here is an appx of Windows 10 that can HW decode (at least with nvidia nvdec) and correctly present IPTPQc2 color! Update that to new version in Microsoft Store.
https://drive.google.com/file/d/1MCtZHrmPcIBwh7GjoRxVpp6VR7GvbyEY/view

And here is a new version (you cannot install it though) https://drive.google.com/file/d/1QjpcbX2owljh8Wb_XYgx2LhOm1qk7NTc/view?usp=sharing

https://www.microsoft.com/en-us/p/app/9pltg1lwphlf?irgwc=1&OCID=AID2000142_aff_7805_2806082&tduid=(ir__qw3q0g3mbnuvtlifmqxenxsf6v2xn2h61e9se90q00)(7805)(2806082)()()&irclickid=_qw3q0g3mbnuvtlifmqxenxsf6v2xn2h61e9se90q00

Open using Microsoft Movies&TV

Last edited 5 months ago by Balling (previous) (diff)

comment:5 Changed 4 months ago by cehoyos

  • Keywords hdr added
Note: See TracTickets for help on using tickets.