Ignore:
Timestamp:
19 Feb 2013, 20:33:52 (12 years ago)
Author:
tech
Message:

Removed HM-6.1 related guard macros.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/HTM-5.1-dev0/source/Lib/TLibEncoder/TEncCavlc.cpp

    r292 r294  
    161161  //DF flag
    162162  WRITE_FLAG(pcAPS->getLoopFilterOffsetInAPS()?1:0, "aps_deblocking_filter_flag");
    163 #if !SAO_UNIT_INTERLEAVING
    164   //SAO flag
    165   WRITE_FLAG( pcAPS->getSaoEnabled()?1:0, "aps_sample_adaptive_offset_flag");
    166 #endif
    167 #if !LCU_SYNTAX_ALF
    168   //ALF flag
    169   WRITE_FLAG( pcAPS->getAlfEnabled()?1:0, "aps_adaptive_loop_filter_flag");
    170 #endif
    171 }
    172 #if LCU_SYNTAX_ALF
     163}
    173164Void TEncCavlc::codeAPSAlflag(UInt uiCode)
    174165{
    175166  WRITE_FLAG(uiCode, "aps_adaptive_loop_filter_flag");
    176167}
    177 #endif
    178168
    179169Void TEncCavlc::codeDFFlag(UInt uiCode, const Char *pSymbolName)
     
    186176}
    187177
    188 #if RPS_IN_SPS
    189178Void TEncCavlc::codeShortTermRefPicSet( TComSPS* pcSPS, TComReferencePictureSet* rps )
    190 #else
    191 Void TEncCavlc::codeShortTermRefPicSet( TComPPS* pcPPS, TComReferencePictureSet* rps )
    192 #endif
    193179{
    194180#if PRINT_RPS_INFO
     
    245231  xTracePPSHeader (pcPPS);
    246232#endif
    247 #if !RPS_IN_SPS
    248   TComRPSList* rpsList = pcPPS->getRPSList();
    249 #endif
    250233 
    251234  WRITE_UVLC( pcPPS->getPPSId(),                             "pic_parameter_set_id" );
    252235  WRITE_UVLC( pcPPS->getSPSId(),                             "seq_parameter_set_id" );
    253236
    254 #if MULTIBITS_DATA_HIDING
    255237  WRITE_FLAG( pcPPS->getSignHideFlag(), "sign_data_hiding_flag" );
    256238  if( pcPPS->getSignHideFlag() )
     
    258240    WRITE_CODE(pcPPS->getTSIG(), 4, "sign_hiding_threshold");
    259241  }
    260 #endif
    261242#if CABAC_INIT_FLAG
    262243  WRITE_FLAG( pcPPS->getCabacInitPresentFlag() ? 1 : 0,   "cabac_init_present_flag" );
    263 #endif
    264 #if !RPS_IN_SPS
    265   // RPS is put before entropy_coding_mode_flag
    266   // since entropy_coding_mode_flag will probably be removed from the WD
    267   TComReferencePictureSet*      rps;
    268 
    269   WRITE_UVLC(rpsList->getNumberOfReferencePictureSets(), "num_short_term_ref_pic_sets" );
    270   for(UInt i=0; i < rpsList->getNumberOfReferencePictureSets(); i++)
    271   {
    272     rps = rpsList->getReferencePictureSet(i);
    273     codeShortTermRefPicSet(pcPPS,rps);
    274   }
    275   WRITE_FLAG( pcPPS->getLongTermRefsPresent() ? 1 : 0,         "long_term_ref_pics_present_flag" );
    276244#endif
    277245  // entropy_coding_mode_flag
     
    280248  if (pcPPS->getEntropyCodingMode())
    281249  {
    282 #if !WPP_SIMPLIFICATION
    283     WRITE_UVLC( pcPPS->getEntropyCodingSynchro(),            "entropy_coding_synchro" );
    284     WRITE_FLAG( pcPPS->getCabacIstateReset() ? 1 : 0,        "cabac_istate_reset" );
    285 #endif
    286 #if !TILES_OR_ENTROPY_SYNC_IDC
    287 #if !WPP_SIMPLIFICATION
    288     if ( pcPPS->getEntropyCodingSynchro() )
    289 #endif
    290     {
    291       WRITE_UVLC( pcPPS->getNumSubstreams()-1,               "num_substreams_minus1" );
    292     }
    293 #endif
    294   }
    295 #if !H0566_TLA
    296   WRITE_UVLC( pcPPS->getNumTLayerSwitchingFlags(),           "num_temporal_layer_switching_point_flags" );
    297   for( UInt i = 0; i < pcPPS->getNumTLayerSwitchingFlags(); i++ )
    298   {
    299     WRITE_FLAG( pcPPS->getTLayerSwitchingFlag( i ) ? 1 : 0 , "temporal_layer_switching_point_flag" );
    300   }
    301 #endif
     250  }
    302251  //   num_ref_idx_l0_default_active_minus1
    303252  //   num_ref_idx_l1_default_active_minus1
     
    313262  WRITE_FLAG( pcPPS->getUseWP() ? 1 : 0,  "weighted_pred_flag" );   // Use of Weighting Prediction (P_SLICE)
    314263  WRITE_CODE( pcPPS->getWPBiPredIdc(), 2, "weighted_bipred_idc" );  // Use of Weighting Bi-Prediction (B_SLICE)
    315 #if H0388
    316264  WRITE_FLAG( pcPPS->getOutputFlagPresentFlag() ? 1 : 0,  "output_flag_present_flag" );
    317 #endif
    318 #if TILES_OR_ENTROPY_SYNC_IDC
    319265  if(pcPPS->getSPS()->getTilesOrEntropyCodingSyncIdc()==1)
    320266  {
    321 #endif
    322267    WRITE_FLAG( pcPPS->getColumnRowInfoPresent(),           "tile_info_present_flag" );
    323268    WRITE_FLAG( pcPPS->getTileBehaviorControlPresentFlag(),  "tile_control_present_flag");
     
    347292      if(iNumColTilesMinus1 !=0 || iNumRowTilesMinus1 !=0)
    348293      {
    349 #if !REMOVE_TILE_DEPENDENCE
    350         WRITE_FLAG( pcPPS->getTileBoundaryIndependenceIdr(),                         "tile_boundary_independence_flag" );
    351         if(pcPPS->getTileBoundaryIndependenceIdr() == 1)
    352         {
    353 #endif
    354294          WRITE_FLAG( pcPPS->getLFCrossTileBoundaryFlag()?1 : 0,            "loop_filter_across_tile_flag");
    355 #if !REMOVE_TILE_DEPENDENCE
    356         }
    357 #endif
    358       }
    359     }
    360 #if TILES_OR_ENTROPY_SYNC_IDC
     295      }
     296    }
    361297  }
    362298  else if(pcPPS->getSPS()->getTilesOrEntropyCodingSyncIdc()==2)
     
    364300    WRITE_UVLC( pcPPS->getNumSubstreams()-1,               "num_substreams_minus1" );
    365301  }
    366 #endif
    367 
    368 #if DBL_CONTROL
     302
    369303  WRITE_FLAG( pcPPS->getDeblockingFilterControlPresent()?1 : 0, "deblocking_filter_control_present_flag");
    370 #endif
    371 #if PARALLEL_MERGE
    372304  WRITE_UVLC( pcPPS->getLog2ParallelMergeLevelMinus2(), "log2_parallel_merge_level_minus2");
    373 #endif
    374305  WRITE_FLAG( 0, "pps_extension_flag" );
    375306}
     
    531462  WRITE_UVLC( pcSPS->getPicWidthInLumaSamples (),   "pic_width_in_luma_samples" );
    532463  WRITE_UVLC( pcSPS->getPicHeightInLumaSamples(),   "pic_height_in_luma_samples" );
    533 #if PIC_CROPPING
    534464  WRITE_FLAG( pcSPS->getPicCroppingFlag(),          "pic_cropping_flag" );
    535465  if (pcSPS->getPicCroppingFlag())
     
    540470    WRITE_UVLC( pcSPS->getPicCropBottomOffset(),    "pic_crop_bottom_offset" );
    541471  }
    542 #endif
    543472
    544473#if FULL_NBIT
     
    566495
    567496  WRITE_UVLC( pcSPS->getBitsForPOC()-4,                 "log2_max_pic_order_cnt_lsb_minus4" );
    568 #if H0567_DPB_PARAMETERS_PER_TEMPORAL_LAYER
    569497  for(UInt i=0; i <= pcSPS->getMaxTLayers()-1; i++)
    570498  {
     
    573501    WRITE_UVLC( pcSPS->getMaxLatencyIncrease(i),           "max_latency_increase[i]" );
    574502  }
    575 #else
    576   WRITE_UVLC( pcSPS->getMaxNumberOfReferencePictures(), "max_num_ref_pics" );
    577   WRITE_UVLC( pcSPS->getNumReorderFrames(),             "num_reorder_frames" );
    578   WRITE_UVLC(pcSPS->getMaxDecFrameBuffering(),          "max_dec_frame_buffering" );
    579   WRITE_UVLC(pcSPS->getMaxLatencyIncrease(),            "max_latency_increase"    );
    580 #endif
    581503  assert( pcSPS->getMaxCUWidth() == pcSPS->getMaxCUHeight() );
    582504 
     
    589511  }
    590512
    591 #if H0412_REF_PIC_LIST_RESTRICTION
    592513  WRITE_FLAG( pcSPS->getRestrictedRefPicListsFlag(),                                 "restricted_ref_pic_lists_flag" );
    593514  if( pcSPS->getRestrictedRefPicListsFlag() )
     
    595516    WRITE_FLAG( pcSPS->getListsModificationPresentFlag(),                            "lists_modification_present_flag" );
    596517  }
    597 #endif
    598518  WRITE_UVLC( log2MinCUSize - 3,                                                     "log2_min_coding_block_size_minus3" );
    599519  WRITE_UVLC( pcSPS->getMaxCUDepth()-g_uiAddCUDepth,                                 "log2_diff_max_min_coding_block_size" );
     
    621541  WRITE_FLAG( pcSPS->getUseSAO() ? 1 : 0,                                            "sample_adaptive_offset_enabled_flag");
    622542  WRITE_FLAG( pcSPS->getUseALF () ? 1 : 0,                                           "adaptive_loop_filter_enabled_flag");
    623 #if LCU_SYNTAX_ALF
    624543  if(pcSPS->getUseALF())
    625544  {
    626545    WRITE_FLAG( (pcSPS->getUseALFCoefInSlice()) ? 1 : 0,                             "alf_coef_in_slice_flag");
    627546  }
    628 #endif
    629547
    630548  if( pcSPS->getUsePCM() )
     
    637555  WRITE_FLAG( pcSPS->getTemporalIdNestingFlag() ? 1 : 0,                             "temporal_id_nesting_flag" );
    638556
    639 #if RPS_IN_SPS
    640557  TComRPSList* rpsList = pcSPS->getRPSList();
    641558  TComReferencePictureSet*      rps;
     
    648565  }   
    649566  WRITE_FLAG( pcSPS->getLongTermRefsPresent() ? 1 : 0,         "long_term_ref_pics_present_flag" );
    650 #endif
    651 #if !PIC_CROPPING
    652   //!!!KS: Syntax not in WD !!!
    653  
    654   xWriteUvlc  ( pcSPS->getPad (0) );
    655   xWriteUvlc  ( pcSPS->getPad (1) );
    656 #endif
    657567  // AMVP mode for each depth
    658568  for (Int i = 0; i < pcSPS->getMaxCUDepth(); i++)
     
    661571  }
    662572
    663 #if TILES_WPP_ENTRY_POINT_SIGNALLING
    664573  Int tilesOrEntropyCodingSyncIdc = 0;
    665574  if ( pcSPS->getNumColumnsMinus1() > 0 || pcSPS->getNumRowsMinus1() > 0)
     
    673582  pcSPS->setTilesOrEntropyCodingSyncIdc( tilesOrEntropyCodingSyncIdc );
    674583  WRITE_CODE(tilesOrEntropyCodingSyncIdc, 2, "tiles_or_entropy_coding_sync_idc");
    675 #endif
    676 
    677 #if TILES_OR_ENTROPY_SYNC_IDC
     584
    678585  if(tilesOrEntropyCodingSyncIdc == 1)
    679586  {
    680 #endif
    681587    WRITE_UVLC( pcSPS->getNumColumnsMinus1(),                           "num_tile_columns_minus1" );
    682588    WRITE_UVLC( pcSPS->getNumRowsMinus1(),                              "num_tile_rows_minus1" );
     
    697603    if( pcSPS->getNumColumnsMinus1() !=0 || pcSPS->getNumRowsMinus1() != 0)
    698604    {
    699 #if !REMOVE_TILE_DEPENDENCE
    700       WRITE_FLAG( pcSPS->getTileBoundaryIndependenceIdr(),                "tile_boundary_independence_flag" );
    701       if(pcSPS->getTileBoundaryIndependenceIdr() == 1)
    702       {
    703 #endif
    704605        WRITE_FLAG( pcSPS->getLFCrossTileBoundaryFlag()?1 : 0,            "loop_filter_across_tile_flag");
    705 #if !REMOVE_TILE_DEPENDENCE
    706       }
    707 #endif
    708     }
    709 #if TILES_OR_ENTROPY_SYNC_IDC
    710   }
    711 #endif
     606    }
     607  }
    712608  WRITE_FLAG( 1, "sps_extension_flag" );
    713609#if !QC_MVHEVC_B0046
     
    896792    WRITE_UVLC( pcSlice->getPPS()->getPPSId(), "pic_parameter_set_id" );
    897793#endif
    898 #if H0388
    899794    if( pcSlice->getPPS()->getOutputFlagPresentFlag() )
    900795    {
    901796      WRITE_FLAG( pcSlice->getPicOutputFlag() ? 1 : 0, "pic_output_flag" );
    902797    }
    903 #endif
    904798#if QC_REM_IDV_B0046
    905799    if(pcSlice->getNalUnitType()==NAL_UNIT_CODED_SLICE_IDR && pcSlice->getViewId() == 0)
     
    924818        {
    925819          WRITE_FLAG( 0, "short_term_ref_pic_set_sps_flag");
    926 #if RPS_IN_SPS
    927820          codeShortTermRefPicSet(pcSlice->getSPS(), rps);
    928 #else
    929           codeShortTermRefPicSet(pcSlice->getPPS(), rps);
    930 #endif
    931821        }
    932822        else
     
    935825          WRITE_UVLC( pcSlice->getRPSidx(), "short_term_ref_pic_set_idx" );
    936826        }
    937 #if RPS_IN_SPS
    938827        if(pcSlice->getSPS()->getLongTermRefsPresent())
    939 #else
    940         if(pcSlice->getPPS()->getLongTermRefsPresent())
    941 #endif
    942828        {
    943829          WRITE_UVLC( rps->getNumberOfLongtermPictures(), "num_long_term_pics");
    944830          Int maxPocLsb = 1<<pcSlice->getSPS()->getBitsForPOC();
    945831          Int prev = 0;
    946 #if LTRP_MULT
    947832          Int prevDeltaPocLt=0;
    948833          Int currDeltaPocLt=0;
    949 #endif
    950834          for(Int i=rps->getNumberOfPictures()-1 ; i > rps->getNumberOfPictures()-rps->getNumberOfLongtermPictures()-1; i--)
    951835          {
    952836            WRITE_UVLC((maxPocLsb-rps->getDeltaPOC(i)+prev)%maxPocLsb, "delta_poc_lsb_lt");
    953837         
    954 #if LTRP_MULT
    955838            currDeltaPocLt=((maxPocLsb-rps->getDeltaPOC(i)+prev)%maxPocLsb)+prevDeltaPocLt;
    956839
     
    983866            }
    984867            prevDeltaPocLt=currDeltaPocLt;
    985 #endif
    986868            prev = rps->getDeltaPOC(i);
    987869            WRITE_FLAG( rps->getUsed(i), "used_by_curr_pic_lt_flag");
     
    995877        {
    996878          WRITE_FLAG( 0, "short_term_ref_pic_set_sps_flag");
    997 #if RPS_IN_SPS
    998879          codeShortTermRefPicSet(pcSlice->getSPS(), rps);
    999 #else
    1000           codeShortTermRefPicSet(pcSlice->getPPS(), rps);
    1001 #endif
    1002880        }
    1003881        else
     
    1006884          WRITE_UVLC( pcSlice->getRPSidx(), "short_term_ref_pic_set_idx" );
    1007885        }
    1008 #if RPS_IN_SPS
    1009886        if(pcSlice->getSPS()->getLongTermRefsPresent())
    1010 #else
    1011         if(pcSlice->getPPS()->getLongTermRefsPresent())
    1012 #endif
    1013887        {
    1014888          WRITE_UVLC( rps->getNumberOfLongtermPictures(), "num_long_term_pics");
    1015889          Int maxPocLsb = 1<<pcSlice->getSPS()->getBitsForPOC();
    1016890          Int prev = 0;
    1017 #if LTRP_MULT
    1018891          Int prevDeltaPocLt=0;
    1019892          Int currDeltaPocLt=0;
    1020 #endif
    1021893          for(Int i=rps->getNumberOfPictures()-1 ; i > rps->getNumberOfPictures()-rps->getNumberOfLongtermPictures()-1; i--)
    1022894          {
    1023895            WRITE_UVLC((maxPocLsb-rps->getDeltaPOC(i)+prev)%maxPocLsb, "delta_poc_lsb_lt");
    1024896         
    1025 #if LTRP_MULT
    1026897            currDeltaPocLt=((maxPocLsb-rps->getDeltaPOC(i)+prev)%maxPocLsb)+prevDeltaPocLt;
    1027898
     
    1054925            }
    1055926            prevDeltaPocLt=currDeltaPocLt;
    1056 #endif
    1057927            prev = rps->getDeltaPOC(i);
    1058928            WRITE_FLAG( rps->getUsed(i), "used_by_curr_pic_lt_flag");
     
    1066936      if (pcSlice->getSPS()->getUseALF())
    1067937      {
    1068 #if !LCU_SYNTAX_ALF
    1069          if (pcSlice->getAlfEnabledFlag())
    1070          {
    1071            assert (pcSlice->getAPS()->getAlfEnabled());
    1072          }
    1073 #endif
    1074938         WRITE_FLAG( pcSlice->getAlfEnabledFlag(), "ALF on/off flag in slice header" );
    1075939      }
    1076940      if (pcSlice->getSPS()->getUseSAO())
    1077941      {
    1078 #if SAO_UNIT_INTERLEAVING
    1079942        WRITE_FLAG( pcSlice->getSaoInterleavingFlag(), "SAO interleaving flag" );
    1080 #endif
    1081943         assert (pcSlice->getSaoEnabledFlag() == pcSlice->getAPS()->getSaoEnabled());
    1082944         WRITE_FLAG( pcSlice->getSaoEnabledFlag(), "SAO on/off flag in slice header" );
    1083 #if SAO_UNIT_INTERLEAVING
    1084945         if (pcSlice->getSaoInterleavingFlag()&&pcSlice->getSaoEnabledFlag() )
    1085946         {
     
    1087948           WRITE_FLAG( pcSlice->getAPS()->getSaoParam()->bSaoFlag[2], "SAO on/off flag for Cr in slice header" );
    1088949         }
    1089 #endif
    1090950      }
    1091951      WRITE_UVLC( pcSlice->getAPS()->getAPSID(), "aps_id");
     
    1110970      pcSlice->setNumRefIdx(REF_PIC_LIST_1, 0);
    1111971    }
    1112 #if H0412_REF_PIC_LIST_RESTRICTION
    1113972    if( pcSlice->getSPS()->getListsModificationPresentFlag() )
    1114973    {
    1115 #endif
    1116974    TComRefPicListModification* refPicListModification = pcSlice->getRefPicListModification();
    1117 #if H0137_0138_LIST_MODIFICATION
    1118975    if( !pcSlice->isIntra() )
    1119976    {
     
    11581015      }
    11591016    }
    1160 #else
    1161       if(!pcSlice->isIntra())
    1162       {
    1163         WRITE_FLAG(pcSlice->getRefPicListModification()->getRefPicListModificationFlagL0() ? 1 : 0,       "ref_pic_list_modification_flag" );   
    1164         for(Int i = 0; i < refPicListModification->getNumberOfRefPicListModificationsL0(); i++)
    1165         {
    1166           WRITE_UVLC( refPicListModification->getListIdcL0(i), "ref_pic_list_modification_idc");
    1167           WRITE_UVLC( refPicListModification->getRefPicSetIdxL0(i), "ref_pic_set_idx");
    1168         }
    1169         if(pcSlice->getRefPicListModification()->getRefPicListModificationFlagL0())
    1170           WRITE_UVLC( 3, "ref_pic_list_modification_idc");
    1171       }
    1172       if(pcSlice->isInterB())
    1173       {   
    1174         WRITE_FLAG(pcSlice->getRefPicListModification()->getRefPicListModificationFlagL1() ? 1 : 0,       "ref_pic_list_modification_flag" );
    1175         for(Int i = 0; i < refPicListModification->getNumberOfRefPicListModificationsL1(); i++)
    1176         {
    1177           WRITE_UVLC( refPicListModification->getListIdcL1(i), "ref_pic_list_modification_idc");
    1178           WRITE_UVLC( refPicListModification->getRefPicSetIdxL1(i), "ref_pic_set_idx");
    1179         }
    1180         if(pcSlice->getRefPicListModification()->getRefPicListModificationFlagL1())
    1181           WRITE_UVLC( 3, "ref_pic_list_modification_idc");
    1182       }
    1183 #endif
    1184     }
    1185 #if H0412_REF_PIC_LIST_RESTRICTION
    1186   }
    1187 #endif
     1017    }
     1018  }
    11881019  // ref_pic_list_combination( )
    11891020  // maybe move to own function?
     
    11951026      WRITE_UVLC( pcSlice->getNumRefIdx(REF_PIC_LIST_C) - 1,          "num_ref_idx lc_active_minus1");
    11961027     
    1197 #if H0412_REF_PIC_LIST_RESTRICTION
    11981028      if( pcSlice->getSPS()->getListsModificationPresentFlag() )
    11991029      {
    1200 #endif
    12011030        WRITE_FLAG( pcSlice->getRefPicListModificationFlagLC() ? 1 : 0, "ref_pic_list_modification_flag_lc" );
    12021031        if(pcSlice->getRefPicListModificationFlagLC())
     
    12051034          {
    12061035            WRITE_FLAG( pcSlice->getListIdFromIdxOfLC(i),               "pic_from_list_0_flag" );
    1207 #if H0137_0138_LIST_MODIFICATION
    12081036          if (((pcSlice->getListIdFromIdxOfLC(i)==REF_PIC_LIST_0) && pcSlice->getNumRefIdx( REF_PIC_LIST_0 )>1 ) || ((pcSlice->getListIdFromIdxOfLC(i)==REF_PIC_LIST_1) && pcSlice->getNumRefIdx( REF_PIC_LIST_1 )>1 ) )
    12091037          {
    12101038            WRITE_UVLC( pcSlice->getRefIdxFromIdxOfLC(i),               "ref_idx_list_curr" );
    12111039          }
    1212 #else
    1213             WRITE_UVLC( pcSlice->getRefIdxFromIdxOfLC(i),               "ref_idx_list_curr" );
    1214 #endif
    12151040          }
    12161041        }
    1217 #if H0412_REF_PIC_LIST_RESTRICTION
    1218       }
    1219 #endif
     1042      }
    12201043    }
    12211044  }
    12221045   
    1223 #if H0111_MVD_L1_ZERO
    12241046  if (pcSlice->isInterB())
    12251047  {
    12261048    WRITE_FLAG( pcSlice->getMvdL1ZeroFlag() ? 1 : 0,   "mvd_l1_zero_flag");
    12271049  }
    1228 #endif
    12291050
    12301051  if(pcSlice->getPPS()->getEntropyCodingMode() && !pcSlice->isIntra())
     
    12491070    Int iCode = pcSlice->getSliceQp() - ( pcSlice->getPPS()->getPicInitQPMinus26() + 26 );
    12501071    WRITE_SVLC( iCode, "slice_qp_delta" );
    1251 #if DBL_CONTROL
    12521072    if (pcSlice->getPPS()->getDeblockingFilterControlPresent())
    12531073    {
     
    12561076        WRITE_FLAG(pcSlice->getInheritDblParamFromAPS(), "inherit_dbl_param_from_APS_flag");
    12571077      }
    1258 #else
    1259     WRITE_FLAG(pcSlice->getInheritDblParamFromAPS(), "inherit_dbl_param_from_APS_flag");
    1260 #endif
    12611078      if (!pcSlice->getInheritDblParamFromAPS())
    12621079      {
     
    12681085        }
    12691086      }
    1270 #if DBL_CONTROL
    1271     }
    1272 #endif
     1087    }
    12731088    if ( pcSlice->getSliceType() == B_SLICE )
    12741089    {
     
    13411156 \param pcSlice Where we find the substream size information.
    13421157 */
    1343 #if TILES_WPP_ENTRY_POINT_SIGNALLING
    13441158Void  TEncCavlc::codeTilesWPPEntryPoint( TComSlice* pSlice )
    13451159{
     
    14411255  delete [] entryPointOffset;
    14421256}
    1443 #else
    1444 Void TEncCavlc::codeSliceHeaderSubstreamTable( TComSlice* pcSlice )
    1445 {
    1446   UInt uiNumSubstreams = pcSlice->getPPS()->getNumSubstreams();
    1447   UInt*puiSubstreamSizes = pcSlice->getSubstreamSizes();
    1448 
    1449   // Write header information for all substreams except the last.
    1450   for (UInt ui = 0; ui+1 < uiNumSubstreams; ui++)
    1451   {
    1452     UInt uiNumbits = puiSubstreamSizes[ui];
    1453 
    1454     //the 2 first bits are used to give the size of the header
    1455     if ( uiNumbits < (1<<8) )
    1456     {
    1457       xWriteCode(0,         2  );
    1458       xWriteCode(uiNumbits, 8  );
    1459     }
    1460     else if ( uiNumbits < (1<<16) )
    1461     {
    1462       xWriteCode(1,         2  );
    1463       xWriteCode(uiNumbits, 16 );
    1464     }
    1465     else if ( uiNumbits < (1<<24) )
    1466     {
    1467       xWriteCode(2,         2  );
    1468       xWriteCode(uiNumbits, 24 );
    1469     }
    1470     else if ( uiNumbits < (1<<31) )
    1471     {
    1472       xWriteCode(3,         2  );
    1473       xWriteCode(uiNumbits, 32 );
    1474     }
    1475     else
    1476     {
    1477       printf("Error in codeSliceHeaderTable\n");
    1478       exit(-1);
    1479     }
    1480   }
    1481 }
    1482 #endif
    14831257
    14841258Void TEncCavlc::codeTerminatingBit      ( UInt uilsLast )
     
    15991373}
    16001374
    1601 #if BURST_IPCM
    16021375/** Code I_PCM information.
    16031376 * \param pcCU pointer to CU
     
    16111384  assert(0);
    16121385}
    1613 #else
    1614 /** Code I_PCM information.
    1615  * \param pcCU pointer to CU
    1616  * \param uiAbsPartIdx CU index
    1617  * \returns Void
    1618  *
    1619  * If I_PCM flag indicates that the CU is I_PCM, code its PCM alignment bits and codes. 
    1620  */
    1621 Void TEncCavlc::codeIPCMInfo( TComDataCU* pcCU, UInt uiAbsPartIdx)
    1622 {
    1623   UInt uiIPCM = (pcCU->getIPCMFlag(uiAbsPartIdx) == true)? 1 : 0;
    1624 
    1625   xWriteFlag(uiIPCM);
    1626 
    1627   if (uiIPCM)
    1628   {
    1629     xWritePCMAlignZero();
    1630 
    1631     UInt uiMinCoeffSize = pcCU->getPic()->getMinCUWidth()*pcCU->getPic()->getMinCUHeight();
    1632     UInt uiLumaOffset   = uiMinCoeffSize*uiAbsPartIdx;
    1633     UInt uiChromaOffset = uiLumaOffset>>2;
    1634 
    1635     Pel* piPCMSample;
    1636     UInt uiWidth;
    1637     UInt uiHeight;
    1638     UInt uiSampleBits;
    1639     UInt uiX, uiY;
    1640 
    1641     piPCMSample = pcCU->getPCMSampleY() + uiLumaOffset;
    1642     uiWidth = pcCU->getWidth(uiAbsPartIdx);
    1643     uiHeight = pcCU->getHeight(uiAbsPartIdx);
    1644     uiSampleBits = pcCU->getSlice()->getSPS()->getPCMBitDepthLuma();
    1645 
    1646     for(uiY = 0; uiY < uiHeight; uiY++)
    1647     {
    1648       for(uiX = 0; uiX < uiWidth; uiX++)
    1649       {
    1650         UInt uiSample = piPCMSample[uiX];
    1651 
    1652         xWriteCode(uiSample, uiSampleBits);
    1653       }
    1654       piPCMSample += uiWidth;
    1655     }
    1656 
    1657     piPCMSample = pcCU->getPCMSampleCb() + uiChromaOffset;
    1658     uiWidth = pcCU->getWidth(uiAbsPartIdx)/2;
    1659     uiHeight = pcCU->getHeight(uiAbsPartIdx)/2;
    1660     uiSampleBits = pcCU->getSlice()->getSPS()->getPCMBitDepthChroma();
    1661 
    1662     for(uiY = 0; uiY < uiHeight; uiY++)
    1663     {
    1664       for(uiX = 0; uiX < uiWidth; uiX++)
    1665       {
    1666         UInt uiSample = piPCMSample[uiX];
    1667 
    1668         xWriteCode(uiSample, uiSampleBits);
    1669       }
    1670       piPCMSample += uiWidth;
    1671     }
    1672 
    1673     piPCMSample = pcCU->getPCMSampleCr() + uiChromaOffset;
    1674     uiWidth = pcCU->getWidth(uiAbsPartIdx)/2;
    1675     uiHeight = pcCU->getHeight(uiAbsPartIdx)/2;
    1676     uiSampleBits = pcCU->getSlice()->getSPS()->getPCMBitDepthChroma();
    1677 
    1678     for(uiY = 0; uiY < uiHeight; uiY++)
    1679     {
    1680       for(uiX = 0; uiX < uiWidth; uiX++)
    1681       {
    1682         UInt uiSample = piPCMSample[uiX];
    1683 
    1684         xWriteCode(uiSample, uiSampleBits);
    1685       }
    1686       piPCMSample += uiWidth;
    1687     }
    1688   }
    1689 }
    1690 #endif
    16911386
    16921387Void TEncCavlc::codeIntraDirLumaAng( TComDataCU* pcCU, UInt uiAbsPartIdx )
     
    17191414  Int iDQp  = pcCU->getQP( uiAbsPartIdx ) - pcCU->getRefQP( uiAbsPartIdx );
    17201415
    1721 #if H0736_AVC_STYLE_QP_RANGE
    17221416  Int qpBdOffsetY =  pcCU->getSlice()->getSPS()->getQpBDOffsetY();
    17231417  iDQp = (iDQp + 78 + qpBdOffsetY + (qpBdOffsetY/2)) % (52 + qpBdOffsetY) - 26 - (qpBdOffsetY/2);
    1724 #endif
    17251418
    17261419  xWriteSvlc( iDQp );
     
    17531446  xWriteSvlc( iCode );
    17541447}
    1755 #if LCU_SYNTAX_ALF
    17561448/** Code the fixed length code (smaller than one max value) in OSALF
    17571449 * \param idx:  coded value
     
    17781470  }
    17791471}
    1780 #endif
    17811472
    17821473Void TEncCavlc::codeSaoFlag( UInt uiCode )
     
    17941485    xWriteSvlc( iCode );
    17951486}
    1796 #if SAO_UNIT_INTERLEAVING
    17971487/** Code SAO run.
    17981488 * \param uiCode
     
    18181508  WRITE_CODE( uiCode, uiLength, "sao_run_diff");
    18191509}
    1820 #endif
    18211510
    18221511Void TEncCavlc::estBit( estBitsSbacStruct* pcEstBitsCabac, Int width, Int height, TextType eTType )
     
    21231812Void TEncCavlc::xCodeScalingList(TComScalingList* scalingList, UInt sizeId, UInt listId)
    21241813{
    2125 #if SCALING_LIST
    21261814  Int coefNum = min(MAX_MATRIX_COEF_NUM,(Int)g_scalingListSize[sizeId]);
    21271815  UInt* scan    = g_auiFrameScanXY [ (sizeId == 0)? 1 : 2];
    2128 #else
    2129   Int coefNum = (Int)g_scalingListSize[sizeId];
    2130   UInt* scan    = g_auiFrameScanXY [ sizeId + 1];
    2131 #endif
    21321816  Int nextCoef = SCALING_LIST_START_VALUE;
    21331817  Int data;
    21341818  Int *src = scalingList->getScalingListAddress(sizeId, listId);
    2135 #if SCALING_LIST
    21361819  if(sizeId > SCALING_LIST_8x8 && scalingList->getUseDefaultScalingMatrixFlag(sizeId,listId))
    21371820  {
     
    21641847    }
    21651848  }
    2166 #else
    2167   for(Int i=0;i<coefNum;i++)
    2168   {
    2169     data = src[scan[i]] - nextCoef;
    2170     nextCoef = src[scan[i]];
    2171     if(data > 127)
    2172     {
    2173       data = data - 256;
    2174     }
    2175     if(data < -128)
    2176     {
    2177       data = data + 256;
    2178     }
    2179 
    2180     WRITE_SVLC( data,  "delta_coef");
    2181   }
    2182 #endif
    21831849}
    21841850Bool TComScalingList::checkPredMode(UInt sizeId, UInt listId)
     
    21861852  for(Int predListIdx = (Int)listId -1 ; predListIdx >= 0; predListIdx--)
    21871853  {
    2188 #if SCALING_LIST
    21891854    if( !memcmp(getScalingListAddress(sizeId,listId),getScalingListAddress(sizeId, predListIdx),sizeof(Int)*min(MAX_MATRIX_COEF_NUM,(Int)g_scalingListSize[sizeId])) // check value of matrix
    21901855     && ((sizeId < SCALING_LIST_16x16) || (getScalingListDC(sizeId,listId) == getScalingListDC(sizeId,predListIdx)))) // check DC value
    2191 #else
    2192     if( !memcmp(getScalingListAddress(sizeId,listId),getScalingListAddress(sizeId, predListIdx),sizeof(Int)*(Int)g_scalingListSize[sizeId])) // check value of matrix
    2193 #endif
    21941856    {
    21951857      setRefMatrixId(sizeId, listId, predListIdx);
Note: See TracChangeset for help on using the changeset viewer.