Changeset 1413 in 3DVCSoftware for trunk/source/Lib/TLibDecoder/TDecCAVLC.cpp


Ignore:
Timestamp:
11 Jul 2018, 15:19:49 (7 years ago)
Author:
tech
Message:

Merged HTM-16.2-dev@1412

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/Lib/TLibDecoder/TDecCAVLC.cpp

    r1405 r1413  
    44* granted under this license.
    55*
    6 * Copyright (c) 2010-2016, ITU/ISO/IEC
     6* Copyright (c) 2010-2017, ITU/ISO/IEC
    77* All rights reserved.
    88*
     
    4343#include "TLibCommon/TComCodingStatistics.h"
    4444#endif
     45#include "TDecConformance.h"
     46
    4547#if NH_MV
    4648#include "TDecTop.h"
     
    244246  Int   iCode;
    245247
    246   READ_UVLC( uiCode, "pps_pic_parameter_set_id");
     248  READ_UVLC_CHK( uiCode, "pps_pic_parameter_set_id", 0, 63);
    247249  assert(uiCode <= 63);
    248250  pcPPS->setPPSId (uiCode);
    249251
    250   READ_UVLC( uiCode, "pps_seq_parameter_set_id");
     252  READ_UVLC_CHK( uiCode, "pps_seq_parameter_set_id", 0, 15);
    251253  assert(uiCode <= 15);
    252254  pcPPS->setSPSId (uiCode);
     
    258260  READ_CODE(3, uiCode, "num_extra_slice_header_bits");                pcPPS->setNumExtraSliceHeaderBits(uiCode);
    259261
    260   READ_FLAG ( uiCode, "sign_data_hiding_flag" ); pcPPS->setSignHideFlag( uiCode );
     262  READ_FLAG ( uiCode, "sign_data_hiding_enabled_flag" );              pcPPS->setSignDataHidingEnabledFlag( uiCode );
    261263
    262264  READ_FLAG( uiCode,   "cabac_init_present_flag" );            pcPPS->setCabacInitPresentFlag( uiCode ? true : false );
    263265
    264   READ_UVLC(uiCode, "num_ref_idx_l0_default_active_minus1");
     266  READ_UVLC_CHK(uiCode, "num_ref_idx_l0_default_active_minus1", 0, 14);
    265267  assert(uiCode <= 14);
    266268  pcPPS->setNumRefIdxL0DefaultActive(uiCode+1);
    267269
    268   READ_UVLC(uiCode, "num_ref_idx_l1_default_active_minus1");
     270  READ_UVLC_CHK(uiCode, "num_ref_idx_l1_default_active_minus1", 0, 14);
    269271  assert(uiCode <= 14);
    270272  pcPPS->setNumRefIdxL1DefaultActive(uiCode+1);
    271273
    272   READ_SVLC(iCode, "init_qp_minus26" );                            pcPPS->setPicInitQPMinus26(iCode);
     274  READ_SVLC_CHK(iCode, "init_qp_minus26", std::numeric_limits<Int>::min(), 25 );  pcPPS->setPicInitQPMinus26(iCode);
    273275  READ_FLAG( uiCode, "constrained_intra_pred_flag" );              pcPPS->setConstrainedIntraPred( uiCode ? true : false );
    274276  READ_FLAG( uiCode, "transform_skip_enabled_flag" );
     
    285287    pcPPS->setMaxCuDQPDepth( 0 );
    286288  }
    287   READ_SVLC( iCode, "pps_cb_qp_offset");
     289  READ_SVLC_CHK( iCode, "pps_cb_qp_offset", -12, 12);
    288290  pcPPS->setQpOffset(COMPONENT_Cb, iCode);
    289291  assert( pcPPS->getQpOffset(COMPONENT_Cb) >= -12 );
    290292  assert( pcPPS->getQpOffset(COMPONENT_Cb) <=  12 );
    291293
    292   READ_SVLC( iCode, "pps_cr_qp_offset");
     294  READ_SVLC_CHK( iCode, "pps_cr_qp_offset", -12, 12);
    293295  pcPPS->setQpOffset(COMPONENT_Cr, iCode);
    294296  assert( pcPPS->getQpOffset(COMPONENT_Cr) >= -12 );
     
    305307  pcPPS->setWPBiPred( uiCode==1 );
    306308
    307   READ_FLAG( uiCode, "transquant_bypass_enable_flag");
    308   pcPPS->setTransquantBypassEnableFlag(uiCode ? true : false);
     309  READ_FLAG( uiCode, "transquant_bypass_enabled_flag");
     310  pcPPS->setTransquantBypassEnabledFlag(uiCode ? true : false);
    309311  READ_FLAG( uiCode, "tiles_enabled_flag"               );    pcPPS->setTilesEnabledFlag            ( uiCode == 1 );
    310312  READ_FLAG( uiCode, "entropy_coding_sync_enabled_flag" );    pcPPS->setEntropyCodingSyncEnabledFlag( uiCode == 1 );
     
    344346    }
    345347
    346     if ((tileColumnsMinus1 + tileRowsMinus1) != 0)
    347     {
     348    assert ((tileColumnsMinus1 + tileRowsMinus1) != 0);
    348349      READ_FLAG ( uiCode, "loop_filter_across_tiles_enabled_flag" );   pcPPS->setLoopFilterAcrossTilesEnabledFlag( uiCode ? true : false );
    349350    }
    350   }
    351351  READ_FLAG( uiCode, "pps_loop_filter_across_slices_enabled_flag" );   pcPPS->setLoopFilterAcrossSlicesEnabledFlag( uiCode ? true : false );
    352352  READ_FLAG( uiCode, "deblocking_filter_control_present_flag" );       pcPPS->setDeblockingFilterControlPresentFlag( uiCode ? true : false );
     
    354354  {
    355355    READ_FLAG( uiCode, "deblocking_filter_override_enabled_flag" );    pcPPS->setDeblockingFilterOverrideEnabledFlag( uiCode ? true : false );
    356     READ_FLAG( uiCode, "pps_disable_deblocking_filter_flag" );         pcPPS->setPicDisableDeblockingFilterFlag(uiCode ? true : false );
    357     if(!pcPPS->getPicDisableDeblockingFilterFlag())
     356    READ_FLAG( uiCode, "pps_deblocking_filter_disabled_flag" );        pcPPS->setPPSDeblockingFilterDisabledFlag(uiCode ? true : false );
     357    if(!pcPPS->getPPSDeblockingFilterDisabledFlag())
    358358    {
    359359      READ_SVLC ( iCode, "pps_beta_offset_div2" );                     pcPPS->setDeblockingFilterBetaOffsetDiv2( iCode );
     
    502502                READ_UVLC(uiCode, "diff_cu_chroma_qp_offset_depth"); ppsRangeExtension.setDiffCuChromaQpOffsetDepth(uiCode);
    503503              UInt tableSizeMinus1 = 0;
    504               READ_UVLC(tableSizeMinus1, "chroma_qp_offset_list_len_minus1");
     504                READ_UVLC_CHK(tableSizeMinus1, "chroma_qp_offset_list_len_minus1", 0, MAX_QP_OFFSET_LIST_SIZE-1);
    505505              assert(tableSizeMinus1 < MAX_QP_OFFSET_LIST_SIZE);
    506506
     
    509509                Int cbOffset;
    510510                Int crOffset;
    511                 READ_SVLC(cbOffset, "cb_qp_offset_list[i]");
     511                  READ_SVLC_CHK(cbOffset, "cb_qp_offset_list[i]", -12, 12);
    512512                assert(cbOffset >= -12 && cbOffset <= 12);
    513                 READ_SVLC(crOffset, "cr_qp_offset_list[i]");
     513                  READ_SVLC_CHK(crOffset, "cr_qp_offset_list[i]", -12, 12);
    514514                assert(crOffset >= -12 && crOffset <= 12);
    515515                // table uses +1 for index (see comment inside the function)
     
    546546Void TDecCavlc::parsePps3dExtension( TComPPS* pcPPS )
    547547{
    548 #if NH_3D_DLT
    549548  UInt uiCode = 0;
    550549  //
     
    679678    }
    680679  }
    681 #endif
     680
    682681}
    683682#endif
     
    885884  {
    886885#endif
    887   READ_CODE( 3,  uiCode, "sps_max_sub_layers_minus1" );          pcSPS->setMaxTLayers   ( uiCode+1 );
     886  READ_CODE_CHK( 3,  uiCode, "sps_max_sub_layers_minus1", 0, 6 );   pcSPS->setMaxTLayers   ( uiCode+1 );
    888887  assert(uiCode <= 6);
    889888#if NH_MV
     
    902901  {
    903902    // sps_temporal_id_nesting_flag must be 1 when sps_max_sub_layers_minus1 is 0
     903    TDecConformanceCheck::checkRange(uiCode, "sps_temporal_id_nesting_flag", 1U, 1U);
    904904    assert( uiCode == 1 );
    905905  }
     
    911911  }
    912912#endif
    913   READ_UVLC(     uiCode, "sps_seq_parameter_set_id" );           pcSPS->setSPSId( uiCode );
     913  READ_UVLC_CHK( uiCode, "sps_seq_parameter_set_id", 0, 15 );           pcSPS->setSPSId( uiCode );
    914914  assert(uiCode <= 15);
    915915#if NH_MV
     
    926926#endif
    927927
    928   READ_UVLC(     uiCode, "chroma_format_idc" );                  pcSPS->setChromaFormatIdc( ChromaFormat(uiCode) );
     928  READ_UVLC_CHK(     uiCode, "chroma_format_idc", 0, 3 );               pcSPS->setChromaFormatIdc( ChromaFormat(uiCode) );
    929929  assert(uiCode <= 3);
    930930  if( pcSPS->getChromaFormatIdc() == CHROMA_444 )
    931931  {
    932     READ_FLAG(     uiCode, "separate_colour_plane_flag");        assert(uiCode == 0);
    933   }
    934 
    935   READ_UVLC (    uiCode, "pic_width_in_luma_samples" );          pcSPS->setPicWidthInLumaSamples ( uiCode    );
    936   READ_UVLC (    uiCode, "pic_height_in_luma_samples" );         pcSPS->setPicHeightInLumaSamples( uiCode    );
     932    READ_FLAG_CHK(     uiCode, "separate_colour_plane_flag", 0, 0);
     933    assert(uiCode == 0);
     934  }
     935
     936  // pic_width_in_luma_samples and pic_height_in_luma_samples needs conformance checking - multiples of MinCbSizeY
     937  READ_UVLC_CHK (    uiCode, "pic_width_in_luma_samples", 1, std::numeric_limits<UInt>::max()  );  pcSPS->setPicWidthInLumaSamples ( uiCode    );
     938  READ_UVLC_CHK (    uiCode, "pic_height_in_luma_samples", 1, std::numeric_limits<UInt>::max() );  pcSPS->setPicHeightInLumaSamples( uiCode    );
    937939  READ_FLAG(     uiCode, "conformance_window_flag");
    938940  if (uiCode != 0)
     
    948950  }
    949951#else
    950     READ_UVLC(   uiCode, "conf_win_left_offset" );               conf.setWindowLeftOffset  ( uiCode * TComSPS::getWinUnitX( pcSPS->getChromaFormatIdc() ) );
    951     READ_UVLC(   uiCode, "conf_win_right_offset" );              conf.setWindowRightOffset ( uiCode * TComSPS::getWinUnitX( pcSPS->getChromaFormatIdc() ) );
    952     READ_UVLC(   uiCode, "conf_win_top_offset" );                conf.setWindowTopOffset   ( uiCode * TComSPS::getWinUnitY( pcSPS->getChromaFormatIdc() ) );
    953     READ_UVLC(   uiCode, "conf_win_bottom_offset" );             conf.setWindowBottomOffset( uiCode * TComSPS::getWinUnitY( pcSPS->getChromaFormatIdc() ) );
     952    const UInt subWidthC  = TComSPS::getWinUnitX( pcSPS->getChromaFormatIdc() );
     953    const UInt subHeightC = TComSPS::getWinUnitY( pcSPS->getChromaFormatIdc() );
     954    READ_UVLC(   uiCode, "conf_win_left_offset" );               conf.setWindowLeftOffset  ( uiCode * subWidthC );
     955    READ_UVLC(   uiCode, "conf_win_right_offset" );              conf.setWindowRightOffset ( uiCode * subWidthC );
     956    READ_UVLC(   uiCode, "conf_win_top_offset" );                conf.setWindowTopOffset   ( uiCode * subHeightC );
     957    READ_UVLC(   uiCode, "conf_win_bottom_offset" );             conf.setWindowBottomOffset( uiCode * subHeightC );
     958    TDecConformanceCheck::checkRange<UInt>(conf.getWindowLeftOffset()+conf.getWindowRightOffset(), "conformance window width in pixels", 0, pcSPS->getPicWidthInLumaSamples()-1);
    954959#endif
    955960  }
     
    960965#endif
    961966
    962   READ_UVLC(     uiCode, "bit_depth_luma_minus8" );
     967  READ_UVLC_CHK(     uiCode, "bit_depth_luma_minus8", 0, 8 );
     968  assert(uiCode <= 8);
    963969#if O0043_BEST_EFFORT_DECODING
    964970  pcSPS->setStreamBitDepth(CHANNEL_TYPE_LUMA, 8 + uiCode);
     
    968974    uiCode = forceDecodeBitDepth - 8;
    969975  }
    970 #endif
    971976  assert(uiCode <= 8);
     977#endif
    972978  pcSPS->setBitDepth(CHANNEL_TYPE_LUMA, 8 + uiCode);
    973979
     
    978984#endif
    979985
    980   READ_UVLC( uiCode,    "bit_depth_chroma_minus8" );
     986  READ_UVLC_CHK( uiCode,    "bit_depth_chroma_minus8", 0, 8 );
     987  assert(uiCode <= 8);
    981988#if O0043_BEST_EFFORT_DECODING
    982989  pcSPS->setStreamBitDepth(CHANNEL_TYPE_CHROMA, 8 + uiCode);
     
    985992    uiCode = forceDecodeBitDepth - 8;
    986993  }
    987 #endif
    988994  assert(uiCode <= 8);
     995#endif
    989996  pcSPS->setBitDepth(CHANNEL_TYPE_CHROMA, 8 + uiCode);
    990997#if O0043_BEST_EFFORT_DECODING
     
    9971004#endif
    9981005
    999   READ_UVLC( uiCode,    "log2_max_pic_order_cnt_lsb_minus4" );   pcSPS->setBitsForPOC( 4 + uiCode );
    1000   assert(uiCode <= 12);
     1006  READ_UVLC_CHK( uiCode,    "log2_max_pic_order_cnt_lsb_minus4", 0, 12 );   pcSPS->setBitsForPOC( 4 + uiCode );
    10011007
    10021008#if NH_MV
     
    10391045#endif
    10401046
    1041   READ_UVLC( uiCode, "log2_min_luma_coding_block_size_minus3" );
    1042   Int log2MinCUSize = uiCode + 3;
    1043   pcSPS->setLog2MinCodingBlockSize(log2MinCUSize);
    1044   READ_UVLC( uiCode, "log2_diff_max_min_luma_coding_block_size" );
     1047  const UInt maxLog2CtbSize = TDecConformanceCheck::getMaxLog2CtbSize(*(pcSPS->getPTL()));
     1048  const UInt minLog2CtbSize = TDecConformanceCheck::getMinLog2CtbSize(*(pcSPS->getPTL()));
     1049  READ_UVLC_CHK( uiCode, "log2_min_luma_coding_block_size_minus3", 0, maxLog2CtbSize-3 );
     1050  assert(uiCode <= maxLog2CtbSize-3);
     1051  Int minCbLog2SizeY = uiCode + 3;
     1052  pcSPS->setLog2MinCodingBlockSize(minCbLog2SizeY);
     1053 
     1054    // Difference + log2MinCUSize must be <= maxLog2CtbSize
     1055  // Difference + log2MinCUSize must be >= minLog2CtbSize
     1056  const UInt minLog2DiffMaxMinLumaCodingBlockSize = minLog2CtbSize < minCbLog2SizeY ? 0 : minLog2CtbSize - minCbLog2SizeY;
     1057  const UInt maxLog2DiffMaxMinLumaCodingBlockSize = maxLog2CtbSize - minCbLog2SizeY;
     1058
     1059  READ_UVLC_CHK( uiCode, "log2_diff_max_min_luma_coding_block_size", minLog2DiffMaxMinLumaCodingBlockSize, maxLog2DiffMaxMinLumaCodingBlockSize);
     1060  assert(uiCode >= minLog2DiffMaxMinLumaCodingBlockSize && uiCode <= maxLog2DiffMaxMinLumaCodingBlockSize);
    10451061  pcSPS->setLog2DiffMaxMinCodingBlockSize(uiCode);
    1046  
    1047   if (pcSPS->getPTL()->getGeneralPTL()->getLevelIdc() >= Level::LEVEL5)
    1048   {
    1049     assert(log2MinCUSize + pcSPS->getLog2DiffMaxMinCodingBlockSize() >= 5);
    1050   }
    1051  
    1052   Int maxCUDepthDelta = uiCode;
    1053   pcSPS->setMaxCUWidth  ( 1<<(log2MinCUSize + maxCUDepthDelta) );
    1054   pcSPS->setMaxCUHeight ( 1<<(log2MinCUSize + maxCUDepthDelta) );
    1055   READ_UVLC( uiCode, "log2_min_luma_transform_block_size_minus2" );   pcSPS->setQuadtreeTULog2MinSize( uiCode + 2 );
    1056 
    1057   READ_UVLC( uiCode, "log2_diff_max_min_luma_transform_block_size" ); pcSPS->setQuadtreeTULog2MaxSize( uiCode + pcSPS->getQuadtreeTULog2MinSize() );
     1062
     1063  const Int maxCUDepthDelta = uiCode;
     1064  const Int ctbLog2SizeY = minCbLog2SizeY + maxCUDepthDelta;
     1065  pcSPS->setMaxCUWidth  ( 1<<ctbLog2SizeY );
     1066  pcSPS->setMaxCUHeight ( 1<<ctbLog2SizeY );
     1067  READ_UVLC_CHK( uiCode, "log2_min_luma_transform_block_size_minus2", 0, minCbLog2SizeY-1-2 );
     1068  const UInt minTbLog2SizeY = uiCode + 2;
     1069  pcSPS->setQuadtreeTULog2MinSize( minTbLog2SizeY );
     1070
     1071  //  log2_diff <= Min(CtbLog2SizeY, 5) - minTbLog2SizeY
     1072  READ_UVLC_CHK( uiCode, "log2_diff_max_min_luma_transform_block_size", 0, min<UInt>(5U, ctbLog2SizeY) - minTbLog2SizeY );
     1073  pcSPS->setQuadtreeTULog2MaxSize( uiCode + pcSPS->getQuadtreeTULog2MinSize() );
    10581074  pcSPS->setMaxTrSize( 1<<(uiCode + pcSPS->getQuadtreeTULog2MinSize()) );
    10591075
    1060   READ_UVLC( uiCode, "max_transform_hierarchy_depth_inter" );    pcSPS->setQuadtreeTUMaxDepthInter( uiCode+1 );
    1061   READ_UVLC( uiCode, "max_transform_hierarchy_depth_intra" );    pcSPS->setQuadtreeTUMaxDepthIntra( uiCode+1 );
    1062 
    1063   Int addCuDepth = max (0, log2MinCUSize - (Int)pcSPS->getQuadtreeTULog2MinSize() );
     1076  READ_UVLC_CHK( uiCode, "max_transform_hierarchy_depth_inter", 0, ctbLog2SizeY - minTbLog2SizeY);    pcSPS->setQuadtreeTUMaxDepthInter( uiCode+1 );
     1077  READ_UVLC_CHK( uiCode, "max_transform_hierarchy_depth_intra", 0, ctbLog2SizeY - minTbLog2SizeY);    pcSPS->setQuadtreeTUMaxDepthIntra( uiCode+1 );
     1078
     1079  Int addCuDepth = max (0, minCbLog2SizeY - (Int)pcSPS->getQuadtreeTULog2MinSize() );
    10641080  pcSPS->setMaxTotalCUDepth( maxCUDepthDelta + addCuDepth  + getMaxCUDepthOffset(pcSPS->getChromaFormatIdc(), pcSPS->getQuadtreeTULog2MinSize()) );
    10651081
     
    10951111  if( pcSPS->getUsePCM() )
    10961112  {
    1097     READ_CODE( 4, uiCode, "pcm_sample_bit_depth_luma_minus1" );          pcSPS->setPCMBitDepth    ( CHANNEL_TYPE_LUMA, 1 + uiCode );
    1098     READ_CODE( 4, uiCode, "pcm_sample_bit_depth_chroma_minus1" );        pcSPS->setPCMBitDepth    ( CHANNEL_TYPE_CHROMA, 1 + uiCode );
    1099     READ_UVLC( uiCode, "log2_min_pcm_luma_coding_block_size_minus3" );   pcSPS->setPCMLog2MinSize (uiCode+3);
    1100     READ_UVLC( uiCode, "log2_diff_max_min_pcm_luma_coding_block_size" ); pcSPS->setPCMLog2MaxSize ( uiCode+pcSPS->getPCMLog2MinSize() );
     1113#if O0043_BEST_EFFORT_DECODING
     1114    READ_CODE_CHK( 4, uiCode, "pcm_sample_bit_depth_luma_minus1",   0, pcSPS->getStreamBitDepth(CHANNEL_TYPE_LUMA) );    pcSPS->setPCMBitDepth    ( CHANNEL_TYPE_LUMA, 1 + uiCode );
     1115    READ_CODE_CHK( 4, uiCode, "pcm_sample_bit_depth_chroma_minus1", 0, pcSPS->getStreamBitDepth(CHANNEL_TYPE_LUMA) );    pcSPS->setPCMBitDepth    ( CHANNEL_TYPE_CHROMA, 1 + uiCode );
     1116#else
     1117    READ_CODE_CHK( 4, uiCode, "pcm_sample_bit_depth_luma_minus1",   0, pcSPS->getBitDepth(CHANNEL_TYPE_LUMA) );          pcSPS->setPCMBitDepth    ( CHANNEL_TYPE_LUMA, 1 + uiCode );
     1118    READ_CODE_CHK( 4, uiCode, "pcm_sample_bit_depth_chroma_minus1", 0, pcSPS->getBitDepth(CHANNEL_TYPE_CHROMA) );        pcSPS->setPCMBitDepth    ( CHANNEL_TYPE_CHROMA, 1 + uiCode );
     1119#endif
     1120    READ_UVLC_CHK( uiCode, "log2_min_pcm_luma_coding_block_size_minus3", std::min<UInt>(minCbLog2SizeY, 5 )-3, std::min<UInt>(ctbLog2SizeY, 5)-3);
     1121    const UInt log2MinIpcmCbSizeY = uiCode+3;
     1122    pcSPS->setPCMLog2MinSize (log2MinIpcmCbSizeY);
     1123    READ_UVLC_CHK( uiCode, "log2_diff_max_min_pcm_luma_coding_block_size", 0, (std::min<UInt>(ctbLog2SizeY,5) - log2MinIpcmCbSizeY) );
     1124    pcSPS->setPCMLog2MaxSize ( uiCode+pcSPS->getPCMLog2MinSize() );
    11011125    READ_FLAG( uiCode, "pcm_loop_filter_disable_flag" );                 pcSPS->setPCMFilterDisableFlag ( uiCode ? true : false );
    11021126  }
    11031127
    1104   READ_UVLC( uiCode, "num_short_term_ref_pic_sets" );
     1128  READ_UVLC_CHK( uiCode, "num_short_term_ref_pic_sets", 0, 64 );
    11051129
    11061130  assert(uiCode <= 64);
     
    11321156#endif
    11331157  {
    1134     READ_UVLC( uiCode, "num_long_term_ref_pics_sps" );
     1158    READ_UVLC_CHK( uiCode, "num_long_term_ref_pics_sps", 0, 32 );
    11351159    pcSPS->setNumLongTermRefPicSPS(uiCode);
    11361160    for (UInt k = 0; k < pcSPS->getNumLongTermRefPicSPS(); k++)
     
    11421166    }
    11431167  }
    1144   READ_FLAG( uiCode, "sps_temporal_mvp_enable_flag" );            pcSPS->setTMVPFlagsPresent(uiCode);
    1145 
    1146   READ_FLAG( uiCode, "sps_strong_intra_smoothing_enable_flag" );  pcSPS->setUseStrongIntraSmoothing(uiCode);
     1168  READ_FLAG( uiCode, "sps_temporal_mvp_enabled_flag" );           pcSPS->setSPSTemporalMVPEnabledFlag(uiCode);
     1169
     1170  READ_FLAG( uiCode, "strong_intra_smoothing_enable_flag" );      pcSPS->setUseStrongIntraSmoothing(uiCode);
    11471171
    11481172  READ_FLAG( uiCode, "vui_parameters_present_flag" );             pcSPS->setVuiParametersPresentFlag(uiCode);
     
    21352159    for( Int j = 0; j  <=  vps->getMaxSubLayersInLayerSetMinus1( currLsIdx ); j++ )
    21362160    { 
    2137 #if NH_3D_FIX_TICKET_114
    21382161      if( j > 0  &&  dpbSize.getSubLayerFlagInfoPresentFlag( i )  ) 
    2139 #else
    2140       if( j > 0  &&  dpbSize.getSubLayerDpbInfoPresentFlag( i, j )  ) 
    2141 #endif
    21422162      {
    21432163        READ_FLAG( uiCode, "sub_layer_dpb_info_present_flag" ); dpbSize.setSubLayerDpbInfoPresentFlag( i, j, uiCode == 1 );
     
    26112631    pcSlice->setRPS(rps);
    26122632  }
    2613   if (sps->getTMVPFlagsPresent())
     2633      if (sps->getSPSTemporalMVPEnabledFlag())
    26142634  {
    26152635    READ_FLAG( uiCode, "slice_temporal_mvp_enabled_flag" );
     
    28812901    }
    28822902
    2883 #if NH_3D_IC
     2903#if NH_3D
    28842904    else if(    pcSlice->getViewIndex() && ( pcSlice->getSliceType() == P_SLICE || pcSlice->getSliceType() == B_SLICE )
    28852905             && !pcSlice->getIsDepth() && vps->getNumRefListLayers( layerId ) > 0
     
    29032923    {
    29042924      READ_UVLC( uiCode, "five_minus_max_num_merge_cand");
    2905 #if NH_3D_IV_MERGE
     2925#if NH_3D
    29062926      pcSlice->setMaxNumMergeCand(( ( pcSlice->getMpiFlag() || pcSlice->getIvMvPredFlag() || pcSlice->getViewSynthesisPredFlag() ) ? MRG_MAX_NUM_CANDS_MEM : MRG_MAX_NUM_CANDS) - uiCode);
    29072927#else
     
    29602980      if(pcSlice->getDeblockingFilterOverrideFlag())
    29612981      {
    2962         READ_FLAG ( uiCode, "slice_disable_deblocking_filter_flag" );   pcSlice->setDeblockingFilterDisable(uiCode ? 1 : 0);
     2982        READ_FLAG ( uiCode, "slice_deblocking_filter_disabled_flag" );   pcSlice->setDeblockingFilterDisable(uiCode ? 1 : 0);
    29632983        if(!pcSlice->getDeblockingFilterDisable())
    29642984        {
     
    29732993      else
    29742994      {
    2975         pcSlice->setDeblockingFilterDisable   ( pps->getPicDisableDeblockingFilterFlag() );
     2995        pcSlice->setDeblockingFilterDisable       ( pps->getPPSDeblockingFilterDisabledFlag() );
    29762996        pcSlice->setDeblockingFilterBetaOffsetDiv2( pps->getDeblockingFilterBetaOffsetDiv2() );
    29772997        pcSlice->setDeblockingFilterTcOffsetDiv2  ( pps->getDeblockingFilterTcOffsetDiv2() );
     
    32983318    ptl->setIntraConstraintFlag(false);
    32993319    ptl->setLowerBitRateConstraintFlag(true);
     3320    if (ptl->getProfileIdc() == Profile::MAIN10           || ptl->getProfileCompatibilityFlag(Profile::MAIN10))
     3321    {
     3322      READ_CODE(7, uiCode, PTL_TRACE_TEXT("reserved_zero_7bits"     ));
     3323      READ_FLAG(    uiCode, PTL_TRACE_TEXT("one_picture_only_constraint_flag")); ptl->setOnePictureOnlyConstraintFlag(uiCode != 0);
     3324      READ_CODE(16, uiCode, PTL_TRACE_TEXT("reserved_zero_35bits[0..15]"     ));
     3325      READ_CODE(16, uiCode, PTL_TRACE_TEXT("reserved_zero_35bits[16..31]"    ));
     3326      READ_CODE(3,  uiCode, PTL_TRACE_TEXT("reserved_zero_35bits[32..34]"    ));
     3327    }
     3328    else
     3329    {
    33003330    READ_CODE(16, uiCode, PTL_TRACE_TEXT("reserved_zero_43bits[0..15]"     ));
    33013331    READ_CODE(16, uiCode, PTL_TRACE_TEXT("reserved_zero_43bits[16..31]"    ));
    33023332    READ_CODE(11, uiCode, PTL_TRACE_TEXT("reserved_zero_43bits[32..42]"    ));
     3333  }
    33033334  }
    33043335
     
    33553386}
    33563387
    3357 #if NH_3D_DIS
     3388#if NH_3D
    33583389Void TDecCavlc::parseDIS( TComDataCU* /*pcCU*/, UInt /*uiAbsPartIdx*/, UInt /*uiDepth*/ )
    33593390{
     
    34393470  Int  iDQp;
    34403471
    3441 #if RExt__DECODER_DEBUG_BIT_STATISTICS
     3472#if RExt__DECODER_DEBUG_BIT_STATISTICS || ENC_DEC_TRACE
    34423473  READ_SVLC(iDQp, "delta_qp");
    34433474#else
     
    34973528}
    34983529
    3499 #if NH_3D_ARP
     3530#if NH_3D
    35003531Void TDecCavlc::parseARPW( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
    35013532{
    35023533  assert(0);
    35033534}
    3504 #endif
    3505 #if NH_3D_IC
     3535
    35063536Void TDecCavlc::parseICFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
    35073537{
    35083538  assert(0);
    35093539}
    3510 #endif
    3511 #if NH_3D_SDC_INTRA || NH_3D_SDC_INTER
     3540
    35123541Void TDecCavlc::parseSDCFlag    ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
    35133542{
     
    35153544}
    35163545
    3517 #endif
    3518 #if NH_3D_DBBP
    3519   Void TDecCavlc::parseDBBPFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
    3520   {
    3521     assert(0);
    3522   }
     3546Void TDecCavlc::parseDBBPFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
     3547{
     3548  assert(0);
     3549}
    35233550#endif
    35243551// ====================================================================================================================
Note: See TracChangeset for help on using the changeset viewer.