#237 closed defect (duplicate)When GOPSize=1, Decode mistake after IDR
Description (last modified by ksuehring)
I am try the code in branch HM-4.1-dev.
my cfg:
DecodingRefreshType : 2
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 Attachments (1)Change History (10)comment:1 Changed 13 years ago by DefaultCC Plugin
comment:2 Changed 13 years ago by davidfcomment:3 Changed 13 years ago by chenm003
I update my patch for decoder's wrong when output YUV. comment:4 Changed 13 years ago by chenm003
When I setting LoopFilterDisable=0, decoder will crash when 2nd IDR. comment:5 Changed 13 years ago by ksuehring
comment:6 Changed 13 years ago by ksuehring
comment:7 Changed 13 years ago by ksuehring
A fix has been provided by Rickard in HM-5.0-dev-bugfix r1719 comment:8 Changed 13 years ago by ksuehring
Closed as duplicate of #271. comment:9 Changed 13 years ago by davidf
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
|
Updating component after adding WD (Text) tickets