New: Support for DV HDR10Plus from media info
Co-authored-by: Chad A Simmons <chad.simmons@member.fsf.org>
This commit is contained in:
parent
96cb7c4d5f
commit
848c03f16a
|
@ -15,6 +15,7 @@ namespace NzbDrone.Core.Test.MediaFiles.MediaInfo.MediaInfoFormatterTests
|
|||
[TestCase(HdrFormat.Hdr10Plus, "HDR10Plus")]
|
||||
[TestCase(HdrFormat.DolbyVision, "DV")]
|
||||
[TestCase(HdrFormat.DolbyVisionHdr10, "DV HDR10")]
|
||||
[TestCase(HdrFormat.DolbyVisionHdr10Plus, "DV HDR10Plus")]
|
||||
[TestCase(HdrFormat.DolbyVisionHlg, "DV HLG")]
|
||||
[TestCase(HdrFormat.DolbyVisionSdr, "DV SDR")]
|
||||
public void should_format_video_dynamic_range_type(HdrFormat format, string expectedVideoDynamicRangeType)
|
||||
|
|
|
@ -116,6 +116,8 @@ namespace NzbDrone.Core.Test.MediaFiles.MediaInfo
|
|||
[TestCase(10, "bt2020", "smpte2084", "FFMpegCore.HdrDynamicMetadataSpmte2094", null, HdrFormat.Hdr10Plus)]
|
||||
[TestCase(10, "bt2020", "smpte2084", "FFMpegCore.DoviConfigurationRecordSideData", null, HdrFormat.DolbyVision)]
|
||||
[TestCase(10, "bt2020", "smpte2084", "FFMpegCore.DoviConfigurationRecordSideData", 1, HdrFormat.DolbyVisionHdr10)]
|
||||
[TestCase(10, "bt2020", "smpte2084", "FFMpegCore.DoviConfigurationRecordSideData,FFMpegCore.HdrDynamicMetadataSpmte2094", 1, HdrFormat.DolbyVisionHdr10Plus)]
|
||||
[TestCase(10, "bt2020", "smpte2084", "FFMpegCore.DoviConfigurationRecordSideData,FFMpegCore.HdrDynamicMetadataSpmte2094", 6, HdrFormat.DolbyVisionHdr10Plus)]
|
||||
[TestCase(10, "bt2020", "smpte2084", "FFMpegCore.DoviConfigurationRecordSideData", 2, HdrFormat.DolbyVisionSdr)]
|
||||
[TestCase(10, "bt2020", "smpte2084", "FFMpegCore.DoviConfigurationRecordSideData", 4, HdrFormat.DolbyVisionHlg)]
|
||||
public void should_detect_hdr_correctly(int bitDepth, string colourPrimaries, string transferFunction, string sideDataTypes, int? doviConfigId, HdrFormat expected)
|
||||
|
|
|
@ -11,6 +11,7 @@ namespace NzbDrone.Core.MediaFiles.MediaInfo
|
|||
DolbyVision,
|
||||
DolbyVisionHdr10,
|
||||
DolbyVisionSdr,
|
||||
DolbyVisionHlg
|
||||
DolbyVisionHlg,
|
||||
DolbyVisionHdr10Plus
|
||||
}
|
||||
}
|
||||
|
|
|
@ -321,6 +321,8 @@ namespace NzbDrone.Core.MediaFiles.MediaInfo
|
|||
return "DV";
|
||||
case HdrFormat.DolbyVisionHdr10:
|
||||
return "DV HDR10";
|
||||
case HdrFormat.DolbyVisionHdr10Plus:
|
||||
return "DV HDR10Plus";
|
||||
case HdrFormat.DolbyVisionHlg:
|
||||
return "DV HLG";
|
||||
case HdrFormat.DolbyVisionSdr:
|
||||
|
|
|
@ -188,12 +188,14 @@ namespace NzbDrone.Core.MediaFiles.MediaInfo
|
|||
|
||||
if (TryGetSideData<DoviConfigurationRecordSideData>(sideData, out var dovi))
|
||||
{
|
||||
var hasHdr10Plus = TryGetSideData<HdrDynamicMetadataSpmte2094>(sideData, out _);
|
||||
|
||||
return dovi.DvBlSignalCompatibilityId switch
|
||||
{
|
||||
1 => HdrFormat.DolbyVisionHdr10,
|
||||
1 => hasHdr10Plus ? HdrFormat.DolbyVisionHdr10Plus : HdrFormat.DolbyVisionHdr10,
|
||||
2 => HdrFormat.DolbyVisionSdr,
|
||||
4 => HdrFormat.DolbyVisionHlg,
|
||||
6 => HdrFormat.DolbyVisionHdr10,
|
||||
6 => hasHdr10Plus ? HdrFormat.DolbyVisionHdr10Plus : HdrFormat.DolbyVisionHdr10,
|
||||
_ => HdrFormat.DolbyVision
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue