Changeset 389 in SHVCSoftware for branches/SHM-3.1-dev/source/Lib/TLibDecoder
- Timestamp:
- 10 Sep 2013, 17:27:55 (12 years ago)
- Location:
- branches/SHM-3.1-dev/source/Lib/TLibDecoder
- Files:
-
- 6 edited
-
TDecCAVLC.cpp (modified) (6 diffs)
-
TDecCAVLC.h (modified) (1 diff)
-
TDecCu.cpp (modified) (7 diffs)
-
TDecSbac.cpp (modified) (1 diff)
-
TDecTop.cpp (modified) (13 diffs)
-
TDecTop.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/SHM-3.1-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp
r386 r389 542 542 READ_UVLC( uiCode, "sps_seq_parameter_set_id" ); pcSPS->setSPSId( uiCode ); 543 543 assert(uiCode <= 15); 544 545 READ_UVLC( uiCode, "chroma_format_idc" ); pcSPS->setChromaFormatIdc( uiCode ); 546 assert(uiCode <= 3); 547 // in the first version we only support chroma_format_idc equal to 1 (4:2:0), so separate_colour_plane_flag cannot appear in the bitstream 548 assert (uiCode == 1); 549 if( uiCode == 3 ) 550 { 551 READ_FLAG( uiCode, "separate_colour_plane_flag"); assert(uiCode == 0); 552 } 553 554 READ_UVLC ( uiCode, "pic_width_in_luma_samples" ); pcSPS->setPicWidthInLumaSamples ( uiCode ); 555 READ_UVLC ( uiCode, "pic_height_in_luma_samples" ); pcSPS->setPicHeightInLumaSamples( uiCode ); 544 545 #if REPN_FORMAT_IN_VPS 546 if( pcSPS->getLayerId() > 0 ) 547 { 548 READ_FLAG( uiCode, "update_rep_format_flag" ); 549 pcSPS->setUpdateRepFormatFlag( uiCode ? true : false ); 550 } 551 else 552 { 553 pcSPS->setUpdateRepFormatFlag( true ); 554 } 555 if( pcSPS->getLayerId() == 0 || pcSPS->getUpdateRepFormatFlag() ) 556 { 557 #endif 558 READ_UVLC( uiCode, "chroma_format_idc" ); pcSPS->setChromaFormatIdc( uiCode ); 559 assert(uiCode <= 3); 560 // in the first version we only support chroma_format_idc equal to 1 (4:2:0), so separate_colour_plane_flag cannot appear in the bitstream 561 assert (uiCode == 1); 562 if( uiCode == 3 ) 563 { 564 READ_FLAG( uiCode, "separate_colour_plane_flag"); assert(uiCode == 0); 565 } 566 567 READ_UVLC ( uiCode, "pic_width_in_luma_samples" ); pcSPS->setPicWidthInLumaSamples ( uiCode ); 568 READ_UVLC ( uiCode, "pic_height_in_luma_samples" ); pcSPS->setPicHeightInLumaSamples( uiCode ); 569 #if REPN_FORMAT_IN_VPS 570 } 571 #endif 556 572 READ_FLAG( uiCode, "conformance_window_flag"); 557 573 if (uiCode != 0) 558 574 { 559 575 Window &conf = pcSPS->getConformanceWindow(); 576 #if REPN_FORMAT_IN_VPS 577 READ_UVLC( uiCode, "conf_win_left_offset" ); conf.setWindowLeftOffset ( uiCode ); 578 READ_UVLC( uiCode, "conf_win_right_offset" ); conf.setWindowRightOffset ( uiCode ); 579 READ_UVLC( uiCode, "conf_win_top_offset" ); conf.setWindowTopOffset ( uiCode ); 580 READ_UVLC( uiCode, "conf_win_bottom_offset" ); conf.setWindowBottomOffset( uiCode ); 581 #else 560 582 READ_UVLC( uiCode, "conf_win_left_offset" ); conf.setWindowLeftOffset ( uiCode * TComSPS::getWinUnitX( pcSPS->getChromaFormatIdc() ) ); 561 583 READ_UVLC( uiCode, "conf_win_right_offset" ); conf.setWindowRightOffset ( uiCode * TComSPS::getWinUnitX( pcSPS->getChromaFormatIdc() ) ); 562 584 READ_UVLC( uiCode, "conf_win_top_offset" ); conf.setWindowTopOffset ( uiCode * TComSPS::getWinUnitY( pcSPS->getChromaFormatIdc() ) ); 563 585 READ_UVLC( uiCode, "conf_win_bottom_offset" ); conf.setWindowBottomOffset( uiCode * TComSPS::getWinUnitY( pcSPS->getChromaFormatIdc() ) ); 564 } 565 566 READ_UVLC( uiCode, "bit_depth_luma_minus8" ); 567 assert(uiCode <= 6); 568 pcSPS->setBitDepthY( uiCode + 8 ); 569 pcSPS->setQpBDOffsetY( (Int) (6*uiCode) ); 570 571 READ_UVLC( uiCode, "bit_depth_chroma_minus8" ); 572 assert(uiCode <= 6); 573 pcSPS->setBitDepthC( uiCode + 8 ); 574 pcSPS->setQpBDOffsetC( (Int) (6*uiCode) ); 575 586 #endif 587 } 588 #if REPN_FORMAT_IN_VPS 589 if( pcSPS->getLayerId() == 0 || pcSPS->getUpdateRepFormatFlag() ) 590 { 591 #endif 592 READ_UVLC( uiCode, "bit_depth_luma_minus8" ); 593 assert(uiCode <= 6); 594 pcSPS->setBitDepthY( uiCode + 8 ); 595 pcSPS->setQpBDOffsetY( (Int) (6*uiCode) ); 596 597 READ_UVLC( uiCode, "bit_depth_chroma_minus8" ); 598 assert(uiCode <= 6); 599 pcSPS->setBitDepthC( uiCode + 8 ); 600 pcSPS->setQpBDOffsetC( (Int) (6*uiCode) ); 601 #if REPN_FORMAT_IN_VPS 602 } 603 #endif 576 604 READ_UVLC( uiCode, "log2_max_pic_order_cnt_lsb_minus4" ); pcSPS->setBitsForPOC( 4 + uiCode ); 577 605 assert(uiCode <= 12); … … 1107 1135 #endif 1108 1136 #endif 1137 #if REPN_FORMAT_IN_VPS 1138 READ_FLAG( uiCode, "rep_format_idx_present_flag"); 1139 vps->setRepFormatIdxPresentFlag( uiCode ? true : false ); 1140 1141 if( vps->getRepFormatIdxPresentFlag() ) 1142 { 1143 READ_CODE( 4, uiCode, "vps_num_rep_formats_minus1" ); 1144 vps->setVpsNumRepFormats( uiCode + 1 ); 1145 } 1146 else 1147 { 1148 // default assignment 1149 assert (vps->getMaxLayers() <= 16); // If max_layers_is more than 15, num_rep_formats has to be signaled 1150 vps->setVpsNumRepFormats( vps->getMaxLayers() ); 1151 } 1152 for(Int i = 0; i < vps->getVpsNumRepFormats(); i++) 1153 { 1154 // Read rep_format_structures 1155 parseRepFormat( vps->getVpsRepFormat(i) ); 1156 } 1157 1158 // Default assignment for layer 0 1159 vps->setVpsRepFormatIdx( 0, 0 ); 1160 if( vps->getRepFormatIdxPresentFlag() ) 1161 { 1162 for(Int i = 1; i < vps->getMaxLayers(); i++) 1163 { 1164 if( vps->getVpsNumRepFormats() > 1 ) 1165 { 1166 READ_CODE( 4, uiCode, "vps_rep_format_idx[i]" ); 1167 vps->setVpsRepFormatIdx( i, uiCode ); 1168 } 1169 else 1170 { 1171 // default assignment - only one rep_format() structure 1172 vps->setVpsRepFormatIdx( i, 0 ); 1173 } 1174 } 1175 } 1176 else 1177 { 1178 // default assignment - each layer assigned each rep_format() structure in the order signaled 1179 for(Int i = 1; i < vps->getMaxLayers(); i++) 1180 { 1181 vps->setVpsRepFormatIdx( i, i ); 1182 } 1183 } 1184 #endif 1109 1185 #if JCTVC_M0458_INTERLAYER_RPS_SIG 1110 READ_FLAG(uiCode, "max_one_active_ref_layer_flag" );1111 vps->setMaxOneActiveRefLayerFlag(uiCode);1186 READ_FLAG(uiCode, "max_one_active_ref_layer_flag" ); 1187 vps->setMaxOneActiveRefLayerFlag(uiCode); 1112 1188 #endif 1113 1189 … … 1163 1239 } 1164 1240 #endif 1165 1241 #if REPN_FORMAT_IN_VPS 1242 Void TDecCavlc::parseRepFormat ( RepFormat *repFormat ) 1243 { 1244 UInt uiCode; 1245 READ_CODE( 2, uiCode, "chroma_format_idc" ); repFormat->setChromaFormatVpsIdc( uiCode ); 1246 1247 if( repFormat->getChromaFormatVpsIdc() == 3 ) 1248 { 1249 READ_FLAG( uiCode, "separate_colour_plane_flag"); repFormat->setSeparateColourPlaneVpsFlag(uiCode ? true : false); 1250 } 1251 1252 READ_CODE ( 16, uiCode, "pic_width_in_luma_samples" ); repFormat->setPicWidthVpsInLumaSamples ( uiCode ); 1253 READ_CODE ( 16, uiCode, "pic_height_in_luma_samples" ); repFormat->setPicHeightVpsInLumaSamples( uiCode ); 1254 1255 READ_CODE( 4, uiCode, "bit_depth_luma_minus8" ); repFormat->setBitDepthVpsLuma ( uiCode + 8 ); 1256 READ_CODE( 4, uiCode, "bit_depth_chroma_minus8" ); repFormat->setBitDepthVpsChroma( uiCode + 8 ); 1257 1258 } 1259 #endif 1166 1260 #if VPS_VUI 1167 1261 Void TDecCavlc::parseVPSVUI(TComVPS *vps) … … 1285 1379 rpcSlice->setDependentSliceSegmentFlag(false); 1286 1380 } 1381 #if REPN_FORMAT_IN_VPS 1382 Int numCTUs = ((rpcSlice->getPicWidthInLumaSamples()+sps->getMaxCUWidth()-1)/sps->getMaxCUWidth())*((rpcSlice->getPicHeightInLumaSamples()+sps->getMaxCUHeight()-1)/sps->getMaxCUHeight()); 1383 #else 1287 1384 Int numCTUs = ((sps->getPicWidthInLumaSamples()+sps->getMaxCUWidth()-1)/sps->getMaxCUWidth())*((sps->getPicHeightInLumaSamples()+sps->getMaxCUHeight()-1)/sps->getMaxCUHeight()); 1385 #endif 1288 1386 Int maxParts = (1<<(sps->getMaxCUDepth()<<1)); 1289 1387 UInt sliceSegmentAddress = 0; … … 1801 1899 rpcSlice->setSliceQp (26 + pps->getPicInitQPMinus26() + iCode); 1802 1900 1901 #if REPN_FORMAT_IN_VPS 1902 assert( rpcSlice->getSliceQp() >= -rpcSlice->getQpBDOffsetY() ); 1903 #else 1803 1904 assert( rpcSlice->getSliceQp() >= -sps->getQpBDOffsetY() ); 1905 #endif 1804 1906 assert( rpcSlice->getSliceQp() <= 51 ); 1805 1907 … … 2132 2234 xReadSvlc( iDQp ); 2133 2235 2236 #if REPN_FORMAT_IN_VPS 2237 Int qpBdOffsetY = pcCU->getSlice()->getQpBDOffsetY(); 2238 #else 2134 2239 Int qpBdOffsetY = pcCU->getSlice()->getSPS()->getQpBDOffsetY(); 2240 #endif 2135 2241 qp = (((Int) pcCU->getRefQP( uiAbsPartIdx ) + iDQp + 52 + 2*qpBdOffsetY )%(52+ qpBdOffsetY)) - qpBdOffsetY; 2136 2242 -
branches/SHM-3.1-dev/source/Lib/TLibDecoder/TDecCAVLC.h
r382 r389 78 78 Void parseVPSVUI ( TComVPS* pcVPS ); 79 79 #endif 80 #if REPN_FORMAT_IN_VPS 81 Void parseRepFormat ( RepFormat *repFormat ); 82 #endif 80 83 #if SPS_SUB_LAYER_INFO 81 84 Void parseSPS ( TComSPS* pcSPS, ParameterSetManagerDecoder *parameterSetManager ); -
branches/SHM-3.1-dev/source/Lib/TLibDecoder/TDecCu.cpp
r345 r389 177 177 TComSlice * pcSlice = pcPic->getSlice(pcPic->getCurrSliceIdx()); 178 178 UInt uiCurNumParts = pcPic->getNumPartInCU() >> (uiDepth<<1); 179 #if REPN_FORMAT_IN_VPS 180 UInt uiWidth = pcSlice->getPicWidthInLumaSamples(); 181 UInt uiHeight = pcSlice->getPicHeightInLumaSamples(); 182 #else 179 183 UInt uiWidth = pcSlice->getSPS()->getPicWidthInLumaSamples(); 180 184 UInt uiHeight = pcSlice->getSPS()->getPicHeightInLumaSamples(); 185 #endif 181 186 UInt uiGranularityWidth = g_uiMaxCUWidth; 182 187 UInt uiPosX = pcCU->getCUPelX() + g_auiRasterToPelX[ g_auiZscanToRaster[uiAbsPartIdx] ]; … … 230 235 TComSlice * pcSlice = pcCU->getPic()->getSlice(pcCU->getPic()->getCurrSliceIdx()); 231 236 Bool bStartInCU = pcCU->getSCUAddr()+uiAbsPartIdx+uiCurNumParts>pcSlice->getSliceSegmentCurStartCUAddr()&&pcCU->getSCUAddr()+uiAbsPartIdx<pcSlice->getSliceSegmentCurStartCUAddr(); 237 #if REPN_FORMAT_IN_VPS 238 if((!bStartInCU) && ( uiRPelX < pcSlice->getPicWidthInLumaSamples() ) && ( uiBPelY < pcSlice->getPicHeightInLumaSamples() ) ) 239 #else 232 240 if((!bStartInCU) && ( uiRPelX < pcSlice->getSPS()->getPicWidthInLumaSamples() ) && ( uiBPelY < pcSlice->getSPS()->getPicHeightInLumaSamples() ) ) 241 #endif 233 242 { 234 243 m_pcEntropyDecoder->decodeSplitFlag( pcCU, uiAbsPartIdx, uiDepth ); … … 256 265 if ( bSubInSlice ) 257 266 { 267 #if REPN_FORMAT_IN_VPS 268 if ( !ruiIsLast && ( uiLPelX < pcCU->getSlice()->getPicWidthInLumaSamples() ) && ( uiTPelY < pcCU->getSlice()->getPicHeightInLumaSamples() ) ) 269 #else 258 270 if ( !ruiIsLast && ( uiLPelX < pcCU->getSlice()->getSPS()->getPicWidthInLumaSamples() ) && ( uiTPelY < pcCU->getSlice()->getSPS()->getPicHeightInLumaSamples() ) ) 271 #endif 259 272 { 260 273 xDecodeCU( pcCU, uiIdx, uiDepth+1, ruiIsLast ); … … 385 398 TComSlice * pcSlice = pcCU->getPic()->getSlice(pcCU->getPic()->getCurrSliceIdx()); 386 399 Bool bStartInCU = pcCU->getSCUAddr()+uiAbsPartIdx+uiCurNumParts>pcSlice->getSliceSegmentCurStartCUAddr()&&pcCU->getSCUAddr()+uiAbsPartIdx<pcSlice->getSliceSegmentCurStartCUAddr(); 400 #if REPN_FORMAT_IN_VPS 401 if(bStartInCU||( uiRPelX >= pcSlice->getPicWidthInLumaSamples() ) || ( uiBPelY >= pcSlice->getPicHeightInLumaSamples() ) ) 402 #else 387 403 if(bStartInCU||( uiRPelX >= pcSlice->getSPS()->getPicWidthInLumaSamples() ) || ( uiBPelY >= pcSlice->getSPS()->getPicHeightInLumaSamples() ) ) 404 #endif 388 405 { 389 406 bBoundary = true; … … 401 418 402 419 Bool binSlice = (pcCU->getSCUAddr()+uiIdx+uiQNumParts>pcSlice->getSliceSegmentCurStartCUAddr())&&(pcCU->getSCUAddr()+uiIdx<pcSlice->getSliceSegmentCurEndCUAddr()); 420 #if REPN_FORMAT_IN_VPS 421 if(binSlice&&( uiLPelX < pcSlice->getPicWidthInLumaSamples() ) && ( uiTPelY < pcSlice->getPicHeightInLumaSamples() ) ) 422 #else 403 423 if(binSlice&&( uiLPelX < pcSlice->getSPS()->getPicWidthInLumaSamples() ) && ( uiTPelY < pcSlice->getSPS()->getPicHeightInLumaSamples() ) ) 424 #endif 404 425 { 405 426 xDecompressCU(pcCU, uiIdx, uiNextDepth ); … … 494 515 495 516 //===== inverse transform ===== 517 #if REPN_FORMAT_IN_VPS 518 m_pcTrQuant->setQPforQuant ( pcCU->getQP(0), TEXT_LUMA, pcCU->getSlice()->getQpBDOffsetY(), 0 ); 519 #else 496 520 m_pcTrQuant->setQPforQuant ( pcCU->getQP(0), TEXT_LUMA, pcCU->getSlice()->getSPS()->getQpBDOffsetY(), 0 ); 521 #endif 497 522 498 523 Int scalingListType = (pcCU->isIntra(uiAbsPartIdx) ? 0 : 3) + g_eTTable[(Int)TEXT_LUMA]; … … 733 758 pResi = m_ppcYuvResi[uiDepth]->getLumaAddr(); 734 759 760 #if REPN_FORMAT_IN_VPS 761 m_pcTrQuant->setQPforQuant( pcCU->getQP( uiAbsPartIdx ), TEXT_LUMA, pcCU->getSlice()->getQpBDOffsetY(), 0 ); 762 #else 735 763 m_pcTrQuant->setQPforQuant( pcCU->getQP( uiAbsPartIdx ), TEXT_LUMA, pcCU->getSlice()->getSPS()->getQpBDOffsetY(), 0 ); 764 #endif 736 765 737 766 m_pcTrQuant->invRecurTransformNxN ( pcCU, 0, TEXT_LUMA, pResi, 0, m_ppcYuvResi[uiDepth]->getStride(), uiWidth, uiHeight, trMode, 0, piCoeff ); -
branches/SHM-3.1-dev/source/Lib/TLibDecoder/TDecSbac.cpp
r345 r389 860 860 { 861 861 UInt uiSign; 862 #if REPN_FORMAT_IN_VPS 863 Int qpBdOffsetY = pcCU->getSlice()->getQpBDOffsetY(); 864 #else 862 865 Int qpBdOffsetY = pcCU->getSlice()->getSPS()->getQpBDOffsetY(); 866 #endif 863 867 m_pcTDecBinIf->decodeBinEP(uiSign); 864 868 iDQp = uiDQp; -
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 } -
branches/SHM-3.1-dev/source/Lib/TLibDecoder/TDecTop.h
r380 r389 211 211 Int getBLHeight() { return m_iBLSourceHeight; } 212 212 #endif 213 #if REPN_FORMAT_IN_VPS 214 Void xInitILRP(TComSlice *slice); 215 #else 213 216 Void xInitILRP(TComSPS *pcSPS); 217 #endif 214 218 Void setILRPic(TComPic *pcPic); 215 219 #endif
Note: See TracChangeset for help on using the changeset viewer.