- Timestamp:
- 22 Jan 2015, 03:28:50 (10 years ago)
- Location:
- branches/SHM-dev/source
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/SHM-dev/source/App/TAppEncoder/TAppEncTop.cpp
r997 r999 1192 1192 { 1193 1193 #if SVC_EXTENSION 1194 TComVPS* vps = m_acTEncTop[0].getVPS(); 1195 m_acTEncTop[0].getVPS()->setMaxLayers( m_numLayers ); 1196 1197 UInt i = 0, dimIdLen = 0; 1198 1199 while((1 << dimIdLen) < m_numLayers) 1200 { 1201 dimIdLen++; 1202 } 1203 vps->setDimensionIdLen(0, dimIdLen); 1204 vps->setNuhLayerIdPresentFlag(false); 1205 vps->setLayerIdInNuh(0, 0); 1206 vps->setLayerIdInVps(0, 0); 1207 for(i = 1; i < vps->getMaxLayers(); i++) 1208 { 1209 vps->setLayerIdInNuh(i, i); 1210 vps->setLayerIdInVps(vps->getLayerIdInNuh(i), i); 1211 vps->setDimensionId(i, 0, i); 1212 } 1213 1194 1214 for(UInt layer=0; layer<m_numLayers; layer++) 1195 1215 { … … 1219 1239 #endif 1220 1240 } 1221 m_acTEncTop[0].getVPS()->setMaxLayers( m_numLayers ); 1241 1222 1242 #if VPS_EXTN_OP_LAYER_SETS 1223 TComVPS* vps = m_acTEncTop[0].getVPS();1224 1243 vps->setMaxLayerId(m_numLayers - 1); // Set max-layer ID 1225 1244 … … 1313 1332 #endif 1314 1333 #if VPS_EXTN_MASK_AND_DIM_INFO 1315 UInt i = 0, dimIdLen = 0;1316 1334 #if AVC_BASE 1317 1335 #if VPS_AVC_BL_FLAG_REMOVAL … … 1351 1369 vps->setNumScalabilityTypes(0); 1352 1370 } 1353 while((1 << dimIdLen) < m_numLayers) 1354 { 1355 dimIdLen++; 1356 } 1357 vps->setDimensionIdLen(0, dimIdLen); 1358 vps->setNuhLayerIdPresentFlag(false); 1359 vps->setLayerIdInNuh(0, 0); 1360 vps->setLayerIdInVps(0, 0); 1361 for(i = 1; i < vps->getMaxLayers(); i++) 1362 { 1363 vps->setLayerIdInNuh(i, i); 1364 vps->setLayerIdInVps(vps->getLayerIdInNuh(i), i); 1365 vps->setDimensionId(i, 0, i); 1366 } 1371 1367 1372 #if AUXILIARY_PICTURES 1368 1373 if (m_scalabilityMask[3]) -
branches/SHM-dev/source/Lib/TLibCommon/TComSlice.cpp
r995 r999 2184 2184 else 2185 2185 { 2186 retVal = vps->getVpsRepFormat(sps->getUpdateRepFormatFlag() ? sps->getUpdateRepFormatIndex() : vps->getVpsRepFormatIdx( layerId))->getPicWidthVpsInLumaSamples();2186 retVal = vps->getVpsRepFormat(sps->getUpdateRepFormatFlag() ? sps->getUpdateRepFormatIndex() : vps->getVpsRepFormatIdx(vps->getLayerIdInVps(layerId)))->getPicWidthVpsInLumaSamples(); 2187 2187 } 2188 2188 #else … … 2193 2193 else 2194 2194 { 2195 retVal = vps->getVpsRepFormat( vps->getVpsRepFormatIdx( layerId) )->getPicWidthVpsInLumaSamples();2195 retVal = vps->getVpsRepFormat( vps->getVpsRepFormatIdx(vps->getLayerIdInVps(layerId)) )->getPicWidthVpsInLumaSamples(); 2196 2196 } 2197 2197 #endif … … 2227 2227 else 2228 2228 { 2229 retVal = vps->getVpsRepFormat(sps->getUpdateRepFormatFlag() ? sps->getUpdateRepFormatIndex() : vps->getVpsRepFormatIdx( layerId))->getPicHeightVpsInLumaSamples();2229 retVal = vps->getVpsRepFormat(sps->getUpdateRepFormatFlag() ? sps->getUpdateRepFormatIndex() : vps->getVpsRepFormatIdx(vps->getLayerIdInVps(layerId)))->getPicHeightVpsInLumaSamples(); 2230 2230 } 2231 2231 #else … … 2236 2236 else 2237 2237 { 2238 retVal = vps->getVpsRepFormat( vps->getVpsRepFormatIdx( layerId) )->getPicHeightVpsInLumaSamples();2238 retVal = vps->getVpsRepFormat( vps->getVpsRepFormatIdx(vps->getLayerIdInVps(layerId)) )->getPicHeightVpsInLumaSamples(); 2239 2239 } 2240 2240 #endif … … 2279 2279 else 2280 2280 { 2281 retVal = vps->getVpsRepFormat(sps->getUpdateRepFormatFlag() ? sps->getUpdateRepFormatIndex() : vps->getVpsRepFormatIdx( layerId))->getChromaFormatVpsIdc();2281 retVal = vps->getVpsRepFormat(sps->getUpdateRepFormatFlag() ? sps->getUpdateRepFormatIndex() : vps->getVpsRepFormatIdx(vps->getLayerIdInVps(layerId)))->getChromaFormatVpsIdc(); 2282 2282 } 2283 2283 #else … … 2288 2288 else 2289 2289 { 2290 retVal = vps->getVpsRepFormat( vps->getVpsRepFormatIdx( layerId) )->getChromaFormatVpsIdc();2290 retVal = vps->getVpsRepFormat( vps->getVpsRepFormatIdx(vps->getLayerIdInVps(layerId)) )->getChromaFormatVpsIdc(); 2291 2291 } 2292 2292 #endif … … 2321 2321 else 2322 2322 { 2323 retVal = vps->getVpsRepFormat(sps->getUpdateRepFormatFlag() ? sps->getUpdateRepFormatIndex() : vps->getVpsRepFormatIdx( layerId))->getBitDepthVpsLuma();2323 retVal = vps->getVpsRepFormat(sps->getUpdateRepFormatFlag() ? sps->getUpdateRepFormatIndex() : vps->getVpsRepFormatIdx(vps->getLayerIdInVps(layerId)))->getBitDepthVpsLuma(); 2324 2324 } 2325 2325 #else … … 2330 2330 else 2331 2331 { 2332 retVal = vps->getVpsRepFormat( vps->getVpsRepFormatIdx( layerId) )->getBitDepthVpsLuma();2332 retVal = vps->getVpsRepFormat( vps->getVpsRepFormatIdx(vps->getLayerIdInVps(layerId)) )->getBitDepthVpsLuma(); 2333 2333 } 2334 2334 #endif … … 2363 2363 else 2364 2364 { 2365 retVal = vps->getVpsRepFormat(sps->getUpdateRepFormatFlag() ? sps->getUpdateRepFormatIndex() : vps->getVpsRepFormatIdx( layerId))->getBitDepthVpsChroma();2365 retVal = vps->getVpsRepFormat(sps->getUpdateRepFormatFlag() ? sps->getUpdateRepFormatIndex() : vps->getVpsRepFormatIdx(vps->getLayerIdInVps(layerId)))->getBitDepthVpsChroma(); 2366 2366 } 2367 2367 #else … … 2372 2372 else 2373 2373 { 2374 retVal = vps->getVpsRepFormat( vps->getVpsRepFormatIdx( layerId) )->getBitDepthVpsChroma();2374 retVal = vps->getVpsRepFormat( vps->getVpsRepFormatIdx(vps->getLayerIdInVps(layerId)) )->getBitDepthVpsChroma(); 2375 2375 } 2376 2376 #endif … … 2416 2416 else 2417 2417 { 2418 return vps->getVpsRepFormat(sps->getUpdateRepFormatFlag() ? sps->getUpdateRepFormatIndex() : vps->getVpsRepFormatIdx( layerId))->getConformanceWindowVps();2418 return vps->getVpsRepFormat(sps->getUpdateRepFormatFlag() ? sps->getUpdateRepFormatIndex() : vps->getVpsRepFormatIdx(vps->getLayerIdInVps(layerId)))->getConformanceWindowVps(); 2419 2419 } 2420 2420 #else … … 2425 2425 else 2426 2426 { 2427 return vps->getVpsRepFormat( vps->getVpsRepFormatIdx( layerId) )->getConformanceWindowVps();2427 return vps->getVpsRepFormat( vps->getVpsRepFormatIdx(vps->getLayerIdInVps(vps->getLayerIdInVps(layerId))) )->getConformanceWindowVps(); 2428 2428 } 2429 2429 #endif -
branches/SHM-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp
r995 r999 1994 1994 { 1995 1995 #if VPS_FIX_TO_MATCH_SPEC 1996 1997 #else 1998 1996 for( i = vps->getBaseLayerInternalFlag() ? 1 : 0; i < vps->getMaxLayers(); i++ ) 1997 #else 1998 for (i = 1; i < vps->getMaxLayers(); i++) 1999 1999 #endif 2000 2000 { … … 3056 3056 TComVPS* vps = NULL; 3057 3057 vps = parameterSetManager->getPrefetchedVPS(sps->getVPSId()); 3058 UInt layerIdx = vps->getLayerIdInVps(rpcSlice->getLayerId()); 3058 3059 #if R0279_REP_FORMAT_INBL 3059 3060 if ( vps->getVpsExtensionFlag() == 1 && (rpcSlice->getLayerId() == 0 || sps->getV1CompatibleSPSFlag() == 1) ) 3060 3061 { 3061 assert( sps->getPicWidthInLumaSamples() <= vps->getVpsRepFormat( vps->getVpsRepFormatIdx(rpcSlice->getLayerId()) )->getPicWidthVpsInLumaSamples() );3062 assert( sps->getPicHeightInLumaSamples() <= vps->getVpsRepFormat( vps->getVpsRepFormatIdx( rpcSlice->getLayerId()) )->getPicHeightVpsInLumaSamples() );3063 assert( sps->getChromaFormatIdc() <= vps->getVpsRepFormat( vps->getVpsRepFormatIdx(rpcSlice->getLayerId()) )->getChromaFormatVpsIdc() );3064 assert( sps->getBitDepthY() <= vps->getVpsRepFormat( vps->getVpsRepFormatIdx(rpcSlice->getLayerId()) )->getBitDepthVpsLuma() );3065 assert( sps->getBitDepthC() <= vps->getVpsRepFormat( vps->getVpsRepFormatIdx(rpcSlice->getLayerId()) )->getBitDepthVpsChroma() );3062 assert( sps->getPicWidthInLumaSamples() <= vps->getVpsRepFormat( vps->getVpsRepFormatIdx(layerIdx) )->getPicWidthVpsInLumaSamples() ); 3063 assert( sps->getPicHeightInLumaSamples() <= vps->getVpsRepFormat( vps->getVpsRepFormatIdx(layerIdx) )->getPicHeightVpsInLumaSamples() ); 3064 assert( sps->getChromaFormatIdc() <= vps->getVpsRepFormat( vps->getVpsRepFormatIdx(layerIdx) )->getChromaFormatVpsIdc() ); 3065 assert( sps->getBitDepthY() <= vps->getVpsRepFormat( vps->getVpsRepFormatIdx(layerIdx) )->getBitDepthVpsLuma() ); 3066 assert( sps->getBitDepthC() <= vps->getVpsRepFormat( vps->getVpsRepFormatIdx(layerIdx) )->getBitDepthVpsChroma() ); 3066 3067 #else 3067 3068 if ( rpcSlice->getLayerId() == 0 && vps->getVpsExtensionFlag() == 1 ) 3068 3069 { 3069 assert( sps->getPicWidthInLumaSamples() <= vps->getVpsRepFormat( vps->getVpsRepFormatIdx(0) )->getPicWidthVpsInLumaSamples() );3070 assert( sps->getPicWidthInLumaSamples() <= vps->getVpsRepFormat( vps->getVpsRepFormatIdx(0) )->getPicWidthVpsInLumaSamples() ); 3070 3071 assert( sps->getPicHeightInLumaSamples() <= vps->getVpsRepFormat( vps->getVpsRepFormatIdx(0) )->getPicHeightVpsInLumaSamples() ); 3071 assert( sps->getChromaFormatIdc() <= vps->getVpsRepFormat( vps->getVpsRepFormatIdx(0) )->getChromaFormatVpsIdc() );3072 assert( sps->getBitDepthY() <= vps->getVpsRepFormat( vps->getVpsRepFormatIdx(0) )->getBitDepthVpsLuma() );3073 assert( sps->getBitDepthC() <= vps->getVpsRepFormat( vps->getVpsRepFormatIdx(0) )->getBitDepthVpsChroma() );3072 assert( sps->getChromaFormatIdc() <= vps->getVpsRepFormat( vps->getVpsRepFormatIdx(0) )->getChromaFormatVpsIdc() ); 3073 assert( sps->getBitDepthY() <= vps->getVpsRepFormat( vps->getVpsRepFormatIdx(0) )->getBitDepthVpsLuma() ); 3074 assert( sps->getBitDepthC() <= vps->getVpsRepFormat( vps->getVpsRepFormatIdx(0) )->getBitDepthVpsChroma() ); 3074 3075 #endif 3075 3076 } 3076 3077 else if ( vps->getVpsExtensionFlag() == 1 ) 3077 3078 { 3078 assert(vps->getVpsRepFormat(sps->getUpdateRepFormatFlag() ? sps->getUpdateRepFormatIndex() : vps->getVpsRepFormatIdx( rpcSlice->getLayerId()))->getPicWidthVpsInLumaSamples() <= vps->getVpsRepFormat(vps->getVpsRepFormatIdx(rpcSlice->getLayerId()))->getPicWidthVpsInLumaSamples());3079 assert(vps->getVpsRepFormat(sps->getUpdateRepFormatFlag() ? sps->getUpdateRepFormatIndex() : vps->getVpsRepFormatIdx( rpcSlice->getLayerId()))->getPicHeightVpsInLumaSamples() <= vps->getVpsRepFormat(vps->getVpsRepFormatIdx(rpcSlice->getLayerId()))->getPicHeightVpsInLumaSamples());3080 assert(vps->getVpsRepFormat(sps->getUpdateRepFormatFlag() ? sps->getUpdateRepFormatIndex() : vps->getVpsRepFormatIdx( rpcSlice->getLayerId()))->getChromaFormatVpsIdc() <= vps->getVpsRepFormat(vps->getVpsRepFormatIdx(rpcSlice->getLayerId()))->getChromaFormatVpsIdc());3081 assert(vps->getVpsRepFormat(sps->getUpdateRepFormatFlag() ? sps->getUpdateRepFormatIndex() : vps->getVpsRepFormatIdx( rpcSlice->getLayerId()))->getBitDepthVpsLuma() <= vps->getVpsRepFormat(vps->getVpsRepFormatIdx(rpcSlice->getLayerId()))->getBitDepthVpsLuma());3082 assert(vps->getVpsRepFormat(sps->getUpdateRepFormatFlag() ? sps->getUpdateRepFormatIndex() : vps->getVpsRepFormatIdx( rpcSlice->getLayerId()))->getBitDepthVpsChroma() <= vps->getVpsRepFormat(vps->getVpsRepFormatIdx(rpcSlice->getLayerId()))->getBitDepthVpsChroma());3079 assert(vps->getVpsRepFormat(sps->getUpdateRepFormatFlag() ? sps->getUpdateRepFormatIndex() : vps->getVpsRepFormatIdx(layerIdx))->getPicWidthVpsInLumaSamples() <= vps->getVpsRepFormat(vps->getVpsRepFormatIdx(layerIdx))->getPicWidthVpsInLumaSamples()); 3080 assert(vps->getVpsRepFormat(sps->getUpdateRepFormatFlag() ? sps->getUpdateRepFormatIndex() : vps->getVpsRepFormatIdx(layerIdx))->getPicHeightVpsInLumaSamples() <= vps->getVpsRepFormat(vps->getVpsRepFormatIdx(layerIdx))->getPicHeightVpsInLumaSamples()); 3081 assert(vps->getVpsRepFormat(sps->getUpdateRepFormatFlag() ? sps->getUpdateRepFormatIndex() : vps->getVpsRepFormatIdx(layerIdx))->getChromaFormatVpsIdc() <= vps->getVpsRepFormat(vps->getVpsRepFormatIdx(layerIdx))->getChromaFormatVpsIdc()); 3082 assert(vps->getVpsRepFormat(sps->getUpdateRepFormatFlag() ? sps->getUpdateRepFormatIndex() : vps->getVpsRepFormatIdx(layerIdx))->getBitDepthVpsLuma() <= vps->getVpsRepFormat(vps->getVpsRepFormatIdx(layerIdx))->getBitDepthVpsLuma()); 3083 assert(vps->getVpsRepFormat(sps->getUpdateRepFormatFlag() ? sps->getUpdateRepFormatIndex() : vps->getVpsRepFormatIdx(layerIdx))->getBitDepthVpsChroma() <= vps->getVpsRepFormat(vps->getVpsRepFormatIdx(layerIdx))->getBitDepthVpsChroma()); 3083 3084 } 3084 3085 #endif … … 3613 3614 else 3614 3615 { 3615 format = rpcSlice->getVPS()->getVpsRepFormat( sps->getUpdateRepFormatFlag() ? sps->getUpdateRepFormatIndex() : rpcSlice->getVPS()->getVpsRepFormatIdx( sps->getLayerId()) )->getChromaFormatVpsIdc();3616 format = rpcSlice->getVPS()->getVpsRepFormat( sps->getUpdateRepFormatFlag() ? sps->getUpdateRepFormatIndex() : rpcSlice->getVPS()->getVpsRepFormatIdx( rpcSlice->getVPS()->getLayerIdInVps(sps->getLayerId()) ) )->getChromaFormatVpsIdc(); 3616 3617 #if Q0195_REP_FORMAT_CLEANUP 3617 3618 assert( (sps->getUpdateRepFormatFlag()==false && rpcSlice->getVPS()->getVpsNumRepFormats()==1) || rpcSlice->getVPS()->getVpsNumRepFormats() > 1 ); //conformance check … … 3625 3626 else 3626 3627 { 3627 format = rpcSlice->getVPS()->getVpsRepFormat( rpcSlice->getVPS()->getVpsRepFormatIdx( sps->getLayerId()) )->getChromaFormatVpsIdc();3628 format = rpcSlice->getVPS()->getVpsRepFormat( rpcSlice->getVPS()->getVpsRepFormatIdx( rpcSlice->getVPS()->getLayerIdInVps(sps->getLayerId()) ) )->getChromaFormatVpsIdc(); 3628 3629 } 3629 3630 #endif -
branches/SHM-dev/source/Lib/TLibEncoder/TEncTop.cpp
r988 r999 1103 1103 1104 1104 #if REPN_FORMAT_IN_VPS 1105 m_cSPS.setBitDepthY( m_cVPS.getVpsRepFormat( m_cVPS.getVpsRepFormatIdx( m_layerId ) )->getBitDepthVpsLuma() ); 1106 m_cSPS.setBitDepthC( m_cVPS.getVpsRepFormat( m_cVPS.getVpsRepFormatIdx( m_layerId ) )->getBitDepthVpsChroma() ); 1107 1108 m_cSPS.setQpBDOffsetY ( 6*(m_cVPS.getVpsRepFormat( m_cVPS.getVpsRepFormatIdx( m_layerId ) )->getBitDepthVpsLuma() - 8) ); 1109 m_cSPS.setQpBDOffsetC ( 6*(m_cVPS.getVpsRepFormat( m_cVPS.getVpsRepFormatIdx( m_layerId ) )->getBitDepthVpsChroma() - 8) ); 1105 UInt layerIdx = m_cVPS.getLayerIdInVps( m_layerId ); 1106 1107 m_cSPS.setBitDepthY( m_cVPS.getVpsRepFormat( m_cVPS.getVpsRepFormatIdx( layerIdx ) )->getBitDepthVpsLuma() ); 1108 m_cSPS.setBitDepthC( m_cVPS.getVpsRepFormat( m_cVPS.getVpsRepFormatIdx( layerIdx ) )->getBitDepthVpsChroma() ); 1109 1110 m_cSPS.setQpBDOffsetY ( 6*(m_cVPS.getVpsRepFormat( m_cVPS.getVpsRepFormatIdx( layerIdx ) )->getBitDepthVpsLuma() - 8) ); 1111 m_cSPS.setQpBDOffsetC ( 6*(m_cVPS.getVpsRepFormat( m_cVPS.getVpsRepFormatIdx( layerIdx ) )->getBitDepthVpsChroma() - 8) ); 1110 1112 #else 1111 1113 m_cSPS.setBitDepthY( g_bitDepthY ); … … 1729 1731 { 1730 1732 #if O0096_REP_FORMAT_INDEX 1731 RepFormat *repFormat = m_cVPS.getVpsRepFormat( m_c VPS.getVpsRepFormatIdx( m_cSPS.getUpdateRepFormatFlag() ? m_cSPS.getUpdateRepFormatIndex() : m_layerId) );1732 #else 1733 RepFormat *repFormat = m_cVPS.getVpsRepFormat( m_cVPS.getVpsRepFormatIdx( m_ layerId) );1733 RepFormat *repFormat = m_cVPS.getVpsRepFormat( m_cSPS.getUpdateRepFormatFlag() ? m_cSPS.getUpdateRepFormatIndex() : m_cVPS.getVpsRepFormatIdx( m_cVPS.getLayerIdInVps(m_layerId) ) ); 1734 #else 1735 RepFormat *repFormat = m_cVPS.getVpsRepFormat( m_cVPS.getVpsRepFormatIdx( m_cVPS.getLayerIdInVps(m_layerId) ) ); 1734 1736 #endif 1735 1737 Int bitDepthY,bitDepthC,picWidth,picHeight;
Note: See TracChangeset for help on using the changeset viewer.