Changeset 302 in SHVCSoftware for branches/SHM-2.1-dev/source/Lib/TLibDecoder/SEIread.cpp
- Timestamp:
- 28 Jun 2013, 00:40:00 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/SHM-2.1-dev/source/Lib/TLibDecoder/SEIread.cpp
r292 r302 90 90 fprintf( g_hTrace, "=========== Decoding Unit Information SEI message ===========\n"); 91 91 break; 92 #if J0149_TONE_MAPPING_SEI93 92 case SEI::TONE_MAPPING_INFO: 94 93 fprintf( g_hTrace, "===========Tone Mapping Info SEI message ===========\n"); 95 94 break; 96 #endif97 95 #if M0043_LAYERS_PRESENT_SEI 98 96 case SEI::LAYERS_PRESENT: … … 100 98 break; 101 99 #endif 102 #if L0208_SOP_DESCRIPTION_SEI103 100 case SEI::SOP_DESCRIPTION: 104 101 fprintf( g_hTrace, "=========== SOP Description SEI message ===========\n"); 105 102 break; 106 #endif107 #if K0180_SCALABLE_NESTING_SEI108 103 case SEI::SCALABLE_NESTING: 109 104 fprintf( g_hTrace, "=========== Scalable Nesting SEI message ===========\n"); 110 105 break; 111 #endif112 106 default: 113 107 fprintf( g_hTrace, "=========== Unknown SEI message ===========\n"); … … 251 245 xParseSEIGradualDecodingRefreshInfo((SEIGradualDecodingRefreshInfo&) *sei, payloadSize); 252 246 break; 253 #if J0149_TONE_MAPPING_SEI254 247 case SEI::TONE_MAPPING_INFO: 255 248 sei = new SEIToneMappingInfo; 256 249 xParseSEIToneMappingInfo((SEIToneMappingInfo&) *sei, payloadSize); 257 250 break; 258 #endif259 251 #if M0043_LAYERS_PRESENT_SEI 260 252 case SEI::LAYERS_PRESENT: … … 270 262 break; 271 263 #endif 272 #if L0208_SOP_DESCRIPTION_SEI273 264 case SEI::SOP_DESCRIPTION: 274 265 sei = new SEISOPDescription; 275 266 xParseSEISOPDescription((SEISOPDescription&) *sei, payloadSize); 276 267 break; 277 #endif278 #if K0180_SCALABLE_NESTING_SEI279 268 case SEI::SCALABLE_NESTING: 280 269 sei = new SEIScalableNesting; … … 285 274 #endif 286 275 break; 287 #endif288 276 default: 289 277 for (UInt i = 0; i < payloadSize; i++) … … 299 287 switch (payloadType) 300 288 { 301 #if L0363_SEI_ALLOW_SUFFIX302 289 case SEI::USER_DATA_UNREGISTERED: 303 290 sei = new SEIuserDataUnregistered; 304 291 xParseSEIuserDataUnregistered((SEIuserDataUnregistered&) *sei, payloadSize); 305 292 break; 306 #endif307 293 case SEI::DECODED_PICTURE_HASH: 308 294 sei = new SEIDecodedPictureHash; … … 436 422 UInt val; 437 423 READ_CODE(4, val, "active_vps_id"); sei.activeVPSId = val; 438 #if L0047_APS_FLAGS439 424 READ_FLAG( val, "full_random_access_flag"); sei.m_fullRandomAccessFlag = val ? true : false; 440 425 READ_FLAG( val, "no_param_set_update_flag"); sei.m_noParamSetUpdateFlag = val ? true : false; 441 #endif442 426 READ_UVLC( val, "num_sps_ids_minus1"); sei.numSpsIdsMinus1 = val; 443 427 … … 472 456 sei.m_duSptCpbRemovalDelay = 0; 473 457 } 474 #if L0044_DU_DPB_OUTPUT_DELAY_HRD475 458 READ_FLAG( val, "dpb_output_du_delay_present_flag"); sei.m_dpbOutputDuDelayPresentFlag = val ? true : false; 476 459 if(sei.m_dpbOutputDuDelayPresentFlag) … … 479 462 sei.m_picSptDpbOutputDuDelay = val; 480 463 } 481 #endif482 464 xParseByteAlign(); 483 465 } … … 496 478 READ_FLAG( code, "rap_cpb_params_present_flag" ); sei.m_rapCpbParamsPresentFlag = code; 497 479 } 498 #if L0328_SPLICING499 480 //read splicing flag and cpb_removal_delay_delta 500 481 READ_FLAG( code, "concatenation_flag"); … … 502 483 READ_CODE( ( pHRD->getCpbRemovalDelayLengthMinus1() + 1 ), code, "au_cpb_removal_delay_delta_minus1" ); 503 484 sei.m_auCpbRemovalDelayDelta = code + 1; 504 #endif505 #if L0044_CPB_DPB_DELAY_OFFSET506 485 if( sei.m_rapCpbParamsPresentFlag ) 507 486 { … … 509 488 READ_CODE( pHRD->getDpbOutputDelayLengthMinus1() + 1, code, "dpb_delay_offset" ); sei.m_dpbDelayOffset = code; 510 489 } 511 #endif512 490 for( nalOrVcl = 0; nalOrVcl < 2; nalOrVcl ++ ) 513 491 { … … 541 519 TComHRD *hrd = vui->getHrdParameters(); 542 520 543 #if !L0045_CONDITION_SIGNALLING544 // This condition was probably OK before the pic_struct, progressive_source_idc, duplicate_flag were added545 if( !hrd->getNalHrdParametersPresentFlag() && !hrd->getVclHrdParametersPresentFlag() )546 {547 return;548 }549 #endif550 551 521 if( vui->getFrameFieldInfoPresentFlag() ) 552 522 { 553 523 READ_CODE( 4, code, "pic_struct" ); sei.m_picStruct = code; 554 #if L0046_RENAME_PROG_SRC_IDC555 524 READ_CODE( 2, code, "source_scan_type" ); sei.m_sourceScanType = code; 556 #else557 READ_CODE( 2, code, "progressive_source_idc" ); sei.m_progressiveSourceIdc = code;558 #endif559 525 READ_FLAG( code, "duplicate_flag" ); sei.m_duplicateFlag = ( code == 1 ? true : false ); 560 526 } 561 527 562 #if L0045_CONDITION_SIGNALLING563 528 if( hrd->getCpbDpbDelaysPresentFlag()) 564 529 { 565 #endif566 530 READ_CODE( ( hrd->getCpbRemovalDelayLengthMinus1() + 1 ), code, "au_cpb_removal_delay_minus1" ); 567 531 sei.m_auCpbRemovalDelay = code + 1; … … 569 533 sei.m_picDpbOutputDelay = code; 570 534 571 #if L0044_DU_DPB_OUTPUT_DELAY_HRD572 535 if(hrd->getSubPicCpbParamsPresentFlag()) 573 536 { … … 575 538 sei.m_picDpbOutputDuDelay = code; 576 539 } 577 #endif578 540 if( hrd->getSubPicCpbParamsPresentFlag() && hrd->getSubPicCpbParamsInPicTimingSEIFlag() ) 579 541 { … … 609 571 } 610 572 } 611 #if L0045_CONDITION_SIGNALLING 612 } 613 #endif 573 } 614 574 xParseByteAlign(); 615 575 } … … 632 592 { 633 593 READ_CODE( 7, val, "frame_packing_arrangement_type" ); sei.m_arrangementType = val; 634 #if L0444_FPA_TYPE635 594 assert((sei.m_arrangementType > 2) && (sei.m_arrangementType < 6) ); 636 #endif637 595 READ_FLAG( val, "quincunx_sampling_flag" ); sei.m_quincunxSamplingFlag = val; 638 596 … … 654 612 655 613 READ_CODE( 8, val, "frame_packing_arrangement_reserved_byte" ); sei.m_arrangementReservedByte = val; 656 #if L0045_PERSISTENCE_FLAGS657 614 READ_FLAG( val, "frame_packing_arrangement_persistence_flag" ); sei.m_arrangementPersistenceFlag = val ? true : false; 658 #else659 READ_UVLC( val, "frame_packing_arrangement_repetition_period" ); sei.m_arrangementRepetetionPeriod = val;660 #endif661 615 } 662 616 READ_FLAG( val, "upsampled_aspect_ratio" ); sei.m_upsampledAspectRatio = val; … … 674 628 READ_FLAG( val, "ver_flip" ); sei.verFlip = val; 675 629 READ_CODE( 16, val, "anticlockwise_rotation" ); sei.anticlockwiseRotation = val; 676 #if L0045_PERSISTENCE_FLAGS677 630 READ_FLAG( val, "display_orientation_persistence_flag" ); sei.persistenceFlag = val; 678 #else679 READ_UVLC( val, "display_orientation_repetition_period" ); sei.repetitionPeriod = val;680 #endif681 #if !REMOVE_SINGLE_SEI_EXTENSION_FLAGS682 READ_FLAG( val, "display_orientation_extension_flag" ); sei.extensionFlag = val;683 assert( !sei.extensionFlag );684 #endif685 631 } 686 632 xParseByteAlign(); … … 702 648 } 703 649 704 #if J0149_TONE_MAPPING_SEI705 650 Void SEIReader::xParseSEIToneMappingInfo(SEIToneMappingInfo& sei, UInt /*payloadSize*/) 706 651 { … … 783 728 xParseByteAlign(); 784 729 } 785 #endif786 730 787 731 #if M0043_LAYERS_PRESENT_SEI … … 806 750 #endif 807 751 808 #if L0208_SOP_DESCRIPTION_SEI809 752 Void SEIReader::xParseSEISOPDescription(SEISOPDescription &sei, UInt payloadSize) 810 753 { … … 830 773 xParseByteAlign(); 831 774 } 832 #endif 833 834 835 #if K0180_SCALABLE_NESTING_SEI 775 836 776 #if M0043_LAYERS_PRESENT_SEI 837 777 Void SEIReader::xParseSEIScalableNesting(SEIScalableNesting& sei, const NalUnitType nalUnitType, UInt payloadSize, TComVPS *vps, TComSPS *sps) … … 888 828 889 829 } 890 #endif891 830 892 831 Void SEIReader::xParseByteAlign()
Note: See TracChangeset for help on using the changeset viewer.