Changeset 648 in 3DVCSoftware for branches/HTM-8.2-dev0-Cleanup/source/Lib/TLibCommon
- Timestamp:
- 19 Oct 2013, 18:46:09 (12 years ago)
- Location:
- branches/HTM-8.2-dev0-Cleanup/source/Lib/TLibCommon
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HTM-8.2-dev0-Cleanup/source/Lib/TLibCommon/CommonDef.h
r625 r648 187 187 } 188 188 189 #if H_MV5190 189 template <typename T> 191 190 __inline T gCeilLog2( T val ) … … 196 195 return ceilLog2; 197 196 } 198 #endif199 197 200 198 #define RemoveBitIncrement( exp ) ( exp >> ( g_bitDepthY - 8 ) ) -
branches/HTM-8.2-dev0-Cleanup/source/Lib/TLibCommon/TComDataCU.cpp
r647 r648 4804 4804 4805 4805 // use coldir. 4806 #if H_MV54807 4806 TComPic *pColPic = getSlice()->getRefPic( RefPicList(getSlice()->isInterB() ? 1-getSlice()->getColFromL0Flag() : 0), getSlice()->getColRefIdx()); 4808 #else4809 #if H_MV4810 TComPic *pColPic;4811 if (getSlice()->getAltCollocatedIndicationFlag() )4812 {4813 pColPic = getSlice()->getPicFromRefPicSetInterLayer( getSlice()->getActiveMotionPredRefLayerId( getSlice()->getCollocatedRefLayerIdx() ));4814 }4815 else4816 {4817 pColPic = getSlice()->getRefPic( RefPicList(getSlice()->isInterB() ? 1-getSlice()->getColFromL0Flag() : 0), getSlice()->getColRefIdx());4818 }4819 #else4820 TComPic *pColPic = getSlice()->getRefPic( RefPicList(getSlice()->isInterB() ? 1-getSlice()->getColFromL0Flag() : 0), getSlice()->getColRefIdx());4821 #endif4822 #endif4823 4807 TComDataCU *pColCU = pColPic->getCU( uiCUAddr ); 4824 4808 if(pColCU->getPic()==0||pColCU->getPartitionSize(uiPartUnitIdx)==SIZE_NONE) -
branches/HTM-8.2-dev0-Cleanup/source/Lib/TLibCommon/TComSlice.cpp
r646 r648 101 101 , m_enableTMVPFlag ( true ) 102 102 #if H_MV 103 #if H_MV5104 103 , m_refPicSetInterLayer0 ( NULL ) 105 104 , m_refPicSetInterLayer1 ( NULL ) 106 #else107 , m_refPicSetInterLayer ( NULL )108 #endif109 105 , m_layerId (0) 110 106 , m_viewId (0) 111 #if H_MV5112 107 , m_viewIndex (0) 113 #endif114 108 #if H_3D 115 #if !H_MV5116 , m_viewIndex (0)117 #endif118 109 , m_isDepth (false) 119 110 #endif 120 #if H_MV5121 111 , m_pocResetFlag (false) 122 #endif123 112 , m_discardableFlag (false) 124 113 , m_interLayerPredEnabledFlag (false) 125 114 , m_numInterLayerRefPicsMinus1 (0) 126 #if !H_MV5127 , m_interLayerSamplePredOnlyFlag (false)128 , m_altCollocatedIndicationFlag (0)129 , m_collocatedRefLayerIdx (0)130 #endif131 115 #if H_3D_IC 132 116 , m_bApplyIC ( false ) … … 164 148 for (Int i = 0; i < MAX_NUM_LAYERS; i++ ) 165 149 { 166 #if H_MV5167 150 m_interLayerPredLayerIdc[ i ] = i; 168 #else169 m_interLayerPredLayerIdc[ i ] = 0;170 #endif171 151 } 172 152 #endif … … 387 367 } 388 368 } 389 #if H_MV5390 369 #if !H_MV 391 370 #if FIX1071 … … 730 709 } 731 710 #endif 732 #else 711 Int TComSlice::getNumRpsCurrTempList() 712 { 713 Int numRpsCurrTempList = 0; 714 715 if (m_eSliceType == I_SLICE) 716 { 717 return 0; 718 } 719 for(UInt i=0; i < m_pcRPS->getNumberOfNegativePictures()+ m_pcRPS->getNumberOfPositivePictures() + m_pcRPS->getNumberOfLongtermPictures(); i++) 720 { 721 if(m_pcRPS->getUsed(i)) 722 { 723 numRpsCurrTempList++; 724 } 725 } 733 726 #if H_MV 734 Void TComSlice::setRefPicList( TComList<TComPic*>& rcListPic, std::vector<TComPic*>& refPicSetInterLayer , Bool checkNumPocTotalCurr)735 #else736 #if FIX1071737 Void TComSlice::setRefPicList( TComList<TComPic*>& rcListPic, Bool checkNumPocTotalCurr )738 #else739 Void TComSlice::setRefPicList( TComList<TComPic*>& rcListPic )740 #endif741 #endif742 {743 #if FIX1071744 if (!checkNumPocTotalCurr)745 #endif746 {747 if (m_eSliceType == I_SLICE)748 {749 ::memset( m_apcRefPicList, 0, sizeof (m_apcRefPicList));750 ::memset( m_aiNumRefIdx, 0, sizeof ( m_aiNumRefIdx ));751 752 return;753 }754 755 #if !H_MV756 m_aiNumRefIdx[0] = getNumRefIdx(REF_PIC_LIST_0);757 m_aiNumRefIdx[1] = getNumRefIdx(REF_PIC_LIST_1);758 #endif759 }760 761 TComPic* pcRefPic= NULL;762 TComPic* RefPicSetStCurr0[16];763 TComPic* RefPicSetStCurr1[16];764 TComPic* RefPicSetLtCurr[16];765 UInt NumPocStCurr0 = 0;766 UInt NumPocStCurr1 = 0;767 UInt NumPocLtCurr = 0;768 Int i;769 770 for(i=0; i < m_pcRPS->getNumberOfNegativePictures(); i++)771 {772 if(m_pcRPS->getUsed(i))773 {774 pcRefPic = xGetRefPic(rcListPic, getPOC()+m_pcRPS->getDeltaPOC(i));775 pcRefPic->setIsLongTerm(0);776 pcRefPic->getPicYuvRec()->extendPicBorder();777 RefPicSetStCurr0[NumPocStCurr0] = pcRefPic;778 NumPocStCurr0++;779 pcRefPic->setCheckLTMSBPresent(false);780 }781 }782 783 for(; i < m_pcRPS->getNumberOfNegativePictures()+m_pcRPS->getNumberOfPositivePictures(); i++)784 {785 if(m_pcRPS->getUsed(i))786 {787 pcRefPic = xGetRefPic(rcListPic, getPOC()+m_pcRPS->getDeltaPOC(i));788 pcRefPic->setIsLongTerm(0);789 pcRefPic->getPicYuvRec()->extendPicBorder();790 RefPicSetStCurr1[NumPocStCurr1] = pcRefPic;791 NumPocStCurr1++;792 pcRefPic->setCheckLTMSBPresent(false);793 }794 }795 796 for(i = m_pcRPS->getNumberOfNegativePictures()+m_pcRPS->getNumberOfPositivePictures()+m_pcRPS->getNumberOfLongtermPictures()-1; i > m_pcRPS->getNumberOfNegativePictures()+m_pcRPS->getNumberOfPositivePictures()-1 ; i--)797 {798 if(m_pcRPS->getUsed(i))799 {800 pcRefPic = xGetLongTermRefPic(rcListPic, m_pcRPS->getPOC(i), m_pcRPS->getCheckLTMSBPresent(i));801 pcRefPic->setIsLongTerm(1);802 pcRefPic->getPicYuvRec()->extendPicBorder();803 RefPicSetLtCurr[NumPocLtCurr] = pcRefPic;804 NumPocLtCurr++;805 }806 if(pcRefPic==NULL)807 {808 pcRefPic = xGetLongTermRefPic(rcListPic, m_pcRPS->getPOC(i), m_pcRPS->getCheckLTMSBPresent(i));809 }810 pcRefPic->setCheckLTMSBPresent(m_pcRPS->getCheckLTMSBPresent(i));811 }812 813 // ref_pic_list_init814 TComPic* rpsCurrList0[MAX_NUM_REF+1];815 TComPic* rpsCurrList1[MAX_NUM_REF+1];816 #if H_MV817 Int numPocInterCurr = NumPocStCurr0 + NumPocStCurr1 + NumPocLtCurr;818 assert( numPocInterCurr == 0 || getInterRefEnabledInRPLFlag() );819 Int numPocTotalCurr = numPocInterCurr + getNumActiveRefLayerPics( );820 assert( numPocTotalCurr == getNumRpsCurrTempList() );821 #else822 Int numPocTotalCurr = NumPocStCurr0 + NumPocStCurr1 + NumPocLtCurr;823 #endif824 #if FIX1071825 if (checkNumPocTotalCurr)826 {827 // The variable NumPocTotalCurr is derived as specified in subclause 7.4.7.2. It is a requirement of bitstream conformance that the following applies to the value of NumPocTotalCurr:828 #if H_MV829 // ??If nuh_layer_id is equal to 0 and the current picture is a BLA picture or a CRA picture, the value of NumPocTotalCurr shall be equal to 0.830 // ??Otherwise, when the current picture contains a P or B slice, the value of NumPocTotalCurr shall not be equal to 0.831 if ( getRapPicFlag() && m_layerId == 0 )832 #else833 // ??If the current picture is a BLA or CRA picture, the value of NumPocTotalCurr shall be equal to 0.834 // ??Otherwise, when the current picture contains a P or B slice, the value of NumPocTotalCurr shall not be equal to 0.835 if (getRapPicFlag())836 #endif837 {838 assert(numPocTotalCurr == 0);839 }840 841 if (m_eSliceType == I_SLICE)842 {843 ::memset( m_apcRefPicList, 0, sizeof (m_apcRefPicList));844 ::memset( m_aiNumRefIdx, 0, sizeof ( m_aiNumRefIdx ));845 846 return;847 }848 849 assert(numPocTotalCurr > 0);850 851 m_aiNumRefIdx[0] = getNumRefIdx(REF_PIC_LIST_0);852 m_aiNumRefIdx[1] = getNumRefIdx(REF_PIC_LIST_1);853 }854 #endif855 856 Int cIdx = 0;857 #if H_MV858 if ( getInterRefEnabledInRPLFlag() )859 {860 #endif861 for ( i=0; i<NumPocStCurr0; i++, cIdx++)862 {863 rpsCurrList0[cIdx] = RefPicSetStCurr0[i];864 }865 for ( i=0; i<NumPocStCurr1; i++, cIdx++)866 {867 rpsCurrList0[cIdx] = RefPicSetStCurr1[i];868 }869 for ( i=0; i<NumPocLtCurr; i++, cIdx++)870 {871 rpsCurrList0[cIdx] = RefPicSetLtCurr[i];872 }873 #if H_MV874 }875 for ( i=0; i < getNumActiveRefLayerPics( ); i++, cIdx++)876 {877 assert( cIdx < MAX_NUM_REF );878 rpsCurrList0[cIdx] = refPicSetInterLayer[i];879 }880 #endif881 assert(cIdx == numPocTotalCurr);882 883 if (m_eSliceType==B_SLICE)884 {885 cIdx = 0;886 #if H_MV887 if ( getInterRefEnabledInRPLFlag() )888 {889 #endif890 for ( i=0; i<NumPocStCurr1; i++, cIdx++)891 {892 rpsCurrList1[cIdx] = RefPicSetStCurr1[i];893 }894 for ( i=0; i<NumPocStCurr0; i++, cIdx++)895 {896 rpsCurrList1[cIdx] = RefPicSetStCurr0[i];897 }898 for ( i=0; i<NumPocLtCurr; i++, cIdx++)899 {900 rpsCurrList1[cIdx] = RefPicSetLtCurr[i];901 }902 #if H_MV903 }904 for ( i=0; i < getNumActiveRefLayerPics( ); i++, cIdx++)905 {906 assert( cIdx < MAX_NUM_REF );907 rpsCurrList1[cIdx] = refPicSetInterLayer[i];908 }909 #endif910 assert(cIdx == numPocTotalCurr);911 }912 913 ::memset(m_bIsUsedAsLongTerm, 0, sizeof(m_bIsUsedAsLongTerm));914 915 #if H_MV916 Int numPocSt = NumPocStCurr0 + NumPocStCurr1;917 assert( getInterRefEnabledInRPLFlag( ) || numPocSt == 0 );918 919 for (Int li = 0; li < 2; li++)920 {921 if ( m_eSliceType == P_SLICE && li == 1 )922 {923 m_aiNumRefIdx[1] = 0;924 ::memset( m_apcRefPicList[1], 0, sizeof(m_apcRefPicList[1]));925 }926 else927 {928 for (Int rIdx = 0; rIdx <= (m_aiNumRefIdx[ li ] - 1 ); rIdx ++)929 {930 Bool listModified = m_RefPicListModification.getRefPicListModificationFlagL( li );931 Int orgIdx = listModified ? m_RefPicListModification.getRefPicSetIdxL(li, rIdx) : (rIdx % numPocTotalCurr);932 933 m_apcRefPicList [li][rIdx] = ( li == 0 ) ? rpsCurrList0[ orgIdx ] : rpsCurrList1[ orgIdx ];934 m_bIsUsedAsLongTerm[li][rIdx] = ( orgIdx >= numPocSt ) ;935 }936 }937 }938 #else939 for (Int rIdx = 0; rIdx < m_aiNumRefIdx[0]; rIdx ++)940 {941 cIdx = m_RefPicListModification.getRefPicListModificationFlagL0() ? m_RefPicListModification.getRefPicSetIdxL0(rIdx) : rIdx % numPocTotalCurr;942 assert(cIdx >= 0 && cIdx < numPocTotalCurr);943 m_apcRefPicList[0][rIdx] = rpsCurrList0[ cIdx ];944 m_bIsUsedAsLongTerm[0][rIdx] = ( cIdx >= NumPocStCurr0 + NumPocStCurr1 );945 }946 if ( m_eSliceType != B_SLICE )947 {948 m_aiNumRefIdx[1] = 0;949 ::memset( m_apcRefPicList[1], 0, sizeof(m_apcRefPicList[1]));950 }951 else952 {953 for (Int rIdx = 0; rIdx < m_aiNumRefIdx[1]; rIdx ++)954 {955 cIdx = m_RefPicListModification.getRefPicListModificationFlagL1() ? m_RefPicListModification.getRefPicSetIdxL1(rIdx) : rIdx % numPocTotalCurr;956 assert(cIdx >= 0 && cIdx < numPocTotalCurr);957 m_apcRefPicList[1][rIdx] = rpsCurrList1[ cIdx ];958 m_bIsUsedAsLongTerm[1][rIdx] = ( cIdx >= NumPocStCurr0 + NumPocStCurr1 );959 }960 }961 #endif962 }963 964 #endif965 Int TComSlice::getNumRpsCurrTempList()966 {967 Int numRpsCurrTempList = 0;968 969 if (m_eSliceType == I_SLICE)970 {971 return 0;972 }973 for(UInt i=0; i < m_pcRPS->getNumberOfNegativePictures()+ m_pcRPS->getNumberOfPositivePictures() + m_pcRPS->getNumberOfLongtermPictures(); i++)974 {975 if(m_pcRPS->getUsed(i))976 {977 numRpsCurrTempList++;978 }979 }980 #if H_MV981 #if !H_MV5982 assert( ( numRpsCurrTempList == 0 ) || getInterRefEnabledInRPLFlag() );983 #endif984 727 numRpsCurrTempList = numRpsCurrTempList + getNumActiveRefLayerPics(); 985 728 #endif … … 1295 1038 #if H_MV 1296 1039 // Additional slice header syntax elements 1297 #if H_MV51298 1040 m_pocResetFlag = pSrc->m_pocResetFlag; 1299 #endif1300 1041 m_discardableFlag = pSrc->m_discardableFlag; 1301 1042 m_interLayerPredEnabledFlag = pSrc->m_interLayerPredEnabledFlag; … … 1306 1047 m_interLayerPredLayerIdc[ layer ] = pSrc->m_interLayerPredLayerIdc[ layer ]; 1307 1048 } 1308 #if !H_MV51309 m_interLayerSamplePredOnlyFlag = pSrc->m_interLayerSamplePredOnlyFlag;1310 m_altCollocatedIndicationFlag = pSrc->m_altCollocatedIndicationFlag ;1311 m_collocatedRefLayerIdx = pSrc->m_collocatedRefLayerIdx ;1312 m_numActiveMotionPredRefLayers = pSrc->m_numActiveMotionPredRefLayers;1313 1314 for (Int layer = 0; layer < MAX_NUM_LAYER_IDS; layer++)1315 {1316 m_interLayerPredLayerIdc[layer] = pSrc->m_interLayerPredLayerIdc[layer];1317 }1318 #endif1319 1049 #endif 1320 1050 #if H_3D_IC … … 1781 1511 : m_VPSId ( 0) 1782 1512 , m_uiMaxTLayers ( 1) 1783 #if H_MV51784 1513 #if H_MV 1785 1514 , m_uiMaxLayersMinus1 ( 0) 1786 #else1787 , m_uiMaxLayers ( 1)1788 #endif1789 1515 #else 1790 1516 , m_uiMaxLayers ( 1) … … 1800 1526 , m_hrdOpSetIdx (NULL) 1801 1527 , m_cprmsPresentFlag (NULL) 1802 #if H_MV51803 1528 #if H_MV 1804 1529 , m_vpsVUI ( NULL ) 1805 #endif1806 1530 #endif 1807 1531 { … … 1848 1572 1849 1573 m_avcBaseLayerFlag = false; 1850 #if H_MV51851 1574 m_vpsVuiOffset = 0; 1852 #endif1853 1575 m_splittingFlag = false; 1854 1576 1855 1577 for( Int i = 0; i < MAX_NUM_SCALABILITY_TYPES; i++ ) 1856 1578 { 1857 #if H_MV51858 1579 m_scalabilityMaskFlag[i] = false; 1859 #else1860 m_scalabilityMask[i] = false;1861 #endif1862 1580 m_dimensionIdLen [i] = -1; 1863 1581 } … … 1885 1603 m_layerIdInNuh [i] = ( i == 0 ) ? 0 : -1; 1886 1604 m_numDirectRefLayers[i] = 0; 1887 #if H_MV51888 1605 m_maxTidIlRefPicPlus1[i] = 7; 1889 1606 m_vpsRepFormatIdx [i] = 0; 1890 1607 m_repFormat [i] = NULL; 1891 1608 m_viewIdVal [i] = 0; 1892 #else1893 m_maxTidIlRefPicPlus1[i] = -1;1894 #endif1895 1609 1896 1610 #if H_3D … … 1935 1649 #endif 1936 1650 } 1937 #if H_MV51938 1651 m_vpsVUI = new TComVPSVUI; 1939 #endif1940 1652 #if H_3D 1941 1653 for( Int i = 0; i < MAX_NUM_LAYERS; i++ ) … … 1963 1675 if( m_hrdOpSetIdx != NULL ) delete[] m_hrdOpSetIdx; 1964 1676 if( m_cprmsPresentFlag != NULL ) delete[] m_cprmsPresentFlag; 1965 #if H_MV51966 1677 #if H_MV 1967 1678 if ( m_vpsVUI != NULL ) delete m_vpsVUI; … … 1983 1694 #endif 1984 1695 } 1985 #endif1986 #else1987 #if H_3D_DIM_DLT1988 for( Int i = 0; i < MAX_NUM_LAYERS; i++ )1989 {1990 if ( m_iDepthValue2Idx[i] != 0 )1991 {1992 xFree( m_iDepthValue2Idx[i] );1993 m_iDepthValue2Idx[i] = 0;1994 }1995 1996 if ( m_iIdx2DepthValue[i] != 0 )1997 {1998 xFree( m_iIdx2DepthValue[i] );1999 m_iIdx2DepthValue[i] = 0;2000 2001 }2002 }2003 #endif2004 1696 #endif 2005 1697 } … … 2072 1764 Bool TComVPS::checkVPSExtensionSyntax() 2073 1765 { 2074 #if H_MV52075 1766 for( Int layer = 1; layer <= getMaxLayersMinus1(); layer++ ) 2076 #else2077 for( Int layer = 1; layer < getMaxLayers(); layer++ )2078 #endif2079 1767 { 2080 1768 // check layer_id_in_nuh constraint … … 2092 1780 { 2093 1781 assert( scalType >= 0 && scalType <= MAX_NUM_SCALABILITY_TYPES ); 2094 #if H_MV52095 1782 assert( scalType == MAX_NUM_SCALABILITY_TYPES || getScalabilityMaskFlag( scalType ) ); 2096 #else2097 assert( scalType == MAX_NUM_SCALABILITY_TYPES || getScalabilityMask( scalType ) );2098 #endif2099 1783 Int scalIdx = 0; 2100 1784 for( Int curScalType = 0; curScalType < scalType; curScalType++ ) 2101 1785 { 2102 #if H_MV52103 1786 scalIdx += ( getScalabilityMaskFlag( curScalType ) ? 1 : 0 ); 2104 #else2105 scalIdx += ( getScalabilityMask( curScalType ) ? 1 : 0 );2106 #endif2107 1787 2108 1788 } … … 2110 1790 return scalIdx; 2111 1791 } 2112 #if H_MV52113 1792 Void TComVPS::setScalabilityMaskFlag( UInt val ) 2114 1793 { … … 2118 1797 } 2119 1798 } 2120 #else 2121 Void TComVPS::setScalabilityMask( UInt val ) 2122 { 2123 for ( Int scalType = 0; scalType < MAX_NUM_SCALABILITY_TYPES; scalType++ ) 2124 setScalabilityMask( scalType, ( val & (1 << scalType ) ) != 0 ); 2125 } 2126 2127 #endif 2128 2129 #if H_MV5 1799 2130 1800 Void TComVPS::setRefLayers() 2131 1801 { … … 2176 1846 } 2177 1847 #endif // H_3D 2178 #else2179 Void TComVPS::setRefLayers()2180 {2181 for( Int i = 0; i < MAX_NUM_LAYERS; i++ )2182 {2183 m_numSamplePredRefLayers[ i ] = 0;2184 m_numMotionPredRefLayers[ i ] = 0;2185 m_numDirectRefLayers[ i ] = 0;2186 for( Int j = 0; j < MAX_NUM_LAYERS; j++ ) {2187 m_samplePredEnabledFlag[ i ][ j ] = 0;2188 m_motionPredEnabledFlag[ i ][ j ] = 0;2189 m_refLayerId[ i ][ j ] = 0;2190 m_samplePredRefLayerId[ i ][ j ] = 0;2191 m_motionPredRefLayerId[ i ][ j ] = 0;2192 }2193 }2194 2195 for( Int i = 1; i <= getMaxLayers()- 1; i++ )2196 {2197 for( Int j = 0; j < i; j++ )2198 {2199 if( getDirectDependencyFlag(i,j) )2200 {2201 m_refLayerId[ i ][m_numDirectRefLayers[ i ]++ ] = getLayerIdInNuh( j );2202 2203 m_samplePredEnabledFlag [ i ][ j ] = ( ( getDirectDependencyType( i , j ) + 1 ) & 1 ) == 1;2204 m_numSamplePredRefLayers[ i ] += m_samplePredEnabledFlag [ i ][ j ] ? 1 : 0;2205 m_motionPredEnabledFlag [ i ][ j ] = ( ( ( getDirectDependencyType( i , j ) + 1 ) & 2 ) >> 1 ) == 1;2206 m_numMotionPredRefLayers[ i ] += m_motionPredEnabledFlag [ i][ j ] ? 1 : 0;2207 }2208 }2209 }2210 2211 for( Int i = 1, mIdx = 0, sIdx = 0; i <= getMaxLayers()- 1; i++ )2212 {2213 for( Int j = 0 ; j < i; j++ )2214 {2215 if( m_motionPredEnabledFlag[ i ][ j ] )2216 {2217 m_motionPredRefLayerId[ i ][ mIdx++ ] = getLayerIdInNuh( j );2218 }2219 2220 if( m_samplePredEnabledFlag[ i ][ j ] )2221 {2222 m_samplePredRefLayerId[ i ][ sIdx++ ] = getLayerIdInNuh( j );2223 }2224 }2225 }2226 }2227 2228 Int TComVPS::getRefLayerId( Int layerIdInVps, Int idx )2229 {2230 assert( idx >= 0 && idx < m_numDirectRefLayers[layerIdInVps] );2231 Int layerIdInNuh = m_refLayerId[ layerIdInVps ][ idx ];2232 assert ( layerIdInNuh >= 0 );2233 return layerIdInNuh;2234 }2235 2236 Int TComVPS::getScalabilityId( Int layerIdInVps, ScalabilityType scalType )2237 {2238 return getScalabilityMask( scalType ) ? getDimensionId( layerIdInVps, scalTypeToScalIdx( scalType ) ) : 0;2239 }2240 2241 #if H_3D2242 Void TComVPS::initViewIndex()2243 {2244 Int viewIdList [ MAX_NUM_LAYERS ]; // ed. should be changed to MAX_VIEW_ID2245 Int viewIndexList[ MAX_NUM_LAYERS ];2246 Int numViewIds = 0;2247 2248 for ( Int i = 0 ; i < m_uiMaxLayers; i++ )2249 {2250 Int currViewId = getViewId( i );2251 2252 Bool viewIdInListFlag = false;2253 for ( Int j = 0; j < numViewIds; j ++ )2254 {2255 viewIdInListFlag = viewIdInListFlag || ( currViewId == viewIdList[ j ] );2256 }2257 2258 if ( !viewIdInListFlag )2259 {2260 viewIdList [ numViewIds ] = currViewId;2261 viewIndexList[ currViewId ] = numViewIds;2262 2263 numViewIds++;2264 }2265 2266 m_viewIndex[ i ] = viewIndexList[ currViewId ];2267 }2268 }2269 2270 Int TComVPS::getLayerIdInNuh( Int viewIndex, Bool depthFlag )2271 {2272 Int foundlayerId = -1;2273 2274 for (Int layer = 0 ; layer < m_uiMaxLayers; layer++ )2275 {2276 if( ( getViewIndex( layer ) == viewIndex ) && ( getDepthId( layer ) == ( depthFlag ? 1 : 0 ) ) )2277 {2278 foundlayerId = layer;2279 break;2280 }2281 }2282 assert( foundlayerId != -1 );2283 2284 return getLayerIdInNuh( foundlayerId );2285 }2286 2287 #endif // H_3D2288 2289 Int TComVPS::xCeilLog2( Int val )2290 {2291 assert( val > 0 );2292 Int ceilLog2 = 0;2293 while( val > ( 1 << ceilLog2 ) ) ceilLog2++;2294 return ceilLog2;2295 }2296 2297 #endif // H_MV52298 1848 2299 1849 … … 2336 1886 return numLayersInIdList; 2337 1887 } 2338 #if H_MV52339 1888 Int TComVPS::getNumViews() 2340 1889 { … … 2366 1915 return dependentFlag; 2367 1916 } 2368 #endif2369 1917 #endif // H_MV 2370 1918 … … 2417 1965 , m_vuiParameters () 2418 1966 #if H_MV 2419 #if H_MV52420 1967 , m_pcVPS ( NULL ) 2421 1968 , m_spsInferScalingListFlag ( false ) … … 2423 1970 , m_updateRepFormatFlag ( true ) 2424 1971 , m_interViewMvVertConstraintFlag (false) 2425 #else2426 , m_interViewMvVertConstraintFlag (false)2427 , m_numIlpRestrictedRefLayers ( 0 )2428 #endif2429 1972 #endif 2430 1973 #if H_3D … … 2441 1984 ::memset(m_ltRefPicPocLsbSps, 0, sizeof(m_ltRefPicPocLsbSps)); 2442 1985 ::memset(m_usedByCurrPicLtSPSFlag, 0, sizeof(m_usedByCurrPicLtSPSFlag)); 2443 #if !H_MV52444 #if H_MV2445 for (Int i = 0; i < MAX_NUM_LAYERS; i++ )2446 {2447 m_minSpatialSegmentOffsetPlus1[ i ] = 0;2448 m_ctuBasedOffsetEnabledFlag [ i ] = false;2449 m_minHorizontalCtuOffsetPlus1 [ i ] = 0;2450 }2451 #endif2452 #endif2453 1986 } 2454 1987 … … 2603 2136 , m_listsModificationPresentFlag( 0) 2604 2137 , m_numExtraSliceHeaderBits(0) 2605 #if H_MV52606 2138 #if H_MV 2607 2139 , m_ppsInferScalingListFlag(false) 2608 2140 , m_ppsScalingListRefLayerId(0) 2609 2141 #endif 2610 #endif2611 2142 { 2612 2143 m_scalingList = new TComScalingList; … … 2628 2159 } 2629 2160 2630 #if H_MV52631 2161 #if H_MV 2632 2162 Void TComSPS::inferRepFormat( TComVPS* vps, Int layerIdCurr ) … … 2679 2209 } 2680 2210 } 2681 #endif2682 2211 #endif 2683 2212 #if H_3D … … 2950 2479 2951 2480 #if H_MV 2952 #if H_MV52953 2481 Void TComSlice::createInterLayerReferencePictureSet( TComPicLists* ivPicLists, std::vector<TComPic*>& refPicSetInterLayer0, std::vector<TComPic*>& refPicSetInterLayer1 ) 2954 2482 { … … 2982 2510 } 2983 2511 } 2984 #else 2985 Void TComSlice::createAndApplyIvReferencePictureSet( TComPicLists* ivPicLists, std::vector<TComPic*>& refPicSetInterLayer ) 2986 { 2987 refPicSetInterLayer.clear(); 2988 2989 for( Int i = 0; i < getNumActiveRefLayerPics(); i++ ) 2990 { 2991 Int layerIdRef = getRefPicLayerId( i ); 2992 TComPic* picRef = ivPicLists->getPic( layerIdRef, getPOC() ) ; 2993 assert ( picRef != 0 ); 2994 2995 picRef->getPicYuvRec()->extendPicBorder(); 2996 picRef->setIsLongTerm( true ); 2997 picRef->getSlice(0)->setReferenced( true ); 2998 2999 // Consider to check here: 3000 // "If the current picture is a RADL picture, there shall be no entry in the RefPicSetInterLayer that is a RASL picture. " 3001 refPicSetInterLayer.push_back( picRef ); 3002 } 3003 } 3004 #endif 3005 3006 #if H_MV5 2512 3007 2513 Void TComSlice::markIvRefPicsAsShortTerm( std::vector<TComPic*> refPicSetInterLayer0, std::vector<TComPic*> refPicSetInterLayer1 ) 3008 2514 { … … 3019 2525 3020 2526 } 3021 #else3022 Void TComSlice::markIvRefPicsAsShortTerm( std::vector<TComPic*> refPicSetInterLayer )3023 {3024 // Mark as shortterm3025 for ( Int i = 0; i < refPicSetInterLayer.size(); i++ )3026 {3027 refPicSetInterLayer[i]->setIsLongTerm( false );3028 }3029 }3030 3031 #endif3032 2527 Void TComSlice::markIvRefPicsAsUnused( TComPicLists* ivPicLists, std::vector<Int> targetDecLayerIdSet, TComVPS* vps, Int curLayerId, Int curPoc ) 3033 2528 { … … 3035 2530 if (targetDecLayerIdSet.size() == 0 ) 3036 2531 { 3037 #if H_MV53038 2532 for ( Int layerIdInVps = 0; layerIdInVps <= vps->getMaxLayersMinus1(); layerIdInVps++ ) 3039 #else3040 for ( Int layerIdInVps = 0; layerIdInVps < vps->getMaxLayers(); layerIdInVps++ )3041 #endif3042 2533 { 3043 2534 targetDecLayerIdSet.push_back( vps->getLayerIdInNuh( layerIdInVps ) ); … … 3068 2559 if ( vps->nuhLayerIdIncluded( targetDecLayerIdSet[ j ] ) ) 3069 2560 { 3070 #if H_MV53071 2561 for( Int k = 0; k < vpsSlice->getNumDirectRefLayers( targetDecLayerIdSet[ j ] ); k++ ) 3072 2562 { 3073 2563 if ( targetDecLayerIdSet[ i ] == vpsSlice->getRefLayerId( targetDecLayerIdSet[ j ], k ) ) 3074 #else3075 Int targetDecLayerIdinVPS = vpsSlice->getLayerIdInVps( targetDecLayerIdSet[ j ] );3076 for( Int k = 0; k < vpsSlice->getNumDirectRefLayers( targetDecLayerIdinVPS ); k++ )3077 {3078 if ( targetDecLayerIdSet[ i ] == vpsSlice->getRefLayerId( targetDecLayerIdinVPS, k ) )3079 #endif3080 2564 { 3081 2565 remainingInterLayerReferencesFlag = true; … … 3093 2577 } 3094 2578 3095 #if H_MV53096 2579 Void TComSlice::printRefPicList() 3097 #else3098 Void TComSlice::xPrintRefPicList()3099 #endif3100 2580 { 3101 2581 for ( Int li = 0; li < 2; li++) … … 3110 2590 } 3111 2591 } 3112 #if !H_MV53113 Int TComSlice::xCeilLog2( Int val )3114 {3115 assert( val > 0 );3116 Int ceilLog2 = 0;3117 while( val > ( 1 << ceilLog2 ) ) ceilLog2++;3118 return ceilLog2;3119 }3120 #endif3121 2592 3122 2593 Void TComSlice::markCurrPic( TComPic* currPic ) … … 3133 2604 } 3134 2605 3135 #if H_MV53136 2606 Void TComSlice::setRefPicSetInterLayer( std::vector<TComPic*>* refPicSetInterLayer0, std::vector<TComPic*>* refPicSetInterLayer1 ) 3137 2607 { … … 3158 2628 return pcPic; 3159 2629 } 3160 #else3161 Void TComSlice::setRefPicSetInterLayer( std::vector<TComPic*>* refPicSetInterLayer )3162 {3163 m_refPicSetInterLayer = refPicSetInterLayer;3164 }3165 3166 TComPic* TComSlice::getPicFromRefPicSetInterLayer( Int layerId )3167 {3168 assert( m_refPicSetInterLayer != 0 );3169 assert( (*m_refPicSetInterLayer).size() == getNumActiveRefLayerPics() );3170 TComPic* pcPic = NULL;3171 for ( Int i = 0; i < getNumActiveRefLayerPics(); i++ )3172 {3173 if ((*m_refPicSetInterLayer)[ i ]->getLayerId() == layerId)3174 {3175 pcPic = (*m_refPicSetInterLayer)[ i ];3176 }3177 }3178 assert(pcPic != NULL);3179 return pcPic;3180 }3181 #endif3182 2630 Int TComSlice::getNumActiveRefLayerPics() 3183 2631 { 3184 2632 Int numActiveRefLayerPics; 3185 2633 3186 #if H_MV53187 2634 if( getLayerId() == 0 || getVPS()->getNumDirectRefLayers( getLayerId() ) == 0 ) 3188 2635 { … … 3198 2645 } 3199 2646 else if( getVPS()->getMaxOneActiveRefLayerFlag() || getVPS()->getNumDirectRefLayers( getLayerId() ) == 1 ) 3200 #else3201 if( getLayerId() == 0 || getVPS()->getNumDirectRefLayers( getLayerIdInVps() ) == 0 || !getInterLayerPredEnabledFlag() )3202 {3203 numActiveRefLayerPics = 0;3204 }3205 else if( getVPS()->getMaxOneActiveRefLayerFlag() || getVPS()->getNumDirectRefLayers( getLayerIdInVps() ) == 1 )3206 #endif3207 2647 { 3208 2648 numActiveRefLayerPics = 1; … … 3217 2657 Int TComSlice::getRefPicLayerId( Int i ) 3218 2658 { 3219 #if H_MV53220 2659 return getVPS()->getRefLayerId( getLayerId(), getInterLayerPredLayerIdc( i ) ); 3221 #else 3222 return getVPS()->getRefLayerId( getLayerIdInVps(), getInterLayerPredLayerIdc( i ) ); 3223 #endif 3224 } 3225 3226 #if !H_MV5 3227 Void TComSlice::setActiveMotionPredRefLayers() 3228 { 3229 Int j = 0; 3230 for( Int i = 0; i < getNumActiveRefLayerPics(); i++) 3231 { 3232 if( getVPS()->getMotionPredEnabledFlag( getLayerIdInVps(), getInterLayerPredLayerIdc( i )) ) 3233 { 3234 m_activeMotionPredRefLayerId[ j++ ] = getVPS()->getRefLayerId( getLayerIdInVps(), i ); 3235 } 3236 } 3237 m_numActiveMotionPredRefLayers = j; 3238 3239 // Consider incorporating bitstream conformance tests on derived variables here. 3240 } 3241 3242 Bool TComSlice::getInterRefEnabledInRPLFlag() 3243 { 3244 Bool interRefEnabledInRPLFlag; 3245 if ( getVPS()->getNumSamplePredRefLayers( getLayerIdInVps() ) > 0 && getNumActiveRefLayerPics() > 0 ) 3246 { 3247 interRefEnabledInRPLFlag = !getInterLayerSamplePredOnlyFlag(); 3248 } 3249 else 3250 { 3251 interRefEnabledInRPLFlag = 1; 3252 } 3253 return interRefEnabledInRPLFlag; 3254 } 3255 #endif 2660 } 2661 3256 2662 #if H_3D_ARP 3257 2663 Void TComSlice::setARPStepNum() … … 3531 2937 } 3532 2938 3533 #if H_MV53534 2939 #if H_MV 3535 2940 Void TComScalingList::inferFrom( TComScalingList* srcScLi ) … … 3545 2950 } 3546 2951 } 3547 #endif3548 2952 #endif 3549 2953 /** initialization process of quantization matrix array … … 3636 3040 , m_ppsMap(MAX_NUM_PPS) 3637 3041 , m_activeVPSId(-1) 3638 #if H_MV53639 3042 #if !H_MV 3640 3043 , m_activeSPSId(-1) … … 3649 3052 } 3650 3053 #endif 3651 #else3652 , m_activeSPSId(-1)3653 , m_activePPSId(-1)3654 {3655 #endif3656 3054 } 3657 3055 … … 3663 3061 //! activate a SPS from a active parameter sets SEI message 3664 3062 //! \returns true, if activation is successful 3665 #if H_MV53666 3063 #if H_MV 3667 3064 Bool ParameterSetManager::activateSPSWithSEI(Int spsId, Int layerId ) … … 3669 3066 Bool ParameterSetManager::activateSPSWithSEI(Int spsId) 3670 3067 #endif 3671 #else3672 Bool ParameterSetManager::activateSPSWithSEI(Int spsId)3673 #endif3674 3068 { 3675 3069 TComSPS *sps = m_spsMap.getPS(spsId); … … 3680 3074 { 3681 3075 m_activeVPSId = vpsId; 3682 #if !H_MV53683 m_activeSPSId = spsId;3684 #else3685 3076 #if H_MV 3686 3077 m_activeSPSId[ layerId ] = spsId; … … 3688 3079 m_activeSPSId = spsId; 3689 3080 #endif 3690 #endif3691 3081 return true; 3692 3082 } … … 3705 3095 //! activate a PPS and depending on isIDR parameter also SPS and VPS 3706 3096 //! \returns true, if activation is successful 3707 #if H_MV53708 3097 #if H_MV 3709 3098 Bool ParameterSetManager::activatePPS(Int ppsId, Bool isIRAP, Int layerId ) … … 3742 3131 m_activeSPSId[ layerId ] = spsId; 3743 3132 #else 3744 m_activePPSId = ppsId;3745 m_activeVPSId = vpsId;3746 m_activeSPSId = spsId;3747 #endif3748 #else3749 Bool ParameterSetManager::activatePPS(Int ppsId, Bool isIRAP)3750 {3751 TComPPS *pps = m_ppsMap.getPS(ppsId);3752 if (pps)3753 {3754 Int spsId = pps->getSPSId();3755 #if H_MV3756 // active parameter sets per layer should be used here3757 #else3758 if (!isIRAP && (spsId != m_activeSPSId))3759 {3760 printf("Warning: tried to activate PPS referring to a inactive SPS at non-IRAP.");3761 return false;3762 }3763 #endif3764 TComSPS *sps = m_spsMap.getPS(spsId);3765 if (sps)3766 {3767 Int vpsId = sps->getVPSId();3768 if (!isIRAP && (vpsId != m_activeVPSId))3769 {3770 printf("Warning: tried to activate PPS referring to a inactive VPS at non-IRAP.");3771 return false;3772 }3773 if (m_vpsMap.getPS(vpsId))3774 {3775 3133 m_activePPSId = ppsId; 3776 3134 m_activeVPSId = vpsId; … … 3828 3186 //! \} 3829 3187 3830 #if H_MV53831 3188 #if H_MV 3832 3189 TComVPSVUI::TComVPSVUI() … … 3861 3218 } 3862 3219 #endif 3863 #endif -
branches/HTM-8.2-dev0-Cleanup/source/Lib/TLibCommon/TComSlice.h
r646 r648 169 169 Void processRefMatrix (UInt sizeId, UInt listId , UInt refListId ); 170 170 Bool xParseScalingList (Char* pchFile); 171 #if H_MV5172 171 #if H_MV 173 172 Void inferFrom ( TComScalingList* srcScLi ); 174 #endif175 173 #endif 176 174 … … 407 405 }; 408 406 409 #if H_MV5410 407 #if H_MV 411 408 class TComVPSVUI … … 502 499 }; 503 500 #endif 504 #endif505 501 506 502 class TComVPS … … 510 506 UInt m_uiMaxTLayers; 511 507 512 #if H_MV5513 508 #if H_MV 514 509 UInt m_uiMaxLayersMinus1; 515 #else516 UInt m_uiMaxLayers;517 #endif518 510 #else 519 511 UInt m_uiMaxLayers; … … 551 543 /// VPS EXTENSION SYNTAX ELEMENTS 552 544 Bool m_avcBaseLayerFlag; 553 #if H_MV5554 545 Int m_vpsVuiOffset; 555 #endif556 546 Bool m_splittingFlag; 557 #if H_MV5558 547 Bool m_scalabilityMaskFlag [MAX_NUM_SCALABILITY_TYPES]; 559 #else560 Bool m_scalabilityMask [MAX_NUM_SCALABILITY_TYPES];561 #endif562 548 Int m_dimensionIdLen [MAX_NUM_SCALABILITY_TYPES]; 563 549 Bool m_vpsNuhLayerIdPresentFlag; 564 550 Int m_layerIdInNuh [MAX_NUM_LAYER_IDS]; 565 551 Int m_dimensionId [MAX_NUM_LAYER_IDS][MAX_NUM_SCALABILITY_TYPES]; 566 #if H_MV5567 552 Int m_viewIdLenMinus1; 568 553 Int m_viewIdVal [MAX_NUM_LAYERS]; 569 #endif570 554 Bool m_directDependencyFlag [MAX_NUM_LAYER_IDS][MAX_NUM_LAYER_IDS]; 571 #if H_MV5572 555 Bool m_maxTidRefPresentFlag; 573 #endif574 556 Int m_maxTidIlRefPicPlus1 [MAX_NUM_LAYERS]; 575 #if H_MV5576 557 Bool m_allRefLayersActiveFlag; 577 #endif578 558 Int m_vpsNumberLayerSetsMinus1; 579 559 Int m_vpsNumProfileTierLevelMinus1; … … 586 566 Bool m_outputLayerFlag [MAX_VPS_OUTPUTLAYER_SETS][MAX_VPS_NUH_LAYER_ID_PLUS1]; 587 567 Int m_profileLevelTierIdx [MAX_VPS_OUTPUTLAYER_SETS ]; 588 #if H_MV5589 568 Bool m_repFormatIdxPresentFlag; 590 569 Int m_vpsNumRepFormatsMinus1; 591 570 Int m_vpsRepFormatIdx [MAX_NUM_LAYERS]; 592 571 TComRepFormat* m_repFormat [MAX_NUM_LAYERS]; 593 #endif594 572 Bool m_maxOneActiveRefLayerFlag; 595 #if H_MV5596 573 Bool m_crossLayerIrapAlignedFlag; 597 #endif598 574 Int m_directDepTypeLenMinus2; 599 #if H_MV5600 575 Bool m_vpsVuiPresentFlag; 601 576 TComVPSVUI* m_vpsVUI; 602 #endif603 577 Int m_directDependencyType [MAX_NUM_LAYERS] [MAX_NUM_LAYERS]; 604 578 … … 616 590 Bool m_motionPredEnabledFlag [MAX_NUM_LAYERS][MAX_NUM_LAYERS]; 617 591 Int m_motionPredRefLayerId [MAX_NUM_LAYERS][MAX_NUM_LAYERS]; 618 #if H_MV5619 592 Int m_viewIndex [MAX_NUM_LAYERS ]; 620 #else621 #if H_3D622 Int m_viewIndex [MAX_NUM_LAYERS ];623 #endif624 625 Int xCeilLog2 ( Int val );626 #endif627 593 Int xGetDimBitOffset( Int j ); 628 594 … … 681 647 Void setMaxTLayers (UInt t) { m_uiMaxTLayers = t; } 682 648 683 #if H_MV5684 649 #if H_MV 685 650 UInt getMaxLayersMinus1() { return m_uiMaxLayersMinus1; }; … … 689 654 Void setMaxLayers (UInt l) { m_uiMaxLayers = l; } 690 655 #endif 691 #else692 UInt getMaxLayers () { return m_uiMaxLayers; }693 Void setMaxLayers (UInt l) { m_uiMaxLayers = l; }694 #endif695 656 696 657 Bool getTemporalNestingFlag () { return m_bTemporalIdNestingFlag; } … … 735 696 Bool getAvcBaseLayerFlag() { return m_avcBaseLayerFlag; } 736 697 737 #if H_MV5738 698 Void setVpsVuiOffset( Int val ) { m_vpsVuiOffset = val; } 739 699 Int getVpsVuiOffset( ) { return m_vpsVuiOffset; } 740 #endif741 700 742 701 Void setSplittingFlag( Bool val ) { m_splittingFlag = val; } 743 702 Bool getSplittingFlag() { return m_splittingFlag; } 744 703 745 #if H_MV5746 704 Void setScalabilityMaskFlag( UInt val ); 747 705 Void setScalabilityMaskFlag( Int scalType, Bool val ) { m_scalabilityMaskFlag[scalType] = val; } 748 706 Bool getScalabilityMaskFlag( Int scalType ) { return m_scalabilityMaskFlag[scalType]; } 749 #else750 Void setScalabilityMask( UInt val );751 752 Void setScalabilityMask( Int scalType, Bool val ) { m_scalabilityMask[scalType] = val; }753 Bool getScalabilityMask( Int scalType ) { return m_scalabilityMask[scalType]; }754 #endif755 707 Int getNumScalabilityTypes( ); 756 708 … … 769 721 Int getDimensionId( Int layerIdInVps, Int scalIdx ) { return m_dimensionId[layerIdInVps][scalIdx]; } 770 722 771 #if H_MV5772 723 Void setViewIdLenMinus1( Int val ) { m_viewIdLenMinus1 = val; } 773 724 Int getViewIdLenMinus1( ) { return m_viewIdLenMinus1; } … … 775 726 Void setViewIdVal( Int viewOrderIndex, Int val ) { m_viewIdVal[viewOrderIndex] = val; } 776 727 Int getViewIdVal( Int viewOrderIndex ) { return m_viewIdVal[viewOrderIndex]; } 777 #endif778 728 Void setDirectDependencyFlag( Int depLayeridInVps, Int refLayeridInVps, Bool val ) { m_directDependencyFlag[depLayeridInVps][refLayeridInVps] = val; } 779 729 Bool getDirectDependencyFlag( Int depLayeridInVps, Int refLayeridInVps ) { return m_directDependencyFlag[depLayeridInVps][refLayeridInVps]; } 780 730 781 #if H_MV5782 731 Void setMaxTidRefPresentFlag( Bool flag ) { m_maxTidRefPresentFlag = flag; } 783 732 Bool getMaxTidRefPresentFlag( ) { return m_maxTidRefPresentFlag; } 784 #endif785 733 Void setMaxTidIlRefPicPlus1( Int layerIdInVps, Int val ) { m_maxTidIlRefPicPlus1[ layerIdInVps ] = val; } 786 734 Int getMaxTidIlRefPicPlus1( Int layerIdInVps ) { return m_maxTidIlRefPicPlus1[ layerIdInVps ]; } 787 #if H_MV5788 735 Void setAllRefLayersActiveFlag( Bool flag ) { m_allRefLayersActiveFlag = flag; } 789 736 Bool getAllRefLayersActiveFlag( ) { return m_allRefLayersActiveFlag; } 790 #endif791 737 Void setVpsNumberLayerSetsMinus1( Int val ) { m_vpsNumberLayerSetsMinus1 = val; } 792 738 Int getVpsNumberLayerSetsMinus1( ) { return m_vpsNumberLayerSetsMinus1; } … … 819 765 Int getProfileLevelTierIdx( Int outLayerSetIdx ) { return m_profileLevelTierIdx[ outLayerSetIdx ]; } 820 766 821 #if H_MV5822 767 Void setRepFormatIdxPresentFlag( Bool flag ) { m_repFormatIdxPresentFlag = flag; } 823 768 Bool getRepFormatIdxPresentFlag( ) { return m_repFormatIdxPresentFlag; } … … 831 776 Void setRepFormat( Int i, TComRepFormat* val ) { m_repFormat[i] = val; } 832 777 TComRepFormat* getRepFormat( Int i ) { return m_repFormat[i]; } 833 #endif834 778 Void setMaxOneActiveRefLayerFlag( Bool flag) { m_maxOneActiveRefLayerFlag = flag; } 835 779 Bool getMaxOneActiveRefLayerFlag( ) { return m_maxOneActiveRefLayerFlag; } 836 #if H_MV5837 780 Void setCrossLayerIrapAlignedFlag( Bool flag ) { m_crossLayerIrapAlignedFlag = flag; } 838 781 Bool getCrossLayerIrapAlignedFlag( ) { return m_crossLayerIrapAlignedFlag; } 839 #endif840 782 Void setDirectDepTypeLenMinus2( Int val) { m_directDepTypeLenMinus2 = val; } 841 783 Int getDirectDepTypeLenMinus2( ) { return m_directDepTypeLenMinus2; } … … 843 785 Void setDirectDependencyType( Int depLayeridInVps, Int refLayeridInVps, Int val) { m_directDependencyType[ depLayeridInVps ][ refLayeridInVps ] = val; } 844 786 Int getDirectDependencyType( Int depLayeridInVps, Int refLayeridInVps) { return m_directDependencyType[ depLayeridInVps ][ refLayeridInVps ]; } 845 #if H_MV5846 787 Void setVpsVuiPresentFlag( Bool flag ) { m_vpsVuiPresentFlag = flag; } 847 788 Bool getVpsVuiPresentFlag( ) { return m_vpsVuiPresentFlag; } 848 789 849 790 TComVPSVUI* getVPSVUI( ) { return m_vpsVUI; } 850 #endif851 791 // VPS EXTENSION SEMANTICS VARIABLES 852 792 Void setLayerIdInVps( Int layerIdInNuh, Int val ) { m_layerIdInVps[layerIdInNuh] = val; } … … 854 794 855 795 Int getScalabilityId ( Int layerIdInVps, ScalabilityType scalType ); 856 #if H_MV5857 796 Int getViewId ( Int layerIdInNuh ) { return m_viewIdVal[ getViewIndex( getLayerIdInVps( layerIdInNuh) )]; } 858 #else859 Int getViewId ( Int layerIdInVps ) { return getScalabilityId( layerIdInVps, VIEW_ID ); }860 861 #endif862 797 Void setRefLayers(); 863 798 864 #if H_MV5865 799 Int getViewIndex ( Int layerIdInNuh ) { return getScalabilityId( getLayerIdInVps(layerIdInNuh), VIEW_ORDER_INDEX ); } 866 800 Int getNumViews(); … … 868 802 Int getNumDirectRefLayers( Int layerIdInNuh ) { return m_numDirectRefLayers[ layerIdInNuh ]; }; 869 803 Int getRefLayerId ( Int layerIdInNuh, Int idx );; 870 #else871 Int getNumDirectRefLayers( Int layerIdInVps ) { return m_numDirectRefLayers[ layerIdInVps ]; };872 Int getRefLayerId ( Int layerIdInVps, Int idx );;873 874 Int getNumSamplePredRefLayers( Int layerIdInVps ) { return m_numSamplePredRefLayers[layerIdInVps]; }875 Bool getSamplePredEnabledFlag ( Int layerIdInVps, Int idx ) { return m_samplePredEnabledFlag [layerIdInVps][idx]; }876 Int getSamplePredRefLayerId ( Int layerIdInVps, Int idx ) { return m_samplePredRefLayerId [layerIdInVps][idx]; }877 878 Int getNumMotionPredRefLayers( Int layerIdInVps ) { return m_numMotionPredRefLayers[layerIdInVps]; }879 Bool getMotionPredEnabledFlag ( Int layerIdInVps, Int idx ) { return m_motionPredEnabledFlag [layerIdInVps][idx]; }880 Int getMotionPredRefLayerId ( Int layerIdInVps, Int idx ) { return m_motionPredRefLayerId [layerIdInVps][idx]; }881 #endif882 804 Bool checkVPSExtensionSyntax(); 883 805 Int scalTypeToScalIdx ( ScalabilityType scalType ); 884 806 885 #if H_MV5886 807 Int getProfileLevelTierIdxLen() { return gCeilLog2( getVpsNumProfileTierLevelMinus1() + 1 ); }; 887 #else888 Int getProfileLevelTierIdxLen() { return xCeilLog2( getVpsNumProfileTierLevelMinus1() + 1 ); };889 #endif890 808 891 809 Int getNumLayersInIdList ( Int lsIdx );; … … 895 813 Int inferLastDimsionIdLenMinus1(); 896 814 897 #if H_MV5898 815 // helpers 899 816 Bool getInDirectDependencyFlag( Int depLayeridInVps, Int refLayeridInVps, Int depth = 0 ); 900 #endif901 817 /// VPS EXTENSION 2 SYNTAX ELEMENTS 902 818 #if H_3D 903 #if H_MV5904 819 Int getDepthId ( Int layerIdInNuh) { return getScalabilityId( getLayerIdInVps(layerIdInNuh), DEPTH_ID ); } 905 #else906 Void initViewIndex();907 Int getViewIndex ( Int layerIdInVps ) { return m_viewIndex[ layerIdInVps ]; }908 Int getDepthId ( Int layerIdInVps ) { return getScalabilityId( layerIdInVps, DEPTH_ID ); }909 #endif910 820 Int getLayerIdInNuh( Int viewIndex, Bool depthFlag ); 911 821 … … 960 870 Int m_winTopOffset; 961 871 Int m_winBottomOffset; 962 #if H_MV5963 872 #if H_MV 964 873 Bool m_scaledFlag; 965 #endif966 874 #endif 967 875 public: … … 972 880 , m_winTopOffset (0) 973 881 , m_winBottomOffset (0) 974 #if H_MV5975 882 #if H_MV 976 883 , m_scaledFlag(true) 977 #endif978 884 #endif 979 885 { } … … 990 896 Void setWindowBottomOffset(Int val) { m_winBottomOffset = val; m_enabledFlag = true; } 991 897 992 #if H_MV5993 898 #if H_MV 994 899 Void setScaledFlag(Bool flag) { m_scaledFlag = flag; } … … 1005 910 } 1006 911 } 1007 #endif1008 912 #endif 1009 913 Void setWindow(Int offsetLeft, Int offsetLRight, Int offsetLTop, Int offsetLBottom) … … 1054 958 TComHRD m_hrdParameters; 1055 959 TimingInfo m_timingInfo; 1056 #if !H_MV51057 #if H_MV1058 Bool m_tileBoundariesAlignedFlag;1059 #endif1060 #endif1061 960 1062 961 public: … … 1091 990 ,m_log2MaxMvLengthHorizontal(15) 1092 991 ,m_log2MaxMvLengthVertical(15) 1093 #if !H_MV51094 #if H_MV1095 ,m_tileBoundariesAlignedFlag(true)1096 #endif1097 #endif1098 992 {} 1099 993 … … 1191 1085 TComHRD* getHrdParameters () { return &m_hrdParameters; } 1192 1086 TimingInfo* getTimingInfo() { return &m_timingInfo; } 1193 #if !H_MV51194 #if H_MV1195 Bool getTileBoundariesAlignedFlag( ) { return m_tileBoundariesAlignedFlag; }1196 Void setTileBoundariesAlignedFlag( Bool flag ) { m_tileBoundariesAlignedFlag = flag; }1197 #endif1198 #endif1199 1087 1200 1088 }; … … 1281 1169 TComPTL m_pcPTL; 1282 1170 #if H_MV 1283 #if H_MV51284 1171 TComVPS* m_pcVPS; 1285 1172 // SPS … … 1287 1174 Int m_spsScalingListRefLayerId; 1288 1175 Bool m_updateRepFormatFlag; 1289 #endif1290 1176 // SPS Extension 1291 1177 Bool m_interViewMvVertConstraintFlag; 1292 #if !H_MV51293 Int m_numIlpRestrictedRefLayers ;1294 Int m_minSpatialSegmentOffsetPlus1[MAX_NUM_LAYERS];1295 Bool m_ctuBasedOffsetEnabledFlag [MAX_NUM_LAYERS];1296 Int m_minHorizontalCtuOffsetPlus1 [MAX_NUM_LAYERS];1297 #endif1298 1178 #endif 1299 1179 #if H_3D … … 1432 1312 TComPTL* getPTL() { return &m_pcPTL; } 1433 1313 #if H_MV 1434 #if H_MV51435 1314 Void setVPS ( TComVPS* pcVPS ) { m_pcVPS = pcVPS; } 1436 1315 TComVPS* getVPS () { return m_pcVPS; } … … 1444 1323 Void setUpdateRepFormatFlag( Bool flag ) { m_updateRepFormatFlag = flag; } 1445 1324 Bool getUpdateRepFormatFlag( ) { return m_updateRepFormatFlag; } 1446 #endif1447 1325 // SPS Extension 1448 1326 Void setInterViewMvVertConstraintFlag(Bool val) { m_interViewMvVertConstraintFlag = val; } 1449 1327 Bool getInterViewMvVertConstraintFlag() { return m_interViewMvVertConstraintFlag;} 1450 #if H_MV51451 1328 // Inference 1452 1329 Void inferRepFormat( TComVPS* vps, Int layerIdCurr ); 1453 1330 1454 1331 Void inferScalingList( TComSPS* spsSrc ); 1455 #else1456 Void setNumIlpRestrictedRefLayers ( Int val ) { m_numIlpRestrictedRefLayers = val;}1457 Int getNumIlpRestrictedRefLayers ( ) { return m_numIlpRestrictedRefLayers ;}1458 1459 Void setMinSpatialSegmentOffsetPlus1( Int i, Int val ) { m_minSpatialSegmentOffsetPlus1[ i ] = val;}1460 Int getMinSpatialSegmentOffsetPlus1( Int i ) { return m_minSpatialSegmentOffsetPlus1[ i ];}1461 1462 Void setCtuBasedOffsetEnabledFlag ( Int i, Bool flag ) { m_ctuBasedOffsetEnabledFlag [ i ] = flag;}1463 Bool getCtuBasedOffsetEnabledFlag ( Int i ) { return m_ctuBasedOffsetEnabledFlag [ i ];}1464 1465 Void setMinHorizontalCtuOffsetPlus1 ( Int i, Int val ) { m_minHorizontalCtuOffsetPlus1 [ i ] = val;}1466 Int getMinHorizontalCtuOffsetPlus1 ( Int i ) { return m_minHorizontalCtuOffsetPlus1 [ i ];}1467 1468 #endif1469 1332 #endif 1470 1333 #if H_3D_QTLPC … … 1582 1445 Int m_numExtraSliceHeaderBits; 1583 1446 1584 #if H_MV51585 1447 #if H_MV 1586 1448 Int m_layerId; 1587 1449 Bool m_ppsInferScalingListFlag; 1588 1450 Int m_ppsScalingListRefLayerId; 1589 #endif1590 1451 #endif 1591 1452 public: … … 1710 1571 Bool getSliceHeaderExtensionPresentFlag () { return m_sliceHeaderExtensionPresentFlag; } 1711 1572 Void setSliceHeaderExtensionPresentFlag (Bool val) { m_sliceHeaderExtensionPresentFlag = val; } 1712 #if H_MV51713 1573 #if H_MV 1714 1574 Void setLayerId( Int val ) { m_layerId = val; } … … 1720 1580 Void setPpsScalingListRefLayerId( Int val ) { m_ppsScalingListRefLayerId = val; } 1721 1581 Int getPpsScalingListRefLayerId( ) { return m_ppsScalingListRefLayerId; } 1722 #endif1723 1582 #endif 1724 1583 }; … … 1754 1613 Bool m_PicOutputFlag; ///< pic_output_flag 1755 1614 Int m_iPOC; 1756 #if H_MV51757 1615 #if H_MV 1758 1616 Int m_iPOCBeforeReset; 1759 #endif1760 1617 #endif 1761 1618 Int m_iLastIDR; … … 1853 1710 Bool m_enableTMVPFlag; 1854 1711 #if H_MV 1855 #if H_MV51856 1712 std::vector<TComPic*>* m_refPicSetInterLayer0; 1857 1713 std::vector<TComPic*>* m_refPicSetInterLayer1; … … 1862 1718 Bool m_isDepth; 1863 1719 #endif 1864 #else1865 std::vector<TComPic*>* m_refPicSetInterLayer;1866 Int m_layerId;1867 Int m_viewId;1868 #if H_3D1869 Int m_viewIndex;1870 Bool m_isDepth;1871 #endif1872 #endif1873 1720 1874 1721 // Additional slice header syntax elements 1875 #if H_MV51876 1722 Bool m_pocResetFlag; 1877 #endif1878 1723 Bool m_discardableFlag; 1879 1724 Bool m_interLayerPredEnabledFlag; 1880 1725 Int m_numInterLayerRefPicsMinus1; 1881 1726 Int m_interLayerPredLayerIdc [MAX_NUM_LAYERS]; 1882 #if !H_MV51883 Bool m_interLayerSamplePredOnlyFlag;1884 Bool m_altCollocatedIndicationFlag;1885 Int m_collocatedRefLayerIdx;1886 // Additional slice header semantics variables1887 Int m_numActiveMotionPredRefLayers;1888 Int m_activeMotionPredRefLayerId [ MAX_NUM_LAYER_IDS ];1889 1890 #endif1891 1727 Int m_aaiCodedScale [2][MAX_NUM_LAYERS]; 1892 1728 Int m_aaiCodedOffset[2][MAX_NUM_LAYERS]; … … 2022 1858 2023 1859 #if H_MV 2024 #if H_MV52025 1860 Void setPocBeforeReset ( Int i ) { m_iPOCBeforeReset = i; } 2026 1861 Int getPocBeforeReset ( ) { return m_iPOCBeforeReset; } 2027 #endif2028 1862 Int getRefLayerId ( RefPicList e, Int iRefIdx) { return m_aiRefLayerIdList[e][iRefIdx]; } 2029 1863 Void setRefLayerId ( Int i, RefPicList e, Int iRefIdx ) { m_aiRefLayerIdList[e][iRefIdx] = i; } 2030 #if H_MV52031 1864 Void getTempRefPicLists ( TComList<TComPic*>& rcListPic, std::vector<TComPic*>& refPicSetInterLayer0, std::vector<TComPic*>& refPicSetInterLayer1, 2032 1865 std::vector<TComPic*> rpsCurrList[2], std::vector<Bool> usedAsLongTerm[2], Int& numPocTotalCurr, Bool checkNumPocTotalCurr = false ); 2033 1866 2034 1867 Void setRefPicList ( std::vector<TComPic*> rpsCurrList[2], std::vector<Bool> usedAsLongTerm[2], Int numPocTotalCurr, Bool checkNumPocTotalCurr = false ); 2035 #else2036 Void setRefPicList ( TComList<TComPic*>& rcListPic, std::vector<TComPic*>& interLayerRefPicSet , Bool checkNumPocTotalCurr = false );2037 #endif2038 1868 #else 2039 1869 #if FIX1071 … … 2084 1914 Void applyReferencePictureSet( TComList<TComPic*>& rcListPic, TComReferencePictureSet *RPSList); 2085 1915 #if H_MV 2086 #if !H_MV52087 Void createAndApplyIvReferencePictureSet( TComPicLists* ivPicLists, std::vector<TComPic*>& refPicSetInterLayer );2088 static Void markIvRefPicsAsShortTerm ( std::vector<TComPic*> refPicSetInterLayer );2089 #else2090 1916 Void createInterLayerReferencePictureSet( TComPicLists* ivPicLists, std::vector<TComPic*>& refPicSetInterLayer0, std::vector<TComPic*>& refPicSetInterLayer1 ); 2091 1917 static Void markIvRefPicsAsShortTerm ( std::vector<TComPic*> refPicSetInterLayer0, std::vector<TComPic*> refPicSetInterLayer1 ); 2092 #endif2093 1918 static Void markCurrPic ( TComPic* currPic );; 2094 1919 static Void markIvRefPicsAsUnused ( TComPicLists* ivPicLists, std::vector<Int> targetDecLayerIdSet, TComVPS* vps, Int curLayerId, Int curPoc ); 2095 #if H_MV52096 1920 Void printRefPicList(); 2097 #else2098 Void xPrintRefPicList();2099 #endif2100 1921 #endif 2101 1922 Bool isTemporalLayerSwitchingPoint( TComList<TComPic*>& rcListPic ); … … 2184 2005 Void setViewId ( Int viewId ) { m_viewId = viewId; } 2185 2006 Int getViewId () { return m_viewId; } 2186 #if H_MV52187 2007 Void setViewIndex ( Int viewIndex ) { m_viewIndex = viewIndex; } 2188 2008 Int getViewIndex () { return m_viewIndex; } 2189 #endif2190 2009 #if H_3D 2191 2010 #if H_3D_TMVP … … 2193 2012 Void setAlterRefIdx ( RefPicList e, Int i ) { m_aiAlterRefIdx[e] = i; } 2194 2013 Int getAlterRefIdx ( RefPicList e ) { return m_aiAlterRefIdx[e]; } 2195 #endif2196 #if !H_MV52197 Void setViewIndex ( Int viewIndex ) { m_viewIndex = viewIndex; }2198 Int getViewIndex () { return m_viewIndex; }2199 2014 #endif 2200 2015 Void setIsDepth ( Bool isDepth ) { m_isDepth = isDepth; } … … 2219 2034 // Additional slice header syntax elements 2220 2035 2221 #if H_MV52222 2036 Void setPocResetFlag( Bool flag ) { m_pocResetFlag = flag; } 2223 2037 Bool getPocResetFlag( ) { return m_pocResetFlag; } 2224 #endif2225 2038 2226 2039 Void setDiscardableFlag( Bool flag ) { m_discardableFlag = flag; } … … 2236 2049 Int getInterLayerPredLayerIdc( Int i ) { return m_interLayerPredLayerIdc[i]; } 2237 2050 2238 #if H_MV52239 2051 // Additional variables derived in slice header semantics 2240 2052 Int getNumInterLayerRefPicsMinus1Len( ) { return gCeilLog2( getVPS()->getNumDirectRefLayers( getLayerId() )); } … … 2250 2062 Void setRefPicSetInterLayer ( std::vector<TComPic*>* refPicSetInterLayer0, std::vector<TComPic*>* refPicSetInterLayer1); 2251 2063 TComPic* getPicFromRefPicSetInterLayer( Int setIdc, Int layerId ); 2252 #else2253 Void setInterLayerSamplePredOnlyFlag( Bool flag ) { m_interLayerSamplePredOnlyFlag = flag; }2254 Bool getInterLayerSamplePredOnlyFlag( ) { return m_interLayerSamplePredOnlyFlag; }2255 2256 Void setAltCollocatedIndicationFlag( Bool flag ) { m_altCollocatedIndicationFlag = flag; }2257 Bool getAltCollocatedIndicationFlag( ) { return m_altCollocatedIndicationFlag; }2258 2259 Void setCollocatedRefLayerIdx( Int val ) { m_collocatedRefLayerIdx = val; }2260 Int getCollocatedRefLayerIdx( ) { return m_collocatedRefLayerIdx; }2261 2262 // Additional variables derived in slice header semantics2263 Int getNumInterLayerRefPicsMinus1Len( ) { return xCeilLog2( getVPS()->getNumDirectRefLayers( getLayerIdInVps() )); }2264 Int getInterLayerPredLayerIdcLen ( ) { return xCeilLog2( getVPS()->getNumDirectRefLayers( getLayerIdInVps() )); }2265 2266 Int getNumActiveRefLayerPics( );2267 Int getRefPicLayerId ( Int i );2268 2269 Void setActiveMotionPredRefLayers ( );2270 2271 Int getNumActiveMotionPredRefLayers( ) { return m_numActiveMotionPredRefLayers; }2272 Int getActiveMotionPredRefLayerId ( Int i ) { return m_activeMotionPredRefLayerId[i]; }2273 2274 Bool getInterRefEnabledInRPLFlag( );2275 2276 Void setRefPicSetInterLayer ( std::vector<TComPic*>* m_refPicSetInterLayer );2277 TComPic* getPicFromRefPicSetInterLayer( Int layerId );2278 2279 #endif2280 2064 #endif 2281 2065 protected: … … 2284 2068 TComPic* xGetLongTermRefPic(TComList<TComPic*>& rcListPic, Int poc, Bool pocHasMsb); 2285 2069 #if H_MV 2286 #if !H_MV52287 Int xCeilLog2( Int val );2288 #endif2289 2070 TComPic* xGetInterLayerRefPic( std::vector<TComPic*>& rcListIlPic, Int layerId ); 2290 2071 #endif … … 2368 2149 //! activate a SPS from a active parameter sets SEI message 2369 2150 //! \returns true, if activation is successful 2370 #if !H_MV52371 Bool activateSPSWithSEI(Int SPSId);2372 2373 //! activate a PPS and depending on isIDR parameter also SPS and VPS2374 //! \returns true, if activation is successful2375 Bool activatePPS(Int ppsId, Bool isIRAP);2376 2377 TComVPS* getActiveVPS(){ return m_vpsMap.getPS(m_activeVPSId); };2378 TComSPS* getActiveSPS(){ return m_spsMap.getPS(m_activeSPSId); };2379 TComPPS* getActivePPS(){ return m_ppsMap.getPS(m_activePPSId); };2380 2381 protected:2382 2383 ParameterSetMap<TComVPS> m_vpsMap;2384 ParameterSetMap<TComSPS> m_spsMap;2385 ParameterSetMap<TComPPS> m_ppsMap;2386 2387 Int m_activeVPSId;2388 Int m_activeSPSId;2389 Int m_activePPSId;2390 #else2391 2151 #if H_MV 2392 2152 Bool activateSPSWithSEI(Int SPSId, Int layerId ); … … 2426 2186 #endif 2427 2187 2428 #endif2429 2188 }; 2430 2189 -
branches/HTM-8.2-dev0-Cleanup/source/Lib/TLibCommon/TypeDef.h
r647 r648 181 181 #define KWU_RC_MADPRED_E0227 0 ///< JCT3V-E0227, inter-view MAD prediction 182 182 183 184 /// FIXES185 #if H_MV186 #define H_MV5 1 // Update to MV-HEVC 5 HLS187 #endif188 183 ///////////////////////////////////////////////////////////////////////////////////////// 189 184 /////////////////////////////////// DERIVED DEFINES /////////////////////////////////// … … 769 764 enum ScalabilityType 770 765 { 771 #if H_MV5772 766 #if H_3D 773 767 DEPTH_ID = 0, 774 768 #endif 775 769 VIEW_ORDER_INDEX = 1, 776 #else777 VIEW_ID = 0,778 #if H_3D779 DEPTH_ID = 1,780 #endif781 #endif782 770 }; 783 771 #endif
Note: See TracChangeset for help on using the changeset viewer.