Selur's Little Message Board

Full Version: Erkennung von Matrix coeffecients
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Keine Ahnung ob das ein Bug ist, aber mir ist aufgefallen, das Quellen mit Matrix coefficients : BT.2020 non-constant nicht richtig erkannt werden, bzw. Hybrid bei Color Matrix (wenn man "to input" aktiviert hat) bt2020c statt bt2020nc ausgewählt wird.

Das hat den Effekt, das wenn man eine Dolby-Vision Quelle danach wieder zusammenbaut (mit DDVT aus doom9) folgendes bekommt:

HDR format: Dolby Vision, Version 1.0, dvhe.08.06, BL+RPU, SDR compatible / SMPTE ST 2086, HDR10 compatible
mit Matrix bt2020c

statt

HDR format: Dolby Vision, Version 1.0, dvhe.08.06, BL+RPU, HDR10 compatible / SMPTE ST 2086, HDR10 compatible
mit Matrix bt2020nc

Leider habe ich jetzt keine Ahnung, ob ersteres von Nachteil ist. Mein TV switcht trotzdem dann auf DolbyVision.

FastFlix oder nvencc (ua. mit Option "--avhw --colormatrix auto") haben dieses Problem nicht.

Hoffe, Du kannst mit den Infos was anfangen...
Ohne DebugOutput hab ich auch keine Ahnung, warum die Verwechslung auftritt oder wie ich sie nachstellen kann.
Wenn ich hier eine HDR Quelle mit BT2020nc aufrufe wird diese richtig erkannt:
Code:
<Container info Warnings="" Typ="File" ID="G:\TestClips&amp;Co\files\HDR\HDR10\LG_Chess_HDR.mp4" Path="G:\TestClips&amp;Co\files\HDR\HDR10\LG_Chess_HDR.mp4" Name="">
    <Stream info Typ="Video" Stretching="" ID="mp4_b8f789f335c53c56ef26d821bcf042cb_853323747" Input="G:\TestClips&amp;Co\files\HDR\HDR10\LG_Chess_HDR.mp4">
      <input_data name="VideoID" value="257">
        <input_data name="Format" value="HEVC"/>
        <input_data name="Frame count" value="6772"/>
        <input_data name="Frame rate" value="59.940"/>
        <input_data name="Interlacing" value="progressive"/>
        <input_data name="Video Delay" value="Container"/>
        <input_data name="Bit depth" value="10"/>
        <input_data name="Profile" value="Main 10@L5.1@High"/>
        <input_data name="Frame rate mode" value="CFR"/>
        <input_data name="Original width" value="3840"/>
        <input_data name="Original height" value="2160"/>
        <input_data name="width" value="3840"/>
        <input_data name="height" value="2160"/>
        <input_data name="Color" value="4:2:0"/>
        <input_data name="Color Space" value="YUV"/>
        <input_data name="Color Matrix" value="BT.2020 non-constant"/>
        <input_data name="Color Transfer" value="smpte2084"/>
        <input_data name="Color Primes" value="BT.2020"/>
        <input_data name="Master Display" value="G(13250,34500)B(7500,3000)R(34000,16000)WP(15635,16450)L(10000000,500)"/>
        <input_data name="TimeCode" value="1066.722222"/>
        <input_data name="Luminance scale" value="tv"/>
        <input_data name="Aspect ratio" value="1"/>
        <input_data name="SampledResolution" value="true"/>
        <input_data name="mp4ID" value="257"/>
        <input_data name="Raw video" value="false"/>
        <input_data name="Length" value="112.980"/>
        <input_data name="Chapter count" value="0"/>
        <input_data name="Chapter selection" value="0-0"/>
        <input_data name="Needs YUY2" value="false"/>
        <input_data name="Angles" value="1"/>
        <input_data name="vmf" value="false"/>
        <input_data name="Title" value="0"/>
        <input_data name="Selection length" value="112.98"/>
        <input_data name="Frame rate" value="59.940"/>
        <input_data name="Video stream count" value="1"/>
        <input_data name="Start pos" value="0"/>
        <input_data name="DVDInput" value="false"/>
      </input_data>
    </Stream info>
  </Container info>
