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/TLibDecoder/TDecCAVLC.cpp

    r292 r294  
    169169  assert(m_pcBitstream->getNumBitsLeft() == 8); /* rsbp_trailing_bits */
    170170}
    171 #if RPS_IN_SPS
    172171void TDecCavlc::parseShortTermRefPicSet( TComSPS* sps, TComReferencePictureSet* rps, Int idx )
    173 #else
    174 void TDecCavlc::parseShortTermRefPicSet( TComPPS* pcPPS, TComReferencePictureSet* rps, Int idx )
    175 #endif
    176172{
    177173  UInt code;
     
    184180    Int rIdx =  idx - 1 - code;
    185181    assert (rIdx <= idx && rIdx >= 0);
    186 #if RPS_IN_SPS
    187182    TComReferencePictureSet*   rpsRef = sps->getRPSList()->getReferencePictureSet(rIdx);
    188 #else
    189     TComReferencePictureSet*   rpsRef = pcPPS->getRPSList()->getReferencePictureSet(rIdx);
    190 #endif
    191183    Int k = 0, k0 = 0, k1 = 0;
    192184    READ_CODE(1, bit, "delta_rps_sign"); // delta_RPS_sign
     
    265257  READ_FLAG(uiCode, "aps_scaling_list_data_present_flag"); aps->setScalingListEnabled( (uiCode==1)?true:false );
    266258  READ_FLAG(uiCode, "aps_deblocking_filter_flag");         aps->setLoopFilterOffsetInAPS( (uiCode==1)?true:false );
    267 #if !SAO_UNIT_INTERLEAVING
    268   READ_FLAG(uiCode, "aps_sample_adaptive_offset_flag");    aps->setSaoEnabled( (uiCode==1)?true:false );
    269 #endif
    270 #if !LCU_SYNTAX_ALF
    271   READ_FLAG(uiCode, "aps_adaptive_loop_filter_flag");      aps->setAlfEnabled( (uiCode==1)?true:false );
    272 #endif
    273259  if(aps->getScalingListEnabled())
    274260  {
    275261    parseScalingList( aps->getScalingList() );
    276262  }
    277 #if DBL_CONTROL
    278263  if(aps->getLoopFilterOffsetInAPS())
    279264  {
    280265    xParseDblParam( aps );   
    281266  }
    282 #endif
    283 #if SAO_UNIT_INTERLEAVING
    284267  READ_FLAG(uiCode, "aps_sao_interleaving_flag");      aps->setSaoInterleavingFlag( (uiCode==1)?true:false );
    285268  if(!aps->getSaoInterleavingFlag())
    286269  {
    287270    READ_FLAG(uiCode, "aps_sample_adaptive_offset_flag");      aps->setSaoEnabled( (uiCode==1)?true:false );
    288 #endif
    289271  if(aps->getSaoEnabled())
    290272  {
     
    292274    xParseSaoParam( aps->getSaoParam() );
    293275  }
    294 #if SAO_UNIT_INTERLEAVING
    295   }
    296 #endif
    297 #if LCU_SYNTAX_ALF
     276  }
    298277  READ_FLAG(uiCode, "aps_adaptive_loop_filter_flag");      aps->setAlfEnabled( (uiCode==1)?true:false );
    299 #endif
    300278  if(aps->getAlfEnabled())
    301279  {
    302 #if !LCU_SYNTAX_ALF
    303     aps->getAlfParam()->alf_flag = 1;
    304 #endif
    305280    xParseAlfParam( aps->getAlfParam());
    306281  }
     
    316291}
    317292
    318 #if DBL_CONTROL
    319293Void  TDecCavlc::xParseDblParam       ( TComAPS* aps )
    320294{
     
    333307  }
    334308}
    335 #endif
    336309/** parse SAO parameters
    337310 * \param pSaoParam
     
    341314  UInt uiSymbol;
    342315
    343 #if SAO_UNIT_INTERLEAVING
    344316  int i,j, compIdx;
    345317  int numCuInWidth;
     
    393365    }
    394366  }
    395 #else
    396   if (pSaoParam->bSaoFlag[0])
    397   {
    398     xParseSaoSplitParam (pSaoParam, 0, 0);
    399     xParseSaoOffsetParam(pSaoParam, 0, 0);
    400     READ_FLAG (uiSymbol, "sao_flag_cb");
    401     pSaoParam->bSaoFlag[1] = uiSymbol? true:false;
    402     if (pSaoParam->bSaoFlag[1])
    403     {
    404       xParseSaoSplitParam (pSaoParam, 0, 1);
    405       xParseSaoOffsetParam(pSaoParam, 0, 1);
    406     }
    407 
    408     READ_FLAG (uiSymbol, "sao_flag_cr");
    409     pSaoParam->bSaoFlag[2] = uiSymbol? true:false;
    410     if (pSaoParam->bSaoFlag[2])
    411     {
    412       xParseSaoSplitParam (pSaoParam, 0, 2);
    413       xParseSaoOffsetParam(pSaoParam, 0, 2);
    414     }
    415   }
    416 #endif
    417 }
    418 #if SAO_UNIT_INTERLEAVING
     367}
    419368/** copy SAO parameter
    420369 * \param dst 
     
    584533}
    585534
    586 #else
    587 /** Decode quadtree split flag
    588  * \param  pSaoParam, iPartIdx
    589  */
    590 Void TDecCavlc::xParseSaoSplitParam(SAOParam* pSaoParam, Int iPartIdx, Int iYCbCr)
    591 {
    592   UInt uiSymbol;
    593   SAOQTPart*  pSaoPart = NULL;
    594   pSaoPart= &(pSaoParam->psSaoPart[iYCbCr][iPartIdx]);
    595 
    596   if(pSaoPart->PartLevel < pSaoParam->iMaxSplitLevel)
    597   {
    598     READ_FLAG (uiSymbol, "sao_split_flag");
    599     pSaoPart->bSplit = uiSymbol? true:false;
    600     if(pSaoPart->bSplit)
    601     {
    602       for (Int i=0;i<NUM_DOWN_PART;i++)
    603       {
    604         xParseSaoSplitParam(pSaoParam, pSaoPart->DownPartsIdx[i], iYCbCr);
    605       }
    606     }
    607   }
    608   else
    609   {
    610     pSaoPart->bSplit = false;
    611   }
    612 }
    613 
    614 /** Decode SAO for one partition
    615  * \param  pSaoParam, iPartIdx
    616  */
    617 Void TDecCavlc::xParseSaoOffsetParam(SAOParam* pSaoParam, Int iPartIdx, Int iYCbCr)
    618 {
    619   UInt uiSymbol;
    620   Int iSymbol; 
    621   SAOQTPart*  pSaoPart = NULL;
    622   pSaoPart = &(pSaoParam->psSaoPart[iYCbCr][iPartIdx]);
    623 
    624   static Int iTypeLength[MAX_NUM_SAO_TYPE] = {
    625     SAO_EO_LEN,
    626     SAO_EO_LEN,
    627     SAO_EO_LEN,
    628     SAO_EO_LEN,
    629     SAO_BO_LEN,
    630     SAO_BO_LEN
    631   }; 
    632   if(!pSaoPart->bSplit)
    633   {
    634     READ_UVLC (uiSymbol, "sao_type_idx");
    635     if (uiSymbol)
    636     {
    637       pSaoPart->iBestType = uiSymbol-1;
    638       pSaoPart->bEnableFlag = true;
    639     }
    640     else
    641     {
    642       pSaoPart->iBestType = -1;
    643       pSaoPart->bEnableFlag = false;
    644     }
    645 
    646     if (pSaoPart->bEnableFlag)
    647     {
    648       pSaoPart->iLength = iTypeLength[pSaoPart->iBestType];
    649       for(Int i=0; i< pSaoPart->iLength; i++)
    650       {
    651         READ_SVLC (iSymbol, "sao_offset");
    652         pSaoPart->iOffset[i] = iSymbol;
    653       }
    654     }
    655     return;
    656   }
    657 
    658   //split
    659   if (pSaoPart->PartLevel < pSaoParam->iMaxSplitLevel)
    660   {
    661     for(Int i=0;i<NUM_DOWN_PART;i++)
    662     {
    663       xParseSaoOffsetParam(pSaoParam, pSaoPart->DownPartsIdx[i], iYCbCr);
    664     }
    665   }
    666 }
    667 #endif
    668 
    669 #if LCU_SYNTAX_ALF
     535
    670536Void TDecCavlc::xParseAlfParam(AlfParamSet* pAlfParamSet, Bool bSentInAPS, Int firstLCUAddr, Bool acrossSlice, Int numLCUInWidth, Int numLCUInHeight)
    671537{
     
    931797}
    932798
    933 #endif
    934799
    935800Void TDecCavlc::xParseAlfParam(ALFParam* pAlfParam)
     
    937802  UInt uiSymbol;
    938803  Int iSymbol;
    939 #if ALF_SINGLE_FILTER_SHAPE
    940804  Int sqrFiltLengthTab[NUM_ALF_FILTER_SHAPE] = {ALF_FILTER_LEN};
    941 #else
    942   Int sqrFiltLengthTab[2] = { 9, 9};
    943 #endif
    944 
    945 #if LCU_SYNTAX_ALF
     805
    946806  switch(pAlfParam->componentID)
    947807  {
     
    961821  case ALF_Y:
    962822    {
    963 #endif
    964823  pAlfParam->filters_per_group = 0;
    965824  memset (pAlfParam->filterPattern, 0 , sizeof(Int)*NO_VAR_BINS);
    966 #if !LCU_SYNTAX_ALF
    967   READ_FLAG (uiSymbol, "alf_region_adaptation_flag");
    968   pAlfParam->alf_pcr_region_flag = uiSymbol; 
    969 #endif
    970 #if ALF_SINGLE_FILTER_SHAPE 
    971825  pAlfParam->filter_shape = 0;
    972 #else
    973   READ_UVLC (uiSymbol, "alf_length_luma_minus_5_div2");
    974   pAlfParam->filter_shape = uiSymbol;
    975 #endif
    976826  pAlfParam->num_coeff = sqrFiltLengthTab[pAlfParam->filter_shape];
    977827
     
    989839  {
    990840    pAlfParam->filters_per_group = 1;
    991 #if LCU_SYNTAX_ALF
    992 #if ALF_16_BA_GROUPS
    993841    Int numMergeFlags = 16;
    994 #else
    995     Int numMergeFlags = 15;
    996 #endif
    997 #else
    998 #if ALF_16_BA_GROUPS
    999     Int numMergeFlags = 16;
    1000 #else
    1001     Int numMergeFlags = pAlfParam->alf_pcr_region_flag ? 16 : 15;
    1002 #endif
    1003 #endif
    1004842    for (Int i=1; i<numMergeFlags; i++)
    1005843    {
     
    1021859  }
    1022860
    1023 #if ALF_SINGLE_FILTER_SHAPE
    1024861  Int minScanVal = MIN_SCAN_POS_CROSS;
    1025 #else
    1026   Int minScanVal = (pAlfParam->filter_shape == ALF_STAR5x5) ? 0: MIN_SCAN_POS_CROSS;
    1027 #endif
    1028862
    1029863  // Determine maxScanVal
     
    1036870
    1037871  // Golomb parameters
    1038 #if LCU_SYNTAX_ALF
    1039872  if( pAlfParam->filters_per_group > 1 )
    1040873  {
    1041 #endif
    1042874  READ_UVLC (uiSymbol, "alf_min_kstart_minus1");
    1043875  pAlfParam->minKStart = 1 + uiSymbol;
     
    1051883    kMin = pAlfParam->kMinTab[scanPos];
    1052884  }
    1053 #if LCU_SYNTAX_ALF
    1054   }
    1055 #endif
     885  }
    1056886
    1057887  Int scanPos;
     
    1061891    {
    1062892      scanPos = pDepthInt[i] - 1;
    1063 #if LCU_SYNTAX_ALF
    1064893      Int k = (pAlfParam->filters_per_group == 1) ? kTableTabShapes[ALF_CROSS9x7_SQUARE3x3][i] : pAlfParam->kMinTab[scanPos];
    1065894      pAlfParam->coeffmulti[idx][i] = xGolombDecode(k);
    1066 #else
    1067       pAlfParam->coeffmulti[idx][i] = xGolombDecode(pAlfParam->kMinTab[scanPos]);
    1068 #endif
    1069     }
    1070   }
    1071 #if LCU_SYNTAX_ALF
     895    }
     896  }
    1072897    }
    1073898    break;
     
    1079904    }
    1080905  }
    1081 #else
    1082   // filter parameters for chroma
    1083   READ_UVLC (uiSymbol, "alf_chroma_idc");
    1084   pAlfParam->chroma_idc = uiSymbol;
    1085 
    1086   if(pAlfParam->chroma_idc)
    1087   {
    1088 
    1089 #if ALF_SINGLE_FILTER_SHAPE
    1090     pAlfParam->filter_shape_chroma  = 0;
    1091 #else
    1092     READ_UVLC (uiSymbol, "alf_length_chroma_minus_5_div2");
    1093 
    1094     pAlfParam->filter_shape_chroma = uiSymbol;
    1095 #endif
    1096     pAlfParam->num_coeff_chroma = sqrFiltLengthTab[pAlfParam->filter_shape_chroma];
    1097     // filter coefficients for chroma
    1098     for(Int pos=0; pos<pAlfParam->num_coeff_chroma; pos++)
    1099     {
    1100       READ_SVLC (iSymbol, "alf_coeff_chroma");
    1101       pAlfParam->coeff_chroma[pos] = iSymbol;
    1102     }
    1103   }
    1104 #endif
    1105906}
    1106907
     
    1137938}
    1138939
    1139 #if TILES_OR_ENTROPY_SYNC_IDC
    1140940Void TDecCavlc::parsePPS(TComPPS* pcPPS, ParameterSetManagerDecoder *parameterSet)
    1141 #else
    1142 Void TDecCavlc::parsePPS(TComPPS* pcPPS)
    1143 #endif
    1144941{
    1145942#if ENC_DEC_TRACE 
     
    1150947  Int   iCode;
    1151948
    1152 #if !RPS_IN_SPS
    1153   TComRPSList* rpsList = pcPPS->getRPSList();
    1154 #endif
    1155949  READ_UVLC( uiCode, "pic_parameter_set_id");                      pcPPS->setPPSId (uiCode);
    1156950  READ_UVLC( uiCode, "seq_parameter_set_id");                      pcPPS->setSPSId (uiCode);
    1157951
    1158 #if MULTIBITS_DATA_HIDING
    1159952  READ_FLAG ( uiCode, "sign_data_hiding_flag" ); pcPPS->setSignHideFlag( uiCode );
    1160953  if( pcPPS->getSignHideFlag() )
     
    1162955    READ_CODE( 4, uiCode, "sign_hiding_threshold"); pcPPS->setTSIG(uiCode);
    1163956  }
    1164 #endif
    1165957
    1166958#if CABAC_INIT_FLAG
    1167959  READ_FLAG( uiCode,   "cabac_init_present_flag" );            pcPPS->setCabacInitPresentFlag( uiCode ? true : false );
    1168 #endif
    1169 #if !RPS_IN_SPS
    1170   // RPS is put before entropy_coding_mode_flag
    1171   // since entropy_coding_mode_flag will probably be removed from the WD
    1172   TComReferencePictureSet*      pcRPS;
    1173 
    1174   READ_UVLC( uiCode, "num_short_term_ref_pic_sets" );
    1175   rpsList->create(uiCode);
    1176 
    1177   for(Int i=0; i< rpsList->getNumberOfReferencePictureSets(); i++)
    1178   {
    1179     pcRPS = rpsList->getReferencePictureSet(i);
    1180     parseShortTermRefPicSet(pcPPS,pcRPS,i);
    1181   }
    1182   READ_FLAG( uiCode, "long_term_ref_pics_present_flag" );          pcPPS->setLongTermRefsPresent(uiCode);
    1183960#endif
    1184961  // entropy_coding_mode_flag
     
    1187964  if (pcPPS->getEntropyCodingMode())
    1188965  {
    1189 #if !WPP_SIMPLIFICATION
    1190     READ_UVLC( uiCode, "entropy_coding_synchro" );                 pcPPS->setEntropyCodingSynchro( uiCode );
    1191     READ_FLAG( uiCode, "cabac_istate_reset" );                     pcPPS->setCabacIstateReset( uiCode ? true : false );
    1192 #endif
    1193 #if !TILES_OR_ENTROPY_SYNC_IDC
    1194 #if !WPP_SIMPLIFICATION
    1195     if ( pcPPS->getEntropyCodingSynchro() )
    1196 #endif
    1197     {
    1198       READ_UVLC( uiCode, "num_substreams_minus1" );                pcPPS->setNumSubstreams(uiCode+1);
    1199     }
    1200 #endif
    1201   }
    1202 #if !H0566_TLA
    1203   READ_UVLC( uiCode, "num_temporal_layer_switching_point_flags" ); pcPPS->setNumTLayerSwitchingFlags( uiCode );
    1204   for ( UInt i = 0; i < pcPPS->getNumTLayerSwitchingFlags(); i++ )
    1205   {
    1206     READ_FLAG( uiCode, "temporal_layer_switching_point_flag" );    pcPPS->setTLayerSwitchingFlag( i, uiCode > 0 ? true : false );
    1207   }
    1208 #endif
     966  }
    1209967 
    1210968  // num_ref_idx_l0_default_active_minus1
     
    1241999//printf("TDecCavlc::parsePPS():\tm_bUseWeightPred=%d\tm_uiBiPredIdc=%d\n", pcPPS->getUseWP(), pcPPS->getWPBiPredIdc());
    12421000
    1243 #if H0388
    12441001  READ_FLAG( uiCode, "output_flag_present_flag" );
    12451002  pcPPS->setOutputFlagPresentFlag( uiCode==1 );
    1246 #endif
    1247 
    1248 #if TILES_OR_ENTROPY_SYNC_IDC
     1003
    12491004  if(parameterSet->getPrefetchedSPS(pcPPS->getSPSId())->getTilesOrEntropyCodingSyncIdc()==1)
    12501005  {
    1251 #endif
    12521006    READ_FLAG ( uiCode, "tile_info_present_flag" );
    12531007    pcPPS->setColumnRowInfoPresent(uiCode);
     
    12901044      Int iNumColTilesMinus1 = (pcPPS->getColumnRowInfoPresent() == 1)?(pcPPS->getNumColumnsMinus1()):(pcPPS->getSPS()->getNumColumnsMinus1());
    12911045      Int iNumRowTilesMinus1 = (pcPPS->getColumnRowInfoPresent() == 1)?(pcPPS->getNumColumnsMinus1()):(pcPPS->getSPS()->getNumRowsMinus1());
    1292 #if !REMOVE_TILE_DEPENDENCE
    1293       pcPPS->setTileBoundaryIndependenceIdr( 1 ); //default
    1294 #endif
    12951046      pcPPS->setLFCrossTileBoundaryFlag(true); //default
    12961047
    12971048      if(iNumColTilesMinus1 !=0 || iNumRowTilesMinus1 !=0)
    12981049      {
    1299 #if !REMOVE_TILE_DEPENDENCE
    1300         READ_FLAG ( uiCode, "tile_boundary_independence_flag" ); 
    1301         pcPPS->setTileBoundaryIndependenceIdr( uiCode );
    1302 
    1303         if(pcPPS->getTileBoundaryIndependenceIdr() == 1)
    1304         {
    1305 #endif
    13061050          READ_FLAG ( uiCode, "loop_filter_across_tile_flag" ); 
    13071051          pcPPS->setLFCrossTileBoundaryFlag( (uiCode == 1)?true:false );
    1308 #if !REMOVE_TILE_DEPENDENCE
    1309         }
    1310 #endif
    1311       }
    1312     }
    1313 #if TILES_OR_ENTROPY_SYNC_IDC
     1052      }
     1053    }
    13141054  }
    13151055  else if(parameterSet->getPrefetchedSPS(pcPPS->getSPSId())->getTilesOrEntropyCodingSyncIdc()==2)
     
    13171057    READ_UVLC( uiCode, "num_substreams_minus1" );                pcPPS->setNumSubstreams(uiCode+1);
    13181058  }
    1319 #endif
    1320 
    1321 #if DBL_CONTROL
     1059
    13221060  READ_FLAG( uiCode, "deblocking_filter_control_present_flag" );
    13231061  pcPPS->setDeblockingFilterControlPresent( uiCode ? true : false);
    1324 #endif
    1325 #if PARALLEL_MERGE
    13261062  READ_UVLC( uiCode, "log2_parallel_merge_level_minus2");
    13271063  assert(uiCode == LOG2_PARALLEL_MERGE_LEVEL_MINUS2);
    13281064  pcPPS->setLog2ParallelMergeLevelMinus2 (uiCode);
    1329 #endif
    13301065
    13311066  READ_FLAG( uiCode, "pps_extension_flag");
     
    14961231  READ_UVLC (    uiCode, "pic_width_in_luma_samples" );          pcSPS->setPicWidthInLumaSamples ( uiCode    );
    14971232  READ_UVLC (    uiCode, "pic_height_in_luma_samples" );         pcSPS->setPicHeightInLumaSamples( uiCode    );
    1498 #if PIC_CROPPING
    14991233  READ_FLAG(     uiCode, "pic_cropping_flag");                   pcSPS->setPicCroppingFlag ( uiCode ? true : false );
    15001234  if (uiCode != 0)
     
    15051239    READ_UVLC(   uiCode, "pic_crop_bottom_offset" );             pcSPS->setPicCropBottomOffset( uiCode );
    15061240  }
    1507 #endif
    15081241
    15091242#if FULL_NBIT
     
    15251258#endif
    15261259
    1527 #if H0736_AVC_STYLE_QP_RANGE
    15281260  pcSPS->setQpBDOffsetY( (Int) (6*uiCode) );
    1529 #endif
    15301261
    15311262  g_uiBASE_MAX  = ((1<<(g_uiBitDepth))-1);
     
    15371268#endif
    15381269  READ_UVLC( uiCode,    "bit_depth_chroma_minus8" );
    1539 #if H0736_AVC_STYLE_QP_RANGE
    15401270  pcSPS->setQpBDOffsetC( (Int) (6*uiCode) );
    1541 #endif
    15421271
    15431272  READ_FLAG( uiCode, "pcm_enabled_flag" ); pcSPS->setUsePCM( uiCode ? true : false );
     
    15541283
    15551284  READ_UVLC( uiCode,    "log2_max_pic_order_cnt_lsb_minus4" );   pcSPS->setBitsForPOC( 4 + uiCode );
    1556 #if H0567_DPB_PARAMETERS_PER_TEMPORAL_LAYER
    15571285  for(UInt i=0; i <= pcSPS->getMaxTLayers()-1; i++)
    15581286  {
     
    15641292    pcSPS->setMaxLatencyIncrease( uiCode, i );
    15651293  }
    1566 #else
    1567   READ_UVLC( uiCode,    "max_num_ref_pics" );                    pcSPS->setMaxNumberOfReferencePictures(uiCode);
    1568   READ_UVLC( uiCode,    "num_reorder_frames" );                  pcSPS->setNumReorderFrames(uiCode);
    1569   READ_UVLC ( uiCode, "max_dec_frame_buffering");
    1570   pcSPS->setMaxDecFrameBuffering( uiCode );
    1571   READ_UVLC ( uiCode, "max_latency_increase");
    1572   pcSPS->setMaxLatencyIncrease( uiCode );
    1573 #endif
    1574 
    1575 #if H0412_REF_PIC_LIST_RESTRICTION
     1294
    15761295  READ_FLAG( uiCode, "restricted_ref_pic_lists_flag" );
    15771296  pcSPS->setRestrictedRefPicListsFlag( uiCode );
     
    15851304    pcSPS->setListsModificationPresentFlag(true);
    15861305  }
    1587 #endif
    15881306  READ_UVLC( uiCode, "log2_min_coding_block_size_minus3" );
    15891307  UInt log2MinCUSize = uiCode + 3;
     
    16281346  READ_FLAG( uiCode, "sample_adaptive_offset_enabled_flag" );       pcSPS->setUseSAO ( uiCode ? true : false ); 
    16291347  READ_FLAG( uiCode, "adaptive_loop_filter_enabled_flag" );         pcSPS->setUseALF ( uiCode ? true : false );
    1630 #if LCU_SYNTAX_ALF
    16311348  if(pcSPS->getUseALF())
    16321349  {
    16331350    READ_FLAG( uiCode, "alf_coef_in_slice_flag" );      pcSPS->setUseALFCoefInSlice ( uiCode ? true : false );
    16341351  }
    1635 #endif
    16361352  if( pcSPS->getUsePCM() )
    16371353  {
     
    16421358
    16431359
    1644 #if RPS_IN_SPS
    16451360  TComRPSList* rpsList = pcSPS->getRPSList();
    16461361  TComReferencePictureSet* rps;
     
    16551370  }
    16561371  READ_FLAG( uiCode, "long_term_ref_pics_present_flag" );          pcSPS->setLongTermRefsPresent(uiCode);
    1657 #endif
    1658 #if !PIC_CROPPING
    1659   //!!!KS: Syntax not in WD !!!
    1660 
    1661   xReadUvlc ( uiCode ); pcSPS->setPadX        ( uiCode    );
    1662   xReadUvlc ( uiCode ); pcSPS->setPadY        ( uiCode    );
    1663 #endif
    16641372 
    16651373  // AMVP mode for each depth (AM_NONE or AM_EXPL)
     
    16701378  }
    16711379
    1672 #if TILES_WPP_ENTRY_POINT_SIGNALLING
    16731380  READ_CODE(2, uiCode, "tiles_or_entropy_coding_sync_idc");         pcSPS->setTilesOrEntropyCodingSyncIdc(uiCode);
    1674 #endif
    1675 
    1676 #if TILES_OR_ENTROPY_SYNC_IDC
     1381
    16771382  if(pcSPS->getTilesOrEntropyCodingSyncIdc() == 1)
    16781383  {
    1679 #endif
    16801384    READ_UVLC ( uiCode, "num_tile_columns_minus1" );
    16811385    pcSPS->setNumColumnsMinus1( uiCode ); 
     
    17041408      free(rowHeight); 
    17051409    }
    1706 #if !REMOVE_TILE_DEPENDENCE
    1707     pcSPS->setTileBoundaryIndependenceIdr( 1 ); //default
    1708 #endif
    17091410    pcSPS->setLFCrossTileBoundaryFlag(true); //default
    17101411
    17111412    if( pcSPS->getNumColumnsMinus1() !=0 || pcSPS->getNumRowsMinus1() != 0)
    17121413    {
    1713 #if !REMOVE_TILE_DEPENDENCE
    1714       READ_FLAG ( uiCode, "tile_boundary_independence_flag" ); 
    1715       pcSPS->setTileBoundaryIndependenceIdr( uiCode );
    1716       if(pcSPS->getTileBoundaryIndependenceIdr() == 1)
    1717       {
    1718 #endif
    17191414        READ_FLAG ( uiCode, "loop_filter_across_tile_flag" ); 
    17201415        pcSPS->setLFCrossTileBoundaryFlag( (uiCode==1)?true:false);
    1721 #if !REMOVE_TILE_DEPENDENCE
    1722       }
    1723 #endif
    1724     }
    1725 #if TILES_OR_ENTROPY_SYNC_IDC
    1726   }
    1727 #endif
     1416    }
     1417  }
    17281418  READ_FLAG( uiCode, "sps_extension_flag");
    17291419#if !QC_MVHEVC_B0046
     
    18941584}
    18951585
    1896 #if LCU_SYNTAX_ALF
    18971586#if MTK_DEPTH_MERGE_TEXTURE_CANDIDATE_C0137
    18981587Void TDecCavlc::parseSliceHeader (TComSlice*& rpcSlice, ParameterSetManagerDecoder *parameterSetManager, AlfCUCtrlInfo &alfCUCtrl, AlfParamSet& alfParamSet, bool isDepth)
    18991588#else
    19001589Void TDecCavlc::parseSliceHeader (TComSlice*& rpcSlice, ParameterSetManagerDecoder *parameterSetManager, AlfCUCtrlInfo &alfCUCtrl, AlfParamSet& alfParamSet)
    1901 #endif
    1902 #else
    1903 Void TDecCavlc::parseSliceHeader (TComSlice*& rpcSlice, ParameterSetManagerDecoder *parameterSetManager, AlfCUCtrlInfo &alfCUCtrl)
    19041590#endif
    19051591{
     
    19881674    rpcSlice->setSPS(sps);
    19891675    rpcSlice->setPPS(pps);
    1990 #if H0388
    19911676    if( pps->getOutputFlagPresentFlag() )
    19921677    {
     
    19981683      rpcSlice->setPicOutputFlag( true );
    19991684    }
    2000 #endif
    20011685#if QC_REM_IDV_B0046
    20021686#if !QC_MVHEVC_B0046
     
    20651749        {
    20661750          rps = rpcSlice->getLocalRPS();
    2067 #if RPS_IN_SPS
    20681751          parseShortTermRefPicSet(sps,rps, sps->getRPSList()->getNumberOfReferencePictureSets());
    2069 #else
    2070           parseShortTermRefPicSet(pps,rps, pps->getRPSList()->getNumberOfReferencePictureSets());
    2071 #endif
    20721752          rpcSlice->setRPS(rps);
    20731753        }
    20741754        else // use reference to short-term reference picture set in PPS
    20751755        {
    2076 #if RPS_IN_SPS
    20771756          READ_UVLC( uiCode, "short_term_ref_pic_set_idx"); rpcSlice->setRPS(sps->getRPSList()->getReferencePictureSet(uiCode));
    2078 #else
    2079           READ_UVLC( uiCode, "short_term_ref_pic_set_idx"); rpcSlice->setRPS(pps->getRPSList()->getReferencePictureSet(uiCode));
    2080 #endif
    20811757          rps = rpcSlice->getRPS();
    20821758        }
    2083 #if RPS_IN_SPS
    20841759        if(sps->getLongTermRefsPresent())
    2085 #else
    2086         if(pps->getLongTermRefsPresent())
    2087 #endif
    20881760        {
    20891761          Int offset = rps->getNumberOfNegativePictures()+rps->getNumberOfPositivePictures();
    20901762          READ_UVLC( uiCode, "num_long_term_pics");             rps->setNumberOfLongtermPictures(uiCode);
    20911763          Int prev = 0;
    2092 #if LTRP_MULT
    20931764          Int prevMsb=0;
    20941765          Int prevDeltaPocLt=0;
    2095 #endif
    20961766          for(Int j=rps->getNumberOfLongtermPictures()+offset-1 ; j > offset-1; j--)
    20971767          {
     
    20991769            prev += uiCode;
    21001770
    2101 #if LTRP_MULT
    21021771            READ_FLAG(uiCode,"delta_poc_msb_present_flag");
    21031772            Int decDeltaPOCMsbPresent=uiCode;
     
    21201789            else
    21211790            {
    2122 #endif
    21231791              rps->setPOC(j,rpcSlice->getPOC()-prev);         
    21241792              rps->setDeltaPOC(j,-(Int)prev);
    2125 #if LTRP_MULT
    21261793            }
    21271794            prevDeltaPocLt=prev;
    2128 #endif
    21291795            READ_FLAG( uiCode, "used_by_curr_pic_lt_flag");     rps->setUsed(j,uiCode);
    21301796          }
     
    21451811      if (sps->getUseSAO())
    21461812      {
    2147 #if SAO_UNIT_INTERLEAVING
    21481813        READ_FLAG(uiCode, "slice_sao_interleaving_flag");        rpcSlice->setSaoInterleavingFlag(uiCode);
    2149 #endif
    21501814        READ_FLAG(uiCode, "slice_sample_adaptive_offset_flag");  rpcSlice->setSaoEnabledFlag((Bool)uiCode);
    2151 #if SAO_UNIT_INTERLEAVING
    21521815        if (rpcSlice->getSaoEnabledFlag() && rpcSlice->getSaoInterleavingFlag())
    21531816        {
     
    21601823          rpcSlice->setSaoEnabledFlagCr(0);
    21611824        }
    2162 #endif
    21631825      }
    21641826      READ_UVLC (    uiCode, "aps_id" );  rpcSlice->setAPSId(uiCode);
     
    21881850    if( !rpcSlice->isIntra() )
    21891851    {
    2190 #if H0412_REF_PIC_LIST_RESTRICTION
    21911852#if QC_MVHEVC_B0046
    21921853    if( !rpcSlice->getViewId() || !rpcSlice->getSPS()->getListsModificationPresentFlag() )
     
    21991860      else
    22001861      {
    2201 #endif
    22021862        READ_FLAG( uiCode, "ref_pic_list_modification_flag_l0" ); refPicListModification->setRefPicListModificationFlagL0( uiCode ? 1 : 0 );
    2203 #if H0412_REF_PIC_LIST_RESTRICTION
    2204       }
    2205 #endif
     1863      }
    22061864     
    22071865      if(refPicListModification->getRefPicListModificationFlagL0())
     
    22091867        uiCode = 0;
    22101868        Int i = 0;
    2211 #if H0137_0138_LIST_MODIFICATION
    22121869        Int NumPocTotalCurr = rpcSlice->getNumPocTotalCurrMvc();
    22131870        if ( NumPocTotalCurr > 1 )
     
    22321889          }
    22331890        }
    2234 #else
    2235         Int list_modification_idc = 0;
    2236         while(list_modification_idc != 3) 
    2237         {
    2238           READ_UVLC( uiCode, "list_modification_idc" ); refPicListModification->setListIdcL0(i, uiCode );
    2239           list_modification_idc = uiCode;
    2240           if(uiCode != 3)
    2241           {
    2242             READ_UVLC( uiCode, "ref_pic_set_idx" ); refPicListModification->setRefPicSetIdxL0(i, uiCode );
    2243           }
    2244           i++;
    2245         }
    2246         refPicListModification->setNumberOfRefPicListModificationsL0(i-1);
    2247 #endif
    2248       }
    2249 #if !H0137_0138_LIST_MODIFICATION
    2250       else
    2251       {
    2252         refPicListModification->setNumberOfRefPicListModificationsL0(0);
    2253       }
    2254 #endif
     1891      }
    22551892    }
    22561893    else
    22571894    {
    22581895      refPicListModification->setRefPicListModificationFlagL0(0);
    2259 #if !H0137_0138_LIST_MODIFICATION
    2260       refPicListModification->setNumberOfRefPicListModificationsL0(0);
    2261 #endif
    22621896    }
    22631897    if(rpcSlice->isInterB())
    22641898    {
    2265 #if H0412_REF_PIC_LIST_RESTRICTION
    22661899#if QC_MVHEVC_B0046
    22671900    if( !rpcSlice->getViewId() || !rpcSlice->getSPS()->getListsModificationPresentFlag() )
     
    22741907      else
    22751908      {
    2276 #endif
    22771909        READ_FLAG( uiCode, "ref_pic_list_modification_flag_l1" ); refPicListModification->setRefPicListModificationFlagL1( uiCode ? 1 : 0 );
    2278 #if H0412_REF_PIC_LIST_RESTRICTION
    2279       }
    2280 #endif
     1910      }
    22811911      if(refPicListModification->getRefPicListModificationFlagL1())
    22821912      {
    22831913        uiCode = 0;
    22841914        Int i = 0;
    2285 #if H0137_0138_LIST_MODIFICATION
    22861915        Int NumPocTotalCurr = rpcSlice->getNumPocTotalCurrMvc();
    22871916        if ( NumPocTotalCurr > 1 )
     
    23061935          }
    23071936        }
    2308 #else
    2309         Int list_modification_idc = 0;
    2310         while(list_modification_idc != 3) 
    2311         {
    2312           READ_UVLC( uiCode, "list_modification_idc" ); refPicListModification->setListIdcL1(i, uiCode );
    2313           list_modification_idc = uiCode;
    2314           if(uiCode != 3)
    2315           {
    2316             READ_UVLC( uiCode, "ref_pic_set_idx" ); refPicListModification->setRefPicSetIdxL1(i, uiCode );
    2317           }
    2318           i++;
    2319         }
    2320         refPicListModification->setNumberOfRefPicListModificationsL1(i-1);
    2321 #endif
    2322       }
    2323 #if !H0137_0138_LIST_MODIFICATION
    2324       else
    2325       {
    2326         refPicListModification->setNumberOfRefPicListModificationsL1(0);
    2327       }
    2328 #endif
     1937      }
    23291938    } 
    23301939    else
    23311940    {
    23321941      refPicListModification->setRefPicListModificationFlagL1(0);
    2333 #if !H0137_0138_LIST_MODIFICATION
    2334       refPicListModification->setNumberOfRefPicListModificationsL1(0);
    2335 #endif
    23361942    }
    23371943  }
     
    23511957      READ_UVLC( uiCode, "num_ref_idx_lc_active_minus1" );      rpcSlice->setNumRefIdx( REF_PIC_LIST_C, uiCode + 1 );
    23521958     
    2353 #if H0412_REF_PIC_LIST_RESTRICTION
    23541959#if QC_MVHEVC_B0046
    23551960    if( rpcSlice->getViewId() && rpcSlice->getSPS()->getListsModificationPresentFlag() )
     
    23581963#endif
    23591964      {
    2360 #endif
    23611965        READ_FLAG( uiCode, "ref_pic_list_modification_flag_lc" ); rpcSlice->setRefPicListModificationFlagLC( uiCode ? 1 : 0 );
    23621966        if(uiCode)
     
    23661970            READ_FLAG( uiCode, "pic_from_list_0_flag" );
    23671971            rpcSlice->setListIdFromIdxOfLC(i, uiCode);
    2368 #if H0137_0138_LIST_MODIFICATION
    23691972          if (((rpcSlice->getListIdFromIdxOfLC(i) == REF_PIC_LIST_0) && (rpcSlice->getNumRefIdx( REF_PIC_LIST_0 ) == 1)) || ((rpcSlice->getListIdFromIdxOfLC(i) == REF_PIC_LIST_1) && (rpcSlice->getNumRefIdx( REF_PIC_LIST_1 ) == 1)) )
    23701973          {
     
    23751978            READ_UVLC( uiCode, "ref_idx_list_curr" );
    23761979          }
    2377 #else
    2378             READ_UVLC( uiCode, "ref_idx_list_curr" );
    2379 #endif
    23801980            rpcSlice->setRefIdxFromIdxOfLC(i, uiCode);
    23811981            rpcSlice->setRefIdxOfLC((RefPicList)rpcSlice->getListIdFromIdxOfLC(i), rpcSlice->getRefIdxFromIdxOfLC(i), i);
    23821982          }
    23831983        }
    2384 #if H0412_REF_PIC_LIST_RESTRICTION
    23851984      }
    23861985      else
     
    23881987        rpcSlice->setRefPicListModificationFlagLC(false);
    23891988      }
    2390 #endif
    23911989    }
    23921990    else
     
    24011999  }
    24022000 
    2403 #if H0111_MVD_L1_ZERO
    24042001  if (rpcSlice->isInterB())
    24052002  {
    24062003    READ_FLAG( uiCode, "mvd_l1_zero_flag" );       rpcSlice->setMvdL1ZeroFlag( (uiCode ? true : false) );
    24072004  }
    2408 #endif
    24092005
    24102006#if CABAC_INIT_FLAG
     
    24322028    rpcSlice->setSliceQp (26 + pps->getPicInitQPMinus26() + iCode);
    24332029
    2434 #if H0736_AVC_STYLE_QP_RANGE
    24352030    assert( rpcSlice->getSliceQp() >= -sps->getQpBDOffsetY() );
    24362031    assert( rpcSlice->getSliceQp() <=  51 );
    2437 #endif
    2438 
    2439 #if DBL_CONTROL
     2032
    24402033    if (rpcSlice->getPPS()->getDeblockingFilterControlPresent())
    24412034    {
     
    24472040        rpcSlice->setInheritDblParamFromAPS(0);
    24482041      }
    2449 #else
    2450     READ_FLAG ( uiCode, "inherit_dbl_param_from_APS_flag" ); rpcSlice->setInheritDblParamFromAPS(uiCode ? 1 : 0);
    2451 #endif
    24522042      if(!rpcSlice->getInheritDblParamFromAPS())
    24532043      {
     
    24592049        }
    24602050      }
    2461 #if DBL_CONTROL
    24622051   }
    2463 #endif
    24642052    if ( rpcSlice->getSliceType() == B_SLICE )
    24652053    {
     
    25312119
    25322120      Int uiNumCUsInFrame = uiNumLCUsInWidth* uiNumLCUsInHeight;
    2533 #if LCU_SYNTAX_ALF
    25342121      if(sps->getUseALFCoefInSlice())
    25352122      {
     
    25442131      if(!sps->getUseALFCoefInSlice())
    25452132      {
    2546 #endif
    25472133      xParseAlfCuControlParam(alfCUCtrl, uiNumCUsInFrame);
    2548 #if LCU_SYNTAX_ALF
    2549       }
    2550 #endif
     2134      }
    25512135
    25522136    }
     
    25572141  if (!bEntropySlice)
    25582142  {
    2559 #if !REMOVE_TILE_DEPENDENCE
    2560     if (sps->getTileBoundaryIndependenceIdr())
    2561     {   
    2562 #endif
    25632143    xReadCode(1, uiCode); // read flag indicating if tile markers transmitted
    25642144    rpcSlice->setTileMarkerFlag( uiCode );
    2565 #if !REMOVE_TILE_DEPENDENCE
    2566     }
    2567 #endif
    2568   }
    2569 
    2570 #if TILES_WPP_ENTRY_POINT_SIGNALLING
     2145  }
     2146
    25712147  Int tilesOrEntropyCodingSyncIdc = rpcSlice->getSPS()->getTilesOrEntropyCodingSyncIdc();
    25722148  UInt *entryPointOffset          = NULL;
     
    26292205    delete [] entryPointOffset;
    26302206  }
    2631 #else
    2632 #if WPP_SIMPLIFICATION
    2633   if (pps->getNumSubstreams() > 1)
    2634 #else
    2635   if (pps->getEntropyCodingSynchro())
    2636 #endif
    2637   {
    2638     UInt uiNumSubstreams = pps->getNumSubstreams();
    2639     rpcSlice->allocSubstreamSizes(uiNumSubstreams);
    2640     UInt *puiSubstreamSizes = rpcSlice->getSubstreamSizes();
    2641 
    2642     for (UInt ui = 0; ui+1 < uiNumSubstreams; ui++)
    2643     {
    2644       xReadCode(2, uiCode);
    2645      
    2646       switch ( uiCode )
    2647       {
    2648       case 0:
    2649         xReadCode(8,  uiCode);
    2650         break;
    2651       case 1:
    2652         xReadCode(16, uiCode);
    2653         break;
    2654       case 2:
    2655         xReadCode(24, uiCode);
    2656         break;
    2657       case 3:
    2658         xReadCode(32, uiCode);
    2659         break;
    2660       default:
    2661         printf("Error in parseSliceHeader\n");
    2662         exit(-1);
    2663         break;
    2664       }
    2665       puiSubstreamSizes[ui] = uiCode;
    2666     }
    2667   }
    2668 #endif
    26692207
    26702208  if (!bEntropySlice)
    26712209  {
    26722210    // Reading location information
    2673 #if !REMOVE_TILE_DEPENDENCE
    2674     if (sps->getTileBoundaryIndependenceIdr())
    2675     {   
    2676 #endif
    2677 #if !TILES_WPP_ENTRY_POINT_SIGNALLING
    2678       xReadCode(1, uiCode); // read flag indicating if location information signaled in slice header
    2679       Bool bTileLocationInformationInSliceHeaderFlag = (uiCode)? true : false;
    2680 
    2681       if (bTileLocationInformationInSliceHeaderFlag)
    2682       {
    2683         // location count
    2684         xReadCode(5, uiCode); // number of tiles for which location information signaled
    2685         rpcSlice->setTileLocationCount ( uiCode + 1 );
    2686 
    2687         xReadCode(5, uiCode); // number of bits used by diff
    2688         Int iBitsUsedByDiff = uiCode + 1;
    2689 
    2690         // read out tile start location
    2691         Int iLastSize = 0;
    2692         for (UInt uiIdx=0; uiIdx<rpcSlice->getTileLocationCount(); uiIdx++)
    2693         {
    2694           Int iAbsDiff, iCurSize, iCurDiff;
    2695           if (uiIdx==0)
    2696           {
    2697             xReadCode(iBitsUsedByDiff-1, uiCode); iAbsDiff  = uiCode;
    2698             rpcSlice->setTileLocation( uiIdx, iAbsDiff );
    2699             iCurDiff  = iAbsDiff;
    2700             iLastSize = iAbsDiff;
    2701           }
    2702           else
    2703           {
    2704             xReadCode(1, uiCode); // read sign
    2705             Int iSign = (uiCode) ? -1 : +1;
    2706 
    2707             xReadCode(iBitsUsedByDiff-1, uiCode); iAbsDiff  = uiCode;
    2708             iCurDiff  = (iSign) * iAbsDiff;
    2709             iCurSize  = iLastSize + iCurDiff;
    2710             iLastSize = iCurSize;
    2711             rpcSlice->setTileLocation( uiIdx, rpcSlice->getTileLocation( uiIdx-1 ) + iCurSize ); // calculate byte location
    2712           }
    2713         }
    2714       }
    2715 #endif
    27162211
    27172212      // read out trailing bits
    27182213    m_pcBitstream->readOutTrailingBits();
    2719 #if !REMOVE_TILE_DEPENDENCE
    2720     }
    2721 #endif
    27222214  }
    27232215  return;
     
    28142306Void TDecCavlc::parseIPCMInfo( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
    28152307{
    2816 #if BURST_IPCM
    28172308  assert(0);
    2818 #else
    2819   UInt uiSymbol;
    2820 
    2821   xReadFlag( uiSymbol );
    2822 
    2823   if ( uiSymbol )
    2824   {
    2825     Bool bIpcmFlag   = true;
    2826 
    2827     xReadPCMAlignZero();
    2828 
    2829     pcCU->setPartSizeSubParts  ( SIZE_2Nx2N, uiAbsPartIdx, uiDepth );
    2830     pcCU->setSizeSubParts      ( g_uiMaxCUWidth>>uiDepth, g_uiMaxCUHeight>>uiDepth, uiAbsPartIdx, uiDepth );
    2831     pcCU->setIPCMFlagSubParts  ( bIpcmFlag, uiAbsPartIdx, uiDepth );
    2832 
    2833     UInt uiMinCoeffSize = pcCU->getPic()->getMinCUWidth()*pcCU->getPic()->getMinCUHeight();
    2834     UInt uiLumaOffset   = uiMinCoeffSize*uiAbsPartIdx;
    2835     UInt uiChromaOffset = uiLumaOffset>>2;
    2836 
    2837     Pel* piPCMSample;
    2838     UInt uiWidth;
    2839     UInt uiHeight;
    2840     UInt uiSampleBits;
    2841     UInt uiX, uiY;
    2842 
    2843     piPCMSample = pcCU->getPCMSampleY() + uiLumaOffset;
    2844     uiWidth = pcCU->getWidth(uiAbsPartIdx);
    2845     uiHeight = pcCU->getHeight(uiAbsPartIdx);
    2846     uiSampleBits = pcCU->getSlice()->getSPS()->getPCMBitDepthLuma();
    2847 
    2848     for(uiY = 0; uiY < uiHeight; uiY++)
    2849     {
    2850       for(uiX = 0; uiX < uiWidth; uiX++)
    2851       {
    2852         UInt uiSample;
    2853         xReadCode(uiSampleBits, uiSample);
    2854 
    2855         piPCMSample[uiX] = uiSample;
    2856       }
    2857       piPCMSample += uiWidth;
    2858     }
    2859 
    2860     piPCMSample = pcCU->getPCMSampleCb() + uiChromaOffset;
    2861     uiWidth = pcCU->getWidth(uiAbsPartIdx)/2;
    2862     uiHeight = pcCU->getHeight(uiAbsPartIdx)/2;
    2863     uiSampleBits = pcCU->getSlice()->getSPS()->getPCMBitDepthChroma();
    2864 
    2865     for(uiY = 0; uiY < uiHeight; uiY++)
    2866     {
    2867       for(uiX = 0; uiX < uiWidth; uiX++)
    2868       {
    2869         UInt uiSample;
    2870         xReadCode(uiSampleBits, uiSample);
    2871         piPCMSample[uiX] = uiSample;
    2872       }
    2873       piPCMSample += uiWidth;
    2874     }
    2875 
    2876     piPCMSample = pcCU->getPCMSampleCr() + uiChromaOffset;
    2877     uiWidth = pcCU->getWidth(uiAbsPartIdx)/2;
    2878     uiHeight = pcCU->getHeight(uiAbsPartIdx)/2;
    2879     uiSampleBits = pcCU->getSlice()->getSPS()->getPCMBitDepthChroma();
    2880 
    2881     for(uiY = 0; uiY < uiHeight; uiY++)
    2882     {
    2883       for(uiX = 0; uiX < uiWidth; uiX++)
    2884       {
    2885         UInt uiSample;
    2886         xReadCode(uiSampleBits, uiSample);
    2887         piPCMSample[uiX] = uiSample;
    2888       }
    2889       piPCMSample += uiWidth;
    2890     }
    2891   }
    2892 #endif
    28932309}
    28942310
     
    29202336Void TDecCavlc::parseDeltaQP( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
    29212337{
    2922 #if H0736_AVC_STYLE_QP_RANGE
    29232338  Int qp;
    2924 #else
    2925   UInt uiQp;
    2926 #endif
    29272339  Int  iDQp;
    29282340 
    29292341  xReadSvlc( iDQp );
    29302342
    2931 #if H0736_AVC_STYLE_QP_RANGE
    29322343  Int qpBdOffsetY = pcCU->getSlice()->getSPS()->getQpBDOffsetY();
    29332344  qp = (((Int) pcCU->getRefQP( uiAbsPartIdx ) + iDQp + 52 + 2*qpBdOffsetY )%(52+ qpBdOffsetY)) -  qpBdOffsetY;
    2934 #else
    2935   uiQp = pcCU->getRefQP( uiAbsPartIdx ) + iDQp;
    2936 #endif
    29372345
    29382346  UInt uiAbsQpCUPartIdx = (uiAbsPartIdx>>(8-(pcCU->getSlice()->getPPS()->getMaxCuDQPDepth()<<1)))<<(8-(pcCU->getSlice()->getPPS()->getMaxCuDQPDepth()<<1)) ;
    29392347  UInt uiQpCUDepth =   min(uiDepth,pcCU->getSlice()->getPPS()->getMaxCuDQPDepth()) ;
    29402348
    2941 #if H0736_AVC_STYLE_QP_RANGE
    29422349  pcCU->setQPSubParts( qp, uiAbsQpCUPartIdx, uiQpCUDepth );
    2943 #else
    2944   pcCU->setQPSubParts( uiQp, uiAbsQpCUPartIdx, uiQpCUDepth );
    2945 #endif
    29462350}
    29472351
     
    34072811          READ_UVLC( code, "scaling_list_pred_matrix_id_delta");
    34082812          scalingList->setRefMatrixId (sizeId,listId,(UInt)((Int)(listId)-(code+1)));
    3409 #if SCALING_LIST
    34102813          if( sizeId > SCALING_LIST_8x8 )
    34112814          {
    34122815            scalingList->setScalingListDC(sizeId,listId,scalingList->getScalingListDC(sizeId, scalingList->getRefMatrixId (sizeId,listId)));
    34132816          }
    3414 #endif
    34152817          scalingList->processRefMatrix( sizeId, listId, scalingList->getRefMatrixId (sizeId,listId));
    34162818         
     
    34332835Void TDecCavlc::xDecodeScalingList(TComScalingList *scalingList, UInt sizeId, UInt listId)
    34342836{
    3435 #if SCALING_LIST
    34362837  Int i,coefNum = min(MAX_MATRIX_COEF_NUM,(Int)g_scalingListSize[sizeId]);
    34372838  Int data;
     
    34732874    }
    34742875  }
    3475 #else
    3476   Int i,coefNum = g_scalingListSize[sizeId];
    3477   Int data;
    3478   Int nextCoef = SCALING_LIST_START_VALUE;
    3479   UInt* scan  = g_auiFrameScanXY [ sizeId + 1 ];
    3480   Int *dst = scalingList->getScalingListAddress(sizeId, listId);
    3481 
    3482   for(i = 0; i < coefNum; i++)
    3483   {
    3484     READ_SVLC( data, "scaling_list_delta_coef");
    3485     nextCoef = (nextCoef + data + 256 ) % 256;
    3486     dst[scan[i]] = nextCoef;
    3487   }
    3488 #endif
    34892876}
    34902877
Note: See TracChangeset for help on using the changeset viewer.