Commit 8a177028 authored by Zhipin Deng's avatar Zhipin Deng

adjust the format

parent 91827c4b
......@@ -315,11 +315,11 @@ void HLSyntaxReader::copyRefPicList(SPS* sps, ReferencePictureList* source_rpl,
}
}
void HLSyntaxReader::parseRefPicList(SPS* sps, ReferencePictureList* rpl
#if JVET_R0059_RPL_CLEANUP
, int rplIdx
void HLSyntaxReader::parseRefPicList(SPS* sps, ReferencePictureList* rpl, int rplIdx)
#else
void HLSyntaxReader::parseRefPicList(SPS* sps, ReferencePictureList* rpl)
#endif
)
{
uint32_t code;
READ_UVLC(code, "num_ref_entries[ listIdx ][ rplsIdx ]");
......@@ -328,11 +328,11 @@ void HLSyntaxReader::parseRefPicList(SPS* sps, ReferencePictureList* rpl
uint32_t numLtrp = 0;
uint32_t numIlrp = 0;
if (sps->getLongTermRefsPresent()
#if JVET_R0059_RPL_CLEANUP
&& rplIdx != -1
if (sps->getLongTermRefsPresent() && rplIdx != -1)
#else
if (sps->getLongTermRefsPresent())
#endif
)
{
READ_FLAG(code, "ltrp_in_slice_header_flag[ listIdx ][ rplsIdx ]");
rpl->setLtrpInSliceHeaderFlag(code);
......@@ -1474,11 +1474,11 @@ void HLSyntaxReader::parseSPS(SPS* pcSPS)
for (uint32_t ii = 0; ii < numberOfRPL; ii++)
{
rpl = rplList->getReferencePictureList(ii);
parseRefPicList(pcSPS, rpl
#if JVET_R0059_RPL_CLEANUP
, ii
parseRefPicList(pcSPS, rpl, ii);
#else
parseRefPicList(pcSPS, rpl);
#endif
);
}
//Read candidate for List1
......@@ -1491,11 +1491,11 @@ void HLSyntaxReader::parseSPS(SPS* pcSPS)
for (uint32_t ii = 0; ii < numberOfRPL; ii++)
{
rpl = rplList->getReferencePictureList(ii);
parseRefPicList(pcSPS, rpl
#if JVET_R0059_RPL_CLEANUP
, ii
parseRefPicList(pcSPS, rpl, ii);
#else
parseRefPicList(pcSPS, rpl);
#endif
);
}
}
else
......@@ -2552,11 +2552,11 @@ void HLSyntaxReader::parsePictureHeader( PicHeader* picHeader, ParameterSetManag
{
ReferencePictureList* rpl = picHeader->getLocalRPL( listIdx );
(*rpl) = ReferencePictureList();
parseRefPicList(sps, rpl
#if JVET_R0059_RPL_CLEANUP
, -1
parseRefPicList(sps, rpl, -1);
#else
parseRefPicList(sps, rpl);
#endif
);
picHeader->setRPLIdx(listIdx, -1);
picHeader->setRPL(listIdx, rpl);
}
......@@ -3420,11 +3420,11 @@ void HLSyntaxReader::parseSliceHeader (Slice* pcSlice, PicHeader* picHeader, Par
{
ReferencePictureList* rpl0 = pcSlice->getLocalRPL0();
(*rpl0) = ReferencePictureList();
parseRefPicList(sps, rpl0
#if JVET_R0059_RPL_CLEANUP
, -1
parseRefPicList(sps, rpl0, -1);
#else
parseRefPicList(sps, rpl0);
#endif
);
pcSlice->setRPL0idx(-1);
pcSlice->setRPL0(rpl0);
}
......@@ -3530,11 +3530,11 @@ void HLSyntaxReader::parseSliceHeader (Slice* pcSlice, PicHeader* picHeader, Par
{
ReferencePictureList* rpl1 = pcSlice->getLocalRPL1();
(*rpl1) = ReferencePictureList();
parseRefPicList(sps, rpl1
#if JVET_R0059_RPL_CLEANUP
, -1
parseRefPicList(sps, rpl1, -1);
#else
parseRefPicList(sps, rpl1);
#endif
);
pcSlice->setRPL1idx(-1);
pcSlice->setRPL1(rpl1);
}
......
......@@ -152,11 +152,11 @@ public:
protected:
void copyRefPicList(SPS* pcSPS, ReferencePictureList* source_rpl, ReferencePictureList* dest_rpl);
void parseRefPicList(SPS* pcSPS, ReferencePictureList* rpl
#if JVET_R0059_RPL_CLEANUP
, int rplIdx
void parseRefPicList(SPS* pcSPS, ReferencePictureList* rpl, int rplIdx);
#else
void parseRefPicList(SPS* pcSPS, ReferencePictureList* rpl);
#endif
);
public:
void setBitstream ( InputBitstream* p ) { m_pcBitstream = p; }
......
......@@ -179,20 +179,20 @@ void AUDWriter::codeAUD(OutputBitstream& bs, const int pictureType)
xWriteRbspTrailingBits();
}
void HLSWriter::xCodeRefPicList( const ReferencePictureList* rpl, bool isLongTermPresent, uint32_t ltLsbBitsCount, const bool isForbiddenZeroDeltaPoc
#if JVET_R0059_RPL_CLEANUP
, int rplIdx
void HLSWriter::xCodeRefPicList( const ReferencePictureList* rpl, bool isLongTermPresent, uint32_t ltLsbBitsCount, const bool isForbiddenZeroDeltaPoc, int rplIdx)
#else
void HLSWriter::xCodeRefPicList( const ReferencePictureList* rpl, bool isLongTermPresent, uint32_t ltLsbBitsCount, const bool isForbiddenZeroDeltaPoc)
#endif
)
{
uint32_t numRefPic = rpl->getNumberOfShorttermPictures() + rpl->getNumberOfLongtermPictures() + rpl->getNumberOfInterLayerPictures();
WRITE_UVLC( numRefPic, "num_ref_entries[ listIdx ][ rplsIdx ]" );
if (isLongTermPresent
#if JVET_R0059_RPL_CLEANUP
&& rplIdx != -1
if (isLongTermPresent && rplIdx != -1)
#else
if (isLongTermPresent)
#endif
)
{
WRITE_FLAG(rpl->getLtrpInSliceHeaderFlag(), "ltrp_in_slice_header_flag[ listIdx ][ rplsIdx ]");
}
......@@ -901,11 +901,11 @@ void HLSWriter::codeSPS( const SPS* pcSPS )
for (int ii = 0; ii < numberOfRPL; ii++)
{
const ReferencePictureList* rpl = rplList0->getReferencePictureList(ii);
xCodeRefPicList( rpl, pcSPS->getLongTermRefsPresent(), pcSPS->getBitsForPOC(), !pcSPS->getUseWP() && !pcSPS->getUseWPBiPred()
#if JVET_R0059_RPL_CLEANUP
, ii
xCodeRefPicList(rpl, pcSPS->getLongTermRefsPresent(), pcSPS->getBitsForPOC(), !pcSPS->getUseWP() && !pcSPS->getUseWPBiPred(), ii);
#else
xCodeRefPicList( rpl, pcSPS->getLongTermRefsPresent(), pcSPS->getBitsForPOC(), !pcSPS->getUseWP() && !pcSPS->getUseWPBiPred());
#endif
);
}
//Write candidate for List1
......@@ -916,11 +916,11 @@ void HLSWriter::codeSPS( const SPS* pcSPS )
for (int ii = 0; ii < numberOfRPL; ii++)
{
const ReferencePictureList* rpl = rplList1->getReferencePictureList(ii);
xCodeRefPicList( rpl, pcSPS->getLongTermRefsPresent(), pcSPS->getBitsForPOC(), !pcSPS->getUseWP() && !pcSPS->getUseWPBiPred()
#if JVET_R0059_RPL_CLEANUP
, ii
xCodeRefPicList(rpl, pcSPS->getLongTermRefsPresent(), pcSPS->getBitsForPOC(), !pcSPS->getUseWP() && !pcSPS->getUseWPBiPred(), ii);
#else
xCodeRefPicList( rpl, pcSPS->getLongTermRefsPresent(), pcSPS->getBitsForPOC(), !pcSPS->getUseWP() && !pcSPS->getUseWPBiPred());
#endif
);
}
}
if( pcSPS->getChromaFormatIdc() != CHROMA_400 )
......@@ -1658,11 +1658,11 @@ void HLSWriter::codePictureHeader( PicHeader* picHeader, bool writeRbspTrailingB
// explicit RPL in picture header
else
{
xCodeRefPicList( picHeader->getRPL(listIdx), sps->getLongTermRefsPresent(), sps->getBitsForPOC(), !sps->getUseWP() && !sps->getUseWPBiPred()
#if JVET_R0059_RPL_CLEANUP
, -1
xCodeRefPicList( picHeader->getRPL(listIdx), sps->getLongTermRefsPresent(), sps->getBitsForPOC(), !sps->getUseWP() && !sps->getUseWPBiPred(), -1);
#else
xCodeRefPicList( picHeader->getRPL(listIdx), sps->getLongTermRefsPresent(), sps->getBitsForPOC(), !sps->getUseWP() && !sps->getUseWPBiPred());
#endif
);
}
// POC MSB cycle signalling for LTRP
......@@ -2147,11 +2147,11 @@ void HLSWriter::codeSliceHeader ( Slice* pcSlice )
}
else
{ //write local RPL0
xCodeRefPicList( pcSlice->getRPL0(), pcSlice->getSPS()->getLongTermRefsPresent(), pcSlice->getSPS()->getBitsForPOC(), !pcSlice->getSPS()->getUseWP() && !pcSlice->getSPS()->getUseWPBiPred()
#if JVET_R0059_RPL_CLEANUP
, -1
xCodeRefPicList( pcSlice->getRPL0(), pcSlice->getSPS()->getLongTermRefsPresent(), pcSlice->getSPS()->getBitsForPOC(), !pcSlice->getSPS()->getUseWP() && !pcSlice->getSPS()->getUseWPBiPred(), -1);
#else
xCodeRefPicList( pcSlice->getRPL0(), pcSlice->getSPS()->getLongTermRefsPresent(), pcSlice->getSPS()->getBitsForPOC(), !pcSlice->getSPS()->getUseWP() && !pcSlice->getSPS()->getUseWPBiPred());
#endif
);
}
//Deal POC Msb cycle signalling for LTRP
if (pcSlice->getRPL0()->getNumberOfLongtermPictures())
......@@ -2212,11 +2212,11 @@ void HLSWriter::codeSliceHeader ( Slice* pcSlice )
}
else
{ //write local RPL1
xCodeRefPicList( pcSlice->getRPL1(), pcSlice->getSPS()->getLongTermRefsPresent(), pcSlice->getSPS()->getBitsForPOC(), !pcSlice->getSPS()->getUseWP() && !pcSlice->getSPS()->getUseWPBiPred()
#if JVET_R0059_RPL_CLEANUP
, -1
xCodeRefPicList( pcSlice->getRPL1(), pcSlice->getSPS()->getLongTermRefsPresent(), pcSlice->getSPS()->getBitsForPOC(), !pcSlice->getSPS()->getUseWP() && !pcSlice->getSPS()->getUseWPBiPred(), -1);
#else
xCodeRefPicList( pcSlice->getRPL1(), pcSlice->getSPS()->getLongTermRefsPresent(), pcSlice->getSPS()->getBitsForPOC(), !pcSlice->getSPS()->getUseWP() && !pcSlice->getSPS()->getUseWPBiPred());
#endif
);
}
//Deal POC Msb cycle signalling for LTRP
if (pcSlice->getRPL1()->getNumberOfLongtermPictures())
......
......@@ -113,11 +113,11 @@ public:
virtual ~HLSWriter() {}
private:
void xCodeRefPicList( const ReferencePictureList* rpl, bool isLongTermPresent, uint32_t ltLsbBitsCount, const bool isForbiddenZeroDeltaPoc
#if JVET_R0059_RPL_CLEANUP
, int rplIdx
void xCodeRefPicList( const ReferencePictureList* rpl, bool isLongTermPresent, uint32_t ltLsbBitsCount, const bool isForbiddenZeroDeltaPoc, int rplIdx);
#else
void xCodeRefPicList( const ReferencePictureList* rpl, bool isLongTermPresent, uint32_t ltLsbBitsCount, const bool isForbiddenZeroDeltaPoc);
#endif
);
bool xFindMatchingLTRP ( Slice* pcSlice, uint32_t *ltrpsIndex, int ltrpPOC, bool usedFlag );
void xCodePredWeightTable ( Slice* pcSlice );
void xCodePredWeightTable ( PicHeader *picHeader, const SPS *sps );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment