Opened 12 years ago

Last modified 12 years ago

#237 closed defect

When GOPSize=1, Decode mistake after IDR — at Initial Version

Reported by: chenm003 Owned by:
Priority: critical Milestone: HM-5.1
Component: HM Version: HM-5.0
Keywords: Cc: fbossen, ksuehring, davidf, jct-vc@…

Description

I am try the code in branch HM-4.1-dev.
I found there some bug.
In the Encoder, when encode IDR, the POC is prev_POC+1, but Decoder assume thet zero.
So G1002_RPS will hit some bug.

my cfg:


DecodingRefreshType : 2
GOPSize : 1
Frame1: P 1 1 0.442 0 2 1 1 -1 0
ListCombination : 0

my temp patch:


diff --git a/source/App/TAppEncoder/TAppEncCfg.cpp b/source/App/TAppEncoder/TAppEncCfg.cpp
index 2f11333..ef1b709 100644
--- a/source/App/TAppEncoder/TAppEncCfg.cpp
+++ b/source/App/TAppEncoder/TAppEncCfg.cpp
@@ -94,6 +94,7 @@ Void TAppEncCfg::destroy()

#if G1002_RPS
std::istringstream &operator>>(std::istringstream &in, GOPEntry &entry) input
{

+ memset(&entry, 0, sizeof(entry));

in>>entry.m_iSliceType;
in>>entry.m_iPOC;
in>>entry.m_iQPOffset;

diff --git a/source/Lib/TLibEncoder/TEncCavlc.cpp b/source/Lib/TLibEncoder/TEncCavlc.cpp
index 77a4820..dd1ad97 100644
--- a/source/Lib/TLibEncoder/TEncCavlc.cpp
+++ b/source/Lib/TLibEncoder/TEncCavlc.cpp
@@ -549,6 +549,7 @@ Void TEncCavlc::codeSliceHeader ( TComSlice* pcSlice )

{

WRITE_UVLC( 0, "idr_pic_id" );
WRITE_FLAG( 0, "no_output_of_prior_pics_flag" );

+ pcSlice->setPOC(0);

}
else
{

diff --git a/source/Lib/TLibEncoder/TEncGOP.cpp b/source/Lib/TLibEncoder/TEncGOP.cpp
index 1662fbd..5392d3b 100644
--- a/source/Lib/TLibEncoder/TEncGOP.cpp
+++ b/source/Lib/TLibEncoder/TEncGOP.cpp
@@ -141,7 +141,7 @@ Void TEncGOP::init ( TEncTop* pcTEncTop )

====================================================================================================================
Public member functions
====================================================================================================================

-Void TEncGOP::compressGOP( Int iPOCLast, Int iNumPicRcvd, TComList<TComPic*>& rcListPic, TComList<TComPicYuv*>& rcListPicYuvRecOut, std::list<AccessUnit>& accessUnitsInGOP)
+Void TEncGOP::compressGOP( Int& iPOCLast, Int iNumPicRcvd, TComList<TComPic*>& rcListPic, TComList<TComPicYuv*>& rcListPicYuvRecOut, std::list<AccessUnit>& accessUnitsInGOP)

{

TComPic* pcPic;
TComPicYuv* pcPicYuvRecOut;

@@ -286,6 +286,9 @@ Void TEncGOP::compressGOP( Int iPOCLast, Int iNumPicRcvd, TComList<TComPic*>& rc

pcSlice->setSliceType(P_SLICE);

}

#endif

+ if (getNalUnitType(uiPOCCurr) == NAL_UNIT_CODED_SLICE_IDR)
+ iPOCLast = 0;
+

Set the nal unit type
pcSlice->setNalUnitType(getNalUnitType(uiPOCCurr));
Do decoding refresh marking if any

diff --git a/source/Lib/TLibEncoder/TEncGOP.h b/source/Lib/TLibEncoder/TEncGOP.h
index 9ab1c3b..c3cfb45 100644
--- a/source/Lib/TLibEncoder/TEncGOP.h
+++ b/source/Lib/TLibEncoder/TEncGOP.h
@@ -129,7 +129,7 @@ public:

Void destroy ();


Void init ( TEncTop* pcTEncTop );

  • Void compressGOP ( Int iPOCLast, Int iNumPicRcvd, TComList<TComPic*>& rcListPic, TComList<TComPicYuv*>& rcListPicYuvRec, std::list<AccessUnit>& accessUnitsInGOP );

+ Void compressGOP ( Int& iPOCLast, Int iNumPicRcvd, TComList<TComPic*>& rcListPic, TComList<TComPicYuv*>& rcListPicYuvRec, std::list<AccessUnit>& accessUnitsInGOP );

#if TILES_DECODER

Void xWriteTileLocationToSliceHeader (OutputNALUnit& rNalu, TComOutputBitstream*& rpcBitstreamRedirect, TComSlice*& rpcSlice);

#endif

Change History (0)

Note: See TracTickets for help on using tickets.

This list contains all users that will be notified about changes made to this ticket.

These roles will be notified: Reporter, Owner, Subscriber, Participant

  • chenm003(Reporter, Participant)
  • David Flynn(Subscriber, Participant)
  • Frank Bossen(Subscriber)
  • jct-vc@…(Subscriber)
  • karl.sharman@…(Always)
  • Karsten Suehring(Subscriber, Participant, Always)