Ignore:
Timestamp:
12 Apr 2018, 11:12:21 (7 years ago)
Author:
tech
Message:
  • Update HM-16.18
  • Cleanups
  • Encoder Extension

-- Representation formats
-- Parameter set sharing
-- GOP configuration

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/HTM-16.2-dev/source/Lib/TLibEncoder/TEncCavlc.cpp

    r1405 r1412  
    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 *
     
    184184  WRITE_FLAG( pcPPS->getOutputFlagPresentFlag() ? 1 : 0,     "output_flag_present_flag" );
    185185  WRITE_CODE( pcPPS->getNumExtraSliceHeaderBits(), 3,        "num_extra_slice_header_bits");
    186   WRITE_FLAG( pcPPS->getSignHideFlag(), "sign_data_hiding_flag" );
     186  WRITE_FLAG( pcPPS->getSignDataHidingEnabledFlag(),         "sign_data_hiding_enabled_flag" );
    187187  WRITE_FLAG( pcPPS->getCabacInitPresentFlag() ? 1 : 0,   "cabac_init_present_flag" );
    188188#if H_3D_PPS_FIX_DEPTH
     
    216216  WRITE_FLAG( pcPPS->getUseWP() ? 1 : 0,  "weighted_pred_flag" );   // Use of Weighting Prediction (P_SLICE)
    217217  WRITE_FLAG( pcPPS->getWPBiPred() ? 1 : 0, "weighted_bipred_flag" );  // Use of Weighting Bi-Prediction (B_SLICE)
    218   WRITE_FLAG( pcPPS->getTransquantBypassEnableFlag() ? 1 : 0, "transquant_bypass_enable_flag" );
     218  WRITE_FLAG( pcPPS->getTransquantBypassEnabledFlag()  ? 1 : 0, "transquant_bypass_enabled_flag" );
    219219  WRITE_FLAG( pcPPS->getTilesEnabledFlag()             ? 1 : 0, "tiles_enabled_flag" );
    220220  WRITE_FLAG( pcPPS->getEntropyCodingSyncEnabledFlag() ? 1 : 0, "entropy_coding_sync_enabled_flag" );
     
    235235      }
    236236    }
    237     if(pcPPS->getNumTileColumnsMinus1() !=0 || pcPPS->getNumTileRowsMinus1() !=0)
    238     {
     237    assert ((pcPPS->getNumTileColumnsMinus1() + pcPPS->getNumTileRowsMinus1()) != 0);
    239238      WRITE_FLAG( pcPPS->getLoopFilterAcrossTilesEnabledFlag()?1 : 0,          "loop_filter_across_tiles_enabled_flag");
    240239    }
    241   }
    242240  WRITE_FLAG( pcPPS->getLoopFilterAcrossSlicesEnabledFlag()?1 : 0,        "pps_loop_filter_across_slices_enabled_flag");
    243241  WRITE_FLAG( pcPPS->getDeblockingFilterControlPresentFlag()?1 : 0,       "deblocking_filter_control_present_flag");
     
    245243  {
    246244    WRITE_FLAG( pcPPS->getDeblockingFilterOverrideEnabledFlag() ? 1 : 0,  "deblocking_filter_override_enabled_flag" );
    247     WRITE_FLAG( pcPPS->getPicDisableDeblockingFilterFlag() ? 1 : 0,       "pps_disable_deblocking_filter_flag" );
    248     if(!pcPPS->getPicDisableDeblockingFilterFlag())
     245    WRITE_FLAG( pcPPS->getPPSDeblockingFilterDisabledFlag() ? 1 : 0,      "pps_deblocking_filter_disabled_flag" );
     246    if(!pcPPS->getPPSDeblockingFilterDisabledFlag())
    249247    {
    250248      WRITE_SVLC( pcPPS->getDeblockingFilterBetaOffsetDiv2(),             "pps_beta_offset_div2" );
     
    392390Void  TEncCavlc::codePps3dExtension        ( const TComPPS* pcPPS )
    393391{
    394 #if NH_3D_DLT
    395392  WRITE_FLAG( pcPPS->getDLT()->getDltPresentFlag() ? 1 : 0, "dlts_present_flag" );
    396393
     
    510507    }
    511508  }
    512 #endif
    513509}
    514510#endif
     
    849845    }
    850846  }
    851   WRITE_FLAG( pcSPS->getTMVPFlagsPresent()  ? 1 : 0,           "sps_temporal_mvp_enable_flag" );
    852 
    853   WRITE_FLAG( pcSPS->getUseStrongIntraSmoothing(),             "sps_strong_intra_smoothing_enable_flag" );
     847  WRITE_FLAG( pcSPS->getSPSTemporalMVPEnabledFlag()  ? 1 : 0,  "sps_temporal_mvp_enabled_flag" );
     848
     849  WRITE_FLAG( pcSPS->getUseStrongIntraSmoothing(),             "strong_intra_smoothing_enable_flag" );
    854850
    855851  WRITE_FLAG( pcSPS->getVuiParametersPresentFlag(),             "vui_parameters_present_flag" );
     
    14281424    for( Int j = 0; j  <=  vps->getMaxSubLayersInLayerSetMinus1( currLsIdx ); j++ )
    14291425    { 
    1430 #if NH_3D_FIX_TICKET_114
    14311426      if( j > 0  &&  dpbSize->getSubLayerFlagInfoPresentFlag( i )  ) 
    1432 #else
    1433       if( j > 0  &&  dpbSize->getSubLayerDpbInfoPresentFlag( i, j )  ) 
    1434 #endif
    14351427      {
    14361428        WRITE_FLAG( dpbSize->getSubLayerDpbInfoPresentFlag( i, j ) ? 1 : 0 , "sub_layer_dpb_info_present_flag" );
     
    19821974        }
    19831975      }
    1984       if (pcSlice->getSPS()->getTMVPFlagsPresent())
     1976      if (pcSlice->getSPS()->getSPSTemporalMVPEnabledFlag())
    19851977      {
    19861978#if NH_MV
     
    21662158      xCodePredWeightTable( pcSlice );
    21672159    }
    2168 #if NH_3D_IC
     2160#if NH_3D
    21692161    else if( pcSlice->getViewIndex() && ( pcSlice->getSliceType() == P_SLICE || pcSlice->getSliceType() == B_SLICE )
    21702162      && !pcSlice->getIsDepth() && vps->getNumRefListLayers( layerId ) > 0
     
    21782170      }
    21792171    }
    2180 #endif
    2181 #if NH_3D_IV_MERGE
    21822172    assert(pcSlice->getMaxNumMergeCand()<=MRG_MAX_NUM_CANDS_MEM);
    21832173#else
     
    21862176    if (!pcSlice->isIntra())
    21872177    {
    2188 #if NH_3D_IV_MERGE
     2178#if NH_3D
    21892179      WRITE_UVLC( ( ( pcSlice->getMpiFlag( ) || pcSlice->getIvMvPredFlag( ) || pcSlice->getViewSynthesisPredFlag( ) ) ? MRG_MAX_NUM_CANDS_MEM : MRG_MAX_NUM_CANDS ) - pcSlice->getMaxNumMergeCand(), "five_minus_max_num_merge_cand");
    21902180#else
     
    22202210      if (pcSlice->getDeblockingFilterOverrideFlag())
    22212211      {
    2222         WRITE_FLAG(pcSlice->getDeblockingFilterDisable(), "slice_disable_deblocking_filter_flag");
     2212        WRITE_FLAG(pcSlice->getDeblockingFilterDisable(), "slice_deblocking_filter_disabled_flag");
    22232213        if(!pcSlice->getDeblockingFilterDisable())
    22242214        {
     
    24282418  if( ptl->getV2ConstraintsPresentFlag() )
    24292419  {
    2430     WRITE_FLAG( ptl->getMax12bitConstraintFlag( ) ? 1 : 0 , "max_12bit_constraint_flag" );
    2431     WRITE_FLAG( ptl->getMax10bitConstraintFlag( ) ? 1 : 0 , "max_10bit_constraint_flag" );
    2432     WRITE_FLAG( ptl->getMax8bitConstraintFlag( ) ? 1 : 0 , "max_8bit_constraint_flag" );
    2433     WRITE_FLAG( ptl->getMax422chromaConstraintFlag( ) ? 1 : 0 , "max_422chroma_constraint_flag" );
    2434     WRITE_FLAG( ptl->getMax420chromaConstraintFlag( ) ? 1 : 0 , "max_420chroma_constraint_flag" );
    2435     WRITE_FLAG( ptl->getMaxMonochromeConstraintFlag( ) ? 1 : 0 , "max_monochrome_constraint_flag" );
    2436     WRITE_FLAG( ptl->getIntraConstraintFlag( ) ? 1 : 0 , "intra_constraint_flag" );
    2437     WRITE_FLAG( ptl->getOnePictureOnlyConstraintFlag( ) ? 1 : 0 , "one_picture_only_constraint_flag" );
    2438     WRITE_FLAG( ptl->getLowerBitRateConstraintFlag( ) ? 1 : 0 , "lower_bit_rate_constraint_flag" );
     2420    WRITE_FLAG( ptl->getMax12bitConstraintFlag       ( ) ? 1 : 0 , "max_12bit_constraint_flag" );
     2421    WRITE_FLAG( ptl->getMax10bitConstraintFlag       ( ) ? 1 : 0 , "max_10bit_constraint_flag" );
     2422    WRITE_FLAG( ptl->getMax8bitConstraintFlag        ( ) ? 1 : 0 , "max_8bit_constraint_flag" );
     2423    WRITE_FLAG( ptl->getMax422chromaConstraintFlag   ( ) ? 1 : 0 , "max_422chroma_constraint_flag" );
     2424    WRITE_FLAG( ptl->getMax420chromaConstraintFlag   ( ) ? 1 : 0 , "max_420chroma_constraint_flag" );
     2425    WRITE_FLAG( ptl->getMaxMonochromeConstraintFlag  ( ) ? 1 : 0 , "max_monochrome_constraint_flag" );
     2426    WRITE_FLAG( ptl->getIntraConstraintFlag          ( ) ? 1 : 0 , "intra_constraint_flag" );
     2427    WRITE_FLAG( ptl->getOnePictureOnlyConstraintFlag ( ) ? 1 : 0 , "one_picture_only_constraint_flag" );
     2428    WRITE_FLAG( ptl->getLowerBitRateConstraintFlag   ( ) ? 1 : 0 , "lower_bit_rate_constraint_flag" );
    24392429    WRITE_CODE( 0, 16, "XXX_reserved_zero_34bits[0..15]");
    24402430    WRITE_CODE( 0, 16, "XXX_reserved_zero_34bits[16..31]");
     
    24732463    WRITE_CODE(0 ,  2, PTL_TRACE_TEXT("reserved_zero_34bits[32..33]"    ));
    24742464  }
     2465  else if (ptl->getProfileIdc() == Profile::MAIN10)
     2466  {
     2467    WRITE_CODE(0x00   ,  7, PTL_TRACE_TEXT("reserved_zero_7bits"     ));
     2468    WRITE_FLAG(ptl->getOnePictureOnlyConstraintFlag(), PTL_TRACE_TEXT("one_picture_only_constraint_flag"));
     2469    WRITE_CODE(0x0000 , 16, PTL_TRACE_TEXT("reserved_zero_35bits[0..15]"     ));
     2470    WRITE_CODE(0x0000 , 16, PTL_TRACE_TEXT("reserved_zero_35bits[16..31]"    ));
     2471    WRITE_CODE(0x0    ,  3, PTL_TRACE_TEXT("reserved_zero_35bits[32..34]"    ));
     2472  }
    24752473  else
    24762474  {
     
    25582556}
    25592557
    2560 #if NH_3D_ARP
     2558#if NH_3D
    25612559Void TEncCavlc::codeARPW( TComDataCU* pcCU, UInt uiAbsPartIdx )
    25622560{
    25632561  assert(0);
    25642562}
    2565 #endif
    2566 
    2567 #if NH_3D_IC
     2563
    25682564Void TEncCavlc::codeICFlag( TComDataCU* pcCU, UInt uiAbsPartIdx )
    25692565{
     
    25862582  assert(0);
    25872583}
    2588 #if NH_3D_DIS
     2584#if NH_3D
    25892585Void TEncCavlc::codeDIS( TComDataCU* pcCU, UInt uiAbsPartIdx )
    25902586{
     
    26892685}
    26902686
    2691 Void TEncCavlc::estBit( estBitsSbacStruct* /*pcEstBitsCabac*/, Int /*width*/, Int /*height*/, ChannelType /*chType*/ )
     2687Void TEncCavlc::estBit( estBitsSbacStruct* /*pcEstBitsCabac*/, Int /*width*/, Int /*height*/, ChannelType /*chType*/, COEFF_SCAN_TYPE /*scanType*/ )
    26922688{
    26932689  // printf("error : no VLC mode support in this version\n");
     
    28672863   assert(0);
    28682864 }
    2869 #if NH_3D_SDC_INTRA || NH_3D_SDC_INTER
     2865#if NH_3D
    28702866Void TEncCavlc::codeSDCFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx )
    28712867{
    28722868  assert(0);
    28732869}
    2874 #endif
    2875    
    2876 #if NH_3D_DBBP
     2870
    28772871Void TEncCavlc::codeDBBPFlag    ( TComDataCU* pcCU, UInt uiAbsPartIdx )
    28782872{
Note: See TracChangeset for help on using the changeset viewer.