Changeset 294 in 3DVCSoftware for branches/HTM-5.1-dev0/source/Lib/TLibDecoder/TDecCAVLC.cpp
- Timestamp:
- 19 Feb 2013, 20:33:52 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HTM-5.1-dev0/source/Lib/TLibDecoder/TDecCAVLC.cpp
r292 r294 169 169 assert(m_pcBitstream->getNumBitsLeft() == 8); /* rsbp_trailing_bits */ 170 170 } 171 #if RPS_IN_SPS172 171 void TDecCavlc::parseShortTermRefPicSet( TComSPS* sps, TComReferencePictureSet* rps, Int idx ) 173 #else174 void TDecCavlc::parseShortTermRefPicSet( TComPPS* pcPPS, TComReferencePictureSet* rps, Int idx )175 #endif176 172 { 177 173 UInt code; … … 184 180 Int rIdx = idx - 1 - code; 185 181 assert (rIdx <= idx && rIdx >= 0); 186 #if RPS_IN_SPS187 182 TComReferencePictureSet* rpsRef = sps->getRPSList()->getReferencePictureSet(rIdx); 188 #else189 TComReferencePictureSet* rpsRef = pcPPS->getRPSList()->getReferencePictureSet(rIdx);190 #endif191 183 Int k = 0, k0 = 0, k1 = 0; 192 184 READ_CODE(1, bit, "delta_rps_sign"); // delta_RPS_sign … … 265 257 READ_FLAG(uiCode, "aps_scaling_list_data_present_flag"); aps->setScalingListEnabled( (uiCode==1)?true:false ); 266 258 READ_FLAG(uiCode, "aps_deblocking_filter_flag"); aps->setLoopFilterOffsetInAPS( (uiCode==1)?true:false ); 267 #if !SAO_UNIT_INTERLEAVING268 READ_FLAG(uiCode, "aps_sample_adaptive_offset_flag"); aps->setSaoEnabled( (uiCode==1)?true:false );269 #endif270 #if !LCU_SYNTAX_ALF271 READ_FLAG(uiCode, "aps_adaptive_loop_filter_flag"); aps->setAlfEnabled( (uiCode==1)?true:false );272 #endif273 259 if(aps->getScalingListEnabled()) 274 260 { 275 261 parseScalingList( aps->getScalingList() ); 276 262 } 277 #if DBL_CONTROL278 263 if(aps->getLoopFilterOffsetInAPS()) 279 264 { 280 265 xParseDblParam( aps ); 281 266 } 282 #endif283 #if SAO_UNIT_INTERLEAVING284 267 READ_FLAG(uiCode, "aps_sao_interleaving_flag"); aps->setSaoInterleavingFlag( (uiCode==1)?true:false ); 285 268 if(!aps->getSaoInterleavingFlag()) 286 269 { 287 270 READ_FLAG(uiCode, "aps_sample_adaptive_offset_flag"); aps->setSaoEnabled( (uiCode==1)?true:false ); 288 #endif289 271 if(aps->getSaoEnabled()) 290 272 { … … 292 274 xParseSaoParam( aps->getSaoParam() ); 293 275 } 294 #if SAO_UNIT_INTERLEAVING 295 } 296 #endif 297 #if LCU_SYNTAX_ALF 276 } 298 277 READ_FLAG(uiCode, "aps_adaptive_loop_filter_flag"); aps->setAlfEnabled( (uiCode==1)?true:false ); 299 #endif300 278 if(aps->getAlfEnabled()) 301 279 { 302 #if !LCU_SYNTAX_ALF303 aps->getAlfParam()->alf_flag = 1;304 #endif305 280 xParseAlfParam( aps->getAlfParam()); 306 281 } … … 316 291 } 317 292 318 #if DBL_CONTROL319 293 Void TDecCavlc::xParseDblParam ( TComAPS* aps ) 320 294 { … … 333 307 } 334 308 } 335 #endif336 309 /** parse SAO parameters 337 310 * \param pSaoParam … … 341 314 UInt uiSymbol; 342 315 343 #if SAO_UNIT_INTERLEAVING344 316 int i,j, compIdx; 345 317 int numCuInWidth; … … 393 365 } 394 366 } 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 } 419 368 /** copy SAO parameter 420 369 * \param dst … … 584 533 } 585 534 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 670 536 Void TDecCavlc::xParseAlfParam(AlfParamSet* pAlfParamSet, Bool bSentInAPS, Int firstLCUAddr, Bool acrossSlice, Int numLCUInWidth, Int numLCUInHeight) 671 537 { … … 931 797 } 932 798 933 #endif934 799 935 800 Void TDecCavlc::xParseAlfParam(ALFParam* pAlfParam) … … 937 802 UInt uiSymbol; 938 803 Int iSymbol; 939 #if ALF_SINGLE_FILTER_SHAPE940 804 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 946 806 switch(pAlfParam->componentID) 947 807 { … … 961 821 case ALF_Y: 962 822 { 963 #endif964 823 pAlfParam->filters_per_group = 0; 965 824 memset (pAlfParam->filterPattern, 0 , sizeof(Int)*NO_VAR_BINS); 966 #if !LCU_SYNTAX_ALF967 READ_FLAG (uiSymbol, "alf_region_adaptation_flag");968 pAlfParam->alf_pcr_region_flag = uiSymbol;969 #endif970 #if ALF_SINGLE_FILTER_SHAPE971 825 pAlfParam->filter_shape = 0; 972 #else973 READ_UVLC (uiSymbol, "alf_length_luma_minus_5_div2");974 pAlfParam->filter_shape = uiSymbol;975 #endif976 826 pAlfParam->num_coeff = sqrFiltLengthTab[pAlfParam->filter_shape]; 977 827 … … 989 839 { 990 840 pAlfParam->filters_per_group = 1; 991 #if LCU_SYNTAX_ALF992 #if ALF_16_BA_GROUPS993 841 Int numMergeFlags = 16; 994 #else995 Int numMergeFlags = 15;996 #endif997 #else998 #if ALF_16_BA_GROUPS999 Int numMergeFlags = 16;1000 #else1001 Int numMergeFlags = pAlfParam->alf_pcr_region_flag ? 16 : 15;1002 #endif1003 #endif1004 842 for (Int i=1; i<numMergeFlags; i++) 1005 843 { … … 1021 859 } 1022 860 1023 #if ALF_SINGLE_FILTER_SHAPE1024 861 Int minScanVal = MIN_SCAN_POS_CROSS; 1025 #else1026 Int minScanVal = (pAlfParam->filter_shape == ALF_STAR5x5) ? 0: MIN_SCAN_POS_CROSS;1027 #endif1028 862 1029 863 // Determine maxScanVal … … 1036 870 1037 871 // Golomb parameters 1038 #if LCU_SYNTAX_ALF1039 872 if( pAlfParam->filters_per_group > 1 ) 1040 873 { 1041 #endif1042 874 READ_UVLC (uiSymbol, "alf_min_kstart_minus1"); 1043 875 pAlfParam->minKStart = 1 + uiSymbol; … … 1051 883 kMin = pAlfParam->kMinTab[scanPos]; 1052 884 } 1053 #if LCU_SYNTAX_ALF 1054 } 1055 #endif 885 } 1056 886 1057 887 Int scanPos; … … 1061 891 { 1062 892 scanPos = pDepthInt[i] - 1; 1063 #if LCU_SYNTAX_ALF1064 893 Int k = (pAlfParam->filters_per_group == 1) ? kTableTabShapes[ALF_CROSS9x7_SQUARE3x3][i] : pAlfParam->kMinTab[scanPos]; 1065 894 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 } 1072 897 } 1073 898 break; … … 1079 904 } 1080 905 } 1081 #else1082 // filter parameters for chroma1083 READ_UVLC (uiSymbol, "alf_chroma_idc");1084 pAlfParam->chroma_idc = uiSymbol;1085 1086 if(pAlfParam->chroma_idc)1087 {1088 1089 #if ALF_SINGLE_FILTER_SHAPE1090 pAlfParam->filter_shape_chroma = 0;1091 #else1092 READ_UVLC (uiSymbol, "alf_length_chroma_minus_5_div2");1093 1094 pAlfParam->filter_shape_chroma = uiSymbol;1095 #endif1096 pAlfParam->num_coeff_chroma = sqrFiltLengthTab[pAlfParam->filter_shape_chroma];1097 // filter coefficients for chroma1098 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 #endif1105 906 } 1106 907 … … 1137 938 } 1138 939 1139 #if TILES_OR_ENTROPY_SYNC_IDC1140 940 Void TDecCavlc::parsePPS(TComPPS* pcPPS, ParameterSetManagerDecoder *parameterSet) 1141 #else1142 Void TDecCavlc::parsePPS(TComPPS* pcPPS)1143 #endif1144 941 { 1145 942 #if ENC_DEC_TRACE … … 1150 947 Int iCode; 1151 948 1152 #if !RPS_IN_SPS1153 TComRPSList* rpsList = pcPPS->getRPSList();1154 #endif1155 949 READ_UVLC( uiCode, "pic_parameter_set_id"); pcPPS->setPPSId (uiCode); 1156 950 READ_UVLC( uiCode, "seq_parameter_set_id"); pcPPS->setSPSId (uiCode); 1157 951 1158 #if MULTIBITS_DATA_HIDING1159 952 READ_FLAG ( uiCode, "sign_data_hiding_flag" ); pcPPS->setSignHideFlag( uiCode ); 1160 953 if( pcPPS->getSignHideFlag() ) … … 1162 955 READ_CODE( 4, uiCode, "sign_hiding_threshold"); pcPPS->setTSIG(uiCode); 1163 956 } 1164 #endif1165 957 1166 958 #if CABAC_INIT_FLAG 1167 959 READ_FLAG( uiCode, "cabac_init_present_flag" ); pcPPS->setCabacInitPresentFlag( uiCode ? true : false ); 1168 #endif1169 #if !RPS_IN_SPS1170 // RPS is put before entropy_coding_mode_flag1171 // since entropy_coding_mode_flag will probably be removed from the WD1172 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);1183 960 #endif 1184 961 // entropy_coding_mode_flag … … 1187 964 if (pcPPS->getEntropyCodingMode()) 1188 965 { 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 } 1209 967 1210 968 // num_ref_idx_l0_default_active_minus1 … … 1241 999 //printf("TDecCavlc::parsePPS():\tm_bUseWeightPred=%d\tm_uiBiPredIdc=%d\n", pcPPS->getUseWP(), pcPPS->getWPBiPredIdc()); 1242 1000 1243 #if H03881244 1001 READ_FLAG( uiCode, "output_flag_present_flag" ); 1245 1002 pcPPS->setOutputFlagPresentFlag( uiCode==1 ); 1246 #endif 1247 1248 #if TILES_OR_ENTROPY_SYNC_IDC 1003 1249 1004 if(parameterSet->getPrefetchedSPS(pcPPS->getSPSId())->getTilesOrEntropyCodingSyncIdc()==1) 1250 1005 { 1251 #endif1252 1006 READ_FLAG ( uiCode, "tile_info_present_flag" ); 1253 1007 pcPPS->setColumnRowInfoPresent(uiCode); … … 1290 1044 Int iNumColTilesMinus1 = (pcPPS->getColumnRowInfoPresent() == 1)?(pcPPS->getNumColumnsMinus1()):(pcPPS->getSPS()->getNumColumnsMinus1()); 1291 1045 Int iNumRowTilesMinus1 = (pcPPS->getColumnRowInfoPresent() == 1)?(pcPPS->getNumColumnsMinus1()):(pcPPS->getSPS()->getNumRowsMinus1()); 1292 #if !REMOVE_TILE_DEPENDENCE1293 pcPPS->setTileBoundaryIndependenceIdr( 1 ); //default1294 #endif1295 1046 pcPPS->setLFCrossTileBoundaryFlag(true); //default 1296 1047 1297 1048 if(iNumColTilesMinus1 !=0 || iNumRowTilesMinus1 !=0) 1298 1049 { 1299 #if !REMOVE_TILE_DEPENDENCE1300 READ_FLAG ( uiCode, "tile_boundary_independence_flag" );1301 pcPPS->setTileBoundaryIndependenceIdr( uiCode );1302 1303 if(pcPPS->getTileBoundaryIndependenceIdr() == 1)1304 {1305 #endif1306 1050 READ_FLAG ( uiCode, "loop_filter_across_tile_flag" ); 1307 1051 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 } 1314 1054 } 1315 1055 else if(parameterSet->getPrefetchedSPS(pcPPS->getSPSId())->getTilesOrEntropyCodingSyncIdc()==2) … … 1317 1057 READ_UVLC( uiCode, "num_substreams_minus1" ); pcPPS->setNumSubstreams(uiCode+1); 1318 1058 } 1319 #endif 1320 1321 #if DBL_CONTROL 1059 1322 1060 READ_FLAG( uiCode, "deblocking_filter_control_present_flag" ); 1323 1061 pcPPS->setDeblockingFilterControlPresent( uiCode ? true : false); 1324 #endif1325 #if PARALLEL_MERGE1326 1062 READ_UVLC( uiCode, "log2_parallel_merge_level_minus2"); 1327 1063 assert(uiCode == LOG2_PARALLEL_MERGE_LEVEL_MINUS2); 1328 1064 pcPPS->setLog2ParallelMergeLevelMinus2 (uiCode); 1329 #endif1330 1065 1331 1066 READ_FLAG( uiCode, "pps_extension_flag"); … … 1496 1231 READ_UVLC ( uiCode, "pic_width_in_luma_samples" ); pcSPS->setPicWidthInLumaSamples ( uiCode ); 1497 1232 READ_UVLC ( uiCode, "pic_height_in_luma_samples" ); pcSPS->setPicHeightInLumaSamples( uiCode ); 1498 #if PIC_CROPPING1499 1233 READ_FLAG( uiCode, "pic_cropping_flag"); pcSPS->setPicCroppingFlag ( uiCode ? true : false ); 1500 1234 if (uiCode != 0) … … 1505 1239 READ_UVLC( uiCode, "pic_crop_bottom_offset" ); pcSPS->setPicCropBottomOffset( uiCode ); 1506 1240 } 1507 #endif1508 1241 1509 1242 #if FULL_NBIT … … 1525 1258 #endif 1526 1259 1527 #if H0736_AVC_STYLE_QP_RANGE1528 1260 pcSPS->setQpBDOffsetY( (Int) (6*uiCode) ); 1529 #endif1530 1261 1531 1262 g_uiBASE_MAX = ((1<<(g_uiBitDepth))-1); … … 1537 1268 #endif 1538 1269 READ_UVLC( uiCode, "bit_depth_chroma_minus8" ); 1539 #if H0736_AVC_STYLE_QP_RANGE1540 1270 pcSPS->setQpBDOffsetC( (Int) (6*uiCode) ); 1541 #endif1542 1271 1543 1272 READ_FLAG( uiCode, "pcm_enabled_flag" ); pcSPS->setUsePCM( uiCode ? true : false ); … … 1554 1283 1555 1284 READ_UVLC( uiCode, "log2_max_pic_order_cnt_lsb_minus4" ); pcSPS->setBitsForPOC( 4 + uiCode ); 1556 #if H0567_DPB_PARAMETERS_PER_TEMPORAL_LAYER1557 1285 for(UInt i=0; i <= pcSPS->getMaxTLayers()-1; i++) 1558 1286 { … … 1564 1292 pcSPS->setMaxLatencyIncrease( uiCode, i ); 1565 1293 } 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 1576 1295 READ_FLAG( uiCode, "restricted_ref_pic_lists_flag" ); 1577 1296 pcSPS->setRestrictedRefPicListsFlag( uiCode ); … … 1585 1304 pcSPS->setListsModificationPresentFlag(true); 1586 1305 } 1587 #endif1588 1306 READ_UVLC( uiCode, "log2_min_coding_block_size_minus3" ); 1589 1307 UInt log2MinCUSize = uiCode + 3; … … 1628 1346 READ_FLAG( uiCode, "sample_adaptive_offset_enabled_flag" ); pcSPS->setUseSAO ( uiCode ? true : false ); 1629 1347 READ_FLAG( uiCode, "adaptive_loop_filter_enabled_flag" ); pcSPS->setUseALF ( uiCode ? true : false ); 1630 #if LCU_SYNTAX_ALF1631 1348 if(pcSPS->getUseALF()) 1632 1349 { 1633 1350 READ_FLAG( uiCode, "alf_coef_in_slice_flag" ); pcSPS->setUseALFCoefInSlice ( uiCode ? true : false ); 1634 1351 } 1635 #endif1636 1352 if( pcSPS->getUsePCM() ) 1637 1353 { … … 1642 1358 1643 1359 1644 #if RPS_IN_SPS1645 1360 TComRPSList* rpsList = pcSPS->getRPSList(); 1646 1361 TComReferencePictureSet* rps; … … 1655 1370 } 1656 1371 READ_FLAG( uiCode, "long_term_ref_pics_present_flag" ); pcSPS->setLongTermRefsPresent(uiCode); 1657 #endif1658 #if !PIC_CROPPING1659 //!!!KS: Syntax not in WD !!!1660 1661 xReadUvlc ( uiCode ); pcSPS->setPadX ( uiCode );1662 xReadUvlc ( uiCode ); pcSPS->setPadY ( uiCode );1663 #endif1664 1372 1665 1373 // AMVP mode for each depth (AM_NONE or AM_EXPL) … … 1670 1378 } 1671 1379 1672 #if TILES_WPP_ENTRY_POINT_SIGNALLING1673 1380 READ_CODE(2, uiCode, "tiles_or_entropy_coding_sync_idc"); pcSPS->setTilesOrEntropyCodingSyncIdc(uiCode); 1674 #endif 1675 1676 #if TILES_OR_ENTROPY_SYNC_IDC 1381 1677 1382 if(pcSPS->getTilesOrEntropyCodingSyncIdc() == 1) 1678 1383 { 1679 #endif1680 1384 READ_UVLC ( uiCode, "num_tile_columns_minus1" ); 1681 1385 pcSPS->setNumColumnsMinus1( uiCode ); … … 1704 1408 free(rowHeight); 1705 1409 } 1706 #if !REMOVE_TILE_DEPENDENCE1707 pcSPS->setTileBoundaryIndependenceIdr( 1 ); //default1708 #endif1709 1410 pcSPS->setLFCrossTileBoundaryFlag(true); //default 1710 1411 1711 1412 if( pcSPS->getNumColumnsMinus1() !=0 || pcSPS->getNumRowsMinus1() != 0) 1712 1413 { 1713 #if !REMOVE_TILE_DEPENDENCE1714 READ_FLAG ( uiCode, "tile_boundary_independence_flag" );1715 pcSPS->setTileBoundaryIndependenceIdr( uiCode );1716 if(pcSPS->getTileBoundaryIndependenceIdr() == 1)1717 {1718 #endif1719 1414 READ_FLAG ( uiCode, "loop_filter_across_tile_flag" ); 1720 1415 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 } 1728 1418 READ_FLAG( uiCode, "sps_extension_flag"); 1729 1419 #if !QC_MVHEVC_B0046 … … 1894 1584 } 1895 1585 1896 #if LCU_SYNTAX_ALF1897 1586 #if MTK_DEPTH_MERGE_TEXTURE_CANDIDATE_C0137 1898 1587 Void TDecCavlc::parseSliceHeader (TComSlice*& rpcSlice, ParameterSetManagerDecoder *parameterSetManager, AlfCUCtrlInfo &alfCUCtrl, AlfParamSet& alfParamSet, bool isDepth) 1899 1588 #else 1900 1589 Void TDecCavlc::parseSliceHeader (TComSlice*& rpcSlice, ParameterSetManagerDecoder *parameterSetManager, AlfCUCtrlInfo &alfCUCtrl, AlfParamSet& alfParamSet) 1901 #endif1902 #else1903 Void TDecCavlc::parseSliceHeader (TComSlice*& rpcSlice, ParameterSetManagerDecoder *parameterSetManager, AlfCUCtrlInfo &alfCUCtrl)1904 1590 #endif 1905 1591 { … … 1988 1674 rpcSlice->setSPS(sps); 1989 1675 rpcSlice->setPPS(pps); 1990 #if H03881991 1676 if( pps->getOutputFlagPresentFlag() ) 1992 1677 { … … 1998 1683 rpcSlice->setPicOutputFlag( true ); 1999 1684 } 2000 #endif2001 1685 #if QC_REM_IDV_B0046 2002 1686 #if !QC_MVHEVC_B0046 … … 2065 1749 { 2066 1750 rps = rpcSlice->getLocalRPS(); 2067 #if RPS_IN_SPS2068 1751 parseShortTermRefPicSet(sps,rps, sps->getRPSList()->getNumberOfReferencePictureSets()); 2069 #else2070 parseShortTermRefPicSet(pps,rps, pps->getRPSList()->getNumberOfReferencePictureSets());2071 #endif2072 1752 rpcSlice->setRPS(rps); 2073 1753 } 2074 1754 else // use reference to short-term reference picture set in PPS 2075 1755 { 2076 #if RPS_IN_SPS2077 1756 READ_UVLC( uiCode, "short_term_ref_pic_set_idx"); rpcSlice->setRPS(sps->getRPSList()->getReferencePictureSet(uiCode)); 2078 #else2079 READ_UVLC( uiCode, "short_term_ref_pic_set_idx"); rpcSlice->setRPS(pps->getRPSList()->getReferencePictureSet(uiCode));2080 #endif2081 1757 rps = rpcSlice->getRPS(); 2082 1758 } 2083 #if RPS_IN_SPS2084 1759 if(sps->getLongTermRefsPresent()) 2085 #else2086 if(pps->getLongTermRefsPresent())2087 #endif2088 1760 { 2089 1761 Int offset = rps->getNumberOfNegativePictures()+rps->getNumberOfPositivePictures(); 2090 1762 READ_UVLC( uiCode, "num_long_term_pics"); rps->setNumberOfLongtermPictures(uiCode); 2091 1763 Int prev = 0; 2092 #if LTRP_MULT2093 1764 Int prevMsb=0; 2094 1765 Int prevDeltaPocLt=0; 2095 #endif2096 1766 for(Int j=rps->getNumberOfLongtermPictures()+offset-1 ; j > offset-1; j--) 2097 1767 { … … 2099 1769 prev += uiCode; 2100 1770 2101 #if LTRP_MULT2102 1771 READ_FLAG(uiCode,"delta_poc_msb_present_flag"); 2103 1772 Int decDeltaPOCMsbPresent=uiCode; … … 2120 1789 else 2121 1790 { 2122 #endif2123 1791 rps->setPOC(j,rpcSlice->getPOC()-prev); 2124 1792 rps->setDeltaPOC(j,-(Int)prev); 2125 #if LTRP_MULT2126 1793 } 2127 1794 prevDeltaPocLt=prev; 2128 #endif2129 1795 READ_FLAG( uiCode, "used_by_curr_pic_lt_flag"); rps->setUsed(j,uiCode); 2130 1796 } … … 2145 1811 if (sps->getUseSAO()) 2146 1812 { 2147 #if SAO_UNIT_INTERLEAVING2148 1813 READ_FLAG(uiCode, "slice_sao_interleaving_flag"); rpcSlice->setSaoInterleavingFlag(uiCode); 2149 #endif2150 1814 READ_FLAG(uiCode, "slice_sample_adaptive_offset_flag"); rpcSlice->setSaoEnabledFlag((Bool)uiCode); 2151 #if SAO_UNIT_INTERLEAVING2152 1815 if (rpcSlice->getSaoEnabledFlag() && rpcSlice->getSaoInterleavingFlag()) 2153 1816 { … … 2160 1823 rpcSlice->setSaoEnabledFlagCr(0); 2161 1824 } 2162 #endif2163 1825 } 2164 1826 READ_UVLC ( uiCode, "aps_id" ); rpcSlice->setAPSId(uiCode); … … 2188 1850 if( !rpcSlice->isIntra() ) 2189 1851 { 2190 #if H0412_REF_PIC_LIST_RESTRICTION2191 1852 #if QC_MVHEVC_B0046 2192 1853 if( !rpcSlice->getViewId() || !rpcSlice->getSPS()->getListsModificationPresentFlag() ) … … 2199 1860 else 2200 1861 { 2201 #endif2202 1862 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 } 2206 1864 2207 1865 if(refPicListModification->getRefPicListModificationFlagL0()) … … 2209 1867 uiCode = 0; 2210 1868 Int i = 0; 2211 #if H0137_0138_LIST_MODIFICATION2212 1869 Int NumPocTotalCurr = rpcSlice->getNumPocTotalCurrMvc(); 2213 1870 if ( NumPocTotalCurr > 1 ) … … 2232 1889 } 2233 1890 } 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 } 2255 1892 } 2256 1893 else 2257 1894 { 2258 1895 refPicListModification->setRefPicListModificationFlagL0(0); 2259 #if !H0137_0138_LIST_MODIFICATION2260 refPicListModification->setNumberOfRefPicListModificationsL0(0);2261 #endif2262 1896 } 2263 1897 if(rpcSlice->isInterB()) 2264 1898 { 2265 #if H0412_REF_PIC_LIST_RESTRICTION2266 1899 #if QC_MVHEVC_B0046 2267 1900 if( !rpcSlice->getViewId() || !rpcSlice->getSPS()->getListsModificationPresentFlag() ) … … 2274 1907 else 2275 1908 { 2276 #endif2277 1909 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 } 2281 1911 if(refPicListModification->getRefPicListModificationFlagL1()) 2282 1912 { 2283 1913 uiCode = 0; 2284 1914 Int i = 0; 2285 #if H0137_0138_LIST_MODIFICATION2286 1915 Int NumPocTotalCurr = rpcSlice->getNumPocTotalCurrMvc(); 2287 1916 if ( NumPocTotalCurr > 1 ) … … 2306 1935 } 2307 1936 } 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 } 2329 1938 } 2330 1939 else 2331 1940 { 2332 1941 refPicListModification->setRefPicListModificationFlagL1(0); 2333 #if !H0137_0138_LIST_MODIFICATION2334 refPicListModification->setNumberOfRefPicListModificationsL1(0);2335 #endif2336 1942 } 2337 1943 } … … 2351 1957 READ_UVLC( uiCode, "num_ref_idx_lc_active_minus1" ); rpcSlice->setNumRefIdx( REF_PIC_LIST_C, uiCode + 1 ); 2352 1958 2353 #if H0412_REF_PIC_LIST_RESTRICTION2354 1959 #if QC_MVHEVC_B0046 2355 1960 if( rpcSlice->getViewId() && rpcSlice->getSPS()->getListsModificationPresentFlag() ) … … 2358 1963 #endif 2359 1964 { 2360 #endif2361 1965 READ_FLAG( uiCode, "ref_pic_list_modification_flag_lc" ); rpcSlice->setRefPicListModificationFlagLC( uiCode ? 1 : 0 ); 2362 1966 if(uiCode) … … 2366 1970 READ_FLAG( uiCode, "pic_from_list_0_flag" ); 2367 1971 rpcSlice->setListIdFromIdxOfLC(i, uiCode); 2368 #if H0137_0138_LIST_MODIFICATION2369 1972 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)) ) 2370 1973 { … … 2375 1978 READ_UVLC( uiCode, "ref_idx_list_curr" ); 2376 1979 } 2377 #else2378 READ_UVLC( uiCode, "ref_idx_list_curr" );2379 #endif2380 1980 rpcSlice->setRefIdxFromIdxOfLC(i, uiCode); 2381 1981 rpcSlice->setRefIdxOfLC((RefPicList)rpcSlice->getListIdFromIdxOfLC(i), rpcSlice->getRefIdxFromIdxOfLC(i), i); 2382 1982 } 2383 1983 } 2384 #if H0412_REF_PIC_LIST_RESTRICTION2385 1984 } 2386 1985 else … … 2388 1987 rpcSlice->setRefPicListModificationFlagLC(false); 2389 1988 } 2390 #endif2391 1989 } 2392 1990 else … … 2401 1999 } 2402 2000 2403 #if H0111_MVD_L1_ZERO2404 2001 if (rpcSlice->isInterB()) 2405 2002 { 2406 2003 READ_FLAG( uiCode, "mvd_l1_zero_flag" ); rpcSlice->setMvdL1ZeroFlag( (uiCode ? true : false) ); 2407 2004 } 2408 #endif2409 2005 2410 2006 #if CABAC_INIT_FLAG … … 2432 2028 rpcSlice->setSliceQp (26 + pps->getPicInitQPMinus26() + iCode); 2433 2029 2434 #if H0736_AVC_STYLE_QP_RANGE2435 2030 assert( rpcSlice->getSliceQp() >= -sps->getQpBDOffsetY() ); 2436 2031 assert( rpcSlice->getSliceQp() <= 51 ); 2437 #endif 2438 2439 #if DBL_CONTROL 2032 2440 2033 if (rpcSlice->getPPS()->getDeblockingFilterControlPresent()) 2441 2034 { … … 2447 2040 rpcSlice->setInheritDblParamFromAPS(0); 2448 2041 } 2449 #else2450 READ_FLAG ( uiCode, "inherit_dbl_param_from_APS_flag" ); rpcSlice->setInheritDblParamFromAPS(uiCode ? 1 : 0);2451 #endif2452 2042 if(!rpcSlice->getInheritDblParamFromAPS()) 2453 2043 { … … 2459 2049 } 2460 2050 } 2461 #if DBL_CONTROL2462 2051 } 2463 #endif2464 2052 if ( rpcSlice->getSliceType() == B_SLICE ) 2465 2053 { … … 2531 2119 2532 2120 Int uiNumCUsInFrame = uiNumLCUsInWidth* uiNumLCUsInHeight; 2533 #if LCU_SYNTAX_ALF2534 2121 if(sps->getUseALFCoefInSlice()) 2535 2122 { … … 2544 2131 if(!sps->getUseALFCoefInSlice()) 2545 2132 { 2546 #endif2547 2133 xParseAlfCuControlParam(alfCUCtrl, uiNumCUsInFrame); 2548 #if LCU_SYNTAX_ALF 2549 } 2550 #endif 2134 } 2551 2135 2552 2136 } … … 2557 2141 if (!bEntropySlice) 2558 2142 { 2559 #if !REMOVE_TILE_DEPENDENCE2560 if (sps->getTileBoundaryIndependenceIdr())2561 {2562 #endif2563 2143 xReadCode(1, uiCode); // read flag indicating if tile markers transmitted 2564 2144 rpcSlice->setTileMarkerFlag( uiCode ); 2565 #if !REMOVE_TILE_DEPENDENCE 2566 } 2567 #endif 2568 } 2569 2570 #if TILES_WPP_ENTRY_POINT_SIGNALLING 2145 } 2146 2571 2147 Int tilesOrEntropyCodingSyncIdc = rpcSlice->getSPS()->getTilesOrEntropyCodingSyncIdc(); 2572 2148 UInt *entryPointOffset = NULL; … … 2629 2205 delete [] entryPointOffset; 2630 2206 } 2631 #else2632 #if WPP_SIMPLIFICATION2633 if (pps->getNumSubstreams() > 1)2634 #else2635 if (pps->getEntropyCodingSynchro())2636 #endif2637 {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 #endif2669 2207 2670 2208 if (!bEntropySlice) 2671 2209 { 2672 2210 // Reading location information 2673 #if !REMOVE_TILE_DEPENDENCE2674 if (sps->getTileBoundaryIndependenceIdr())2675 {2676 #endif2677 #if !TILES_WPP_ENTRY_POINT_SIGNALLING2678 xReadCode(1, uiCode); // read flag indicating if location information signaled in slice header2679 Bool bTileLocationInformationInSliceHeaderFlag = (uiCode)? true : false;2680 2681 if (bTileLocationInformationInSliceHeaderFlag)2682 {2683 // location count2684 xReadCode(5, uiCode); // number of tiles for which location information signaled2685 rpcSlice->setTileLocationCount ( uiCode + 1 );2686 2687 xReadCode(5, uiCode); // number of bits used by diff2688 Int iBitsUsedByDiff = uiCode + 1;2689 2690 // read out tile start location2691 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 else2703 {2704 xReadCode(1, uiCode); // read sign2705 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 location2712 }2713 }2714 }2715 #endif2716 2211 2717 2212 // read out trailing bits 2718 2213 m_pcBitstream->readOutTrailingBits(); 2719 #if !REMOVE_TILE_DEPENDENCE2720 }2721 #endif2722 2214 } 2723 2215 return; … … 2814 2306 Void TDecCavlc::parseIPCMInfo( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) 2815 2307 { 2816 #if BURST_IPCM2817 2308 assert(0); 2818 #else2819 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 #endif2893 2309 } 2894 2310 … … 2920 2336 Void TDecCavlc::parseDeltaQP( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) 2921 2337 { 2922 #if H0736_AVC_STYLE_QP_RANGE2923 2338 Int qp; 2924 #else2925 UInt uiQp;2926 #endif2927 2339 Int iDQp; 2928 2340 2929 2341 xReadSvlc( iDQp ); 2930 2342 2931 #if H0736_AVC_STYLE_QP_RANGE2932 2343 Int qpBdOffsetY = pcCU->getSlice()->getSPS()->getQpBDOffsetY(); 2933 2344 qp = (((Int) pcCU->getRefQP( uiAbsPartIdx ) + iDQp + 52 + 2*qpBdOffsetY )%(52+ qpBdOffsetY)) - qpBdOffsetY; 2934 #else2935 uiQp = pcCU->getRefQP( uiAbsPartIdx ) + iDQp;2936 #endif2937 2345 2938 2346 UInt uiAbsQpCUPartIdx = (uiAbsPartIdx>>(8-(pcCU->getSlice()->getPPS()->getMaxCuDQPDepth()<<1)))<<(8-(pcCU->getSlice()->getPPS()->getMaxCuDQPDepth()<<1)) ; 2939 2347 UInt uiQpCUDepth = min(uiDepth,pcCU->getSlice()->getPPS()->getMaxCuDQPDepth()) ; 2940 2348 2941 #if H0736_AVC_STYLE_QP_RANGE2942 2349 pcCU->setQPSubParts( qp, uiAbsQpCUPartIdx, uiQpCUDepth ); 2943 #else2944 pcCU->setQPSubParts( uiQp, uiAbsQpCUPartIdx, uiQpCUDepth );2945 #endif2946 2350 } 2947 2351 … … 3407 2811 READ_UVLC( code, "scaling_list_pred_matrix_id_delta"); 3408 2812 scalingList->setRefMatrixId (sizeId,listId,(UInt)((Int)(listId)-(code+1))); 3409 #if SCALING_LIST3410 2813 if( sizeId > SCALING_LIST_8x8 ) 3411 2814 { 3412 2815 scalingList->setScalingListDC(sizeId,listId,scalingList->getScalingListDC(sizeId, scalingList->getRefMatrixId (sizeId,listId))); 3413 2816 } 3414 #endif3415 2817 scalingList->processRefMatrix( sizeId, listId, scalingList->getRefMatrixId (sizeId,listId)); 3416 2818 … … 3433 2835 Void TDecCavlc::xDecodeScalingList(TComScalingList *scalingList, UInt sizeId, UInt listId) 3434 2836 { 3435 #if SCALING_LIST3436 2837 Int i,coefNum = min(MAX_MATRIX_COEF_NUM,(Int)g_scalingListSize[sizeId]); 3437 2838 Int data; … … 3473 2874 } 3474 2875 } 3475 #else3476 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 #endif3489 2876 } 3490 2877
Note: See TracChangeset for help on using the changeset viewer.