Commit b618a762 authored by Frank Bossen's avatar Frank Bossen

JVET-L0449 Add POC signaling for IDR pictures

parent dfd26227
......@@ -141,6 +141,8 @@
#define JVET_L0362_QG_FIX 1 // QG is the node of qtDepth + mttDepth <= maxDqpDepth
#define JVET_L0362_QG_FIX_CU_REUSE 1 // fix bug on encoder cu coding info reusing fast algorithm (i.e., reuse cu info when having the same neighbor and the same qp)
#define JVET_L0449 1 // code POC value for IDRs
#ifndef JVET_B0051_NON_MPM_MODE
#define JVET_B0051_NON_MPM_MODE ( 1 && JEM_TOOLS )
#endif
......
......@@ -1462,7 +1462,12 @@ void HLSyntaxReader::parseSliceHeader (Slice* pcSlice, ParameterSetManager *para
if( pcSlice->getIdrPicFlag() )
{
#if JVET_L0449
READ_CODE(sps->getBitsForPOC(), uiCode, "slice_pic_order_cnt_lsb");
pcSlice->setPOC(uiCode);
#else
pcSlice->setPOC(0);
#endif
ReferencePictureSet* rps = pcSlice->getLocalRPS();
(*rps)=ReferencePictureSet();
pcSlice->setRPS(rps);
......
......@@ -1438,7 +1438,13 @@ void EncGOP::compressGOP( int iPOCLast, int iNumPicRcvd, PicList& rcListPic,
pcPic->fieldPic = isField;
#endif
#if JVET_L0449
int pocBits = pcSlice->getSPS()->getBitsForPOC();
int pocMask = (1 << pocBits) - 1;
pcSlice->setLastIDR(m_iLastIDR & ~pocMask);
#else
pcSlice->setLastIDR(m_iLastIDR);
#endif
#if HEVC_DEPENDENT_SLICES
pcSlice->setSliceSegmentIdx(0);
#endif
......
......@@ -1033,10 +1033,17 @@ void HLSWriter::codeSliceHeader ( Slice* pcSlice )
WRITE_FLAG( pcSlice->getPicOutputFlag() ? 1 : 0, "pic_output_flag" );
}
#if JVET_L0449
int pocBits = pcSlice->getSPS()->getBitsForPOC();
int pocMask = (1 << pocBits) - 1;
WRITE_CODE(pcSlice->getPOC() & pocMask, pocBits, "slice_pic_order_cnt_lsb");
#endif
if( !pcSlice->getIdrPicFlag() )
{
#if !JVET_L0449
int picOrderCntLSB = ( pcSlice->getPOC() - pcSlice->getLastIDR() + ( 1 << pcSlice->getSPS()->getBitsForPOC() ) ) & ( ( 1 << pcSlice->getSPS()->getBitsForPOC() ) - 1 );
WRITE_CODE( picOrderCntLSB, pcSlice->getSPS()->getBitsForPOC(), "slice_pic_order_cnt_lsb" );
#endif
const ReferencePictureSet* rps = pcSlice->getRPS();
// check for bitstream restriction stating that:
......
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