Changeset 1448 in SHVCSoftware
- Timestamp:
- 14 Aug 2015, 00:50:40 (9 years ago)
- Location:
- branches/SHM-dev/source/App/TAppEncoder
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/SHM-dev/source/App/TAppEncoder/TAppEncCfg.cpp
r1446 r1448 782 782 string* cfg_scalingListFileName[MAX_LAYERS]; 783 783 ScalingListMode* cfg_UseScalingListId[MAX_LAYERS]; 784 Int* cfg_inheritCodingStruct[MAX_LAYERS]; 784 785 785 786 Bool* cfg_bUseSAO[MAX_LAYERS]; … … 865 866 cfg_RCInitialCpbFullness[layer] = &m_apcLayerCfg[layer]->m_RCInitialCpbFullness; 866 867 #endif 868 869 cfg_inheritCodingStruct[layer] = &m_apcLayerCfg[layer]->m_inheritCodingStruct; 867 870 #endif 868 871 … … 1649 1652 #endif 1650 1653 #endif 1651 ("InheritCodingStruct%d", m_inheritCodingStruct, 0, m_numLayers, "Predicts the GOP structure of one layer for another layer")1654 ("InheritCodingStruct%d", cfg_inheritCodingStruct, 0, m_numLayers, "Predicts the GOP structure of one layer for another layer") 1652 1655 #endif //SVC_EXTENSION 1653 1656 ; 1654 1657 1658 #if SVC_EXTENSION 1659 for (Int j=0; j<m_numLayers; j++) 1660 { 1661 GOPEntry* m_GOPList = m_apcLayerCfg[j]->m_GOPList; 1662 #endif 1655 1663 for(Int i=1; i<MAX_GOP+1; i++) 1656 1664 { … … 1659 1667 opts.addOptions()(cOSS.str(), m_GOPList[i-1], GOPEntry()); 1660 1668 } 1661 1662 #if SVC_EXTENSION 1663 for (Int i=1; i<m_numLayers; i++) 1664 { 1665 for(Int j=1; j<MAX_GOP+1; j++) 1666 { 1667 std::ostringstream cOSS; 1668 cOSS<<"Layer"<<i<<"Frame"<<j; 1669 opts.addOptions()(cOSS.str(), m_EhGOPList[i][j-1], GOPEntry()); 1670 } 1671 } 1672 #endif 1669 #if SVC_EXTENSION 1670 } 1671 #endif 1673 1672 1674 1673 po::setDefaults(opts); … … 1684 1683 #endif 1685 1684 1686 for (Int i=1; i<m_numLayers; i++) 1687 { 1688 if(m_inheritCodingStruct[i] == 0) 1689 { 1690 for(Int j=1; j<MAX_GOP+1; j++) 1691 { 1692 m_EhGOPList[i][j-1] = m_GOPList[j-1]; 1693 } 1694 } 1695 else if( m_inheritCodingStruct[i] > 0) 1696 { 1697 for(Int j=1; j<MAX_GOP+1; j++) 1698 { 1699 m_EhGOPList[i][j-1] = m_EhGOPList[m_inheritCodingStruct[i]][j-1]; 1685 for( Int i=1; i<m_numLayers; i++ ) 1686 { 1687 if( m_apcLayerCfg[i]->m_inheritCodingStruct > 0) 1688 { 1689 for( Int j=1; j<MAX_GOP+1; j++ ) 1690 { 1691 m_apcLayerCfg[i]->m_GOPList[j-1] = m_apcLayerCfg[m_apcLayerCfg[i]->m_inheritCodingStruct]->m_GOPList[j-1]; 1700 1692 } 1701 1693 } … … 3003 2995 3004 2996 Int& m_iWaveFrontSynchro = m_apcLayerCfg[layerIdx]->m_waveFrontSynchro; 2997 2998 Int& m_maxTempLayer = m_apcLayerCfg[layerIdx]->m_maxTempLayer; 2999 Int& m_extraRPSs = m_apcLayerCfg[layerIdx]->m_extraRPSs; 3000 GOPEntry* m_GOPList = m_apcLayerCfg[layerIdx]->m_GOPList; 3005 3001 #else 3006 3002 Void TAppEncCfg::xCheckParameter() … … 3342 3338 /* if this is an intra-only sequence, ie IntraPeriod=1, don't verify the GOP structure 3343 3339 * This permits the ability to omit a GOP structure specification */ 3344 #if SVC_EXTENSION 3345 if( m_apcLayerCfg[0]->m_iIntraPeriod == 1 && m_GOPList[0].m_POC == -1 ) 3340 if (m_iIntraPeriod == 1 && m_GOPList[0].m_POC == -1) 3346 3341 { 3347 3342 m_GOPList[0] = GOPEntry(); … … 3356 3351 xConfirmPara( m_intraConstraintFlag, "IntraConstraintFlag cannot be 1 for inter sequences"); 3357 3352 } 3358 3359 if (m_apcLayerCfg[layerIdx]->m_iIntraPeriod == 1 && m_EhGOPList[layerIdx][0].m_POC == -1) {3360 m_EhGOPList[layerIdx][0] = GOPEntry();3361 m_EhGOPList[layerIdx][0].m_QPFactor = 1;3362 m_EhGOPList[layerIdx][0].m_betaOffsetDiv2 = 0;3363 m_EhGOPList[layerIdx][0].m_tcOffsetDiv2 = 0;3364 m_EhGOPList[layerIdx][0].m_POC = 1;3365 m_EhGOPList[layerIdx][0].m_numRefPicsActive = 4;3366 }3367 else3368 {3369 xConfirmPara( m_intraConstraintFlag, "IntraConstraintFlag cannot be 1 for inter sequences");3370 }3371 #else3372 if (m_iIntraPeriod == 1 && m_GOPList[0].m_POC == -1)3373 {3374 m_GOPList[0] = GOPEntry();3375 m_GOPList[0].m_QPFactor = 1;3376 m_GOPList[0].m_betaOffsetDiv2 = 0;3377 m_GOPList[0].m_tcOffsetDiv2 = 0;3378 m_GOPList[0].m_POC = 1;3379 m_GOPList[0].m_numRefPicsActive = 4;3380 }3381 else3382 {3383 xConfirmPara( m_intraConstraintFlag, "IntraConstraintFlag cannot be 1 for inter sequences");3384 }3385 #endif3386 3353 3387 3354 Bool verifiedGOP=false; … … 3434 3401 } 3435 3402 3436 #if SVC_EXTENSION3437 memset( m_extraRPSs, 0, sizeof( m_extraRPSs ) );3438 #else3439 3403 m_extraRPSs=0; 3440 #endif3441 3404 3442 3405 //start looping through frames in coding order until we can verify that the GOP structure is correct. … … 3505 3468 { 3506 3469 //create a new GOPEntry for this frame containing all the reference pictures that were available (POC > 0) 3507 #if SVC_EXTENSION3508 m_GOPList[m_iGOPSize+m_extraRPSs[0]]=m_GOPList[curGOP];3509 #else3510 3470 m_GOPList[m_iGOPSize+m_extraRPSs]=m_GOPList[curGOP]; 3511 #endif3512 3471 Int newRefs=0; 3513 3472 for(Int i = 0; i< m_GOPList[curGOP].m_numRefPics; i++) … … 3516 3475 if(absPOC>=0) 3517 3476 { 3518 #if SVC_EXTENSION3519 m_GOPList[m_iGOPSize+m_extraRPSs[0]].m_referencePics[newRefs]=m_GOPList[curGOP].m_referencePics[i];3520 m_GOPList[m_iGOPSize+m_extraRPSs[0]].m_usedByCurrPic[newRefs]=m_GOPList[curGOP].m_usedByCurrPic[i];3521 #else3522 3477 m_GOPList[m_iGOPSize+m_extraRPSs].m_referencePics[newRefs]=m_GOPList[curGOP].m_referencePics[i]; 3523 3478 m_GOPList[m_iGOPSize+m_extraRPSs].m_usedByCurrPic[newRefs]=m_GOPList[curGOP].m_usedByCurrPic[i]; 3524 #endif3525 3479 newRefs++; 3526 3480 } … … 3545 3499 for(Int i=0; i<newRefs; i++) 3546 3500 { 3547 #if SVC_EXTENSION3548 if( m_GOPList[m_iGOPSize+m_extraRPSs[0]].m_referencePics[i] == offPOC-curPOC )3549 #else3550 3501 if(m_GOPList[m_iGOPSize+m_extraRPSs].m_referencePics[i]==offPOC-curPOC) 3551 #endif3552 3502 { 3553 3503 newRef=false; … … 3564 3514 for(Int j=0; j<newRefs; j++) 3565 3515 { 3566 #if SVC_EXTENSION3567 if( m_GOPList[m_iGOPSize+m_extraRPSs[0]].m_referencePics[j] < offPOC-curPOC || m_GOPList[m_iGOPSize+m_extraRPSs[0]].m_referencePics[j] > 0 )3568 #else3569 3516 if(m_GOPList[m_iGOPSize+m_extraRPSs].m_referencePics[j]<offPOC-curPOC||m_GOPList[m_iGOPSize+m_extraRPSs].m_referencePics[j]>0) 3570 #endif3571 3517 { 3572 3518 insertPoint = j; … … 3578 3524 for(Int j=insertPoint; j<newRefs+1; j++) 3579 3525 { 3580 #if SVC_EXTENSION3581 Int newPrev = m_GOPList[m_iGOPSize+m_extraRPSs[0]].m_referencePics[j];3582 Int newUsed = m_GOPList[m_iGOPSize+m_extraRPSs[0]].m_usedByCurrPic[j];3583 m_GOPList[m_iGOPSize+m_extraRPSs[0]].m_referencePics[j]=prev;3584 m_GOPList[m_iGOPSize+m_extraRPSs[0]].m_usedByCurrPic[j]=prevUsed;3585 #else3586 3526 Int newPrev = m_GOPList[m_iGOPSize+m_extraRPSs].m_referencePics[j]; 3587 3527 Int newUsed = m_GOPList[m_iGOPSize+m_extraRPSs].m_usedByCurrPic[j]; 3588 3528 m_GOPList[m_iGOPSize+m_extraRPSs].m_referencePics[j]=prev; 3589 3529 m_GOPList[m_iGOPSize+m_extraRPSs].m_usedByCurrPic[j]=prevUsed; 3590 #endif3591 3530 3592 3531 prevUsed=newUsed; … … 3602 3541 } 3603 3542 3604 #if SVC_EXTENSION3605 m_GOPList[m_iGOPSize+m_extraRPSs[0]].m_numRefPics=newRefs;3606 m_GOPList[m_iGOPSize+m_extraRPSs[0]].m_POC = curPOC;3607 3608 if( m_extraRPSs[0] == 0 )3609 {3610 m_GOPList[m_iGOPSize+m_extraRPSs[0]].m_interRPSPrediction = 0;3611 m_GOPList[m_iGOPSize+m_extraRPSs[0]].m_numRefIdc = 0;3612 }3613 else3614 {3615 Int rIdx = m_iGOPSize + m_extraRPSs[0] - 1;3616 #else3617 3543 m_GOPList[m_iGOPSize+m_extraRPSs].m_numRefPics=newRefs; 3618 3544 m_GOPList[m_iGOPSize+m_extraRPSs].m_POC = curPOC; … … 3626 3552 { 3627 3553 Int rIdx = m_iGOPSize + m_extraRPSs - 1; 3628 #endif3629 3554 Int refPOC = m_GOPList[rIdx].m_POC; 3630 3555 Int refPics = m_GOPList[rIdx].m_numRefPics; … … 3636 3561 Int refIdc = 0; 3637 3562 3638 #if SVC_EXTENSION3639 for (Int j = 0; j < m_GOPList[m_iGOPSize+m_extraRPSs[0]].m_numRefPics; j++)3640 {3641 if ( (absPOCref - curPOC) == m_GOPList[m_iGOPSize+m_extraRPSs[0]].m_referencePics[j])3642 {3643 if (m_GOPList[m_iGOPSize+m_extraRPSs[0]].m_usedByCurrPic[j])3644 {3645 refIdc = 1;3646 }3647 else3648 {3649 refIdc = 2;3650 }3651 }3652 }3653 m_GOPList[m_iGOPSize+m_extraRPSs[0]].m_refIdc[newIdc]=refIdc;3654 newIdc++;3655 }3656 m_GOPList[m_iGOPSize+m_extraRPSs[0]].m_interRPSPrediction = 1;3657 m_GOPList[m_iGOPSize+m_extraRPSs[0]].m_numRefIdc = newIdc;3658 m_GOPList[m_iGOPSize+m_extraRPSs[0]].m_deltaRPS = refPOC - m_GOPList[m_iGOPSize+m_extraRPSs[0]].m_POC;3659 }3660 curGOP=m_iGOPSize+m_extraRPSs[0];3661 m_extraRPSs[0]++;3662 }3663 #else3664 3563 for (Int j = 0; j < m_GOPList[m_iGOPSize+m_extraRPSs].m_numRefPics; j++) 3665 3564 { … … 3686 3585 m_extraRPSs++; 3687 3586 } 3688 #endif3689 3587 3690 3588 numRefs=0; … … 3704 3602 } 3705 3603 xConfirmPara(errorGOP,"Invalid GOP structure given"); 3706 3707 #if SVC_EXTENSION3708 if( layerIdx > 0 )3709 {3710 verifiedGOP=false;3711 errorGOP=false;3712 checkGOP=1;3713 numRefs = m_isField ? 2 : 1;3714 refList[0]=0;3715 3716 if(m_isField)3717 {3718 refList[1] = 1;3719 }3720 3721 memset( isOK, 0, sizeof( isOK ) );3722 numOK=0;3723 3724 for(Int i=0; i<m_iGOPSize; i++)3725 {3726 if(m_EhGOPList[layerIdx][i].m_POC==m_iGOPSize)3727 {3728 xConfirmPara( m_EhGOPList[layerIdx][i].m_temporalId!=0 , "The last frame in each GOP must have temporal ID = 0 " );3729 }3730 }3731 3732 xConfirmPara( m_numLayers > MAX_LAYERS , "Number of layers in config file is greater than MAX_LAYERS" );3733 m_numLayers = m_numLayers > MAX_LAYERS ? MAX_LAYERS : m_numLayers;3734 3735 // verify layer configuration parameters3736 for(UInt layer=0; layer<m_numLayers; layer++)3737 {3738 if ( (m_apcLayerCfg[layer]->m_iIntraPeriod != 1) && !m_loopFilterOffsetInPPS && (!m_bLoopFilterDisable) )3739 {3740 for(Int i=0; i<m_iGOPSize; i++)3741 {3742 xConfirmPara( (m_EhGOPList[layerIdx][i].m_betaOffsetDiv2 + m_loopFilterBetaOffsetDiv2) < -6 || (m_EhGOPList[layerIdx][i].m_betaOffsetDiv2 + m_loopFilterBetaOffsetDiv2) > 6, "Loop Filter Beta Offset div. 2 for one of the GOP entries exceeds supported range (-6 to 6)" );3743 xConfirmPara( (m_EhGOPList[layerIdx][i].m_tcOffsetDiv2 + m_loopFilterTcOffsetDiv2) < -6 || (m_EhGOPList[layerIdx][i].m_tcOffsetDiv2 + m_loopFilterTcOffsetDiv2) > 6, "Loop Filter Tc Offset div. 2 for one of the GOP entries exceeds supported range (-6 to 6)" );3744 }3745 }3746 }3747 3748 //start looping through frames in coding order until we can verify that the GOP structure is correct.3749 while(!verifiedGOP&&!errorGOP)3750 {3751 Int curGOP = (checkGOP-1)%m_iGOPSize;3752 Int curPOC = ((checkGOP-1)/m_iGOPSize)*m_iGOPSize + m_EhGOPList[layerIdx][curGOP].m_POC;3753 if(m_EhGOPList[layerIdx][curGOP].m_POC<0)3754 {3755 printf("\nError: found fewer Reference Picture Sets than GOPSize\n");3756 errorGOP=true;3757 }3758 else3759 {3760 //check that all reference pictures are available, or have a POC < 0 meaning they might be available in the next GOP.3761 Bool beforeI = false;3762 for(Int i = 0; i< m_EhGOPList[layerIdx][curGOP].m_numRefPics; i++)3763 {3764 Int absPOC = curPOC+m_EhGOPList[layerIdx][curGOP].m_referencePics[i];3765 if(absPOC < 0)3766 {3767 beforeI=true;3768 }3769 else3770 {3771 Bool found=false;3772 for(Int j=0; j<numRefs; j++)3773 {3774 if(refList[j]==absPOC)3775 {3776 found=true;3777 for(Int k=0; k<m_iGOPSize; k++)3778 {3779 if(absPOC%m_iGOPSize == m_EhGOPList[layerIdx][k].m_POC%m_iGOPSize)3780 {3781 if(m_EhGOPList[layerIdx][k].m_temporalId==m_EhGOPList[layerIdx][curGOP].m_temporalId)3782 {3783 m_EhGOPList[layerIdx][k].m_refPic = true;3784 }3785 m_EhGOPList[layerIdx][curGOP].m_usedByCurrPic[i]=m_EhGOPList[layerIdx][k].m_temporalId<=m_EhGOPList[layerIdx][curGOP].m_temporalId;3786 }3787 }3788 }3789 }3790 if(!found)3791 {3792 printf("\nError: ref pic %d is not available for GOP frame %d\n",m_EhGOPList[layerIdx][curGOP].m_referencePics[i],curGOP+1);3793 errorGOP=true;3794 }3795 }3796 }3797 if(!beforeI&&!errorGOP)3798 {3799 //all ref frames were present3800 if(!isOK[curGOP])3801 {3802 numOK++;3803 isOK[curGOP]=true;3804 if(numOK==m_iGOPSize)3805 {3806 verifiedGOP=true;3807 }3808 }3809 }3810 else3811 {3812 //create a new GOPEntry for this frame containing all the reference pictures that were available (POC > 0)3813 3814 m_EhGOPList[layerIdx][m_iGOPSize+m_extraRPSs[layerIdx]]=m_EhGOPList[layerIdx][curGOP];3815 Int newRefs=0;3816 for(Int i = 0; i< m_EhGOPList[layerIdx][curGOP].m_numRefPics; i++)3817 {3818 Int absPOC = curPOC+m_EhGOPList[layerIdx][curGOP].m_referencePics[i];3819 if(absPOC>=0)3820 {3821 m_EhGOPList[layerIdx][m_iGOPSize+m_extraRPSs[layerIdx]].m_referencePics[newRefs]=m_EhGOPList[layerIdx][curGOP].m_referencePics[i];3822 m_EhGOPList[layerIdx][m_iGOPSize+m_extraRPSs[layerIdx]].m_usedByCurrPic[newRefs]=m_EhGOPList[layerIdx][curGOP].m_usedByCurrPic[i];3823 newRefs++;3824 }3825 }3826 Int numPrefRefs = m_EhGOPList[layerIdx][curGOP].m_numRefPicsActive;3827 3828 for(Int offset = -1; offset>-checkGOP; offset--)3829 {3830 //step backwards in coding order and include any extra available pictures we might find useful to replace the ones with POC < 0.3831 Int offGOP = (checkGOP-1+offset)%m_iGOPSize;3832 Int offPOC = ((checkGOP-1+offset)/m_iGOPSize)*m_iGOPSize + m_EhGOPList[layerIdx][offGOP].m_POC;3833 if(offPOC>=0&&m_EhGOPList[layerIdx][offGOP].m_temporalId<=m_EhGOPList[layerIdx][curGOP].m_temporalId)3834 {3835 Bool newRef=false;3836 for(Int i=0; i<numRefs; i++)3837 {3838 if(refList[i]==offPOC)3839 {3840 newRef=true;3841 }3842 }3843 for(Int i=0; i<newRefs; i++)3844 {3845 if(m_EhGOPList[layerIdx][m_iGOPSize+m_extraRPSs[layerIdx]].m_referencePics[i]==offPOC-curPOC)3846 {3847 newRef=false;3848 }3849 }3850 if(newRef)3851 {3852 Int insertPoint=newRefs;3853 //this picture can be added, find appropriate place in list and insert it.3854 if(m_EhGOPList[layerIdx][offGOP].m_temporalId==m_EhGOPList[layerIdx][curGOP].m_temporalId)3855 {3856 m_EhGOPList[layerIdx][offGOP].m_refPic = true;3857 }3858 for(Int j=0; j<newRefs; j++)3859 {3860 if(m_EhGOPList[layerIdx][m_iGOPSize+m_extraRPSs[layerIdx]].m_referencePics[j]<offPOC-curPOC||m_EhGOPList[layerIdx][m_iGOPSize+m_extraRPSs[layerIdx]].m_referencePics[j]>0)3861 {3862 insertPoint = j;3863 break;3864 }3865 }3866 Int prev = offPOC-curPOC;3867 Int prevUsed = m_EhGOPList[layerIdx][offGOP].m_temporalId<=m_EhGOPList[layerIdx][curGOP].m_temporalId;3868 for(Int j=insertPoint; j<newRefs+1; j++)3869 {3870 Int newPrev = m_EhGOPList[layerIdx][m_iGOPSize+m_extraRPSs[layerIdx]].m_referencePics[j];3871 Int newUsed = m_EhGOPList[layerIdx][m_iGOPSize+m_extraRPSs[layerIdx]].m_usedByCurrPic[j];3872 m_EhGOPList[layerIdx][m_iGOPSize+m_extraRPSs[layerIdx]].m_referencePics[j]=prev;3873 m_EhGOPList[layerIdx][m_iGOPSize+m_extraRPSs[layerIdx]].m_usedByCurrPic[j]=prevUsed;3874 prevUsed=newUsed;3875 prev=newPrev;3876 }3877 newRefs++;3878 }3879 }3880 if(newRefs>=numPrefRefs)3881 {3882 break;3883 }3884 }3885 m_EhGOPList[layerIdx][m_iGOPSize+m_extraRPSs[layerIdx]].m_numRefPics=newRefs;3886 m_EhGOPList[layerIdx][m_iGOPSize+m_extraRPSs[layerIdx]].m_POC = curPOC;3887 if (m_extraRPSs[layerIdx] == 0)3888 {3889 m_EhGOPList[layerIdx][m_iGOPSize+m_extraRPSs[layerIdx]].m_interRPSPrediction = 0;3890 m_EhGOPList[layerIdx][m_iGOPSize+m_extraRPSs[layerIdx]].m_numRefIdc = 0;3891 }3892 else3893 {3894 Int rIdx = m_iGOPSize + m_extraRPSs[layerIdx] - 1;3895 Int refPOC = m_EhGOPList[layerIdx][rIdx].m_POC;3896 Int refPics = m_EhGOPList[layerIdx][rIdx].m_numRefPics;3897 Int newIdc=0;3898 for(Int i = 0; i<= refPics; i++)3899 {3900 Int deltaPOC = ((i != refPics)? m_EhGOPList[layerIdx][rIdx].m_referencePics[i] : 0); // check if the reference abs POC is >= 03901 Int absPOCref = refPOC+deltaPOC;3902 Int refIdc = 0;3903 for (Int j = 0; j < m_EhGOPList[layerIdx][m_iGOPSize+m_extraRPSs[layerIdx]].m_numRefPics; j++)3904 {3905 if ( (absPOCref - curPOC) == m_EhGOPList[layerIdx][m_iGOPSize+m_extraRPSs[layerIdx]].m_referencePics[j])3906 {3907 if (m_EhGOPList[layerIdx][m_iGOPSize+m_extraRPSs[layerIdx]].m_usedByCurrPic[j])3908 {3909 refIdc = 1;3910 }3911 else3912 {3913 refIdc = 2;3914 }3915 }3916 }3917 m_EhGOPList[layerIdx][m_iGOPSize+m_extraRPSs[layerIdx]].m_refIdc[newIdc]=refIdc;3918 newIdc++;3919 }3920 m_EhGOPList[layerIdx][m_iGOPSize+m_extraRPSs[layerIdx]].m_interRPSPrediction = 1;3921 m_EhGOPList[layerIdx][m_iGOPSize+m_extraRPSs[layerIdx]].m_numRefIdc = newIdc;3922 m_EhGOPList[layerIdx][m_iGOPSize+m_extraRPSs[layerIdx]].m_deltaRPS = refPOC - m_EhGOPList[layerIdx][m_iGOPSize+m_extraRPSs[layerIdx]].m_POC;3923 }3924 curGOP=m_iGOPSize+m_extraRPSs[layerIdx];3925 m_extraRPSs[layerIdx]++;3926 }3927 numRefs=0;3928 for(Int i = 0; i< m_EhGOPList[layerIdx][curGOP].m_numRefPics; i++)3929 {3930 Int absPOC = curPOC+m_EhGOPList[layerIdx][curGOP].m_referencePics[i];3931 if(absPOC >= 0)3932 {3933 refList[numRefs]=absPOC;3934 numRefs++;3935 }3936 }3937 refList[numRefs]=curPOC;3938 numRefs++;3939 }3940 checkGOP++;3941 }3942 xConfirmPara(errorGOP,"Invalid GOP structure given");3943 3944 m_EhMaxTempLayer[layerIdx] = 1;3945 for(Int i=0; i<m_iGOPSize; i++)3946 {3947 if(m_EhGOPList[layerIdx][i].m_temporalId >= m_EhMaxTempLayer[layerIdx] )3948 {3949 m_EhMaxTempLayer[layerIdx] = m_EhGOPList[layerIdx][i].m_temporalId;3950 }3951 xConfirmPara(m_GOPList[i].m_sliceType!='B'&&m_GOPList[i].m_sliceType!='P'&&m_GOPList[i].m_sliceType!='I', "Slice type must be equal to B or P or I");3952 }3953 }3954 #endif3955 3604 3956 3605 m_maxTempLayer = 1; -
branches/SHM-dev/source/App/TAppEncoder/TAppEncCfg.h
r1442 r1448 170 170 Int m_iGOPSize; ///< GOP size of hierarchical structure 171 171 172 #if SVC_EXTENSION 173 Int m_extraRPSs[MAX_LAYERS]; ///< extra RPSs added to handle CRA 174 GOPEntry m_EhGOPList[MAX_LAYERS][MAX_GOP]; ///< the enhancement layer coding structure entries from the config file 175 Int m_inheritCodingStruct[MAX_LAYERS]; 176 Int m_EhMaxTempLayer[MAX_LAYERS]; ///< Max temporal layer 177 #else 172 #if !SVC_EXTENSION 178 173 Int m_extraRPSs; ///< extra RPSs added to handle CRA 179 #endif180 174 181 175 GOPEntry m_GOPList[MAX_GOP]; ///< the coding structure entries from the config file 176 #endif 182 177 Int m_numReorderPics[MAX_TLAYER]; ///< total number of reorder pictures 183 178 Int m_maxDecPicBuffering[MAX_TLAYER]; ///< total number of pictures in the decoded picture buffer … … 221 216 Int m_iQPAdaptationRange; ///< dQP range by QP adaptation 222 217 218 #if !SVC_EXTENSION 223 219 Int m_maxTempLayer; ///< Max temporal layer 220 #endif 224 221 225 222 // coding unit (CU) definition -
branches/SHM-dev/source/App/TAppEncoder/TAppEncLayerCfg.h
r1442 r1448 42 42 Int m_aiPad[2]; ///< number of padded pixels for width and height 43 43 Int m_iIntraPeriod; ///< period of I-slice (random access period) 44 Int m_iGOPSize; ///< GOP size of hierarchical structure 44 45 Double m_fQP; ///< QP value of key-picture (floating point) 45 46 ChromaFormat m_chromaFormatIDC; … … 53 54 Int m_auxId; 54 55 #endif 56 57 Int m_extraRPSs; ///< extra RPSs added to handle CRA 58 GOPEntry m_GOPList[MAX_GOP]; ///< the enhancement layer coding structure entries from the config file 59 Int m_inheritCodingStruct; ///< inherit coding structure from certain layer 60 Int m_maxTempLayer; ///< Max temporal layer 55 61 56 62 Int *m_samplePredRefLayerIds;
Note: See TracChangeset for help on using the changeset viewer.