Changeset 1000 in SHVCSoftware
- Timestamp:
- 22 Jan 2015, 07:22:02 (10 years ago)
- Location:
- branches/SHM-upgrade/source
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/SHM-upgrade/source/App/TAppEncoder/TAppEncTop.cpp
r998 r1000 1249 1249 { 1250 1250 #if SVC_EXTENSION 1251 TComVPS* vps = m_acTEncTop[0].getVPS(); 1252 m_acTEncTop[0].getVPS()->setMaxLayers( m_numLayers ); 1253 1254 UInt i = 0, dimIdLen = 0; 1255 1256 while((1 << dimIdLen) < m_numLayers) 1257 { 1258 dimIdLen++; 1259 } 1260 vps->setDimensionIdLen(0, dimIdLen); 1261 vps->setNuhLayerIdPresentFlag(false); 1262 vps->setLayerIdInNuh(0, 0); 1263 vps->setLayerIdInVps(0, 0); 1264 for(i = 1; i < vps->getMaxLayers(); i++) 1265 { 1266 vps->setLayerIdInNuh(i, i); 1267 vps->setLayerIdInVps(vps->getLayerIdInNuh(i), i); 1268 vps->setDimensionId(i, 0, i); 1269 } 1270 1251 1271 for(UInt layer=0; layer<m_numLayers; layer++) 1252 1272 { … … 1276 1296 #endif 1277 1297 } 1278 m_acTEncTop[0].getVPS()->setMaxLayers( m_numLayers ); 1298 1279 1299 #if VPS_EXTN_OP_LAYER_SETS 1280 TComVPS* vps = m_acTEncTop[0].getVPS();1281 1300 vps->setMaxLayerId(m_numLayers - 1); // Set max-layer ID 1282 1301 … … 1370 1389 #endif 1371 1390 #if VPS_EXTN_MASK_AND_DIM_INFO 1372 UInt i = 0, dimIdLen = 0;1373 1391 #if AVC_BASE 1374 1392 #if VPS_AVC_BL_FLAG_REMOVAL … … 1408 1426 vps->setNumScalabilityTypes(0); 1409 1427 } 1410 while((1 << dimIdLen) < m_numLayers) 1411 { 1412 dimIdLen++; 1413 } 1414 vps->setDimensionIdLen(0, dimIdLen); 1415 vps->setNuhLayerIdPresentFlag(false); 1416 vps->setLayerIdInNuh(0, 0); 1417 vps->setLayerIdInVps(0, 0); 1418 for(i = 1; i < vps->getMaxLayers(); i++) 1419 { 1420 vps->setLayerIdInNuh(i, i); 1421 vps->setLayerIdInVps(vps->getLayerIdInNuh(i), i); 1422 vps->setDimensionId(i, 0, i); 1423 } 1428 1424 1429 #if AUXILIARY_PICTURES 1425 1430 if (m_scalabilityMask[3]) -
branches/SHM-upgrade/source/Lib/TLibCommon/TComSlice.cpp
r996 r1000 3911 3911 else 3912 3912 { 3913 retVal = vps->getVpsRepFormat(sps->getUpdateRepFormatFlag() ? sps->getUpdateRepFormatIndex() : vps->getVpsRepFormatIdx( layerId))->getPicWidthVpsInLumaSamples();3913 retVal = vps->getVpsRepFormat(sps->getUpdateRepFormatFlag() ? sps->getUpdateRepFormatIndex() : vps->getVpsRepFormatIdx(vps->getLayerIdInVps(layerId)))->getPicWidthVpsInLumaSamples(); 3914 3914 } 3915 3915 #else … … 3920 3920 else 3921 3921 { 3922 retVal = vps->getVpsRepFormat( vps->getVpsRepFormatIdx( layerId) )->getPicWidthVpsInLumaSamples();3922 retVal = vps->getVpsRepFormat( vps->getVpsRepFormatIdx(vps->getLayerIdInVps(layerId)) )->getPicWidthVpsInLumaSamples(); 3923 3923 } 3924 3924 #endif … … 3954 3954 else 3955 3955 { 3956 retVal = vps->getVpsRepFormat(sps->getUpdateRepFormatFlag() ? sps->getUpdateRepFormatIndex() : vps->getVpsRepFormatIdx( layerId))->getPicHeightVpsInLumaSamples();3956 retVal = vps->getVpsRepFormat(sps->getUpdateRepFormatFlag() ? sps->getUpdateRepFormatIndex() : vps->getVpsRepFormatIdx(vps->getLayerIdInVps(layerId)))->getPicHeightVpsInLumaSamples(); 3957 3957 } 3958 3958 #else … … 3963 3963 else 3964 3964 { 3965 retVal = vps->getVpsRepFormat( vps->getVpsRepFormatIdx( layerId) )->getPicHeightVpsInLumaSamples();3965 retVal = vps->getVpsRepFormat( vps->getVpsRepFormatIdx(vps->getLayerIdInVps(layerId)) )->getPicHeightVpsInLumaSamples(); 3966 3966 } 3967 3967 #endif … … 4006 4006 else 4007 4007 { 4008 retVal = vps->getVpsRepFormat(sps->getUpdateRepFormatFlag() ? sps->getUpdateRepFormatIndex() : vps->getVpsRepFormatIdx( layerId))->getChromaFormatVpsIdc();4008 retVal = vps->getVpsRepFormat(sps->getUpdateRepFormatFlag() ? sps->getUpdateRepFormatIndex() : vps->getVpsRepFormatIdx(vps->getLayerIdInVps(layerId)))->getChromaFormatVpsIdc(); 4009 4009 } 4010 4010 #else … … 4015 4015 else 4016 4016 { 4017 retVal = vps->getVpsRepFormat( vps->getVpsRepFormatIdx( layerId) )->getChromaFormatVpsIdc();4017 retVal = vps->getVpsRepFormat( vps->getVpsRepFormatIdx(vps->getLayerIdInVps(layerId)) )->getChromaFormatVpsIdc(); 4018 4018 } 4019 4019 #endif … … 4048 4048 else 4049 4049 { 4050 retVal = vps->getVpsRepFormat(sps->getUpdateRepFormatFlag() ? sps->getUpdateRepFormatIndex() : vps->getVpsRepFormatIdx( layerId))->getBitDepthVpsLuma();4050 retVal = vps->getVpsRepFormat(sps->getUpdateRepFormatFlag() ? sps->getUpdateRepFormatIndex() : vps->getVpsRepFormatIdx(vps->getLayerIdInVps(layerId)))->getBitDepthVpsLuma(); 4051 4051 } 4052 4052 #else … … 4057 4057 else 4058 4058 { 4059 retVal = vps->getVpsRepFormat( vps->getVpsRepFormatIdx( layerId) )->getBitDepthVpsLuma();4059 retVal = vps->getVpsRepFormat( vps->getVpsRepFormatIdx(vps->getLayerIdInVps(layerId)) )->getBitDepthVpsLuma(); 4060 4060 } 4061 4061 #endif … … 4090 4090 else 4091 4091 { 4092 retVal = vps->getVpsRepFormat(sps->getUpdateRepFormatFlag() ? sps->getUpdateRepFormatIndex() : vps->getVpsRepFormatIdx( layerId))->getBitDepthVpsChroma();4092 retVal = vps->getVpsRepFormat(sps->getUpdateRepFormatFlag() ? sps->getUpdateRepFormatIndex() : vps->getVpsRepFormatIdx(vps->getLayerIdInVps(layerId)))->getBitDepthVpsChroma(); 4093 4093 } 4094 4094 #else … … 4099 4099 else 4100 4100 { 4101 retVal = vps->getVpsRepFormat( vps->getVpsRepFormatIdx( layerId) )->getBitDepthVpsChroma();4101 retVal = vps->getVpsRepFormat( vps->getVpsRepFormatIdx(vps->getLayerIdInVps(layerId)) )->getBitDepthVpsChroma(); 4102 4102 } 4103 4103 #endif … … 4143 4143 else 4144 4144 { 4145 return vps->getVpsRepFormat(sps->getUpdateRepFormatFlag() ? sps->getUpdateRepFormatIndex() : vps->getVpsRepFormatIdx( layerId))->getConformanceWindowVps();4145 return vps->getVpsRepFormat(sps->getUpdateRepFormatFlag() ? sps->getUpdateRepFormatIndex() : vps->getVpsRepFormatIdx(vps->getLayerIdInVps(layerId)))->getConformanceWindowVps(); 4146 4146 } 4147 4147 #else … … 4152 4152 else 4153 4153 { 4154 return vps->getVpsRepFormat( vps->getVpsRepFormatIdx( layerId) )->getConformanceWindowVps();4154 return vps->getVpsRepFormat( vps->getVpsRepFormatIdx(vps->getLayerIdInVps(vps->getLayerIdInVps(layerId))) )->getConformanceWindowVps(); 4155 4155 } 4156 4156 #endif -
branches/SHM-upgrade/source/Lib/TLibDecoder/TDecCAVLC.cpp
r981 r1000 1710 1710 else 1711 1711 { 1712 format = pcSlice->getVPS()->getVpsRepFormat( sps->getUpdateRepFormatFlag() ? sps->getUpdateRepFormatIndex() : pcSlice->getVPS()->getVpsRepFormatIdx( sps->getLayerId()) )->getChromaFormatVpsIdc();1712 format = pcSlice->getVPS()->getVpsRepFormat( sps->getUpdateRepFormatFlag() ? sps->getUpdateRepFormatIndex() : pcSlice->getVPS()->getVpsRepFormatIdx( pcSlice->getVPS()->getLayerIdInVps(sps->getLayerId()) ) )->getChromaFormatVpsIdc(); 1713 1713 #if Q0195_REP_FORMAT_CLEANUP 1714 1714 assert( (sps->getUpdateRepFormatFlag()==false && pcSlice->getVPS()->getVpsNumRepFormats()==1) || pcSlice->getVPS()->getVpsNumRepFormats() > 1 ); //conformance check … … 3409 3409 { 3410 3410 #if VPS_FIX_TO_MATCH_SPEC 3411 3412 #else 3413 3411 for( i = vps->getBaseLayerInternalFlag() ? 1 : 0; i < vps->getMaxLayers(); i++ ) 3412 #else 3413 for (i = 1; i < vps->getMaxLayers(); i++) 3414 3414 #endif 3415 3415 { -
branches/SHM-upgrade/source/Lib/TLibDecoder/TDecTop.cpp
r996 r1000 764 764 765 765 #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 766 UInt layerIdx = activeVPS->getLayerIdInVps(m_apcSlicePilot->getLayerId()); 767 766 768 if ( activeVPS->getVpsExtensionFlag() == 1 && (m_apcSlicePilot->getLayerId() == 0 || sps->getV1CompatibleSPSFlag() == 1) ) 767 769 { 768 UInt layerId = m_apcSlicePilot->getLayerId(); 769 assert( sps->getPicWidthInLumaSamples() <= activeVPS->getVpsRepFormat( activeVPS->getVpsRepFormatIdx(layerId) )->getPicWidthVpsInLumaSamples() ); 770 assert( sps->getPicHeightInLumaSamples() <= activeVPS->getVpsRepFormat( activeVPS->getVpsRepFormatIdx(layerId) )->getPicHeightVpsInLumaSamples() ); 771 assert( sps->getChromaFormatIdc() <= activeVPS->getVpsRepFormat( activeVPS->getVpsRepFormatIdx(layerId) )->getChromaFormatVpsIdc() ); 772 assert( sps->getBitDepth(CHANNEL_TYPE_LUMA) <= activeVPS->getVpsRepFormat( activeVPS->getVpsRepFormatIdx(layerId) )->getBitDepthVpsLuma() ); 773 assert( sps->getBitDepth(CHANNEL_TYPE_CHROMA) <= activeVPS->getVpsRepFormat( activeVPS->getVpsRepFormatIdx(layerId) )->getBitDepthVpsChroma() ); 770 assert( sps->getPicWidthInLumaSamples() <= activeVPS->getVpsRepFormat( activeVPS->getVpsRepFormatIdx(layerIdx) )->getPicWidthVpsInLumaSamples() ); 771 assert( sps->getPicHeightInLumaSamples() <= activeVPS->getVpsRepFormat( activeVPS->getVpsRepFormatIdx(layerIdx) )->getPicHeightVpsInLumaSamples() ); 772 assert( sps->getChromaFormatIdc() <= activeVPS->getVpsRepFormat( activeVPS->getVpsRepFormatIdx(layerIdx) )->getChromaFormatVpsIdc() ); 773 assert( sps->getBitDepth(CHANNEL_TYPE_LUMA) <= activeVPS->getVpsRepFormat( activeVPS->getVpsRepFormatIdx(layerIdx) )->getBitDepthVpsLuma() ); 774 assert( sps->getBitDepth(CHANNEL_TYPE_CHROMA) <= activeVPS->getVpsRepFormat( activeVPS->getVpsRepFormatIdx(layerIdx) )->getBitDepthVpsChroma() ); 774 775 } 775 776 else if ( activeVPS->getVpsExtensionFlag() == 1 ) 776 777 { 777 UInt layerId = m_apcSlicePilot->getLayerId(); 778 assert( activeVPS->getVpsRepFormat( sps->getUpdateRepFormatFlag() ? sps->getUpdateRepFormatIndex() : activeVPS->getVpsRepFormatIdx(layerId))->getPicWidthVpsInLumaSamples() <= activeVPS->getVpsRepFormat( activeVPS->getVpsRepFormatIdx(layerId))->getPicWidthVpsInLumaSamples()); 779 assert( activeVPS->getVpsRepFormat( sps->getUpdateRepFormatFlag() ? sps->getUpdateRepFormatIndex() : activeVPS->getVpsRepFormatIdx(layerId))->getPicHeightVpsInLumaSamples() <= activeVPS->getVpsRepFormat( activeVPS->getVpsRepFormatIdx(layerId))->getPicHeightVpsInLumaSamples()); 780 assert( activeVPS->getVpsRepFormat( sps->getUpdateRepFormatFlag() ? sps->getUpdateRepFormatIndex() : activeVPS->getVpsRepFormatIdx(layerId))->getChromaFormatVpsIdc() <= activeVPS->getVpsRepFormat( activeVPS->getVpsRepFormatIdx(layerId))->getChromaFormatVpsIdc()); 781 assert( activeVPS->getVpsRepFormat( sps->getUpdateRepFormatFlag() ? sps->getUpdateRepFormatIndex() : activeVPS->getVpsRepFormatIdx(layerId))->getBitDepthVpsLuma() <= activeVPS->getVpsRepFormat( activeVPS->getVpsRepFormatIdx(layerId))->getBitDepthVpsLuma()); 782 assert( activeVPS->getVpsRepFormat( sps->getUpdateRepFormatFlag() ? sps->getUpdateRepFormatIndex() : activeVPS->getVpsRepFormatIdx(layerId))->getBitDepthVpsChroma() <= activeVPS->getVpsRepFormat( activeVPS->getVpsRepFormatIdx(layerId))->getBitDepthVpsChroma()); 778 assert( activeVPS->getVpsRepFormat( sps->getUpdateRepFormatFlag() ? sps->getUpdateRepFormatIndex() : activeVPS->getVpsRepFormatIdx(layerIdx))->getPicWidthVpsInLumaSamples() <= activeVPS->getVpsRepFormat( activeVPS->getVpsRepFormatIdx(layerIdx))->getPicWidthVpsInLumaSamples()); 779 assert( activeVPS->getVpsRepFormat( sps->getUpdateRepFormatFlag() ? sps->getUpdateRepFormatIndex() : activeVPS->getVpsRepFormatIdx(layerIdx))->getPicHeightVpsInLumaSamples() <= activeVPS->getVpsRepFormat( activeVPS->getVpsRepFormatIdx(layerIdx))->getPicHeightVpsInLumaSamples()); 780 assert( activeVPS->getVpsRepFormat( sps->getUpdateRepFormatFlag() ? sps->getUpdateRepFormatIndex() : activeVPS->getVpsRepFormatIdx(layerIdx))->getChromaFormatVpsIdc() <= activeVPS->getVpsRepFormat( activeVPS->getVpsRepFormatIdx(layerIdx))->getChromaFormatVpsIdc()); 781 assert( activeVPS->getVpsRepFormat( sps->getUpdateRepFormatFlag() ? sps->getUpdateRepFormatIndex() : activeVPS->getVpsRepFormatIdx(layerIdx))->getBitDepthVpsLuma() <= activeVPS->getVpsRepFormat( activeVPS->getVpsRepFormatIdx(layerIdx))->getBitDepthVpsLuma()); 782 assert( activeVPS->getVpsRepFormat( sps->getUpdateRepFormatFlag() ? sps->getUpdateRepFormatIndex() : activeVPS->getVpsRepFormatIdx(layerIdx))->getBitDepthVpsChroma() <= activeVPS->getVpsRepFormat( activeVPS->getVpsRepFormatIdx(layerIdx))->getBitDepthVpsChroma()); 783 783 } 784 784 #endif -
branches/SHM-upgrade/source/Lib/TLibEncoder/TEncTop.cpp
r989 r1000 928 928 { 929 929 #if REPN_FORMAT_IN_VPS 930 m_cSPS.setBitDepth (ChannelType(channelType), m_cVPS.getVpsRepFormat( m_cVPS.getVpsRepFormatIdx( m_ layerId) )->getBitDepthVps(ChannelType(channelType)) );931 m_cSPS.setQpBDOffset (ChannelType(channelType), (6 * (m_cVPS.getVpsRepFormat( m_cVPS.getVpsRepFormatIdx( m_ layerId) )->getBitDepthVps(ChannelType(channelType)) - 8)));930 m_cSPS.setBitDepth (ChannelType(channelType), m_cVPS.getVpsRepFormat( m_cVPS.getVpsRepFormatIdx( m_cVPS.getLayerIdInVps( m_layerId ) ) )->getBitDepthVps(ChannelType(channelType)) ); 931 m_cSPS.setQpBDOffset (ChannelType(channelType), (6 * (m_cVPS.getVpsRepFormat( m_cVPS.getVpsRepFormatIdx( m_cVPS.getLayerIdInVps( m_layerId ) ) )->getBitDepthVps(ChannelType(channelType)) - 8))); 932 932 #else 933 933 m_cSPS.setBitDepth (ChannelType(channelType), g_bitDepth[channelType] ); … … 1578 1578 { 1579 1579 #if O0096_REP_FORMAT_INDEX 1580 RepFormat *repFormat = m_cVPS.getVpsRepFormat( m_c VPS.getVpsRepFormatIdx( m_cSPS.getUpdateRepFormatFlag() ? m_cSPS.getUpdateRepFormatIndex() : m_layerId) );1581 #else 1582 RepFormat *repFormat = m_cVPS.getVpsRepFormat( m_cVPS.getVpsRepFormatIdx( m_ layerId) );1580 RepFormat *repFormat = m_cVPS.getVpsRepFormat( m_cSPS.getUpdateRepFormatFlag() ? m_cSPS.getUpdateRepFormatIndex() : m_cVPS.getVpsRepFormatIdx( m_cVPS.getLayerIdInVps(m_layerId) ) ); 1581 #else 1582 RepFormat *repFormat = m_cVPS.getVpsRepFormat( m_cVPS.getVpsRepFormatIdx( m_cVPS.getLayerIdInVps(m_layerId) ) ); 1583 1583 #endif 1584 1584 Int bitDepthY,bitDepthC,picWidth,picHeight;
Note: See TracChangeset for help on using the changeset viewer.