Skip to content

Commit

Permalink
[UNTESTED] DirectVobSubFilter: stop overriding known BT.601 matrices
Browse files Browse the repository at this point in the history
Commit e928f83 allowed colorimetry
information to be received from the DirectShow filter chain, so we don’t
need to rely on resolution-based guesses as much.
However the way the yuv_matrix assignment ended up a known-to-be BT.601
matrix ended up being always overriden to BT.709.
  • Loading branch information
TheOneric committed Jan 5, 2023
1 parent a7f11ed commit 93e5bad
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions src/filters/transform/vsfilter/DirectVobSubFilter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2280,10 +2280,19 @@ void CDirectVobSubFilter::SetYuvMatrix()
}
else
{
yuv_matrix = (extformat.VideoTransferMatrix == DXVA2_VideoTransferMatrix_BT709 ||
extformat.VideoTransferMatrix == DXVA2_VideoTransferMatrix_SMPTE240M ||
m_xy_size_opt[SIZE_ORIGINAL_VIDEO].cx > m_bt601Width ||
m_xy_size_opt[SIZE_ORIGINAL_VIDEO].cy > m_bt601Height) ? ColorConvTable::BT709 : ColorConvTable::BT601;
switch (extformat.VideoTransferMatrix)
{
case DXVA2_VideoTransferMatrix_BT709:
yuv_matrix = ColorConvTable::BT709;
break;
case DXVA2_VideoTransferMatrix_SMPTE240M:
yuv_matrix = ColorConvTable::BT601;
break;
default:
yuv_matrix = (m_xy_size_opt[SIZE_ORIGINAL_VIDEO].cx > m_bt601Width ||
m_xy_size_opt[SIZE_ORIGINAL_VIDEO].cy > m_bt601Height) ?
ColorConvTable::BT709 : ColorConvTable::BT601;
}
}
}
else
Expand Down

0 comments on commit 93e5bad

Please sign in to comment.