Changeset 1043 in SHVCSoftware
- Timestamp:
- 2 Mar 2015, 21:08:06 (10 years ago)
- Location:
- branches/SHM-dev/source
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/SHM-dev/source/App/TAppEncoder/TAppEncTop.cpp
r1037 r1043 1263 1263 vps->setNuhLayerIdPresentFlag(false); 1264 1264 vps->setLayerIdInNuh(0, 0); 1265 vps->setLayerId InVps(0, 0);1265 vps->setLayerIdxInVps(0, 0); 1266 1266 for(i = 1; i < vps->getMaxLayers(); i++) 1267 1267 { 1268 1268 vps->setLayerIdInNuh(i, i); 1269 vps->setLayerId InVps(vps->getLayerIdInNuh(i), i);1269 vps->setLayerIdxInVps(vps->getLayerIdInNuh(i), i); 1270 1270 vps->setDimensionId(i, 0, i); 1271 1271 } … … 1529 1529 for (UInt layerCtr = 1; layerCtr <= vps->getMaxLayers() - 1; layerCtr++) 1530 1530 { 1531 vps->setNumDirectRefLayers(layerCtr, m_acTEncTop[layerCtr].getNumDirectRefLayers()); 1531 UInt layerId = vps->getLayerIdInNuh(layerCtr); 1532 vps->setNumDirectRefLayers(layerId, m_acTEncTop[layerCtr].getNumDirectRefLayers()); 1532 1533 maxDirectRefLayers = max<UInt>(maxDirectRefLayers, vps->getNumDirectRefLayers(layerCtr)); 1533 1534 1534 1535 for (i = 0; i < vps->getNumDirectRefLayers(layerCtr); i++) 1535 1536 { 1536 vps->setRefLayerId(layer Ctr, i, m_acTEncTop[layerCtr].getRefLayerId(i));1537 vps->setRefLayerId(layerId, i, m_acTEncTop[layerCtr].getRefLayerId(i)); 1537 1538 } 1538 1539 // Set direct dependency flag … … 1544 1545 for (i = 0; i < vps->getNumDirectRefLayers(layerCtr); i++) 1545 1546 { 1546 vps->setDirectDependencyFlag(layerCtr, vps->getLayerId InVps(m_acTEncTop[layerCtr].getRefLayerId(i)), true);1547 vps->setDirectDependencyFlag(layerCtr, vps->getLayerIdxInVps(m_acTEncTop[layerCtr].getRefLayerId(i)), true); 1547 1548 } 1548 1549 // prediction indications … … 1739 1740 for(Int j = 0; j < numLayerInLayerSet; j++) 1740 1741 { 1741 Int layerIdxInVps = vps->getLayerId InVps( vps->getLayerSetLayerIdList(layerSetIdxForOutputLayerSet, j) );1742 Int layerIdxInVps = vps->getLayerIdxInVps( vps->getLayerSetLayerIdList(layerSetIdxForOutputLayerSet, j) ); 1742 1743 if( vps->getNecessaryLayerFlag(i, j) ) 1743 1744 { … … 1947 1948 // Only for the default partition 1948 1949 Int nuhlayerId = vps->getLayerSetLayerIdList( lsIdx, k); 1949 Int layerIdxInVps = vps->getLayerId InVps( nuhlayerId );1950 Int layerIdxInVps = vps->getLayerIdxInVps( nuhlayerId ); 1950 1951 vps->setBspHrdIdx(h, i, t, j, k, layerIdxInVps + vps->getNumHrdParameters()); 1951 1952 -
branches/SHM-dev/source/Lib/TLibCommon/TComPic.h
r1029 r1043 198 198 199 199 #if SVC_EXTENSION 200 Void setLayerId (UInt layerId) { m_layerId = layerId; }200 Void setLayerId (UInt layerId) { m_layerId = layerId; } 201 201 UInt getLayerId () { return m_layerId; } 202 UInt getLayerIdx () { return this->getSlice(0)->getVPS()->getLayerIdxInVps(m_layerId); } 202 203 Bool isSpatialEnhLayer(UInt refLayerIdc) { return m_bSpatialEnhLayer[refLayerIdc]; } 203 204 Void setSpatialEnhLayerFlag (UInt refLayerIdc, Bool b) { m_bSpatialEnhLayer[refLayerIdc] = b; } -
branches/SHM-dev/source/Lib/TLibCommon/TComSlice.cpp
r1036 r1043 2083 2083 2084 2084 m_numScalabilityTypes = 0; 2085 ::memset(m_layerId InVps, 0, sizeof(m_layerIdInVps));2085 ::memset(m_layerIdxInVps, 0, sizeof(m_layerIdxInVps)); 2086 2086 #endif 2087 2087 #if VPS_EXTN_PROFILE_INFO … … 3485 3485 for( UInt j = 0; j < m_numPredictedLayers[iNuhLId]; j++ ) 3486 3486 { 3487 if( !countedLayerIdxFlag[m_layerId InVps[iNuhLId]] )3487 if( !countedLayerIdxFlag[m_layerIdxInVps[iNuhLId]] ) 3488 3488 { 3489 3489 m_treePartitionLayerIdList[numIndependentLayers][m_numLayersInTreePartition[numIndependentLayers]] = m_predictedLayerId[iNuhLId][j]; 3490 3490 m_numLayersInTreePartition[numIndependentLayers] = m_numLayersInTreePartition[numIndependentLayers] + 1; 3491 countedLayerIdxFlag[m_layerId InVps[m_predictedLayerId[iNuhLId][j]]] = true;3491 countedLayerIdxFlag[m_layerIdxInVps[m_predictedLayerId[iNuhLId][j]]] = true; 3492 3492 } 3493 3493 } … … 3658 3658 for(Int i = 0; i < this->getNumLayersInIdList( lsIdx ); i++) 3659 3659 { 3660 Int layerIdxInVps = this->getLayerId InVps( this->getLayerSetLayerIdList(lsIdx, i) );3660 Int layerIdxInVps = this->getLayerIdxInVps( this->getLayerSetLayerIdList(lsIdx, i) ); 3661 3661 Int repFormatIdx = this->getVpsRepFormatIdx( layerIdxInVps ); 3662 3662 RepFormat* repFormat = this->getVpsRepFormat( repFormatIdx ); … … 3872 3872 for(Int k = 0; k < getNumLayersInIdList(lsIdx); k++ ) { 3873 3873 Int lId = getLayerSetLayerIdList(lsIdx, k); 3874 maxSLMinus1 = std::max(maxSLMinus1, getMaxTSLayersMinus1(getLayerId InVps(lId)));3874 maxSLMinus1 = std::max(maxSLMinus1, getMaxTSLayersMinus1(getLayerIdxInVps(lId))); 3875 3875 } 3876 3876 setMaxSLayersInLayerSetMinus1(lsIdx,maxSLMinus1); … … 3941 3941 else 3942 3942 { 3943 retVal = vps->getVpsRepFormat(sps->getUpdateRepFormatFlag() ? sps->getUpdateRepFormatIndex() : vps->getVpsRepFormatIdx(vps->getLayerId InVps(layerId)))->getPicWidthVpsInLumaSamples();3943 retVal = vps->getVpsRepFormat(sps->getUpdateRepFormatFlag() ? sps->getUpdateRepFormatIndex() : vps->getVpsRepFormatIdx(vps->getLayerIdxInVps(layerId)))->getPicWidthVpsInLumaSamples(); 3944 3944 } 3945 3945 #else … … 3950 3950 else 3951 3951 { 3952 retVal = vps->getVpsRepFormat( vps->getVpsRepFormatIdx(vps->getLayerId InVps(layerId)) )->getPicWidthVpsInLumaSamples();3952 retVal = vps->getVpsRepFormat( vps->getVpsRepFormatIdx(vps->getLayerIdxInVps(layerId)) )->getPicWidthVpsInLumaSamples(); 3953 3953 } 3954 3954 #endif … … 3984 3984 else 3985 3985 { 3986 retVal = vps->getVpsRepFormat(sps->getUpdateRepFormatFlag() ? sps->getUpdateRepFormatIndex() : vps->getVpsRepFormatIdx(vps->getLayerId InVps(layerId)))->getPicHeightVpsInLumaSamples();3986 retVal = vps->getVpsRepFormat(sps->getUpdateRepFormatFlag() ? sps->getUpdateRepFormatIndex() : vps->getVpsRepFormatIdx(vps->getLayerIdxInVps(layerId)))->getPicHeightVpsInLumaSamples(); 3987 3987 } 3988 3988 #else … … 3993 3993 else 3994 3994 { 3995 retVal = vps->getVpsRepFormat( vps->getVpsRepFormatIdx(vps->getLayerId InVps(layerId)) )->getPicHeightVpsInLumaSamples();3995 retVal = vps->getVpsRepFormat( vps->getVpsRepFormatIdx(vps->getLayerIdxInVps(layerId)) )->getPicHeightVpsInLumaSamples(); 3996 3996 } 3997 3997 #endif … … 4036 4036 else 4037 4037 { 4038 retVal = vps->getVpsRepFormat(sps->getUpdateRepFormatFlag() ? sps->getUpdateRepFormatIndex() : vps->getVpsRepFormatIdx(vps->getLayerId InVps(layerId)))->getChromaFormatVpsIdc();4038 retVal = vps->getVpsRepFormat(sps->getUpdateRepFormatFlag() ? sps->getUpdateRepFormatIndex() : vps->getVpsRepFormatIdx(vps->getLayerIdxInVps(layerId)))->getChromaFormatVpsIdc(); 4039 4039 } 4040 4040 #else … … 4045 4045 else 4046 4046 { 4047 retVal = vps->getVpsRepFormat( vps->getVpsRepFormatIdx(vps->getLayerId InVps(layerId)) )->getChromaFormatVpsIdc();4047 retVal = vps->getVpsRepFormat( vps->getVpsRepFormatIdx(vps->getLayerIdxInVps(layerId)) )->getChromaFormatVpsIdc(); 4048 4048 } 4049 4049 #endif … … 4078 4078 else 4079 4079 { 4080 retVal = vps->getVpsRepFormat(sps->getUpdateRepFormatFlag() ? sps->getUpdateRepFormatIndex() : vps->getVpsRepFormatIdx(vps->getLayerId InVps(layerId)))->getBitDepthVpsLuma();4080 retVal = vps->getVpsRepFormat(sps->getUpdateRepFormatFlag() ? sps->getUpdateRepFormatIndex() : vps->getVpsRepFormatIdx(vps->getLayerIdxInVps(layerId)))->getBitDepthVpsLuma(); 4081 4081 } 4082 4082 #else … … 4087 4087 else 4088 4088 { 4089 retVal = vps->getVpsRepFormat( vps->getVpsRepFormatIdx(vps->getLayerId InVps(layerId)) )->getBitDepthVpsLuma();4089 retVal = vps->getVpsRepFormat( vps->getVpsRepFormatIdx(vps->getLayerIdxInVps(layerId)) )->getBitDepthVpsLuma(); 4090 4090 } 4091 4091 #endif … … 4120 4120 else 4121 4121 { 4122 retVal = vps->getVpsRepFormat(sps->getUpdateRepFormatFlag() ? sps->getUpdateRepFormatIndex() : vps->getVpsRepFormatIdx(vps->getLayerId InVps(layerId)))->getBitDepthVpsChroma();4122 retVal = vps->getVpsRepFormat(sps->getUpdateRepFormatFlag() ? sps->getUpdateRepFormatIndex() : vps->getVpsRepFormatIdx(vps->getLayerIdxInVps(layerId)))->getBitDepthVpsChroma(); 4123 4123 } 4124 4124 #else … … 4129 4129 else 4130 4130 { 4131 retVal = vps->getVpsRepFormat( vps->getVpsRepFormatIdx(vps->getLayerId InVps(layerId)) )->getBitDepthVpsChroma();4131 retVal = vps->getVpsRepFormat( vps->getVpsRepFormatIdx(vps->getLayerIdxInVps(layerId)) )->getBitDepthVpsChroma(); 4132 4132 } 4133 4133 #endif … … 4173 4173 else 4174 4174 { 4175 return vps->getVpsRepFormat(sps->getUpdateRepFormatFlag() ? sps->getUpdateRepFormatIndex() : vps->getVpsRepFormatIdx(vps->getLayerId InVps(layerId)))->getConformanceWindowVps();4175 return vps->getVpsRepFormat(sps->getUpdateRepFormatFlag() ? sps->getUpdateRepFormatIndex() : vps->getVpsRepFormatIdx(vps->getLayerIdxInVps(layerId)))->getConformanceWindowVps(); 4176 4176 } 4177 4177 #else … … 4182 4182 else 4183 4183 { 4184 return vps->getVpsRepFormat( vps->getVpsRepFormatIdx(vps->getLayerId InVps(vps->getLayerIdInVps(layerId))) )->getConformanceWindowVps();4184 return vps->getVpsRepFormat( vps->getVpsRepFormatIdx(vps->getLayerIdxInVps(vps->getLayerIdxInVps(layerId))) )->getConformanceWindowVps(); 4185 4185 } 4186 4186 #endif -
branches/SHM-dev/source/Lib/TLibCommon/TComSlice.h
r1035 r1043 676 676 // Below are derived variables 677 677 UInt m_numScalabilityTypes; 678 UInt m_layerId InVps[MAX_VPS_LAYER_ID_PLUS1]; // Maps layer_id_in_nuh with the layer ID in the VPS678 UInt m_layerIdxInVps[MAX_VPS_LAYER_ID_PLUS1]; // Maps layer_id_in_nuh with the layer ID in the VPS 679 679 #endif 680 680 #if BITRATE_PICRATE_SIGNALLING … … 1098 1098 Void setNumScalabilityTypes(UInt x) { m_numScalabilityTypes = x; } 1099 1099 1100 UInt getLayerId InVps(Int id) { return m_layerIdInVps[id];}1101 Void setLayerId InVps(Int id, UInt x) { m_layerIdInVps[id] = x;}1100 UInt getLayerIdxInVps(Int layerId) { return m_layerIdxInVps[layerId]; } 1101 Void setLayerIdxInVps(Int layerId, UInt x) { m_layerIdxInVps[layerId] = x; } 1102 1102 #endif 1103 1103 #if BITRATE_PICRATE_SIGNALLING … … 1134 1134 #if VPS_EXTN_DIRECT_REF_LAYERS 1135 1135 // Direct dependency of layers 1136 Bool getDirectDependencyFlag(Int currLayerId , Int refLayerId) { return m_directDependencyFlag[currLayerId][refLayerId]; }1137 Void setDirectDependencyFlag(Int currLayerId , Int refLayerId, Bool x) { m_directDependencyFlag[currLayerId][refLayerId] = x; }1136 Bool getDirectDependencyFlag(Int currLayerIdc, Int refLayerIdc) { return m_directDependencyFlag[currLayerIdc][refLayerIdc]; } 1137 Void setDirectDependencyFlag(Int currLayerIdc, Int refLayerIdc, Bool x) { m_directDependencyFlag[currLayerIdc][refLayerIdc] = x; } 1138 1138 1139 1139 UInt getNumDirectRefLayers(Int layerId) { return m_numDirectRefLayers[layerId]; } … … 1396 1396 Int getScalabilityId(Int, ScalabilityType scalType ); 1397 1397 1398 Int getViewIndex ( Int layerIdInNuh ) { return getScalabilityId( getLayerId InVps(layerIdInNuh), VIEW_ORDER_INDEX ); }1398 Int getViewIndex ( Int layerIdInNuh ) { return getScalabilityId( getLayerIdxInVps(layerIdInNuh), VIEW_ORDER_INDEX ); } 1399 1399 1400 1400 Int getNumViews(); -
branches/SHM-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp
r1030 r1043 1347 1347 #if N0065_LAYER_POC_ALIGNMENT 1348 1348 #if O0062_POC_LSB_NOT_PRESENT_FLAG 1349 if( ( pcSlice->getLayerId() > 0 && !pcSlice->getVPS()->getPocLsbNotPresentFlag( pcSlice->getVPS()->getLayerId InVps(pcSlice->getLayerId())) ) || !pcSlice->getIdrPicFlag() )1349 if( ( pcSlice->getLayerId() > 0 && !pcSlice->getVPS()->getPocLsbNotPresentFlag( pcSlice->getVPS()->getLayerIdxInVps(pcSlice->getLayerId())) ) || !pcSlice->getIdrPicFlag() ) 1350 1350 #else 1351 1351 if( pcSlice->getLayerId() > 0 || !pcSlice->getIdrPicFlag() ) … … 1536 1536 if(chkAssert) 1537 1537 { 1538 // There may be something wrong here (layer id assumed to be layer idx?)1539 assert(rps->getNumberOfNegativePictures() <= pcSlice->getVPS()->getMaxVpsDecPicBufferingMinus1(ii , pcSlice->getLayerId(), pcSlice->getVPS()->getMaxSLayersInLayerSetMinus1(ii)));1540 assert(rps->getNumberOfPositivePictures() <= pcSlice->getVPS()->getMaxVpsDecPicBufferingMinus1(ii , pcSlice->getLayerId(), pcSlice->getVPS()->getMaxSLayersInLayerSetMinus1(ii)) - rps->getNumberOfNegativePictures());1541 assert((rps->getNumberOfPositivePictures() + rps->getNumberOfNegativePictures() + rps->getNumberOfLongtermPictures()) <= pcSlice->getVPS()->getMaxVpsDecPicBufferingMinus1(ii , pcSlice->getLayerId(), pcSlice->getVPS()->getMaxSLayersInLayerSetMinus1(ii)));1538 UInt layerIdx = pcSlice->getVPS()->getLayerIdxInVps(pcSlice->getLayerId()); 1539 assert(rps->getNumberOfNegativePictures() <= pcSlice->getVPS()->getMaxVpsDecPicBufferingMinus1(ii, layerIdx, pcSlice->getVPS()->getMaxSLayersInLayerSetMinus1(ii))); 1540 assert(rps->getNumberOfPositivePictures() <= pcSlice->getVPS()->getMaxVpsDecPicBufferingMinus1(ii, layerIdx, pcSlice->getVPS()->getMaxSLayersInLayerSetMinus1(ii)) - rps->getNumberOfNegativePictures()); 1541 assert((rps->getNumberOfPositivePictures() + rps->getNumberOfNegativePictures() + rps->getNumberOfLongtermPictures()) <= pcSlice->getVPS()->getMaxVpsDecPicBufferingMinus1(ii, layerIdx, pcSlice->getVPS()->getMaxSLayersInLayerSetMinus1(ii))); 1542 1542 } 1543 1543 } … … 1601 1601 { 1602 1602 #if Q0060_MAX_TID_REF_EQUAL_TO_ZERO 1603 if((pcSlice->getVPS()->getMaxTidIlRefPicsPlus1(pcSlice->getVPS()->getLayerId InVps(i),pcSlice->getLayerId()) > pcSlice->getTLayer() || pcSlice->getTLayer()==0) &&1604 (pcSlice->getVPS()->getMaxTSLayersMinus1(pcSlice->getVPS()->getLayerId InVps(i)) >= pcSlice->getTLayer()) )1603 if((pcSlice->getVPS()->getMaxTidIlRefPicsPlus1(pcSlice->getVPS()->getLayerIdxInVps(i),pcSlice->getLayerId()) > pcSlice->getTLayer() || pcSlice->getTLayer()==0) && 1604 (pcSlice->getVPS()->getMaxTSLayersMinus1(pcSlice->getVPS()->getLayerIdxInVps(i)) >= pcSlice->getTLayer()) ) 1605 1605 #else 1606 if(pcSlice->getVPS()->getMaxTidIlRefPicsPlus1(pcSlice->getVPS()->getLayerId InVps(i),pcSlice->getLayerId()) > pcSlice->getTLayer() &&1607 (pcSlice->getVPS()->getMaxTSLayersMinus1(pcSlice->getVPS()->getLayerId InVps(i)) >= pcSlice->getTLayer()) )1606 if(pcSlice->getVPS()->getMaxTidIlRefPicsPlus1(pcSlice->getVPS()->getLayerIdxInVps(i),pcSlice->getLayerId()) > pcSlice->getTLayer() && 1607 (pcSlice->getVPS()->getMaxTSLayersMinus1(pcSlice->getVPS()->getLayerIdxInVps(i)) >= pcSlice->getTLayer()) ) 1608 1608 #endif 1609 1609 { … … 1664 1664 { 1665 1665 #if Q0060_MAX_TID_REF_EQUAL_TO_ZERO 1666 if((pcSlice->getVPS()->getMaxTidIlRefPicsPlus1(pcSlice->getVPS()->getLayerId InVps(i),pcSlice->getLayerId()) > pcSlice->getTLayer() || pcSlice->getTLayer()==0) &&1667 (pcSlice->getVPS()->getMaxTSLayersMinus1(pcSlice->getVPS()->getLayerId InVps(i)) >= pcSlice->getTLayer()) )1666 if((pcSlice->getVPS()->getMaxTidIlRefPicsPlus1(pcSlice->getVPS()->getLayerIdxInVps(i),pcSlice->getLayerId()) > pcSlice->getTLayer() || pcSlice->getTLayer()==0) && 1667 (pcSlice->getVPS()->getMaxTSLayersMinus1(pcSlice->getVPS()->getLayerIdxInVps(i)) >= pcSlice->getTLayer()) ) 1668 1668 #else 1669 if(pcSlice->getVPS()->getMaxTidIlRefPicsPlus1(pcSlice->getVPS()->getLayerId InVps(i),pcSlice->getLayerId()) > pcSlice->getTLayer() &&1670 (pcSlice->getVPS()->getMaxTSLayersMinus1(pcSlice->getVPS()->getLayerId InVps(i)) >= pcSlice->getTLayer()) )1669 if(pcSlice->getVPS()->getMaxTidIlRefPicsPlus1(pcSlice->getVPS()->getLayerIdxInVps(i),pcSlice->getLayerId()) > pcSlice->getTLayer() && 1670 (pcSlice->getVPS()->getMaxTSLayersMinus1(pcSlice->getVPS()->getLayerIdxInVps(i)) >= pcSlice->getTLayer()) ) 1671 1671 #endif 1672 1672 { … … 1714 1714 else 1715 1715 { 1716 format = pcSlice->getVPS()->getVpsRepFormat( sps->getUpdateRepFormatFlag() ? sps->getUpdateRepFormatIndex() : pcSlice->getVPS()->getVpsRepFormatIdx( pcSlice->getVPS()->getLayerId InVps(sps->getLayerId()) ) )->getChromaFormatVpsIdc();1716 format = pcSlice->getVPS()->getVpsRepFormat( sps->getUpdateRepFormatFlag() ? sps->getUpdateRepFormatIndex() : pcSlice->getVPS()->getVpsRepFormatIdx( pcSlice->getVPS()->getLayerIdxInVps(sps->getLayerId()) ) )->getChromaFormatVpsIdc(); 1717 1717 #if Q0195_REP_FORMAT_CLEANUP 1718 1718 assert( (sps->getUpdateRepFormatFlag()==false && pcSlice->getVPS()->getVpsNumRepFormats()==1) || pcSlice->getVPS()->getVpsNumRepFormats() > 1 ); //conformance check … … 2062 2062 } 2063 2063 #if Q0142_POC_LSB_NOT_PRESENT 2064 if ( pcSlice->getVPS()->getPocLsbNotPresentFlag( pcSlice->getVPS()->getLayerId InVps(pcSlice->getLayerId()) ) && iPOClsb > 0 )2064 if ( pcSlice->getVPS()->getPocLsbNotPresentFlag( pcSlice->getVPS()->getLayerIdxInVps(pcSlice->getLayerId()) ) && iPOClsb > 0 ) 2065 2065 { 2066 2066 assert( pcSlice->getPocResetIdc() != 2 ); … … 2082 2082 READ_CODE(pcSlice->getSPS()->getBitsForPOC(), uiCode,"poc_lsb_val"); pcSlice->setPocLsbVal(uiCode); 2083 2083 #if Q0142_POC_LSB_NOT_PRESENT 2084 if ( pcSlice->getVPS()->getPocLsbNotPresentFlag( pcSlice->getVPS()->getLayerId InVps(pcSlice->getLayerId()) ) && pcSlice->getFullPocResetFlag() )2084 if ( pcSlice->getVPS()->getPocLsbNotPresentFlag( pcSlice->getVPS()->getLayerIdxInVps(pcSlice->getLayerId()) ) && pcSlice->getFullPocResetFlag() ) 2085 2085 { 2086 2086 assert( pcSlice->getPocLsbVal() == 0 ); … … 2854 2854 READ_FLAG( uiCode, "vps_nuh_layer_id_present_flag" ); vps->setNuhLayerIdPresentFlag(uiCode ? true : false); 2855 2855 vps->setLayerIdInNuh(0, 0); 2856 vps->setLayerId InVps(0, 0);2856 vps->setLayerIdxInVps(0, 0); 2857 2857 for(i = 1; i < vps->getMaxLayers(); i++) 2858 2858 { … … 2866 2866 vps->setLayerIdInNuh(i, i); 2867 2867 } 2868 vps->setLayerId InVps(vps->getLayerIdInNuh(i), i);2868 vps->setLayerIdxInVps(vps->getLayerIdInNuh(i), i); 2869 2869 2870 2870 if( !vps->getSplittingFlag() ) … … 2881 2881 #endif 2882 2882 #if VIEW_ID_RELATED_SIGNALING 2883 // if ( pcVPS->getNumViews() > 1 )2884 // However, this is a bug in the text since, view_id_len_minus1 is needed to parse view_id_val.2885 {2886 2883 #if O0109_VIEW_ID_LEN 2887 READ_CODE( 4, uiCode, "view_id_len" ); vps->setViewIdLen( uiCode ); 2888 #else 2889 READ_CODE( 4, uiCode, "view_id_len_minus1" ); vps->setViewIdLenMinus1( uiCode ); 2890 #endif 2891 } 2884 READ_CODE( 4, uiCode, "view_id_len" ); vps->setViewIdLen( uiCode ); 2885 #else 2886 READ_CODE( 4, uiCode, "view_id_len_minus1" ); vps->setViewIdLenMinus1( uiCode ); 2887 #endif 2892 2888 2893 2889 #if O0109_VIEW_ID_LEN … … 2910 2906 vps->setNumDirectRefLayers(0, 0); 2911 2907 // For other layers 2912 for( Int layerCtr = 1; layerCtr <= vps->getMaxLayers() - 1; layerCtr++) 2913 { 2908 for( Int layerCtr = 1; layerCtr < vps->getMaxLayers(); layerCtr++) 2909 { 2910 UInt layerId = vps->getLayerIdInNuh(layerCtr); 2914 2911 UInt numDirectRefLayers = 0; 2915 2912 for( Int refLayerCtr = 0; refLayerCtr < layerCtr; refLayerCtr++) … … 2918 2915 if(uiCode) 2919 2916 { 2920 vps->setRefLayerId(layer Ctr, numDirectRefLayers, refLayerCtr);2917 vps->setRefLayerId(layerId, numDirectRefLayers, vps->getLayerIdInNuh(refLayerCtr)); 2921 2918 numDirectRefLayers++; 2922 2919 } 2923 2920 } 2924 vps->setNumDirectRefLayers(layer Ctr, numDirectRefLayers);2921 vps->setNumDirectRefLayers(layerId, numDirectRefLayers); 2925 2922 } 2926 2923 #endif … … 3673 3670 { 3674 3671 vps->setLayerIdInNuh(i, i); 3675 vps->setLayerId InVps(vps->getLayerIdInNuh(i), i);3672 vps->setLayerIdxInVps(vps->getLayerIdInNuh(i), i); 3676 3673 } 3677 3674 … … 3868 3865 for(Int k = 0; k < vps->getNumLayersInIdList(optLsIdx); k++ ) { 3869 3866 Int lId = vps->getLayerSetLayerIdList(optLsIdx, k); 3870 maxSLMinus1 = max(maxSLMinus1, vps->getMaxTSLayersMinus1(vps->getLayerId InVps(lId)));3867 maxSLMinus1 = max(maxSLMinus1, vps->getMaxTSLayersMinus1(vps->getLayerIdxInVps(lId))); 3871 3868 } 3872 3869 MaxSubLayersInLayerSetMinus1[ i ] = maxSLMinus1; … … 4229 4226 { 4230 4227 #if VPS_VUI_TILES_NOT_IN_USE__FLAG 4231 layerIdx = vps->getLayerId InVps(vps->getRefLayerId(vps->getLayerIdInNuh(i), j));4228 layerIdx = vps->getLayerIdxInVps(vps->getRefLayerId(vps->getLayerIdInNuh(i), j)); 4232 4229 if (vps->getTilesInUseFlag(i) && vps->getTilesInUseFlag(layerIdx)) { 4233 4230 READ_FLAG( uiCode, "tile_boundaries_aligned_flag[i][j]" ); vps->setTileBoundariesAlignedFlag(i,j,(uiCode == 1)); -
branches/SHM-dev/source/Lib/TLibDecoder/TDecCu.h
r1029 r1043 103 103 104 104 #if SVC_EXTENSION 105 TDecTop* getLayerDec ( UInt LayerId ) { return m_ppcTDecTop[LayerId]; }105 TDecTop* getLayerDec ( UInt layerIdx ) { return m_ppcTDecTop[layerIdx]; } 106 106 #endif 107 107 protected: -
branches/SHM-dev/source/Lib/TLibDecoder/TDecGop.cpp
r1029 r1043 252 252 } 253 253 #if CONFORMANCE_BITSTREAM_MODE 254 if( this->getLayerDec(pcPic->getLayerId ())->getConfModeFlag() )254 if( this->getLayerDec(pcPic->getLayerIdx())->getConfModeFlag() ) 255 255 { 256 256 // Add this reconstructed picture to the parallel buffer. 257 std::vector<TComPic> *thisLayerBuffer = (this->getLayerDec(pcPic->getLayerId ()))->getConfListPic();257 std::vector<TComPic> *thisLayerBuffer = (this->getLayerDec(pcPic->getLayerIdx()))->getConfListPic(); 258 258 thisLayerBuffer->push_back(*pcPic); 259 259 std::sort( thisLayerBuffer->begin(), thisLayerBuffer->end(), pocCompareFunction ); -
branches/SHM-dev/source/Lib/TLibDecoder/TDecGop.h
r1029 r1043 118 118 #endif 119 119 #if SVC_EXTENSION 120 TDecTop* getLayerDec(UInt LayerId) { return m_ppcTDecTop[LayerId]; }120 TDecTop* getLayerDec(UInt layerIdx) { return m_ppcTDecTop[layerIdx]; } 121 121 #endif 122 122 -
branches/SHM-dev/source/Lib/TLibDecoder/TDecTop.cpp
r1040 r1043 483 483 484 484 #if FIX_NON_OUTPUT_LAYER 485 if( this->getLayerDec(pcPic->getLayerId ())->m_isOutputLayerFlag == false )485 if( this->getLayerDec(pcPic->getLayerIdx())->m_isOutputLayerFlag == false ) 486 486 { 487 487 pcPic->setOutputMark( false ); … … 764 764 765 765 #if P0182_VPS_VUI_PS_FLAG 766 UInt layerIdx = activeVPS->getLayerId InVps( m_layerId );766 UInt layerIdx = activeVPS->getLayerIdxInVps( m_layerId ); 767 767 768 768 if( activeVPS->getBaseLayerPSCompatibilityFlag(layerIdx) ) … … 788 788 789 789 #if R0227_REP_FORMAT_CONSTRAINT //Conformance checking for rep format -- rep format of current picture of current layer shall never be greater rep format defined in VPS for the current layer 790 UInt layerIdx = activeVPS->getLayerId InVps(m_apcSlicePilot->getLayerId());790 UInt layerIdx = activeVPS->getLayerIdxInVps(m_apcSlicePilot->getLayerId()); 791 791 792 792 if ( activeVPS->getVpsExtensionFlag() == 1 && (m_apcSlicePilot->getLayerId() == 0 || sps->getV1CompatibleSPSFlag() == 1) ) … … 2849 2849 2850 2850 #if VPS_EXTN_DIRECT_REF_LAYERS 2851 TDecTop* TDecTop::getRefLayerDec( UInt refLayerId c)2851 TDecTop* TDecTop::getRefLayerDec( UInt refLayerIdx ) 2852 2852 { 2853 2853 TComVPS* vps = m_parameterSetManagerDecoder.getActiveVPS(); … … 2857 2857 } 2858 2858 2859 return (TDecTop *)getLayerDec( vps->get RefLayerId( m_layerId, refLayerIdc) );2859 return (TDecTop *)getLayerDec( vps->getLayerIdxInVps( vps->getRefLayerId( m_layerId, refLayerIdx ) ) ); 2860 2860 } 2861 2861 #endif … … 2897 2897 { 2898 2898 Int mIdx = 0, sIdx = 0; 2899 Int iNuhLId = vps->getLayerIdInNuh(i); 2900 TDecTop *decTop = (TDecTop *)getLayerDec(iNuhLId); 2899 TDecTop *decTop = (TDecTop *)getLayerDec(i); 2901 2900 for ( Int j = 0; j < i; j++ ) 2902 2901 { … … 2961 2960 for ( Int j = latestDecIdx + 1; j < numTargetDecLayers; j++ ) 2962 2961 { 2963 Int jLidx = pcSlice->getVPS()->getLayerId InVps(targetDecLayerIdList[j]);2962 Int jLidx = pcSlice->getVPS()->getLayerIdxInVps(targetDecLayerIdList[j]); 2964 2963 if ( currTid <= pcSlice->getVPS()->getMaxTidIlRefPicsPlus1(latestDecLayerId,jLidx) - 1 ) 2965 2964 { … … 3109 3108 if( vps->getOutputLayerFlag( targetOlsIdx, i ) ) 3110 3109 { 3111 this->getLayerDec( vps->getLayer SetLayerIdList( targetLsIdx, i) )->m_isOutputLayerFlag = true;3110 this->getLayerDec( vps->getLayerIdxInVps( vps->getLayerSetLayerIdList( targetLsIdx, i ) ) )->m_isOutputLayerFlag = true; 3112 3111 } 3113 3112 } -
branches/SHM-dev/source/Lib/TLibDecoder/TDecTop.h
r1029 r1043 242 242 #endif 243 243 #if POC_RESET_IDC_DECODER 244 Int getParseIdc() { return m_parseIdc;}245 Void setParseIdc(Int x) { m_parseIdc = x;}246 Void 247 248 Int getLastPocPeriodId() { return m_lastPocPeriodId;}249 Void setLastPocPeriodId(Int x) { m_lastPocPeriodId = x;}250 251 Int getPrevPicOrderCnt() { return m_prevPicOrderCnt;}252 Void setPrevPicOrderCnt(Int const x) { m_prevPicOrderCnt = x;}253 #endif 254 UInt getLayerId () { return m_layerId;}255 Void setLayerId (UInt layer) { m_layerId = layer;}256 UInt getNumLayer () { return m_numLayer;}257 Void setNumLayer (UInt uiNum) { m_numLayer = uiNum;}258 TComList<TComPic*>* getListPic() { return &m_cListPic;}259 Void setLayerDec (TDecTop **p) { m_ppcTDecTop = p;}260 TDecTop* getLayerDec (UInt layer) { return m_ppcTDecTop[layer];}244 Int getParseIdc () { return m_parseIdc; } 245 Void setParseIdc (Int x) { m_parseIdc = x; } 246 Void markAllPicsAsNoCurrAu(); 247 248 Int getLastPocPeriodId () { return m_lastPocPeriodId; } 249 Void setLastPocPeriodId (Int x) { m_lastPocPeriodId = x; } 250 251 Int getPrevPicOrderCnt () { return m_prevPicOrderCnt; } 252 Void setPrevPicOrderCnt (Int const x) { m_prevPicOrderCnt = x; } 253 #endif 254 UInt getLayerId () { return m_layerId; } 255 Void setLayerId (UInt layer) { m_layerId = layer; } 256 UInt getNumLayer () { return m_numLayer; } 257 Void setNumLayer (UInt uiNum) { m_numLayer = uiNum; } 258 TComList<TComPic*>* getListPic () { return &m_cListPic; } 259 Void setLayerDec (TDecTop **p) { m_ppcTDecTop = p; } 260 TDecTop* getLayerDec (UInt layerIdx) { return m_ppcTDecTop[layerIdx]; } 261 261 #if R0235_SMALLEST_LAYER_ID 262 262 Void xDeriveSmallestLayerId(TComVPS* vps); 263 263 #endif 264 264 #if VPS_EXTN_DIRECT_REF_LAYERS 265 TDecTop* getRefLayerDec (UInt refLayerIdc);265 TDecTop* getRefLayerDec (UInt refLayerIdx); 266 266 Int getNumDirectRefLayers () { return m_numDirectRefLayers; } 267 267 Void setNumDirectRefLayers (Int num) { m_numDirectRefLayers = num; } -
branches/SHM-dev/source/Lib/TLibEncoder/TEncCavlc.cpp
r1030 r1043 1077 1077 #if N0065_LAYER_POC_ALIGNMENT 1078 1078 #if O0062_POC_LSB_NOT_PRESENT_FLAG 1079 if( (pcSlice->getLayerId() > 0 && !pcSlice->getVPS()->getPocLsbNotPresentFlag( pcSlice->getVPS()->getLayerId InVps(pcSlice->getLayerId())) ) || !pcSlice->getIdrPicFlag())1079 if( (pcSlice->getLayerId() > 0 && !pcSlice->getVPS()->getPocLsbNotPresentFlag( pcSlice->getVPS()->getLayerIdxInVps(pcSlice->getLayerId())) ) || !pcSlice->getIdrPicFlag()) 1080 1080 #else 1081 1081 if( pcSlice->getLayerId() > 0 || !pcSlice->getIdrPicFlag() ) … … 2747 2747 for(Int k = 0; k < vps->getNumLayersInIdList(optLsIdx); k++ ) { 2748 2748 Int lId = vps->getLayerSetLayerIdList(optLsIdx, k); 2749 maxSLMinus1 = max(maxSLMinus1, vps->getMaxTSLayersMinus1(vps->getLayerId InVps(lId)));2749 maxSLMinus1 = max(maxSLMinus1, vps->getMaxTSLayersMinus1(vps->getLayerIdxInVps(lId))); 2750 2750 } 2751 2751 MaxSubLayersInLayerSetMinus1[ i ] = maxSLMinus1; … … 2957 2957 { 2958 2958 #if VPS_VUI_TILES_NOT_IN_USE__FLAG 2959 layerIdx = vps->getLayerId InVps(vps->getRefLayerId(vps->getLayerIdInNuh(i), j));2959 layerIdx = vps->getLayerIdxInVps(vps->getRefLayerId(vps->getLayerIdInNuh(i), j)); 2960 2960 if (vps->getTilesInUseFlag(i) && vps->getTilesInUseFlag(layerIdx)) { 2961 2961 WRITE_FLAG( vps->getTileBoundariesAlignedFlag(i,j) ? 1 : 0 , "tile_boundaries_aligned_flag[i][j]" ); -
branches/SHM-dev/source/Lib/TLibEncoder/TEncTop.cpp
r1030 r1043 930 930 { 931 931 #if REPN_FORMAT_IN_VPS 932 m_cSPS.setBitDepth (ChannelType(channelType), m_cVPS.getVpsRepFormat( m_cVPS.getVpsRepFormatIdx( m_cVPS.getLayerId InVps( m_layerId ) ) )->getBitDepthVps(ChannelType(channelType)) );933 m_cSPS.setQpBDOffset (ChannelType(channelType), (6 * (m_cVPS.getVpsRepFormat( m_cVPS.getVpsRepFormatIdx( m_cVPS.getLayerId InVps( m_layerId ) ) )->getBitDepthVps(ChannelType(channelType)) - 8)));932 m_cSPS.setBitDepth (ChannelType(channelType), m_cVPS.getVpsRepFormat( m_cVPS.getVpsRepFormatIdx( m_cVPS.getLayerIdxInVps( m_layerId ) ) )->getBitDepthVps(ChannelType(channelType)) ); 933 m_cSPS.setQpBDOffset (ChannelType(channelType), (6 * (m_cVPS.getVpsRepFormat( m_cVPS.getVpsRepFormatIdx( m_cVPS.getLayerIdxInVps( m_layerId ) ) )->getBitDepthVps(ChannelType(channelType)) - 8))); 934 934 #else 935 935 m_cSPS.setBitDepth (ChannelType(channelType), g_bitDepth[channelType] ); … … 1580 1580 { 1581 1581 #if O0096_REP_FORMAT_INDEX 1582 RepFormat *repFormat = m_cVPS.getVpsRepFormat( m_cSPS.getUpdateRepFormatFlag() ? m_cSPS.getUpdateRepFormatIndex() : m_cVPS.getVpsRepFormatIdx( m_cVPS.getLayerId InVps(m_layerId) ) );1583 #else 1584 RepFormat *repFormat = m_cVPS.getVpsRepFormat( m_cVPS.getVpsRepFormatIdx( m_cVPS.getLayerId InVps(m_layerId) ) );1582 RepFormat *repFormat = m_cVPS.getVpsRepFormat( m_cSPS.getUpdateRepFormatFlag() ? m_cSPS.getUpdateRepFormatIndex() : m_cVPS.getVpsRepFormatIdx( m_cVPS.getLayerIdxInVps(m_layerId) ) ); 1583 #else 1584 RepFormat *repFormat = m_cVPS.getVpsRepFormat( m_cVPS.getVpsRepFormatIdx( m_cVPS.getLayerIdxInVps(m_layerId) ) ); 1585 1585 #endif 1586 1586 Int bitDepthY,bitDepthC,picWidth,picHeight; … … 1645 1645 if( m_cVPS.getNumRefLayers( m_layerId ) == 0 ) 1646 1646 { 1647 UInt layerIdx = m_cVPS.getLayerId InVps( m_layerId );1647 UInt layerIdx = m_cVPS.getLayerIdxInVps( m_layerId ); 1648 1648 RepFormat* repFmt = m_cVPS.getVpsRepFormat(m_cVPS.getVpsRepFormatIdx(layerIdx)); 1649 1649
Note: See TracChangeset for help on using the changeset viewer.