Ticket #1121: num_reorder_pics.patch
File num_reorder_pics.patch, 8.6 KB (added by bheng, 10 years ago) |
---|
-
App/TAppDecoder/TAppDecTop.cpp
193 193 // write reconstruction to file 194 194 if(bNewPicture) 195 195 { 196 xWriteOutput( pcListPic , nalu.m_temporalId);196 xWriteOutput( pcListPic ); 197 197 } 198 198 } 199 199 } … … 237 237 /** \param pcListPic list of pictures to be written to file 238 238 \todo DYN_REF_FREE should be revised 239 239 */ 240 Void TAppDecTop::xWriteOutput( TComList<TComPic*>* pcListPic , UInt tId)240 Void TAppDecTop::xWriteOutput( TComList<TComPic*>* pcListPic ) 241 241 { 242 242 TComList<TComPic*>::iterator iterPic = pcListPic->begin(); 243 243 Int not_displayed = 0; … … 257 257 { 258 258 TComPic* pcPic = *(iterPic); 259 259 260 if ( pcPic->getOutputMark() && (not_displayed > pcPic->getNumReorderPics( tId) && pcPic->getPOC() > m_iPOCLastDisplay))260 if ( pcPic->getOutputMark() && (not_displayed > pcPic->getNumReorderPics( ) && pcPic->getPOC() > m_iPOCLastDisplay)) 261 261 { 262 262 // write to file 263 263 not_displayed--; -
App/TAppDecoder/TAppDecTop.h
80 80 Void xDestroyDecLib (); ///< destroy internal classes 81 81 Void xInitDecLib (); ///< initialize decoder class 82 82 83 Void xWriteOutput ( TComList<TComPic*>* pcListPic , UInt tId); ///< write YUV to file83 Void xWriteOutput ( TComList<TComPic*>* pcListPic ); ///< write YUV to file 84 84 Void xFlushOutput ( TComList<TComPic*>* pcListPic ); ///< flush all remaining decoded pictures to file 85 85 Bool isNaluWithinTargetDecLayerIdSet ( InputNALUnit* nalu ); ///< check whether given Nalu is within targetDecLayerIdSet 86 86 }; -
Lib/TLibCommon/TComPic.cpp
73 73 } 74 74 75 75 Void TComPic::create( Int iWidth, Int iHeight, UInt uiMaxWidth, UInt uiMaxHeight, UInt uiMaxDepth, Window &conformanceWindow, Window &defaultDisplayWindow, 76 Int *numReorderPics, Bool bIsVirtual)76 Int numReorderPics, Bool bIsVirtual) 77 77 78 78 { 79 79 m_apcPicSym = new TComPicSym; m_apcPicSym ->create( iWidth, iHeight, uiMaxWidth, uiMaxHeight, uiMaxDepth ); … … 96 96 /* store display window parameters with picture */ 97 97 m_defaultDisplayWindow = defaultDisplayWindow; 98 98 99 /* store number of reorder picswith picture */100 m emcpy(m_numReorderPics, numReorderPics, MAX_TLAYER*sizeof(Int));99 /* store maximum number of reorder pics for highest temporal ID with picture */ 100 m_numReorderPics = numReorderPics; 101 101 102 102 return; 103 103 } -
Lib/TLibCommon/TComPic.h
77 77 TComPicYuv* m_pNDBFilterYuvTmp; //!< temporary picture buffer when non-cross slice/tile boundary in-loop filtering is enabled 78 78 Bool m_bCheckLTMSB; 79 79 80 Int m_numReorderPics [MAX_TLAYER];80 Int m_numReorderPics; // maximum number of reorder pictures for highest temporal ID 81 81 Window m_conformanceWindow; 82 82 Window m_defaultDisplayWindow; 83 83 … … 90 90 virtual ~TComPic(); 91 91 92 92 Void create( Int iWidth, Int iHeight, UInt uiMaxWidth, UInt uiMaxHeight, UInt uiMaxDepth, Window &conformanceWindow, Window &defaultDisplayWindow, 93 Int *numReorderPics, Bool bIsVirtual = false );93 Int numReorderPics, Bool bIsVirtual = false ); 94 94 95 95 virtual Void destroy(); 96 96 … … 137 137 Void setOutputMark (Bool b) { m_bNeededForOutput = b; } 138 138 Bool getOutputMark () { return m_bNeededForOutput; } 139 139 140 Void setNumReorderPics(Int i , UInt tlayer) { m_numReorderPics[tlayer]= i; }141 Int getNumReorderPics( UInt tlayer) { return m_numReorderPics[tlayer]; }140 Void setNumReorderPics(Int i) { m_numReorderPics = i; } 141 Int getNumReorderPics() { return m_numReorderPics; } 142 142 143 143 Void compressMotion(); 144 144 UInt getCurrSliceIdx() { return m_uiCurrSliceIdx; } -
Lib/TLibDecoder/TDecTop.cpp
130 130 rpcPic = new TComPic(); 131 131 132 132 rpcPic->create ( pcSlice->getSPS()->getPicWidthInLumaSamples(), pcSlice->getSPS()->getPicHeightInLumaSamples(), g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth, 133 conformanceWindow, defaultDisplayWindow, numReorderPics, true);133 conformanceWindow, defaultDisplayWindow, pcSlice->getSPS()->getNumReorderPics(pcSlice->getSPS()->getMaxTLayers()-1), true); 134 134 rpcPic->getPicSym()->allocSaoParam(&m_cSAO); 135 135 m_cListPic.pushBack( rpcPic ); 136 136 … … 168 168 } 169 169 rpcPic->destroy(); 170 170 rpcPic->create ( pcSlice->getSPS()->getPicWidthInLumaSamples(), pcSlice->getSPS()->getPicHeightInLumaSamples(), g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth, 171 conformanceWindow, defaultDisplayWindow, numReorderPics, true);171 conformanceWindow, defaultDisplayWindow, pcSlice->getSPS()->getNumReorderPics(pcSlice->getSPS()->getMaxTLayers()-1), true); 172 172 rpcPic->getPicSym()->allocSaoParam(&m_cSAO); 173 173 } 174 174 -
Lib/TLibEncoder/TEncPic.cpp
122 122 * \param uiMaxHeight Maximum CU height 123 123 * \param uiMaxDepth Maximum CU depth 124 124 * \param uiMaxAQDepth Maximum depth of unit block for assigning QP adaptive to local image characteristics 125 * \param conformanceWindow Conformance window parameters 126 * \param defaultDisplayWindow Display window parameters 127 * \param numReorderPics Maximum number of reorder pictures for highest temporal ID 125 128 * \param bIsVirtual 126 129 * \return Void 127 130 */ 128 131 Void TEncPic::create( Int iWidth, Int iHeight, UInt uiMaxWidth, UInt uiMaxHeight, UInt uiMaxDepth, UInt uiMaxAQDepth, 129 Window &conformanceWindow, Window &defaultDisplayWindow, Int *numReorderPics, Bool bIsVirtual )132 Window &conformanceWindow, Window &defaultDisplayWindow, Int numReorderPics, Bool bIsVirtual ) 130 133 { 131 134 TComPic::create( iWidth, iHeight, uiMaxWidth, uiMaxHeight, uiMaxDepth, 132 135 conformanceWindow, defaultDisplayWindow, numReorderPics, bIsVirtual ); -
Lib/TLibEncoder/TEncPic.h
103 103 virtual ~TEncPic(); 104 104 105 105 Void create( Int iWidth, Int iHeight, UInt uiMaxWidth, UInt uiMaxHeight, UInt uiMaxDepth, UInt uiMaxAQDepth, 106 Window &conformanceWindow, Window &defaultDisplayWindow, Int *numReorderPics, Bool bIsVirtual = false );106 Window &conformanceWindow, Window &defaultDisplayWindow, Int numReorderPics, Bool bIsVirtual = false ); 107 107 virtual Void destroy(); 108 108 109 109 TEncPicQPAdaptationLayer* getAQLayer( UInt uiDepth ) { return &m_acAQLayer[uiDepth]; } -
Lib/TLibEncoder/TEncTop.cpp
419 419 { 420 420 TEncPic* pcEPic = new TEncPic; 421 421 pcEPic->create( m_iSourceWidth, m_iSourceHeight, g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth, m_cPPS.getMaxCuDQPDepth()+1 , 422 m_conformanceWindow, m_defaultDisplayWindow, m_numReorderPics );422 m_conformanceWindow, m_defaultDisplayWindow, m_numReorderPics[m_maxTempLayer-1]); 423 423 rpcPic = pcEPic; 424 424 } 425 425 else … … 427 427 rpcPic = new TComPic; 428 428 429 429 rpcPic->create( m_iSourceWidth, m_iSourceHeight, g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth, 430 m_conformanceWindow, m_defaultDisplayWindow, m_numReorderPics );430 m_conformanceWindow, m_defaultDisplayWindow, m_numReorderPics[m_maxTempLayer-1]); 431 431 } 432 432 if (getUseSAO()) 433 433 {