Ignore:
Timestamp:
28 Jun 2013, 00:40:00 (11 years ago)
Author:
seregin
Message:

update to HM11.0

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/SHM-2.1-dev/source/Lib/TLibEncoder/SEIwrite.cpp

    r292 r302  
    8484    fprintf( g_hTrace, "=========== Decoding Unit Information SEI message ===========\n");
    8585    break;
    86 #if J0149_TONE_MAPPING_SEI
    8786  case SEI::TONE_MAPPING_INFO:
    8887    fprintf( g_hTrace, "=========== Tone Mapping Info SEI message ===========\n");
    8988    break;
    90 #endif
    9189#if M0043_LAYERS_PRESENT_SEI
    9290  case SEI::LAYERS_PRESENT:
     
    9492    break;
    9593#endif
    96 #if L0208_SOP_DESCRIPTION_SEI
    9794  case SEI::SOP_DESCRIPTION:
    9895    fprintf( g_hTrace, "=========== SOP Description SEI message ===========\n");
    9996    break;
    100 #endif
    101 #if K0180_SCALABLE_NESTING_SEI
    10297  case SEI::SCALABLE_NESTING:
    10398    fprintf( g_hTrace, "=========== Scalable Nesting SEI message ===========\n");
    10499    break;
    105 #endif
    106100  default:
    107101    fprintf( g_hTrace, "=========== Unknown SEI message ===========\n");
     
    111105#endif
    112106
    113 #if K0180_SCALABLE_NESTING_SEI
    114107void SEIWriter::xWriteSEIpayloadData(TComBitIf& bs, const SEI& sei, TComSPS *sps)
    115 #else
    116 void SEIWriter::xWriteSEIpayloadData(const SEI& sei, TComSPS *sps)
    117 #endif
    118108{
    119109  switch (sei.payloadType())
     
    152142    xWriteSEIGradualDecodingRefreshInfo(*static_cast<const SEIGradualDecodingRefreshInfo*>(&sei));
    153143    break;
    154 #if J0149_TONE_MAPPING_SEI
    155144  case SEI::TONE_MAPPING_INFO:
    156145    xWriteSEIToneMappingInfo(*static_cast<const SEIToneMappingInfo*>(&sei));
    157146    break;
    158 #endif
    159147#if M0043_LAYERS_PRESENT_SEI
    160148  case SEI::LAYERS_PRESENT:
     
    162150    break;
    163151#endif
    164 #if L0208_SOP_DESCRIPTION_SEI
    165152  case SEI::SOP_DESCRIPTION:
    166153    xWriteSEISOPDescription(*static_cast<const SEISOPDescription*>(&sei));
    167154    break;
    168 #endif
    169 #if K0180_SCALABLE_NESTING_SEI
    170155  case SEI::SCALABLE_NESTING:
    171156    xWriteSEIScalableNesting(bs, *static_cast<const SEIScalableNesting*>(&sei), sps);
    172157    break;
    173 #endif
    174158  default:
    175159    assert(!"Unhandled SEI message");
     
    190174
    191175
    192 #if K0180_SCALABLE_NESTING_SEI
    193 
    194176#if ENC_DEC_TRACE
    195177  Bool traceEnable = g_HLSTraceEnable;
     
    201183#endif
    202184
    203 #else
    204 
    205 #if ENC_DEC_TRACE
    206   g_HLSTraceEnable = false;
    207 #endif
    208   xWriteSEIpayloadData(sei, sps);
    209 #if ENC_DEC_TRACE
    210   g_HLSTraceEnable = true;
    211 #endif
    212 
    213 #endif
    214 
    215185  UInt payload_data_num_bits = bs_count.getNumberOfWrittenBits();
    216186  assert(0 == payload_data_num_bits % 8);
     
    219189
    220190#if ENC_DEC_TRACE
    221 #if K0180_SCALABLE_NESTING_SEI
    222191  if (g_HLSTraceEnable)
    223 #endif
    224192  xTraceSEIHeader();
    225193#endif
     
    241209  /* payloadData */
    242210#if ENC_DEC_TRACE
    243 #if K0180_SCALABLE_NESTING_SEI
    244211  if (g_HLSTraceEnable)
    245 #endif
    246212  xTraceSEIMessageType(sei.payloadType());
    247213#endif
    248214
    249 #if K0180_SCALABLE_NESTING_SEI
    250215  xWriteSEIpayloadData(bs, sei, sps);
    251 #else
    252   xWriteSEIpayloadData(sei, sps);
    253 #endif
    254216}
    255217
     
    306268{
    307269  WRITE_CODE(sei.activeVPSId,     4, "active_vps_id");
    308 #if L0047_APS_FLAGS
    309270  WRITE_FLAG(sei.m_fullRandomAccessFlag, "full_random_access_flag");
    310271  WRITE_FLAG(sei.m_noParamSetUpdateFlag, "no_param_set_update_flag");
    311 #endif
    312272  WRITE_UVLC(sei.numSpsIdsMinus1,    "num_sps_ids_minus1");
    313273
     
    340300    WRITE_CODE( sei.m_duSptCpbRemovalDelay, (vui->getHrdParameters()->getDuCpbRemovalDelayLengthMinus1() + 1), "du_spt_cpb_removal_delay");
    341301  }
    342 #if L0044_DU_DPB_OUTPUT_DELAY_HRD
    343302  WRITE_FLAG( sei.m_dpbOutputDuDelayPresentFlag, "dpb_output_du_delay_present_flag");
    344303  if(sei.m_dpbOutputDuDelayPresentFlag)
     
    346305    WRITE_CODE(sei.m_picSptDpbOutputDuDelay, vui->getHrdParameters()->getDpbOutputDelayDuLengthMinus1() + 1, "pic_spt_dpb_output_du_delay");
    347306  }
    348 #endif
    349307  xWriteByteAlign();
    350308}
     
    361319    WRITE_FLAG( sei.m_rapCpbParamsPresentFlag, "rap_cpb_params_present_flag" );
    362320  }
    363 #if L0328_SPLICING
    364321  WRITE_FLAG( sei.m_concatenationFlag, "concatenation_flag");
    365322  WRITE_CODE( sei.m_auCpbRemovalDelayDelta - 1, ( hrd->getCpbRemovalDelayLengthMinus1() + 1 ), "au_cpb_removal_delay_delta_minus1" );
    366 #endif
    367 #if L0044_CPB_DPB_DELAY_OFFSET
    368323  if( sei.m_rapCpbParamsPresentFlag )
    369324  {
     
    371326    WRITE_CODE( sei.m_dpbDelayOffset, hrd->getDpbOutputDelayLengthMinus1()  + 1, "dpb_delay_offset" );
    372327  }
    373 #endif
    374328  for( nalOrVcl = 0; nalOrVcl < 2; nalOrVcl ++ )
    375329  {
     
    397351  TComHRD *hrd = vui->getHrdParameters();
    398352
    399 #if !L0045_CONDITION_SIGNALLING
    400   // This condition was probably OK before the pic_struct, progressive_source_idc, duplicate_flag were added
    401   if( !hrd->getNalHrdParametersPresentFlag() && !hrd->getVclHrdParametersPresentFlag() )
    402     return;
    403 #endif
    404353  if( vui->getFrameFieldInfoPresentFlag() )
    405354  {
    406355    WRITE_CODE( sei.m_picStruct, 4,              "pic_struct" );
    407 #if L0046_RENAME_PROG_SRC_IDC
    408356    WRITE_CODE( sei.m_sourceScanType, 2,         "source_scan_type" );
    409 #else
    410     WRITE_CODE( sei.m_progressiveSourceIdc, 2,   "progressive_source_idc" );
    411 #endif
    412357    WRITE_FLAG( sei.m_duplicateFlag ? 1 : 0,     "duplicate_flag" );
    413358  }
    414359
    415 #if L0045_CONDITION_SIGNALLING
    416360  if( hrd->getCpbDpbDelaysPresentFlag() )
    417361  {
    418 #endif
    419362    WRITE_CODE( sei.m_auCpbRemovalDelay - 1, ( hrd->getCpbRemovalDelayLengthMinus1() + 1 ),                                         "au_cpb_removal_delay_minus1" );
    420363    WRITE_CODE( sei.m_picDpbOutputDelay, ( hrd->getDpbOutputDelayLengthMinus1() + 1 ),                                          "pic_dpb_output_delay" );
    421 #if L0044_DU_DPB_OUTPUT_DELAY_HRD
    422364    if(hrd->getSubPicCpbParamsPresentFlag())
    423365    {
    424366      WRITE_CODE(sei.m_picDpbOutputDuDelay, hrd->getDpbOutputDelayDuLengthMinus1()+1, "pic_dpb_output_du_delay" );
    425367    }
    426 #endif
    427368    if( hrd->getSubPicCpbParamsPresentFlag() && hrd->getSubPicCpbParamsInPicTimingSEIFlag() )
    428369    {
     
    442383      }
    443384    }
    444 #if L0045_CONDITION_SIGNALLING
    445   }
    446 #endif
     385  }
    447386  xWriteByteAlign();
    448387}
     
    481420
    482421    WRITE_CODE( sei.m_arrangementReservedByte, 8,   "frame_packing_arrangement_reserved_byte" );
    483 #if L0045_PERSISTENCE_FLAGS
    484422    WRITE_FLAG( sei.m_arrangementPersistenceFlag,   "frame_packing_arrangement_persistence_flag" );
    485 #else
    486     WRITE_UVLC( sei.m_arrangementRepetetionPeriod,  "frame_packing_arrangement_repetition_period" );
    487 #endif
    488423  }
    489424
     
    493428}
    494429
    495 #if J0149_TONE_MAPPING_SEI
    496430Void SEIWriter::xWriteSEIToneMappingInfo(const SEIToneMappingInfo& sei)
    497431{
     
    565499  xWriteByteAlign();
    566500}
    567 #endif
    568501
    569502Void SEIWriter::xWriteSEIDisplayOrientation(const SEIDisplayOrientation &sei)
     
    575508    WRITE_FLAG( sei.verFlip,                   "ver_flip" );
    576509    WRITE_CODE( sei.anticlockwiseRotation, 16, "anticlockwise_rotation" );
    577 #if L0045_PERSISTENCE_FLAGS
    578510    WRITE_FLAG( sei.persistenceFlag,          "display_orientation_persistence_flag" );
    579 #else
    580     WRITE_UVLC( sei.repetitionPeriod,          "display_orientation_repetition_period" );
    581 #endif
    582 #if !REMOVE_SINGLE_SEI_EXTENSION_FLAGS
    583     WRITE_FLAG( sei.extensionFlag,             "display_orientation_extension_flag" );
    584     assert( !sei.extensionFlag );
    585 #endif
    586511  }
    587512  xWriteByteAlign();
     
    613538#endif
    614539
    615 #if L0208_SOP_DESCRIPTION_SEI
    616540Void SEIWriter::xWriteSEISOPDescription(const SEISOPDescription& sei)
    617541{
     
    634558  xWriteByteAlign();
    635559}
    636 #endif
    637 
    638 #if K0180_SCALABLE_NESTING_SEI
     560
    639561Void SEIWriter::xWriteSEIScalableNesting(TComBitIf& bs, const SEIScalableNesting& sei, TComSPS *sps)
    640562{
     
    678600  }
    679601}
    680 #endif
    681602
    682603Void SEIWriter::xWriteByteAlign()
Note: See TracChangeset for help on using the changeset viewer.