diff --git a/source/Lib/DecoderLib/SEIread.cpp b/source/Lib/DecoderLib/SEIread.cpp index c24f0e2a30349ee17a86a42e430e0325550f749e..d7930cda8ee66822ed399da8a11f4115b3060278 100644 --- a/source/Lib/DecoderLib/SEIread.cpp +++ b/source/Lib/DecoderLib/SEIread.cpp @@ -819,7 +819,7 @@ void SEIReader::xParseSEIPictureTiming(SEIPictureTiming& sei, uint32_t payloadSi sei_read_flag( pDecodedMessageOutputStream, symbol, "cpb_removal_delay_delta_enabled_flag[i]" ); sei.m_cpbRemovalDelayDeltaEnabledFlag[i] = (symbol == 1); if( sei.m_cpbRemovalDelayDeltaEnabledFlag[ i ] ) { - sei_read_code( pDecodedMessageOutputStream, ceil(log2(bp.m_numCpbRemovalDelayDeltas)), symbol, "cpb_removal_delay_delta_idx[i]" ); + sei_read_code( pDecodedMessageOutputStream, ceilLog2(bp.m_numCpbRemovalDelayDeltas), symbol, "cpb_removal_delay_delta_idx[i]" ); sei.m_cpbRemovalDelayDeltaIdx[ i ] = symbol; } else diff --git a/source/Lib/EncoderLib/EncGOP.cpp b/source/Lib/EncoderLib/EncGOP.cpp index 6091c8f5489b71dda2e1fce569dd3d61677113e2..0b764fc2169e6c0c180a862e5e990aadf8cf0ce6 100644 --- a/source/Lib/EncoderLib/EncGOP.cpp +++ b/source/Lib/EncoderLib/EncGOP.cpp @@ -1069,7 +1069,7 @@ void EncGOP::xCreatePictureTimingSEI (int IRAPGOPid, SEIMessages& seiMessages, } else { - int scaledDistToBuffPeriod = (m_totalCoded[i] - m_lastBPSEI[i]) * pow(2, static_cast<double>(maxNumSubLayers - 1 - i)); + int scaledDistToBuffPeriod = (m_totalCoded[i] - m_lastBPSEI[i]) * static_cast<int>(pow(2, static_cast<double>(maxNumSubLayers - 1 - i))); pictureTimingSEI->m_auCpbRemovalDelay[i] = std::min<int>(std::max<int>(1, scaledDistToBuffPeriod), static_cast<int>(pow(2, static_cast<double>(cpbRemovalDelayLegth)))); // Syntax element signalled as minus, hence the . CHECK( (scaledDistToBuffPeriod) > pow(2, static_cast<double>(cpbRemovalDelayLegth)), " cpbRemovalDelayLegth too small for m_auCpbRemovalDelay[i] at picture timing SEI " ); } diff --git a/source/Lib/EncoderLib/SEIwrite.cpp b/source/Lib/EncoderLib/SEIwrite.cpp index aab6ade35ee8a40aa220f4665e4f388ccdbe5f96..1a704a4b0daf26aa877f8676f06f695c46e1ffa0 100644 --- a/source/Lib/EncoderLib/SEIwrite.cpp +++ b/source/Lib/EncoderLib/SEIwrite.cpp @@ -544,7 +544,7 @@ void SEIWriter::xWriteSEIPictureTiming(const SEIPictureTiming& sei, const SEIBuf WRITE_FLAG( sei.m_cpbRemovalDelayDeltaEnabledFlag[i], "cpb_removal_delay_delta_enabled_flag[i]" ); if( sei.m_cpbRemovalDelayDeltaEnabledFlag[i] ) { - WRITE_CODE( sei.m_cpbRemovalDelayDeltaIdx[i], ceil(log2(bp.m_numCpbRemovalDelayDeltas)), "cpb_removal_delay_delta_idx[i]" ); + WRITE_CODE( sei.m_cpbRemovalDelayDeltaIdx[i], ceilLog2(bp.m_numCpbRemovalDelayDeltas), "cpb_removal_delay_delta_idx[i]" ); } else {