Changeset 1534 in SHVCSoftware for branches/SHM-dev/source/Lib/TLibCommon
- Timestamp:
- 22 Mar 2016, 19:58:32 (9 years ago)
- Location:
- branches/SHM-dev/source/Lib/TLibCommon
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/SHM-dev/source/Lib/TLibCommon/TComDataCU.cpp
r1502 r1534 3317 3317 3318 3318 #if REF_IDX_ME_ZEROMV 3319 Bool TComDataCU:: xCheckZeroMVILRMerge(UChar uhInterDir, TComMvField& cMvFieldL0, TComMvField& cMvFieldL1)3319 Bool TComDataCU::checkZeroMVILRMerge(UChar uhInterDir, TComMvField& cMvFieldL0, TComMvField& cMvFieldL1) 3320 3320 { 3321 3321 Bool checkZeroMVILR = true; 3322 3322 3323 if(uhInterDir&0x1) //list0 3324 { 3325 Int refIdxL0 = cMvFieldL0.getRefIdx(); 3326 TComPic* refPic = m_pcSlice->getRefPic(REF_PIC_LIST_0, refIdxL0); 3327 3328 if(refPic->isILR(m_pcPic->getLayerId())) 3329 { 3330 checkZeroMVILR &= (cMvFieldL0.getHor() == 0 && cMvFieldL0.getVer() == 0); 3331 3332 // It is a requirement of bitstream conformance that when the reference picture represented by the variable refIdxLX is an inter-layer reference picture, 3333 // VpsInterLayerSamplePredictionEnabled[ LayerIdxInVps[ currLayerId ] ][ LayerIdxInVps[ rLId ] ] shall be equal to 1, where rLId is set equal to nuh_layer_id of the inter-layer picture 3334 checkZeroMVILR &= m_pcSlice->getVPS()->isSamplePredictionType( m_pcPic->getLayerIdx(), refPic->getLayerIdx() ); 3335 } 3336 } 3337 if(uhInterDir&0x2) //list1 3338 { 3339 Int refIdxL1 = cMvFieldL1.getRefIdx(); 3340 TComPic* refPic = m_pcSlice->getRefPic(REF_PIC_LIST_1, refIdxL1); 3341 3342 if(refPic->isILR(m_pcPic->getLayerId())) 3343 { 3344 checkZeroMVILR &= (cMvFieldL1.getHor() == 0 && cMvFieldL1.getVer() == 0); 3345 3346 // It is a requirement of bitstream conformance that when the reference picture represented by the variable refIdxLX is an inter-layer reference picture, 3347 // VpsInterLayerSamplePredictionEnabled[ LayerIdxInVps[ currLayerId ] ][ LayerIdxInVps[ rLId ] ] shall be equal to 1, where rLId is set equal to nuh_layer_id of the inter-layer picture 3348 checkZeroMVILR &= m_pcSlice->getVPS()->isSamplePredictionType( m_pcPic->getLayerIdx(), refPic->getLayerIdx() ); 3323 if( m_pcSlice->getVPS()->getScalabilityMask( SCALABILITY_ID ) ) //scalable layer 3324 { 3325 if( uhInterDir & 0x1 ) //list0 3326 { 3327 Int refIdxL0 = cMvFieldL0.getRefIdx(); 3328 TComPic* refPic = m_pcSlice->getRefPic(REF_PIC_LIST_0, refIdxL0); 3329 3330 if(refPic->isILR(m_pcPic->getLayerId())) 3331 { 3332 checkZeroMVILR &= (cMvFieldL0.getHor() == 0 && cMvFieldL0.getVer() == 0); 3333 3334 // It is a requirement of bitstream conformance that when the reference picture represented by the variable refIdxLX is an inter-layer reference picture, 3335 // VpsInterLayerSamplePredictionEnabled[ LayerIdxInVps[ currLayerId ] ][ LayerIdxInVps[ rLId ] ] shall be equal to 1, where rLId is set equal to nuh_layer_id of the inter-layer picture 3336 checkZeroMVILR &= m_pcSlice->getVPS()->isSamplePredictionType( m_pcPic->getLayerIdx(), refPic->getLayerIdx() ); 3337 } 3338 } 3339 3340 if( uhInterDir & 0x2 ) //list1 3341 { 3342 Int refIdxL1 = cMvFieldL1.getRefIdx(); 3343 TComPic* refPic = m_pcSlice->getRefPic(REF_PIC_LIST_1, refIdxL1); 3344 3345 if(refPic->isILR(m_pcPic->getLayerId())) 3346 { 3347 checkZeroMVILR &= (cMvFieldL1.getHor() == 0 && cMvFieldL1.getVer() == 0); 3348 3349 // It is a requirement of bitstream conformance that when the reference picture represented by the variable refIdxLX is an inter-layer reference picture, 3350 // VpsInterLayerSamplePredictionEnabled[ LayerIdxInVps[ currLayerId ] ][ LayerIdxInVps[ rLId ] ] shall be equal to 1, where rLId is set equal to nuh_layer_id of the inter-layer picture 3351 checkZeroMVILR &= m_pcSlice->getVPS()->isSamplePredictionType( m_pcPic->getLayerIdx(), refPic->getLayerIdx() ); 3352 } 3349 3353 } 3350 3354 } … … 3353 3357 } 3354 3358 3355 Bool TComDataCU::xCheckZeroMVILRMvdL1Zero(Int iRefList, Int iRefIdx, Int MvpIdx) 3356 { 3357 RefPicList eRefPicList = iRefList > 0? REF_PIC_LIST_1: REF_PIC_LIST_0; 3358 assert(eRefPicList == REF_PIC_LIST_1); 3359 3359 Bool TComDataCU::checkZeroMVILRMvdL1Zero(Int iRefList, Int iRefIdx, Int MvpIdx) 3360 { 3360 3361 Bool checkZeroMVILR = true; 3361 3362 3362 if(getSlice()->getRefPic(eRefPicList, iRefIdx)->isILR(m_pcPic->getLayerId())) 3363 { 3364 AMVPInfo* pcAMVPInfo = getCUMvField(eRefPicList)->getAMVPInfo(); 3365 TComMv cMv = pcAMVPInfo->m_acMvCand[MvpIdx]; 3366 checkZeroMVILR &= (cMv.getHor() == 0 && cMv.getVer() == 0); 3363 if( m_pcSlice->getVPS()->getScalabilityMask( SCALABILITY_ID ) ) //scalable layer 3364 { 3365 RefPicList eRefPicList = iRefList > 0? REF_PIC_LIST_1: REF_PIC_LIST_0; 3366 assert(eRefPicList == REF_PIC_LIST_1); 3367 3368 if( m_pcSlice->getRefPic(eRefPicList, iRefIdx)->isILR(m_pcPic->getLayerId()) ) 3369 { 3370 AMVPInfo* pcAMVPInfo = getCUMvField(eRefPicList)->getAMVPInfo(); 3371 TComMv cMv = pcAMVPInfo->m_acMvCand[MvpIdx]; 3372 checkZeroMVILR &= (cMv.getHor() == 0 && cMv.getVer() == 0); 3373 } 3367 3374 } 3368 3375 -
branches/SHM-dev/source/Lib/TLibCommon/TComDataCU.h
r1483 r1534 487 487 #endif 488 488 #if REF_IDX_ME_ZEROMV 489 Bool xCheckZeroMVILRMerge( UChar uhInterDir, TComMvField& cMvFieldL0, TComMvField& cMvFieldL1);490 Bool xCheckZeroMVILRMvdL1Zero( Int iRefList, Int iRefIdx, Int MvpIdx);489 Bool checkZeroMVILRMerge ( UChar uhInterDir, TComMvField& cMvFieldL0, TComMvField& cMvFieldL1); 490 Bool checkZeroMVILRMvdL1Zero ( Int iRefList, Int iRefIdx, Int MvpIdx); 491 491 #endif 492 492 TComDataCU* getBaseColCU ( UInt refLayerIdc, UInt uiCuAbsPartIdx, UInt &uiCUAddrBase, UInt &uiAbsPartIdxBase, Int** posScalingFactor, Bool motionMapping = false ); -
branches/SHM-dev/source/Lib/TLibCommon/TComPrediction.cpp
r1502 r1534 585 585 // VpsInterLayerSamplePredictionEnabled[ LayerIdxInVps[ currLayerId ] ][ LayerIdxInVps[ rLId ] ] shall be equal to 1, where rLId is set equal to nuh_layer_id of the inter-layer picture 586 586 assert( pcCU->getSlice()->getVPS()->isSamplePredictionType( pcCU->getPic()->getLayerIdx(), refPic->getLayerIdx() ) ); 587 587 #if VIEW_SCALABILITY 588 if( pcCU->getSlice()->getSPS()->getInterViewMvVertConstraintFlag() ) 589 { 590 assert( cMv.getVer()<= (56<<2) ); 591 } 592 #endif 588 593 #if REF_IDX_ME_ZEROMV 589 594 // It is a requirement of bitstream conformance that the variables mvLX[ 0 ] and mvLX[ 1 ] shall be equal to 0 if the value of refIdxLX corresponds to an inter-layer reference picture. -
branches/SHM-dev/source/Lib/TLibCommon/TComSlice.cpp
r1525 r1534 567 567 568 568 #if SVC_EXTENSION 569 #if VIEW_SCALABILITY 570 std::vector<TComPic*> refPicSetInterLayer0; 571 std::vector<TComPic*> refPicSetInterLayer1; 572 const TComVPS* cVPS=getVPS(); 573 574 Int viewIdCurrLayerId = cVPS->getViewIdVal(cVPS->getViewIndex(m_layerId) ); 575 Int viewId0 = cVPS->getViewIdVal( 0 ); 576 for( i=0; i< m_activeNumILRRefIdx ;i++) 577 { 578 Int refLayerIdc = m_interLayerPredLayerIdc[i]; 579 Int maxTidIlRefPicsPlus1 = getVPS()->getMaxTidIlRefPicsPlus1(ilpPic[refLayerIdc]->getSlice(0)->getLayerIdx(), getLayerIdx()); 580 if( ((Int)(ilpPic[refLayerIdc]->getSlice(0)->getTLayer())<=maxTidIlRefPicsPlus1-1) || (maxTidIlRefPicsPlus1==0 && ilpPic[refLayerIdc]->getSlice(0)->getRapPicFlag()) ) 581 { 582 Int viewIdRefPicLayerIdi = cVPS->getViewIdVal( ilpPic[refLayerIdc]->getSlice(0)->getLayerIdx() ); 583 Bool refPicSet0Flag = 584 ( ( viewIdCurrLayerId <= viewId0 && viewIdCurrLayerId <= viewIdRefPicLayerIdi ) || 585 ( viewIdCurrLayerId >= viewId0 && viewIdCurrLayerId >= viewIdRefPicLayerIdi ) ); 586 587 if ( refPicSet0Flag ) 588 { 589 refPicSetInterLayer0.push_back( ilpPic[refLayerIdc] ); 590 } 591 else 592 { 593 refPicSetInterLayer1.push_back( ilpPic[refLayerIdc] ); 594 } 595 596 } 597 } 598 599 600 if( m_layerId > 0 ) 601 { 602 for( i = 0; i < refPicSetInterLayer0.size() && cIdx < numPicTotalCurr; cIdx ++, i ++) 603 { 604 rpsCurrList0[cIdx] = refPicSetInterLayer0[i]; 605 } 606 } 607 #else 569 608 // initial reference picture list construction 570 609 if( m_layerId > 0 ) … … 584 623 } 585 624 } 625 #endif 586 626 #endif //SVC_EXTENSION 587 627 … … 594 634 rpsCurrList0[cIdx] = RefPicSetLtCurr[i]; 595 635 } 636 #if VIEW_SCALABILITY 637 if( m_layerId > 0 ) 638 { 639 for( i = 0; i < refPicSetInterLayer1.size(); cIdx++, i++ ) 640 { 641 rpsCurrList0[cIdx] = refPicSetInterLayer1[i]; 642 } 643 } 644 #else 596 645 assert(cIdx == numPicTotalCurr); 646 #endif 597 647 598 648 if (m_eSliceType==B_SLICE) … … 603 653 rpsCurrList1[cIdx] = RefPicSetStCurr1[i]; 604 654 } 655 #if VIEW_SCALABILITY 656 if( m_layerId > 0 ) 657 { 658 for( i = 0; i < refPicSetInterLayer1.size(); cIdx ++, i ++) 659 { 660 rpsCurrList1[cIdx] = refPicSetInterLayer1[i]; 661 } 662 } 663 #endif 605 664 for ( i=0; i<NumPicStCurr0; i++, cIdx++) 606 665 { … … 612 671 } 613 672 673 #if VIEW_SCALABILITY 674 if( m_layerId > 0 ) 675 { 676 for( i = 0; i < refPicSetInterLayer0.size(); cIdx ++, i ++) 677 { 678 rpsCurrList1[cIdx] = refPicSetInterLayer0[i]; 679 } 680 } 681 #else 614 682 #if SVC_EXTENSION 615 683 if( m_layerId > 0 ) … … 630 698 } 631 699 #endif //SVC_EXTENSION 632 633 700 assert(cIdx == numPicTotalCurr); 701 #endif 634 702 } 635 703 … … 643 711 644 712 #if SVC_EXTENSION 713 #if VIEW_SCALABILITY 714 m_bIsUsedAsLongTerm[REF_PIC_LIST_0][rIdx] = (cIdx<NumPicStCurr0 || (cIdx>=NumPicStCurr0+refPicSetInterLayer0.size() && cIdx<NumPicStCurr0+refPicSetInterLayer0.size()+NumPicStCurr1)) ? false : true; 715 #else 645 716 m_bIsUsedAsLongTerm[0][rIdx] = ( cIdx >= NumPicStCurr0 && cIdx < NumPicStCurr0 + m_activeNumILRRefIdx ) || ( cIdx >= NumPicStCurr0 + NumPicStCurr1 + m_activeNumILRRefIdx ); 717 #endif 646 718 #else 647 719 m_bIsUsedAsLongTerm[REF_PIC_LIST_0][rIdx] = ( cIdx >= NumPicStCurr0 + NumPicStCurr1 ); … … 660 732 assert(cIdx >= 0 && cIdx < numPicTotalCurr); 661 733 m_apcRefPicList[REF_PIC_LIST_1][rIdx] = rpsCurrList1[ cIdx ]; 734 #if VIEW_SCALABILITY 735 m_bIsUsedAsLongTerm[REF_PIC_LIST_1][rIdx] = (cIdx<NumPicStCurr1 || (cIdx>=NumPicStCurr1+refPicSetInterLayer1.size() && cIdx<NumPicStCurr1+refPicSetInterLayer1.size()+NumPicStCurr0)) ? false : true; 736 #else 662 737 m_bIsUsedAsLongTerm[REF_PIC_LIST_1][rIdx] = ( cIdx >= NumPicStCurr0 + NumPicStCurr1 ); 738 #endif 663 739 } 664 740 } … … 699 775 return numRpsCurrTempList; 700 776 } 777 778 #if VIEW_SCALABILITY 779 Int TComSlice::getNumRpsInterLayerX(Int li, TComPic** ilpPic) 780 { 781 assert(li==0 || li==1); 782 783 Int viewIdCurrLayerId = m_pcVPS->getViewIdVal(m_pcVPS->getViewIndex(m_layerId) ); 784 Int viewId0 = m_pcVPS->getViewIdVal( 0 ); 785 Int numInterLayer0 = 0; 786 Int numInterLayer1 = 0; 787 788 for( Int i=0; i < m_activeNumILRRefIdx; i++ ) 789 { 790 Int refLayerIdc = m_interLayerPredLayerIdc[i]; 791 Int maxTidIlRefPicsPlus1 = m_pcVPS->getMaxTidIlRefPicsPlus1(ilpPic[refLayerIdc]->getSlice(0)->getLayerIdx(), getLayerIdx()); 792 793 if( ((Int)(ilpPic[refLayerIdc]->getSlice(0)->getTLayer())<=maxTidIlRefPicsPlus1-1) || (maxTidIlRefPicsPlus1==0 && ilpPic[refLayerIdc]->getSlice(0)->getRapPicFlag()) ) 794 { 795 Int viewIdRefPicLayerIdi = m_pcVPS->getViewIdVal( ilpPic[refLayerIdc]->getSlice(0)->getLayerIdx() ); 796 Bool refPicSet0Flag = ( ( viewIdCurrLayerId <= viewId0 && viewIdCurrLayerId <= viewIdRefPicLayerIdi ) || ( viewIdCurrLayerId >= viewId0 && viewIdCurrLayerId >= viewIdRefPicLayerIdi ) ); 797 798 if( refPicSet0Flag ) 799 { 800 numInterLayer0++; 801 } 802 else 803 { 804 numInterLayer1++; 805 } 806 } 807 } 808 809 if( li==0 ) 810 { 811 return numInterLayer0; 812 } 813 else 814 { 815 return numInterLayer1; 816 } 817 } 818 #endif 701 819 702 820 Void TComSlice::initEqualRef() … … 3477 3595 } 3478 3596 3597 #if VIEW_SCALABILITY 3598 Void TComSlice::setRefPicListModificationSvc( TComPic** ilpPic ) 3599 #else 3479 3600 Void TComSlice::setRefPicListModificationSvc() 3601 #endif 3480 3602 { 3481 3603 if( !m_pcPPS->getListsModificationPresentFlag()) … … 3491 3613 TComRefPicListModification* refPicListModification = &m_RefPicListModification; 3492 3614 Int numberOfRpsCurrTempList = this->getNumRpsCurrTempList(); // total number of ref pics in listTemp0 including inter-layer ref pics 3493 #if SVC_EXTENSION 3494 Int numberOfPocBeforeCurr = this->getNumNegativeRpsCurrTempList(); // number of negative temporal ref pics 3495 #endif 3615 Int numberOfPocBeforeCurr = getNumNegativeRpsCurrTempList(); // number of negative temporal ref pics 3496 3616 3497 3617 assert(m_aiNumRefIdx[REF_PIC_LIST_0] > 0); … … 3499 3619 3500 3620 //set L0 inter-layer reference picture modification 3501 #if SVC_EXTENSION 3502 Bool hasModification = (m_aiNumRefIdx[REF_PIC_LIST_0] == (numberOfPocBeforeCurr + m_activeNumILRRefIdx)) ? false : true; 3503 3504 if( m_activeNumILRRefIdx > 1 ) 3505 { 3506 hasModification = (m_aiNumRefIdx[REF_PIC_LIST_0] >= (numberOfPocBeforeCurr + m_activeNumILRRefIdx)) ? false : true; 3507 } 3508 #else 3509 Bool hasModification = (m_aiNumRefIdx[REF_PIC_LIST_0] == numberOfRpsCurrTempList) ? false : true; 3510 #endif 3621 #if VIEW_SCALABILITY 3622 Int numberOfPocAfterCurr = 0; 3623 Int numberOfInterLayer0 = 0; 3624 Int numberOfInterLayer1 = 0; 3625 #endif 3626 3627 Bool hasModification = false; 3628 3629 if( m_pcVPS->getScalabilityMask( SCALABILITY_ID ) ) //scalable layer 3630 { 3631 hasModification = (m_aiNumRefIdx[REF_PIC_LIST_0] == (numberOfPocBeforeCurr + m_activeNumILRRefIdx)) ? false : true; 3632 3633 if( m_activeNumILRRefIdx > 1 ) 3634 { 3635 hasModification = (m_aiNumRefIdx[REF_PIC_LIST_0] >= (numberOfPocBeforeCurr + m_activeNumILRRefIdx)) ? false : true; 3636 } 3637 } 3638 #if VIEW_SCALABILITY 3639 else if( m_pcVPS->getScalabilityMask( VIEW_ORDER_INDEX ) ) //multi-view 3640 { 3641 numberOfPocAfterCurr = getNumfPositiveRpsCurrTempList(); 3642 numberOfInterLayer0 = getNumRpsInterLayerX(0, ilpPic); 3643 numberOfInterLayer1 = getNumRpsInterLayerX(1, ilpPic); 3644 3645 if( (numberOfInterLayer1 > 0 && m_aiNumRefIdx[REF_PIC_LIST_0] < numberOfRpsCurrTempList) || (numberOfInterLayer1 == 0 && m_aiNumRefIdx[REF_PIC_LIST_0] < numberOfPocBeforeCurr + numberOfInterLayer0 ) ) 3646 { 3647 hasModification = true; 3648 } 3649 else 3650 { 3651 hasModification = false; 3652 } 3653 } 3654 #endif 3655 3511 3656 hasModification = hasModification && ( m_aiNumRefIdx[REF_PIC_LIST_0] > 1 ); 3512 3657 refPicListModification->setRefPicListModificationFlagL0(hasModification); … … 3526 3671 } 3527 3672 } 3528 else 3673 else if( m_pcVPS->getScalabilityMask( SCALABILITY_ID ) ) //scalable layer 3529 3674 { 3530 3675 // number of ILRPs included into the reference picture list with the list modification … … 3533 3678 for(Int i = includeNumILRP; i > 0; i-- ) 3534 3679 { 3535 #if SVC_EXTENSION3536 3680 if( numberOfPocBeforeCurr >= m_aiNumRefIdx[REF_PIC_LIST_0] ) 3537 3681 { … … 3547 3691 } 3548 3692 } 3549 #else 3550 refPicListModification->setRefPicSetIdxL0(m_aiNumRefIdx[REF_PIC_LIST_0] - i, numberOfRpsCurrTempList - i); 3551 #endif 3552 } 3553 } 3693 } 3694 } 3695 #if VIEW_SCALABILITY 3696 else if( m_pcVPS->getScalabilityMask( VIEW_ORDER_INDEX ) ) //multi-view 3697 { 3698 Int includeNumILRP = m_activeNumILRRefIdx; 3699 Int iNumILRP = includeNumILRP; 3700 3701 if( numberOfInterLayer1 > 0 ) 3702 { 3703 if( m_aiNumRefIdx[REF_PIC_LIST_0] < numberOfPocBeforeCurr + m_activeNumILRRefIdx ) 3704 { 3705 for( Int i = 0; i < numberOfInterLayer0 && iNumILRP > 0; i++, iNumILRP-- ) 3706 { 3707 refPicListModification->setRefPicSetIdxL0( m_aiNumRefIdx[REF_PIC_LIST_0] - includeNumILRP + i, numberOfPocBeforeCurr + i ); 3708 } 3709 3710 for( Int i = 0; i < numberOfInterLayer1 && iNumILRP > 0; i++, iNumILRP-- ) 3711 { 3712 refPicListModification->setRefPicSetIdxL0( m_aiNumRefIdx[REF_PIC_LIST_0] - includeNumILRP +numberOfInterLayer0+ i, numberOfRpsCurrTempList- numberOfInterLayer1 + i ); 3713 } 3714 } 3715 else 3716 { 3717 iNumILRP -= numberOfInterLayer0; 3718 3719 for( Int i = numberOfInterLayer1; i >0 && iNumILRP > 0; i--, iNumILRP-- ) 3720 { 3721 refPicListModification->setRefPicSetIdxL0( m_aiNumRefIdx[REF_PIC_LIST_0] - i, numberOfRpsCurrTempList - i ); 3722 } 3723 } 3724 } 3725 else 3726 { 3727 for( Int i = numberOfInterLayer0; i >0 && iNumILRP >0 ; i--, iNumILRP-- ) 3728 { 3729 refPicListModification->setRefPicSetIdxL0( m_aiNumRefIdx[REF_PIC_LIST_0] - i, numberOfPocBeforeCurr + numberOfInterLayer0 - i ); 3730 } 3731 } 3732 } 3733 #endif 3554 3734 } 3555 3735 3556 3736 //set L1 inter-layer reference picture modification 3557 hasModification = (m_aiNumRefIdx[REF_PIC_LIST_1] >= numberOfRpsCurrTempList) ? false : true; 3737 if( m_pcVPS->getScalabilityMask( SCALABILITY_ID ) ) //scalable layer 3738 { 3739 hasModification = (m_aiNumRefIdx[REF_PIC_LIST_1] >= numberOfRpsCurrTempList) ? false : true; 3740 } 3741 #if VIEW_SCALABILITY 3742 else if( m_pcVPS->getScalabilityMask( VIEW_ORDER_INDEX ) ) //multi-view 3743 { 3744 if( (numberOfInterLayer0 > 0 && m_aiNumRefIdx[REF_PIC_LIST_1] < numberOfRpsCurrTempList) || (numberOfInterLayer0 == 0 && m_aiNumRefIdx[REF_PIC_LIST_1] < numberOfPocAfterCurr + numberOfInterLayer1) ) 3745 { 3746 hasModification = true; 3747 } 3748 else 3749 { 3750 hasModification = false; 3751 } 3752 } 3753 #endif 3558 3754 hasModification = hasModification && ( m_aiNumRefIdx[REF_PIC_LIST_1] > 1 ); 3559 3755 … … 3573 3769 } 3574 3770 } 3575 else 3771 else if( m_pcVPS->getScalabilityMask( SCALABILITY_ID ) ) //scalable layer 3576 3772 { 3577 3773 Int includeNumILRP = min(m_aiNumRefIdx[REF_PIC_LIST_1], m_activeNumILRRefIdx); … … 3582 3778 } 3583 3779 } 3780 #if VIEW_SCALABILITY 3781 else if( m_pcVPS->getScalabilityMask( VIEW_ORDER_INDEX ) ) //multi-view 3782 { 3783 Int includeNumILRP = m_activeNumILRRefIdx; 3784 Int iNumILRP=includeNumILRP; 3785 3786 if( numberOfInterLayer0 > 0 ) 3787 { 3788 if( m_aiNumRefIdx[REF_PIC_LIST_1] < numberOfPocAfterCurr + m_activeNumILRRefIdx ) 3789 { 3790 for( Int i = 0; i < numberOfInterLayer1 && iNumILRP>0; i++,iNumILRP-- ) 3791 { 3792 refPicListModification->setRefPicSetIdxL1(m_aiNumRefIdx[REF_PIC_LIST_1] - includeNumILRP + i, numberOfPocAfterCurr + i); 3793 } 3794 3795 for(Int i = 0; i < numberOfInterLayer0 && iNumILRP>0; i++,iNumILRP-- ) 3796 { 3797 refPicListModification->setRefPicSetIdxL1(m_aiNumRefIdx[REF_PIC_LIST_1] - includeNumILRP +numberOfInterLayer1+ i, numberOfRpsCurrTempList-numberOfInterLayer0+i); 3798 } 3799 } 3800 else 3801 { 3802 iNumILRP -= numberOfInterLayer1; 3803 for( Int i = numberOfInterLayer0; i > 0 && iNumILRP > 0; i--,iNumILRP-- ) 3804 { 3805 refPicListModification->setRefPicSetIdxL1(m_aiNumRefIdx[REF_PIC_LIST_1] - i, numberOfRpsCurrTempList - i); 3806 } 3807 } 3808 } 3809 else 3810 { 3811 for( Int i = numberOfInterLayer1; i >0 && iNumILRP>0; i--, iNumILRP-- ) 3812 { 3813 refPicListModification->setRefPicSetIdxL1(m_aiNumRefIdx[REF_PIC_LIST_1] - i, numberOfPocAfterCurr + numberOfInterLayer1 - i); 3814 } 3815 } 3816 } 3817 #endif 3584 3818 } 3585 3819 return; … … 3638 3872 } 3639 3873 } 3874 3875 #if VIEW_SCALABILITY 3876 Int TComSlice::getNumfPositiveRpsCurrTempList() 3877 { 3878 if( m_eSliceType == I_SLICE ) 3879 { 3880 return 0; 3881 } 3882 3883 Int numPocAfterCurr = 0; 3884 3885 for( UInt i = 0; i < m_pRPS->getNumberOfPositivePictures(); i++ ) 3886 { 3887 if( m_pRPS->getUsed(i) ) 3888 { 3889 numPocAfterCurr++; 3890 } 3891 } 3892 3893 return numPocAfterCurr; 3894 } 3895 #endif 3896 3640 3897 #endif //SVC_EXTENSION 3641 3898 -
branches/SHM-dev/source/Lib/TLibCommon/TComSlice.h
r1502 r1534 1443 1443 Bool m_inferScalingListFlag; 1444 1444 UInt m_scalingListRefLayerId; 1445 #if VIEW_SCALABILITY 1446 Bool m_interViewMvVertConstraintFlag; 1447 #endif 1445 1448 #endif //SVC_EXTENSION 1446 1449 … … 1599 1602 1600 1603 Void inferSPS( const UInt layerId, TComVPS* vps ); 1604 1605 #if VIEW_SCALABILITY 1606 Void setInterViewMvVertConstraintFlag( Bool val ) { m_interViewMvVertConstraintFlag = val; } 1607 Bool getInterViewMvVertConstraintFlag() const { return m_interViewMvVertConstraintFlag; } 1608 #endif 1601 1609 #endif //SVC_EXTENSION 1602 1610 }; … … 2351 2359 Void setFullPelBaseRec( UInt refLayerIdc, TComPicYuv* p) { m_pcFullPelBaseRec[refLayerIdc] = p; } 2352 2360 TComPicYuv* getFullPelBaseRec( UInt refLayerIdc) { return m_pcFullPelBaseRec[refLayerIdc]; } 2353 2361 #if VIEW_SCALABILITY 2362 Int getNumRpsInterLayerX( Int li, TComPic** ilpPic ); 2363 Void setRefPicListModificationSvc( TComPic** ilpPic ); 2364 Int getNumfPositiveRpsCurrTempList(); 2365 #else 2354 2366 Void setRefPicListModificationSvc(); 2367 #endif 2355 2368 Int getNumILRRefIdx() { return m_pcVPS->getNumDirectRefLayers( m_layerId ); } 2356 2369 -
branches/SHM-dev/source/Lib/TLibCommon/TypeDef.h
r1531 r1534 72 72 #define NO_CLRAS_OUTPUT_FLAG 1 73 73 74 #define VIEW_SCALABILITY 0 ///< JCTVC-W0134: multi-view support 75 74 76 /// scalability types 75 77 enum ScalabilityType … … 87 89 88 90 /// normative encoder constraints -------- 89 #define REF_IDX_ME_ZEROMV 1 ///< JCTVC-L0051: use zero motion for inter-layer reference picture (without fractional ME) 90 91 #define REF_IDX_ME_ZEROMV 1 ///< JCTVC-L0051: use zero motion for inter-layer reference picture for scalable layer (without fractional ME) 91 92 /// encoder settings --------------------- 92 93 #define FAST_INTRA_SHVC 1 ///< JCTVC-M0115: reduction number of intra modes in the EL (encoder only)
Note: See TracChangeset for help on using the changeset viewer.