Changeset 1062 in 3DVCSoftware
- Timestamp:
- 7 Oct 2014, 20:41:24 (10 years ago)
- Location:
- branches/HTM-12.0-dev1/source/Lib
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HTM-12.0-dev1/source/Lib/TLibCommon/TComSlice.cpp
r1060 r1062 4439 4439 4440 4440 #if H_MV 4441 #if !H_MV_HLS10_PTL_INFER_FIX 4441 4442 Void TComPTL::copyLevelFrom( TComPTL* source ) 4442 4443 { … … 4448 4449 } 4449 4450 } 4451 #endif 4450 4452 #endif 4451 4453 //! \} -
branches/HTM-12.0-dev1/source/Lib/TLibCommon/TComSlice.h
r1060 r1062 208 208 209 209 #if H_MV_HLS10_PTL 210 #if H_MV 210 211 Bool m_max12bitConstraintFlag; 211 212 Bool m_max10bitConstraintFlag; … … 219 220 Bool m_inbldFlag; 220 221 #endif 222 #endif 221 223 public: 222 224 ProfileTierLevel(); … … 249 251 Void setFrameOnlyConstraintFlag(Bool b) { m_frameOnlyConstraintFlag = b; } 250 252 253 #if H_MV 251 254 #if H_MV_HLS10_PTL 252 255 Void setMax12bitConstraintFlag( Bool flag ) { m_max12bitConstraintFlag = flag; } … … 278 281 Void setInbldFlag( Bool flag ) { m_inbldFlag = flag; } 279 282 Bool getInbldFlag( ) { return m_inbldFlag; } 283 #endif 284 #if H_MV_HLS10_PTL_INFER_FIX 285 286 Bool getV2ConstraintsPresentFlag() 287 { 288 return ( 289 getProfileIdc( ) == 4 || getProfileCompatibilityFlag( 4 ) || getProfileIdc( ) == 5 || getProfileCompatibilityFlag( 5 ) || 290 getProfileIdc( ) == 6 || getProfileCompatibilityFlag( 6 ) || getProfileIdc( ) == 7 || getProfileCompatibilityFlag( 7 ) 291 ); 292 } 293 294 Bool getInbldPresentFlag() 295 { 296 return ( 297 ( getProfileIdc() >= 1 && getProfileIdc() <= 5 ) || getProfileCompatibilityFlag( 1 ) || getProfileCompatibilityFlag( 2 ) || 298 getProfileCompatibilityFlag( 3 ) || getProfileCompatibilityFlag( 4 ) || getProfileCompatibilityFlag( 5 ) 299 ); 300 } 301 302 Void copyV2ConstraintFlags( ProfileTierLevel* ptlRef ) 303 { 304 setMax12bitConstraintFlag ( ptlRef->getMax12bitConstraintFlag ( ) ); 305 setMax10bitConstraintFlag ( ptlRef->getMax10bitConstraintFlag ( ) ); 306 setMax8bitConstraintFlag ( ptlRef->getMax8bitConstraintFlag ( ) ); 307 setMax422chromaConstraintFlag ( ptlRef->getMax422chromaConstraintFlag ( ) ); 308 setMax420chromaConstraintFlag ( ptlRef->getMax420chromaConstraintFlag ( ) ); 309 setMaxMonochromeConstraintFlag ( ptlRef->getMaxMonochromeConstraintFlag ( ) ); 310 setIntraConstraintFlag ( ptlRef->getIntraConstraintFlag ( ) ); 311 setOnePictureOnlyConstraintFlag ( ptlRef->getOnePictureOnlyConstraintFlag ( ) ); 312 setLowerBitRateConstraintFlag ( ptlRef->getLowerBitRateConstraintFlag ( ) ); 313 } 314 315 Void copyProfile( ProfileTierLevel* ptlRef ) 316 { 317 setProfileSpace ( ptlRef->getProfileSpace ( ) ); 318 setTierFlag ( ptlRef->getTierFlag ( ) ); 319 setProfileIdc ( ptlRef->getProfileIdc ( ) ); 320 for (Int j = 0; j < 32; j++) 321 { 322 setProfileCompatibilityFlag(j, ptlRef->getProfileCompatibilityFlag ( j ) ); 323 } 324 setProgressiveSourceFlag ( ptlRef->getProgressiveSourceFlag ( ) ); 325 setInterlacedSourceFlag ( ptlRef->getInterlacedSourceFlag ( ) ); 326 setNonPackedConstraintFlag ( ptlRef->getNonPackedConstraintFlag ( ) ); 327 setFrameOnlyConstraintFlag ( ptlRef->getFrameOnlyConstraintFlag ( ) ); 328 copyV2ConstraintFlags ( ptlRef ); 329 } 330 #endif 280 331 #endif 281 332 … … 301 352 ProfileTierLevel* getSubLayerPTL(Int i) { return &m_subLayerPTL[i]; } 302 353 #if H_MV 354 #if H_MV_HLS10_PTL_INFER_FIX 355 Void inferGeneralValues( Bool profilePresentFlag, Int k, TComPTL* refPTL ) 356 { 357 ProfileTierLevel* refProfileTierLevel = NULL; 358 if ( k > 0 ) 359 { 360 assert( refPTL != NULL); 361 refProfileTierLevel = refPTL->getGeneralPTL(); 362 } 363 364 ProfileTierLevel* curProfileTierLevel = getGeneralPTL( ); 365 366 if( !profilePresentFlag ) 367 { 368 assert( k > 0 ); 369 assert( refProfileTierLevel != NULL ); 370 curProfileTierLevel->copyProfile( refProfileTierLevel); 371 } 372 else 373 { 374 if ( !curProfileTierLevel->getV2ConstraintsPresentFlag() ) 375 { 376 curProfileTierLevel->setMax12bitConstraintFlag ( false ); 377 curProfileTierLevel->setMax10bitConstraintFlag ( false ); 378 curProfileTierLevel->setMax8bitConstraintFlag ( false ); 379 curProfileTierLevel->setMax422chromaConstraintFlag ( false ); 380 curProfileTierLevel->setMax420chromaConstraintFlag ( false ); 381 curProfileTierLevel->setMaxMonochromeConstraintFlag ( false ); 382 curProfileTierLevel->setIntraConstraintFlag ( false ); 383 curProfileTierLevel->setOnePictureOnlyConstraintFlag ( false ); 384 curProfileTierLevel->setLowerBitRateConstraintFlag ( false ); 385 } 386 387 if ( !curProfileTierLevel->getInbldPresentFlag() ) 388 { 389 curProfileTierLevel->setInbldFlag( false ); 390 } 391 } 392 }; 393 394 Void inferSubLayerValues( Int maxNumSubLayersMinus1, Int k, TComPTL* refPTL ) 395 { 396 assert( k == 0 || refPTL != NULL ); 397 398 for (Int i = maxNumSubLayersMinus1; i >= 0; i--) 399 { 400 ProfileTierLevel* refProfileTierLevel; 401 if ( k != 0 ) 402 { 403 refProfileTierLevel = refPTL->getSubLayerPTL( i ); 404 } 405 else 406 { 407 if ( i == maxNumSubLayersMinus1) 408 { 409 refProfileTierLevel = getGeneralPTL(); 410 } 411 else 412 { 413 refProfileTierLevel = getSubLayerPTL( i + 1 ); 414 } 415 } 416 417 ProfileTierLevel* curProfileTierLevel = getSubLayerPTL( i ); 418 if( !getSubLayerLevelPresentFlag( i ) ) 419 { 420 curProfileTierLevel->setLevelIdc( refProfileTierLevel->getLevelIdc() ); 421 } 422 423 if( !getSubLayerProfilePresentFlag( i ) ) 424 { 425 curProfileTierLevel->copyProfile( refProfileTierLevel); 426 } 427 else 428 { 429 if ( !curProfileTierLevel->getV2ConstraintsPresentFlag() ) 430 { 431 curProfileTierLevel->copyV2ConstraintFlags( refProfileTierLevel ); 432 } 433 434 if ( !curProfileTierLevel->getInbldPresentFlag() ) 435 { 436 curProfileTierLevel->setInbldFlag( refProfileTierLevel->getInbldFlag() ); 437 } 438 } 439 } 440 }; 441 #else 303 442 Void copyLevelFrom( TComPTL* source ); 443 #endif 304 444 #endif 305 445 }; -
branches/HTM-12.0-dev1/source/Lib/TLibCommon/TypeDef.h
r1060 r1062 414 414 #define H_MV_HLS10_MAXNUMPICS 1 // constraint on number of pictures in rps 415 415 #define H_MV_HLS10_PTL 1 // profile tier level 416 #define H_MV_HLS10_PTL_FIX 1 // profile tier level 416 #define H_MV_HLS10_PTL_FIX 1 // profile tier level fix 417 #define H_MV_HLS10_PTL_INFER_FIX 1 // fix inference ptl 417 418 #define H_MV_HLS10_MULTILAYERSPS 1 // multilayer SPS extension 418 419 #define H_MV_HLS10_VPS_VUI 1 // vsp vui -
branches/HTM-12.0-dev1/source/Lib/TLibDecoder/TDecCAVLC.cpp
r1060 r1062 803 803 804 804 parsePTL(pcSPS->getPTL(), 1, pcSPS->getMaxTLayers() - 1); 805 #if H_MV_HLS10_PTL_INFER_FIX 806 pcSPS->getPTL()->inferGeneralValues ( true, 0, NULL ); 807 pcSPS->getPTL()->inferSubLayerValues( pcSPS->getMaxTLayers() - 1, 0, NULL ); 808 #endif 805 809 #if H_MV 806 810 } … … 1146 1150 READ_CODE( 16, uiCode, "vps_reserved_ffff_16bits" ); assert(uiCode == 0xffff); 1147 1151 parsePTL ( pcVPS->getPTL(), true, pcVPS->getMaxTLayers()-1); 1152 #if H_MV_HLS10_PTL_INFER_FIX 1153 #if H_MV 1154 pcVPS->getPTL()->inferGeneralValues ( true, 0, NULL ); 1155 pcVPS->getPTL()->inferSubLayerValues( pcVPS->getMaxTLayers() - 1, 0, NULL ); 1156 #endif 1157 #endif 1148 1158 UInt subLayerOrderingInfoPresentFlag; 1149 1159 READ_FLAG(subLayerOrderingInfoPresentFlag, "vps_sub_layer_ordering_info_present_flag"); … … 1269 1279 parsePTL( pcVPS->getPTL( 1 ),0, pcVPS->getMaxSubLayersMinus1() ); 1270 1280 1281 #if !H_MV_HLS10_PTL_INFER_FIX 1271 1282 // Copy Profile info 1272 1283 TComPTL temp = *pcVPS->getPTL( 1 ); 1273 1284 *pcVPS->getPTL( 1 ) = *pcVPS->getPTL( 0 ); 1274 1285 pcVPS->getPTL( 1 )->copyLevelFrom( &temp ); 1286 #else 1287 pcVPS->getPTL( 1 )->inferGeneralValues ( false, 1, pcVPS->getPTL( 0 ) ); 1288 pcVPS->getPTL( 1 )->inferSubLayerValues( pcVPS->getMaxSubLayersMinus1(), 1, pcVPS->getPTL( 0 ) ); 1289 #endif 1275 1290 } 1276 1291 #endif … … 1404 1419 READ_FLAG( uiCode, "vps_profile_present_flag[i]" ); pcVPS->setVpsProfilePresentFlag( i, uiCode == 1 ); 1405 1420 parsePTL ( pcVPS->getPTL( offsetVal ), pcVPS->getVpsProfilePresentFlag( i ), pcVPS->getMaxTLayers()-1); 1421 #if H_MV_HLS10_PTL_INFER_FIX 1422 pcVPS->getPTL( offsetVal )->inferGeneralValues ( pcVPS->getVpsProfilePresentFlag( i ), offsetVal, pcVPS->getPTL( offsetVal - 1 ) ); 1423 pcVPS->getPTL( offsetVal )->inferSubLayerValues( pcVPS->getMaxSubLayersMinus1() , offsetVal, pcVPS->getPTL( offsetVal - 1 ) ); 1424 #else 1406 1425 if( !pcVPS->getVpsProfilePresentFlag( i ) ) 1407 1426 { … … 1410 1429 pcVPS->getPTL( offsetVal )->copyLevelFrom( &temp ); 1411 1430 } 1431 #endif 1412 1432 offsetVal++; 1413 1433 } … … 3166 3186 READ_FLAG( uiCode, "sub_layer_profile_present_flag[i]" ); rpcPTL->setSubLayerProfilePresentFlag(i, uiCode); 3167 3187 #if H_MV 3168 rpcPTL->setSubLayerProfilePresentFlag( i, profilePresentFlag && rpcPTL->getSubLayerProfilePresentFlag(i) ); 3188 #if !H_MV_HLS10_PTL_INFER_FIX 3189 rpcPTL->setSubLayerProfilePresentFlag( i, profilePresentFlag && rpcPTL->getSubLayerProfilePresentFlag(i) ); 3190 #else 3191 // When profilePresentFlag is equal to 0, sub_layer_profile_present_flag[ i ] shall be equal to 0. 3192 assert( profilePresentFlag || !rpcPTL->getSubLayerProfilePresentFlag(i) ); 3193 #endif 3169 3194 #else 3170 3195 } … … 3184 3209 for(Int i = 0; i < maxNumSubLayersMinus1; i++) 3185 3210 { 3186 if( profilePresentFlag && rpcPTL->getSubLayerProfilePresentFlag(i) ) 3211 #if H_MV_HLS10_PTL_INFER_FIX 3212 #if H_MV 3213 if( rpcPTL->getSubLayerProfilePresentFlag(i) ) 3214 #else 3215 if( profilePresentFlag && rpcPTL->getSubLayerProfilePresentFlag(i) ) 3216 #endif 3217 #else 3218 if( profilePresentFlag && rpcPTL->getSubLayerProfilePresentFlag(i) ) 3219 #endif 3187 3220 { 3188 3221 parseProfileTier(rpcPTL->getSubLayerPTL(i)); … … 3218 3251 3219 3252 #if H_MV_HLS10_PTL 3253 #if H_MV_HLS10_PTL_INFER_FIX 3254 if( ptl->getV2ConstraintsPresentFlag() ) 3255 #else 3220 3256 if( ptl->getProfileIdc( ) == 4 || ptl->getProfileCompatibilityFlag( 4 ) || 3221 3257 ptl->getProfileIdc( ) == 5 || ptl->getProfileCompatibilityFlag( 5 ) || 3222 3258 ptl->getProfileIdc( ) == 6 || ptl->getProfileCompatibilityFlag( 6 ) || 3223 3259 ptl->getProfileIdc( ) == 7 || ptl->getProfileCompatibilityFlag( 7 ) ) 3224 { 3225 READ_FLAG( uiCode, "max_12bit_constraint_flag" ); ptl->setMax12bitConstraintFlag( uiCode == 1 ); 3226 READ_FLAG( uiCode, "max_10bit_constraint_flag" ); ptl->setMax10bitConstraintFlag( uiCode == 1 ); 3227 READ_FLAG( uiCode, "max_8bit_constraint_flag" ); ptl->setMax8bitConstraintFlag( uiCode == 1 ); 3228 READ_FLAG( uiCode, "max_422chroma_constraint_flag" ); ptl->setMax422chromaConstraintFlag( uiCode == 1 ); 3229 READ_FLAG( uiCode, "max_420chroma_constraint_flag" ); ptl->setMax420chromaConstraintFlag( uiCode == 1 ); 3230 READ_FLAG( uiCode, "max_monochrome_constraint_flag" ); ptl->setMaxMonochromeConstraintFlag( uiCode == 1 ); 3231 READ_FLAG( uiCode, "intra_constraint_flag" ); ptl->setIntraConstraintFlag( uiCode == 1 ); 3260 #endif 3261 { 3262 READ_FLAG( uiCode, "max_12bit_constraint_flag" ); ptl->setMax12bitConstraintFlag ( uiCode == 1 ); 3263 READ_FLAG( uiCode, "max_10bit_constraint_flag" ); ptl->setMax10bitConstraintFlag ( uiCode == 1 ); 3264 READ_FLAG( uiCode, "max_8bit_constraint_flag" ); ptl->setMax8bitConstraintFlag ( uiCode == 1 ); 3265 READ_FLAG( uiCode, "max_422chroma_constraint_flag" ); ptl->setMax422chromaConstraintFlag ( uiCode == 1 ); 3266 READ_FLAG( uiCode, "max_420chroma_constraint_flag" ); ptl->setMax420chromaConstraintFlag ( uiCode == 1 ); 3267 READ_FLAG( uiCode, "max_monochrome_constraint_flag" ); ptl->setMaxMonochromeConstraintFlag ( uiCode == 1 ); 3268 READ_FLAG( uiCode, "intra_constraint_flag" ); ptl->setIntraConstraintFlag ( uiCode == 1 ); 3232 3269 READ_FLAG( uiCode, "one_picture_only_constraint_flag" ); ptl->setOnePictureOnlyConstraintFlag( uiCode == 1 ); 3233 READ_FLAG( uiCode, "lower_bit_rate_constraint_flag" ); ptl->setLowerBitRateConstraintFlag( uiCode == 1 );3270 READ_FLAG( uiCode, "lower_bit_rate_constraint_flag" ); ptl->setLowerBitRateConstraintFlag ( uiCode == 1 ); 3234 3271 READ_CODE(16, uiCode, "XXX_reserved_zero_34bits[0..15]"); 3235 3272 READ_CODE(16, uiCode, "XXX_reserved_zero_34bits[16..31]"); … … 3242 3279 READ_CODE(11, uiCode, "XXX_reserved_zero_43bits[32..42]"); 3243 3280 } 3281 #if H_MV_HLS10_PTL_INFER_FIX 3282 if( ptl->getInbldPresentFlag() ) 3283 #else 3244 3284 if( ( ptl->getProfileIdc() >= 1 && ptl->getProfileIdc() <= 5 ) || 3245 3285 ptl->getProfileCompatibilityFlag( 1 ) || ptl->getProfileCompatibilityFlag( 2 ) || 3246 3286 ptl->getProfileCompatibilityFlag( 3 ) || ptl->getProfileCompatibilityFlag( 4 ) || 3247 3287 ptl->getProfileCompatibilityFlag( 5 ) ) 3288 #endif 3248 3289 { 3249 3290 READ_FLAG( uiCode, "inbld_flag" ); ptl->setInbldFlag( uiCode == 1 ); -
branches/HTM-12.0-dev1/source/Lib/TLibEncoder/TEncCavlc.cpp
r1060 r1062 2559 2559 2560 2560 #if H_MV_HLS10_PTL 2561 #if H_MV_HLS10_PTL_INFER_FIX 2562 if( ptl->getV2ConstraintsPresentFlag() ) 2563 #else 2561 2564 if( ptl->getProfileIdc( ) == 4 || ptl->getProfileCompatibilityFlag( 4 ) || 2562 2565 ptl->getProfileIdc( ) == 5 || ptl->getProfileCompatibilityFlag( 5 ) || 2563 2566 ptl->getProfileIdc( ) == 6 || ptl->getProfileCompatibilityFlag( 6 ) || 2564 2567 ptl->getProfileIdc( ) == 7 || ptl->getProfileCompatibilityFlag( 7 ) ) 2568 #endif 2565 2569 { 2566 2570 WRITE_FLAG( ptl->getMax12bitConstraintFlag( ) ? 1 : 0 , "max_12bit_constraint_flag" ); … … 2583 2587 WRITE_CODE( 0, 11, "XXX_reserved_zero_43bits[32..42]"); 2584 2588 } 2589 #if H_MV_HLS10_PTL_INFER_FIX 2590 if( ptl->getInbldPresentFlag() ) 2591 #else 2585 2592 if( ( ptl->getProfileIdc() >= 1 && ptl->getProfileIdc() <= 5 ) || 2586 2593 ptl->getProfileCompatibilityFlag( 1 ) || ptl->getProfileCompatibilityFlag( 2 ) || 2587 2594 ptl->getProfileCompatibilityFlag( 3 ) || ptl->getProfileCompatibilityFlag( 4 ) || 2588 2595 ptl->getProfileCompatibilityFlag( 5 ) ) 2596 #endif 2589 2597 { 2590 2598 WRITE_FLAG( ptl->getInbldFlag( ) ? 1 : 0 , "inbld_flag" );
Note: See TracChangeset for help on using the changeset viewer.