Ja, sehe ich im Debug auch (PN ging raus) aber irgendwie wählt Hybrid dann bt2020c aus...

Habe dein Testfile (LG Chess 4k Demo) auch mal runtergeladen und in Hybrid geworfen (v2022.11.26.1).
Da wählt Hybrid bei Color Matrix auch bt2020c statt bt2020nc aus.
Sehe im Log:
Code:
2022.12.03 - 18:47:27_Windows 10 Version 2009 (64bit)_2022.11.26.1 - level 9: (FilterInternalLogicService) Adjusting output color matrix,...
2022.12.03 - 18:47:27_Windows 10 Version 2009 (64bit)_2022.11.26.1 - level 9:  old outputColorMatrix value: bt2020nc
2022.12.03 - 18:47:27_Windows 10 Version 2009 (64bit)_2022.11.26.1 - level 9:  input color matrix: bt2020nc
2022.12.03 - 18:47:27_Windows 10 Version 2009 (64bit)_2022.11.26.1 - level 9:    adjusting by size (3840x2160),..
2022.12.03 - 18:47:27_Windows 10 Version 2009 (64bit)_2022.11.26.1 - level 9:  unsupported input color matrix -> using Rec.601: bt2020c
2022.12.03 - 18:47:27_Windows 10 Version 2009 (64bit)_2022.11.26.1 - level 9:  used input color matrix: bt2020c
2022.12.03 - 18:47:27_Windows 10 Version 2009 (64bit)_2022.11.26.1 - level 9:  output color matrix: bt2020c
2022.12.03 - 18:47:27_Windows 10 Version 2009 (64bit)_2022.11.26.1 - level 9:  converting color matrix: bt2020nc
2022.12.03 - 18:47:27_Windows 10 Version 2009 (64bit)_2022.11.26.1 - level 9: -> color matrix: Rec.2020
2022.12.03 - 18:47:27_Windows 10 Version 2009 (64bit)_2022.11.26.1 - level 9: NVEncModel, color matrix ADJUST for inputColorMatrix: bt2020c
2022.12.03 - 18:47:27_Windows 10 Version 2009 (64bit)_2022.11.26.1 - level 9:   (NVEncModel->VUIModelService) adjustVUIColorMatrixValue
2022.12.03 - 18:47:27_Windows 10 Version 2009 (64bit)_2022.11.26.1 - level 9:    adjustVUIColorMatrixToInput: true
2022.12.03 - 18:47:27_Windows 10 Version 2009 (64bit)_2022.11.26.1 - level 9:    vuiColorMatrix: true
2022.12.03 - 18:47:27_Windows 10 Version 2009 (64bit)_2022.11.26.1 - level 9:    vuiColorMatrixValue enabled: false
2022.12.03 - 18:47:27_Windows 10 Version 2009 (64bit)_2022.11.26.1 - level 9: inputColorMatrix: bt2020c
2022.12.03 - 18:47:27_Windows 10 Version 2009 (64bit)_2022.11.26.1 - level 9: resulting colorMatrix: bt2020c
2022.12.03 - 18:47:27_Windows 10 Version 2009 (64bit)_2022.11.26.1 - level 9:   adjustVUIColorMatrixValue->inputColorMatrix: bt2020c
2022.12.03 - 18:47:27_Windows 10 Version 2009 (64bit)_2022.11.26.1 - level 9:   adjusting VUI ColorMatrix to: bt2020c
2022.12.03 - 18:47:27_Windows 10 Version 2009 (64bit)_2022.11.26.1 - level 9:  -> VUI Color Matrix: bt2020c
2022.12.03 - 18:47:27_Windows 10 Version 2009 (64bit)_2022.11.26.1 - level 9: NVEncModel, color matrix ADJUST for source_inputColorMatrix: bt2020nc
2022.12.03 - 18:47:27_Windows 10 Version 2009 (64bit)_2022.11.26.1 - level 9:   (NVEncModel->VUIModelService) adjustVUIColorMatrixValue
2022.12.03 - 18:47:27_Windows 10 Version 2009 (64bit)_2022.11.26.1 - level 9:    adjustVUIColorMatrixToInput: true
2022.12.03 - 18:47:27_Windows 10 Version 2009 (64bit)_2022.11.26.1 - level 9:    vuiColorMatrix: true
2022.12.03 - 18:47:27_Windows 10 Version 2009 (64bit)_2022.11.26.1 - level 9:    vuiColorMatrixValue enabled: false
2022.12.03 - 18:47:27_Windows 10 Version 2009 (64bit)_2022.11.26.1 - level 9: inputColorMatrix: bt2020c
2022.12.03 - 18:47:27_Windows 10 Version 2009 (64bit)_2022.11.26.1 - level 9: resulting colorMatrix: bt2020c
2022.12.03 - 18:47:27_Windows 10 Version 2009 (64bit)_2022.11.26.1 - level 9:   adjustVUIColorMatrixValue->inputColorMatrix: bt2020c
2022.12.03 - 18:47:27_Windows 10 Version 2009 (64bit)_2022.11.26.1 - level 9:   adjusting VUI ColorMatrix to: bt2020c
2022.12.03 - 18:47:27_Windows 10 Version 2009 (64bit)_2022.11.26.1 - level 9:  -> VUI Color Matrix: bt2020c
Scheint, dass NVEncC sich an die Einstellungen im Filtering-Bereich anpasst.

