Changeset 389 in SHVCSoftware for branches/SHM-3.1-dev/source/Lib/TLibDecoder/TDecTop.cpp
- Timestamp:
- 10 Sep 2013, 17:27:55 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/SHM-3.1-dev/source/Lib/TLibDecoder/TDecTop.cpp
r380 r389 139 139 140 140 #if SVC_EXTENSION 141 Void TDecTop::xInitILRP(TComSPS *pcSPS) 142 { 141 #if !REPN_FORMAT_IN_VPS 142 Void TDecTop::xInitILRP(TComSPS *pcSPS 143 #else 144 Void TDecTop::xInitILRP(TComSlice *slice) 145 #endif 146 { 147 #if REPN_FORMAT_IN_VPS 148 TComSPS* pcSPS = slice->getSPS(); 149 Int bitDepthY = slice->getBitDepthY(); 150 Int bitDepthC = slice->getBitDepthC(); 151 Int picWidth = slice->getPicWidthInLumaSamples(); 152 Int picHeight = slice->getPicHeightInLumaSamples(); 153 #endif 143 154 if(m_layerId>0) 144 155 { 156 #if REPN_FORMAT_IN_VPS 157 g_bitDepthY = bitDepthY; 158 g_bitDepthC = bitDepthC; 159 #else 145 160 g_bitDepthY = pcSPS->getBitDepthY(); 146 161 g_bitDepthC = pcSPS->getBitDepthC(); 162 #endif 147 163 g_uiMaxCUWidth = pcSPS->getMaxCUWidth(); 148 164 g_uiMaxCUHeight = pcSPS->getMaxCUHeight(); … … 165 181 166 182 m_cIlpPic[j] = new TComPic; 183 #if REPN_FORMAT_IN_VPS 184 #if SVC_UPSAMPLING 185 m_cIlpPic[j]->create(picWidth, picHeight, g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth, conformanceWindow, defaultDisplayWindow, numReorderPics, pcSPS, true); 186 #else 187 m_cIlpPic[j]->create(picWidth, picHeight, g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth, conformanceWindow, defaultDisplayWindow, numReorderPics, true); 188 #endif 189 #else 167 190 #if SVC_UPSAMPLING 168 191 m_cIlpPic[j]->create(pcSPS->getPicWidthInLumaSamples(), pcSPS->getPicHeightInLumaSamples(), g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth, conformanceWindow, defaultDisplayWindow, numReorderPics, pcSPS, true); 169 192 #else 170 193 m_cIlpPic[j]->create(pcSPS->getPicWidthInLumaSamples(), pcSPS->getPicHeightInLumaSamples(), g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth, conformanceWindow, defaultDisplayWindow, numReorderPics, true); 194 #endif 171 195 #endif 172 196 for (Int i=0; i<m_cIlpPic[j]->getPicSym()->getNumberOfCUsInFrame(); i++) … … 178 202 } 179 203 } 204 205 180 206 181 207 Void TDecTop::setILRPic(TComPic *pcPic) … … 271 297 //TComPic* pcPic = *(pcTDecTopBase->getListPic()->begin()); 272 298 TComPicYuv* pcPicYuvRecBase = (*(pcTDecTopBase->getListPic()->begin()))->getPicYuvRec(); 299 #if REPN_FORMAT_IN_VPS 300 if(pcPicYuvRecBase->getWidth() != pcSlice->getPicWidthInLumaSamples() || pcPicYuvRecBase->getHeight() != pcSlice->getPicHeightInLumaSamples() || !zeroOffsets ) 301 #else 273 302 if(pcPicYuvRecBase->getWidth() != pcSlice->getSPS()->getPicWidthInLumaSamples() || pcPicYuvRecBase->getHeight() != pcSlice->getSPS()->getPicHeightInLumaSamples() || !zeroOffsets ) 303 #endif 274 304 { 275 305 rpcPic->setSpatialEnhLayerFlag( i, true ); … … 288 318 #endif 289 319 320 #if REPN_FORMAT_IN_VPS 321 #if SVC_UPSAMPLING 322 rpcPic->create ( pcSlice->getPicWidthInLumaSamples(), pcSlice->getPicHeightInLumaSamples(), g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth, 323 conformanceWindow, defaultDisplayWindow, numReorderPics, pcSlice->getSPS(), true); 324 #else 325 rpcPic->create ( pcSlice->getPicWidthInLumaSamples(), pcSlice->getPicHeightInLumaSamples(), g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth, 326 conformanceWindow, defaultDisplayWindow, numReorderPics, true); 327 #endif 328 #else 290 329 #if SVC_UPSAMPLING 291 330 rpcPic->create ( pcSlice->getSPS()->getPicWidthInLumaSamples(), pcSlice->getSPS()->getPicHeightInLumaSamples(), g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth, … … 295 334 conformanceWindow, defaultDisplayWindow, numReorderPics, true); 296 335 #endif 336 #endif 337 297 338 rpcPic->getPicSym()->allocSaoParam(&m_cSAO); 298 339 m_cListPic.pushBack( rpcPic ); … … 334 375 rpcPic->destroy(); 335 376 377 #if REPN_FORMAT_IN_VPS 378 #if SVC_UPSAMPLING 379 rpcPic->create ( pcSlice->getPicWidthInLumaSamples(), pcSlice->getPicHeightInLumaSamples(), g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth, 380 conformanceWindow, defaultDisplayWindow, numReorderPics, pcSlice->getSPS(), true); 381 382 #else 383 rpcPic->create ( pcSlice->getPicWidthInLumaSamples(), pcSlice->getPicHeightInLumaSamples(), g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth, 384 conformanceWindow, defaultDisplayWindow, numReorderPics, true); 385 #endif 386 #else 336 387 #if SVC_UPSAMPLING 337 388 rpcPic->create ( pcSlice->getSPS()->getPicWidthInLumaSamples(), pcSlice->getSPS()->getPicHeightInLumaSamples(), g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth, … … 341 392 rpcPic->create ( pcSlice->getSPS()->getPicWidthInLumaSamples(), pcSlice->getSPS()->getPicHeightInLumaSamples(), g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth, 342 393 conformanceWindow, defaultDisplayWindow, numReorderPics, true); 394 #endif 343 395 #endif 344 396 rpcPic->getPicSym()->allocSaoParam(&m_cSAO); … … 548 600 m_apcSlicePilot->setSPS(sps); 549 601 pps->setSPS(sps); 602 #if REPN_FORMAT_IN_VPS 550 603 pps->setNumSubstreams(pps->getEntropyCodingSyncEnabledFlag() ? ((sps->getPicHeightInLumaSamples() + sps->getMaxCUHeight() - 1) / sps->getMaxCUHeight()) * (pps->getNumColumnsMinus1() + 1) : 1); 604 #else 605 pps->setNumSubstreams(pps->getEntropyCodingSyncEnabledFlag() ? ((sps->getPicHeightInLumaSamples() + sps->getMaxCUHeight() - 1) / sps->getMaxCUHeight()) * (pps->getNumColumnsMinus1() + 1) : 1); 606 #endif 551 607 pps->setMinCuDQPSize( sps->getMaxCUWidth() >> ( pps->getMaxCuDQPDepth()) ); 552 608 609 #if REPN_FORMAT_IN_VPS 610 g_bitDepthY = m_apcSlicePilot->getBitDepthY(); 611 g_bitDepthC = m_apcSlicePilot->getBitDepthC(); 612 #else 553 613 g_bitDepthY = sps->getBitDepthY(); 554 614 g_bitDepthC = sps->getBitDepthC(); 615 #endif 555 616 g_uiMaxCUWidth = sps->getMaxCUWidth(); 556 617 g_uiMaxCUHeight = sps->getMaxCUHeight(); … … 569 630 570 631 m_cSAO.destroy(); 632 #if REPN_FORMAT_IN_VPS 633 m_cSAO.create( m_apcSlicePilot->getPicWidthInLumaSamples(), m_apcSlicePilot->getPicHeightInLumaSamples(), sps->getMaxCUWidth(), sps->getMaxCUHeight() ); 634 #else 571 635 m_cSAO.create( sps->getPicWidthInLumaSamples(), sps->getPicHeightInLumaSamples(), sps->getMaxCUWidth(), sps->getMaxCUHeight() ); 636 #endif 572 637 m_cLoopFilter.create( sps->getMaxCUDepth() ); 573 638 } … … 684 749 // actual decoding starts here 685 750 xActivateParameterSets(); 686 751 #if REPN_FORMAT_IN_VPS 752 // Initialize ILRP if needed, only for the current layer 753 // ILRP intialization should go along with activation of parameters sets, 754 // although activation of parameter sets itself need not be done for each and every slice!!! 755 xInitILRP(m_apcSlicePilot); 756 #endif 687 757 if (m_apcSlicePilot->isNextSlice()) 688 758 { … … 954 1024 const Window &scalEL = pcSlice->getSPS()->getScaledRefLayerWindow(refLayerIdc); 955 1025 1026 956 1027 Int widthBL = pcSlice->getBaseColPic(refLayerIdc)->getPicYuvRec()->getWidth(); 957 1028 Int heightBL = pcSlice->getBaseColPic(refLayerIdc)->getPicYuvRec()->getHeight(); … … 1123 1194 #endif 1124 1195 #if SVC_EXTENSION 1196 #if !REPN_FORMAT_IN_VPS // ILRP can only be initialized at activation 1125 1197 if(m_numLayer>0) 1126 1198 { 1127 1199 xInitILRP(sps); 1128 1200 } 1201 #endif 1129 1202 #endif 1130 1203 }
Note: See TracChangeset for help on using the changeset viewer.