Changeset 310 in SHVCSoftware for trunk/source/Lib/TLibDecoder


Ignore:
Timestamp:
22 Jul 2013, 21:40:00 (12 years ago)
Author:
seregin
Message:

reintegrate SHM-2.1-dev branch

Location:
trunk
Files:
18 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/source

  • trunk/source/Lib/TLibDecoder/SEIread.cpp

    r191 r310  
    9090    fprintf( g_hTrace, "=========== Decoding Unit Information SEI message ===========\n");
    9191    break;
    92 #if J0149_TONE_MAPPING_SEI
    9392  case SEI::TONE_MAPPING_INFO:
    9493    fprintf( g_hTrace, "===========Tone Mapping Info SEI message ===========\n");
    9594    break;
    96 #endif
    97 #if L0208_SOP_DESCRIPTION_SEI
     95#if M0043_LAYERS_PRESENT_SEI
     96  case SEI::LAYERS_PRESENT:
     97    fprintf( g_hTrace, "=========== Layers Present SEI message ===========\n");
     98    break;
     99#endif
    98100  case SEI::SOP_DESCRIPTION:
    99101    fprintf( g_hTrace, "=========== SOP Description SEI message ===========\n");
    100102    break;
    101 #endif
    102 #if K0180_SCALABLE_NESTING_SEI
    103103  case SEI::SCALABLE_NESTING:
    104104    fprintf( g_hTrace, "=========== Scalable Nesting SEI message ===========\n");
    105105    break;
    106 #endif
    107106  default:
    108107    fprintf( g_hTrace, "=========== Unknown SEI message ===========\n");
     
    115114 * unmarshal a single SEI message from bitstream bs
    116115 */
     116#if M0043_LAYERS_PRESENT_SEI
     117void SEIReader::parseSEImessage(TComInputBitstream* bs, SEIMessages& seis, const NalUnitType nalUnitType, TComVPS *vps, TComSPS *sps)
     118#else
    117119void SEIReader::parseSEImessage(TComInputBitstream* bs, SEIMessages& seis, const NalUnitType nalUnitType, TComSPS *sps)
     120#endif
    118121{
    119122  setBitstream(bs);
     
    122125  do
    123126  {
     127#if M0043_LAYERS_PRESENT_SEI
     128    xReadSEImessage(seis, nalUnitType, vps, sps);
     129#else
    124130    xReadSEImessage(seis, nalUnitType, sps);
     131#endif
    125132    /* SEI messages are an integer number of bytes, something has failed
    126133    * in the parsing if bitstream not byte-aligned */
     
    133140}
    134141
     142#if M0043_LAYERS_PRESENT_SEI
     143Void SEIReader::xReadSEImessage(SEIMessages& seis, const NalUnitType nalUnitType, TComVPS *vps, TComSPS *sps)
     144#else
    135145Void SEIReader::xReadSEImessage(SEIMessages& seis, const NalUnitType nalUnitType, TComSPS *sps)
     146#endif
    136147{
    137148#if ENC_DEC_TRACE
     
    234245      xParseSEIGradualDecodingRefreshInfo((SEIGradualDecodingRefreshInfo&) *sei, payloadSize);
    235246      break;
    236 #if J0149_TONE_MAPPING_SEI
    237247    case SEI::TONE_MAPPING_INFO:
    238248      sei = new SEIToneMappingInfo;
    239249      xParseSEIToneMappingInfo((SEIToneMappingInfo&) *sei, payloadSize);
    240250      break;
    241 #endif
    242 #if L0208_SOP_DESCRIPTION_SEI
     251#if M0043_LAYERS_PRESENT_SEI
     252    case SEI::LAYERS_PRESENT:
     253      if (!vps)
     254      {
     255        printf ("Warning: Found Layers present SEI message, but no active VPS is available. Ignoring.");
     256      }
     257      else
     258      {
     259        sei = new SEILayersPresent;
     260        xParseSEILayersPresent((SEILayersPresent&) *sei, payloadSize, vps);
     261      }
     262      break;
     263#endif
    243264    case SEI::SOP_DESCRIPTION:
    244265      sei = new SEISOPDescription;
    245266      xParseSEISOPDescription((SEISOPDescription&) *sei, payloadSize);
    246267      break;
    247 #endif
    248 #if K0180_SCALABLE_NESTING_SEI
    249268    case SEI::SCALABLE_NESTING:
    250269      sei = new SEIScalableNesting;
     270#if M0043_LAYERS_PRESENT_SEI
     271      xParseSEIScalableNesting((SEIScalableNesting&) *sei, nalUnitType, payloadSize, vps, sps);
     272#else
    251273      xParseSEIScalableNesting((SEIScalableNesting&) *sei, nalUnitType, payloadSize, sps);
    252       break;
    253 #endif
     274#endif
     275      break;
    254276    default:
    255277      for (UInt i = 0; i < payloadSize; i++)
     
    265287    switch (payloadType)
    266288    {
    267 #if L0363_SEI_ALLOW_SUFFIX
    268289      case SEI::USER_DATA_UNREGISTERED:
    269290        sei = new SEIuserDataUnregistered;
    270291        xParseSEIuserDataUnregistered((SEIuserDataUnregistered&) *sei, payloadSize);
    271292        break;
    272 #endif
    273293      case SEI::DECODED_PICTURE_HASH:
    274294        sei = new SEIDecodedPictureHash;
     
    402422  UInt val;
    403423  READ_CODE(4, val, "active_vps_id");      sei.activeVPSId = val;
    404 #if L0047_APS_FLAGS
    405424  READ_FLAG( val, "full_random_access_flag");  sei.m_fullRandomAccessFlag = val ? true : false;
    406425  READ_FLAG( val, "no_param_set_update_flag"); sei.m_noParamSetUpdateFlag = val ? true : false;
    407 #endif
    408426  READ_UVLC(   val, "num_sps_ids_minus1"); sei.numSpsIdsMinus1 = val;
    409427
     
    438456    sei.m_duSptCpbRemovalDelay = 0;
    439457  }
    440 #if L0044_DU_DPB_OUTPUT_DELAY_HRD
    441458  READ_FLAG( val, "dpb_output_du_delay_present_flag"); sei.m_dpbOutputDuDelayPresentFlag = val ? true : false;
    442459  if(sei.m_dpbOutputDuDelayPresentFlag)
     
    445462    sei.m_picSptDpbOutputDuDelay = val;
    446463  }
    447 #endif
    448464  xParseByteAlign();
    449465}
     
    462478    READ_FLAG( code, "rap_cpb_params_present_flag" );                   sei.m_rapCpbParamsPresentFlag = code;
    463479  }
    464 #if L0328_SPLICING
    465480  //read splicing flag and cpb_removal_delay_delta
    466481  READ_FLAG( code, "concatenation_flag");
     
    468483  READ_CODE( ( pHRD->getCpbRemovalDelayLengthMinus1() + 1 ), code, "au_cpb_removal_delay_delta_minus1" );
    469484  sei.m_auCpbRemovalDelayDelta = code + 1;
    470 #endif
    471 #if L0044_CPB_DPB_DELAY_OFFSET
    472485  if( sei.m_rapCpbParamsPresentFlag )
    473486  {
     
    475488    READ_CODE( pHRD->getDpbOutputDelayLengthMinus1()  + 1, code, "dpb_delay_offset" );      sei.m_dpbDelayOffset = code;
    476489  }
    477 #endif
    478490  for( nalOrVcl = 0; nalOrVcl < 2; nalOrVcl ++ )
    479491  {
     
    507519  TComHRD *hrd = vui->getHrdParameters();
    508520
    509 #if !L0045_CONDITION_SIGNALLING
    510   // This condition was probably OK before the pic_struct, progressive_source_idc, duplicate_flag were added
    511   if( !hrd->getNalHrdParametersPresentFlag() && !hrd->getVclHrdParametersPresentFlag() )
    512   {
    513     return;
    514   }
    515 #endif
    516 
    517521  if( vui->getFrameFieldInfoPresentFlag() )
    518522  {
    519523    READ_CODE( 4, code, "pic_struct" );             sei.m_picStruct            = code;
    520 #if L0046_RENAME_PROG_SRC_IDC
    521524    READ_CODE( 2, code, "source_scan_type" );       sei.m_sourceScanType = code;
    522 #else
    523     READ_CODE( 2, code, "progressive_source_idc" ); sei.m_progressiveSourceIdc = code;
    524 #endif
    525525    READ_FLAG(    code, "duplicate_flag" );         sei.m_duplicateFlag        = ( code == 1 ? true : false );
    526526  }
    527527
    528 #if L0045_CONDITION_SIGNALLING
    529528  if( hrd->getCpbDpbDelaysPresentFlag())
    530529  {
    531 #endif
    532530    READ_CODE( ( hrd->getCpbRemovalDelayLengthMinus1() + 1 ), code, "au_cpb_removal_delay_minus1" );
    533531    sei.m_auCpbRemovalDelay = code + 1;
     
    535533    sei.m_picDpbOutputDelay = code;
    536534
    537 #if L0044_DU_DPB_OUTPUT_DELAY_HRD
    538535    if(hrd->getSubPicCpbParamsPresentFlag())
    539536    {
     
    541538      sei.m_picDpbOutputDuDelay = code;
    542539    }
    543 #endif
    544540    if( hrd->getSubPicCpbParamsPresentFlag() && hrd->getSubPicCpbParamsInPicTimingSEIFlag() )
    545541    {
     
    575571      }
    576572    }
    577 #if L0045_CONDITION_SIGNALLING
    578   }
    579 #endif
     573  }
    580574  xParseByteAlign();
    581575}
     
    598592  {
    599593    READ_CODE( 7, val, "frame_packing_arrangement_type" );          sei.m_arrangementType = val;
    600 #if L0444_FPA_TYPE
    601594    assert((sei.m_arrangementType > 2) && (sei.m_arrangementType < 6) );
    602 #endif
    603595    READ_FLAG( val, "quincunx_sampling_flag" );                     sei.m_quincunxSamplingFlag = val;
    604596
     
    620612
    621613    READ_CODE( 8, val, "frame_packing_arrangement_reserved_byte" );   sei.m_arrangementReservedByte = val;
    622 #if L0045_PERSISTENCE_FLAGS
    623614    READ_FLAG( val,  "frame_packing_arrangement_persistence_flag" );  sei.m_arrangementPersistenceFlag = val ? true : false;
    624 #else
    625     READ_UVLC( val, "frame_packing_arrangement_repetition_period" );  sei.m_arrangementRepetetionPeriod = val;
    626 #endif
    627615  }
    628616  READ_FLAG( val, "upsampled_aspect_ratio" );                       sei.m_upsampledAspectRatio = val;
     
    640628    READ_FLAG( val,     "ver_flip" );                              sei.verFlip               = val;
    641629    READ_CODE( 16, val, "anticlockwise_rotation" );                sei.anticlockwiseRotation = val;
    642 #if L0045_PERSISTENCE_FLAGS
    643630    READ_FLAG( val,     "display_orientation_persistence_flag" );  sei.persistenceFlag       = val;
    644 #else
    645     READ_UVLC( val,     "display_orientation_repetition_period" ); sei.repetitionPeriod      = val;
    646 #endif
    647 #if !REMOVE_SINGLE_SEI_EXTENSION_FLAGS
    648     READ_FLAG( val,     "display_orientation_extension_flag" );    sei.extensionFlag         = val;
    649     assert( !sei.extensionFlag );
    650 #endif
    651631  }
    652632  xParseByteAlign();
     
    668648}
    669649
    670 #if J0149_TONE_MAPPING_SEI
    671650Void SEIReader::xParseSEIToneMappingInfo(SEIToneMappingInfo& sei, UInt /*payloadSize*/)
    672651{
     
    749728  xParseByteAlign();
    750729}
    751 #endif
    752 
    753 #if L0208_SOP_DESCRIPTION_SEI
     730
     731#if M0043_LAYERS_PRESENT_SEI
     732Void SEIReader::xParseSEILayersPresent(SEILayersPresent &sei, UInt payloadSize, TComVPS *vps)
     733{
     734  UInt uiCode;
     735  UInt i = 0;
     736
     737  READ_UVLC( uiCode,           "lp_sei_active_vps_id" ); sei.m_activeVpsId = uiCode;
     738  assert(vps->getVPSId() == sei.m_activeVpsId);
     739  sei.m_vpsMaxLayers = vps->getMaxLayers();
     740  for (; i < sei.m_vpsMaxLayers; i++)
     741  {
     742    READ_FLAG( uiCode,         "layer_present_flag"   ); sei.m_layerPresentFlag[i] = uiCode ? true : false;
     743  }
     744  for (; i < MAX_LAYERS; i++)
     745  {
     746    sei.m_layerPresentFlag[i] = false;
     747  }
     748  xParseByteAlign();
     749}
     750#endif
     751
    754752Void SEIReader::xParseSEISOPDescription(SEISOPDescription &sei, UInt payloadSize)
    755753{
     
    775773  xParseByteAlign();
    776774}
    777 #endif
    778 
    779 #if K0180_SCALABLE_NESTING_SEI
     775
     776#if M0043_LAYERS_PRESENT_SEI
     777Void SEIReader::xParseSEIScalableNesting(SEIScalableNesting& sei, const NalUnitType nalUnitType, UInt payloadSize, TComVPS *vps, TComSPS *sps)
     778#else
    780779Void SEIReader::xParseSEIScalableNesting(SEIScalableNesting& sei, const NalUnitType nalUnitType, UInt payloadSize, TComSPS *sps)
     780#endif
    781781{
    782782  UInt uiCode;
     
    820820  // read nested SEI messages
    821821  do {
     822#if M0043_LAYERS_PRESENT_SEI
     823    xReadSEImessage(sei.m_nestedSEIs, nalUnitType, vps, sps);
     824#else
    822825    xReadSEImessage(sei.m_nestedSEIs, nalUnitType, sps);
     826#endif
    823827  } while (m_pcBitstream->getNumBitsLeft() > 8);
    824828
    825829}
    826 #endif
    827830
    828831Void SEIReader::xParseByteAlign()
  • trunk/source/Lib/TLibDecoder/SEIread.h

    r191 r310  
    5656  SEIReader() {};
    5757  virtual ~SEIReader() {};
     58#if M0043_LAYERS_PRESENT_SEI
     59  Void parseSEImessage(TComInputBitstream* bs, SEIMessages& seis, const NalUnitType nalUnitType, TComVPS *vps, TComSPS *sps);
     60#else
    5861  Void parseSEImessage(TComInputBitstream* bs, SEIMessages& seis, const NalUnitType nalUnitType, TComSPS *sps);
     62#endif
    5963protected:
     64#if M0043_LAYERS_PRESENT_SEI
     65  Void xReadSEImessage                (SEIMessages& seis, const NalUnitType nalUnitType, TComVPS *vps, TComSPS *sps);
     66#else
    6067  Void xReadSEImessage                (SEIMessages& seis, const NalUnitType nalUnitType, TComSPS *sps);
     68#endif
    6169  Void xParseSEIuserDataUnregistered  (SEIuserDataUnregistered &sei, UInt payloadSize);
    6270  Void xParseSEIActiveParameterSets   (SEIActiveParameterSets  &sei, UInt payloadSize);
     
    7078  Void xParseSEITemporalLevel0Index   (SEITemporalLevel0Index &sei, UInt payloadSize);
    7179  Void xParseSEIGradualDecodingRefreshInfo (SEIGradualDecodingRefreshInfo &sei, UInt payloadSize);
    72 #if J0149_TONE_MAPPING_SEI
    7380  Void xParseSEIToneMappingInfo       (SEIToneMappingInfo& sei, UInt payloadSize);
    74 #endif
    75 #if L0208_SOP_DESCRIPTION_SEI
    7681  Void xParseSEISOPDescription        (SEISOPDescription &sei, UInt payloadSize);
    77 #endif
    78 #if K0180_SCALABLE_NESTING_SEI
     82#if M0043_LAYERS_PRESENT_SEI
     83  Void xParseSEILayersPresent         (SEILayersPresent &sei, UInt payloadSize, TComVPS *vps);
     84  Void xParseSEIScalableNesting       (SEIScalableNesting& sei, const NalUnitType nalUnitType, UInt payloadSize, TComVPS *vps, TComSPS *sps);
     85#else
    7986  Void xParseSEIScalableNesting       (SEIScalableNesting& sei, const NalUnitType nalUnitType, UInt payloadSize, TComSPS *sps);
    8087#endif
  • trunk/source/Lib/TLibDecoder/TDecBinCoder.h

    r191 r310  
    5454  virtual Void  start             ()                                          = 0;
    5555  virtual Void  finish            ()                                          = 0;
    56   virtual Void  flush            ()                                           = 0;
    5756
    5857  virtual Void  decodeBin         ( UInt& ruiBin, ContextModel& rcCtxModel )  = 0;
     
    6160  virtual Void  decodeBinTrm      ( UInt& ruiBin                           )  = 0;
    6261 
    63   virtual Void  resetBac          ()                                          = 0;
    64   virtual Void  decodePCMAlignBits()                                          = 0;
    6562  virtual Void  xReadPCMCode      ( UInt uiLength, UInt& ruiCode)              = 0;
    6663
  • trunk/source/Lib/TLibDecoder/TDecBinCoderCABAC.cpp

    r191 r310  
    7575TDecBinCABAC::finish()
    7676{
    77 }
    78 
    79 Void
    80 TDecBinCABAC::flush()
    81 {
    82   while (m_pcTComBitstream->getNumBitsLeft() > 0 && m_pcTComBitstream->getNumBitsUntilByteAligned() != 0)
    83   {
    84     UInt uiBits;
    85     m_pcTComBitstream->read ( 1, uiBits );
    86   }
    87   start();
     77  UInt lastByte;
     78
     79  m_pcTComBitstream->peekPreviousByte( lastByte );
     80  // Check for proper stop/alignment pattern
     81  assert( ((lastByte << (8 + m_bitsNeeded)) & 0xff) == 0x80 );
    8882}
    8983
     
    241235}
    242236
    243 /** Reset BAC register values.
    244  * \returns Void
    245  */
    246 Void TDecBinCABAC::resetBac()
    247 {
    248   m_uiRange    = 510;
    249   m_bitsNeeded = -8;
    250   m_uiValue    = m_pcTComBitstream->read( 16 );
    251 }
    252 
    253 /** Decode PCM alignment zero bits.
    254  * \returns Void
    255  */
    256 Void TDecBinCABAC::decodePCMAlignBits()
    257 {
    258   Int iNum = m_pcTComBitstream->getNumBitsUntilByteAligned();
    259  
    260   UInt uiBit = 0;
    261   m_pcTComBitstream->read( iNum, uiBit );
    262 }
    263 
    264237/** Read a PCM code.
    265238 * \param uiLength code bit-depth
  • trunk/source/Lib/TLibDecoder/TDecBinCoderCABAC.h

    r191 r310  
    5656  Void  start             ();
    5757  Void  finish            ();
    58   Void  flush             ();
    5958 
    6059  Void  decodeBin         ( UInt& ruiBin, ContextModel& rcCtxModel );
     
    6362  Void  decodeBinTrm      ( UInt& ruiBin                           );
    6463 
    65   Void  resetBac          ();
    66   Void  decodePCMAlignBits();
    6764  Void  xReadPCMCode      ( UInt uiLength, UInt& ruiCode );
    6865 
  • trunk/source/Lib/TLibDecoder/TDecCAVLC.cpp

    r191 r310  
    22* License, included below. This software may be subject to other third party
    33* and contributor rights, including patent rights, and no such rights are
    4 * granted under this license. 
     4* granted under this license.
    55*
    66* Copyright (c) 2010-2013, ITU/ISO/IEC
     
    9393  }
    9494
    95   if (interRPSPred) 
     95  if (interRPSPred)
    9696  {
    9797    UInt bit;
     
    114114    for(Int j=0 ; j <= rpsRef->getNumberOfPictures(); j++)
    115115    {
    116       READ_CODE(1, bit, "used_by_curr_pic_flag" ); //first bit is "1" if Idc is 1 
     116      READ_CODE(1, bit, "used_by_curr_pic_flag" ); //first bit is "1" if Idc is 1
    117117      Int refIdc = bit;
    118       if (refIdc == 0) 
     118      if (refIdc == 0)
    119119      {
    120120        READ_CODE(1, bit, "use_delta_flag" ); //second bit is "1" if Idc is 2, "0" otherwise.
     
    131131          k0++;
    132132        }
    133         else 
     133        else
    134134        {
    135135          k1++;
    136136        }
    137137        k++;
    138       } 
    139       rps->setRefIdc(j,refIdc); 
    140     }
    141     rps->setNumRefIdc(rpsRef->getNumberOfPictures()+1); 
     138      }
     139      rps->setRefIdc(j,refIdc);
     140    }
     141    rps->setNumRefIdc(rpsRef->getNumberOfPictures()+1);
    142142    rps->setNumberOfPictures(k);
    143143    rps->setNumberOfNegativePictures(k0);
     
    175175}
    176176
    177 /** copy SAO parameter
    178 * \param dst 
    179 * \param src
    180 */
    181 inline Void copySaoOneLcuParam(SaoLcuParam* dst,  SaoLcuParam* src)
    182 {
    183   Int i;
    184   dst->partIdx = src->partIdx;
    185   dst->typeIdx = src->typeIdx;
    186   if (dst->typeIdx != -1)
    187   {
    188     dst->subTypeIdx = src->subTypeIdx ;
    189     dst->length  = src->length;
    190     for (i=0;i<dst->length;i++)
    191     {
    192       dst->offset[i] = src->offset[i];
    193     }
    194   }
    195   else
    196   {
    197     dst->length  = 0;
    198     for (i=0;i<SAO_BO_LEN;i++)
    199     {
    200       dst->offset[i] = 0;
    201     }
    202   }
    203 }
    204 
    205177Void TDecCavlc::parsePPS(TComPPS* pcPPS)
    206178{
    207 #if ENC_DEC_TRACE 
     179#if ENC_DEC_TRACE
    208180  xTracePPSHeader (pcPPS);
    209181#endif
     
    212184  Int   iCode;
    213185
    214   READ_UVLC( uiCode, "pps_pic_parameter_set_id");                     pcPPS->setPPSId (uiCode);
    215   READ_UVLC( uiCode, "pps_seq_parameter_set_id");                     pcPPS->setSPSId (uiCode);
     186  READ_UVLC( uiCode, "pps_pic_parameter_set_id");
     187  assert(uiCode <= 63);
     188  pcPPS->setPPSId (uiCode);
     189 
     190  READ_UVLC( uiCode, "pps_seq_parameter_set_id");
     191  assert(uiCode <= 15);
     192  pcPPS->setSPSId (uiCode);
     193 
    216194  READ_FLAG( uiCode, "dependent_slice_segments_enabled_flag"    );    pcPPS->setDependentSliceSegmentsEnabledFlag   ( uiCode == 1 );
    217 #if L0255_MOVE_PPS_FLAGS
    218195  READ_FLAG( uiCode, "output_flag_present_flag" );                    pcPPS->setOutputFlagPresentFlag( uiCode==1 );
    219196
    220197  READ_CODE(3, uiCode, "num_extra_slice_header_bits");                pcPPS->setNumExtraSliceHeaderBits(uiCode);
    221 #endif
    222198  READ_FLAG ( uiCode, "sign_data_hiding_flag" ); pcPPS->setSignHideFlag( uiCode );
    223199
    224200  READ_FLAG( uiCode,   "cabac_init_present_flag" );            pcPPS->setCabacInitPresentFlag( uiCode ? true : false );
    225201
    226 #if L0323_LIMIT_DEFAULT_LIST_SIZE
    227202  READ_UVLC(uiCode, "num_ref_idx_l0_default_active_minus1");
    228203  assert(uiCode <= 14);
    229204  pcPPS->setNumRefIdxL0DefaultActive(uiCode+1);
    230  
     205
    231206  READ_UVLC(uiCode, "num_ref_idx_l1_default_active_minus1");
    232207  assert(uiCode <= 14);
    233208  pcPPS->setNumRefIdxL1DefaultActive(uiCode+1);
    234 #else
    235   READ_UVLC(uiCode, "num_ref_idx_l0_default_active_minus1");       pcPPS->setNumRefIdxL0DefaultActive(uiCode+1);
    236   READ_UVLC(uiCode, "num_ref_idx_l1_default_active_minus1");       pcPPS->setNumRefIdxL1DefaultActive(uiCode+1);
    237 #endif
    238  
     209
    239210  READ_SVLC(iCode, "init_qp_minus26" );                            pcPPS->setPicInitQPMinus26(iCode);
    240211  READ_FLAG( uiCode, "constrained_intra_pred_flag" );              pcPPS->setConstrainedIntraPred( uiCode ? true : false );
    241   READ_FLAG( uiCode, "transform_skip_enabled_flag" );               
    242   pcPPS->setUseTransformSkip ( uiCode ? true : false ); 
     212  READ_FLAG( uiCode, "transform_skip_enabled_flag" );
     213  pcPPS->setUseTransformSkip ( uiCode ? true : false );
    243214
    244215  READ_FLAG( uiCode, "cu_qp_delta_enabled_flag" );            pcPPS->setUseDQP( uiCode ? true : false );
     
    270241  pcPPS->setWPBiPred( uiCode==1 );
    271242
    272 #if !L0255_MOVE_PPS_FLAGS
    273   READ_FLAG( uiCode, "output_flag_present_flag" );
    274   pcPPS->setOutputFlagPresentFlag( uiCode==1 );
    275 #endif
    276243  READ_FLAG( uiCode, "transquant_bypass_enable_flag");
    277244  pcPPS->setTransquantBypassEnableFlag(uiCode ? true : false);
    278245  READ_FLAG( uiCode, "tiles_enabled_flag"               );    pcPPS->setTilesEnabledFlag            ( uiCode == 1 );
    279246  READ_FLAG( uiCode, "entropy_coding_sync_enabled_flag" );    pcPPS->setEntropyCodingSyncEnabledFlag( uiCode == 1 );
    280  
     247
    281248  if( pcPPS->getTilesEnabledFlag() )
    282249  {
    283     READ_UVLC ( uiCode, "num_tile_columns_minus1" );                pcPPS->setNumColumnsMinus1( uiCode ); 
    284     READ_UVLC ( uiCode, "num_tile_rows_minus1" );                   pcPPS->setNumRowsMinus1( uiCode ); 
     250    READ_UVLC ( uiCode, "num_tile_columns_minus1" );                pcPPS->setNumColumnsMinus1( uiCode );
     251    READ_UVLC ( uiCode, "num_tile_rows_minus1" );                   pcPPS->setNumRowsMinus1( uiCode );
    285252    READ_FLAG ( uiCode, "uniform_spacing_flag" );                   pcPPS->setUniformSpacingFlag( uiCode );
    286253
     
    289256      UInt* columnWidth = (UInt*)malloc(pcPPS->getNumColumnsMinus1()*sizeof(UInt));
    290257      for(UInt i=0; i<pcPPS->getNumColumnsMinus1(); i++)
    291       { 
    292         READ_UVLC( uiCode, "column_width_minus1" ); 
     258      {
     259        READ_UVLC( uiCode, "column_width_minus1" );
    293260        columnWidth[i] = uiCode+1;
    294261      }
     
    303270      }
    304271      pcPPS->setRowHeight(rowHeight);
    305       free(rowHeight); 
     272      free(rowHeight);
    306273    }
    307274
     
    335302  pcPPS->setLog2ParallelMergeLevelMinus2 (uiCode);
    336303
    337 #if !L0255_MOVE_PPS_FLAGS
    338   READ_CODE(3, uiCode, "num_extra_slice_header_bits");
    339   pcPPS->setNumExtraSliceHeaderBits(uiCode);
    340 #endif
    341304  READ_FLAG( uiCode, "slice_segment_header_extension_present_flag");
    342305  pcPPS->setSliceHeaderExtensionPresentFlag(uiCode);
     
    400363
    401364  READ_FLAG(     uiCode, "field_seq_flag");                           pcVUI->setFieldSeqFlag(uiCode);
    402   assert(pcVUI->getFieldSeqFlag() == false);        // not supported yet
    403365
    404366  READ_FLAG(uiCode, "frame_field_info_present_flag");                 pcVUI->setFrameFieldInfoPresentFlag(uiCode);
     
    413375    READ_UVLC(   uiCode, "def_disp_win_bottom_offset" );              defDisp.setWindowBottomOffset( uiCode * TComSPS::getWinUnitY( pcSPS->getChromaFormatIdc()) );
    414376  }
    415 #if L0043_TIMING_INFO
    416377  TimingInfo *timingInfo = pcVUI->getTimingInfo();
    417378  READ_FLAG(       uiCode, "vui_timing_info_present_flag");         timingInfo->setTimingInfoPresentFlag      (uiCode ? true : false);
     
    425386      READ_UVLC(   uiCode, "vui_num_ticks_poc_diff_one_minus1");    timingInfo->setNumTicksPocDiffOneMinus1   (uiCode);
    426387    }
    427 #endif 
    428388  READ_FLAG(     uiCode, "hrd_parameters_present_flag");              pcVUI->setHrdParametersPresentFlag(uiCode);
    429389  if( pcVUI->getHrdParametersPresentFlag() )
     
    431391    parseHrdParameters( pcVUI->getHrdParameters(), 1, pcSPS->getMaxTLayers() - 1 );
    432392  }
    433 #if L0043_TIMING_INFO
    434   }
    435 #endif
    436 #if !L0043_TIMING_INFO
    437   READ_FLAG( uiCode, "poc_proportional_to_timing_flag" ); pcVUI->setPocProportionalToTimingFlag(uiCode ? true : false);
    438   if( pcVUI->getPocProportionalToTimingFlag() && pcVUI->getHrdParameters()->getTimingInfoPresentFlag() )
    439   {
    440     READ_UVLC( uiCode, "num_ticks_poc_diff_one_minus1" ); pcVUI->setNumTicksPocDiffOneMinus1(uiCode);
    441   }
    442 #endif
     393  }
    443394  READ_FLAG(     uiCode, "bitstream_restriction_flag");               pcVUI->setBitstreamRestrictionFlag(uiCode);
    444395  if (pcVUI->getBitstreamRestrictionFlag())
    445396  {
    446397    READ_FLAG(   uiCode, "tiles_fixed_structure_flag");               pcVUI->setTilesFixedStructureFlag(uiCode);
     398#if M0464_TILE_BOUNDARY_ALIGNED_FLAG
     399    if ( pcSPS->getLayerId() > 0 )
     400    {
     401      READ_FLAG( uiCode, "tile_boundaries_aligned_flag" ); pcVUI->setTileBoundariesAlignedFlag( uiCode == 1 );
     402    }
     403#endif
    447404    READ_FLAG(   uiCode, "motion_vectors_over_pic_boundaries_flag");  pcVUI->setMotionVectorsOverPicBoundariesFlag(uiCode);
    448405    READ_FLAG(   uiCode, "restricted_ref_pic_lists_flag");            pcVUI->setRestrictedRefPicListsFlag(uiCode);
    449 #if L0043_MSS_IDC
    450406    READ_UVLC( uiCode, "min_spatial_segmentation_idc");            pcVUI->setMinSpatialSegmentationIdc(uiCode);
    451407    assert(uiCode < 4096);
    452 #else
    453     READ_CODE( 8, uiCode, "min_spatial_segmentation_idc");            pcVUI->setMinSpatialSegmentationIdc(uiCode);
    454 #endif
    455408    READ_UVLC(   uiCode, "max_bytes_per_pic_denom" );                 pcVUI->setMaxBytesPerPicDenom(uiCode);
    456409    READ_UVLC(   uiCode, "max_bits_per_mincu_denom" );                pcVUI->setMaxBitsPerMinCuDenom(uiCode);
     
    465418  if( commonInfPresentFlag )
    466419  {
    467 #if !L0043_TIMING_INFO
    468     READ_FLAG( uiCode, "timing_info_present_flag" );                  hrd->setTimingInfoPresentFlag( uiCode == 1 ? true : false );
    469     if( hrd->getTimingInfoPresentFlag() )
    470     {
    471       READ_CODE( 32, uiCode, "num_units_in_tick" );                   hrd->setNumUnitsInTick( uiCode );
    472       READ_CODE( 32, uiCode, "time_scale" );                          hrd->setTimeScale( uiCode );
    473     }
    474 #endif
    475420    READ_FLAG( uiCode, "nal_hrd_parameters_present_flag" );           hrd->setNalHrdParametersPresentFlag( uiCode == 1 ? true : false );
    476421    READ_FLAG( uiCode, "vcl_hrd_parameters_present_flag" );           hrd->setVclHrdParametersPresentFlag( uiCode == 1 ? true : false );
     
    483428        READ_CODE( 5, uiCode, "du_cpb_removal_delay_length_minus1" ); hrd->setDuCpbRemovalDelayLengthMinus1( uiCode );
    484429        READ_FLAG( uiCode, "sub_pic_cpb_params_in_pic_timing_sei_flag" ); hrd->setSubPicCpbParamsInPicTimingSEIFlag( uiCode == 1 ? true : false );
    485 #if L0044_DU_DPB_OUTPUT_DELAY_HRD
    486430        READ_CODE( 5, uiCode, "dpb_output_delay_du_length_minus1"  ); hrd->setDpbOutputDelayDuLengthMinus1( uiCode );
    487 #endif
    488431      }
    489432      READ_CODE( 4, uiCode, "bit_rate_scale" );                       hrd->setBitRateScale( uiCode );
     
    510453      hrd->setFixedPicRateWithinCvsFlag( i, true );
    511454    }
    512 #if L0372
    513455    hrd->setLowDelayHrdFlag( i, 0 ); // Infered to be 0 when not present
    514456    hrd->setCpbCntMinus1   ( i, 0 ); // Infered to be 0 when not present
    515 #endif
    516457    if( hrd->getFixedPicRateWithinCvsFlag( i ) )
    517458    {
    518459      READ_UVLC( uiCode, "elemental_duration_in_tc_minus1" );             hrd->setPicDurationInTcMinus1( i, uiCode );
    519460    }
    520 #if L0372
    521461    else
    522     {     
     462    {
    523463      READ_FLAG( uiCode, "low_delay_hrd_flag" );                      hrd->setLowDelayHrdFlag( i, uiCode == 1 ? true : false  );
    524464    }
    525465    if (!hrd->getLowDelayHrdFlag( i ))
    526466    {
    527       READ_UVLC( uiCode, "cpb_cnt_minus1" );                          hrd->setCpbCntMinus1( i, uiCode );     
    528     }
    529 #else
    530     READ_FLAG( uiCode, "low_delay_hrd_flag" );                      hrd->setLowDelayHrdFlag( i, uiCode == 1 ? true : false  );
    531     READ_UVLC( uiCode, "cpb_cnt_minus1" );                          hrd->setCpbCntMinus1( i, uiCode );
    532 #endif
     467      READ_UVLC( uiCode, "cpb_cnt_minus1" );                          hrd->setCpbCntMinus1( i, uiCode );
     468    }
    533469    for( nalOrVcl = 0; nalOrVcl < 2; nalOrVcl ++ )
    534470    {
     
    542478          if( hrd->getSubPicCpbParamsPresentFlag() )
    543479          {
    544 #if L0363_DU_BIT_RATE
     480            READ_UVLC( uiCode, "cpb_size_du_value_minus1" );       hrd->setDuCpbSizeValueMinus1( i, j, nalOrVcl, uiCode );
    545481            READ_UVLC( uiCode, "bit_rate_du_value_minus1" );       hrd->setDuBitRateValueMinus1( i, j, nalOrVcl, uiCode );
    546 #endif
    547             READ_UVLC( uiCode, "cpb_size_du_value_minus1" );       hrd->setDuCpbSizeValueMinus1( i, j, nalOrVcl, uiCode );
    548482          }
    549483          READ_FLAG( uiCode, "cbr_flag" );                          hrd->setCbrFlag( i, j, nalOrVcl, uiCode == 1 ? true : false  );
     
    554488}
    555489
     490#if SPS_SUB_LAYER_INFO
     491Void TDecCavlc::parseSPS(TComSPS* pcSPS, ParameterSetManagerDecoder *parameterSetManager)
     492#else
    556493Void TDecCavlc::parseSPS(TComSPS* pcSPS)
    557 {
    558 #if ENC_DEC_TRACE 
     494#endif
     495{
     496#if ENC_DEC_TRACE
    559497  xTraceSPSHeader (pcSPS);
    560498#endif
     
    562500  UInt  uiCode;
    563501  READ_CODE( 4,  uiCode, "sps_video_parameter_set_id");          pcSPS->setVPSId        ( uiCode );
    564   READ_CODE( 3,  uiCode, "sps_max_sub_layers_minus1" );          pcSPS->setMaxTLayers   ( uiCode+1 );
    565   READ_FLAG( uiCode, "sps_temporal_id_nesting_flag" );               pcSPS->setTemporalIdNestingFlag ( uiCode > 0 ? true : false );
     502#if SPS_SUB_LAYER_INFO
     503  if(pcSPS->getLayerId() == 0)
     504  {
     505#endif
     506    READ_CODE( 3,  uiCode, "sps_max_sub_layers_minus1" );          pcSPS->setMaxTLayers   ( uiCode+1 );
     507    assert(uiCode <= 6);
     508 
     509    READ_FLAG( uiCode, "sps_temporal_id_nesting_flag" );               pcSPS->setTemporalIdNestingFlag ( uiCode > 0 ? true : false );
     510#if SPS_SUB_LAYER_INFO
     511  }
     512  else
     513  {
     514    pcSPS->setMaxTLayers           ( parameterSetManager->getPrefetchedVPS(pcSPS->getVPSId())->getMaxTLayers()          );
     515    pcSPS->setTemporalIdNestingFlag( parameterSetManager->getPrefetchedVPS(pcSPS->getVPSId())->getTemporalNestingFlag() );
     516  }
     517#endif
    566518  if ( pcSPS->getMaxTLayers() == 1 )
    567519  {
    568520    // sps_temporal_id_nesting_flag must be 1 when sps_max_sub_layers_minus1 is 0
     521#if SPS_SUB_LAYER_INFO
     522    assert( pcSPS->getTemporalIdNestingFlag() == true );
     523#else
    569524    assert( uiCode == 1 );
    570   }
    571  
     525#endif
     526  }
     527
    572528  parsePTL(pcSPS->getPTL(), 1, pcSPS->getMaxTLayers() - 1);
    573529  READ_UVLC(     uiCode, "sps_seq_parameter_set_id" );           pcSPS->setSPSId( uiCode );
     530  assert(uiCode <= 15);
     531 
    574532  READ_UVLC(     uiCode, "chroma_format_idc" );                  pcSPS->setChromaFormatIdc( uiCode );
     533  assert(uiCode <= 3);
    575534  // in the first version we only support chroma_format_idc equal to 1 (4:2:0), so separate_colour_plane_flag cannot appear in the bitstream
    576535  assert (uiCode == 1);
     
    593552
    594553  READ_UVLC(     uiCode, "bit_depth_luma_minus8" );
     554  assert(uiCode <= 6);
    595555  pcSPS->setBitDepthY( uiCode + 8 );
    596556  pcSPS->setQpBDOffsetY( (Int) (6*uiCode) );
    597557
    598558  READ_UVLC( uiCode,    "bit_depth_chroma_minus8" );
     559  assert(uiCode <= 6);
    599560  pcSPS->setBitDepthC( uiCode + 8 );
    600561  pcSPS->setQpBDOffsetC( (Int) (6*uiCode) );
    601562
    602563  READ_UVLC( uiCode,    "log2_max_pic_order_cnt_lsb_minus4" );   pcSPS->setBitsForPOC( 4 + uiCode );
     564  assert(uiCode <= 12);
    603565
    604566  UInt subLayerOrderingInfoPresentFlag;
    605567  READ_FLAG(subLayerOrderingInfoPresentFlag, "sps_sub_layer_ordering_info_present_flag");
     568 
    606569  for(UInt i=0; i <= pcSPS->getMaxTLayers()-1; i++)
    607570  {
    608 #if L0323_DPB
    609571    READ_UVLC ( uiCode, "sps_max_dec_pic_buffering_minus1");
    610572    pcSPS->setMaxDecPicBuffering( uiCode + 1, i);
    611 #else
    612     READ_UVLC ( uiCode, "sps_max_dec_pic_buffering");
    613     pcSPS->setMaxDecPicBuffering( uiCode, i);
    614 #endif
    615573    READ_UVLC ( uiCode, "sps_num_reorder_pics" );
    616574    pcSPS->setNumReorderPics(uiCode, i);
    617     READ_UVLC ( uiCode, "sps_max_latency_increase");
     575    READ_UVLC ( uiCode, "sps_max_latency_increase_plus1");
    618576    pcSPS->setMaxLatencyIncrease( uiCode, i );
    619577
     
    636594  pcSPS->setLog2DiffMaxMinCodingBlockSize(uiCode);
    637595  Int maxCUDepthDelta = uiCode;
    638   pcSPS->setMaxCUWidth  ( 1<<(log2MinCUSize + maxCUDepthDelta) ); 
     596  pcSPS->setMaxCUWidth  ( 1<<(log2MinCUSize + maxCUDepthDelta) );
    639597  pcSPS->setMaxCUHeight ( 1<<(log2MinCUSize + maxCUDepthDelta) );
    640598  READ_UVLC( uiCode, "log2_min_transform_block_size_minus2" );   pcSPS->setQuadtreeTULog2MinSize( uiCode + 2 );
     
    647605
    648606  Int addCuDepth = max (0, log2MinCUSize - (Int)pcSPS->getQuadtreeTULog2MinSize() );
    649   pcSPS->setMaxCUDepth( maxCUDepthDelta + addCuDepth ); 
     607  pcSPS->setMaxCUDepth( maxCUDepthDelta + addCuDepth );
    650608
    651609  READ_FLAG( uiCode, "scaling_list_enabled_flag" );                 pcSPS->setScalingListFlag ( uiCode );
     
    672630
    673631  READ_UVLC( uiCode, "num_short_term_ref_pic_sets" );
     632  assert(uiCode <= 64);
    674633  pcSPS->createRPSList(uiCode);
    675634
     
    683642  }
    684643  READ_FLAG( uiCode, "long_term_ref_pics_present_flag" );          pcSPS->setLongTermRefsPresent(uiCode);
    685   if (pcSPS->getLongTermRefsPresent()) 
     644  if (pcSPS->getLongTermRefsPresent())
    686645  {
    687646    READ_UVLC( uiCode, "num_long_term_ref_pic_sps" );
     
    697656  READ_FLAG( uiCode, "sps_temporal_mvp_enable_flag" );            pcSPS->setTMVPFlagsPresent(uiCode);
    698657#if REF_IDX_MFM
     658#if !M0457_COL_PICTURE_SIGNALING
    699659  if(pcSPS->getLayerId() > 0)
    700660  {
     
    703663  }
    704664#endif
     665#endif
    705666  READ_FLAG( uiCode, "sps_strong_intra_smoothing_enable_flag" );  pcSPS->setUseStrongIntraSmoothing(uiCode);
    706667
     
    711672    parseVUI(pcSPS->getVuiParameters(), pcSPS);
    712673  }
    713 
    714 #if SCALED_REF_LAYER_OFFSETS
    715   if( pcSPS->getLayerId() > 0 )
    716   {
    717     Int iCode;
    718     Window& scaledWindow = pcSPS->getScaledRefLayerWindow();
    719     READ_SVLC( iCode, "scaled_ref_layer_left_offset" );    scaledWindow.setWindowLeftOffset  (iCode << 1);
    720     READ_SVLC( iCode, "scaled_ref_layer_top_offset" );     scaledWindow.setWindowTopOffset   (iCode << 1);
    721     READ_SVLC( iCode, "scaled_ref_layer_right_offset" );   scaledWindow.setWindowRightOffset (iCode << 1);
    722     READ_SVLC( iCode, "scaled_ref_layer_bottom_offset" );  scaledWindow.setWindowBottomOffset(iCode << 1);
    723   }
    724 #endif
    725674
    726675  READ_FLAG( uiCode, "sps_extension_flag");
    727676  if (uiCode)
    728677  {
    729     while ( xMoreRbspData() )
    730     {
    731       READ_FLAG( uiCode, "sps_extension_data_flag");
    732     }
    733   }
    734 }
     678#if SPS_EXTENSION
     679    parseSPSExtension( pcSPS );
     680    READ_FLAG( uiCode, "sps_extension2_flag");
     681    if(uiCode)
     682    {
     683#endif
     684      while ( xMoreRbspData() )
     685      {
     686        READ_FLAG( uiCode, "sps_extension_data_flag");
     687      }
     688#if SPS_EXTENSION
     689    }
     690#endif
     691  }
     692}
     693
     694#if SPS_EXTENSION
     695Void TDecCavlc::parseSPSExtension( TComSPS* pcSPS )
     696{
     697  UInt uiCode;
     698  // more syntax elements to be parsed here
     699#if SCALED_REF_LAYER_OFFSETS
     700#if SCALED_REF_LAYER_OFFSET_FLAG
     701  READ_FLAG( uiCode, "scaled_ref_layer_offset_present_flag" );
     702  if( uiCode )
     703#else
     704  if( pcSPS->getLayerId() > 0 )
     705#endif
     706  {
     707    Int iCode;
     708    READ_UVLC( uiCode,      "num_scaled_ref_layer_offsets" ); pcSPS->setNumScaledRefLayerOffsets(uiCode);
     709    for(Int i = 0; i < pcSPS->getNumScaledRefLayerOffsets(); i++)
     710    {
     711      Window& scaledWindow = pcSPS->getScaledRefLayerWindow(i);
     712      READ_SVLC( iCode, "scaled_ref_layer_left_offset" );    scaledWindow.setWindowLeftOffset  (iCode << 1);
     713      READ_SVLC( iCode, "scaled_ref_layer_top_offset" );     scaledWindow.setWindowTopOffset   (iCode << 1);
     714      READ_SVLC( iCode, "scaled_ref_layer_right_offset" );   scaledWindow.setWindowRightOffset (iCode << 1);
     715      READ_SVLC( iCode, "scaled_ref_layer_bottom_offset" );  scaledWindow.setWindowBottomOffset(iCode << 1);
     716    }
     717  }
     718#endif
     719#if M0463_VUI_EXT_ILP_REF
     720  ////   sps_extension_vui_parameters( )
     721  if( pcSPS->getVuiParameters()->getBitstreamRestrictionFlag() )
     722  { 
     723    READ_UVLC( uiCode, "num_ilp_restricted_ref_layers" ); pcSPS->setNumIlpRestrictedRefLayers( uiCode );
     724    for( Int i = 0; i < pcSPS->getNumIlpRestrictedRefLayers( ); i++ )
     725    { 
     726      READ_UVLC( uiCode, "min_spatial_segment_offset_plus1" ); pcSPS->setMinSpatialSegmentOffsetPlus1( i, uiCode );
     727      if( pcSPS->getMinSpatialSegmentOffsetPlus1( i ) > 0 )
     728      { 
     729        READ_FLAG( uiCode, "ctu_based_offset_enabled_flag[ i ]"); pcSPS->setCtuBasedOffsetEnabledFlag(i, uiCode == 1 );
     730        if( pcSPS->getCtuBasedOffsetEnabledFlag( i ) ) 
     731        {
     732          READ_UVLC( uiCode, "min_horizontal_ctu_offset_plus1[ i ]"); pcSPS->setMinHorizontalCtuOffsetPlus1( i, uiCode );
     733        }
     734      } 
     735    } 
     736  } 
     737  ////   sps_extension_vui_parameters( ) END
     738#endif
     739}
     740#endif
    735741
    736742Void TDecCavlc::parseVPS(TComVPS* pcVPS)
    737743{
    738744  UInt  uiCode;
    739  
     745
    740746  READ_CODE( 4,  uiCode,  "vps_video_parameter_set_id" );         pcVPS->setVPSId( uiCode );
    741747  READ_CODE( 2,  uiCode,  "vps_reserved_three_2bits" );           assert(uiCode == 3);
     
    750756  READ_CODE( 16, uiCode,  "vps_reserved_ffff_16bits" );           assert(uiCode == 0xffff);
    751757  parsePTL ( pcVPS->getPTL(), true, pcVPS->getMaxTLayers()-1);
    752 #if SIGNAL_BITRATE_PICRATE_IN_VPS
    753   parseBitratePicRateInfo( pcVPS->getBitratePicrateInfo(), 0, pcVPS->getMaxTLayers() - 1);
    754 #endif
    755758  UInt subLayerOrderingInfoPresentFlag;
    756759  READ_FLAG(subLayerOrderingInfoPresentFlag, "vps_sub_layer_ordering_info_present_flag");
    757760  for(UInt i = 0; i <= pcVPS->getMaxTLayers()-1; i++)
    758761  {
    759 #if L0323_DPB
    760762    READ_UVLC( uiCode,  "vps_max_dec_pic_buffering_minus1[i]" );     pcVPS->setMaxDecPicBuffering( uiCode + 1, i );
    761 #else
    762     READ_UVLC( uiCode,  "vps_max_dec_pic_buffering[i]" );     pcVPS->setMaxDecPicBuffering( uiCode, i );
    763 #endif
    764763    READ_UVLC( uiCode,  "vps_num_reorder_pics[i]" );          pcVPS->setNumReorderPics( uiCode, i );
    765     READ_UVLC( uiCode,  "vps_max_latency_increase[i]" );      pcVPS->setMaxLatencyIncrease( uiCode, i );
     764    READ_UVLC( uiCode,  "vps_max_latency_increase_plus1[i]" );      pcVPS->setMaxLatencyIncrease( uiCode, i );
    766765
    767766    if (!subLayerOrderingInfoPresentFlag)
     
    803802  pcVPS->deriveLayerIdListVariables();
    804803#endif
    805 #if L0043_TIMING_INFO
    806804  TimingInfo *timingInfo = pcVPS->getTimingInfo();
    807805  READ_FLAG(       uiCode, "vps_timing_info_present_flag");         timingInfo->setTimingInfoPresentFlag      (uiCode ? true : false);
     
    815813      READ_UVLC(   uiCode, "vps_num_ticks_poc_diff_one_minus1");    timingInfo->setNumTicksPocDiffOneMinus1   (uiCode);
    816814    }
    817 #endif
    818815    READ_UVLC( uiCode, "vps_num_hrd_parameters" );                  pcVPS->setNumHrdParameters( uiCode );
    819816
     
    831828      parseHrdParameters(pcVPS->getHrdParameters(i), pcVPS->getCprmsPresentFlag( i ), pcVPS->getMaxTLayers() - 1);
    832829    }
    833 #if L0043_TIMING_INFO
    834   }
    835 #endif
     830  }
    836831  READ_FLAG( uiCode,  "vps_extension_flag" );
    837832  if (uiCode)
     
    854849#endif
    855850  }
    856  
     851
    857852  return;
    858853}
     
    860855#if VPS_EXTNS
    861856Void TDecCavlc::parseVPSExtension(TComVPS *vps)
    862 { 
     857{
    863858  UInt uiCode;
    864859  // ... More syntax elements to be parsed here
     
    873868    READ_FLAG( uiCode, "scalability_mask[i]" ); vps->setScalabilityMask(i, uiCode ? true : false);
    874869    numScalabilityTypes += uiCode;
    875     if( i != 1 )
    876     {
    877       // Multiview and reserved masks are not used in this version of software
    878       assert( uiCode == 0 );
    879     }
    880870  }
    881871  vps->setNumScalabilityTypes(numScalabilityTypes);
    882872
     873#if VPS_SPLIT_FLAG
     874  for(j = 0; j < numScalabilityTypes - vps->getSplittingFlag(); j++)
     875#else
    883876  for(j = 0; j < numScalabilityTypes; j++)
     877#endif
    884878  {
    885879    READ_CODE( 3, uiCode, "dimension_id_len_minus1[j]" ); vps->setDimensionIdLen(j, uiCode + 1);
    886880  }
     881#if VPS_SPLIT_FLAG
     882  if(vps->getSplittingFlag())
     883  {
     884    UInt numBits = 0;
     885    for(j = 0; j < numScalabilityTypes - 1; j++)
     886    {
     887      numBits += vps->getDimensionIdLen(j);
     888    }
     889    assert( numBits < 6 );
     890    vps->setDimensionIdLen(numScalabilityTypes-1, 6 - numBits);
     891    numBits = 6;
     892  }
     893#else
    887894  if(vps->getSplittingFlag())
    888895  {
     
    894901    assert( numBits <= 6 );
    895902  }
     903#endif
    896904
    897905  READ_FLAG( uiCode, "vps_nuh_layer_id_present_flag" ); vps->setNuhLayerIdPresentFlag(uiCode ? true : false);
     
    911919    vps->setLayerIdInVps(vps->getLayerIdInNuh(i), i);
    912920
     921#if VPS_SPLIT_FLAG
     922    if(!vps->getSplittingFlag())
     923#endif
    913924    for(j = 0; j < numScalabilityTypes; j++)
    914925    {
     
    939950#endif
    940951#endif
    941 
     952#if JCTVC_M0203_INTERLAYER_PRED_IDC
     953  for(i = 0; i < vps->getMaxLayers() - 1; i++)
     954  {
     955    READ_CODE( 3, uiCode, "max_sublayer_for_ilp_plus1[i]" ); vps->setMaxSublayerForIlpPlus1(i, uiCode);
     956    assert( uiCode <= vps->getMaxTLayers() );
     957  }
     958#endif
    942959#if VPS_EXTN_PROFILE_INFO
    943960  // Profile-tier-level signalling
     
    961978#endif
    962979      assert( vps->getProfileLayerSetRef(idx) < idx );
    963       // Copy profile information as indicated 
     980      // Copy profile information as indicated
    964981      vps->getPTLForExtn(idx)->copyProfileInfo( vps->getPTLForExtn( vps->getProfileLayerSetRef(idx) ) );
    965     }   
     982    }
    966983    parsePTL( vps->getPTLForExtn(idx), vps->getProfilePresentFlag(idx), vps->getMaxTLayers() - 1 );
    967984  }
     
    10481065      }
    10491066    }
    1050   } 
     1067  }
    10511068#endif
    10521069#endif
    10531070#if JCTVC_M0458_INTERLAYER_RPS_SIG
    10541071   READ_FLAG(uiCode, "max_one_active_ref_layer_flag" );
    1055    vps->setMaxOneActiveRefLayerFlag(uiCode);   
    1056 #endif 
     1072   vps->setMaxOneActiveRefLayerFlag(uiCode);
     1073#endif
    10571074
    10581075#if !VPS_MOVE_DIR_DEPENDENCY_FLAG
     
    10771094#endif
    10781095#endif
     1096#if VPS_EXTN_DIRECT_REF_LAYERS && M0457_PREDICTION_INDICATIONS
     1097  READ_UVLC( uiCode,           "direct_dep_type_len_minus2"); vps->setDirectDepTypeLen(uiCode+2);
     1098  for(i = 1; i < vps->getMaxLayers(); i++)
     1099  {
     1100    for(j = 0; j < i; j++)
     1101    {
     1102      if (vps->getDirectDependencyFlag(i, j))
     1103      {
     1104        READ_CODE( vps->getDirectDepTypeLen(), uiCode, "direct_dependency_type[i][j]" ); vps->setDirectDependencyType(i, j, uiCode);
     1105      }
     1106    }
     1107  }
     1108#endif
     1109#if M0040_ADAPTIVE_RESOLUTION_CHANGE
     1110  READ_FLAG(uiCode, "single_layer_for_non_irap_flag" ); vps->setSingleLayerForNonIrapFlag(uiCode == 1 ? true : false);
     1111#endif
    10791112}
    10801113#endif
     
    10941127  READ_FLAG( firstSliceSegmentInPic, "first_slice_segment_in_pic_flag" );
    10951128  if( rpcSlice->getRapPicFlag())
    1096   { 
     1129  {
    10971130    READ_FLAG( uiCode, "no_output_of_prior_pics_flag" );  //ignored
    10981131  }
     
    11451178    rpcSlice->setSliceCurEndCUAddr(numCTUs*maxParts);
    11461179  }
    1147  
     1180
    11481181  if(!rpcSlice->getDependentSliceSegmentFlag())
    11491182  {
     1183
     1184#if SH_DISCARDABLE_FLAG
     1185    if(rpcSlice->getPPS()->getNumExtraSliceHeaderBits()>0)
     1186    {
     1187      READ_FLAG(uiCode, "discardable_flag"); // ignored
     1188    }
     1189    for (Int i = 1; i < rpcSlice->getPPS()->getNumExtraSliceHeaderBits(); i++)
     1190    {
     1191      READ_FLAG(uiCode, "slice_reserved_undetermined_flag[]"); // ignored
     1192    }
     1193#else
    11501194    for (Int i = 0; i < rpcSlice->getPPS()->getNumExtraSliceHeaderBits(); i++)
    11511195    {
    11521196      READ_FLAG(uiCode, "slice_reserved_undetermined_flag[]"); // ignored
    11531197    }
     1198#endif
    11541199
    11551200    READ_UVLC (    uiCode, "slice_type" );            rpcSlice->setSliceType((SliceType)uiCode);
     
    11791224    else
    11801225    {
    1181       READ_CODE(sps->getBitsForPOC(), uiCode, "pic_order_cnt_lsb"); 
     1226      READ_CODE(sps->getBitsForPOC(), uiCode, "pic_order_cnt_lsb");
    11821227      Int iPOClsb = uiCode;
    11831228      Int iPrevPOC = rpcSlice->getPrevPOC();
     
    11901235        iPOCmsb = iPrevPOCmsb + iMaxPOClsb;
    11911236      }
    1192       else if( (iPOClsb  >  iPrevPOClsb )  && ( (iPOClsb - iPrevPOClsb )  >  ( iMaxPOClsb / 2 ) ) ) 
     1237      else if( (iPOClsb  >  iPrevPOClsb )  && ( (iPOClsb - iPrevPOClsb )  >  ( iMaxPOClsb / 2 ) ) )
    11931238      {
    11941239        iPOCmsb = iPrevPOCmsb - iMaxPOClsb;
     
    12301275          uiCode = 0;
    12311276        }
    1232         memcpy(rps,sps->getRPSList()->getReferencePictureSet(uiCode),sizeof(TComReferencePictureSet));
     1277        *rps = *(sps->getRPSList()->getReferencePictureSet(uiCode));
    12331278      }
    12341279      if(sps->getLongTermRefsPresent())
     
    12761321          READ_FLAG(uiCode,"delta_poc_msb_present_flag");
    12771322          Bool mSBPresentFlag = uiCode ? true : false;
    1278           if(mSBPresentFlag)                 
     1323          if(mSBPresentFlag)
    12791324          {
    12801325            READ_UVLC( uiCode, "delta_poc_msb_cycle_lt[i]" );
     
    12911336            else
    12921337            {
    1293               deltaPocMSBCycleLT = uiCode + prevDeltaMSB;             
     1338              deltaPocMSBCycleLT = uiCode + prevDeltaMSB;
    12941339            }
    12951340
    1296             Int pocLTCurr = rpcSlice->getPOC() - deltaPocMSBCycleLT * maxPicOrderCntLSB 
     1341            Int pocLTCurr = rpcSlice->getPOC() - deltaPocMSBCycleLT * maxPicOrderCntLSB
    12971342                                        - iPOClsb + pocLsbLt;
    1298             rps->setPOC     (j, pocLTCurr); 
     1343            rps->setPOC     (j, pocLTCurr);
    12991344            rps->setDeltaPOC(j, - rpcSlice->getPOC() + pocLTCurr);
    1300             rps->setCheckLTMSBPresent(j,true); 
     1345            rps->setCheckLTMSBPresent(j,true);
    13011346          }
    13021347          else
     
    13041349            rps->setPOC     (j, pocLsbLt);
    13051350            rps->setDeltaPOC(j, - rpcSlice->getPOC() + pocLsbLt);
    1306             rps->setCheckLTMSBPresent(j,false); 
     1351            rps->setCheckLTMSBPresent(j,false);
    13071352          }
    13081353          prevDeltaMSB = deltaPocMSBCycleLT;
    13091354        }
    13101355        offset += rps->getNumberOfLongtermPictures();
    1311         rps->setNumberOfPictures(offset);       
    1312       } 
     1356        rps->setNumberOfPictures(offset);
     1357      }
    13131358      if ( rpcSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_BLA_W_LP
    13141359        || rpcSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_BLA_W_RADL
     
    13231368        rpcSlice->setRPS(rps);
    13241369      }
    1325 
    1326 
    13271370      if (rpcSlice->getSPS()->getTMVPFlagsPresent())
    13281371      {
    13291372        READ_FLAG( uiCode, "slice_temporal_mvp_enable_flag" );
    1330         rpcSlice->setEnableTMVPFlag( uiCode == 1 ? true : false ); 
     1373        rpcSlice->setEnableTMVPFlag( uiCode == 1 ? true : false );
    13311374      }
    13321375      else
     
    13371380
    13381381#if REF_IDX_FRAMEWORK
    1339 #if JCTVC_M0458_INTERLAYER_RPS_SIG   
     1382#if JCTVC_M0458_INTERLAYER_RPS_SIG
    13401383    rpcSlice->setActiveNumILRRefIdx(0);
    1341     if((sps->getLayerId() > 0)  &&  (rpcSlice->getNumILRRefIdx() > 0) ) 
    1342     {     
     1384    if((sps->getLayerId() > 0)  &&  (rpcSlice->getNumILRRefIdx() > 0) )
     1385    {
    13431386      READ_FLAG(uiCode,"inter_layer_pred_enabled_flag");
    13441387      rpcSlice->setInterLayerPredEnabledFlag(uiCode);
    13451388      if( rpcSlice->getInterLayerPredEnabledFlag())
    13461389      {
    1347         if(rpcSlice->getNumILRRefIdx() > 1) 
     1390        if(rpcSlice->getNumILRRefIdx() > 1)
    13481391        {
    13491392          Int numBits = 1;
     
    13521395            numBits++;
    13531396          }
    1354           if( !rpcSlice->getVPS()->getMaxOneActiveRefLayerFlag()) 
     1397          if( !rpcSlice->getVPS()->getMaxOneActiveRefLayerFlag())
    13551398          {
    13561399            READ_CODE( numBits, uiCode,"num_inter_layer_ref_pics_minus1" );
    1357             rpcSlice->setActiveNumILRRefIdx(uiCode + 1);         
     1400            rpcSlice->setActiveNumILRRefIdx(uiCode + 1);
    13581401          }
    13591402          else
    13601403          {
    1361             rpcSlice->setActiveNumILRRefIdx(1);         
     1404            rpcSlice->setActiveNumILRRefIdx(1);
    13621405          }
    1363           for(Int i = 0; i < rpcSlice->getActiveNumILRRefIdx(); i++ ) 
     1406          for(Int i = 0; i < rpcSlice->getActiveNumILRRefIdx(); i++ )
    13641407          {
    1365             READ_CODE( numBits,uiCode,"inter_layer_pred_layer_idc[i]" ); 
    1366             rpcSlice->setInterLayerPredLayerIdc(uiCode,i);         
     1408            READ_CODE( numBits,uiCode,"inter_layer_pred_layer_idc[i]" );
     1409            rpcSlice->setInterLayerPredLayerIdc(uiCode,i);
    13671410          }
    13681411        }
    13691412        else
    13701413        {
    1371           rpcSlice->setActiveNumILRRefIdx(1);         
    1372           rpcSlice->setInterLayerPredLayerIdc(0,0);     
    1373         }
    1374       }
    1375     }
     1414          rpcSlice->setActiveNumILRRefIdx(1);
     1415          rpcSlice->setInterLayerPredLayerIdc(0,0);
     1416        }
     1417      }
     1418    }
     1419#if M0457_IL_SAMPLE_PRED_ONLY_FLAG
     1420    rpcSlice->setInterLayerSamplePredOnlyFlag( false );
     1421    if( rpcSlice->getNumSamplePredRefLayers() > 0 && rpcSlice->getActiveNumILRRefIdx() > 0 )
     1422    {
     1423      READ_FLAG( uiCode, "inter_layer_sample_pred_only_flag" );
     1424      rpcSlice->setInterLayerSamplePredOnlyFlag( uiCode > 0 );
     1425    }
     1426#endif
    13761427#else
    13771428    if( rpcSlice->getLayerId() > 0 )
     
    14431494          Int length = 1;
    14441495          numRpsCurrTempList0 --;
    1445           while ( numRpsCurrTempList0 >>= 1) 
     1496          while ( numRpsCurrTempList0 >>= 1)
    14461497          {
    14471498            length ++;
     
    14851536          Int length = 1;
    14861537          numRpsCurrTempList1 --;
    1487           while ( numRpsCurrTempList1 >>= 1) 
     1538          while ( numRpsCurrTempList1 >>= 1)
    14881539          {
    14891540            length ++;
     
    15031554        }
    15041555      }
    1505     } 
     1556    }
    15061557    else
    15071558    {
     
    15221573    if ( rpcSlice->getEnableTMVPFlag() )
    15231574    {
     1575#if REF_IDX_FRAMEWORK && M0457_COL_PICTURE_SIGNALING
     1576      rpcSlice->setMFMEnabledFlag( false );
     1577      rpcSlice->setColRefLayerIdx( 0 );
     1578      rpcSlice->setAltColIndicationFlag( false );
     1579      if ( sps->getLayerId() > 0 && rpcSlice->getActiveNumILRRefIdx() > 0 && rpcSlice->getNumMotionPredRefLayers() > 0 )
     1580      {
     1581        READ_FLAG( uiCode, "alt_collocated_indication_flag" );
     1582        rpcSlice->setAltColIndicationFlag( uiCode == 1 ? true : false );
     1583        rpcSlice->setMFMEnabledFlag( uiCode == 1 ? true : false );
     1584        if ( rpcSlice->getNumMotionPredRefLayers() > 1 )
     1585        {
     1586          READ_UVLC( uiCode, "collocated_ref_layer_idx" );
     1587          rpcSlice->setColRefLayerIdx( uiCode );
     1588        }
     1589      }
     1590      else
     1591      {
     1592#endif
    15241593      if ( rpcSlice->getSliceType() == B_SLICE )
    15251594      {
     
    15431612        rpcSlice->setColRefIdx(0);
    15441613      }
     1614#if REF_IDX_FRAMEWORK && M0457_COL_PICTURE_SIGNALING
     1615      }
     1616#endif
    15451617    }
    15461618    if ( (pps->getUseWP() && rpcSlice->getSliceType()==P_SLICE) || (pps->getWPBiPred() && rpcSlice->getSliceType()==B_SLICE) )
     
    15851657      }
    15861658      else
    1587       { 
     1659      {
    15881660        rpcSlice->setDeblockingFilterOverrideFlag(0);
    15891661      }
     
    16091681    }
    16101682    else
    1611     { 
     1683    {
    16121684      rpcSlice->setDeblockingFilterDisable       ( false );
    16131685      rpcSlice->setDeblockingFilterBetaOffsetDiv2( 0 );
     
    16291701
    16301702  }
    1631  
     1703
    16321704    UInt *entryPointOffset          = NULL;
    16331705    UInt numEntryPointOffsets, offsetLenMinus1;
     
    16421714    for (UInt idx=0; idx<numEntryPointOffsets; idx++)
    16431715    {
    1644 #if L0116_ENTRY_POINT
    16451716      READ_CODE(offsetLenMinus1+1, uiCode, "entry_point_offset_minus1");
    16461717      entryPointOffset[ idx ] = uiCode + 1;
    1647 #else
    1648       READ_CODE(offsetLenMinus1+1, uiCode, "entry_point_offset");
    1649       entryPointOffset[ idx ] = uiCode;
    1650 #endif
    16511718    }
    16521719  }
     
    16701737  {
    16711738    Int endOfSliceHeaderLocation = m_pcBitstream->getByteLocation();
     1739   
     1740    // Adjust endOfSliceHeaderLocation to account for emulation prevention bytes in the slice segment header
     1741    for ( UInt curByteIdx  = 0; curByteIdx<m_pcBitstream->numEmulationPreventionBytesRead(); curByteIdx++ )
     1742    {
     1743      if ( m_pcBitstream->getEmulationPreventionByteLocation( curByteIdx ) < endOfSliceHeaderLocation )
     1744      {
     1745        endOfSliceHeaderLocation++;
     1746      }
     1747    }
     1748
    16721749    Int  curEntryPointOffset     = 0;
    16731750    Int  prevEntryPointOffset    = 0;
     
    16791756      for ( UInt curByteIdx  = 0; curByteIdx<m_pcBitstream->numEmulationPreventionBytesRead(); curByteIdx++ )
    16801757      {
    1681         if ( m_pcBitstream->getEmulationPreventionByteLocation( curByteIdx ) >= ( prevEntryPointOffset + endOfSliceHeaderLocation ) && 
     1758        if ( m_pcBitstream->getEmulationPreventionByteLocation( curByteIdx ) >= ( prevEntryPointOffset + endOfSliceHeaderLocation ) &&
    16821759             m_pcBitstream->getEmulationPreventionByteLocation( curByteIdx ) <  ( curEntryPointOffset  + endOfSliceHeaderLocation ) )
    16831760        {
     
    17271804  return;
    17281805}
    1729  
     1806
    17301807Void TDecCavlc::parsePTL( TComPTL *rpcPTL, Bool profilePresentFlag, Int maxNumSubLayersMinus1 )
    17311808{
     
    17371814  READ_CODE( 8, uiCode, "general_level_idc" );    rpcPTL->getGeneralPTL()->setLevelIdc(uiCode);
    17381815
    1739 #if L0363_BYTE_ALIGN
    17401816  for (Int i = 0; i < maxNumSubLayersMinus1; i++)
    17411817  {
     
    17461822    READ_FLAG( uiCode, "sub_layer_level_present_flag[i]"   ); rpcPTL->setSubLayerLevelPresentFlag  (i, uiCode);
    17471823  }
    1748  
     1824
    17491825  if (maxNumSubLayersMinus1 > 0)
    17501826  {
     
    17551831    }
    17561832  }
    1757 #endif
    1758  
     1833
    17591834  for(Int i = 0; i < maxNumSubLayersMinus1; i++)
    17601835  {
    1761 #if !L0363_BYTE_ALIGN
    1762     if(profilePresentFlag)
    1763     {
    1764       READ_FLAG( uiCode, "sub_layer_profile_present_flag[i]" ); rpcPTL->setSubLayerProfilePresentFlag(i, uiCode);
    1765     }
    1766     READ_FLAG( uiCode, "sub_layer_level_present_flag[i]"   ); rpcPTL->setSubLayerLevelPresentFlag  (i, uiCode);
    1767 #endif
    17681836    if( profilePresentFlag && rpcPTL->getSubLayerProfilePresentFlag(i) )
    17691837    {
     
    17871855    READ_FLAG(  uiCode, "XXX_profile_compatibility_flag[][j]");   ptl->setProfileCompatibilityFlag(j, uiCode ? 1 : 0);
    17881856  }
    1789 #if L0046_CONSTRAINT_FLAGS
    17901857  READ_FLAG(uiCode, "general_progressive_source_flag");
    17911858  ptl->setProgressiveSourceFlag(uiCode ? true : false);
     
    17931860  READ_FLAG(uiCode, "general_interlaced_source_flag");
    17941861  ptl->setInterlacedSourceFlag(uiCode ? true : false);
    1795  
     1862
    17961863  READ_FLAG(uiCode, "general_non_packed_constraint_flag");
    17971864  ptl->setNonPackedConstraintFlag(uiCode ? true : false);
    1798  
     1865
    17991866  READ_FLAG(uiCode, "general_frame_only_constraint_flag");
    18001867  ptl->setFrameOnlyConstraintFlag(uiCode ? true : false);
    1801  
     1868
    18021869  READ_CODE(16, uiCode, "XXX_reserved_zero_44bits[0..15]");
    18031870  READ_CODE(16, uiCode, "XXX_reserved_zero_44bits[16..31]");
    18041871  READ_CODE(12, uiCode, "XXX_reserved_zero_44bits[32..43]");
    1805 #elif L0363_MORE_BITS
    1806   READ_CODE(16, uiCode, "XXX_reserved_zero_48bits[0..15]");
    1807   READ_CODE(16, uiCode, "XXX_reserved_zero_48bits[16..31]");
    1808   READ_CODE(16, uiCode, "XXX_reserved_zero_48bits[32..47]");
    1809 #else
    1810   READ_CODE(16, uiCode, "XXX_reserved_zero_16bits[]");  assert( uiCode == 0 );
    1811 #endif
    1812 }
    1813 #if SIGNAL_BITRATE_PICRATE_IN_VPS
    1814 Void TDecCavlc::parseBitratePicRateInfo(TComBitRatePicRateInfo *info, Int tempLevelLow, Int tempLevelHigh)
    1815 {
    1816   UInt uiCode;
    1817   for(Int i = tempLevelLow; i <= tempLevelHigh; i++)
    1818   {
    1819     READ_FLAG( uiCode, "bit_rate_info_present_flag[i]" ); info->setBitRateInfoPresentFlag(i, uiCode ? true : false);
    1820     READ_FLAG( uiCode, "pic_rate_info_present_flag[i]" ); info->setPicRateInfoPresentFlag(i, uiCode ? true : false);
    1821     if(info->getBitRateInfoPresentFlag(i))
    1822     {
    1823       READ_CODE( 16, uiCode, "avg_bit_rate[i]" ); info->setAvgBitRate(i, uiCode);
    1824       READ_CODE( 16, uiCode, "max_bit_rate[i]" ); info->setMaxBitRate(i, uiCode);
    1825     }
    1826     if(info->getPicRateInfoPresentFlag(i))
    1827     {
    1828       READ_CODE(  2, uiCode,  "constant_pic_rate_idc[i]" ); info->setConstantPicRateIdc(i, uiCode);
    1829       READ_CODE( 16, uiCode,  "avg_pic_rate[i]"          ); info->setAvgPicRate(i, uiCode);
    1830     }
    1831   }
    1832 }
    1833 #endif 
     1872}
     1873
    18341874Void TDecCavlc::parseTerminatingBit( UInt& ruiBit )
    18351875{
     
    18761916}
    18771917
    1878 /** Parse I_PCM information. 
     1918/** Parse I_PCM information.
    18791919* \param pcCU pointer to CU
    18801920* \param uiAbsPartIdx CU index
     
    18821922* \returns Void
    18831923*
    1884 * If I_PCM flag indicates that the CU is I_PCM, parse its PCM alignment bits and codes. 
     1924* If I_PCM flag indicates that the CU is I_PCM, parse its PCM alignment bits and codes.
    18851925*/
    18861926Void TDecCavlc::parseIPCMInfo( TComDataCU* /*pcCU*/, UInt /*uiAbsPartIdx*/, UInt /*uiDepth*/ )
     
    18901930
    18911931Void TDecCavlc::parseIntraDirLumaAng  ( TComDataCU* /*pcCU*/, UInt /*uiAbsPartIdx*/, UInt /*uiDepth*/ )
    1892 { 
     1932{
    18931933  assert(0);
    18941934}
     
    19812021  UInt            uiLog2WeightDenomLuma, uiLog2WeightDenomChroma;
    19822022  UInt            uiTotalSignalledWeightFlags = 0;
    1983  
     2023
    19842024  Int iDeltaDenom;
    19852025  // decode delta_luma_log2_weight_denom :
    19862026  READ_UVLC( uiLog2WeightDenomLuma, "luma_log2_weight_denom" );     // ue(v): luma_log2_weight_denom
    19872027  assert( uiLog2WeightDenomLuma <= 7 );
    1988   if( bChroma ) 
     2028  if( bChroma )
    19892029  {
    19902030    READ_SVLC( iDeltaDenom, "delta_chroma_log2_weight_denom" );     // se(v): delta_chroma_log2_weight_denom
     
    19942034  }
    19952035
    1996   for ( Int iNumRef=0 ; iNumRef<iNbRef ; iNumRef++ ) 
     2036  for ( Int iNumRef=0 ; iNumRef<iNbRef ; iNumRef++ )
    19972037  {
    19982038    RefPicList  eRefPicList = ( iNumRef ? REF_PIC_LIST_1 : REF_PIC_LIST_0 );
    1999     for ( Int iRefIdx=0 ; iRefIdx<pcSlice->getNumRefIdx(eRefPicList) ; iRefIdx++ ) 
     2039    for ( Int iRefIdx=0 ; iRefIdx<pcSlice->getNumRefIdx(eRefPicList) ; iRefIdx++ )
    20002040    {
    20012041      pcSlice->getWpScaling(eRefPicList, iRefIdx, wp);
     
    20102050      uiTotalSignalledWeightFlags += wp[0].bPresentFlag;
    20112051    }
    2012     if ( bChroma ) 
     2052    if ( bChroma )
    20132053    {
    20142054      UInt  uiCode;
    2015       for ( Int iRefIdx=0 ; iRefIdx<pcSlice->getNumRefIdx(eRefPicList) ; iRefIdx++ ) 
     2055      for ( Int iRefIdx=0 ; iRefIdx<pcSlice->getNumRefIdx(eRefPicList) ; iRefIdx++ )
    20162056      {
    20172057        pcSlice->getWpScaling(eRefPicList, iRefIdx, wp);
     
    20222062      }
    20232063    }
    2024     for ( Int iRefIdx=0 ; iRefIdx<pcSlice->getNumRefIdx(eRefPicList) ; iRefIdx++ ) 
     2064    for ( Int iRefIdx=0 ; iRefIdx<pcSlice->getNumRefIdx(eRefPicList) ; iRefIdx++ )
    20252065    {
    20262066      pcSlice->getWpScaling(eRefPicList, iRefIdx, wp);
    2027       if ( wp[0].bPresentFlag ) 
     2067      if ( wp[0].bPresentFlag )
    20282068      {
    20292069        Int iDeltaWeight;
     
    20362076        assert( wp[0].iOffset <=  127 );
    20372077      }
    2038       else 
     2078      else
    20392079      {
    20402080        wp[0].iWeight = (1 << wp[0].uiLog2WeightDenom);
    20412081        wp[0].iOffset = 0;
    20422082      }
    2043       if ( bChroma ) 
    2044       {
    2045         if ( wp[1].bPresentFlag ) 
    2046         {
    2047           for ( Int j=1 ; j<3 ; j++ ) 
     2083      if ( bChroma )
     2084      {
     2085        if ( wp[1].bPresentFlag )
     2086        {
     2087          for ( Int j=1 ; j<3 ; j++ )
    20482088          {
    20492089            Int iDeltaWeight;
     
    20612101          }
    20622102        }
    2063         else 
    2064         {
    2065           for ( Int j=1 ; j<3 ; j++ ) 
     2103        else
     2104        {
     2105          for ( Int j=1 ; j<3 ; j++ )
    20662106          {
    20672107            wp[j].iWeight = (1 << wp[j].uiLog2WeightDenom);
     
    20722112    }
    20732113
    2074     for ( Int iRefIdx=pcSlice->getNumRefIdx(eRefPicList) ; iRefIdx<MAX_NUM_REF ; iRefIdx++ ) 
     2114    for ( Int iRefIdx=pcSlice->getNumRefIdx(eRefPicList) ; iRefIdx<MAX_NUM_REF ; iRefIdx++ )
    20752115    {
    20762116      pcSlice->getWpScaling(eRefPicList, iRefIdx, wp);
     
    21482188
    21492189Bool TDecCavlc::xMoreRbspData()
    2150 { 
     2190{
    21512191  Int bitsLeft = m_pcBitstream->getNumBitsLeft();
    21522192
  • trunk/source/Lib/TLibDecoder/TDecCAVLC.h

    r191 r310  
    7575  Void  parseVPSExtension   ( TComVPS* pcVPS );
    7676#endif
     77#if SPS_SUB_LAYER_INFO
     78  Void  parseSPS            ( TComSPS* pcSPS, ParameterSetManagerDecoder *parameterSetManager );
     79#else
    7780  Void  parseSPS            ( TComSPS* pcSPS );
     81#endif
     82#if SPS_EXTENSION
     83  Void parseSPSExtension    ( TComSPS* pcSPS );
     84#endif
    7885  Void  parsePPS            ( TComPPS* pcPPS);
    7986  Void  parseVUI            ( TComVUI* pcVUI, TComSPS* pcSPS );
     
    8188  Void  parsePTL            ( TComPTL *rpcPTL, Bool profilePresentFlag, Int maxNumSubLayersMinus1 );
    8289  Void  parseProfileTier    (ProfileTierLevel *ptl);
    83 #if SIGNAL_BITRATE_PICRATE_IN_VPS
    84   Void  parseBitratePicRateInfo(TComBitRatePicRateInfo *info, Int tempLevelLow, Int tempLevelHigh);
    85 #endif
    8690  Void  parseHrdParameters  (TComHRD *hrd, Bool cprms_present_flag, UInt tempLevelHigh);
    8791  Void  parseSliceHeader    ( TComSlice*& rpcSlice, ParameterSetManagerDecoder *parameterSetManager);
  • trunk/source/Lib/TLibDecoder/TDecCu.cpp

    r191 r310  
    935935TDecCu::xReconIntraBL( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
    936936{
    937   m_ppcYuvReco[uiDepth]->copyFromPicLuma  ( pcCU->getSlice()->getFullPelBaseRec(),  pcCU->getAddr(), pcCU->getZorderIdxInCU(), 0, pcCU->getWidth(0), pcCU->getHeight(0));
    938   m_ppcYuvReco[uiDepth]->copyFromPicChroma( pcCU->getSlice()->getFullPelBaseRec(),  pcCU->getAddr(), pcCU->getZorderIdxInCU(), 0, (pcCU->getWidth(0)>>1), (pcCU->getHeight(0)>>1), 0);
    939   m_ppcYuvReco[uiDepth]->copyFromPicChroma( pcCU->getSlice()->getFullPelBaseRec(),  pcCU->getAddr(), pcCU->getZorderIdxInCU(), 0, (pcCU->getWidth(0)>>1), (pcCU->getHeight(0)>>1), 1);
     937  m_ppcYuvReco[uiDepth]->copyFromPicLuma  ( pcCU->getSlice()->getFullPelBaseRec(m_layerId - 1),  pcCU->getAddr(), pcCU->getZorderIdxInCU(), 0, pcCU->getWidth(0), pcCU->getHeight(0));
     938  m_ppcYuvReco[uiDepth]->copyFromPicChroma( pcCU->getSlice()->getFullPelBaseRec(m_layerId - 1),  pcCU->getAddr(), pcCU->getZorderIdxInCU(), 0, (pcCU->getWidth(0)>>1), (pcCU->getHeight(0)>>1), 0);
     939  m_ppcYuvReco[uiDepth]->copyFromPicChroma( pcCU->getSlice()->getFullPelBaseRec(m_layerId - 1),  pcCU->getAddr(), pcCU->getZorderIdxInCU(), 0, (pcCU->getWidth(0)>>1), (pcCU->getHeight(0)>>1), 1);
    940940
    941941  // inter recon
  • trunk/source/Lib/TLibDecoder/TDecEntropy.cpp

    r191 r310  
    188188      decodeMergeIndex( pcCU, uiPartIdx, uiSubPartIdx, uiDepth );
    189189      UInt uiMergeIndex = pcCU->getMergeIndex(uiSubPartIdx);
    190 #if 0 //REF_IDX_FRAMEWORK  // HM bug fix
    191       if(uiPartIdx)
    192       {
    193         for(UInt ui=0; ui<uiMergeIndex+1; ui++)
    194         {
    195           cMvFieldNeighbours[(ui<<1)].setMvField(TComMv(), NOT_VALID);
    196           cMvFieldNeighbours[(ui<<1)+1].setMvField(TComMv(), NOT_VALID);
    197         }
    198       }
    199 #endif
    200190      if ( pcCU->getSlice()->getPPS()->getLog2ParallelMergeLevelMinus2() && ePartSize != SIZE_2Nx2N && pcSubCU->getWidth( 0 ) <= 8 )
    201191      {
  • trunk/source/Lib/TLibDecoder/TDecEntropy.h

    r191 r310  
    6666
    6767  virtual Void  parseVPS                  ( TComVPS* pcVPS )                       = 0;
     68#if SPS_SUB_LAYER_INFO
     69  virtual Void  parseSPS                  ( TComSPS* pcSPS, ParameterSetManagerDecoder *parameterSetManager )           = 0;
     70#else
    6871  virtual Void  parseSPS                  ( TComSPS* pcSPS )                                      = 0;
     72#endif
    6973  virtual Void  parsePPS                  ( TComPPS* pcPPS )                                      = 0;
    7074
     
    134138  Void    resetEntropy                ( TComSlice* p)           { m_pcEntropyDecoderIf->resetEntropy(p);                    }
    135139  Void    decodeVPS                   ( TComVPS* pcVPS ) { m_pcEntropyDecoderIf->parseVPS(pcVPS); }
     140#if SPS_SUB_LAYER_INFO
     141  Void    decodeSPS                   ( TComSPS* pcSPS, ParameterSetManagerDecoder *parameterSetManager )    { m_pcEntropyDecoderIf->parseSPS(pcSPS, parameterSetManager);                    }
     142#else
    136143  Void    decodeSPS                   ( TComSPS* pcSPS     )    { m_pcEntropyDecoderIf->parseSPS(pcSPS);                    }
     144#endif
    137145  Void    decodePPS                   ( TComPPS* pcPPS )    { m_pcEntropyDecoderIf->parsePPS(pcPPS);                    }
    138146  Void    decodeSliceHeader           ( TComSlice*& rpcSlice, ParameterSetManagerDecoder *parameterSetManager)  { m_pcEntropyDecoderIf->parseSliceHeader(rpcSlice, parameterSetManager);         }
  • trunk/source/Lib/TLibDecoder/TDecGop.cpp

    r191 r310  
    247247    for (Int iRefIndex = 0; iRefIndex < pcSlice->getNumRefIdx(RefPicList(iRefList)); iRefIndex++)
    248248    {
    249 #if REF_IDX_FRAMEWORK && VPS_EXTN_DIRECT_REF_LAYERS_CONTINUE
     249#if REF_IDX_FRAMEWORK && VPS_EXTN_DIRECT_REF_LAYERS
    250250      if( pcSlice->getRefPic(RefPicList(iRefList), iRefIndex)->isILR( m_layerId ) )
    251251      {
  • trunk/source/Lib/TLibDecoder/TDecSbac.cpp

    r191 r310  
    158158  UInt uiBit;
    159159  m_pcTDecBinIf->decodeBinTrm(uiBit);
     160  assert(uiBit); // end_of_sub_stream_one_bit must be equal to 1
    160161  m_pcTDecBinIf->finish(); 
    161162  m_pcBitstream->readOutTrailingBits();
     
    196197{
    197198  m_pcTDecBinIf->decodeBinTrm( ruiBit );
     199  if ( ruiBit )
     200  {
     201    m_pcTDecBinIf->finish();
     202  }
    198203}
    199204
     
    318323{
    319324  UInt uiSymbol;
    320   Bool readPCMSampleFlag = false;
    321325
    322326    m_pcTDecBinIf->decodeBinTrm(uiSymbol);
     
    324328    if (uiSymbol)
    325329    {
    326       readPCMSampleFlag = true;
    327       m_pcTDecBinIf->decodePCMAlignBits();
    328     }
    329 
    330   if (readPCMSampleFlag == true)
    331   {
    332330    Bool bIpcmFlag = true;
    333331
     
    395393    }
    396394
    397       m_pcTDecBinIf->resetBac();
     395    m_pcTDecBinIf->start();
    398396  }
    399397}
     
    681679    else
    682680    {
    683       intraPredMode = 0;
    684681      m_pcTDecBinIf->decodeBinsEP( symbol, 5 );
    685682      intraPredMode = symbol;
     
    917914  else
    918915  {
    919     iDQp=0;
    920916    qp = pcCU->getRefQP(uiAbsPartIdx);
    921917  }
     
    11021098
    11031099  //===== decode significance flags =====
    1104   UInt uiScanPosLast = uiBlkPosLast;
     1100  UInt uiScanPosLast;
    11051101  const UInt *scan   = g_auiSigLastScan[ uiScanIdx ][ uiLog2BlockSize-1 ];
    11061102  for( uiScanPosLast = 0; uiScanPosLast < uiMaxNumCoeffM1; uiScanPosLast++ )
  • trunk/source/Lib/TLibDecoder/TDecSbac.h

    r191 r310  
    7676  Void  setBitstream              ( TComInputBitstream* p  ) { m_pcBitstream = p; m_pcTDecBinIf->init( p ); }
    7777  Void  parseVPS                  ( TComVPS* /*pcVPS*/ ) {}
     78#if SPS_SUB_LAYER_INFO
     79  Void  parseSPS                  ( TComSPS* /*pcSPS*/, ParameterSetManagerDecoder * /*parameterSetManager*/ ) {}
     80#else
    7881  Void  parseSPS                  ( TComSPS* /*pcSPS*/ ) {}
     82#endif
    7983  Void  parsePPS                  ( TComPPS* /*pcPPS*/ ) {}
    8084
  • trunk/source/Lib/TLibDecoder/TDecSlice.cpp

    r191 r310  
    198198  Int iNumSubstreamsPerTile = 1; // if independent.
    199199#if INTRA_BL
    200   m_pcCuDecoder->setBaseRecPic( rpcPic->getLayerId() > 0 ? rpcPic->getFullPelBaseRec() : NULL);
     200  m_pcCuDecoder->setBaseRecPic( rpcPic->getLayerId() > 0 ? rpcPic->getFullPelBaseRec(rpcPic->getLayerId()-1) : NULL);
    201201#endif
    202202  Bool depSliceSegmentsEnabled = rpcPic->getSlice(rpcPic->getCurrSliceIdx())->getPPS()->getDependentSliceSegmentsEnabledFlag();
     
    384384    pcSbacDecoders[uiSubStrm].load(pcSbacDecoder);
    385385
     386    if ( uiCol == rpcPic->getPicSym()->getTComTile(rpcPic->getPicSym()->getTileIdxMap(iCUAddr))->getRightEdgePosInCU()
     387        && pcSlice->getPPS()->getEntropyCodingSyncEnabledFlag()
     388        && !uiIsLast )
     389    {
     390      // Parse end_of_substream_one_bit for WPP case
     391      UInt binVal;
     392      pcSbacDecoder->parseTerminatingBit( binVal );
     393      assert( binVal );
     394    }
     395
    386396    //Store probabilities of second LCU in line into buffer
    387397    if ( (uiCol == uiTileLCUX+1)&& (depSliceSegmentsEnabled || (pcSlice->getPPS()->getNumSubstreams() > 1)) && (pcSlice->getPPS()->getEntropyCodingSyncEnabledFlag()) )
  • trunk/source/Lib/TLibDecoder/TDecTop.cpp

    r229 r310  
    160160    if (m_cIlpPic[0] == NULL)
    161161    {
    162       for (Int j=0; j< 1/*MAX_NUM_REF*/; j++)  // to be set to NumDirectRefLayers[LayerIdInVps[nuh_layer_id]]
     162      for (Int j=0; j < MAX_LAYERS /*MAX_NUM_REF*/; j++)  // consider to set to NumDirectRefLayers[LayerIdInVps[nuh_layer_id]]
    163163      {
    164164
     
    180180Void TDecTop::setILRPic(TComPic *pcPic)
    181181{
    182   if(m_cIlpPic[0])
    183   {
    184     m_cIlpPic[0]->copyUpsampledPictureYuv(pcPic->getFullPelBaseRec(), m_cIlpPic[0]->getPicYuvRec());
    185     m_cIlpPic[0]->getSlice(0)->setPOC(pcPic->getPOC());
    186     m_cIlpPic[0]->setLayerId(pcPic->getSlice(0)->getBaseColPic()->getLayerId()); //set reference layerId
    187     m_cIlpPic[0]->getPicYuvRec()->setBorderExtension(false);
    188     m_cIlpPic[0]->getPicYuvRec()->extendPicBorder();
     182  for( Int i = 0; i < pcPic->getSlice(0)->getActiveNumILRRefIdx(); i++ )
     183  {
     184    Int refLayerIdc = pcPic->getSlice(0)->getInterLayerPredLayerIdc(i);
     185
     186    if(m_cIlpPic[refLayerIdc])
     187    {
     188      m_cIlpPic[refLayerIdc]->copyUpsampledPictureYuv(pcPic->getFullPelBaseRec(refLayerIdc), m_cIlpPic[refLayerIdc]->getPicYuvRec());
     189      m_cIlpPic[refLayerIdc]->getSlice(0)->setPOC(pcPic->getPOC());
     190      m_cIlpPic[refLayerIdc]->setLayerId(pcPic->getSlice(0)->getBaseColPic(refLayerIdc)->getLayerId()); //set reference layerId
     191      m_cIlpPic[refLayerIdc]->getPicYuvRec()->setBorderExtension(false);
     192      m_cIlpPic[refLayerIdc]->getPicYuvRec()->extendPicBorder();
     193    }
    189194  }
    190195}
     
    236241  }
    237242
    238 #if L0323_DPB
    239   m_iMaxRefPicNum = pcSlice->getSPS()->getMaxDecPicBuffering(pcSlice->getTLayer())+pcSlice->getSPS()->getNumReorderPics(pcSlice->getTLayer());     // m_uiMaxDecPicBuffering has the space for the picture currently being decoded
    240 #else
    241   m_iMaxRefPicNum = pcSlice->getSPS()->getMaxDecPicBuffering(pcSlice->getTLayer())+pcSlice->getSPS()->getNumReorderPics(pcSlice->getTLayer()) + 1; // +1 to have space for the picture currently being decoded
    242 #endif
     243  m_iMaxRefPicNum = pcSlice->getSPS()->getMaxDecPicBuffering(pcSlice->getTLayer());     // m_uiMaxDecPicBuffering has the space for the picture currently being decoded
    243244  if (m_cListPic.size() < (UInt)m_iMaxRefPicNum)
    244245  {
     
    248249    if(m_layerId > 0)
    249250    {
    250 #if VPS_EXTN_DIRECT_REF_LAYERS_CONTINUE
    251       TDecTop *pcTDecTopBase = (TDecTop *)getRefLayerDec( m_layerId );
    252 #else
    253       TDecTop *pcTDecTopBase = (TDecTop *)getLayerDec( m_layerId-1 );
    254 #endif
    255       //TComPic*                      pcPic = *(pcTDecTopBase->getListPic()->begin());
    256       TComPicYuv* pcPicYuvRecBase = (*(pcTDecTopBase->getListPic()->begin()))->getPicYuvRec();
    257       if(pcPicYuvRecBase->getWidth() != pcSlice->getSPS()->getPicWidthInLumaSamples() || pcPicYuvRecBase->getHeight() != pcSlice->getSPS()->getPicHeightInLumaSamples() )
    258       {
    259         rpcPic->setSpatialEnhLayerFlag( true );
     251      for(UInt i = 0; i < pcSlice->getVPS()->getNumDirectRefLayers( m_layerId ); i++ )
     252      {
     253        const Window scalEL = pcSlice->getSPS()->getScaledRefLayerWindow(i);
     254        Bool zeroOffsets = ( scalEL.getWindowLeftOffset() == 0 && scalEL.getWindowRightOffset() == 0 && scalEL.getWindowTopOffset() == 0 && scalEL.getWindowBottomOffset() == 0 );
     255
     256#if VPS_EXTN_DIRECT_REF_LAYERS
     257        TDecTop *pcTDecTopBase = (TDecTop *)getRefLayerDec( i );
     258#else
     259        TDecTop *pcTDecTopBase = (TDecTop *)getLayerDec( m_layerId-1 );
     260#endif
     261        //TComPic*                      pcPic = *(pcTDecTopBase->getListPic()->begin());
     262        TComPicYuv* pcPicYuvRecBase = (*(pcTDecTopBase->getListPic()->begin()))->getPicYuvRec();
     263        if(pcPicYuvRecBase->getWidth() != pcSlice->getSPS()->getPicWidthInLumaSamples() || pcPicYuvRecBase->getHeight() != pcSlice->getSPS()->getPicHeightInLumaSamples() || !zeroOffsets )
     264        {
     265          rpcPic->setSpatialEnhLayerFlag( i, true );
     266
     267          //only for scalable extension
     268          assert( pcSlice->getVPS()->getScalabilityMask(1) == true );
     269        }
     270#if MAX_ONE_RESAMPLING_DIRECT_LAYERS
     271        if(pcSlice->getVPS()->getScalabilityMask(1))
     272        {
     273          pcSlice->setPic(rpcPic);
     274        }
     275#endif
    260276      }
    261277    }
     
    456472  m_apcSlicePilot->setPPS(pps);
    457473  m_apcSlicePilot->setSPS(sps);
    458 
    459474  pps->setSPS(sps);
    460475  pps->setNumSubstreams(pps->getEntropyCodingSyncEnabledFlag() ? ((sps->getPicHeightInLumaSamples() + sps->getMaxCUHeight() - 1) / sps->getMaxCUHeight()) * (pps->getNumColumnsMinus1() + 1) : 1);
     
    518533  m_apcSlicePilot->setTLayerInfo(nalu.m_temporalId);
    519534
    520 #if SVC_EXTENSION
     535#if VPS_EXTN_DIRECT_REF_LAYERS && M0457_PREDICTION_INDICATIONS
     536  setRefLayerParams(m_apcSlicePilot->getVPS());
     537#endif
     538#if REF_IDX_FRAMEWORK && M0457_COL_PICTURE_SIGNALING
     539  m_apcSlicePilot->setNumMotionPredRefLayers(m_numMotionPredRefLayers);
     540#endif
     541
     542#if SVC_EXTENSION
     543#if M0457_IL_SAMPLE_PRED_ONLY_FLAG
     544  m_apcSlicePilot->setNumSamplePredRefLayers( getNumSamplePredRefLayers() );
     545#endif
    521546  m_cEntropyDecoder.decodeSliceHeader (m_apcSlicePilot, &m_parameterSetManagerDecoder[m_layerId]);
    522547#else
     
    803828    if(m_layerId > 0)
    804829    {
     830      for( i = 0; i < pcSlice->getActiveNumILRRefIdx(); i++ )
     831      {
     832        UInt refLayerIdc = pcSlice->getInterLayerPredLayerIdc(i);
    805833#if AVC_BASE
    806       if( m_parameterSetManagerDecoder[0].getActiveVPS()->getAvcBaseLayerFlag() )
    807       {
    808         pcSlice->setBaseColPic ( *m_ppcTDecTop[0]->getListPic()->begin() );
     834        if( pcSlice->getVPS()->getRefLayerId( m_layerId, refLayerIdc ) == 0 && m_parameterSetManagerDecoder[0].getActiveVPS()->getAvcBaseLayerFlag() )
     835        {
     836          pcSlice->setBaseColPic ( refLayerIdc, *m_ppcTDecTop[0]->getListPic()->begin() );
    809837#if AVC_SYNTAX
    810         TComPic* pBLPic = pcSlice->getBaseColPic();
    811         if( pcSlice->getPOC() == 0 )
     838          TComPic* pBLPic = pcSlice->getBaseColPic(refLayerIdc);
     839          if( pcSlice->getPOC() == 0 )
     840          {
     841            // initialize partition order.
     842            UInt* piTmp = &g_auiZscanToRaster[0];
     843            initZscanToRaster( pBLPic->getPicSym()->getMaxDepth() + 1, 1, 0, piTmp );
     844            initRasterToZscan( pBLPic->getPicSym()->getMaxCUWidth(), pBLPic->getPicSym()->getMaxCUHeight(), pBLPic->getPicSym()->getMaxDepth() + 1 );
     845          }     
     846          pBLPic->getSlice( 0 )->initBaseLayerRPL( pcSlice );
     847          pBLPic->readBLSyntax( m_ppcTDecTop[0]->getBLSyntaxFile(), SYNTAX_BYTES );
     848#endif
     849        }
     850        else
    812851        {
    813           // initialize partition order.
    814           UInt* piTmp = &g_auiZscanToRaster[0];
    815           initZscanToRaster( pBLPic->getPicSym()->getMaxDepth() + 1, 1, 0, piTmp );
    816           initRasterToZscan( pBLPic->getPicSym()->getMaxCUWidth(), pBLPic->getPicSym()->getMaxCUHeight(), pBLPic->getPicSym()->getMaxDepth() + 1 );
    817         }     
    818         pBLPic->getSlice( 0 )->initBaseLayerRPL( pcSlice );
    819         pBLPic->readBLSyntax( m_ppcTDecTop[0]->getBLSyntaxFile(), SYNTAX_BYTES );
    820 #endif
    821       }
    822       else
    823       {
    824 #if VPS_EXTN_DIRECT_REF_LAYERS_CONTINUE
    825         TDecTop *pcTDecTop = (TDecTop *)getRefLayerDec( m_layerId );
     852#if VPS_EXTN_DIRECT_REF_LAYERS
     853          TDecTop *pcTDecTop = (TDecTop *)getRefLayerDec( refLayerIdc );
     854#else
     855          TDecTop *pcTDecTop = (TDecTop *)getLayerDec( m_layerId-1 );
     856#endif
     857          TComList<TComPic*> *cListPic = pcTDecTop->getListPic();
     858          pcSlice->setBaseColPic ( *cListPic, refLayerIdc );
     859        }
     860#else
     861#if VPS_EXTN_DIRECT_REF_LAYERS
     862        TDecTop *pcTDecTop = (TDecTop *)getRefLayerDec( refLayerIdc );
    826863#else
    827864        TDecTop *pcTDecTop = (TDecTop *)getLayerDec( m_layerId-1 );
    828865#endif
    829866        TComList<TComPic*> *cListPic = pcTDecTop->getListPic();
    830         pcSlice->setBaseColPic ( *cListPic, m_layerId );
    831       }
    832 #else
    833 #if VPS_EXTN_DIRECT_REF_LAYERS_CONTINUE
    834       TDecTop *pcTDecTop = (TDecTop *)getRefLayerDec( m_layerId );
    835 #else
    836       TDecTop *pcTDecTop = (TDecTop *)getLayerDec( m_layerId-1 );
    837 #endif
    838       TComList<TComPic*> *cListPic = pcTDecTop->getListPic();
    839       pcSlice->setBaseColPic ( *cListPic, m_layerId );
    840 #endif
     867        pcSlice->setBaseColPic ( *cListPic, refLayerIdc );
     868#endif
     869
     870#if SIMPLIFIED_MV_POS_SCALING
     871#if SCALED_REF_LAYER_OFFSETS
     872        const Window &scalEL = pcSlice->getSPS()->getScaledRefLayerWindow(refLayerIdc);
     873
     874        Int widthBL   = pcSlice->getBaseColPic(refLayerIdc)->getPicYuvRec()->getWidth();
     875        Int heightBL  = pcSlice->getBaseColPic(refLayerIdc)->getPicYuvRec()->getHeight();
     876
     877        Int widthEL   = pcPic->getPicYuvRec()->getWidth()  - scalEL.getWindowLeftOffset() - scalEL.getWindowRightOffset();
     878        Int heightEL  = pcPic->getPicYuvRec()->getHeight() - scalEL.getWindowTopOffset()  - scalEL.getWindowBottomOffset();
     879#else
     880        const Window &confBL = pcSlice->getBaseColPic()->getPicYuvRec()->getConformanceWindow();
     881        const Window &confEL = pcPic->getPicYuvRec()->getConformanceWindow();
     882
     883        Int widthBL   = pcSlice->getBaseColPic()->getPicYuvRec()->getWidth () - confBL.getWindowLeftOffset() - confBL.getWindowRightOffset();
     884        Int heightBL  = pcSlice->getBaseColPic()->getPicYuvRec()->getHeight() - confBL.getWindowTopOffset() - confBL.getWindowBottomOffset();
     885
     886        Int widthEL   = pcPic->getPicYuvRec()->getWidth() - confEL.getWindowLeftOffset() - confEL.getWindowRightOffset();
     887        Int heightEL  = pcPic->getPicYuvRec()->getHeight() - confEL.getWindowTopOffset() - confEL.getWindowBottomOffset();
     888#endif
     889        g_mvScalingFactor[refLayerIdc][0] = widthEL  == widthBL  ? 4096 : Clip3(-4096, 4095, ((widthEL  << 8) + (widthBL  >> 1)) / widthBL);
     890        g_mvScalingFactor[refLayerIdc][1] = heightEL == heightBL ? 4096 : Clip3(-4096, 4095, ((heightEL << 8) + (heightBL >> 1)) / heightBL);
     891
     892        g_posScalingFactor[refLayerIdc][0] = ((widthBL  << 16) + (widthEL  >> 1)) / widthEL;
     893        g_posScalingFactor[refLayerIdc][1] = ((heightBL << 16) + (heightEL >> 1)) / heightEL;
     894#endif
     895
    841896#if SVC_UPSAMPLING
    842       if ( pcPic->isSpatialEnhLayer())
    843       {   
     897        if( pcPic->isSpatialEnhLayer(refLayerIdc) )
     898        {   
    844899#if SCALED_REF_LAYER_OFFSETS
    845         m_cPrediction.upsampleBasePic( pcPic->getFullPelBaseRec(), pcSlice->getBaseColPic()->getPicYuvRec(), pcPic->getPicYuvRec(), pcSlice->getSPS()->getScaledRefLayerWindow() );
    846 #else
    847         m_cPrediction.upsampleBasePic( pcPic->getFullPelBaseRec(), pcSlice->getBaseColPic()->getPicYuvRec(), pcPic->getPicYuvRec() );
    848 #endif
    849       }
    850       else
    851       {
    852         pcPic->setFullPelBaseRec( pcSlice->getBaseColPic()->getPicYuvRec() );
    853       }
    854       pcSlice->setFullPelBaseRec ( pcPic->getFullPelBaseRec() );
    855 #endif
     900          m_cPrediction.upsampleBasePic( refLayerIdc, pcPic->getFullPelBaseRec(refLayerIdc), pcSlice->getBaseColPic(refLayerIdc)->getPicYuvRec(), pcPic->getPicYuvRec(), pcSlice->getSPS()->getScaledRefLayerWindow(refLayerIdc) );
     901#else
     902          m_cPrediction.upsampleBasePic( refLayerIdc, pcPic->getFullPelBaseRec(refLayerIdc), pcSlice->getBaseColPic(refLayerIdc)->getPicYuvRec(), pcPic->getPicYuvRec() );
     903#endif
     904        }
     905        else
     906        {
     907          pcPic->setFullPelBaseRec( refLayerIdc, pcSlice->getBaseColPic(refLayerIdc)->getPicYuvRec() );
     908        }
     909        pcSlice->setFullPelBaseRec ( refLayerIdc, pcPic->getFullPelBaseRec(refLayerIdc) );
     910#endif
     911      }
    856912    }
    857913
    858914#if REF_IDX_FRAMEWORK
     915#if ZERO_NUM_DIRECT_LAYERS
     916    if( m_layerId > 0 && pcSlice->getActiveNumILRRefIdx() )
     917#else
    859918    if(m_layerId > 0)
     919#endif
    860920    {
    861921      setILRPic(pcPic);
    862922#if REF_IDX_MFM
     923#if M0457_COL_PICTURE_SIGNALING
     924      if( pcSlice->getMFMEnabledFlag() )
     925#else
    863926      if( pcSlice->getSPS()->getMFMEnabledFlag() )
     927#endif
    864928      {
    865929        pcSlice->setRefPOCListILP(m_ppcTDecTop[m_layerId]->m_cIlpPic, pcSlice->getBaseColPic());
     930#if M0457_COL_PICTURE_SIGNALING
     931        pcSlice->setMotionPredIlp(getMotionPredIlp(pcSlice));
     932#endif
    866933      }
    867934#endif
    868935      pcSlice->setRefPicList( m_cListPic, false, m_cIlpPic);
    869936    }
     937#if M0040_ADAPTIVE_RESOLUTION_CHANGE
     938    else if ( m_layerId > 0 )
     939    {
     940      pcSlice->setRefPicList( m_cListPic, false, NULL);
     941    }
     942#endif
    870943#endif
    871944
     
    913986    //---------------
    914987    pcSlice->setRefPOCList();
    915 #if !L0034_COMBINED_LIST_CLEANUP
    916     pcSlice->setNoBackPredFlag( false );
    917     if ( pcSlice->getSliceType() == B_SLICE )
    918     {
    919       if ( pcSlice->getNumRefIdx(RefPicList( 0 ) ) == pcSlice->getNumRefIdx(RefPicList( 1 ) ) )
    920       {
    921         pcSlice->setNoBackPredFlag( true );
    922         for ( i=0; i < pcSlice->getNumRefIdx(RefPicList( 1 ) ); i++ )
    923         {
    924           if ( pcSlice->getRefPOC(RefPicList(1), i) != pcSlice->getRefPOC(RefPicList(0), i) )
    925           {
    926             pcSlice->setNoBackPredFlag( false );
    927             break;
    928           }
    929         }
    930       }
    931     }
    932 #endif
    933988  }
    934989
     
    9551010  }
    9561011
    957 #if SIMPLIFIED_MV_POS_SCALING
    958   if (m_layerId > 0)
    959   {
    960 #if SCALED_REF_LAYER_OFFSETS
    961     const Window &scalEL = pcSlice->getSPS()->getScaledRefLayerWindow();
    962 
    963     Int widthBL   = pcSlice->getBaseColPic()->getPicYuvRec()->getWidth();
    964     Int heightBL  = pcSlice->getBaseColPic()->getPicYuvRec()->getHeight();
    965 
    966     Int widthEL   = pcPic->getPicYuvRec()->getWidth()  - scalEL.getWindowLeftOffset() - scalEL.getWindowRightOffset();
    967     Int heightEL  = pcPic->getPicYuvRec()->getHeight() - scalEL.getWindowTopOffset()  - scalEL.getWindowBottomOffset();
    968 #else
    969     const Window &confBL = pcSlice->getBaseColPic()->getPicYuvRec()->getConformanceWindow();
    970     const Window &confEL = pcPic->getPicYuvRec()->getConformanceWindow();
    971 
    972     Int widthBL   = pcSlice->getBaseColPic()->getPicYuvRec()->getWidth () - confBL.getWindowLeftOffset() - confBL.getWindowRightOffset();
    973     Int heightBL  = pcSlice->getBaseColPic()->getPicYuvRec()->getHeight() - confBL.getWindowTopOffset() - confBL.getWindowBottomOffset();
    974 
    975     Int widthEL   = pcPic->getPicYuvRec()->getWidth() - confEL.getWindowLeftOffset() - confEL.getWindowRightOffset();
    976     Int heightEL  = pcPic->getPicYuvRec()->getHeight() - confEL.getWindowTopOffset() - confEL.getWindowBottomOffset();
    977 #endif
    978     g_mvScalingFactor[m_layerId][0] = Clip3(-4096, 4095, ((widthEL  << 8) + (widthBL  >> 1)) / widthBL);
    979     g_mvScalingFactor[m_layerId][1] = Clip3(-4096, 4095, ((heightEL << 8) + (heightBL >> 1)) / heightBL);
    980 
    981     g_posScalingFactor[m_layerId][0] = ((widthBL  << 16) + (widthEL  >> 1)) / widthEL;
    982     g_posScalingFactor[m_layerId][1] = ((heightBL << 16) + (heightEL >> 1)) / heightEL;
    983   }
    984 #endif
    985 
    9861012  //  Decode a picture
    9871013  m_cGopDecoder.decompressSlice(nalu.m_Bitstream, pcPic);
     
    10111037  sps->setLayerId(m_layerId);
    10121038#endif
     1039#if SPS_SUB_LAYER_INFO
     1040  m_cEntropyDecoder.decodeSPS( sps, &m_parameterSetManagerDecoder[0] );
     1041#else
    10131042  m_cEntropyDecoder.decodeSPS( sps );
     1043#endif
    10141044#if SVC_EXTENSION
    10151045  m_parameterSetManagerDecoder[m_layerId].storePrefetchedSPS(sps);
     
    10541084  if(nalUnitType == NAL_UNIT_SUFFIX_SEI)
    10551085  {
     1086#if M0043_LAYERS_PRESENT_SEI
     1087    m_seiReader.parseSEImessage( bs, m_pcPic->getSEIs(), nalUnitType, m_parameterSetManagerDecoder[m_layerId].getActiveVPS(), m_parameterSetManagerDecoder[m_layerId].getActiveSPS() );
     1088#else
    10561089    m_seiReader.parseSEImessage( bs, m_pcPic->getSEIs(), nalUnitType, m_parameterSetManagerDecoder[m_layerId].getActiveSPS() );
     1090#endif
    10571091  }
    10581092  else
    10591093  {
     1094#if M0043_LAYERS_PRESENT_SEI
     1095    m_seiReader.parseSEImessage( bs, m_SEIs, nalUnitType, m_parameterSetManagerDecoder[m_layerId].getActiveVPS(), m_parameterSetManagerDecoder[m_layerId].getActiveSPS() );
     1096#else
    10601097    m_seiReader.parseSEImessage( bs, m_SEIs, nalUnitType, m_parameterSetManagerDecoder[m_layerId].getActiveSPS() );
     1098#endif
    10611099    SEIMessages activeParamSets = getSeisByType(m_SEIs, SEI::ACTIVE_PARAMETER_SETS);
    10621100    if (activeParamSets.size()>0)
     
    10741112  if(nalUnitType == NAL_UNIT_SUFFIX_SEI)
    10751113  {
     1114#if M0043_LAYERS_PRESENT_SEI
     1115    m_seiReader.parseSEImessage( bs, m_pcPic->getSEIs(), nalUnitType, m_parameterSetManagerDecoder.getActiveVPS(), m_parameterSetManagerDecoder.getActiveSPS() );
     1116#else
    10761117    m_seiReader.parseSEImessage( bs, m_pcPic->getSEIs(), nalUnitType, m_parameterSetManagerDecoder.getActiveSPS() );
     1118#endif
    10771119  }
    10781120  else
    10791121  {
     1122#if M0043_LAYERS_PRESENT_SEI
     1123    m_seiReader.parseSEImessage( bs, m_SEIs, nalUnitType, m_parameterSetManagerDecoder.getActiveVPS(), m_parameterSetManagerDecoder.getActiveSPS() );
     1124#else
    10801125    m_seiReader.parseSEImessage( bs, m_SEIs, nalUnitType, m_parameterSetManagerDecoder.getActiveSPS() );
     1126#endif
    10811127    SEIMessages activeParamSets = getSeisByType(m_SEIs, SEI::ACTIVE_PARAMETER_SETS);
    10821128    if (activeParamSets.size()>0)
     
    12691315}
    12701316
    1271 #if VPS_EXTN_DIRECT_REF_LAYERS_CONTINUE
    1272 TDecTop* TDecTop::getRefLayerDec( UInt layerId )
     1317#if VPS_EXTN_DIRECT_REF_LAYERS
     1318TDecTop* TDecTop::getRefLayerDec( UInt refLayerIdc )
    12731319{
    12741320  TComVPS* vps = m_parameterSetManagerDecoder[0].getActiveVPS();
     
    12811327#endif
    12821328  }
    1283 
    1284   // currently only one reference layer is supported
    1285   assert( vps->getNumDirectRefLayers( m_layerId ) == 1 );
    1286 #if JCTVC_M0458_INTERLAYER_RPS_SIG
    1287   assert( vps->getMaxOneActiveRefLayerFlag() == 1 );
    1288 #endif
    1289  
    1290   return (TDecTop *)getLayerDec( vps->getRefLayerId( m_layerId, 0 ) );
     1329 
     1330  return (TDecTop *)getLayerDec( vps->getRefLayerId( m_layerId, refLayerIdc ) );
     1331}
     1332#endif
     1333
     1334#if VPS_EXTN_DIRECT_REF_LAYERS && M0457_PREDICTION_INDICATIONS
     1335
     1336Void TDecTop::setRefLayerParams( TComVPS* vps )
     1337{
     1338  for(UInt layer = 0; layer < m_numLayer; layer++)
     1339  {
     1340    TDecTop *decTop = (TDecTop *)getLayerDec(layer);
     1341    decTop->setNumSamplePredRefLayers(0);
     1342    decTop->setNumMotionPredRefLayers(0);
     1343    decTop->setNumDirectRefLayers(0);
     1344    for(Int i = 0; i < MAX_VPS_LAYER_ID_PLUS1; i++)
     1345    {
     1346      decTop->setSamplePredEnabledFlag(i, false);
     1347      decTop->setMotionPredEnabledFlag(i, false);
     1348      decTop->setSamplePredRefLayerId(i, 0);
     1349      decTop->setMotionPredRefLayerId(i, 0);
     1350    }
     1351    for(Int j = 0; j < layer; j++)
     1352    {
     1353      if (vps->getDirectDependencyFlag(layer, j))
     1354      {
     1355        decTop->setRefLayerId(decTop->getNumDirectRefLayers(), vps->getLayerIdInNuh(layer));
     1356        decTop->setNumDirectRefLayers(decTop->getNumDirectRefLayers() + 1);
     1357
     1358        Int samplePredEnabledFlag = (vps->getDirectDependencyType(layer, j) + 1) & 1;
     1359        decTop->setSamplePredEnabledFlag(j, samplePredEnabledFlag == 1 ? true : false);
     1360        decTop->setNumSamplePredRefLayers(decTop->getNumSamplePredRefLayers() + samplePredEnabledFlag);
     1361
     1362        Int motionPredEnabledFlag = ((vps->getDirectDependencyType(layer, j) + 1) & 2) >> 1;
     1363        decTop->setMotionPredEnabledFlag(j, motionPredEnabledFlag == 1 ? true : false);
     1364        decTop->setNumMotionPredRefLayers(decTop->getNumMotionPredRefLayers() + motionPredEnabledFlag);
     1365      }
     1366    }
     1367  }
     1368  for ( Int i = 1, mIdx = 0, sIdx = 0; i < m_numLayer; i++ )
     1369  {
     1370    Int iNuhLId = vps->getLayerIdInNuh(i);
     1371    TDecTop *decTop = (TDecTop *)getLayerDec(iNuhLId);
     1372    for ( Int j = 0; j < i; j++ )
     1373    {
     1374      if (decTop->getMotionPredEnabledFlag(j))
     1375      {
     1376        decTop->setMotionPredRefLayerId(mIdx++, vps->getLayerIdInNuh(j));
     1377      }
     1378      if (decTop->getSamplePredEnabledFlag(j))
     1379      {
     1380        decTop->setSamplePredRefLayerId(sIdx++, vps->getLayerIdInNuh(j));
     1381      }
     1382    }
     1383  }
     1384}
     1385
     1386#endif
     1387
     1388#if M0457_COL_PICTURE_SIGNALING
     1389TComPic* TDecTop::getMotionPredIlp(TComSlice* pcSlice)
     1390{
     1391  TComPic* ilpPic = NULL;
     1392  Int activeMotionPredReflayerIdx = 0;
     1393
     1394  for( Int i = 0; i < pcSlice->getActiveNumILRRefIdx(); i++ )
     1395  {
     1396    UInt refLayerIdc = pcSlice->getInterLayerPredLayerIdc(i);
     1397    if( getMotionPredEnabledFlag( pcSlice->getVPS()->getRefLayerId( m_layerId, refLayerIdc ) ) )
     1398    {
     1399      if (activeMotionPredReflayerIdx == pcSlice->getColRefLayerIdx())
     1400      {
     1401        ilpPic = m_cIlpPic[refLayerIdc];
     1402        break;
     1403      }
     1404      else
     1405      {
     1406        activeMotionPredReflayerIdx++;
     1407      }
     1408    }
     1409  }
     1410
     1411  assert(ilpPic != NULL);
     1412
     1413  return ilpPic;
    12911414}
    12921415#endif
  • trunk/source/Lib/TLibDecoder/TDecTop.h

    r191 r310  
    120120  Int                     m_iBLSourceHeight;
    121121#endif
     122#if VPS_EXTN_DIRECT_REF_LAYERS && M0457_PREDICTION_INDICATIONS
     123  Int                     m_numDirectRefLayers;
     124  Int                     m_refLayerId[MAX_VPS_LAYER_ID_PLUS1];
     125  Int                     m_numSamplePredRefLayers;
     126  Int                     m_samplePredRefLayerId[MAX_VPS_LAYER_ID_PLUS1];
     127  Int                     m_numMotionPredRefLayers;
     128  Int                     m_motionPredRefLayerId[MAX_VPS_LAYER_ID_PLUS1];
     129  Bool                    m_samplePredEnabledFlag[MAX_VPS_LAYER_ID_PLUS1];
     130  Bool                    m_motionPredEnabledFlag[MAX_VPS_LAYER_ID_PLUS1];
     131#endif
    122132#endif
    123133#if AVC_SYNTAX || SYNTAX_OUTPUT
     
    156166  Void      setLayerDec(TDecTop **p)    { m_ppcTDecTop = p; }
    157167  TDecTop*  getLayerDec(UInt layer)     { return m_ppcTDecTop[layer]; }
    158 #if VPS_EXTN_DIRECT_REF_LAYERS_CONTINUE
    159   TDecTop*  getRefLayerDec(UInt layerId);
     168#if VPS_EXTN_DIRECT_REF_LAYERS
     169  TDecTop*  getRefLayerDec(UInt refLayerIdc);
     170#if M0457_PREDICTION_INDICATIONS
     171  Int       getNumDirectRefLayers           ()                              { return m_numDirectRefLayers;      }
     172  Void      setNumDirectRefLayers           (Int num)                       { m_numDirectRefLayers = num;       }
     173
     174  Int       getRefLayerId                   (Int i)                         { return m_refLayerId[i];           }
     175  Void      setRefLayerId                   (Int i, Int refLayerId)         { m_refLayerId[i] = refLayerId;     }
     176
     177  Int       getNumSamplePredRefLayers       ()                              { return m_numSamplePredRefLayers;  }
     178  Void      setNumSamplePredRefLayers       (Int num)                       { m_numSamplePredRefLayers = num;   }
     179
     180  Int       getSamplePredRefLayerId         (Int i)                         { return m_samplePredRefLayerId[i];       }
     181  Void      setSamplePredRefLayerId         (Int i, Int refLayerId)         { m_samplePredRefLayerId[i] = refLayerId; }
     182
     183  Int       getNumMotionPredRefLayers       ()                              { return m_numMotionPredRefLayers;  }
     184  Void      setNumMotionPredRefLayers       (Int num)                       { m_numMotionPredRefLayers = num;   }
     185
     186  Int       getMotionPredRefLayerId         (Int i)                         { return m_motionPredRefLayerId[i];       }
     187  Void      setMotionPredRefLayerId         (Int i, Int refLayerId)         { m_motionPredRefLayerId[i] = refLayerId; }
     188
     189  Bool      getSamplePredEnabledFlag        (Int i)                         { return m_samplePredEnabledFlag[i];  }
     190  Void      setSamplePredEnabledFlag        (Int i,Bool flag)               { m_samplePredEnabledFlag[i] = flag;  }
     191
     192  Bool      getMotionPredEnabledFlag        (Int i)                         { return m_motionPredEnabledFlag[i];  }
     193  Void      setMotionPredEnabledFlag        (Int i,Bool flag)               { m_motionPredEnabledFlag[i] = flag;  }
     194
     195  TDecTop*  getSamplePredRefLayerDec        ( UInt layerId );
     196  TDecTop*  getMotionPredRefLayerDec        ( UInt layerId );
     197
     198  Void      setRefLayerParams( TComVPS* vps );
     199#endif
    160200#endif
    161201#if AVC_BASE
     
    190230  Void      xDecodePPS();
    191231  Void      xDecodeSEI( TComInputBitstream* bs, const NalUnitType nalUnitType );
     232#if M0457_COL_PICTURE_SIGNALING
     233  TComPic*  getMotionPredIlp(TComSlice* pcSlice);
     234#endif
    192235
    193236};// END CLASS DEFINITION TDecTop
Note: See TracChangeset for help on using the changeset viewer.