Changeset 537 in 3DVCSoftware for branches/HTM-DEV-0.3-dev2/source/Lib/TLibEncoder/SEIwrite.cpp
- Timestamp:
- 13 Jul 2013, 15:51:26 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HTM-DEV-0.3-dev2/source/Lib/TLibEncoder/SEIwrite.cpp
r446 r537 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 #if L0208_SOP_DESCRIPTION_SEI92 89 case SEI::SOP_DESCRIPTION: 93 90 fprintf( g_hTrace, "=========== SOP Description SEI message ===========\n"); 94 91 break; 95 #endif96 #if K0180_SCALABLE_NESTING_SEI97 92 case SEI::SCALABLE_NESTING: 98 93 fprintf( g_hTrace, "=========== Scalable Nesting SEI message ===========\n"); 99 94 break; 100 #endif101 95 default: 102 96 fprintf( g_hTrace, "=========== Unknown SEI message ===========\n"); … … 106 100 #endif 107 101 108 #if K0180_SCALABLE_NESTING_SEI109 102 void SEIWriter::xWriteSEIpayloadData(TComBitIf& bs, const SEI& sei, TComSPS *sps) 110 #else111 void SEIWriter::xWriteSEIpayloadData(const SEI& sei, TComSPS *sps)112 #endif113 103 { 114 104 switch (sei.payloadType()) … … 147 137 xWriteSEIGradualDecodingRefreshInfo(*static_cast<const SEIGradualDecodingRefreshInfo*>(&sei)); 148 138 break; 149 #if J0149_TONE_MAPPING_SEI150 139 case SEI::TONE_MAPPING_INFO: 151 140 xWriteSEIToneMappingInfo(*static_cast<const SEIToneMappingInfo*>(&sei)); 152 141 break; 153 #endif154 #if L0208_SOP_DESCRIPTION_SEI155 142 case SEI::SOP_DESCRIPTION: 156 143 xWriteSEISOPDescription(*static_cast<const SEISOPDescription*>(&sei)); 157 144 break; 158 #endif159 #if K0180_SCALABLE_NESTING_SEI160 145 case SEI::SCALABLE_NESTING: 161 146 xWriteSEIScalableNesting(bs, *static_cast<const SEIScalableNesting*>(&sei), sps); 162 147 break; 163 #endif164 148 default: 165 149 assert(!"Unhandled SEI message"); … … 179 163 setBitstream(&bs_count); 180 164 181 182 #if K0180_SCALABLE_NESTING_SEI183 165 184 166 #if ENC_DEC_TRACE … … 191 173 #endif 192 174 193 #else194 195 #if ENC_DEC_TRACE196 g_HLSTraceEnable = false;197 #endif198 xWriteSEIpayloadData(sei, sps);199 #if ENC_DEC_TRACE200 g_HLSTraceEnable = true;201 #endif202 203 #endif204 205 175 UInt payload_data_num_bits = bs_count.getNumberOfWrittenBits(); 206 176 assert(0 == payload_data_num_bits % 8); … … 209 179 210 180 #if ENC_DEC_TRACE 211 #if K0180_SCALABLE_NESTING_SEI212 181 if (g_HLSTraceEnable) 213 #endif214 182 xTraceSEIHeader(); 215 183 #endif … … 231 199 /* payloadData */ 232 200 #if ENC_DEC_TRACE 233 #if K0180_SCALABLE_NESTING_SEI234 201 if (g_HLSTraceEnable) 235 #endif236 202 xTraceSEIMessageType(sei.payloadType()); 237 203 #endif 238 204 239 #if K0180_SCALABLE_NESTING_SEI240 205 xWriteSEIpayloadData(bs, sei, sps); 241 #else242 xWriteSEIpayloadData(sei, sps);243 #endif244 206 } 245 207 … … 296 258 { 297 259 WRITE_CODE(sei.activeVPSId, 4, "active_vps_id"); 298 #if L0047_APS_FLAGS299 260 WRITE_FLAG(sei.m_fullRandomAccessFlag, "full_random_access_flag"); 300 261 WRITE_FLAG(sei.m_noParamSetUpdateFlag, "no_param_set_update_flag"); 301 #endif302 262 WRITE_UVLC(sei.numSpsIdsMinus1, "num_sps_ids_minus1"); 303 263 … … 330 290 WRITE_CODE( sei.m_duSptCpbRemovalDelay, (vui->getHrdParameters()->getDuCpbRemovalDelayLengthMinus1() + 1), "du_spt_cpb_removal_delay"); 331 291 } 332 #if L0044_DU_DPB_OUTPUT_DELAY_HRD333 292 WRITE_FLAG( sei.m_dpbOutputDuDelayPresentFlag, "dpb_output_du_delay_present_flag"); 334 293 if(sei.m_dpbOutputDuDelayPresentFlag) … … 336 295 WRITE_CODE(sei.m_picSptDpbOutputDuDelay, vui->getHrdParameters()->getDpbOutputDelayDuLengthMinus1() + 1, "pic_spt_dpb_output_du_delay"); 337 296 } 338 #endif339 297 xWriteByteAlign(); 340 298 } … … 351 309 WRITE_FLAG( sei.m_rapCpbParamsPresentFlag, "rap_cpb_params_present_flag" ); 352 310 } 353 #if L0328_SPLICING354 311 WRITE_FLAG( sei.m_concatenationFlag, "concatenation_flag"); 355 312 WRITE_CODE( sei.m_auCpbRemovalDelayDelta - 1, ( hrd->getCpbRemovalDelayLengthMinus1() + 1 ), "au_cpb_removal_delay_delta_minus1" ); 356 #endif357 #if L0044_CPB_DPB_DELAY_OFFSET358 313 if( sei.m_rapCpbParamsPresentFlag ) 359 314 { … … 361 316 WRITE_CODE( sei.m_dpbDelayOffset, hrd->getDpbOutputDelayLengthMinus1() + 1, "dpb_delay_offset" ); 362 317 } 363 #endif364 318 for( nalOrVcl = 0; nalOrVcl < 2; nalOrVcl ++ ) 365 319 { … … 387 341 TComHRD *hrd = vui->getHrdParameters(); 388 342 389 #if !L0045_CONDITION_SIGNALLING390 // This condition was probably OK before the pic_struct, progressive_source_idc, duplicate_flag were added391 if( !hrd->getNalHrdParametersPresentFlag() && !hrd->getVclHrdParametersPresentFlag() )392 return;393 #endif394 343 if( vui->getFrameFieldInfoPresentFlag() ) 395 344 { 396 345 WRITE_CODE( sei.m_picStruct, 4, "pic_struct" ); 397 #if L0046_RENAME_PROG_SRC_IDC398 346 WRITE_CODE( sei.m_sourceScanType, 2, "source_scan_type" ); 399 #else400 WRITE_CODE( sei.m_progressiveSourceIdc, 2, "progressive_source_idc" );401 #endif402 347 WRITE_FLAG( sei.m_duplicateFlag ? 1 : 0, "duplicate_flag" ); 403 348 } 404 349 405 #if L0045_CONDITION_SIGNALLING406 350 if( hrd->getCpbDpbDelaysPresentFlag() ) 407 351 { 408 #endif409 352 WRITE_CODE( sei.m_auCpbRemovalDelay - 1, ( hrd->getCpbRemovalDelayLengthMinus1() + 1 ), "au_cpb_removal_delay_minus1" ); 410 353 WRITE_CODE( sei.m_picDpbOutputDelay, ( hrd->getDpbOutputDelayLengthMinus1() + 1 ), "pic_dpb_output_delay" ); 411 #if L0044_DU_DPB_OUTPUT_DELAY_HRD412 354 if(hrd->getSubPicCpbParamsPresentFlag()) 413 355 { 414 356 WRITE_CODE(sei.m_picDpbOutputDuDelay, hrd->getDpbOutputDelayDuLengthMinus1()+1, "pic_dpb_output_du_delay" ); 415 357 } 416 #endif417 358 if( hrd->getSubPicCpbParamsPresentFlag() && hrd->getSubPicCpbParamsInPicTimingSEIFlag() ) 418 359 { … … 432 373 } 433 374 } 434 #if L0045_CONDITION_SIGNALLING 435 } 436 #endif 375 } 437 376 xWriteByteAlign(); 438 377 } … … 471 410 472 411 WRITE_CODE( sei.m_arrangementReservedByte, 8, "frame_packing_arrangement_reserved_byte" ); 473 #if L0045_PERSISTENCE_FLAGS474 412 WRITE_FLAG( sei.m_arrangementPersistenceFlag, "frame_packing_arrangement_persistence_flag" ); 475 #else476 WRITE_UVLC( sei.m_arrangementRepetetionPeriod, "frame_packing_arrangement_repetition_period" );477 #endif478 413 } 479 414 … … 483 418 } 484 419 485 #if J0149_TONE_MAPPING_SEI486 420 Void SEIWriter::xWriteSEIToneMappingInfo(const SEIToneMappingInfo& sei) 487 421 { … … 555 489 xWriteByteAlign(); 556 490 } 557 #endif558 491 559 492 Void SEIWriter::xWriteSEIDisplayOrientation(const SEIDisplayOrientation &sei) … … 565 498 WRITE_FLAG( sei.verFlip, "ver_flip" ); 566 499 WRITE_CODE( sei.anticlockwiseRotation, 16, "anticlockwise_rotation" ); 567 #if L0045_PERSISTENCE_FLAGS568 500 WRITE_FLAG( sei.persistenceFlag, "display_orientation_persistence_flag" ); 569 #else570 WRITE_UVLC( sei.repetitionPeriod, "display_orientation_repetition_period" );571 #endif572 #if !REMOVE_SINGLE_SEI_EXTENSION_FLAGS573 WRITE_FLAG( sei.extensionFlag, "display_orientation_extension_flag" );574 assert( !sei.extensionFlag );575 #endif576 501 } 577 502 xWriteByteAlign(); … … 591 516 } 592 517 593 #if L0208_SOP_DESCRIPTION_SEI594 518 Void SEIWriter::xWriteSEISOPDescription(const SEISOPDescription& sei) 595 519 { … … 612 536 xWriteByteAlign(); 613 537 } 614 #endif 615 616 #if K0180_SCALABLE_NESTING_SEI 538 617 539 Void SEIWriter::xWriteSEIScalableNesting(TComBitIf& bs, const SEIScalableNesting& sei, TComSPS *sps) 618 540 { … … 656 578 } 657 579 } 658 #endif659 580 660 581 Void SEIWriter::xWriteByteAlign()
Note: See TracChangeset for help on using the changeset viewer.