Changeset 302 in SHVCSoftware for branches/SHM-2.1-dev/source/Lib/TLibEncoder/SEIwrite.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/TLibEncoder/SEIwrite.cpp
r292 r302 84 84 fprintf( g_hTrace, "=========== Decoding Unit Information SEI message ===========\n"); 85 85 break; 86 #if J0149_TONE_MAPPING_SEI87 86 case SEI::TONE_MAPPING_INFO: 88 87 fprintf( g_hTrace, "=========== Tone Mapping Info SEI message ===========\n"); 89 88 break; 90 #endif91 89 #if M0043_LAYERS_PRESENT_SEI 92 90 case SEI::LAYERS_PRESENT: … … 94 92 break; 95 93 #endif 96 #if L0208_SOP_DESCRIPTION_SEI97 94 case SEI::SOP_DESCRIPTION: 98 95 fprintf( g_hTrace, "=========== SOP Description SEI message ===========\n"); 99 96 break; 100 #endif101 #if K0180_SCALABLE_NESTING_SEI102 97 case SEI::SCALABLE_NESTING: 103 98 fprintf( g_hTrace, "=========== Scalable Nesting SEI message ===========\n"); 104 99 break; 105 #endif106 100 default: 107 101 fprintf( g_hTrace, "=========== Unknown SEI message ===========\n"); … … 111 105 #endif 112 106 113 #if K0180_SCALABLE_NESTING_SEI114 107 void SEIWriter::xWriteSEIpayloadData(TComBitIf& bs, const SEI& sei, TComSPS *sps) 115 #else116 void SEIWriter::xWriteSEIpayloadData(const SEI& sei, TComSPS *sps)117 #endif118 108 { 119 109 switch (sei.payloadType()) … … 152 142 xWriteSEIGradualDecodingRefreshInfo(*static_cast<const SEIGradualDecodingRefreshInfo*>(&sei)); 153 143 break; 154 #if J0149_TONE_MAPPING_SEI155 144 case SEI::TONE_MAPPING_INFO: 156 145 xWriteSEIToneMappingInfo(*static_cast<const SEIToneMappingInfo*>(&sei)); 157 146 break; 158 #endif159 147 #if M0043_LAYERS_PRESENT_SEI 160 148 case SEI::LAYERS_PRESENT: … … 162 150 break; 163 151 #endif 164 #if L0208_SOP_DESCRIPTION_SEI165 152 case SEI::SOP_DESCRIPTION: 166 153 xWriteSEISOPDescription(*static_cast<const SEISOPDescription*>(&sei)); 167 154 break; 168 #endif169 #if K0180_SCALABLE_NESTING_SEI170 155 case SEI::SCALABLE_NESTING: 171 156 xWriteSEIScalableNesting(bs, *static_cast<const SEIScalableNesting*>(&sei), sps); 172 157 break; 173 #endif174 158 default: 175 159 assert(!"Unhandled SEI message"); … … 190 174 191 175 192 #if K0180_SCALABLE_NESTING_SEI193 194 176 #if ENC_DEC_TRACE 195 177 Bool traceEnable = g_HLSTraceEnable; … … 201 183 #endif 202 184 203 #else204 205 #if ENC_DEC_TRACE206 g_HLSTraceEnable = false;207 #endif208 xWriteSEIpayloadData(sei, sps);209 #if ENC_DEC_TRACE210 g_HLSTraceEnable = true;211 #endif212 213 #endif214 215 185 UInt payload_data_num_bits = bs_count.getNumberOfWrittenBits(); 216 186 assert(0 == payload_data_num_bits % 8); … … 219 189 220 190 #if ENC_DEC_TRACE 221 #if K0180_SCALABLE_NESTING_SEI222 191 if (g_HLSTraceEnable) 223 #endif224 192 xTraceSEIHeader(); 225 193 #endif … … 241 209 /* payloadData */ 242 210 #if ENC_DEC_TRACE 243 #if K0180_SCALABLE_NESTING_SEI244 211 if (g_HLSTraceEnable) 245 #endif246 212 xTraceSEIMessageType(sei.payloadType()); 247 213 #endif 248 214 249 #if K0180_SCALABLE_NESTING_SEI250 215 xWriteSEIpayloadData(bs, sei, sps); 251 #else252 xWriteSEIpayloadData(sei, sps);253 #endif254 216 } 255 217 … … 306 268 { 307 269 WRITE_CODE(sei.activeVPSId, 4, "active_vps_id"); 308 #if L0047_APS_FLAGS309 270 WRITE_FLAG(sei.m_fullRandomAccessFlag, "full_random_access_flag"); 310 271 WRITE_FLAG(sei.m_noParamSetUpdateFlag, "no_param_set_update_flag"); 311 #endif312 272 WRITE_UVLC(sei.numSpsIdsMinus1, "num_sps_ids_minus1"); 313 273 … … 340 300 WRITE_CODE( sei.m_duSptCpbRemovalDelay, (vui->getHrdParameters()->getDuCpbRemovalDelayLengthMinus1() + 1), "du_spt_cpb_removal_delay"); 341 301 } 342 #if L0044_DU_DPB_OUTPUT_DELAY_HRD343 302 WRITE_FLAG( sei.m_dpbOutputDuDelayPresentFlag, "dpb_output_du_delay_present_flag"); 344 303 if(sei.m_dpbOutputDuDelayPresentFlag) … … 346 305 WRITE_CODE(sei.m_picSptDpbOutputDuDelay, vui->getHrdParameters()->getDpbOutputDelayDuLengthMinus1() + 1, "pic_spt_dpb_output_du_delay"); 347 306 } 348 #endif349 307 xWriteByteAlign(); 350 308 } … … 361 319 WRITE_FLAG( sei.m_rapCpbParamsPresentFlag, "rap_cpb_params_present_flag" ); 362 320 } 363 #if L0328_SPLICING364 321 WRITE_FLAG( sei.m_concatenationFlag, "concatenation_flag"); 365 322 WRITE_CODE( sei.m_auCpbRemovalDelayDelta - 1, ( hrd->getCpbRemovalDelayLengthMinus1() + 1 ), "au_cpb_removal_delay_delta_minus1" ); 366 #endif367 #if L0044_CPB_DPB_DELAY_OFFSET368 323 if( sei.m_rapCpbParamsPresentFlag ) 369 324 { … … 371 326 WRITE_CODE( sei.m_dpbDelayOffset, hrd->getDpbOutputDelayLengthMinus1() + 1, "dpb_delay_offset" ); 372 327 } 373 #endif374 328 for( nalOrVcl = 0; nalOrVcl < 2; nalOrVcl ++ ) 375 329 { … … 397 351 TComHRD *hrd = vui->getHrdParameters(); 398 352 399 #if !L0045_CONDITION_SIGNALLING400 // This condition was probably OK before the pic_struct, progressive_source_idc, duplicate_flag were added401 if( !hrd->getNalHrdParametersPresentFlag() && !hrd->getVclHrdParametersPresentFlag() )402 return;403 #endif404 353 if( vui->getFrameFieldInfoPresentFlag() ) 405 354 { 406 355 WRITE_CODE( sei.m_picStruct, 4, "pic_struct" ); 407 #if L0046_RENAME_PROG_SRC_IDC408 356 WRITE_CODE( sei.m_sourceScanType, 2, "source_scan_type" ); 409 #else410 WRITE_CODE( sei.m_progressiveSourceIdc, 2, "progressive_source_idc" );411 #endif412 357 WRITE_FLAG( sei.m_duplicateFlag ? 1 : 0, "duplicate_flag" ); 413 358 } 414 359 415 #if L0045_CONDITION_SIGNALLING416 360 if( hrd->getCpbDpbDelaysPresentFlag() ) 417 361 { 418 #endif419 362 WRITE_CODE( sei.m_auCpbRemovalDelay - 1, ( hrd->getCpbRemovalDelayLengthMinus1() + 1 ), "au_cpb_removal_delay_minus1" ); 420 363 WRITE_CODE( sei.m_picDpbOutputDelay, ( hrd->getDpbOutputDelayLengthMinus1() + 1 ), "pic_dpb_output_delay" ); 421 #if L0044_DU_DPB_OUTPUT_DELAY_HRD422 364 if(hrd->getSubPicCpbParamsPresentFlag()) 423 365 { 424 366 WRITE_CODE(sei.m_picDpbOutputDuDelay, hrd->getDpbOutputDelayDuLengthMinus1()+1, "pic_dpb_output_du_delay" ); 425 367 } 426 #endif427 368 if( hrd->getSubPicCpbParamsPresentFlag() && hrd->getSubPicCpbParamsInPicTimingSEIFlag() ) 428 369 { … … 442 383 } 443 384 } 444 #if L0045_CONDITION_SIGNALLING 445 } 446 #endif 385 } 447 386 xWriteByteAlign(); 448 387 } … … 481 420 482 421 WRITE_CODE( sei.m_arrangementReservedByte, 8, "frame_packing_arrangement_reserved_byte" ); 483 #if L0045_PERSISTENCE_FLAGS484 422 WRITE_FLAG( sei.m_arrangementPersistenceFlag, "frame_packing_arrangement_persistence_flag" ); 485 #else486 WRITE_UVLC( sei.m_arrangementRepetetionPeriod, "frame_packing_arrangement_repetition_period" );487 #endif488 423 } 489 424 … … 493 428 } 494 429 495 #if J0149_TONE_MAPPING_SEI496 430 Void SEIWriter::xWriteSEIToneMappingInfo(const SEIToneMappingInfo& sei) 497 431 { … … 565 499 xWriteByteAlign(); 566 500 } 567 #endif568 501 569 502 Void SEIWriter::xWriteSEIDisplayOrientation(const SEIDisplayOrientation &sei) … … 575 508 WRITE_FLAG( sei.verFlip, "ver_flip" ); 576 509 WRITE_CODE( sei.anticlockwiseRotation, 16, "anticlockwise_rotation" ); 577 #if L0045_PERSISTENCE_FLAGS578 510 WRITE_FLAG( sei.persistenceFlag, "display_orientation_persistence_flag" ); 579 #else580 WRITE_UVLC( sei.repetitionPeriod, "display_orientation_repetition_period" );581 #endif582 #if !REMOVE_SINGLE_SEI_EXTENSION_FLAGS583 WRITE_FLAG( sei.extensionFlag, "display_orientation_extension_flag" );584 assert( !sei.extensionFlag );585 #endif586 511 } 587 512 xWriteByteAlign(); … … 613 538 #endif 614 539 615 #if L0208_SOP_DESCRIPTION_SEI616 540 Void SEIWriter::xWriteSEISOPDescription(const SEISOPDescription& sei) 617 541 { … … 634 558 xWriteByteAlign(); 635 559 } 636 #endif 637 638 #if K0180_SCALABLE_NESTING_SEI 560 639 561 Void SEIWriter::xWriteSEIScalableNesting(TComBitIf& bs, const SEIScalableNesting& sei, TComSPS *sps) 640 562 { … … 678 600 } 679 601 } 680 #endif681 602 682 603 Void SEIWriter::xWriteByteAlign()
Note: See TracChangeset for help on using the changeset viewer.