diff --git a/source/Lib/Utilities/VideoIOYuv.cpp b/source/Lib/Utilities/VideoIOYuv.cpp index 9eec0c1b39ea83ca7b85e41c03e7d0f744633dab..8a30ccc5ddcf43123914dd55415a2b741294c890 100644 --- a/source/Lib/Utilities/VideoIOYuv.cpp +++ b/source/Lib/Utilities/VideoIOYuv.cpp @@ -952,6 +952,12 @@ bool VideoIOYuv::read ( PelUnitBuf& pic, PelUnitBuf& picOrg, const InputColourSp { EXIT("Source image contains values outside the specified bit range!"); } +#if !JVET_R0351_HIGH_BIT_DEPTH_ENABLED + if (m_fileBitdepth[chType] > 14 && m_bitdepthShift[chType] < 0) + { + EXIT("JVET_R0351_HIGH_BIT_DEPTH_ENABLED must be enabled for bit depths above 14 if INTERNALBITDEPTH < INPUTBITDEPTH"); + } +#endif scalePlane( picOrg.get(compID), m_bitdepthShift[chType], minval, maxval); } }