Komisch, dass der Effekt hier nicht auftritt. Ich schau mal drauf, vermutlich kann ich nen Workaround schreiben.

Cu Selur
Wenn ich x265 als Encoder auswähle habe ich das aber auch....

OK, reset vom allen gemacht... Jetzt wird bt2020nc automatisch ausgwählt....
Ich schau mal, was ich bei den Settings geändert habe, woran es dann liegen könnte...

Hmm.. ich bekomms nicht mehr nachgestellt.... Huh Blush
Hmm,... für NVEncC hab ich nen Workaround.
Schick Dir gleich nen Link per PM.
Wenn Du genauer raus hast, woran es liegt, lass es mich wissen.

Cu Selur
Es liegt am Reiter Filtering. Wenn man NICHT "Vapoursynth" als Support auswählt, springt beim Encoder die Colormatrix nicht auf bt2020nc, sondern auf bt2020c um.

Aber auch nur beim einlesen der Quelle. Wechselt man nach dem einlesen der Quelle auf Avisynth oder no Xsynth bleibt Hybrid bei bt2020nc.
Auch bei der Version, die Du mir geschickt hast.
Hmm,...
Das Problem ist, dass das Verhalten an sich richtig ist. Smile
ColorMatrix bei FFmpeg und Vapoursynth kennen nur Rec.2020, sprich Rec.2020nc gibt es nicht.
-> no keine gute Idee wie ich das Handeln soll

Cu Selur
vaporsynth springt ja auf bt2020nc... ich denke mal, du meinste avisynth...  Big Grin

Hmm... ohne Filter und gedöns kann man eigentlich Nvencc direkt mit den Quellen füttern, ohne ffmpeg vorne weg. NVencc hat inzwischen auch cropping implementiert.

Quote:ColorMatrix bei FFmpeg und Vapoursynth kennen nur Rec.2020, sprich Rec.2020nc gibt es nicht.


dh. selbst wenn es bei nvencc oder x265 eingestellt wird, geht beim Pipen durch ffmpeg verloren?
Quote:ich denke mal, du meinste avisynth... 
Ja.

Quote:dh. selbst wenn es bei nvencc oder x265 eingestellt wird, geht beim Pipen durch ffmpeg verloren?
Nein, so lange keine RGB<>YUV Umwandlung stattfindet ist die ColorMatrix egal.
Außerdem, wenn bei NVEnc 'Encoder only' aktiviert ist, sollte die ColorMatrix direkt aus der Quelle genommen werden.

Cu Selur
Pages: 1 2