Commit b9080ff4 authored by Karsten Suehring's avatar Karsten Suehring

Merge branch 'JVET_N0047_IRAP_NonIRAP' into 'master'

JVET-N0047: Ref pic list for IDR

See merge request jvet/VVCSoftware_VTM!501
parents 7e6c12b5 cc56c669
Pipeline #1749 passed with stage
......@@ -1622,6 +1622,12 @@ and NumRecSlicesInPicMinus1 is equal to 3, the values of RectSlicesBoundaryArray
\end{tabular}
\\
\Option{IDRRefParamList} &
%\ShortOption{\None} &
\Default{false} &
Enables the signalling of reference picture list syntax elements in slice headers of IDR pictures
\\
\Option{WaveFrontSynchro} &
%\ShortOption{\None} &
\Default{false} &
......
......@@ -182,10 +182,14 @@ void EncApp::xInitLibCfg()
m_cEncLib.setRPLList0 ( m_RPLList0);
m_cEncLib.setRPLList1 ( m_RPLList1);
#endif
m_cEncLib.setGopList ( m_GOPList );
#if !JVET_M0128
m_cEncLib.setExtraRPSs ( m_extraRPSs );
#endif
#if JVET_N0047_Merge_IDR_Non_IDR
m_cEncLib.setIDRRefParamListPresent ( m_idrRefParamList );
#endif
m_cEncLib.setGopList ( m_GOPList );
for(int i = 0; i < MAX_TLAYER; i++)
{
m_cEncLib.setNumReorderPics ( m_numReorderPics[i], i );
......
......@@ -1023,7 +1023,9 @@ bool EncAppCfg::parseCfg( int argc, char* argv[] )
//Alias with same name as in HM
("ReWriteParamSetsFlag", m_rewriteParamSets, false, "Alias for ReWriteParamSets")
#endif
#if JVET_N0047_Merge_IDR_Non_IDR
("IDRRefParamList", m_idrRefParamList, false, "Enable indication of reference picture list syntax elements in slice headers of IDR pictures")
#endif
// motion search options
("DisableIntraInInter", m_bDisableIntraPUsInInterSlices, false, "Flag to disable intra PUs in inter slices")
("FastSearch", tmpMotionEstimationSearchMethod, int(MESEARCH_DIAMOND), "0:Full search 1:Diamond 2:Selective 3:Enhanced Diamond")
......
......@@ -191,6 +191,9 @@ protected:
RPLEntry m_RPLList1[MAX_GOP]; ///< the RPL entries from the config file
#else
int m_extraRPSs; ///< extra RPSs added to handle CRA
#endif
#if JVET_N0047_Merge_IDR_Non_IDR
bool m_idrRefParamList; ///< indicates if reference picture list syntax elements are present in slice headers of IDR pictures
#endif
GOPEntry m_GOPList[MAX_GOP]; ///< the coding structure entries from the config file
#if JVET_N0857_TILES_BRICKS
......
......@@ -1203,6 +1203,9 @@ private:
unsigned m_maxBTDepth[3];
unsigned m_maxBTSize[3];
unsigned m_maxTTSize[3];
#if JVET_N0047_Merge_IDR_Non_IDR
bool m_idrRefParamList;
#endif
unsigned m_dualITree;
uint32_t m_uiMaxCUWidth;
uint32_t m_uiMaxCUHeight;
......@@ -1465,7 +1468,10 @@ public:
unsigned getMaxTTSize() const { return m_maxTTSize[1]; }
unsigned getMaxTTSizeI() const { return m_maxTTSize[0]; }
unsigned getMaxTTSizeIChroma() const { return m_maxTTSize[2]; }
#if JVET_N0047_Merge_IDR_Non_IDR
void setIDRRefParamListPresent(bool b) { m_idrRefParamList = b; }
bool getIDRRefParamListPresent() const { return m_idrRefParamList; }
#endif
void setUseDualITree(bool b) { m_dualITree = b; }
bool getUseDualITree() const { return m_dualITree; }
......
......@@ -49,7 +49,9 @@
#include <cstring>
#include <assert.h>
#include <cassert>
#define JVET_N0047_Merge_IDR_Non_IDR 1 // merging IDR and non-IDR pictures
#define JVET_N0276_CONSTRAINT_FLAGS 1 // JVET-N0276: On interoperability point signalling
#define JVET_N0278_HLS 1 // JVET-N0278: HLS for MPEG requirements on immersive media delivery and access
......
......@@ -1563,7 +1563,9 @@ void HLSyntaxReader::parseSPS(SPS* pcSPS)
READ_UVLC( uiCode, "log2_max_pic_order_cnt_lsb_minus4" ); pcSPS->setBitsForPOC( 4 + uiCode );
CHECK(uiCode > 12, "Invalid code");
#if JVET_N0047_Merge_IDR_Non_IDR
READ_FLAG( uiCode, "sps_idr_rpl_present_flag" ); pcSPS->setIDRRefParamListPresent( (bool) uiCode);
#endif
// KJS: Marakech decision: sub-layers added back
uint32_t subLayerOrderingInfoPresentFlag;
READ_FLAG(subLayerOrderingInfoPresentFlag, "sps_sub_layer_ordering_info_present_flag");
......@@ -2222,7 +2224,11 @@ void HLSyntaxReader::parseSliceHeader (Slice* pcSlice, ParameterSetManager *para
// read colour_plane_id
// (separate_colour_plane_flag == 1) is not supported in this version of the standard.
#if JVET_N0047_Merge_IDR_Non_IDR
if( pcSlice->getIdrPicFlag() && !(sps->getIDRRefParamListPresent()))
#else
if( pcSlice->getIdrPicFlag() )
#endif
{
READ_CODE(sps->getBitsForPOC(), uiCode, "slice_pic_order_cnt_lsb");
pcSlice->setPOC(uiCode);
......@@ -2521,6 +2527,8 @@ void HLSyntaxReader::parseSliceHeader (Slice* pcSlice, ParameterSetManager *para
pcSlice->setEnableTMVPFlag(false);
}
}
if(sps->getSAOEnabledFlag())
{
READ_FLAG(uiCode, "slice_sao_luma_flag"); pcSlice->setSaoEnabledFlag(CHANNEL_TYPE_LUMA, (bool)uiCode);
......
......@@ -280,6 +280,9 @@ protected:
uint32_t m_uiDecodingRefreshType; ///< the type of decoding refresh employed for the random access.
#if JCTVC_Y0038_PARAMS
bool m_rewriteParamSets;
#endif
#if JVET_N0047_Merge_IDR_Non_IDR
bool m_idrRefParamList;
#endif
int m_iGOPSize;
#if JVET_M0128
......@@ -888,6 +891,10 @@ public:
void setDecodingRefreshType ( int i ) { m_uiDecodingRefreshType = (uint32_t)i; }
#if JCTVC_Y0038_PARAMS
void setReWriteParamSets ( bool b ) { m_rewriteParamSets = b; }
#endif
#if JVET_N0047_Merge_IDR_Non_IDR
void setIDRRefParamListPresent ( bool b ) { m_idrRefParamList = b; }
bool getIDRRefParamListPresent () const { return m_idrRefParamList; }
#endif
void setGOPSize ( int i ) { m_iGOPSize = i; }
void setGopList(const GOPEntry GOPList[MAX_GOP]) { for (int i = 0; i < MAX_GOP; i++) m_GOPList[i] = GOPList[i]; }
......
......@@ -1098,6 +1098,9 @@ void EncLib::xInitSPS(SPS &sps)
sps.setSplitConsOverrideEnabledFlag ( m_useSplitConsOverride );
sps.setMinQTSizes ( m_uiMinQT );
sps.setMaxBTDepth ( m_uiMaxBTDepth, m_uiMaxBTDepthI, m_uiMaxBTDepthIChroma );
#if JVET_N0047_Merge_IDR_Non_IDR
sps.setIDRRefParamListPresent ( m_idrRefParamList );
#endif
sps.setUseDualITree ( m_dualITree );
#if JVET_N0193_LFNST
sps.setUseLFNST ( m_LFNST );
......
......@@ -1082,7 +1082,9 @@ void HLSWriter::codeSPS( const SPS* pcSPS )
WRITE_UVLC( chromaEnabled ? (pcSPS->getBitDepth(CHANNEL_TYPE_CHROMA) - 8):0, "bit_depth_chroma_minus8" );
WRITE_UVLC( pcSPS->getBitsForPOC()-4, "log2_max_pic_order_cnt_lsb_minus4" );
#if JVET_N0047_Merge_IDR_Non_IDR
WRITE_FLAG( pcSPS->getIDRRefParamListPresent(), "sps_idr_rpl_present_flag" );
#endif
// KJS: Marakech decision: sub-layers added back
const bool subLayerOrderingInfoPresentFlag = 1;
WRITE_FLAG(subLayerOrderingInfoPresentFlag, "sps_sub_layer_ordering_info_present_flag");
......@@ -1606,7 +1608,11 @@ void HLSWriter::codeSliceHeader ( Slice* pcSlice )
int pocBits = pcSlice->getSPS()->getBitsForPOC();
int pocMask = (1 << pocBits) - 1;
WRITE_CODE(pcSlice->getPOC() & pocMask, pocBits, "slice_pic_order_cnt_lsb");
if( !pcSlice->getIdrPicFlag() )
#if JVET_N0047_Merge_IDR_Non_IDR
if( !pcSlice->getIdrPicFlag() || pcSlice->getSPS()->getIDRRefParamListPresent())
#else
if( !pcSlice->getIdrPicFlag() )
#endif
{
#if JVET_M0128
//Write L0 related syntax elements
......
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