Changeset 296 in 3DVCSoftware for trunk/source/Lib/TLibDecoder/TDecCAVLC.cpp
- Timestamp:
- 20 Feb 2013, 22:07:43 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/Lib/TLibDecoder/TDecCAVLC.cpp
r210 r296 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"); … … 1458 1193 } 1459 1194 } 1195 #if INTER_VIEW_VECTOR_SCALING_C0115 1196 READ_FLAG( uiCode, "inter_view_vector_scaling_flag" ); pcVPS->setIVScalingFlag( uiCode ? true:false); 1197 #endif 1460 1198 } 1461 1199 … … 1468 1206 #endif 1469 1207 #endif 1470 #if HHI_MPI 1208 #if HHI_MPI || OL_QTLIMIT_PREDCODING_B0068 1471 1209 Void TDecCavlc::parseSPS(TComSPS* pcSPS, Bool bIsDepth) 1472 1210 #else … … 1493 1231 READ_UVLC ( uiCode, "pic_width_in_luma_samples" ); pcSPS->setPicWidthInLumaSamples ( uiCode ); 1494 1232 READ_UVLC ( uiCode, "pic_height_in_luma_samples" ); pcSPS->setPicHeightInLumaSamples( uiCode ); 1495 #if PIC_CROPPING1496 1233 READ_FLAG( uiCode, "pic_cropping_flag"); pcSPS->setPicCroppingFlag ( uiCode ? true : false ); 1497 1234 if (uiCode != 0) … … 1502 1239 READ_UVLC( uiCode, "pic_crop_bottom_offset" ); pcSPS->setPicCropBottomOffset( uiCode ); 1503 1240 } 1504 #endif1505 1241 1506 1242 #if FULL_NBIT … … 1522 1258 #endif 1523 1259 1524 #if H0736_AVC_STYLE_QP_RANGE1525 1260 pcSPS->setQpBDOffsetY( (Int) (6*uiCode) ); 1526 #endif1527 1261 1528 1262 g_uiBASE_MAX = ((1<<(g_uiBitDepth))-1); … … 1534 1268 #endif 1535 1269 READ_UVLC( uiCode, "bit_depth_chroma_minus8" ); 1536 #if H0736_AVC_STYLE_QP_RANGE1537 1270 pcSPS->setQpBDOffsetC( (Int) (6*uiCode) ); 1538 #endif1539 1271 1540 1272 READ_FLAG( uiCode, "pcm_enabled_flag" ); pcSPS->setUsePCM( uiCode ? true : false ); … … 1551 1283 1552 1284 READ_UVLC( uiCode, "log2_max_pic_order_cnt_lsb_minus4" ); pcSPS->setBitsForPOC( 4 + uiCode ); 1553 #if H0567_DPB_PARAMETERS_PER_TEMPORAL_LAYER1554 1285 for(UInt i=0; i <= pcSPS->getMaxTLayers()-1; i++) 1555 1286 { … … 1561 1292 pcSPS->setMaxLatencyIncrease( uiCode, i ); 1562 1293 } 1563 #else 1564 READ_UVLC( uiCode, "max_num_ref_pics" ); pcSPS->setMaxNumberOfReferencePictures(uiCode); 1565 READ_UVLC( uiCode, "num_reorder_frames" ); pcSPS->setNumReorderFrames(uiCode); 1566 READ_UVLC ( uiCode, "max_dec_frame_buffering"); 1567 pcSPS->setMaxDecFrameBuffering( uiCode ); 1568 READ_UVLC ( uiCode, "max_latency_increase"); 1569 pcSPS->setMaxLatencyIncrease( uiCode ); 1570 #endif 1571 1572 #if H0412_REF_PIC_LIST_RESTRICTION 1294 1573 1295 READ_FLAG( uiCode, "restricted_ref_pic_lists_flag" ); 1574 1296 pcSPS->setRestrictedRefPicListsFlag( uiCode ); … … 1582 1304 pcSPS->setListsModificationPresentFlag(true); 1583 1305 } 1584 #endif1585 1306 READ_UVLC( uiCode, "log2_min_coding_block_size_minus3" ); 1586 1307 UInt log2MinCUSize = uiCode + 3; … … 1625 1346 READ_FLAG( uiCode, "sample_adaptive_offset_enabled_flag" ); pcSPS->setUseSAO ( uiCode ? true : false ); 1626 1347 READ_FLAG( uiCode, "adaptive_loop_filter_enabled_flag" ); pcSPS->setUseALF ( uiCode ? true : false ); 1627 #if LCU_SYNTAX_ALF1628 1348 if(pcSPS->getUseALF()) 1629 1349 { 1630 1350 READ_FLAG( uiCode, "alf_coef_in_slice_flag" ); pcSPS->setUseALFCoefInSlice ( uiCode ? true : false ); 1631 1351 } 1632 #endif1633 1352 if( pcSPS->getUsePCM() ) 1634 1353 { … … 1639 1358 1640 1359 1641 #if RPS_IN_SPS1642 1360 TComRPSList* rpsList = pcSPS->getRPSList(); 1643 1361 TComReferencePictureSet* rps; … … 1652 1370 } 1653 1371 READ_FLAG( uiCode, "long_term_ref_pics_present_flag" ); pcSPS->setLongTermRefsPresent(uiCode); 1654 #endif1655 #if !PIC_CROPPING1656 //!!!KS: Syntax not in WD !!!1657 1658 xReadUvlc ( uiCode ); pcSPS->setPadX ( uiCode );1659 xReadUvlc ( uiCode ); pcSPS->setPadY ( uiCode );1660 #endif1661 1372 1662 1373 // AMVP mode for each depth (AM_NONE or AM_EXPL) … … 1667 1378 } 1668 1379 1669 #if TILES_WPP_ENTRY_POINT_SIGNALLING1670 1380 READ_CODE(2, uiCode, "tiles_or_entropy_coding_sync_idc"); pcSPS->setTilesOrEntropyCodingSyncIdc(uiCode); 1671 #endif 1672 1673 #if TILES_OR_ENTROPY_SYNC_IDC 1381 1674 1382 if(pcSPS->getTilesOrEntropyCodingSyncIdc() == 1) 1675 1383 { 1676 #endif1677 1384 READ_UVLC ( uiCode, "num_tile_columns_minus1" ); 1678 1385 pcSPS->setNumColumnsMinus1( uiCode ); … … 1701 1408 free(rowHeight); 1702 1409 } 1703 #if !REMOVE_TILE_DEPENDENCE1704 pcSPS->setTileBoundaryIndependenceIdr( 1 ); //default1705 #endif1706 1410 pcSPS->setLFCrossTileBoundaryFlag(true); //default 1707 1411 1708 1412 if( pcSPS->getNumColumnsMinus1() !=0 || pcSPS->getNumRowsMinus1() != 0) 1709 1413 { 1710 #if !REMOVE_TILE_DEPENDENCE1711 READ_FLAG ( uiCode, "tile_boundary_independence_flag" );1712 pcSPS->setTileBoundaryIndependenceIdr( uiCode );1713 if(pcSPS->getTileBoundaryIndependenceIdr() == 1)1714 {1715 #endif1716 1414 READ_FLAG ( uiCode, "loop_filter_across_tile_flag" ); 1717 1415 pcSPS->setLFCrossTileBoundaryFlag( (uiCode==1)?true:false); 1718 #if !REMOVE_TILE_DEPENDENCE 1719 } 1720 #endif 1721 } 1722 #if TILES_OR_ENTROPY_SYNC_IDC 1723 } 1724 #endif 1416 } 1417 } 1725 1418 READ_FLAG( uiCode, "sps_extension_flag"); 1726 1419 #if !QC_MVHEVC_B0046 … … 1799 1492 pcSPS->setPredDepthMapGeneration( 0, false ); 1800 1493 #endif 1801 #if H HI_INTER_VIEW_RESIDUAL_PRED1494 #if H3D_IVRP 1802 1495 pcSPS->setMultiviewResPredMode ( 0 ); 1803 1496 #endif … … 1814 1507 pcSPS->setPredDepthMapGeneration( uiCode, true ); 1815 1508 #endif 1816 #if H HI_INTER_VIEW_RESIDUAL_PRED1509 #if H3D_IVRP 1817 1510 pcSPS->setMultiviewResPredMode ( 0 ); 1818 1511 #endif … … 1841 1534 #if DEPTH_MAP_GENERATION 1842 1535 UInt uiPredDepthMapGeneration = 0, uiPdmPrecision = 0; 1843 #if H HI_INTER_VIEW_MOTION_PRED1536 #if H3D_IVMP 1844 1537 UInt uiMultiviewMvPredMode = 0; 1845 1538 #endif 1846 #if H HI_INTER_VIEW_RESIDUAL_PRED1539 #if H3D_IVRP 1847 1540 UInt uiMultiviewResPredMode = 0; 1848 1541 #endif … … 1856 1549 READ_SVLC( iCode, "Pdm_offset" ); m_aaiTempPdmOffset [ uiViewId ][ uiBaseId ] = iCode; 1857 1550 } 1858 #if H HI_INTER_VIEW_MOTION_PRED1551 #if H3D_IVMP 1859 1552 READ_UVLC( uiMultiviewMvPredMode, "multi_view_mv_pred_mode" ); 1860 1553 #endif 1861 #if H HI_INTER_VIEW_RESIDUAL_PRED1554 #if H3D_IVRP 1862 1555 READ_FLAG( uiMultiviewResPredMode, "multi_view_residual_pred_mode" ); 1863 1556 #endif 1864 1557 } 1865 #if H HI_INTER_VIEW_MOTION_PRED1558 #if H3D_IVMP 1866 1559 pcSPS->setPredDepthMapGeneration( uiViewId, false, uiPredDepthMapGeneration, uiMultiviewMvPredMode, uiPdmPrecision, m_aaiTempPdmScaleNomDelta, m_aaiTempPdmOffset ); 1867 1560 #else … … 1869 1562 #endif 1870 1563 #endif 1871 #if H HI_INTER_VIEW_RESIDUAL_PRED1564 #if H3D_IVRP 1872 1565 pcSPS->setMultiviewResPredMode ( uiMultiviewResPredMode ); 1873 1566 #endif … … 1891 1584 } 1892 1585 1893 #if LCU_SYNTAX_ALF 1586 #if MTK_DEPTH_MERGE_TEXTURE_CANDIDATE_C0137 1587 Void TDecCavlc::parseSliceHeader (TComSlice*& rpcSlice, ParameterSetManagerDecoder *parameterSetManager, AlfCUCtrlInfo &alfCUCtrl, AlfParamSet& alfParamSet, bool isDepth) 1588 #else 1894 1589 Void TDecCavlc::parseSliceHeader (TComSlice*& rpcSlice, ParameterSetManagerDecoder *parameterSetManager, AlfCUCtrlInfo &alfCUCtrl, AlfParamSet& alfParamSet) 1895 #else1896 Void TDecCavlc::parseSliceHeader (TComSlice*& rpcSlice, ParameterSetManagerDecoder *parameterSetManager, AlfCUCtrlInfo &alfCUCtrl)1897 1590 #endif 1898 1591 { … … 1927 1620 { 1928 1621 UInt uiCodeTmp = 0; 1929 if ( rpcSlice->getSPS()->getViewId() && !rpcSlice->getSPS()->isDepth() ) 1622 if ( rpcSlice->getSPS()->getViewId() 1623 #if !LGE_ILLUCOMP_DEPTH_C0046 1624 && !rpcSlice->getSPS()->isDepth() 1625 #endif 1626 ) 1930 1627 { 1931 1628 READ_FLAG (uiCodeTmp, "applying IC flag"); … … 1977 1674 rpcSlice->setSPS(sps); 1978 1675 rpcSlice->setPPS(pps); 1979 #if H03881980 1676 if( pps->getOutputFlagPresentFlag() ) 1981 1677 { … … 1987 1683 rpcSlice->setPicOutputFlag( true ); 1988 1684 } 1989 #endif1990 1685 #if QC_REM_IDV_B0046 1991 1686 #if !QC_MVHEVC_B0046 … … 2054 1749 { 2055 1750 rps = rpcSlice->getLocalRPS(); 2056 #if RPS_IN_SPS2057 1751 parseShortTermRefPicSet(sps,rps, sps->getRPSList()->getNumberOfReferencePictureSets()); 2058 #else2059 parseShortTermRefPicSet(pps,rps, pps->getRPSList()->getNumberOfReferencePictureSets());2060 #endif2061 1752 rpcSlice->setRPS(rps); 2062 1753 } 2063 1754 else // use reference to short-term reference picture set in PPS 2064 1755 { 2065 #if RPS_IN_SPS2066 1756 READ_UVLC( uiCode, "short_term_ref_pic_set_idx"); rpcSlice->setRPS(sps->getRPSList()->getReferencePictureSet(uiCode)); 2067 #else2068 READ_UVLC( uiCode, "short_term_ref_pic_set_idx"); rpcSlice->setRPS(pps->getRPSList()->getReferencePictureSet(uiCode));2069 #endif2070 1757 rps = rpcSlice->getRPS(); 2071 1758 } 2072 #if RPS_IN_SPS2073 1759 if(sps->getLongTermRefsPresent()) 2074 #else2075 if(pps->getLongTermRefsPresent())2076 #endif2077 1760 { 2078 1761 Int offset = rps->getNumberOfNegativePictures()+rps->getNumberOfPositivePictures(); 2079 1762 READ_UVLC( uiCode, "num_long_term_pics"); rps->setNumberOfLongtermPictures(uiCode); 2080 1763 Int prev = 0; 2081 #if LTRP_MULT2082 1764 Int prevMsb=0; 2083 1765 Int prevDeltaPocLt=0; 2084 #endif2085 1766 for(Int j=rps->getNumberOfLongtermPictures()+offset-1 ; j > offset-1; j--) 2086 1767 { … … 2088 1769 prev += uiCode; 2089 1770 2090 #if LTRP_MULT2091 1771 READ_FLAG(uiCode,"delta_poc_msb_present_flag"); 2092 1772 Int decDeltaPOCMsbPresent=uiCode; … … 2109 1789 else 2110 1790 { 2111 #endif2112 1791 rps->setPOC(j,rpcSlice->getPOC()-prev); 2113 1792 rps->setDeltaPOC(j,-(Int)prev); 2114 #if LTRP_MULT2115 1793 } 2116 1794 prevDeltaPocLt=prev; 2117 #endif2118 1795 READ_FLAG( uiCode, "used_by_curr_pic_lt_flag"); rps->setUsed(j,uiCode); 2119 1796 } … … 2134 1811 if (sps->getUseSAO()) 2135 1812 { 2136 #if SAO_UNIT_INTERLEAVING2137 1813 READ_FLAG(uiCode, "slice_sao_interleaving_flag"); rpcSlice->setSaoInterleavingFlag(uiCode); 2138 #endif2139 1814 READ_FLAG(uiCode, "slice_sample_adaptive_offset_flag"); rpcSlice->setSaoEnabledFlag((Bool)uiCode); 2140 #if SAO_UNIT_INTERLEAVING2141 1815 if (rpcSlice->getSaoEnabledFlag() && rpcSlice->getSaoInterleavingFlag()) 2142 1816 { … … 2149 1823 rpcSlice->setSaoEnabledFlagCr(0); 2150 1824 } 2151 #endif2152 1825 } 2153 1826 READ_UVLC ( uiCode, "aps_id" ); rpcSlice->setAPSId(uiCode); … … 2177 1850 if( !rpcSlice->isIntra() ) 2178 1851 { 2179 #if H0412_REF_PIC_LIST_RESTRICTION2180 1852 #if QC_MVHEVC_B0046 2181 1853 if( !rpcSlice->getViewId() || !rpcSlice->getSPS()->getListsModificationPresentFlag() ) … … 2188 1860 else 2189 1861 { 2190 #endif2191 1862 READ_FLAG( uiCode, "ref_pic_list_modification_flag_l0" ); refPicListModification->setRefPicListModificationFlagL0( uiCode ? 1 : 0 ); 2192 #if H0412_REF_PIC_LIST_RESTRICTION 2193 } 2194 #endif 1863 } 2195 1864 2196 1865 if(refPicListModification->getRefPicListModificationFlagL0()) … … 2198 1867 uiCode = 0; 2199 1868 Int i = 0; 2200 #if H0137_0138_LIST_MODIFICATION2201 1869 Int NumPocTotalCurr = rpcSlice->getNumPocTotalCurrMvc(); 2202 1870 if ( NumPocTotalCurr > 1 ) … … 2221 1889 } 2222 1890 } 2223 #else 2224 Int list_modification_idc = 0; 2225 while(list_modification_idc != 3) 2226 { 2227 READ_UVLC( uiCode, "list_modification_idc" ); refPicListModification->setListIdcL0(i, uiCode ); 2228 list_modification_idc = uiCode; 2229 if(uiCode != 3) 2230 { 2231 READ_UVLC( uiCode, "ref_pic_set_idx" ); refPicListModification->setRefPicSetIdxL0(i, uiCode ); 2232 } 2233 i++; 2234 } 2235 refPicListModification->setNumberOfRefPicListModificationsL0(i-1); 2236 #endif 2237 } 2238 #if !H0137_0138_LIST_MODIFICATION 2239 else 2240 { 2241 refPicListModification->setNumberOfRefPicListModificationsL0(0); 2242 } 2243 #endif 1891 } 2244 1892 } 2245 1893 else 2246 1894 { 2247 1895 refPicListModification->setRefPicListModificationFlagL0(0); 2248 #if !H0137_0138_LIST_MODIFICATION2249 refPicListModification->setNumberOfRefPicListModificationsL0(0);2250 #endif2251 1896 } 2252 1897 if(rpcSlice->isInterB()) 2253 1898 { 2254 #if H0412_REF_PIC_LIST_RESTRICTION2255 1899 #if QC_MVHEVC_B0046 2256 1900 if( !rpcSlice->getViewId() || !rpcSlice->getSPS()->getListsModificationPresentFlag() ) … … 2263 1907 else 2264 1908 { 2265 #endif2266 1909 READ_FLAG( uiCode, "ref_pic_list_modification_flag_l1" ); refPicListModification->setRefPicListModificationFlagL1( uiCode ? 1 : 0 ); 2267 #if H0412_REF_PIC_LIST_RESTRICTION 2268 } 2269 #endif 1910 } 2270 1911 if(refPicListModification->getRefPicListModificationFlagL1()) 2271 1912 { 2272 1913 uiCode = 0; 2273 1914 Int i = 0; 2274 #if H0137_0138_LIST_MODIFICATION2275 1915 Int NumPocTotalCurr = rpcSlice->getNumPocTotalCurrMvc(); 2276 1916 if ( NumPocTotalCurr > 1 ) … … 2295 1935 } 2296 1936 } 2297 #else 2298 Int list_modification_idc = 0; 2299 while(list_modification_idc != 3) 2300 { 2301 READ_UVLC( uiCode, "list_modification_idc" ); refPicListModification->setListIdcL1(i, uiCode ); 2302 list_modification_idc = uiCode; 2303 if(uiCode != 3) 2304 { 2305 READ_UVLC( uiCode, "ref_pic_set_idx" ); refPicListModification->setRefPicSetIdxL1(i, uiCode ); 2306 } 2307 i++; 2308 } 2309 refPicListModification->setNumberOfRefPicListModificationsL1(i-1); 2310 #endif 2311 } 2312 #if !H0137_0138_LIST_MODIFICATION 2313 else 2314 { 2315 refPicListModification->setNumberOfRefPicListModificationsL1(0); 2316 } 2317 #endif 1937 } 2318 1938 } 2319 1939 else 2320 1940 { 2321 1941 refPicListModification->setRefPicListModificationFlagL1(0); 2322 #if !H0137_0138_LIST_MODIFICATION2323 refPicListModification->setNumberOfRefPicListModificationsL1(0);2324 #endif2325 1942 } 2326 1943 } … … 2340 1957 READ_UVLC( uiCode, "num_ref_idx_lc_active_minus1" ); rpcSlice->setNumRefIdx( REF_PIC_LIST_C, uiCode + 1 ); 2341 1958 2342 #if H0412_REF_PIC_LIST_RESTRICTION2343 1959 #if QC_MVHEVC_B0046 2344 1960 if( rpcSlice->getViewId() && rpcSlice->getSPS()->getListsModificationPresentFlag() ) … … 2347 1963 #endif 2348 1964 { 2349 #endif2350 1965 READ_FLAG( uiCode, "ref_pic_list_modification_flag_lc" ); rpcSlice->setRefPicListModificationFlagLC( uiCode ? 1 : 0 ); 2351 1966 if(uiCode) … … 2355 1970 READ_FLAG( uiCode, "pic_from_list_0_flag" ); 2356 1971 rpcSlice->setListIdFromIdxOfLC(i, uiCode); 2357 #if H0137_0138_LIST_MODIFICATION2358 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)) ) 2359 1973 { … … 2364 1978 READ_UVLC( uiCode, "ref_idx_list_curr" ); 2365 1979 } 2366 #else2367 READ_UVLC( uiCode, "ref_idx_list_curr" );2368 #endif2369 1980 rpcSlice->setRefIdxFromIdxOfLC(i, uiCode); 2370 1981 rpcSlice->setRefIdxOfLC((RefPicList)rpcSlice->getListIdFromIdxOfLC(i), rpcSlice->getRefIdxFromIdxOfLC(i), i); 2371 1982 } 2372 1983 } 2373 #if H0412_REF_PIC_LIST_RESTRICTION2374 1984 } 2375 1985 else … … 2377 1987 rpcSlice->setRefPicListModificationFlagLC(false); 2378 1988 } 2379 #endif2380 1989 } 2381 1990 else … … 2390 1999 } 2391 2000 2392 #if H0111_MVD_L1_ZERO2393 2001 if (rpcSlice->isInterB()) 2394 2002 { 2395 2003 READ_FLAG( uiCode, "mvd_l1_zero_flag" ); rpcSlice->setMvdL1ZeroFlag( (uiCode ? true : false) ); 2396 2004 } 2397 #endif2398 2005 2399 2006 #if CABAC_INIT_FLAG … … 2421 2028 rpcSlice->setSliceQp (26 + pps->getPicInitQPMinus26() + iCode); 2422 2029 2423 #if H0736_AVC_STYLE_QP_RANGE2424 2030 assert( rpcSlice->getSliceQp() >= -sps->getQpBDOffsetY() ); 2425 2031 assert( rpcSlice->getSliceQp() <= 51 ); 2426 #endif 2427 2428 #if DBL_CONTROL 2032 2429 2033 if (rpcSlice->getPPS()->getDeblockingFilterControlPresent()) 2430 2034 { … … 2436 2040 rpcSlice->setInheritDblParamFromAPS(0); 2437 2041 } 2438 #else2439 READ_FLAG ( uiCode, "inherit_dbl_param_from_APS_flag" ); rpcSlice->setInheritDblParamFromAPS(uiCode ? 1 : 0);2440 #endif2441 2042 if(!rpcSlice->getInheritDblParamFromAPS()) 2442 2043 { … … 2448 2049 } 2449 2050 } 2450 #if DBL_CONTROL2451 2051 } 2452 #endif2453 2052 if ( rpcSlice->getSliceType() == B_SLICE ) 2454 2053 { … … 2490 2089 } 2491 2090 2492 #if ( HHI_MPI || H HI_INTER_VIEW_MOTION_PRED)2493 #if ( HHI_MPI && H HI_INTER_VIEW_MOTION_PRED)2091 #if ( HHI_MPI || H3D_IVMP ) 2092 #if ( HHI_MPI && H3D_IVMP ) 2494 2093 const int iExtraMergeCandidates = ( sps->getUseMVI() || sps->getMultiviewMvPredMode() ) ? 1 : 0; 2495 2094 #elif HHI_MPI 2496 2095 const int iExtraMergeCandidates = sps->getUseMVI() ? 1 : 0; 2096 #elif MTK_DEPTH_MERGE_TEXTURE_CANDIDATE_C0137 2097 const int iExtraMergeCandidates = ( (isDepth || sps->getMultiviewMvPredMode()) ) ? 1 : 0; 2497 2098 #else 2498 2099 const int iExtraMergeCandidates = sps->getMultiviewMvPredMode() ? 1 : 0; … … 2518 2119 2519 2120 Int uiNumCUsInFrame = uiNumLCUsInWidth* uiNumLCUsInHeight; 2520 #if LCU_SYNTAX_ALF2521 2121 if(sps->getUseALFCoefInSlice()) 2522 2122 { … … 2531 2131 if(!sps->getUseALFCoefInSlice()) 2532 2132 { 2533 #endif2534 2133 xParseAlfCuControlParam(alfCUCtrl, uiNumCUsInFrame); 2535 #if LCU_SYNTAX_ALF 2536 } 2537 #endif 2134 } 2538 2135 2539 2136 } … … 2544 2141 if (!bEntropySlice) 2545 2142 { 2546 #if !REMOVE_TILE_DEPENDENCE2547 if (sps->getTileBoundaryIndependenceIdr())2548 {2549 #endif2550 2143 xReadCode(1, uiCode); // read flag indicating if tile markers transmitted 2551 2144 rpcSlice->setTileMarkerFlag( uiCode ); 2552 #if !REMOVE_TILE_DEPENDENCE 2553 } 2554 #endif 2555 } 2556 2557 #if TILES_WPP_ENTRY_POINT_SIGNALLING 2145 } 2146 2558 2147 Int tilesOrEntropyCodingSyncIdc = rpcSlice->getSPS()->getTilesOrEntropyCodingSyncIdc(); 2559 2148 UInt *entryPointOffset = NULL; … … 2616 2205 delete [] entryPointOffset; 2617 2206 } 2618 #else2619 #if WPP_SIMPLIFICATION2620 if (pps->getNumSubstreams() > 1)2621 #else2622 if (pps->getEntropyCodingSynchro())2623 #endif2624 {2625 UInt uiNumSubstreams = pps->getNumSubstreams();2626 rpcSlice->allocSubstreamSizes(uiNumSubstreams);2627 UInt *puiSubstreamSizes = rpcSlice->getSubstreamSizes();2628 2629 for (UInt ui = 0; ui+1 < uiNumSubstreams; ui++)2630 {2631 xReadCode(2, uiCode);2632 2633 switch ( uiCode )2634 {2635 case 0:2636 xReadCode(8, uiCode);2637 break;2638 case 1:2639 xReadCode(16, uiCode);2640 break;2641 case 2:2642 xReadCode(24, uiCode);2643 break;2644 case 3:2645 xReadCode(32, uiCode);2646 break;2647 default:2648 printf("Error in parseSliceHeader\n");2649 exit(-1);2650 break;2651 }2652 puiSubstreamSizes[ui] = uiCode;2653 }2654 }2655 #endif2656 2207 2657 2208 if (!bEntropySlice) 2658 2209 { 2659 2210 // Reading location information 2660 #if !REMOVE_TILE_DEPENDENCE2661 if (sps->getTileBoundaryIndependenceIdr())2662 {2663 #endif2664 #if !TILES_WPP_ENTRY_POINT_SIGNALLING2665 xReadCode(1, uiCode); // read flag indicating if location information signaled in slice header2666 Bool bTileLocationInformationInSliceHeaderFlag = (uiCode)? true : false;2667 2668 if (bTileLocationInformationInSliceHeaderFlag)2669 {2670 // location count2671 xReadCode(5, uiCode); // number of tiles for which location information signaled2672 rpcSlice->setTileLocationCount ( uiCode + 1 );2673 2674 xReadCode(5, uiCode); // number of bits used by diff2675 Int iBitsUsedByDiff = uiCode + 1;2676 2677 // read out tile start location2678 Int iLastSize = 0;2679 for (UInt uiIdx=0; uiIdx<rpcSlice->getTileLocationCount(); uiIdx++)2680 {2681 Int iAbsDiff, iCurSize, iCurDiff;2682 if (uiIdx==0)2683 {2684 xReadCode(iBitsUsedByDiff-1, uiCode); iAbsDiff = uiCode;2685 rpcSlice->setTileLocation( uiIdx, iAbsDiff );2686 iCurDiff = iAbsDiff;2687 iLastSize = iAbsDiff;2688 }2689 else2690 {2691 xReadCode(1, uiCode); // read sign2692 Int iSign = (uiCode) ? -1 : +1;2693 2694 xReadCode(iBitsUsedByDiff-1, uiCode); iAbsDiff = uiCode;2695 iCurDiff = (iSign) * iAbsDiff;2696 iCurSize = iLastSize + iCurDiff;2697 iLastSize = iCurSize;2698 rpcSlice->setTileLocation( uiIdx, rpcSlice->getTileLocation( uiIdx-1 ) + iCurSize ); // calculate byte location2699 }2700 }2701 }2702 #endif2703 2211 2704 2212 // read out trailing bits 2705 2213 m_pcBitstream->readOutTrailingBits(); 2706 #if !REMOVE_TILE_DEPENDENCE2707 }2708 #endif2709 2214 } 2710 2215 return; … … 2767 2272 #endif 2768 2273 2769 #if H HI_INTER_VIEW_MOTION_PRED2274 #if H3D_IVMP 2770 2275 Void TDecCavlc::parseMVPIdx( Int& riMVPIdx, Int iAMVPCands ) 2771 2276 #else … … 2801 2306 Void TDecCavlc::parseIPCMInfo( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) 2802 2307 { 2803 #if BURST_IPCM2804 2308 assert(0); 2805 #else2806 UInt uiSymbol;2807 2808 xReadFlag( uiSymbol );2809 2810 if ( uiSymbol )2811 {2812 Bool bIpcmFlag = true;2813 2814 xReadPCMAlignZero();2815 2816 pcCU->setPartSizeSubParts ( SIZE_2Nx2N, uiAbsPartIdx, uiDepth );2817 pcCU->setSizeSubParts ( g_uiMaxCUWidth>>uiDepth, g_uiMaxCUHeight>>uiDepth, uiAbsPartIdx, uiDepth );2818 pcCU->setIPCMFlagSubParts ( bIpcmFlag, uiAbsPartIdx, uiDepth );2819 2820 UInt uiMinCoeffSize = pcCU->getPic()->getMinCUWidth()*pcCU->getPic()->getMinCUHeight();2821 UInt uiLumaOffset = uiMinCoeffSize*uiAbsPartIdx;2822 UInt uiChromaOffset = uiLumaOffset>>2;2823 2824 Pel* piPCMSample;2825 UInt uiWidth;2826 UInt uiHeight;2827 UInt uiSampleBits;2828 UInt uiX, uiY;2829 2830 piPCMSample = pcCU->getPCMSampleY() + uiLumaOffset;2831 uiWidth = pcCU->getWidth(uiAbsPartIdx);2832 uiHeight = pcCU->getHeight(uiAbsPartIdx);2833 uiSampleBits = pcCU->getSlice()->getSPS()->getPCMBitDepthLuma();2834 2835 for(uiY = 0; uiY < uiHeight; uiY++)2836 {2837 for(uiX = 0; uiX < uiWidth; uiX++)2838 {2839 UInt uiSample;2840 xReadCode(uiSampleBits, uiSample);2841 2842 piPCMSample[uiX] = uiSample;2843 }2844 piPCMSample += uiWidth;2845 }2846 2847 piPCMSample = pcCU->getPCMSampleCb() + uiChromaOffset;2848 uiWidth = pcCU->getWidth(uiAbsPartIdx)/2;2849 uiHeight = pcCU->getHeight(uiAbsPartIdx)/2;2850 uiSampleBits = pcCU->getSlice()->getSPS()->getPCMBitDepthChroma();2851 2852 for(uiY = 0; uiY < uiHeight; uiY++)2853 {2854 for(uiX = 0; uiX < uiWidth; uiX++)2855 {2856 UInt uiSample;2857 xReadCode(uiSampleBits, uiSample);2858 piPCMSample[uiX] = uiSample;2859 }2860 piPCMSample += uiWidth;2861 }2862 2863 piPCMSample = pcCU->getPCMSampleCr() + uiChromaOffset;2864 uiWidth = pcCU->getWidth(uiAbsPartIdx)/2;2865 uiHeight = pcCU->getHeight(uiAbsPartIdx)/2;2866 uiSampleBits = pcCU->getSlice()->getSPS()->getPCMBitDepthChroma();2867 2868 for(uiY = 0; uiY < uiHeight; uiY++)2869 {2870 for(uiX = 0; uiX < uiWidth; uiX++)2871 {2872 UInt uiSample;2873 xReadCode(uiSampleBits, uiSample);2874 piPCMSample[uiX] = uiSample;2875 }2876 piPCMSample += uiWidth;2877 }2878 }2879 #endif2880 2309 } 2881 2310 … … 2907 2336 Void TDecCavlc::parseDeltaQP( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) 2908 2337 { 2909 #if H0736_AVC_STYLE_QP_RANGE2910 2338 Int qp; 2911 #else2912 UInt uiQp;2913 #endif2914 2339 Int iDQp; 2915 2340 2916 2341 xReadSvlc( iDQp ); 2917 2342 2918 #if H0736_AVC_STYLE_QP_RANGE2919 2343 Int qpBdOffsetY = pcCU->getSlice()->getSPS()->getQpBDOffsetY(); 2920 2344 qp = (((Int) pcCU->getRefQP( uiAbsPartIdx ) + iDQp + 52 + 2*qpBdOffsetY )%(52+ qpBdOffsetY)) - qpBdOffsetY; 2921 #else2922 uiQp = pcCU->getRefQP( uiAbsPartIdx ) + iDQp;2923 #endif2924 2345 2925 2346 UInt uiAbsQpCUPartIdx = (uiAbsPartIdx>>(8-(pcCU->getSlice()->getPPS()->getMaxCuDQPDepth()<<1)))<<(8-(pcCU->getSlice()->getPPS()->getMaxCuDQPDepth()<<1)) ; 2926 2347 UInt uiQpCUDepth = min(uiDepth,pcCU->getSlice()->getPPS()->getMaxCuDQPDepth()) ; 2927 2348 2928 #if H0736_AVC_STYLE_QP_RANGE2929 2349 pcCU->setQPSubParts( qp, uiAbsQpCUPartIdx, uiQpCUDepth ); 2930 #else2931 pcCU->setQPSubParts( uiQp, uiAbsQpCUPartIdx, uiQpCUDepth );2932 #endif2933 2350 } 2934 2351 … … 2964 2381 } 2965 2382 2966 #if H HI_INTER_VIEW_RESIDUAL_PRED2383 #if H3D_IVRP 2967 2384 Void 2968 2385 TDecCavlc::parseResPredFlag( TComDataCU* pcCU, Bool& rbResPredFlag, UInt uiAbsPartIdx, UInt uiDepth ) … … 3394 2811 READ_UVLC( code, "scaling_list_pred_matrix_id_delta"); 3395 2812 scalingList->setRefMatrixId (sizeId,listId,(UInt)((Int)(listId)-(code+1))); 3396 #if SCALING_LIST3397 2813 if( sizeId > SCALING_LIST_8x8 ) 3398 2814 { 3399 2815 scalingList->setScalingListDC(sizeId,listId,scalingList->getScalingListDC(sizeId, scalingList->getRefMatrixId (sizeId,listId))); 3400 2816 } 3401 #endif3402 2817 scalingList->processRefMatrix( sizeId, listId, scalingList->getRefMatrixId (sizeId,listId)); 3403 2818 … … 3420 2835 Void TDecCavlc::xDecodeScalingList(TComScalingList *scalingList, UInt sizeId, UInt listId) 3421 2836 { 3422 #if SCALING_LIST3423 2837 Int i,coefNum = min(MAX_MATRIX_COEF_NUM,(Int)g_scalingListSize[sizeId]); 3424 2838 Int data; … … 3460 2874 } 3461 2875 } 3462 #else3463 Int i,coefNum = g_scalingListSize[sizeId];3464 Int data;3465 Int nextCoef = SCALING_LIST_START_VALUE;3466 UInt* scan = g_auiFrameScanXY [ sizeId + 1 ];3467 Int *dst = scalingList->getScalingListAddress(sizeId, listId);3468 3469 for(i = 0; i < coefNum; i++)3470 {3471 READ_SVLC( data, "scaling_list_delta_coef");3472 nextCoef = (nextCoef + data + 256 ) % 256;3473 dst[scan[i]] = nextCoef;3474 }3475 #endif3476 2876 } 3477 2877
Note: See TracChangeset for help on using the changeset viewer.