Commit d5068b9f authored by Frank Bossen's avatar Frank Bossen

Merge branch 'remove_HEVC_TILES_WPP_macro' into 'master'

remove HEVC_TILES_WPP macro

See merge request !423
parents 987cb4bd 13f2911b
Pipeline #1210 passed with stage
......@@ -468,7 +468,6 @@ void EncApp::xInitLibCfg()
m_cEncLib.setSEIGreenMetadataType ( uint8_t(m_greenMetadataType) );
m_cEncLib.setSEIXSDMetricType ( uint8_t(m_xsdMetricType) );
#if HEVC_TILES_WPP
m_cEncLib.setTileUniformSpacingFlag ( m_tileUniformSpacingFlag );
m_cEncLib.setNumColumnsMinus1 ( m_numTileColumnsMinus1 );
m_cEncLib.setNumRowsMinus1 ( m_numTileRowsMinus1 );
......@@ -477,9 +476,7 @@ void EncApp::xInitLibCfg()
m_cEncLib.setColumnWidth ( m_tileColumnWidth );
m_cEncLib.setRowHeight ( m_tileRowHeight );
}
#endif
m_cEncLib.xCheckGSParameters();
#if HEVC_TILES_WPP
int uiTilesCount = (m_numTileRowsMinus1+1) * (m_numTileColumnsMinus1+1);
if(uiTilesCount == 1)
{
......@@ -487,7 +484,6 @@ void EncApp::xInitLibCfg()
}
m_cEncLib.setLFCrossTileBoundaryFlag ( m_bLFCrossTileBoundaryFlag );
m_cEncLib.setEntropyCodingSyncEnabledFlag ( m_entropyCodingSyncEnabledFlag );
#endif
m_cEncLib.setTMVPModeId ( m_TMVPModeId );
#if HEVC_USE_SCALING_LISTS
m_cEncLib.setUseScalingListId ( m_useScalingListId );
......@@ -540,9 +536,7 @@ void EncApp::xInitLibCfg()
m_cEncLib.setPocProportionalToTimingFlag ( m_pocProportionalToTimingFlag );
m_cEncLib.setNumTicksPocDiffOneMinus1 ( m_numTicksPocDiffOneMinus1 );
m_cEncLib.setBitstreamRestrictionFlag ( m_bitstreamRestrictionFlag );
#if HEVC_TILES_WPP
m_cEncLib.setTilesFixedStructureFlag ( m_tilesFixedStructureFlag );
#endif
m_cEncLib.setMotionVectorsOverPicBoundariesFlag ( m_motionVectorsOverPicBoundariesFlag );
m_cEncLib.setMinSpatialSegmentationIdc ( m_minSpatialSegmentationIdc );
m_cEncLib.setMaxBytesPerPicDenom ( m_maxBytesPerPicDenom );
......
......@@ -1040,18 +1040,11 @@ bool EncAppCfg::parseCfg( int argc, char* argv[] )
#if K0238_SAO_GREEDY_MERGE_ENCODING
("SAOGreedyEnc", m_saoGreedyMergeEnc, false, "SAO greedy merge encoding algorithm")
#endif
#if HEVC_TILES_WPP
("SliceMode", tmpSliceMode, int(NO_SLICES), "0: Disable all Recon slice limits, 1: Enforce max # of CTUs, 2: Enforce max # of bytes, 3:specify tiles per dependent slice")
("SliceArgument", m_sliceArgument, 0, "Depending on SliceMode being:"
"\t1: max number of CTUs per slice"
"\t2: max number of bytes per slice"
"\t3: max number of tiles per slice")
#else
("SliceMode", tmpSliceMode, int(NO_SLICES), "0: Disable all Recon slice limits, 1: Enforce max # of CTUs, 2: Enforce max # of bytes)")
("SliceArgument", m_sliceArgument, 0, "Depending on SliceMode being:"
"\t1: max number of CTUs per slice"
"\t2: max number of bytes per slice")
#endif
#if HEVC_DEPENDENT_SLICES
("SliceSegmentMode", tmpSliceSegmentMode, int(NO_SLICES), "0: Disable all slice segment limits, 1: Enforce max # of CTUs, 2: Enforce max # of bytes, 3:specify tiles per dependent slice")
("SliceSegmentArgument", m_sliceSegmentArgument, 0, "Depending on SliceSegmentMode being:"
......@@ -1076,7 +1069,6 @@ bool EncAppCfg::parseCfg( int argc, char* argv[] )
("WeightedPredB,-wpB", m_useWeightedBiPred, false, "Use weighted (bidirectional) prediction in B slices")
("WeightedPredMethod,-wpM", tmpWeightedPredictionMethod, int(WP_PER_PICTURE_WITH_SIMPLE_DC_COMBINED_COMPONENT), "Weighted prediction method")
("Log2ParallelMergeLevel", m_log2ParallelMergeLevel, 2u, "Parallel merge estimation region")
#if HEVC_TILES_WPP
//deprecated copies of renamed tile parameters
("UniformSpacingIdc", m_tileUniformSpacingFlag, false, "deprecated alias of TileUniformSpacing")
("ColumnWidthArray", cfg_ColumnWidth, cfg_ColumnWidth, "deprecated alias of TileColumnWidthArray")
......@@ -1089,7 +1081,6 @@ bool EncAppCfg::parseCfg( int argc, char* argv[] )
("TileRowHeightArray", cfg_RowHeight, cfg_RowHeight, "Array containing tile row height values in units of CTU")
("LFCrossTileBoundaryFlag", m_bLFCrossTileBoundaryFlag, true, "1: cross-tile-boundary loop filtering. 0:non-cross-tile-boundary loop filtering")
("WaveFrontSynchro", m_entropyCodingSyncEnabledFlag, false, "0: entropy coding sync disabled; 1 entropy coding sync enabled")
#endif
#if HEVC_USE_SCALING_LISTS
("ScalingList", m_useScalingListId, SCALING_LIST_OFF, "0/off: no scaling list, 1/default: default scaling lists, 2/file: scaling lists specified in ScalingListFile")
("ScalingListFile", m_scalingListFileName, string(""), "Scaling list file name. Use an empty string to produce help.")
......@@ -1161,9 +1152,7 @@ bool EncAppCfg::parseCfg( int argc, char* argv[] )
("PocProportionalToTimingFlag", m_pocProportionalToTimingFlag, false, "Indicates that the POC value is proportional to the output time w.r.t. first picture in CVS")
("NumTicksPocDiffOneMinus1", m_numTicksPocDiffOneMinus1, 0, "Number of ticks minus 1 that for a POC difference of one")
("BitstreamRestriction", m_bitstreamRestrictionFlag, false, "Signals whether bitstream restriction parameters are present")
#if HEVC_TILES_WPP
("TilesFixedStructure", m_tilesFixedStructureFlag, false, "Indicates that each active picture parameter set has the same values of the syntax elements related to tiles")
#endif
("MotionVectorsOverPicBoundaries", m_motionVectorsOverPicBoundariesFlag, false, "Indicates that no samples outside the picture boundaries are used for inter prediction")
("MaxBytesPerPicDenom", m_maxBytesPerPicDenom, 2, "Indicates a number of bytes not exceeded by the sum of the sizes of the VCL NAL units associated with any coded picture")
("MaxBitsPerMinCuDenom", m_maxBitsPerMinCuDenom, 1, "Indicates an upper bound for the number of bits of coding_unit() data")
......@@ -1241,9 +1230,7 @@ bool EncAppCfg::parseCfg( int argc, char* argv[] )
("SEIDecodingUnitInfo", m_decodingUnitInfoSEIEnabled, false, "Control generation of decoding unit information SEI message.")
("SEISOPDescription", m_SOPDescriptionSEIEnabled, false, "Control generation of SOP description SEI messages")
("SEIScalableNesting", m_scalableNestingSEIEnabled, false, "Control generation of scalable nesting SEI messages")
#if HEVC_TILES_WPP
("SEITempMotionConstrainedTileSets", m_tmctsSEIEnabled, false, "Control generation of temporal motion constrained tile sets SEI message")
#endif
("SEITimeCodeEnabled", m_timeCodeSEIEnabled, false, "Control generation of time code information SEI message")
("SEITimeCodeNumClockTs", m_timeCodeSEINumTs, 0, "Number of clock time sets [0..3]")
("SEITimeCodeTimeStampFlag", cfg_timeCodeSeiTimeStampFlag, cfg_timeCodeSeiTimeStampFlag, "Time stamp flag associated to each time set")
......@@ -1390,7 +1377,6 @@ bool EncAppCfg::parseCfg( int argc, char* argv[] )
m_framesToBeEncoded *= 2;
}
#if HEVC_TILES_WPP
if( !m_tileUniformSpacingFlag && m_numTileColumnsMinus1 > 0 )
{
if (cfg_ColumnWidth.values.size() > m_numTileColumnsMinus1)
......@@ -1438,7 +1424,6 @@ bool EncAppCfg::parseCfg( int argc, char* argv[] )
{
m_tileRowHeight.clear();
}
#endif
/* rules for input, output and internal bitdepths as per help text */
if (m_MSBExtendedBitDepth[CHANNEL_TYPE_LUMA ] == 0)
......@@ -2326,13 +2311,11 @@ bool EncAppCfg::xCheckParameter()
}
#endif
#if HEVC_TILES_WPP
bool tileFlag = (m_numTileColumnsMinus1 > 0 || m_numTileRowsMinus1 > 0 );
if (m_profile!=Profile::HIGHTHROUGHPUTREXT)
{
xConfirmPara( tileFlag && m_entropyCodingSyncEnabledFlag, "Tiles and entropy-coding-sync (Wavefronts) can not be applied together, except in the High Throughput Intra 4:4:4 16 profile");
}
#endif
xConfirmPara( m_iSourceWidth % SPS::getWinUnitX(m_chromaFormatIDC) != 0, "Picture width must be an integer multiple of the specified chroma subsampling");
xConfirmPara( m_iSourceHeight % SPS::getWinUnitY(m_chromaFormatIDC) != 0, "Picture height must be an integer multiple of the specified chroma subsampling");
......@@ -2706,7 +2689,6 @@ bool EncAppCfg::xCheckParameter()
if(m_vuiParametersPresentFlag && m_bitstreamRestrictionFlag)
{
int PicSizeInSamplesY = m_iSourceWidth * m_iSourceHeight;
#if HEVC_TILES_WPP
if(tileFlag)
{
int maxTileWidth = 0;
......@@ -2776,12 +2758,6 @@ bool EncAppCfg::xCheckParameter()
{
m_minSpatialSegmentationIdc = 0;
}
#else
if(m_sliceMode == FIXED_NUMBER_OF_CTU)
{
m_minSpatialSegmentationIdc = 4*PicSizeInSamplesY/(m_sliceArgument*m_uiMaxCUWidth*m_uiMaxCUHeight)-4;
}
#endif
}
if ((m_MCTSEncConstraint) && (m_bLFCrossTileBoundaryFlag))
......@@ -2889,13 +2865,11 @@ bool EncAppCfg::xCheckParameter()
xConfirmPara(m_framePackingSEIEnabled , "SEISegmentedRectFramePacking must be 0 when SEIFramePacking is 1");
}
#if HEVC_TILES_WPP
if((m_numTileColumnsMinus1 <= 0) && (m_numTileRowsMinus1 <= 0) && m_tmctsSEIEnabled)
{
msg( WARNING, "Warning: SEITempMotionConstrainedTileSets is set to false to disable temporal motion-constrained tile sets SEI message because there are no tiles enabled.\n");
m_tmctsSEIEnabled = false;
}
#endif
if(m_timeCodeSEIEnabled)
{
......@@ -3122,10 +3096,8 @@ void EncAppCfg::xPrintParameter()
msg( VERBOSE, "WPP:%d ", (int)m_useWeightedPred);
msg( VERBOSE, "WPB:%d ", (int)m_useWeightedBiPred);
msg( VERBOSE, "PME:%d ", m_log2ParallelMergeLevel);
#if HEVC_TILES_WPP
const int iWaveFrontSubstreams = m_entropyCodingSyncEnabledFlag ? (m_iSourceHeight + m_uiMaxCUHeight - 1) / m_uiMaxCUHeight : 1;
msg( VERBOSE, " WaveFrontSynchro:%d WaveFrontSubstreams:%d", m_entropyCodingSyncEnabledFlag?1:0, iWaveFrontSubstreams);
#endif
#if HEVC_USE_SCALING_LISTS
msg( VERBOSE, " ScalingList:%d ", m_useScalingListId );
#endif
......
......@@ -378,7 +378,6 @@ protected:
#endif
bool m_bLFCrossSliceBoundaryFlag; ///< 1: filter across slice boundaries 0: do not filter across slice boundaries
#if HEVC_TILES_WPP
bool m_bLFCrossTileBoundaryFlag; ///< 1: filter across tile boundaries 0: do not filter across tile boundaries
bool m_tileUniformSpacingFlag;
int m_numTileColumnsMinus1;
......@@ -386,7 +385,6 @@ protected:
std::vector<int> m_tileColumnWidth;
std::vector<int> m_tileRowHeight;
bool m_entropyCodingSyncEnabledFlag;
#endif
bool m_bUseConstrainedIntraPred; ///< flag for using constrained intra prediction
bool m_bFastUDIUseMPMEnabled;
......@@ -533,9 +531,7 @@ protected:
bool m_pocProportionalToTimingFlag; ///< Indicates that the POC value is proportional to the output time w.r.t. first picture in CVS
int m_numTicksPocDiffOneMinus1; ///< Number of ticks minus 1 that for a POC difference of one
bool m_bitstreamRestrictionFlag; ///< Signals whether bitstream restriction parameters are present
#if HEVC_TILES_WPP
bool m_tilesFixedStructureFlag; ///< Indicates that each active picture parameter set has the same values of the syntax elements related to tiles
#endif
bool m_motionVectorsOverPicBoundariesFlag; ///< Indicates that no samples outside the picture boundaries are used for inter prediction
int m_minSpatialSegmentationIdc; ///< Indicates the maximum size of the spatial segments in the pictures in the coded video sequence
int m_maxBytesPerPicDenom; ///< Indicates a number of bytes not exceeded by the sum of the sizes of the VCL NAL units associated with any coded picture
......
......@@ -1338,15 +1338,9 @@ const CPelUnitBuf CodingStructure::getBuf( const UnitArea &unit, const PictureTy
const CodingUnit* CodingStructure::getCURestricted( const Position &pos, const CodingUnit& curCu, const ChannelType _chType ) const
{
const CodingUnit* cu = getCU( pos, _chType );
#if HEVC_TILES_WPP
// exists same slice and tile cu precedes curCu in encoding order
// (thus, is either from parent CS in RD-search or its index is lower)
if( cu && CU::isSameSliceAndTile( *cu, curCu ) && ( cu->cs != curCu.cs || cu->idx <= curCu.idx ) )
#else
// exists same slice cu precedes curCu in encoding order
// (thus, is either from parent CS in RD-search or its index is lower)
if(cu && CU::isSameSlice(*cu, curCu) && (cu->cs != curCu.cs || cu->idx <= curCu.idx))
#endif
{
return cu;
}
......@@ -1356,32 +1350,18 @@ const CodingUnit* CodingStructure::getCURestricted( const Position &pos, const C
}
}
#if HEVC_TILES_WPP
const CodingUnit* CodingStructure::getCURestricted( const Position &pos, const unsigned curSliceIdx, const unsigned curTileIdx, const ChannelType _chType ) const
{
const CodingUnit* cu = getCU( pos, _chType );
return ( cu && cu->slice->getIndependentSliceIdx() == curSliceIdx && cu->tileIdx == curTileIdx ) ? cu : nullptr;
}
#else
const CodingUnit* CodingStructure::getCURestricted(const Position &pos, const unsigned curSliceIdx, const ChannelType _chType) const
{
const CodingUnit* cu = getCU(pos, _chType);
return (cu && cu->slice->getIndependentSliceIdx() == curSliceIdx ) ? cu : nullptr;
}
#endif
const PredictionUnit* CodingStructure::getPURestricted( const Position &pos, const PredictionUnit& curPu, const ChannelType _chType ) const
{
const PredictionUnit* pu = getPU( pos, _chType );
#if HEVC_TILES_WPP
// exists same slice and tile pu precedes curPu in encoding order
// (thus, is either from parent CS in RD-search or its index is lower)
if( pu && CU::isSameSliceAndTile( *pu->cu, *curPu.cu ) && ( pu->cs != curPu.cs || pu->idx <= curPu.idx ) )
#else
// exists same slice pu precedes curPu in encoding order
// (thus, is either from parent CS in RD-search or its index is lower)
if(pu && CU::isSameSlice(*pu->cu, *curPu.cu) && (pu->cs != curPu.cs || pu->idx <= curPu.idx))
#endif
{
return pu;
}
......@@ -1394,15 +1374,9 @@ const PredictionUnit* CodingStructure::getPURestricted( const Position &pos, con
const TransformUnit* CodingStructure::getTURestricted( const Position &pos, const TransformUnit& curTu, const ChannelType _chType ) const
{
const TransformUnit* tu = getTU( pos, _chType );
#if HEVC_TILES_WPP
// exists same slice and tile tu precedes curTu in encoding order
// (thus, is either from parent CS in RD-search or its index is lower)
if( tu && CU::isSameSliceAndTile( *tu->cu, *curTu.cu ) && ( tu->cs != curTu.cs || tu->idx <= curTu.idx ) )
#else
// exists same slice tu precedes curTu in encoding order
// (thus, is either from parent CS in RD-search or its index is lower)
if(tu && CU::isSameSlice(*tu->cu, *curTu.cu) && (tu->cs != curTu.cs || tu->idx <= curTu.idx))
#endif
{
return tu;
}
......
......@@ -138,11 +138,7 @@ public:
PredictionUnit *getPU(const ChannelType &_chType ) { return getPU(area.blocks[_chType].pos(), _chType); }
TransformUnit *getTU(const ChannelType &_chType ) { return getTU(area.blocks[_chType].pos(), _chType); }
#if HEVC_TILES_WPP
const CodingUnit *getCURestricted(const Position &pos, const unsigned curSliceIdx, const unsigned curTileIdx, const ChannelType _chType) const;
#else
const CodingUnit *getCURestricted(const Position &pos, const unsigned curSliceIdx, const ChannelType _chType) const;
#endif
const CodingUnit *getCURestricted(const Position &pos, const CodingUnit& curCu, const ChannelType _chType) const;
const PredictionUnit *getPURestricted(const Position &pos, const PredictionUnit& curPu, const ChannelType _chType) const;
const TransformUnit *getTURestricted(const Position &pos, const TransformUnit& curTu, const ChannelType _chType) const;
......
......@@ -151,23 +151,13 @@ void DeriveCtx::CtxSplit( const CodingStructure& cs, Partitioner& partitioner, u
{
const Position pos = partitioner.currArea().blocks[partitioner.chType];
const unsigned curSliceIdx = cs.slice->getIndependentSliceIdx();
#if HEVC_TILES_WPP
const unsigned curTileIdx = cs.picture->tileMap->getTileIdxMap( partitioner.currArea().lumaPos() );
#endif
// get left depth
#if HEVC_TILES_WPP
const CodingUnit* cuLeft = cs.getCURestricted( pos.offset( -1, 0 ), curSliceIdx, curTileIdx, partitioner.chType );
#else
const CodingUnit* cuLeft = cs.getCURestricted( pos.offset( -1, 0 ), curSliceIdx, partitioner.chType );
#endif
// get above depth
#if HEVC_TILES_WPP
const CodingUnit* cuAbove = cs.getCURestricted( pos.offset( 0, -1 ), curSliceIdx, curTileIdx, partitioner.chType );
#else
const CodingUnit* cuAbove = cs.getCURestricted( pos.offset( 0, -1 ), curSliceIdx, partitioner.chType );
#endif
bool canSplit[6];
......
......@@ -84,7 +84,6 @@ inline static uint32_t getRasterIdx(const Position& pos, const PreCalcValues& pc
// utility functions
// ====================================================================================================================
#if HEVC_TILES_WPP
static bool isAvailableLeft( const CodingUnit& cu, const CodingUnit& cu2, const bool bEnforceSliceRestriction, const bool bEnforceTileRestriction )
{
return ( ( !bEnforceSliceRestriction || CU::isSameSlice( cu, cu2 ) ) && ( !bEnforceTileRestriction || CU::isSameTile( cu, cu2 ) ) );
......@@ -94,12 +93,6 @@ static bool isAvailableAbove( const CodingUnit& cu, const CodingUnit& cu2, const
{
return ( !bEnforceSliceRestriction || CU::isSameSlice( cu, cu2 ) ) && ( !bEnforceTileRestriction || CU::isSameTile( cu, cu2 ) );
}
#else
static bool isAvailable( const CodingUnit& cu, const CodingUnit& cu2, const bool bEnforceSliceRestriction )
{
return ( !bEnforceSliceRestriction || CU::isSameSlice( cu, cu2 ) );
}
#endif
// ====================================================================================================================
......@@ -486,9 +479,7 @@ void LoopFilter::xSetEdgefilterMultiple( const CodingUnit& cu,
void LoopFilter::xSetLoopfilterParam( const CodingUnit& cu )
{
const Slice& slice = *cu.slice;
#if HEVC_TILES_WPP
const PPS& pps = *cu.cs->pps;
#endif
if( slice.getDeblockingFilterDisable() )
{
......@@ -499,13 +490,8 @@ void LoopFilter::xSetLoopfilterParam( const CodingUnit& cu )
const Position& pos = cu.blocks[cu.chType].pos();
m_stLFCUParam.internalEdge = true;
#if HEVC_TILES_WPP
m_stLFCUParam.leftEdge = ( 0 < pos.x ) && isAvailableLeft ( cu, *cu.cs->getCU( pos.offset( -1, 0 ), cu.chType ), !slice.getLFCrossSliceBoundaryFlag(), !pps.getLoopFilterAcrossTilesEnabledFlag() );
m_stLFCUParam.topEdge = ( 0 < pos.y ) && isAvailableAbove( cu, *cu.cs->getCU( pos.offset( 0, -1 ), cu.chType ), !slice.getLFCrossSliceBoundaryFlag(), !pps.getLoopFilterAcrossTilesEnabledFlag() );
#else
m_stLFCUParam.leftEdge = ( 0 < pos.x ) && isAvailable ( cu, *cu.cs->getCU( pos.offset( -1, 0 ), cu.chType ), !slice.getLFCrossSliceBoundaryFlag());
m_stLFCUParam.topEdge = ( 0 < pos.y ) && isAvailable ( cu, *cu.cs->getCU( pos.offset( 0, -1 ), cu.chType ), !slice.getLFCrossSliceBoundaryFlag());
#endif
m_stLFCUParam.internalEdge &= !cu.ispMode;
}
......@@ -743,19 +729,11 @@ void LoopFilter::xEdgeFilterLuma(const CodingUnit& cu, const DeblockEdgeDir edge
// Derive neighboring PU index
if (edgeDir == EDGE_VER)
{
#if HEVC_TILES_WPP
CHECK( !isAvailableLeft( cu, cuP, !slice.getLFCrossSliceBoundaryFlag(), !pps.getLoopFilterAcrossTilesEnabledFlag() ), "Neighbour not available" );
#else
CHECK( !isAvailable( cu, cuP, !slice.getLFCrossSliceBoundaryFlag() ), "Neighbour not available" );
#endif
}
else // (iDir == EDGE_HOR)
{
#if HEVC_TILES_WPP
CHECK( !isAvailableAbove( cu, cuP, !slice.getLFCrossSliceBoundaryFlag(), !pps.getLoopFilterAcrossTilesEnabledFlag() ), "Neighbour not available" );
#else
CHECK( !isAvailable( cu, cuP, !slice.getLFCrossSliceBoundaryFlag() ), "Neighbour not available" );
#endif
}
iQP = (cuP.qp + cuQ.qp + 1) >> 1;
......@@ -1022,19 +1000,11 @@ void LoopFilter::xEdgeFilterChroma(const CodingUnit& cu, const DeblockEdgeDir ed
if (edgeDir == EDGE_VER)
{
#if HEVC_TILES_WPP
CHECK(!isAvailableLeft(cu, cuP, !slice.getLFCrossSliceBoundaryFlag(), !pps.getLoopFilterAcrossTilesEnabledFlag()), "Neighbour not available");
#else
CHECK(!isAvailable(cu, cuP, !slice.getLFCrossSliceBoundaryFlag()), "Neighbour not available");
#endif
}
else // (iDir == EDGE_HOR)
{
#if HEVC_TILES_WPP
CHECK(!isAvailableAbove(cu, cuP, !slice.getLFCrossSliceBoundaryFlag(), !pps.getLoopFilterAcrossTilesEnabledFlag()), "Neighbour not available");
#else
CHECK(!isAvailable(cu, cuP, !slice.getLFCrossSliceBoundaryFlag()), "Neighbour not available");
#endif
}
bPartPNoFilter = bPartQNoFilter = false;
......
......@@ -436,7 +436,6 @@ bool Scheduler::getNextCtu( Position& pos, int ctuLine, int offset)
// picture methods
// ---------------------------------------------------------------------------
#if HEVC_TILES_WPP
Tile::Tile()
: m_tileWidthInCtus (0)
......@@ -711,13 +710,10 @@ uint32_t TileMap::getSubstreamForCtuAddr(const uint32_t ctuAddr, const bool bAdd
}
return subStrm;
}
#endif
Picture::Picture()
{
#if HEVC_TILES_WPP
tileMap = nullptr;
#endif
cs = nullptr;
m_bIsBorderExtended = false;
usedByCurr = false;
......@@ -788,14 +784,12 @@ void Picture::destroy()
}
SEIs.clear();
#if HEVC_TILES_WPP
if ( tileMap )
{
tileMap->destroy();
delete tileMap;
tileMap = nullptr;
}
#endif
if (m_spliceIdx)
{
delete[] m_spliceIdx;
......@@ -886,14 +880,12 @@ void Picture::finalInit(const SPS& sps, const PPS& pps, APS& aps)
SEIs.clear();
clearSliceBuffer();
#if HEVC_TILES_WPP
if( tileMap )
{
tileMap->destroy();
delete tileMap;
tileMap = nullptr;
}
#endif
const ChromaFormat chromaFormatIDC = sps.getChromaFormatIdc();
const int iWidth = sps.getPicWidthInLumaSamples();
......@@ -919,10 +911,8 @@ void Picture::finalInit(const SPS& sps, const PPS& pps, APS& aps)
#endif
cs->pcv = pps.pcv;
#if HEVC_TILES_WPP
tileMap = new TileMap;
tileMap->create( sps, pps );
#endif
if (m_spliceIdx == NULL)
{
m_ctuNums = cs->pcv->sizeInCtus;
......
......@@ -115,7 +115,6 @@ class AQpLayer;
typedef std::list<SEI*> SEIMessages;
#if HEVC_TILES_WPP
class Tile
{
private:
......@@ -168,7 +167,6 @@ struct TileMap
void initCtuTsRsAddrMap();
uint32_t calculateNextCtuRSAddr( const uint32_t currCtuRsAddr ) const;
};
#endif
#if ENABLE_SPLIT_PARALLELISM
#define M_BUFS(JID,PID) m_bufs[JID][PID]
......@@ -279,9 +277,7 @@ public:
Slice *swapSliceObject(Slice * p, uint32_t i);
void clearSliceBuffer();
#if HEVC_TILES_WPP
TileMap* tileMap;
#endif
MCTSInfo mctsInfo;
std::vector<AQpLayer*> aqlayer;
......
......@@ -161,9 +161,7 @@ const char *SEI::getSEIMessageString(SEI::PayloadType payloadType)
case SEI::TIME_CODE: return "Time code";
case SEI::MASTERING_DISPLAY_COLOUR_VOLUME: return "Mastering display colour volume";
case SEI::SEGM_RECT_FRAME_PACKING: return "Segmented rectangular frame packing arrangement";
#if HEVC_TILES_WPP
case SEI::TEMP_MOTION_CONSTRAINED_TILE_SETS: return "Temporal motion constrained tile sets";
#endif
case SEI::CHROMA_RESAMPLING_FILTER_HINT: return "Chroma sampling filter hint";
case SEI::COLOUR_REMAPPING_INFO: return "Colour remapping info";
#if U0033_ALTERNATIVE_TRANSFER_CHARACTERISTICS_SEI
......
......@@ -82,9 +82,7 @@ public:
TIME_CODE = 136,
MASTERING_DISPLAY_COLOUR_VOLUME = 137,
SEGM_RECT_FRAME_PACKING = 138,
#if HEVC_TILES_WPP
TEMP_MOTION_CONSTRAINED_TILE_SETS = 139,
#endif
CHROMA_RESAMPLING_FILTER_HINT = 140,
KNEE_FUNCTION_INFO = 141,
COLOUR_REMAPPING_INFO = 142,
......@@ -543,7 +541,6 @@ public:
SEITimeSet timeSetArray[MAX_TIMECODE_SEI_SETS];
};
#if HEVC_TILES_WPP
//definition according to P1005_v1;
class SEITempMotionConstrainedTileSets: public SEI
{
......@@ -600,7 +597,6 @@ public:
const TileSetData &tileSetData (const int index) const { return m_tile_set_data[index]; }
};
#endif
#if ENABLE_TRACING
void xTraceSEIHeader();
......
......@@ -764,7 +764,6 @@ void SampleAdaptiveOffset::deriveLoopFilterBoundaryAvailibility(CodingStructure&
}
}
#if HEVC_TILES_WPP
// check cross tile flags
const bool isLoopFilterAcrossTilePPS = cs.pps->getLoopFilterAcrossTilesEnabledFlag();
if (!isLoopFilterAcrossTilePPS)
......@@ -778,7 +777,6 @@ void SampleAdaptiveOffset::deriveLoopFilterBoundaryAvailibility(CodingStructure&
isBelowLeftAvail = (!isBelowLeftAvail) ? false : CU::isSameTile(*cuCurr, *cuBelowLeft);
isBelowRightAvail = (!isBelowRightAvail) ? false : CU::isSameTile(*cuCurr, *cuBelowRight);
}
#endif
}
//! \}
......@@ -1907,14 +1907,12 @@ PPS::PPS()
#if HEVC_DEPENDENT_SLICES
, m_dependentSliceSegmentsEnabledFlag(false)
#endif
#if HEVC_TILES_WPP
, m_tilesEnabledFlag (false)
, m_entropyCodingSyncEnabledFlag (false)
, m_loopFilterAcrossTilesEnabledFlag (true)
, m_uniformSpacingFlag (false)
, m_numTileColumnsMinus1 (0)
, m_numTileRowsMinus1 (0)
#endif
, m_cabacInitPresentFlag (false)
, m_sliceHeaderExtensionPresentFlag (false)
, m_loopFilterAcrossSlicesEnabledFlag(false)
......
......@@ -778,9 +778,7 @@ private:
bool m_frameFieldInfoPresentFlag;
bool m_hrdParametersPresentFlag;
bool m_bitstreamRestrictionFlag;
#if HEVC_TILES_WPP
bool m_tilesFixedStructureFlag;
#endif
bool m_motionVectorsOverPicBoundariesFlag;
bool m_restrictedRefPicListsFlag;
int m_minSpatialSegmentationIdc;
......@@ -814,9 +812,7 @@ public:
, m_frameFieldInfoPresentFlag (false)
, m_hrdParametersPresentFlag (false)
, m_bitstreamRestrictionFlag (false)
#if HEVC_TILES_WPP
, m_tilesFixedStructureFlag (false)
#endif
, m_motionVectorsOverPicBoundariesFlag(true)
, m_restrictedRefPicListsFlag (1)
, m_minSpatialSegmentationIdc (0)
......@@ -895,10 +891,8 @@ public:
bool getBitstreamRestrictionFlag() const { return m_bitstreamRestrictionFlag; }
void setBitstreamRestrictionFlag(bool i) { m_bitstreamRestrictionFlag = i; }
#if HEVC_TILES_WPP
bool getTilesFixedStructureFlag() const { return m_tilesFixedStructureFlag; }
void setTilesFixedStructureFlag(bool i) { m_tilesFixedStructureFlag = i; }
#endif
bool getMotionVectorsOverPicBoundariesFlag() const { return m_motionVectorsOverPicBoundariesFlag; }
void setMotionVectorsOverPicBoundariesFlag(bool i) { m_motionVectorsOverPicBoundariesFlag = i; }
......@@ -1515,7 +1509,6 @@ private:
#if HEVC_DEPENDENT_SLICES
bool m_dependentSliceSegmentsEnabledFlag; //!< Indicates the presence of dependent slices
#endif
#if HEVC_TILES_WPP
bool m_tilesEnabledFlag; //!< Indicates the presence of tiles
bool m_entropyCodingSyncEnabledFlag; //!< Indicates the presence of wavefronts
......@@ -1525,7 +1518,6 @@ private:
int m_numTileRowsMinus1;
std::vector<int> m_tileColumnWidth;
std::vector<int> m_tileRowHeight;
#endif
bool m_cabacInitPresentFlag;
......@@ -1608,15 +1600,12 @@ public:
bool getUseTransformSkip() const { return m_useTransformSkip; }
void setUseTransformSkip( bool b ) { m_useTransformSkip = b; }
#if HEVC_TILES_WPP
void setLoopFilterAcrossTilesEnabledFlag(bool b) { m_loopFilterAcrossTilesEnabledFlag = b; }
bool getLoopFilterAcrossTilesEnabledFlag() const { return m_loopFilterAcrossTilesEnabledFlag; }
#endif
#if HEVC_DEPENDENT_SLICES
bool getDependentSliceSegmentsEnabledFlag() const { return m_dependentSliceSegmentsEnabledFlag; }
void setDependentSliceSegmentsEnabledFlag(bool val) { m_dependentSliceSegmentsEnabledFlag = val; }
#endif
#if HEVC_TILES_WPP
bool getEntropyCodingSyncEnabledFlag() const { return m_entropyCodingSyncEnabledFlag; }
void setEntropyCodingSyncEnabledFlag(bool val) { m_entropyCodingSyncEnabledFlag = val; }
......@@ -1632,7 +1621,6 @@ public:
int getNumTileRowsMinus1() const { return m_numTileRowsMinus1; }
void setTileRowHeight(const std::vector<int>& rowHeight) { m_tileRowHeight = rowHeight; }
uint32_t getTileRowHeight(uint32_t rowIdx) const { return m_tileRowHeight[rowIdx]; }
#endif
void setCabacInitPresentFlag( bool flag ) { m_cabacInitPresentFlag = flag; }
bool getCabacInitPresentFlag() const { return m_cabacInitPresentFlag; }
......@@ -2058,12 +2046,10 @@ public:
SliceConstraint getSliceSegmentMode() const { return m_sliceSegmentMode; }
void setSliceSegmentArgument( uint32_t uiArgument ) { m_sliceSegmentArgument = uiArgument; }
uint32_t getSliceSegmentArgument() const { return m_sliceSegmentArgument; }
#if HEVC_TILES_WPP
void setSliceSegmentCurStartCtuTsAddr( uint32_t ctuTsAddr ) { m_sliceSegmentCurStartCtuTsAddr = ctuTsAddr; } // CTU Tile-scan address (as opposed to raster-scan)
uint32_t getSliceSegmentCurStartCtuTsAddr() const { return m_sliceSegmentCurStartCtuTsAddr; } // CTU Tile-scan address (as opposed to raster-scan)
void setSliceSegmentCurEndCtuTsAddr( uint32_t ctuTsAddr ) { m_sliceSegmentCurEndCtuTsAddr = ctuTsAddr; } // CTU Tile-scan address (as opposed to raster-scan)
uint32_t getSliceSegmentCurEndCtuTsAddr() const { return m_sliceSegmentCurEndCtuTsAddr; } // CTU Tile-scan address (as opposed to raster-scan)
#endif
#endif
void setSliceBits( uint32_t uiVal ) { m_sliceBits = uiVal; }
uint32_t getSliceBits() const { return m_sliceBits; }
......
......@@ -170,18 +170,10 @@ typedef std::pair<int, int> TrCost;
#define HEVC_USE_SCALING_LISTS 1
#define HEVC_VPS 1
#define HEVC_DEPENDENT_SLICES 1
#define HEVC_TILES_WPP 1
#else
#define HEVC_USE_SIGN_HIDING 1
#define HEVC_TILES_WPP 1
#endif
#ifndef HEVC_TILES_WPP
#define HEVC_TILES_WPP 1
#endif
#if !HEVC_TILES_WPP
#error JVET_M0445_MCTS_NEEDS_TILES_ENABLED
#endif
#define JVET_M0101_HLS 1 // joint HLS syntax
......@@ -674,12 +666,8 @@ enum SliceConstraint
NO_SLICES = 0, ///< don't use slices / slice segments
FIXED_NUMBER_OF_CTU = 1, ///< Limit maximum number of largest coding tree units in a slice / slice segments
FIXED_NUMBER_OF_BYTES = 2, ///< Limit maximum number of bytes in a slice / slice segment
#if HEVC_TILES_WPP
FIXED_NUMBER_OF_TILES = 3, ///< slices / slice segments span an integer number of tiles
NUMBER_OF_SLICE_CONSTRAINT_MODES = 4
#else
NUMBER_OF_SLICE_CONSTRAINT_MODES = 3
#endif
};
// For use with decoded picture hash SEI messages, generated by encoder.
......
......@@ -272,9 +272,7 @@ CodingUnit& CodingUnit::operator=( const CodingUnit& other )
chromaQpAdj = other.chromaQpAdj;
rootCbf = other.rootCbf;
sbtInfo = other.sbtInfo;
#if HEVC_TILES_WPP
tileIdx = other.tileIdx;
#endif
imv = other.imv;
imvNumCand = other.imvNumCand;
GBiIdx = other.GBiIdx;
......@@ -307,9 +305,7 @@ void CodingUnit::initData()
chromaQpAdj = 0;
rootCbf = true;
sbtInfo = 0;
#if HEVC_TILES_WPP
tileIdx = 0;
#endif