diff --git a/Source/VideoProcessor.cpp b/Source/VideoProcessor.cpp index fa139bac..73939470 100644 --- a/Source/VideoProcessor.cpp +++ b/Source/VideoProcessor.cpp @@ -278,6 +278,10 @@ bool CVideoProcessor::CheckDoviMetadata(const MediaSideDataDOVIMetadata* pDOVIMe return false; } + // Ignore Profile 7 Full Enhancement Layer as its currently not supported + if (SourceIsDoviFel(pDOVIMetadata)) + return false; + for (const auto& curve : pDOVIMetadata->Mapping.curves) { if (curve.num_pivots < 2 || curve.num_pivots > 9) { return false; diff --git a/Source/VideoProcessor.h b/Source/VideoProcessor.h index 7d8bbe6e..bda3ef5d 100644 --- a/Source/VideoProcessor.h +++ b/Source/VideoProcessor.h @@ -244,6 +244,24 @@ class CVideoProcessor return SourceIsPQorHLG() || m_Dovi.bValid; } + // Check if source is Dolby Vision Full Enhancement Layer + inline bool SourceIsDoviFel(const MediaSideDataDOVIMetadata* pDOVIMetadata) { + if (pDOVIMetadata->Header.disable_residual_flag) + return false; + + if (pDOVIMetadata->Mapping.nlq_method_idc == 0) { + for (uint8_t i = 0; i < 3; i++) { + if (pDOVIMetadata->Mapping.nlq[i].nlq_offset != 0 || + pDOVIMetadata->Mapping.nlq[i].vdr_in_max != (1ULL << pDOVIMetadata->Header.coef_log2_denom) || + pDOVIMetadata->Mapping.nlq[i].linear_deadzone_slope != 0 || + pDOVIMetadata->Mapping.nlq[i].linear_deadzone_threshold != 0) + return true; + } + } + + return false; + } + void UpdateStatsInputFmt(); CRefTime m_streamTime;