- Timestamp:
- 20 Jun 2016, 22:32:09 (9 years ago)
- Location:
- branches/SHM-dev/source/Lib
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/SHM-dev/source/Lib/TLibCommon/TComPic.cpp
r1574 r1578 113 113 #endif 114 114 m_apcPicYuv[PIC_YUV_REC] = new TComPicYuv; m_apcPicYuv[PIC_YUV_REC]->create( iWidth, iHeight, chromaFormatIDC, uiMaxCuWidth, uiMaxCuHeight, uiMaxDepth, true, &conformanceWindow ); 115 #if REDUCED_ENCODER_MEMORY116 }117 #endif118 115 119 116 for( Int i = 0; i < MAX_LAYERS; i++ ) … … 123 120 m_pcFullPelBaseRec[i] = new TComPicYuv; m_pcFullPelBaseRec[i]->create( iWidth, iHeight, chromaFormatIDC, uiMaxCuWidth, uiMaxCuHeight, uiMaxDepth, true, &conformanceWindow ); 124 121 } 125 } 122 } 123 #if REDUCED_ENCODER_MEMORY 124 } 125 #endif 126 126 127 127 // there are no SEI messages associated with this picture initially … … 189 189 const UInt uiMaxDepth = sps.getMaxTotalCUDepth(); 190 190 191 #if SVC_EXTENSION 192 const Window& conformanceWindow = sps.getConformanceWindow(); 193 191 194 if (m_apcPicYuv[PIC_YUV_ORG ]==NULL) 192 195 { 196 m_apcPicYuv[PIC_YUV_ORG ] = new TComPicYuv; m_apcPicYuv[PIC_YUV_ORG ]->create( iWidth, iHeight, chromaFormatIDC, uiMaxCuWidth, uiMaxCuHeight, uiMaxDepth, true, &conformanceWindow ); 197 } 198 if (m_apcPicYuv[PIC_YUV_TRUE_ORG ]==NULL) 199 { 200 m_apcPicYuv[PIC_YUV_TRUE_ORG] = new TComPicYuv; m_apcPicYuv[PIC_YUV_TRUE_ORG]->create( iWidth, iHeight, chromaFormatIDC, uiMaxCuWidth, uiMaxCuHeight, uiMaxDepth, true, &conformanceWindow ); 201 } 202 #else 203 if (m_apcPicYuv[PIC_YUV_ORG ]==NULL) 204 { 193 205 m_apcPicYuv[PIC_YUV_ORG ] = new TComPicYuv; m_apcPicYuv[PIC_YUV_ORG ]->create( iWidth, iHeight, chromaFormatIDC, uiMaxCuWidth, uiMaxCuHeight, uiMaxDepth, true ); 194 206 } … … 197 209 m_apcPicYuv[PIC_YUV_TRUE_ORG] = new TComPicYuv; m_apcPicYuv[PIC_YUV_TRUE_ORG]->create( iWidth, iHeight, chromaFormatIDC, uiMaxCuWidth, uiMaxCuHeight, uiMaxDepth, true ); 198 210 } 211 #endif 199 212 } 200 213 … … 211 224 const UInt uiMaxDepth = sps.getMaxTotalCUDepth(); 212 225 226 #if SVC_EXTENSION 227 const Window& conformanceWindow = sps.getConformanceWindow(); 228 229 m_apcPicYuv[PIC_YUV_REC] = new TComPicYuv; m_apcPicYuv[PIC_YUV_REC]->create( iWidth, iHeight, chromaFormatIDC, uiMaxCuWidth, uiMaxCuHeight, uiMaxDepth, true, &conformanceWindow ); 230 231 for( Int i = 0; i < MAX_LAYERS; i++ ) 232 { 233 if( m_requireResampling[i] ) 234 { 235 m_pcFullPelBaseRec[i] = new TComPicYuv; m_pcFullPelBaseRec[i]->create( iWidth, iHeight, chromaFormatIDC, uiMaxCuWidth, uiMaxCuHeight, uiMaxDepth, true, &conformanceWindow ); 236 } 237 } 238 #else 213 239 m_apcPicYuv[PIC_YUV_REC] = new TComPicYuv; m_apcPicYuv[PIC_YUV_REC]->create( iWidth, iHeight, chromaFormatIDC, uiMaxCuWidth, uiMaxCuHeight, uiMaxDepth, true ); 240 #endif 214 241 } 215 242 … … 464 491 const Int unitNum = max( 1, (Int)((16/widthMinPU)*(16/heightMinPU)) ); 465 492 466 for(UInt cuIdx = 0; cuIdx < getPicSym()->getNumberOfCtusInFrame(); cuIdx++) //each LCU 467 { 468 TComDataCU* pcCUDes = getCtu(cuIdx); 493 for( UInt ctuRsAddr = 0; ctuRsAddr < m_picSym.getNumberOfCtusInFrame(); ctuRsAddr++ ) //each CTU 494 { 495 TComDataCU* pcCUDes = getCtu(ctuRsAddr); 496 497 #if REDUCED_ENCODER_MEMORY 498 TComPicSym::DPBPerCtuData &dpbForCtu = m_picSym.getDPBPerCtuData(ctuRsAddr); 499 #endif 469 500 470 501 for(UInt absPartIdx = 0; absPartIdx < numPartitions; absPartIdx+=unitNum ) //each 16x16 unit … … 498 529 } 499 530 531 #if REDUCED_ENCODER_MEMORY 532 dpbForCtu.m_CUMvField[REF_PIC_LIST_0].setMvField(pcCUDes->getCUMvField(REF_PIC_LIST_0)->getMv(absPartIdx), pcCUDes->getCUMvField(REF_PIC_LIST_0)->getRefIdx(absPartIdx), absPartIdx); 533 dpbForCtu.m_CUMvField[REF_PIC_LIST_1].setMvField(pcCUDes->getCUMvField(REF_PIC_LIST_1)->getMv(absPartIdx), pcCUDes->getCUMvField(REF_PIC_LIST_1)->getRefIdx(absPartIdx), absPartIdx); 534 #endif 535 500 536 for(UInt i = 1; i < unitNum; i++ ) 501 537 { 502 538 pcCUDes->getCUMvField(REF_PIC_LIST_0)->setMvField(pcCUDes->getCUMvField(REF_PIC_LIST_0)->getMv(absPartIdx), pcCUDes->getCUMvField(REF_PIC_LIST_0)->getRefIdx(absPartIdx), absPartIdx + i); 503 539 pcCUDes->getCUMvField(REF_PIC_LIST_1)->setMvField(pcCUDes->getCUMvField(REF_PIC_LIST_1)->getMv(absPartIdx), pcCUDes->getCUMvField(REF_PIC_LIST_1)->getRefIdx(absPartIdx), absPartIdx + i); 540 541 #if REDUCED_ENCODER_MEMORY 542 dpbForCtu.m_CUMvField[REF_PIC_LIST_0].setMvField(pcCUDes->getCUMvField(REF_PIC_LIST_0)->getMv(absPartIdx), pcCUDes->getCUMvField(REF_PIC_LIST_0)->getRefIdx(absPartIdx), absPartIdx + i); 543 dpbForCtu.m_CUMvField[REF_PIC_LIST_1].setMvField(pcCUDes->getCUMvField(REF_PIC_LIST_1)->getMv(absPartIdx), pcCUDes->getCUMvField(REF_PIC_LIST_1)->getRefIdx(absPartIdx), absPartIdx + i); 544 #endif 504 545 pcCUDes->setPredictionMode(absPartIdx+i, pcCUDes->getPredictionMode(absPartIdx)); 505 546 } 506 547 } 507 memset( pcCUDes->getPartitionSize(), SIZE_2Nx2N, sizeof(SChar)*numPartitions ); 548 memset( pcCUDes->getPartitionSize(), SIZE_2Nx2N, sizeof(*pcCUDes->getPartitionSize())*numPartitions ); 549 550 #if REDUCED_ENCODER_MEMORY 551 memcpy( dpbForCtu.m_pePredMode, pcCUDes->getPredictionMode(), sizeof(*pcCUDes->getPredictionMode()) * numPartitions ); 552 memcpy( dpbForCtu.m_pePartSize, pcCUDes->getPartitionSize(), sizeof(*pcCUDes->getPartitionSize()) * numPartitions ); 553 dpbForCtu.m_pSlice = pcCUDes->getSlice(); 554 #endif 508 555 } 509 556 } … … 513 560 const TComSPS *sps = getSlice(0)->getSPS(); 514 561 const UInt uiMaxDepth = sps->getMaxTotalCUDepth(); 515 const UInt uiNumPartitions = 1<<(uiMaxDepth<<1);516 517 for( UInt cuIdx = 0; cuIdx < getPicSym()->getNumberOfCtusInFrame(); cuIdx++) //each LCU518 { 519 TComDataCU* pcCUDes = getCtu(c uIdx);562 const UInt numPartitions = 1<<(uiMaxDepth<<1); 563 564 for( UInt ctuRsAddr = 0; ctuRsAddr < m_picSym.getNumberOfCtusInFrame(); ctuRsAddr++ ) //each CTU 565 { 566 TComDataCU* pcCUDes = getCtu(ctuRsAddr); 520 567 TComMvField zeroMvField; 521 for(UInt list = 0; list < 2; list++) //each reference list 522 { 523 for(UInt i = 0; i < uiNumPartitions; i++ ) 524 { 525 pcCUDes->getCUMvField(REF_PIC_LIST_0)->setMvField(zeroMvField, i); 526 pcCUDes->getCUMvField(REF_PIC_LIST_1)->setMvField(zeroMvField, i); 527 pcCUDes->setPredictionMode(i, MODE_INTRA); 528 pcCUDes->setPartitionSize(i, SIZE_2Nx2N); 529 } 530 } 531 } 532 return; 568 569 #if REDUCED_ENCODER_MEMORY 570 TComPicSym::DPBPerCtuData &dpbForCtu = m_picSym.getDPBPerCtuData(ctuRsAddr); 571 #endif 572 573 for( UInt i = 0; i < numPartitions; i++ ) 574 { 575 pcCUDes->getCUMvField(REF_PIC_LIST_0)->setMvField(zeroMvField, i); 576 pcCUDes->getCUMvField(REF_PIC_LIST_1)->setMvField(zeroMvField, i); 577 pcCUDes->setPredictionMode(i, MODE_INTRA); 578 pcCUDes->setPartitionSize(i, SIZE_2Nx2N); 579 580 #if REDUCED_ENCODER_MEMORY 581 dpbForCtu.m_CUMvField[REF_PIC_LIST_0].setMvField(zeroMvField, i); 582 dpbForCtu.m_CUMvField[REF_PIC_LIST_1].setMvField(zeroMvField, i); 583 #endif 584 } 585 586 #if REDUCED_ENCODER_MEMORY 587 memcpy( dpbForCtu.m_pePredMode, pcCUDes->getPredictionMode(), sizeof(*pcCUDes->getPredictionMode()) * numPartitions ); 588 memcpy( dpbForCtu.m_pePartSize, pcCUDes->getPartitionSize(), sizeof(*pcCUDes->getPartitionSize()) * numPartitions ); 589 dpbForCtu.m_pSlice = pcCUDes->getSlice(); 590 #endif 591 } 533 592 } 534 593 -
branches/SHM-dev/source/Lib/TLibDecoder/TDecTop.cpp
r1575 r1578 360 360 361 361 #if SVC_EXTENSION 362 if( this->getLayerDec(pcPic->getLayerId())->m_isOutputLayerFlag == false )362 if( m_ppcTDecTop[pcPic->getLayerId()]->m_isOutputLayerFlag == false ) 363 363 { 364 364 pcPic->setOutputMark( false ); … … 538 538 539 539 #if REDUCED_ENCODER_MEMORY 540 pBLPic->create( pBLPic->getPicSym()->getSPS(), *pps, true, true, refLayerId);540 pBLPic->create( pBLPic->getPicSym()->getSPS(), *pps, false, true, refLayerId); 541 541 #else 542 542 pBLPic->create( pBLPic->getPicSym()->getSPS(), *pps, true, refLayerId); … … 2298 2298 2299 2299 #if REDUCED_ENCODER_MEMORY 2300 m_cIlpPic[j]->create(*sps, *pps, true, true, m_layerId);2300 m_cIlpPic[j]->create(*sps, *pps, false, true, m_layerId); 2301 2301 #else 2302 2302 m_cIlpPic[j]->create(*sps, *pps, true, m_layerId); -
branches/SHM-dev/source/Lib/TLibEncoder/TEncTop.cpp
r1575 r1578 757 757 } 758 758 #if REDUCED_ENCODER_MEMORY 759 pcEPic->create( m_cVPS, m_cSPS, m_cPPS, m_cPPS.getMaxCuDQPDepth()+1, m_layerId); 759 760 #else 760 pcEPic->create( m_cVPS, m_cSPS, m_cPPS, m_cPPS.getMaxCuDQPDepth()+1, m_layerId);761 pcEPic->create( m_cVPS, m_cSPS, m_cPPS, m_cPPS.getMaxCuDQPDepth()+1, false, m_layerId); 761 762 #endif 762 763 #else //SVC_EXTENSION … … 1757 1758 m_cIlpPic[j] = new TComPic; 1758 1759 #if REDUCED_ENCODER_MEMORY 1759 m_cIlpPic[j]->create(m_cSPS, m_cPPS, true, true, m_layerId);1760 m_cIlpPic[j]->create(m_cSPS, m_cPPS, false, true, m_layerId); 1760 1761 #else 1761 1762 m_cIlpPic[j]->create(m_cSPS, m_cPPS, true, m_layerId);
Note: See TracChangeset for help on using the changeset viewer.