Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions Source/VideoProcessor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
18 changes: 18 additions & 0 deletions Source/VideoProcessor.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Loading