Commit 9429d13d authored by Frank Bossen's avatar Frank Bossen
Browse files

Merge branch 'clean_whitespace' into 'master'

Remove extra white space at end of code lines

See merge request jvet/VVCSoftware_VTM!1527
parents c61c073d e0dd4306
......@@ -113,7 +113,7 @@ bool BitstreamExtractorApp::xCheckSliceSubpicture(InputNALUnit &nalu, int target
slice.setTLayer(nalu.m_temporalId);
m_hlSynaxReader.parseSliceHeader(&slice, &m_picHeader, &m_parameterSetManager, m_prevTid0Poc);
PPS *pps = m_parameterSetManager.getPPS(m_picHeader.getPPSId());
CHECK (nullptr==pps, "referenced PPS not found");
SPS *sps = m_parameterSetManager.getSPS(pps->getSPSId());
......@@ -129,7 +129,7 @@ bool BitstreamExtractorApp::xCheckSliceSubpicture(InputNALUnit &nalu, int target
{
THROW ("Subpicture signalling disbled, cannot extract.");
}
return true;
}
......@@ -497,7 +497,7 @@ uint32_t BitstreamExtractorApp::decode()
{
SubPic subPic;
bool found = false;
for (int i=0; i< pps->getNumSubPics() && !found; i++)
{
subPic = pps->getSubPic(i);
......
......@@ -59,7 +59,7 @@ public:
virtual ~BitstreamExtractorApp () {}
uint32_t decode (); ///< main decoding function
protected:
void xPrintVPSInfo (VPS *vps);
void xPrintSubPicInfo (PPS *pps);
......@@ -72,7 +72,7 @@ protected:
void xSetSPSUpdated(int spsId) { return m_updatedSPSList.push_back(spsId); }
bool xIsSPSUpdate(int spsId) { return (std::find(m_updatedSPSList.begin(),m_updatedSPSList.end(), spsId) != m_updatedSPSList.end()); }
void xClearSPSUpdated(int spsId) { m_updatedSPSList.erase(std::remove(m_updatedSPSList.begin(), m_updatedSPSList.end(), spsId)); };
void xWriteVPS(VPS *vps, std::ostream& out, int layerId, int temporalId);
void xWriteSPS(SPS *sps, std::ostream& out, int layerId, int temporalId);
void xWritePPS(PPS *pps, std::ostream& out, int layerId, int temporalId);
......
......@@ -109,7 +109,7 @@ namespace po = df::program_options_lite;
}
DTRACE_UPDATE( g_trace_ctx, std::make_pair( "final", 1 ) );
#endif
g_verbosity = MsgLevel( verbosity );
if (err.is_errored)
......
......@@ -132,8 +132,8 @@ uint32_t DecApp::decode()
// determine if next NAL unit will be the first one from a new picture
bool bNewPicture = isNewPicture(&bitstreamFile, &bytestream);
bool bNewAccessUnit = bNewPicture && isNewAccessUnit( bNewPicture, &bitstreamFile, &bytestream );
if(!bNewPicture)
{
if(!bNewPicture)
{
AnnexBStats stats = AnnexBStats();
// find next NAL unit in stream
......@@ -270,7 +270,7 @@ uint32_t DecApp::decode()
xWriteOutput( pcListPic, nalu.m_temporalId );
}
}
if(bNewAccessUnit)
if(bNewAccessUnit)
{
m_cDecLib.checkTidLayerIdInAccessUnit();
m_cDecLib.resetAccessUnitSeiTids();
......@@ -378,7 +378,7 @@ bool DecApp::isNewPicture(ifstream *bitstreamFile, class InputByteStream *bytest
ret = false;
finished = true;
break;
// NUT that might indicate the start of a new picture - keep looking
case NAL_UNIT_PREFIX_APS:
case NAL_UNIT_PREFIX_SEI:
......@@ -393,7 +393,7 @@ bool DecApp::isNewPicture(ifstream *bitstreamFile, class InputByteStream *bytest
}
}
}
// restore previous stream location - minus 3 due to the need for the annexB parser to read three extra bytes
#if RExt__DECODER_DEBUG_BIT_STATISTICS
bitstreamFile->clear();
......@@ -418,7 +418,7 @@ bool DecApp::isNewAccessUnit( bool newPicture, ifstream *bitstreamFile, class In
{
bool ret = false;
bool finished = false;
// can only be the start of an AU if this is the start of a new picture
if( newPicture == false )
{
......@@ -448,7 +448,7 @@ bool DecApp::isNewAccessUnit( bool newPicture, ifstream *bitstreamFile, class In
// get next NAL unit type
read(nalu);
switch( nalu.m_nalUnitType ) {
// AUD always indicates the start of a new access unit
case NAL_UNIT_ACCESS_UNIT_DELIMITER:
ret = true;
......@@ -464,10 +464,10 @@ bool DecApp::isNewAccessUnit( bool newPicture, ifstream *bitstreamFile, class In
case NAL_UNIT_CODED_SLICE_IDR_N_LP:
case NAL_UNIT_CODED_SLICE_CRA:
case NAL_UNIT_CODED_SLICE_GDR:
ret = m_cDecLib.isSliceNaluFirstInAU( newPicture, nalu );
ret = m_cDecLib.isSliceNaluFirstInAU( newPicture, nalu );
finished = true;
break;
// NUT that are not the start of a new access unit
case NAL_UNIT_EOS:
case NAL_UNIT_EOB:
......@@ -477,14 +477,14 @@ bool DecApp::isNewAccessUnit( bool newPicture, ifstream *bitstreamFile, class In
ret = false;
finished = true;
break;
// all other NUT - keep looking to find first VCL
default:
break;
}
}
}
// restore previous stream location
#if RExt__DECODER_DEBUG_BIT_STATISTICS
bitstreamFile->clear();
......
......@@ -65,7 +65,7 @@ protected:
int m_outputBitDepth[MAX_NUM_CHANNEL_TYPE]; ///< bit depth used for writing output
InputColourSpaceConversion m_outputColourSpaceConvert;
int m_targetOlsIdx; ///< target output layer set
std::vector<int> m_targetOutputLayerIdSet; ///< set of LayerIds to be outputted
std::vector<int> m_targetOutputLayerIdSet; ///< set of LayerIds to be outputted
int m_iMaxTemporalLayer; ///< maximum temporal layer to be decoded
int m_decodedPictureHashSEIEnabled; ///< Checksum(3)/CRC(2)/MD5(1)/disable(0) acting on decoded picture hash SEI message
bool m_decodedNoDisplaySEIEnabled; ///< Enable(true)/disable(false) writing only pictures that get displayed based on the no display SEI message
......@@ -73,7 +73,7 @@ protected:
std::vector<int> m_targetDecLayerIdSet; ///< set of LayerIds to be included in the sub-bitstream extraction process.
std::string m_outputDecodedSEIMessagesFilename; ///< filename to output decoded SEI messages to. If '-', then use stdout. If empty, do not output details.
bool m_bClipOutputVideoToRec709Range; ///< If true, clip the output video to the Rec 709 range on saving.
bool m_packedYUVMode; ///< If true, output 10-bit and 12-bit YUV data as 5-byte and 3-byte (respectively) packed YUV data
std::string m_cacheCfgFile; ///< Config file of cache model
......
......@@ -178,7 +178,7 @@ void EncApp::xInitLibCfg()
{
if( i > 0 )
vps.setPtPresentFlag (i, 0);
vps.setPtlMaxTemporalId (i, vps.getMaxSubLayers() - 1);
vps.setPtlMaxTemporalId (i, vps.getMaxSubLayers() - 1);
}
for (int i = 0; i < vps.getNumOutputLayerSets(); i++)
{
......@@ -607,11 +607,11 @@ void EncApp::xInitLibCfg()
m_cEncLib.setFramePackingArrangementSEIId ( m_framePackingSEIId );
m_cEncLib.setFramePackingArrangementSEIQuincunx ( m_framePackingSEIQuincunx );
m_cEncLib.setFramePackingArrangementSEIInterpretation ( m_framePackingSEIInterpretation );
m_cEncLib.setErpSEIEnabled ( m_erpSEIEnabled );
m_cEncLib.setErpSEICancelFlag ( m_erpSEICancelFlag );
m_cEncLib.setErpSEIPersistenceFlag ( m_erpSEIPersistenceFlag );
m_cEncLib.setErpSEIGuardBandFlag ( m_erpSEIGuardBandFlag );
m_cEncLib.setErpSEIGuardBandType ( m_erpSEIGuardBandType );
m_cEncLib.setErpSEIEnabled ( m_erpSEIEnabled );
m_cEncLib.setErpSEICancelFlag ( m_erpSEICancelFlag );
m_cEncLib.setErpSEIPersistenceFlag ( m_erpSEIPersistenceFlag );
m_cEncLib.setErpSEIGuardBandFlag ( m_erpSEIGuardBandFlag );
m_cEncLib.setErpSEIGuardBandType ( m_erpSEIGuardBandType );
m_cEncLib.setErpSEILeftGuardBandWidth ( m_erpSEILeftGuardBandWidth );
m_cEncLib.setErpSEIRightGuardBandWidth ( m_erpSEIRightGuardBandWidth );
m_cEncLib.setSphereRotationSEIEnabled ( m_sphereRotationSEIEnabled );
......@@ -620,16 +620,16 @@ void EncApp::xInitLibCfg()
m_cEncLib.setSphereRotationSEIYaw ( m_sphereRotationSEIYaw );
m_cEncLib.setSphereRotationSEIPitch ( m_sphereRotationSEIPitch );
m_cEncLib.setSphereRotationSEIRoll ( m_sphereRotationSEIRoll );
m_cEncLib.setOmniViewportSEIEnabled ( m_omniViewportSEIEnabled );
m_cEncLib.setOmniViewportSEIId ( m_omniViewportSEIId );
m_cEncLib.setOmniViewportSEICancelFlag ( m_omniViewportSEICancelFlag );
m_cEncLib.setOmniViewportSEIPersistenceFlag ( m_omniViewportSEIPersistenceFlag );
m_cEncLib.setOmniViewportSEICntMinus1 ( m_omniViewportSEICntMinus1 );
m_cEncLib.setOmniViewportSEIAzimuthCentre ( m_omniViewportSEIAzimuthCentre );
m_cEncLib.setOmniViewportSEIElevationCentre ( m_omniViewportSEIElevationCentre );
m_cEncLib.setOmniViewportSEITiltCentre ( m_omniViewportSEITiltCentre );
m_cEncLib.setOmniViewportSEIHorRange ( m_omniViewportSEIHorRange );
m_cEncLib.setOmniViewportSEIVerRange ( m_omniViewportSEIVerRange );
m_cEncLib.setOmniViewportSEIEnabled ( m_omniViewportSEIEnabled );
m_cEncLib.setOmniViewportSEIId ( m_omniViewportSEIId );
m_cEncLib.setOmniViewportSEICancelFlag ( m_omniViewportSEICancelFlag );
m_cEncLib.setOmniViewportSEIPersistenceFlag ( m_omniViewportSEIPersistenceFlag );
m_cEncLib.setOmniViewportSEICntMinus1 ( m_omniViewportSEICntMinus1 );
m_cEncLib.setOmniViewportSEIAzimuthCentre ( m_omniViewportSEIAzimuthCentre );
m_cEncLib.setOmniViewportSEIElevationCentre ( m_omniViewportSEIElevationCentre );
m_cEncLib.setOmniViewportSEITiltCentre ( m_omniViewportSEITiltCentre );
m_cEncLib.setOmniViewportSEIHorRange ( m_omniViewportSEIHorRange );
m_cEncLib.setOmniViewportSEIVerRange ( m_omniViewportSEIVerRange );
m_cEncLib.setRwpSEIEnabled (m_rwpSEIEnabled);
m_cEncLib.setRwpSEIRwpCancelFlag (m_rwpSEIRwpCancelFlag);
m_cEncLib.setRwpSEIRwpPersistenceFlag (m_rwpSEIRwpPersistenceFlag);
......@@ -657,15 +657,15 @@ void EncApp::xInitLibCfg()
m_cEncLib.setRwpSEIRwpGuardBandType (m_rwpSEIRwpGuardBandType);
m_cEncLib.setGcmpSEIEnabled ( m_gcmpSEIEnabled );
m_cEncLib.setGcmpSEICancelFlag ( m_gcmpSEICancelFlag );
m_cEncLib.setGcmpSEIPersistenceFlag ( m_gcmpSEIPersistenceFlag );
m_cEncLib.setGcmpSEIPersistenceFlag ( m_gcmpSEIPersistenceFlag );
m_cEncLib.setGcmpSEIPackingType ( (uint8_t)m_gcmpSEIPackingType );
m_cEncLib.setGcmpSEIMappingFunctionType ( (uint8_t)m_gcmpSEIMappingFunctionType );
m_cEncLib.setGcmpSEIMappingFunctionType ( (uint8_t)m_gcmpSEIMappingFunctionType );
m_cEncLib.setGcmpSEIFaceIndex ( m_gcmpSEIFaceIndex );
m_cEncLib.setGcmpSEIFaceRotation ( m_gcmpSEIFaceRotation );
m_cEncLib.setGcmpSEIFunctionCoeffU ( m_gcmpSEIFunctionCoeffU );
m_cEncLib.setGcmpSEIFunctionUAffectedByVFlag ( m_gcmpSEIFunctionUAffectedByVFlag );
m_cEncLib.setGcmpSEIFunctionCoeffV ( m_gcmpSEIFunctionCoeffV );
m_cEncLib.setGcmpSEIFunctionVAffectedByUFlag ( m_gcmpSEIFunctionVAffectedByUFlag );
m_cEncLib.setGcmpSEIFunctionVAffectedByUFlag ( m_gcmpSEIFunctionVAffectedByUFlag );
m_cEncLib.setGcmpSEIGuardBandFlag ( m_gcmpSEIGuardBandFlag );
m_cEncLib.setGcmpSEIGuardBandType ( m_gcmpSEIGuardBandType );
m_cEncLib.setGcmpSEIGuardBandBoundaryExteriorFlag ( m_gcmpSEIGuardBandBoundaryExteriorFlag );
......
......@@ -492,7 +492,7 @@ static inline istream& operator >> (std::istream& in, std::map<T1, T2>& map)
static uint32_t getMaxTileColsByLevel( Level::Name level )
{
switch( level )
switch( level )
{
case Level::LEVEL1:
case Level::LEVEL2:
......@@ -519,7 +519,7 @@ static uint32_t getMaxTileColsByLevel( Level::Name level )
static uint32_t getMaxTileRowsByLevel( Level::Name level )
{
switch( level )
switch( level )
{
case Level::LEVEL1:
case Level::LEVEL2:
......@@ -546,7 +546,7 @@ static uint32_t getMaxTileRowsByLevel( Level::Name level )
static uint32_t getMaxSlicesByLevel( Level::Name level )
{
switch( level )
switch( level )
{
case Level::LEVEL1:
case Level::LEVEL2:
......@@ -653,7 +653,7 @@ bool EncAppCfg::parseCfg( int argc, char* argv[] )
SMultiValueInput<uint32_t> cfg_omniViewportSEIHorRange ( 1, 23592960, 0, 15);
SMultiValueInput<uint32_t> cfg_omniViewportSEIVerRange ( 1, 11796480, 0, 15);
SMultiValueInput<uint32_t> cfg_rwpSEIRwpTransformType (0, 7, 0, std::numeric_limits<uint8_t>::max());
SMultiValueInput<bool> cfg_rwpSEIRwpGuardBandFlag (0, 1, 0, std::numeric_limits<uint8_t>::max());
SMultiValueInput<bool> cfg_rwpSEIRwpGuardBandFlag (0, 1, 0, std::numeric_limits<uint8_t>::max());
SMultiValueInput<uint32_t> cfg_rwpSEIProjRegionWidth (0, std::numeric_limits<uint32_t>::max(), 0, std::numeric_limits<uint8_t>::max());
SMultiValueInput<uint32_t> cfg_rwpSEIProjRegionHeight (0, std::numeric_limits<uint32_t>::max(), 0, std::numeric_limits<uint8_t>::max());
SMultiValueInput<uint32_t> cfg_rwpSEIRwpSEIProjRegionTop (0, std::numeric_limits<uint32_t>::max(), 0, std::numeric_limits<uint8_t>::max());
......@@ -1597,7 +1597,7 @@ bool EncAppCfg::parseCfg( int argc, char* argv[] )
}
}
if( m_picPartitionFlag )
if( m_picPartitionFlag )
{
// store tile column widths
m_tileColumnWidth.resize(cfgTileColumnWidth.values.size());
......@@ -1614,7 +1614,7 @@ bool EncAppCfg::parseCfg( int argc, char* argv[] )
}
// store rectangular slice positions
if( !m_rasterSliceFlag )
if( !m_rasterSliceFlag )
{
m_rectSlicePos.resize(cfgRectSlicePos.values.size());
for(uint32_t i=0; i<cfgRectSlicePos.values.size(); i++)
......@@ -1624,7 +1624,7 @@ bool EncAppCfg::parseCfg( int argc, char* argv[] )
}
// store raster-scan slice sizes
else
else
{
m_rasterSliceSize.resize(cfgRasterSliceSize.values.size());
for(uint32_t i=0; i<cfgRasterSliceSize.values.size(); i++)
......@@ -1633,7 +1633,7 @@ bool EncAppCfg::parseCfg( int argc, char* argv[] )
}
}
}
else
else
{
m_tileColumnWidth.clear();
m_tileRowHeight.clear();
......@@ -1676,7 +1676,7 @@ bool EncAppCfg::parseCfg( int argc, char* argv[] )
m_outputBitDepth [CHANNEL_TYPE_CHROMA] = m_outputBitDepth [CHANNEL_TYPE_LUMA ];
}
if( !m_entropyCodingSyncEnabledFlag )
if( !m_entropyCodingSyncEnabledFlag )
{
m_entropyCodingSyncEntryPointPresentFlag = false;
}
......@@ -2101,7 +2101,7 @@ bool EncAppCfg::parseCfg( int argc, char* argv[] )
m_rwpSEIPackedRegionWidth[i] = cfg_rwpSEIPackedRegionWidth.values[i];
m_rwpSEIPackedRegionHeight[i] = cfg_rwpSEIPackedRegionHeight.values[i];
m_rwpSEIPackedRegionTop[i] = cfg_rwpSEIPackedRegionTop.values[i];
m_rwpSEIPackedRegionLeft[i] = cfg_rwpSEIPackedRegionLeft.values[i];
m_rwpSEIPackedRegionLeft[i] = cfg_rwpSEIPackedRegionLeft.values[i];
if( m_rwpSEIRwpGuardBandFlag[i] )
{
m_rwpSEIRwpLeftGuardBandWidth[i] = cfg_rwpSEIRwpLeftGuardBandWidth.values[i];
......@@ -2544,14 +2544,14 @@ bool EncAppCfg::xCheckParameter()
xConfirmPara( m_uiMaxBT[0] > m_uiCTUSize, "Maximum BT size for luma block in I slice should be smaller than or equal to CTUSize");
xConfirmPara( m_uiMaxBT[1] < m_uiMinQT[1], "Maximum BT size for luma block in non I slice should be larger than minimum QT size");
xConfirmPara( m_uiMaxBT[1] > m_uiCTUSize, "Maximum BT size for luma block in non I slice should be smaller than or equal to CTUSize");
xConfirmPara( m_uiMaxBT[2] < (m_uiMinQT[2] << (int)getChannelTypeScaleX(CHANNEL_TYPE_CHROMA, m_chromaFormatIDC)),
xConfirmPara( m_uiMaxBT[2] < (m_uiMinQT[2] << (int)getChannelTypeScaleX(CHANNEL_TYPE_CHROMA, m_chromaFormatIDC)),
"Maximum BT size for chroma block in I slice should be larger than minimum QT size");
xConfirmPara( m_uiMaxBT[2] > m_uiCTUSize, "Maximum BT size for chroma block in I slice should be smaller than or equal to CTUSize");
xConfirmPara( m_uiMaxTT[0] < m_uiMinQT[0], "Maximum TT size for luma block in I slice should be larger than minimum QT size");
xConfirmPara( m_uiMaxTT[0] > m_uiCTUSize, "Maximum TT size for luma block in I slice should be smaller than or equal to CTUSize");
xConfirmPara( m_uiMaxTT[1] < m_uiMinQT[1], "Maximum TT size for luma block in non I slice should be larger than minimum QT size");
xConfirmPara( m_uiMaxTT[1] > m_uiCTUSize, "Maximum TT size for luma block in non I slice should be smaller than or equal to CTUSize");
xConfirmPara( m_uiMaxTT[2] < (m_uiMinQT[2] << (int)getChannelTypeScaleX(CHANNEL_TYPE_CHROMA, m_chromaFormatIDC)),
xConfirmPara( m_uiMaxTT[2] < (m_uiMinQT[2] << (int)getChannelTypeScaleX(CHANNEL_TYPE_CHROMA, m_chromaFormatIDC)),
"Maximum TT size for chroma block in I slice should be larger than minimum QT size");
xConfirmPara( m_uiMaxTT[2] > m_uiCTUSize, "Maximum TT size for chroma block in I slice should be smaller than or equal to CTUSize");
xConfirmPara( (m_iSourceWidth % (std::max(8u, m_log2MinCuSize))) != 0, "Resulting coded frame width must be a multiple of Max(8, the minimum CU size)");
......@@ -3039,23 +3039,23 @@ bool EncAppCfg::xCheckParameter()
m_maxDecPicBuffering[MAX_TLAYER-1] = m_numReorderPics[MAX_TLAYER-1] + 1;
}
if( m_picPartitionFlag )
if( m_picPartitionFlag )
{
PPS pps;
uint32_t colIdx, rowIdx;
uint32_t remSize;
pps.setPicWidthInLumaSamples( m_iSourceWidth );
pps.setPicHeightInLumaSamples( m_iSourceHeight );
pps.setLog2CtuSize( floorLog2(m_uiCTUSize) );
// set default tile column if not provided
if( m_tileColumnWidth.size() == 0 )
if( m_tileColumnWidth.size() == 0 )
{
m_tileColumnWidth.push_back( pps.getPicWidthInCtu() );
}
// set default tile row if not provided
if( m_tileRowHeight.size() == 0 )
if( m_tileRowHeight.size() == 0 )
{
m_tileRowHeight.push_back( pps.getPicHeightInCtu() );
}
......@@ -3082,7 +3082,7 @@ bool EncAppCfg::xCheckParameter()
remSize -= m_tileColumnWidth[ colIdx ];
}
m_tileColumnWidth.resize( colIdx );
pps.setNumExpTileColumns( (uint32_t)m_tileColumnWidth.size() );
pps.setNumExpTileColumns( (uint32_t)m_tileColumnWidth.size() );
remSize = pps.getPicHeightInCtu();
for( rowIdx=0; remSize > 0 && rowIdx<m_tileRowHeight.size(); rowIdx++ )
{
......@@ -3267,7 +3267,7 @@ bool EncAppCfg::xCheckParameter()
uint32_t remTiles = pps.getNumTiles();
// set default slice size if not provided
if( m_rasterSliceSize.size() == 0 )
if( m_rasterSliceSize.size() == 0 )
{
m_rasterSliceSize.push_back( remTiles );
}
......@@ -3291,12 +3291,12 @@ bool EncAppCfg::xCheckParameter()
}
// shrink list if too many sizes were provided
m_rasterSliceSize.resize( listIdx );
m_numSlicesInPic = (uint32_t)m_rasterSliceSize.size();
xConfirmPara(m_rasterSliceSize.size() > getMaxSlicesByLevel( m_level ), "Number of raster-scan slices exceeds maximum number allowed according to specified level");
}
}
else
else
{
m_numTileCols = 1;
m_numTileRows = 1;
......@@ -3484,7 +3484,7 @@ void EncAppCfg::xPrintParameter()
if (m_subPicInfoPresentFlag)
{
msg(DETAILS, "number of subpictures : %d\n", m_numSubPics);
for (int i = 0; i < m_numSubPics; i++)
for (int i = 0; i < m_numSubPics; i++)
{
msg(DETAILS, "[%d]th subpictures location :[%d %d]\n", i, m_subPicCtuTopLeftX[i], m_subPicCtuTopLeftY[i]);
msg(DETAILS, "[%d]th subpictures size :[%d %d]\n", i, m_subPicWidth[i], m_subPicHeight[i]);
......@@ -3498,7 +3498,7 @@ void EncAppCfg::xPrintParameter()
if (m_subPicIdMappingExplicitlySignalledFlag)
{
msg(DETAILS, "subpicture ID signalling present flag : %d\n", m_subPicIdMappingInSpsFlag);
for (int i = 0; i < m_numSubPics; i++)
for (int i = 0; i < m_numSubPics; i++)
{
msg(DETAILS, "[%d]th subpictures ID length :%d\n", i, m_subPicIdLen);
msg(DETAILS, "[%d]th subpictures ID :%d\n", i, m_subPicId[i]);
......
......@@ -693,7 +693,7 @@ protected:
int m_numPtlsInVps;
Level::Name m_levelPtl[MAX_NUM_OLSS];
int m_olsPtlIdx[MAX_NUM_OLSS];
int m_olsPtlIdx[MAX_NUM_OLSS];
#if EXTENSION_360_VIDEO
TExt360AppEncCfg m_ext360;
......
......@@ -126,7 +126,7 @@ bool AdaptiveLoopFilter::isCrossedByVirtualBoundaries( const CodingStructure& cs
{
const Position prevCtuPos(xPos, yPos - ctuSize);
const CodingUnit *prevCtu = cs.getCU(prevCtuPos, CHANNEL_TYPE_LUMA);
if ((!pps->getLoopFilterAcrossSlicesEnabledFlag() && !CU::isSameSlice(*currCtu, *prevCtu)) ||
if ((!pps->getLoopFilterAcrossSlicesEnabledFlag() && !CU::isSameSlice(*currCtu, *prevCtu)) ||
(!pps->getLoopFilterAcrossTilesEnabledFlag() && !CU::isSameTile(*currCtu, *prevCtu))
|| (!loopFilterAcrossSubPicEnabledFlag && !CU::isSameSubPic(*currCtu, *prevCtu))
)
......@@ -140,7 +140,7 @@ bool AdaptiveLoopFilter::isCrossedByVirtualBoundaries( const CodingStructure& cs
{
const Position nextCtuPos(xPos, yPos + ctuSize);
const CodingUnit *nextCtu = cs.getCU(nextCtuPos, CHANNEL_TYPE_LUMA);
if ((!pps->getLoopFilterAcrossSlicesEnabledFlag() && !CU::isSameSlice(*currCtu, *nextCtu)) ||
if ((!pps->getLoopFilterAcrossSlicesEnabledFlag() && !CU::isSameSlice(*currCtu, *nextCtu)) ||
(!pps->getLoopFilterAcrossTilesEnabledFlag() && !CU::isSameTile(*currCtu, *nextCtu))
|| (!loopFilterAcrossSubPicEnabledFlag && !CU::isSameSubPic(*currCtu, *nextCtu))
)
......@@ -154,7 +154,7 @@ bool AdaptiveLoopFilter::isCrossedByVirtualBoundaries( const CodingStructure& cs
{
const Position prevCtuPos(xPos - ctuSize, yPos);
const CodingUnit *prevCtu = cs.getCU(prevCtuPos, CHANNEL_TYPE_LUMA);
if ((!pps->getLoopFilterAcrossSlicesEnabledFlag() && !CU::isSameSlice(*currCtu, *prevCtu)) ||
if ((!pps->getLoopFilterAcrossSlicesEnabledFlag() && !CU::isSameSlice(*currCtu, *prevCtu)) ||
(!pps->getLoopFilterAcrossTilesEnabledFlag() && !CU::isSameTile(*currCtu, *prevCtu))
|| (!loopFilterAcrossSubPicEnabledFlag && !CU::isSameSubPic(*currCtu, *prevCtu))
)
......@@ -168,7 +168,7 @@ bool AdaptiveLoopFilter::isCrossedByVirtualBoundaries( const CodingStructure& cs
{
const Position nextCtuPos(xPos + ctuSize, yPos);
const CodingUnit *nextCtu = cs.getCU(nextCtuPos, CHANNEL_TYPE_LUMA);
if ((!pps->getLoopFilterAcrossSlicesEnabledFlag() && !CU::isSameSlice(*currCtu, *nextCtu)) ||
if ((!pps->getLoopFilterAcrossSlicesEnabledFlag() && !CU::isSameSlice(*currCtu, *nextCtu)) ||
(!pps->getLoopFilterAcrossTilesEnabledFlag() && !CU::isSameTile(*currCtu, *nextCtu))
|| (!loopFilterAcrossSubPicEnabledFlag && !CU::isSameSubPic(*currCtu, *nextCtu))
)
......
......@@ -564,7 +564,7 @@ void AreaBuf<Pel>::roundToOutputBitdepth( const AreaBuf<const Pel> &src, const C
const int32_t clipbd = clpRng.bd;
const int32_t shiftDefault = std::max<int>(2, (IF_INTERNAL_PREC - clipbd));
const int32_t offsetDefault = (1<<(shiftDefault-1)) + IF_INTERNAL_OFFS;
if( width == 1 )
{
THROW( "Blocks of width = 1 not supported" );
......
......@@ -665,7 +665,7 @@ void CodingStructure::addEmptyTUs( Partitioner &partitioner )
if( split )
{
partitioner.splitCurrArea( TU_MAX_TR_SPLIT, *this );
partitioner.splitCurrArea( TU_MAX_TR_SPLIT, *this );
do
{
addEmptyTUs( partitioner );
......
......@@ -547,7 +547,7 @@ unsigned DeriveCtx::CtxPltCopyFlag( const unsigned prevRunType, const unsigned d
return ucCtxLut[dist];
}
else
{
{
return ucCtxLut[RUN_IDX_THRE];
}
}
......@@ -298,7 +298,7 @@ public:
int deriveModCoeff(int rightPixel, int belowPixel, int absCoeff, int bdpcm = 0)
{
if (absCoeff == 0)
return 0;
int pred1, absBelow = abs(belowPixel), absRight = abs(rightPixel);
......@@ -324,7 +324,7 @@ public:
int decDeriveModCoeff(int rightPixel, int belowPixel, int absCoeff)
{
if (absCoeff == 0)
return 0;
......
......@@ -566,7 +566,7 @@ void InterPrediction::xPredInterBi(PredictionUnit &pu, PelUnitBuf &pcYuvPred, co
bool dmvrApplied = false;
dmvrApplied = (pu.mvRefine) && PU::checkDMVRCondition(pu);
bool refIsScaled = ( refIdx0 < 0 ? false : pu.cu->slice->getRefPic( REF_PIC_LIST_0, refIdx0 )->isRefScaled( pu.cs->pps ) ) ||
bool refIsScaled = ( refIdx0 < 0 ? false : pu.cu->slice->getRefPic( REF_PIC_LIST_0, refIdx0 )->isRefScaled( pu.cs->pps ) ) ||
( refIdx1 < 0 ? false : pu.cu->slice->getRefPic( REF_PIC_LIST_1, refIdx1 )->isRefScaled( pu.cs->pps ) );
dmvrApplied = dmvrApplied && !refIsScaled;
bioApplied = bioApplied && !refIsScaled;
......@@ -1460,7 +1460,7 @@ void InterPrediction::motionCompensation( PredictionUnit &pu, PelUnitBuf &predBu
, false
, luma, chroma
);
xWeightedPredictionUni( pu, predBuf, eRefPicList, predBuf, -1, m_maxCompIDToPred
xWeightedPredictionUni( pu, predBuf, eRefPicList, predBuf, -1, m_maxCompIDToPred
, (luma && !chroma), (!luma && chroma)
);
}
......@@ -1526,7 +1526,7 @@ void InterPrediction::motionCompensation( PredictionUnit &pu, PelUnitBuf &predBu
}
}
bool refIsScaled = ( refIdx0 < 0 ? false : pu.cu->slice->getRefPic( REF_PIC_LIST_0, refIdx0 )->isRefScaled( pu.cs->pps ) ) ||
bool refIsScaled = ( refIdx0 < 0 ? false : pu.cu->slice->getRefPic( REF_PIC_LIST_0, refIdx0 )->isRefScaled( pu.cs->pps ) ) ||
( refIdx1 < 0 ? false : pu.cu->slice->getRefPic( REF_PIC_LIST_1, refIdx1 )->isRefScaled( pu.cs->pps ) );
bioApplied = refIsScaled ? false : bioApplied;
bool dmvrApplied = false;
......@@ -1607,7 +1607,7 @@ void InterPrediction::motionCompensationGeo( CodingUnit &cu, MergeCtx &geoMrgCtx
{
printf( "DECODER_GEO_PU: pu motion vector across tile boundaries (%d,%d,%d,%d)\n", pu.lx(), pu.ly(), pu.lwidth(), pu.lheight() );
}
geoMrgCtx.setMergeInfo( pu, candIdx1 );
PU::spanMotionInfo( pu );
motionCompensation(pu, tmpGeoBuf1, REF_PIC_LIST_X, true, isChromaEnabled(pu.chromaFormat)); // TODO: check 4:0:0 interaction with weighted prediction.
......@@ -1841,7 +1841,7 @@ void InterPrediction::xFinalPaddedMCForDMVR(PredictionUnit& pu, PelUnitBuf &pcYu
m_iRefListIdx = refId;
const Picture* refPic = pu.cu->slice->getRefPic( refId, pu.refIdx[refId] )->unscaledPic;
Mv cMvClipped = cMv;
if( !pu.cs->sps->getWrapAroundEnabledFlag() )
if( !pu.cs->sps->getWrapAroundEnabledFlag() )
{
clipMv( cMvClipped, pu.lumaPos(), pu.lumaSize(), *pu.cs->sps, *pu.cs->pps );
}
......@@ -2309,7 +2309,7 @@ bool InterPrediction::xPredInterBlkRPR( const std::pair<int, int>& scalingRatio,
int xFilter = filterIndex;
int yFilter = filterIndex;
const int rprThreshold1 = ( 1 << SCALE_RATIO_BITS ) * 5 / 4;
const int rprThreshold1 = ( 1 << SCALE_RATIO_BITS ) * 5 / 4;
const int rprThreshold2 = ( 1 << SCALE_RATIO_BITS ) * 7 / 4;
if( filterIndex == 0 )
{
......@@ -2403,7 +2403,7 @@ bool InterPrediction::xPredInterBlkRPR( const std::pair<int, int>& scalingRatio,
int xInt0 = ( (int32_t)x0Int + offX ) >> posShift;
xInt0 = std::min( std::max( -(NTAPS_LUMA / 2), xInt0 ), ( refPicWidth >> ::getComponentScaleX( compID, chFmt ) ) + (NTAPS_LUMA / 2) );
int refHeight = ((((int32_t)y0Int + (height-1) * stepY) + offY ) >> posShift) - ((((int32_t)y0Int + 0 * stepY) + offY ) >> posShift) + 1;
refHeight = std::max<int>( 1, refHeight );
......
......@@ -1447,7 +1447,7 @@ void IntraPrediction::xGetLumaRecPixels(const PredictionUnit &pu, CompArea chrom
if ((i == 0 && !bLeftAvaillable) || (i == uiCWidth + addedAboveRight - 1 + logSubWidthC))
{
pDst[i] = (piSrc[mult * i] * c0_3tap + piSrc[mult * i] * c1_3tap + piSrc[mult * i + 1] * c2_3tap + offset_3tap) >> shift_3tap;
pDst[i] = (piSrc[mult * i] * c0_3tap + piSrc[mult * i] * c1_3tap + piSrc[mult * i + 1] * c2_3tap + offset_3tap) >> shift_3tap;
}
else
{
......
......@@ -329,7 +329,7 @@ void LoopFilter::xDeblockCU( CodingUnit& cu, const DeblockEdgeDir edgeDir )
{
edgeIdx.push_back( ( edgeDir == EDGE_HOR ) ? ( currTU.blocks[cu.chType].y - cu.blocks[cu.chType].y ) / 4 : ( currTU.blocks[cu.chType].x - cu.blocks[cu.chType].x ) / 4 );
}
else
else
{
edgeIdx.push_back( ( edgeDir == EDGE_HOR ) ? (( currTU.blocks[cu.chType].y - cu.blocks[cu.chType].y ) << ::getComponentScaleY(COMPONENT_Cb, cu.chromaFormat)) / 4 : (( currTU.blocks[cu.chType].x - cu.blocks[cu.chType].x ) << ::getComponentScaleX(COMPONENT_Cb, cu.chromaFormat)) / 4 );
}
......@@ -676,11 +676,11 @@ void LoopFilter::xSetEdgefilterMultiple( const CodingUnit& cu,
for( int ui = 0; ui < uiNumElem; ui++ )
{
m_aapbEdgeFilter[edgeDir][uiBsIdx] = bValue;
if ( m_aapucBS[edgeDir][uiBsIdx] && bValue )