Changeset 898 in SHVCSoftware
- Timestamp:
- 6 Oct 2014, 12:50:55 (10 years ago)
- Location:
- branches/SHM-dev/source/Lib
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/SHM-dev/source/Lib/TLibCommon/TComSlice.h
r894 r898 1663 1663 Bool m_extensionFlag; 1664 1664 UInt m_numScaledRefLayerOffsets; 1665 #if R0042_PROFILE_INDICATION 1666 Int m_NumDirectRefLayers; 1667 #endif 1665 1668 #if P0312_VERT_PHASE_ADJ 1666 1669 Bool m_vertPhasePositionEnableFlag[MAX_LAYERS]; … … 1830 1833 Int getExtensionFlag() { return m_extensionFlag; } 1831 1834 Void setExtensionFlag(Int n) { m_extensionFlag = n; } 1835 #if R0042_PROFILE_INDICATION 1836 Int getNumDirectRefLayers() { return m_NumDirectRefLayers; } 1837 Void setNumDirectRefLayers(Int n) { m_NumDirectRefLayers = n; } 1838 #endif 1832 1839 #if !MOVE_SCALED_OFFSET_TO_PPS 1833 1840 UInt getNumScaledRefLayerOffsets() { return m_numScaledRefLayerOffsets; } -
branches/SHM-dev/source/Lib/TLibCommon/TypeDef.h
r894 r898 75 75 #define R0227_REP_FORMAT_CONSTRAINT 1 ///< JCTVC-R0227, Conformance checking such that representation format of a particular layer shall not be greater than the one defined in VPS for that layer 76 76 #define R0227_BR_PR_ADD_LAYER_SET 1 ///< JCTVC-R0227, Signalling of bit-rate and picture rate for additional layer set 77 #define R0042_PROFILE_INDICATION 1 ///< JCTVC-R0042, Profile indication for additional layer sets 77 78 78 79 #define Q0108_TSA_STSA 1 ///< JCTVC-Q0108, Remove cross-layer alignment constraints of TSA and STSA pictures, enable to have different prediction structures in different layers -
branches/SHM-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp
r895 r898 295 295 } 296 296 } 297 297 #if !R0042_PROFILE_INDICATION 298 298 #if SCALINGLIST_INFERRING 299 299 if( pcPPS->getLayerId() > 0 ) … … 315 315 { 316 316 #endif 317 #endif 317 318 318 319 READ_FLAG( uiCode, "pps_scaling_list_data_present_flag" ); pcPPS->setScalingListPresentFlag( uiCode ? true : false ); … … 322 323 parseScalingList( pcPPS->getScalingList() ); 323 324 } 324 325 #if !R0042_PROFILE_INDICATION 325 326 #if SCALINGLIST_INFERRING 326 327 } 328 #endif 327 329 #endif 328 330 … … 336 338 pcPPS->setSliceHeaderExtensionPresentFlag(uiCode); 337 339 340 #if !R0042_PROFILE_INDICATION 338 341 READ_FLAG( uiCode, "pps_extension_flag"); 342 #else 343 READ_FLAG( uiCode, "pps_extension_present_flag"); 344 #endif 345 346 #if !R0042_PROFILE_INDICATION 339 347 #if POC_RESET_INFO_INFERENCE 340 348 pcPPS->setExtensionFlag( uiCode ? true : false ); … … 451 459 } 452 460 #endif 461 #else 462 pcPPS->setExtensionFlag( uiCode ? true : false ); 463 if( pcPPS->getExtensionFlag() ) 464 { 465 READ_FLAG( uiCode, "pps_range_extension_flag" ); 466 assert(uiCode == 0); 467 READ_FLAG( uiCode, "pps_multilayer_extension_flag" ); 468 assert(uiCode == 1); 469 READ_CODE(6, uiCode, "pps_extension_6bits"); 470 assert(uiCode == 0); 471 472 READ_FLAG( uiCode, "poc_reset_info_present_flag" ); 473 pcPPS->setPocResetInfoPresentFlag(uiCode ? true : false); 474 475 #if SCALINGLIST_INFERRING 476 READ_FLAG( uiCode, "pps_infer_scaling_list_flag" ); 477 pcPPS->setInferScalingListFlag( uiCode ); 478 479 if( pcPPS->getInferScalingListFlag() ) 480 { 481 READ_UVLC( uiCode, "pps_scaling_list_ref_layer_id" ); 482 pcPPS->setScalingListRefLayerId( uiCode ); 483 // The value of pps_scaling_list_ref_layer_id shall be in the range of 0 to 62, inclusive 484 assert( pcPPS->getScalingListRefLayerId() <= 62 ); 485 pcPPS->setScalingListPresentFlag( false ); 486 } 487 #endif 488 489 #if REF_REGION_OFFSET 490 READ_UVLC( uiCode, "num_ref_loc_offsets" ); pcPPS->setNumScaledRefLayerOffsets(uiCode); 491 for(Int i = 0; i < pcPPS->getNumScaledRefLayerOffsets(); i++) 492 { 493 READ_CODE( 6, uiCode, "ref_loc_offset_layer_id" ); pcPPS->setScaledRefLayerId( i, uiCode ); 494 READ_FLAG( uiCode, "scaled_ref_layer_offset_present_flag" ); pcPPS->setScaledRefLayerOffsetPresentFlag( i, uiCode ); 495 if (uiCode) 496 { 497 Window& scaledWindow = pcPPS->getScaledRefLayerWindow(i); 498 READ_SVLC( iCode, "scaled_ref_layer_left_offset" ); scaledWindow.setWindowLeftOffset (iCode << 1); 499 READ_SVLC( iCode, "scaled_ref_layer_top_offset" ); scaledWindow.setWindowTopOffset (iCode << 1); 500 READ_SVLC( iCode, "scaled_ref_layer_right_offset" ); scaledWindow.setWindowRightOffset (iCode << 1); 501 READ_SVLC( iCode, "scaled_ref_layer_bottom_offset" ); scaledWindow.setWindowBottomOffset(iCode << 1); 502 #if P0312_VERT_PHASE_ADJ 503 READ_FLAG( uiCode, "vert_phase_position_enable_flag" ); scaledWindow.setVertPhasePositionEnableFlag(uiCode); pcPPS->setVertPhasePositionEnableFlag( pcPPS->getScaledRefLayerId(i), uiCode); 504 #endif 505 } 506 READ_FLAG( uiCode, "ref_region_offset_present_flag" ); pcPPS->setRefRegionOffsetPresentFlag( i, uiCode ); 507 if (uiCode) 508 { 509 Window& refWindow = pcPPS->getRefLayerWindow(i); 510 READ_SVLC( iCode, "ref_region_left_offset" ); refWindow.setWindowLeftOffset (iCode << 1); 511 READ_SVLC( iCode, "ref_region_top_offset" ); refWindow.setWindowTopOffset (iCode << 1); 512 READ_SVLC( iCode, "ref_region_right_offset" ); refWindow.setWindowRightOffset (iCode << 1); 513 READ_SVLC( iCode, "ref_region_bottom_offset" ); refWindow.setWindowBottomOffset(iCode << 1); 514 } 515 #if R0209_GENERIC_PHASE 516 READ_FLAG( uiCode, "resample_phase_set_present_flag" ); pcPPS->setResamplePhaseSetPresentFlag( i, uiCode ); 517 if (uiCode) 518 { 519 READ_UVLC( uiCode, "phase_hor_luma" ); pcPPS->setPhaseHorLuma ( i, uiCode ); 520 READ_UVLC( uiCode, "phase_ver_luma" ); pcPPS->setPhaseVerLuma ( i, uiCode ); 521 READ_UVLC( uiCode, "phase_hor_chroma_plus8" ); pcPPS->setPhaseHorChroma (i, uiCode - 8); 522 READ_UVLC( uiCode, "phase_ver_chroma_plus8" ); pcPPS->setPhaseVerChroma (i, uiCode - 8); 523 } 524 #endif 525 } 526 #else 527 #if MOVE_SCALED_OFFSET_TO_PPS 528 READ_UVLC( uiCode, "num_scaled_ref_layer_offsets" ); pcPPS->setNumScaledRefLayerOffsets(uiCode); 529 for(Int i = 0; i < pcPPS->getNumScaledRefLayerOffsets(); i++) 530 { 531 Window& scaledWindow = pcPPS->getScaledRefLayerWindow(i); 532 #if O0098_SCALED_REF_LAYER_ID 533 READ_CODE( 6, uiCode, "scaled_ref_layer_id" ); pcPPS->setScaledRefLayerId( i, uiCode ); 534 #endif 535 READ_SVLC( iCode, "scaled_ref_layer_left_offset" ); scaledWindow.setWindowLeftOffset (iCode << 1); 536 READ_SVLC( iCode, "scaled_ref_layer_top_offset" ); scaledWindow.setWindowTopOffset (iCode << 1); 537 READ_SVLC( iCode, "scaled_ref_layer_right_offset" ); scaledWindow.setWindowRightOffset (iCode << 1); 538 READ_SVLC( iCode, "scaled_ref_layer_bottom_offset" ); scaledWindow.setWindowBottomOffset(iCode << 1); 539 #if P0312_VERT_PHASE_ADJ 540 READ_FLAG( uiCode, "vert_phase_position_enable_flag" ); scaledWindow.setVertPhasePositionEnableFlag(uiCode); pcPPS->setVertPhasePositionEnableFlag( pcPPS->getScaledRefLayerId(i), uiCode); 541 #endif 542 } 543 #endif 544 #endif 545 #if Q0048_CGS_3D_ASYMLUT 546 READ_FLAG( uiCode , "colour_mapping_enabled_flag" ); 547 pcPPS->setCGSFlag( uiCode ); 548 if( pcPPS->getCGSFlag() ) 549 { 550 xParse3DAsymLUT( pc3DAsymLUT ); 551 pcPPS->setCGSOutputBitDepthY( pc3DAsymLUT->getOutputBitDepthY() ); 552 pcPPS->setCGSOutputBitDepthC( pc3DAsymLUT->getOutputBitDepthC() ); 553 } 554 #endif 555 } 556 #endif 557 453 558 } 454 559 … … 643 748 #endif 644 749 750 #if R0042_PROFILE_INDICATION 751 UInt uiTmp; 752 bool bMultiLayerExtSpsFlag; 753 #endif 645 754 UInt uiCode; 646 755 READ_CODE( 4, uiCode, "sps_video_parameter_set_id"); pcSPS->setVPSId ( uiCode ); … … 651 760 READ_CODE( 3, uiCode, "sps_max_sub_layers_minus1" ); pcSPS->setMaxTLayers ( uiCode+1 ); 652 761 assert(uiCode <= 6); 653 762 #if SVC_EXTENSION 763 } 764 #if R0042_PROFILE_INDICATION 765 else 766 { 767 READ_CODE( 3, uiCode, "sps_ext_or_max_sub_layers_minus1" ); uiTmp = uiCode; 768 } 769 #endif 770 #if !SPS_DPB_PARAMS 771 if(pcSPS->getLayerId() != 0) 772 { 773 pcSPS->setMaxTLayers ( parameterSetManager->getPrefetchedVPS(pcSPS->getVPSId())->getMaxTLayers() ); 774 } 775 #endif 776 #endif 777 778 #if SVC_EXTENSION 779 #if R0042_PROFILE_INDICATION 780 bMultiLayerExtSpsFlag = ( pcSPS->getLayerId() != 0 && uiTmp == 7 ); 781 #endif 782 #endif 783 784 #if SVC_EXTENSION 785 #if !R0042_PROFILE_INDICATION 786 if(pcSPS->getLayerId() == 0) 787 #else 788 if(!bMultiLayerExtSpsFlag) 789 #endif 790 { 791 #endif 654 792 READ_FLAG( uiCode, "sps_temporal_id_nesting_flag" ); pcSPS->setTemporalIdNestingFlag ( uiCode > 0 ? true : false ); 655 793 #if SVC_EXTENSION … … 658 796 else 659 797 { 660 pcSPS->setMaxTLayers ( parameterSetManager->getPrefetchedVPS(pcSPS->getVPSId())->getMaxTLayers() );661 798 pcSPS->setTemporalIdNestingFlag( parameterSetManager->getPrefetchedVPS(pcSPS->getVPSId())->getTemporalNestingFlag() ); 662 799 } … … 679 816 680 817 #ifdef SPS_PTL_FIX 818 #if !R0042_PROFILE_INDICATION 681 819 if ( pcSPS->getLayerId() == 0) 820 #else 821 if(!bMultiLayerExtSpsFlag) 822 #endif 682 823 { 683 824 parsePTL(pcSPS->getPTL(), 1, pcSPS->getMaxTLayers() - 1); … … 691 832 692 833 #if REPN_FORMAT_IN_VPS 834 #if !R0042_PROFILE_INDICATION 693 835 if( pcSPS->getLayerId() > 0 ) 836 #else 837 if( bMultiLayerExtSpsFlag) 838 #endif 694 839 { 695 840 READ_FLAG( uiCode, "update_rep_format_flag" ); 696 841 pcSPS->setUpdateRepFormatFlag( uiCode ? true : false ); 842 #if R0042_PROFILE_INDICATION 843 if( bMultiLayerExtSpsFlag && uiCode) 844 { 845 READ_CODE(8, uiCode, "sps_rep_format_idx"); 846 pcSPS->setUpdateRepFormatIndex(uiCode); 847 } 848 #endif 697 849 } 698 850 else … … 704 856 #endif 705 857 } 858 859 #if R0042_PROFILE_INDICATION 860 if( !bMultiLayerExtSpsFlag ) 861 { 862 #else 706 863 #if O0096_REP_FORMAT_INDEX 707 864 if( pcSPS->getLayerId() == 0 ) 708 865 #else 709 866 if( pcSPS->getLayerId() == 0 || pcSPS->getUpdateRepFormatFlag() ) 867 #endif 710 868 #endif 711 869 { … … 729 887 } 730 888 #if O0096_REP_FORMAT_INDEX 889 #if !R0042_PROFILE_INDICATION 731 890 else if ( pcSPS->getUpdateRepFormatFlag() ) 732 891 { … … 736 895 #endif 737 896 #endif 897 #endif 738 898 739 899 #if R0156_CONF_WINDOW_IN_REP_FORMAT 740 900 #if REPN_FORMAT_IN_VPS 901 #if !R0042_PROFILE_INDICATION 741 902 #if O0096_REP_FORMAT_INDEX 742 903 if( pcSPS->getLayerId() == 0 ) 743 904 #else 744 905 if( pcSPS->getLayerId() == 0 || pcSPS->getUpdateRepFormatFlag() ) 906 #endif 745 907 #endif 746 908 { … … 770 932 771 933 #if REPN_FORMAT_IN_VPS 934 #if !R0042_PROFILE_INDICATION 772 935 #if O0096_REP_FORMAT_INDEX 773 936 if( pcSPS->getLayerId() == 0 ) 774 937 #else 775 938 if( pcSPS->getLayerId() == 0 || pcSPS->getUpdateRepFormatFlag() ) 939 #endif 776 940 #endif 777 941 { … … 789 953 } 790 954 #endif 955 #if R0042_PROFILE_INDICATION 956 } 957 #endif 958 791 959 READ_UVLC( uiCode, "log2_max_pic_order_cnt_lsb_minus4" ); pcSPS->setBitsForPOC( 4 + uiCode ); 792 960 assert(uiCode <= 12); 793 961 794 962 #if SPS_DPB_PARAMS 963 #if !R0042_PROFILE_INDICATION 795 964 if( pcSPS->getLayerId() == 0 ) 796 965 { 966 #else 967 if( !bMultiLayerExtSpsFlag ) 968 { 969 #endif 797 970 #endif 798 971 UInt subLayerOrderingInfoPresentFlag; … … 851 1024 { 852 1025 #if SCALINGLIST_INFERRING 1026 #if !R0042_PROFILE_INDICATION 853 1027 if( pcSPS->getLayerId() > 0 ) 1028 #else 1029 if( bMultiLayerExtSpsFlag ) 1030 #endif 854 1031 { 855 1032 READ_FLAG( uiCode, "sps_infer_scaling_list_flag" ); pcSPS->setInferScalingListFlag( uiCode ); … … 932 1109 if( pcSPS->getExtensionFlag() ) 933 1110 { 1111 #if !R0042_PROFILE_INDICATION 934 1112 #if O0142_CONDITIONAL_SPS_EXTENSION 935 1113 UInt spsExtensionTypeFlag[8]; … … 955 1133 } 956 1134 } 957 } 1135 } 1136 #else 1137 READ_FLAG( uiCode, "sps_range_extension_flag" ); 1138 assert(uiCode == 0); 1139 READ_FLAG( uiCode, "sps_multilayer_extension_flag" ); 1140 assert(uiCode == 1); 1141 READ_CODE(6, uiCode, "sps_extension_6bits"); 1142 assert(uiCode == 0); 1143 parseSPSExtension( pcSPS ); 1144 } 1145 #endif 958 1146 #else 959 1147 if (uiCode) -
branches/SHM-dev/source/Lib/TLibEncoder/TEncCavlc.cpp
r894 r898 225 225 } 226 226 227 #if !R0042_PROFILE_INDICATION 227 228 #if SCALINGLIST_INFERRING 228 229 if( pcPPS->getLayerId() > 0 ) … … 241 242 { 242 243 #endif 244 #endif 243 245 244 246 WRITE_FLAG( pcPPS->getScalingListPresentFlag() ? 1 : 0, "pps_scaling_list_data_present_flag" ); … … 247 249 codeScalingList( m_pcSlice->getScalingList() ); 248 250 } 249 251 #if !R0042_PROFILE_INDICATION 250 252 #if SCALINGLIST_INFERRING 251 253 } 254 #endif 252 255 #endif 253 256 … … 256 259 WRITE_FLAG( pcPPS->getSliceHeaderExtensionPresentFlag() ? 1 : 0, "slice_segment_header_extension_present_flag"); 257 260 #if P0166_MODIFIED_PPS_EXTENSION 261 #if !R0042_PROFILE_INDICATION 258 262 WRITE_FLAG( pcPPS->getExtensionFlag() ? 1 : 0, "pps_extension_flag" ); 263 #else 264 WRITE_FLAG( pcPPS->getExtensionFlag() ? 1 : 0, "pps_extension_present_flag" ); 265 #endif 259 266 260 267 if( pcPPS->getExtensionFlag() ) 261 268 { 269 #if !R0042_PROFILE_INDICATION 262 270 #if !POC_RESET_IDC 263 271 UInt ppsExtensionTypeFlag[8] = { 0, 1, 0, 0, 0, 0, 0, 0 }; … … 335 343 #endif 336 344 } 345 #else 346 WRITE_FLAG( 0, "pps_range_extension_flag" ); 347 WRITE_FLAG( 1, "pps_multilayer_extension_flag" ); 348 WRITE_CODE( 0, 6, "pps_extension_6bits" ); 349 350 WRITE_FLAG( pcPPS->getPocResetInfoPresentFlag() ? 1 : 0, "poc_reset_info_present_flag" ); 351 #if SCALINGLIST_INFERRING 352 WRITE_FLAG( pcPPS->getInferScalingListFlag() ? 1 : 0, "pps_infer_scaling_list_flag" ); 353 if( pcPPS->getInferScalingListFlag() ) 354 { 355 // The value of pps_scaling_list_ref_layer_id shall be in the range of 0 to 62, inclusive 356 assert( pcPPS->getScalingListRefLayerId() <= 62 ); 357 WRITE_UVLC( pcPPS->getScalingListRefLayerId(), "pps_scaling_list_ref_layer_id" ); 358 } 359 #endif 360 361 #if REF_REGION_OFFSET 362 WRITE_UVLC( pcPPS->getNumScaledRefLayerOffsets(), "num_ref_loc_offsets" ); 363 for(Int i = 0; i < pcPPS->getNumScaledRefLayerOffsets(); i++) 364 { 365 WRITE_CODE( pcPPS->getScaledRefLayerId(i), 6, "ref_loc_offset_layer_id" ); 366 WRITE_FLAG( pcPPS->getScaledRefLayerOffsetPresentFlag(i) ? 1 : 0, "scaled_ref_layer_offset_prsent_flag" ); 367 if (pcPPS->getScaledRefLayerOffsetPresentFlag(i)) 368 { 369 Window scaledWindow = pcPPS->getScaledRefLayerWindow(i); 370 WRITE_SVLC( scaledWindow.getWindowLeftOffset() >> 1, "scaled_ref_layer_left_offset" ); 371 WRITE_SVLC( scaledWindow.getWindowTopOffset() >> 1, "scaled_ref_layer_top_offset" ); 372 WRITE_SVLC( scaledWindow.getWindowRightOffset() >> 1, "scaled_ref_layer_right_offset" ); 373 WRITE_SVLC( scaledWindow.getWindowBottomOffset() >> 1, "scaled_ref_layer_bottom_offset" ); 374 } 375 WRITE_FLAG( pcPPS->getRefRegionOffsetPresentFlag(i) ? 1 : 0, "ref_region_offset_prsent_flag" ); 376 if (pcPPS->getRefRegionOffsetPresentFlag(i)) 377 { 378 Window refWindow = pcPPS->getRefLayerWindow(i); 379 WRITE_SVLC( refWindow.getWindowLeftOffset() >> 1, "ref_region_left_offset" ); 380 WRITE_SVLC( refWindow.getWindowTopOffset() >> 1, "ref_region_top_offset" ); 381 WRITE_SVLC( refWindow.getWindowRightOffset() >> 1, "ref_region_right_offset" ); 382 WRITE_SVLC( refWindow.getWindowBottomOffset() >> 1, "ref_region_bottom_offset" ); 383 } 384 #if R0209_GENERIC_PHASE 385 WRITE_FLAG( pcPPS->getResamplePhaseSetPresentFlag(i) ? 1 : 0, "resample_phase_set_present_flag" ); 386 if (pcPPS->getResamplePhaseSetPresentFlag(i)) 387 { 388 WRITE_UVLC( pcPPS->getPhaseHorLuma(i), "phase_hor_luma" ); 389 WRITE_UVLC( pcPPS->getPhaseVerLuma(i), "phase_ver_luma" ); 390 WRITE_UVLC( pcPPS->getPhaseHorChroma(i) + 8, "phase_hor_chroma_plus8" ); 391 WRITE_UVLC( pcPPS->getPhaseVerChroma(i) + 8, "phase_ver_chroma_plus8" ); 392 } 393 #endif 394 } 395 #else 396 #if MOVE_SCALED_OFFSET_TO_PPS 397 WRITE_UVLC( pcPPS->getNumScaledRefLayerOffsets(), "num_scaled_ref_layer_offsets" ); 398 for(Int i = 0; i < pcPPS->getNumScaledRefLayerOffsets(); i++) 399 { 400 Window scaledWindow = pcPPS->getScaledRefLayerWindow(i); 401 #if O0098_SCALED_REF_LAYER_ID 402 WRITE_CODE( pcPPS->getScaledRefLayerId(i), 6, "scaled_ref_layer_id" ); 403 #endif 404 WRITE_SVLC( scaledWindow.getWindowLeftOffset() >> 1, "scaled_ref_layer_left_offset" ); 405 WRITE_SVLC( scaledWindow.getWindowTopOffset() >> 1, "scaled_ref_layer_top_offset" ); 406 WRITE_SVLC( scaledWindow.getWindowRightOffset() >> 1, "scaled_ref_layer_right_offset" ); 407 WRITE_SVLC( scaledWindow.getWindowBottomOffset() >> 1, "scaled_ref_layer_bottom_offset" ); 408 } 409 #endif 410 #endif 411 #if Q0048_CGS_3D_ASYMLUT 412 UInt uiPos = getNumberOfWrittenBits(); 413 WRITE_FLAG( pcPPS->getCGSFlag() , "colour_mapping_enabled_flag" ); 414 if( pcPPS->getCGSFlag() ) 415 { 416 assert( pc3DAsymLUT != NULL ); 417 xCode3DAsymLUT( pc3DAsymLUT ); 418 } 419 pc3DAsymLUT->setPPSBit( getNumberOfWrittenBits() - uiPos ); 420 #endif 421 #endif 337 422 } 338 423 #else … … 502 587 Void TEncCavlc::codeSPS( TComSPS* pcSPS ) 503 588 { 589 #if R0042_PROFILE_INDICATION 590 bool bMultiLayerExtSpsFlag = (pcSPS->getNumDirectRefLayers() != 0 ) ; 591 #endif 504 592 #if ENC_DEC_TRACE 505 593 xTraceSPSHeader (pcSPS); … … 511 599 #endif 512 600 WRITE_CODE( pcSPS->getMaxTLayers() - 1, 3, "sps_max_sub_layers_minus1" ); 601 #if SVC_EXTENSION 602 } 603 #if R0042_PROFILE_INDICATION 604 else 605 { 606 WRITE_CODE(bMultiLayerExtSpsFlag? 7:(pcSPS->getMaxTLayers() - 1) , 3, "sps_ext_or_max_sub_layers_minus1" ); 607 } 608 #endif 609 #endif 610 611 #if SVC_EXTENSION 612 #if !R0042_PROFILE_INDICATION 613 if(pcSPS->getLayerId() == 0) 614 #else 615 if(!bMultiLayerExtSpsFlag) 616 #endif 617 { 618 #endif 513 619 WRITE_FLAG( pcSPS->getTemporalIdNestingFlag() ? 1 : 0, "sps_temporal_id_nesting_flag" ); 514 620 #if SVC_EXTENSION … … 516 622 #endif 517 623 #ifdef SPS_PTL_FIX 624 #if !R0042_PROFILE_INDICATION 518 625 if (pcSPS->getLayerId() == 0) 626 #else 627 if(!bMultiLayerExtSpsFlag) 628 #endif 519 629 { 520 630 codePTL(pcSPS->getPTL(), 1, pcSPS->getMaxTLayers() - 1); … … 525 635 WRITE_UVLC( pcSPS->getSPSId (), "sps_seq_parameter_set_id" ); 526 636 #if REPN_FORMAT_IN_VPS 637 #if !R0042_PROFILE_INDICATION 527 638 if( pcSPS->getLayerId() > 0 ) 639 #else 640 if(bMultiLayerExtSpsFlag) 641 #endif 528 642 { 529 643 WRITE_FLAG( pcSPS->getUpdateRepFormatFlag(), "update_rep_format_flag" ); 530 644 } 645 #if R0042_PROFILE_INDICATION 646 if( bMultiLayerExtSpsFlag && pcSPS->getUpdateRepFormatFlag()) 647 { 648 WRITE_CODE( pcSPS->getUpdateRepFormatIndex(), 8, "sps_rep_format_idx"); 649 } 650 #endif 651 652 #if R0042_PROFILE_INDICATION 653 if(!bMultiLayerExtSpsFlag) 654 { 655 #endif 656 #if !R0042_PROFILE_INDICATION 531 657 #if O0096_REP_FORMAT_INDEX 532 658 if( pcSPS->getLayerId() == 0 ) 533 659 #else 534 660 if( pcSPS->getLayerId() == 0 || pcSPS->getUpdateRepFormatFlag() ) 661 #endif 535 662 #endif 536 663 { … … 548 675 #if REPN_FORMAT_IN_VPS 549 676 } 677 #if !R0042_PROFILE_INDICATION 550 678 #if O0096_REP_FORMAT_INDEX 551 679 else if (pcSPS->getUpdateRepFormatFlag()) … … 555 683 #endif 556 684 #endif 685 #endif 557 686 558 687 #if R0156_CONF_WINDOW_IN_REP_FORMAT 559 688 #if REPN_FORMAT_IN_VPS 689 #if !R0042_PROFILE_INDICATION 560 690 #if O0096_REP_FORMAT_INDEX 561 691 if( pcSPS->getLayerId() == 0 ) … … 563 693 if( pcSPS->getLayerId() == 0 || pcSPS->getUpdateRepFormatFlag() ) 564 694 #endif 695 #endif 565 696 { 566 697 #endif … … 590 721 591 722 #if REPN_FORMAT_IN_VPS 723 #if !R0042_PROFILE_INDICATION 592 724 #if O0096_REP_FORMAT_INDEX 593 725 if( pcSPS->getLayerId() == 0 ) 594 726 #else 595 727 if( pcSPS->getLayerId() == 0 || pcSPS->getUpdateRepFormatFlag() ) 596 #endif 728 #endif 729 #endif 597 730 { 598 731 assert( pcSPS->getBitDepthY() >= 8 ); … … 604 737 } 605 738 #endif 739 #if R0042_PROFILE_INDICATION 740 } 741 #endif 742 606 743 WRITE_UVLC( pcSPS->getBitsForPOC()-4, "log2_max_pic_order_cnt_lsb_minus4" ); 607 744 608 745 #if SPS_DPB_PARAMS 746 #if !R0042_PROFILE_INDICATION 609 747 if( pcSPS->getLayerId() == 0 ) 748 #else 749 if(!bMultiLayerExtSpsFlag) 750 #endif 610 751 { 611 752 #endif … … 637 778 { 638 779 #if SCALINGLIST_INFERRING 780 #if !R0042_PROFILE_INDICATION 639 781 if( pcSPS->getLayerId() > 0 ) 782 #else 783 if( bMultiLayerExtSpsFlag) 784 #endif 640 785 { 641 786 WRITE_FLAG( pcSPS->getInferScalingListFlag() ? 1 : 0, "sps_infer_scaling_list_flag" ); … … 706 851 707 852 #if SVC_EXTENSION 853 #if !R0042_PROFILE_INDICATION 708 854 WRITE_FLAG( pcSPS->getExtensionFlag() ? 1 : 0, "sps_extension_flag" ); 855 #else 856 WRITE_FLAG( pcSPS->getExtensionFlag() ? 1 : 0, "sps_extension_present_flag" ); 857 #endif 709 858 710 859 if( pcSPS->getExtensionFlag() ) 711 860 { 861 #if !R0042_PROFILE_INDICATION 712 862 #if O0142_CONDITIONAL_SPS_EXTENSION 713 863 UInt spsExtensionTypeFlag[8] = { 0, 1, 0, 0, 0, 0, 0, 0 }; … … 723 873 codeSPSExtension( pcSPS ); 724 874 WRITE_FLAG( 0, "sps_extension2_flag" ); 875 #endif 876 #else 877 WRITE_FLAG( 0, "sps_range_extension_flag" ); 878 WRITE_FLAG( 1, "sps_multilayer_extension_flag" ); 879 WRITE_CODE( 0, 6, "sps_extension_6bits" ); 880 codeSPSExtension( pcSPS ); //it is sps_multilayer_extension 725 881 #endif 726 882 } -
branches/SHM-dev/source/Lib/TLibEncoder/TEncTop.cpp
r894 r898 985 985 #if SVC_EXTENSION 986 986 m_cSPS.setExtensionFlag( m_layerId > 0 ? true : false ); 987 987 #if R0042_PROFILE_INDICATION 988 m_cSPS.setNumDirectRefLayers(m_numAddLayerSets); 989 #endif 988 990 #if Q0078_ADD_LAYER_SETS 989 991 if( !m_numDirectRefLayers && m_numAddLayerSets )
Note: See TracChangeset for help on using the changeset viewer.