Changeset 216 in SHVCSoftware
- Timestamp:
- 20 May 2013, 20:12:37 (12 years ago)
- Location:
- branches/SHM-2.1-dev/source/Lib
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/SHM-2.1-dev/source/Lib/TLibCommon/TComSlice.cpp
r196 r216 520 520 //inter-layer reference picture 521 521 #if REF_IDX_MFM 522 523 #if ILR_RESTR 524 Int maxSubLayerForILPPlus1 = (getLayerId() > 0)? getVPS()->getMaxSublayerForIlpPlus1(ilpPic[0]->getSlice(0)->getLayerId()) : 0; 525 #if ZERO_NUM_DIRECT_LAYERS 526 if( getLayerId() > 0 && m_activeNumILRRefIdx > 0 && ( ( (Int)(ilpPic[0]->getSlice(0)->getTLayer())<= maxSubLayerForILPPlus1-1) || (maxSubLayerForILPPlus1==0 && ilpPic[0]->getSlice(0)->getRapPicFlag()) ) ) 527 #else 528 if( getLayerId() && ( ( (Int)(ilpPic[0]->getSlice(0)->getTLayer())<=maxSubLayerForILPPlus1-1) || (maxSubLayerForILPPlus1==0 && ilpPic[0]->getSlice(0)->getRapPicFlag()) ) ) 529 #endif 530 531 #else 522 532 #if ZERO_NUM_DIRECT_LAYERS 523 533 if( m_layerId > 0 && m_activeNumILRRefIdx > 0 ) 524 534 #else 525 535 if (getLayerId()) 536 #endif 526 537 #endif 527 538 { … … 542 553 TComPic* rpsCurrList1[MAX_NUM_REF+1]; 543 554 #if REF_IDX_FRAMEWORK 555 #if ILR_RESTR 556 Int numInterLayerRPSPics = 0; 557 if (getLayerId()>0) 558 { 559 for (i=0; i < getVPS()->getNumDirectRefLayers(getLayerId()); i++) 560 { 561 maxSubLayerForILPPlus1 = getVPS()->getMaxSublayerForIlpPlus1(ilpPic[i]->getSlice(0)->getLayerId()); 562 if( ((Int)(ilpPic[i]->getSlice(0)->getTLayer())<= maxSubLayerForILPPlus1-1) || (maxSubLayerForILPPlus1==0 && ilpPic[i]->getSlice(0)->getRapPicFlag() ) ) 563 { 564 numInterLayerRPSPics++; 565 } 566 } 567 #if JCTVC_M0458_INTERLAYER_RPS_SIG 568 if (numInterLayerRPSPics < m_activeNumILRRefIdx) 569 { 570 m_activeNumILRRefIdx = numInterLayerRPSPics; 571 } 572 #else 573 if (numInterLayerRPSPics < m_numILRRefIdx) 574 { 575 m_numILRRefIdx = numInterLayerRPSPics; 576 } 577 #endif 578 } 579 #endif 544 580 #if JCTVC_M0458_INTERLAYER_RPS_SIG 545 581 Int numPocTotalCurr = NumPocStCurr0 + NumPocStCurr1 + NumPocLtCurr + m_activeNumILRRefIdx; … … 604 640 #endif 605 641 { 642 #if ILR_RESTR 643 maxSubLayerForILPPlus1 = getVPS()->getMaxSublayerForIlpPlus1(ilpPic[i]->getSlice(0)->getLayerId()); 644 if( ((Int)(ilpPic[i]->getSlice(0)->getTLayer())<=maxSubLayerForILPPlus1-1) || (maxSubLayerForILPPlus1==0 && ilpPic[i]->getSlice(0)->getRapPicFlag()) ) 645 #endif 606 646 rpsCurrList0[cIdx] = ilpPic[i]; 607 647 } … … 632 672 #endif 633 673 { 674 #if ILR_RESTR 675 maxSubLayerForILPPlus1 = getVPS()->getMaxSublayerForIlpPlus1(ilpPic[i]->getSlice(0)->getLayerId()); 676 if( ((Int)(ilpPic[i]->getSlice(0)->getTLayer())<=maxSubLayerForILPPlus1-1) || (maxSubLayerForILPPlus1==0 && ilpPic[i]->getSlice(0)->getRapPicFlag()) ) 677 #endif 634 678 rpsCurrList1[cIdx] = ilpPic[i]; 635 679 } … … 1603 1647 #if JCTVC_M0458_INTERLAYER_RPS_SIG 1604 1648 m_maxOneActiveRefLayerFlag = true; 1649 #endif 1650 #if JCTVC_M0203_INTERLAYER_PRED_IDC 1651 for( Int i = 0; i < MAX_VPS_LAYER_ID_PLUS1 - 1; i++) 1652 { 1653 m_maxSublayerForIlpPlus1[i] = m_uiMaxTLayers + 1; 1654 } 1605 1655 #endif 1606 1656 } -
branches/SHM-2.1-dev/source/Lib/TLibCommon/TComSlice.h
r195 r216 560 560 Bool m_maxOneActiveRefLayerFlag; 561 561 #endif 562 #if JCTVC_M0203_INTERLAYER_PRED_IDC 563 UInt m_maxSublayerForIlpPlus1[MAX_VPS_LAYER_ID_PLUS1 - 1]; 564 #endif 562 565 public: 563 566 TComVPS(); … … 712 715 Void setMaxOneActiveRefLayerFlag(Bool x) { m_maxOneActiveRefLayerFlag = x; } 713 716 #endif 717 #if JCTVC_M0203_INTERLAYER_PRED_IDC 718 Bool getMaxSublayerForIlpPlus1(Int layerId) { return m_maxSublayerForIlpPlus1[layerId]; } 719 Void setMaxSublayerForIlpPlus1(Int layerId, UInt maxSublayer) { m_maxSublayerForIlpPlus1[layerId] = maxSublayer; } 720 #endif 714 721 }; 715 722 -
branches/SHM-2.1-dev/source/Lib/TLibCommon/TypeDef.h
r212 r216 95 95 #define ZERO_NUM_DIRECT_LAYERS 1 ///< support of zero direct reference layers 96 96 #endif 97 #define JCTVC_M0203_INTERLAYER_PRED_IDC 1 ///< implementation of JCTVC-M0203 Inter-layer Prediction Indication 98 #if JCTVC_M0203_INTERLAYER_PRED_IDC 99 #define ILR_RESTR 1 ///< JCTVC-M0209 Inter-layer RPS and RPL 100 #endif 101 97 102 #else 98 103 #define INTRA_BL 1 ///< inter-layer texture prediction -
branches/SHM-2.1-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp
r191 r216 2 2 * License, included below. This software may be subject to other third party 3 3 * and contributor rights, including patent rights, and no such rights are 4 * granted under this license. 4 * granted under this license. 5 5 * 6 6 * Copyright (c) 2010-2013, ITU/ISO/IEC … … 93 93 } 94 94 95 if (interRPSPred) 95 if (interRPSPred) 96 96 { 97 97 UInt bit; … … 114 114 for(Int j=0 ; j <= rpsRef->getNumberOfPictures(); j++) 115 115 { 116 READ_CODE(1, bit, "used_by_curr_pic_flag" ); //first bit is "1" if Idc is 1 116 READ_CODE(1, bit, "used_by_curr_pic_flag" ); //first bit is "1" if Idc is 1 117 117 Int refIdc = bit; 118 if (refIdc == 0) 118 if (refIdc == 0) 119 119 { 120 120 READ_CODE(1, bit, "use_delta_flag" ); //second bit is "1" if Idc is 2, "0" otherwise. … … 131 131 k0++; 132 132 } 133 else 133 else 134 134 { 135 135 k1++; 136 136 } 137 137 k++; 138 } 139 rps->setRefIdc(j,refIdc); 140 } 141 rps->setNumRefIdc(rpsRef->getNumberOfPictures()+1); 138 } 139 rps->setRefIdc(j,refIdc); 140 } 141 rps->setNumRefIdc(rpsRef->getNumberOfPictures()+1); 142 142 rps->setNumberOfPictures(k); 143 143 rps->setNumberOfNegativePictures(k0); … … 176 176 177 177 /** copy SAO parameter 178 * \param dst 179 * \param src 178 * \param dst 179 * \param src 180 180 */ 181 181 inline Void copySaoOneLcuParam(SaoLcuParam* dst, SaoLcuParam* src) … … 205 205 Void TDecCavlc::parsePPS(TComPPS* pcPPS) 206 206 { 207 #if ENC_DEC_TRACE 207 #if ENC_DEC_TRACE 208 208 xTracePPSHeader (pcPPS); 209 209 #endif … … 228 228 assert(uiCode <= 14); 229 229 pcPPS->setNumRefIdxL0DefaultActive(uiCode+1); 230 230 231 231 READ_UVLC(uiCode, "num_ref_idx_l1_default_active_minus1"); 232 232 assert(uiCode <= 14); … … 236 236 READ_UVLC(uiCode, "num_ref_idx_l1_default_active_minus1"); pcPPS->setNumRefIdxL1DefaultActive(uiCode+1); 237 237 #endif 238 238 239 239 READ_SVLC(iCode, "init_qp_minus26" ); pcPPS->setPicInitQPMinus26(iCode); 240 240 READ_FLAG( uiCode, "constrained_intra_pred_flag" ); pcPPS->setConstrainedIntraPred( uiCode ? true : false ); 241 READ_FLAG( uiCode, "transform_skip_enabled_flag" ); 242 pcPPS->setUseTransformSkip ( uiCode ? true : false ); 241 READ_FLAG( uiCode, "transform_skip_enabled_flag" ); 242 pcPPS->setUseTransformSkip ( uiCode ? true : false ); 243 243 244 244 READ_FLAG( uiCode, "cu_qp_delta_enabled_flag" ); pcPPS->setUseDQP( uiCode ? true : false ); … … 278 278 READ_FLAG( uiCode, "tiles_enabled_flag" ); pcPPS->setTilesEnabledFlag ( uiCode == 1 ); 279 279 READ_FLAG( uiCode, "entropy_coding_sync_enabled_flag" ); pcPPS->setEntropyCodingSyncEnabledFlag( uiCode == 1 ); 280 280 281 281 if( pcPPS->getTilesEnabledFlag() ) 282 282 { 283 READ_UVLC ( uiCode, "num_tile_columns_minus1" ); pcPPS->setNumColumnsMinus1( uiCode ); 284 READ_UVLC ( uiCode, "num_tile_rows_minus1" ); pcPPS->setNumRowsMinus1( uiCode ); 283 READ_UVLC ( uiCode, "num_tile_columns_minus1" ); pcPPS->setNumColumnsMinus1( uiCode ); 284 READ_UVLC ( uiCode, "num_tile_rows_minus1" ); pcPPS->setNumRowsMinus1( uiCode ); 285 285 READ_FLAG ( uiCode, "uniform_spacing_flag" ); pcPPS->setUniformSpacingFlag( uiCode ); 286 286 … … 289 289 UInt* columnWidth = (UInt*)malloc(pcPPS->getNumColumnsMinus1()*sizeof(UInt)); 290 290 for(UInt i=0; i<pcPPS->getNumColumnsMinus1(); i++) 291 { 292 READ_UVLC( uiCode, "column_width_minus1" ); 291 { 292 READ_UVLC( uiCode, "column_width_minus1" ); 293 293 columnWidth[i] = uiCode+1; 294 294 } … … 303 303 } 304 304 pcPPS->setRowHeight(rowHeight); 305 free(rowHeight); 305 free(rowHeight); 306 306 } 307 307 … … 425 425 READ_UVLC( uiCode, "vui_num_ticks_poc_diff_one_minus1"); timingInfo->setNumTicksPocDiffOneMinus1 (uiCode); 426 426 } 427 #endif 427 #endif 428 428 READ_FLAG( uiCode, "hrd_parameters_present_flag"); pcVUI->setHrdParametersPresentFlag(uiCode); 429 429 if( pcVUI->getHrdParametersPresentFlag() ) … … 520 520 #if L0372 521 521 else 522 { 522 { 523 523 READ_FLAG( uiCode, "low_delay_hrd_flag" ); hrd->setLowDelayHrdFlag( i, uiCode == 1 ? true : false ); 524 524 } 525 525 if (!hrd->getLowDelayHrdFlag( i )) 526 526 { 527 READ_UVLC( uiCode, "cpb_cnt_minus1" ); hrd->setCpbCntMinus1( i, uiCode ); 527 READ_UVLC( uiCode, "cpb_cnt_minus1" ); hrd->setCpbCntMinus1( i, uiCode ); 528 528 } 529 529 #else … … 556 556 Void TDecCavlc::parseSPS(TComSPS* pcSPS) 557 557 { 558 #if ENC_DEC_TRACE 558 #if ENC_DEC_TRACE 559 559 xTraceSPSHeader (pcSPS); 560 560 #endif … … 569 569 assert( uiCode == 1 ); 570 570 } 571 571 572 572 parsePTL(pcSPS->getPTL(), 1, pcSPS->getMaxTLayers() - 1); 573 573 READ_UVLC( uiCode, "sps_seq_parameter_set_id" ); pcSPS->setSPSId( uiCode ); … … 636 636 pcSPS->setLog2DiffMaxMinCodingBlockSize(uiCode); 637 637 Int maxCUDepthDelta = uiCode; 638 pcSPS->setMaxCUWidth ( 1<<(log2MinCUSize + maxCUDepthDelta) ); 638 pcSPS->setMaxCUWidth ( 1<<(log2MinCUSize + maxCUDepthDelta) ); 639 639 pcSPS->setMaxCUHeight ( 1<<(log2MinCUSize + maxCUDepthDelta) ); 640 640 READ_UVLC( uiCode, "log2_min_transform_block_size_minus2" ); pcSPS->setQuadtreeTULog2MinSize( uiCode + 2 ); … … 647 647 648 648 Int addCuDepth = max (0, log2MinCUSize - (Int)pcSPS->getQuadtreeTULog2MinSize() ); 649 pcSPS->setMaxCUDepth( maxCUDepthDelta + addCuDepth ); 649 pcSPS->setMaxCUDepth( maxCUDepthDelta + addCuDepth ); 650 650 651 651 READ_FLAG( uiCode, "scaling_list_enabled_flag" ); pcSPS->setScalingListFlag ( uiCode ); … … 683 683 } 684 684 READ_FLAG( uiCode, "long_term_ref_pics_present_flag" ); pcSPS->setLongTermRefsPresent(uiCode); 685 if (pcSPS->getLongTermRefsPresent()) 685 if (pcSPS->getLongTermRefsPresent()) 686 686 { 687 687 READ_UVLC( uiCode, "num_long_term_ref_pic_sps" ); … … 737 737 { 738 738 UInt uiCode; 739 739 740 740 READ_CODE( 4, uiCode, "vps_video_parameter_set_id" ); pcVPS->setVPSId( uiCode ); 741 741 READ_CODE( 2, uiCode, "vps_reserved_three_2bits" ); assert(uiCode == 3); … … 854 854 #endif 855 855 } 856 856 857 857 return; 858 858 } … … 860 860 #if VPS_EXTNS 861 861 Void TDecCavlc::parseVPSExtension(TComVPS *vps) 862 { 862 { 863 863 UInt uiCode; 864 864 // ... More syntax elements to be parsed here … … 939 939 #endif 940 940 #endif 941 941 #if JCTVC_M0203_INTERLAYER_PRED_IDC 942 for(i = 0; i < vps->getMaxLayers() - 1; i++) 943 { 944 READ_CODE( 3, uiCode, "max_sublayer_for_ilp_plus1[i]" ); vps->setMaxSublayerForIlpPlus1(i, uiCode); 945 assert( uiCode <= vps->getMaxTLayers() ); 946 } 947 #endif 942 948 #if VPS_EXTN_PROFILE_INFO 943 949 // Profile-tier-level signalling … … 961 967 #endif 962 968 assert( vps->getProfileLayerSetRef(idx) < idx ); 963 // Copy profile information as indicated 969 // Copy profile information as indicated 964 970 vps->getPTLForExtn(idx)->copyProfileInfo( vps->getPTLForExtn( vps->getProfileLayerSetRef(idx) ) ); 965 } 971 } 966 972 parsePTL( vps->getPTLForExtn(idx), vps->getProfilePresentFlag(idx), vps->getMaxTLayers() - 1 ); 967 973 } … … 1048 1054 } 1049 1055 } 1050 } 1056 } 1051 1057 #endif 1052 1058 #endif 1053 1059 #if JCTVC_M0458_INTERLAYER_RPS_SIG 1054 1060 READ_FLAG(uiCode, "max_one_active_ref_layer_flag" ); 1055 vps->setMaxOneActiveRefLayerFlag(uiCode); 1056 #endif 1061 vps->setMaxOneActiveRefLayerFlag(uiCode); 1062 #endif 1057 1063 1058 1064 #if !VPS_MOVE_DIR_DEPENDENCY_FLAG … … 1094 1100 READ_FLAG( firstSliceSegmentInPic, "first_slice_segment_in_pic_flag" ); 1095 1101 if( rpcSlice->getRapPicFlag()) 1096 { 1102 { 1097 1103 READ_FLAG( uiCode, "no_output_of_prior_pics_flag" ); //ignored 1098 1104 } … … 1145 1151 rpcSlice->setSliceCurEndCUAddr(numCTUs*maxParts); 1146 1152 } 1147 1153 1148 1154 if(!rpcSlice->getDependentSliceSegmentFlag()) 1149 1155 { … … 1179 1185 else 1180 1186 { 1181 READ_CODE(sps->getBitsForPOC(), uiCode, "pic_order_cnt_lsb"); 1187 READ_CODE(sps->getBitsForPOC(), uiCode, "pic_order_cnt_lsb"); 1182 1188 Int iPOClsb = uiCode; 1183 1189 Int iPrevPOC = rpcSlice->getPrevPOC(); … … 1190 1196 iPOCmsb = iPrevPOCmsb + iMaxPOClsb; 1191 1197 } 1192 else if( (iPOClsb > iPrevPOClsb ) && ( (iPOClsb - iPrevPOClsb ) > ( iMaxPOClsb / 2 ) ) ) 1198 else if( (iPOClsb > iPrevPOClsb ) && ( (iPOClsb - iPrevPOClsb ) > ( iMaxPOClsb / 2 ) ) ) 1193 1199 { 1194 1200 iPOCmsb = iPrevPOCmsb - iMaxPOClsb; … … 1276 1282 READ_FLAG(uiCode,"delta_poc_msb_present_flag"); 1277 1283 Bool mSBPresentFlag = uiCode ? true : false; 1278 if(mSBPresentFlag) 1284 if(mSBPresentFlag) 1279 1285 { 1280 1286 READ_UVLC( uiCode, "delta_poc_msb_cycle_lt[i]" ); … … 1291 1297 else 1292 1298 { 1293 deltaPocMSBCycleLT = uiCode + prevDeltaMSB; 1299 deltaPocMSBCycleLT = uiCode + prevDeltaMSB; 1294 1300 } 1295 1301 1296 Int pocLTCurr = rpcSlice->getPOC() - deltaPocMSBCycleLT * maxPicOrderCntLSB 1302 Int pocLTCurr = rpcSlice->getPOC() - deltaPocMSBCycleLT * maxPicOrderCntLSB 1297 1303 - iPOClsb + pocLsbLt; 1298 rps->setPOC (j, pocLTCurr); 1304 rps->setPOC (j, pocLTCurr); 1299 1305 rps->setDeltaPOC(j, - rpcSlice->getPOC() + pocLTCurr); 1300 rps->setCheckLTMSBPresent(j,true); 1306 rps->setCheckLTMSBPresent(j,true); 1301 1307 } 1302 1308 else … … 1304 1310 rps->setPOC (j, pocLsbLt); 1305 1311 rps->setDeltaPOC(j, - rpcSlice->getPOC() + pocLsbLt); 1306 rps->setCheckLTMSBPresent(j,false); 1312 rps->setCheckLTMSBPresent(j,false); 1307 1313 } 1308 1314 prevDeltaMSB = deltaPocMSBCycleLT; 1309 1315 } 1310 1316 offset += rps->getNumberOfLongtermPictures(); 1311 rps->setNumberOfPictures(offset); 1312 } 1317 rps->setNumberOfPictures(offset); 1318 } 1313 1319 if ( rpcSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_BLA_W_LP 1314 1320 || rpcSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_BLA_W_RADL … … 1328 1334 { 1329 1335 READ_FLAG( uiCode, "slice_temporal_mvp_enable_flag" ); 1330 rpcSlice->setEnableTMVPFlag( uiCode == 1 ? true : false ); 1336 rpcSlice->setEnableTMVPFlag( uiCode == 1 ? true : false ); 1331 1337 } 1332 1338 else … … 1337 1343 1338 1344 #if REF_IDX_FRAMEWORK 1339 #if JCTVC_M0458_INTERLAYER_RPS_SIG 1345 #if JCTVC_M0458_INTERLAYER_RPS_SIG 1340 1346 rpcSlice->setActiveNumILRRefIdx(0); 1341 if((sps->getLayerId() > 0) && (rpcSlice->getNumILRRefIdx() > 0) ) 1342 { 1347 if((sps->getLayerId() > 0) && (rpcSlice->getNumILRRefIdx() > 0) ) 1348 { 1343 1349 READ_FLAG(uiCode,"inter_layer_pred_enabled_flag"); 1344 1350 rpcSlice->setInterLayerPredEnabledFlag(uiCode); 1345 1351 if( rpcSlice->getInterLayerPredEnabledFlag()) 1346 1352 { 1347 if(rpcSlice->getNumILRRefIdx() > 1) 1353 if(rpcSlice->getNumILRRefIdx() > 1) 1348 1354 { 1349 1355 Int numBits = 1; … … 1352 1358 numBits++; 1353 1359 } 1354 if( !rpcSlice->getVPS()->getMaxOneActiveRefLayerFlag()) 1360 if( !rpcSlice->getVPS()->getMaxOneActiveRefLayerFlag()) 1355 1361 { 1356 1362 READ_CODE( numBits, uiCode,"num_inter_layer_ref_pics_minus1" ); 1357 rpcSlice->setActiveNumILRRefIdx(uiCode + 1); 1363 rpcSlice->setActiveNumILRRefIdx(uiCode + 1); 1358 1364 } 1359 1365 else 1360 1366 { 1361 rpcSlice->setActiveNumILRRefIdx(1); 1367 rpcSlice->setActiveNumILRRefIdx(1); 1362 1368 } 1363 for(Int i = 0; i < rpcSlice->getActiveNumILRRefIdx(); i++ ) 1369 for(Int i = 0; i < rpcSlice->getActiveNumILRRefIdx(); i++ ) 1364 1370 { 1365 READ_CODE( numBits,uiCode,"inter_layer_pred_layer_idc[i]" ); 1366 rpcSlice->setInterLayerPredLayerIdc(uiCode,i); 1371 READ_CODE( numBits,uiCode,"inter_layer_pred_layer_idc[i]" ); 1372 rpcSlice->setInterLayerPredLayerIdc(uiCode,i); 1367 1373 } 1368 1374 } 1369 1375 else 1370 1376 { 1371 rpcSlice->setActiveNumILRRefIdx(1); 1372 rpcSlice->setInterLayerPredLayerIdc(0,0); 1377 rpcSlice->setActiveNumILRRefIdx(1); 1378 rpcSlice->setInterLayerPredLayerIdc(0,0); 1373 1379 } 1374 1380 } … … 1443 1449 Int length = 1; 1444 1450 numRpsCurrTempList0 --; 1445 while ( numRpsCurrTempList0 >>= 1) 1451 while ( numRpsCurrTempList0 >>= 1) 1446 1452 { 1447 1453 length ++; … … 1485 1491 Int length = 1; 1486 1492 numRpsCurrTempList1 --; 1487 while ( numRpsCurrTempList1 >>= 1) 1493 while ( numRpsCurrTempList1 >>= 1) 1488 1494 { 1489 1495 length ++; … … 1503 1509 } 1504 1510 } 1505 } 1511 } 1506 1512 else 1507 1513 { … … 1585 1591 } 1586 1592 else 1587 { 1593 { 1588 1594 rpcSlice->setDeblockingFilterOverrideFlag(0); 1589 1595 } … … 1609 1615 } 1610 1616 else 1611 { 1617 { 1612 1618 rpcSlice->setDeblockingFilterDisable ( false ); 1613 1619 rpcSlice->setDeblockingFilterBetaOffsetDiv2( 0 ); … … 1629 1635 1630 1636 } 1631 1637 1632 1638 UInt *entryPointOffset = NULL; 1633 1639 UInt numEntryPointOffsets, offsetLenMinus1; … … 1679 1685 for ( UInt curByteIdx = 0; curByteIdx<m_pcBitstream->numEmulationPreventionBytesRead(); curByteIdx++ ) 1680 1686 { 1681 if ( m_pcBitstream->getEmulationPreventionByteLocation( curByteIdx ) >= ( prevEntryPointOffset + endOfSliceHeaderLocation ) && 1687 if ( m_pcBitstream->getEmulationPreventionByteLocation( curByteIdx ) >= ( prevEntryPointOffset + endOfSliceHeaderLocation ) && 1682 1688 m_pcBitstream->getEmulationPreventionByteLocation( curByteIdx ) < ( curEntryPointOffset + endOfSliceHeaderLocation ) ) 1683 1689 { … … 1727 1733 return; 1728 1734 } 1729 1735 1730 1736 Void TDecCavlc::parsePTL( TComPTL *rpcPTL, Bool profilePresentFlag, Int maxNumSubLayersMinus1 ) 1731 1737 { … … 1746 1752 READ_FLAG( uiCode, "sub_layer_level_present_flag[i]" ); rpcPTL->setSubLayerLevelPresentFlag (i, uiCode); 1747 1753 } 1748 1754 1749 1755 if (maxNumSubLayersMinus1 > 0) 1750 1756 { … … 1756 1762 } 1757 1763 #endif 1758 1764 1759 1765 for(Int i = 0; i < maxNumSubLayersMinus1; i++) 1760 1766 { … … 1793 1799 READ_FLAG(uiCode, "general_interlaced_source_flag"); 1794 1800 ptl->setInterlacedSourceFlag(uiCode ? true : false); 1795 1801 1796 1802 READ_FLAG(uiCode, "general_non_packed_constraint_flag"); 1797 1803 ptl->setNonPackedConstraintFlag(uiCode ? true : false); 1798 1804 1799 1805 READ_FLAG(uiCode, "general_frame_only_constraint_flag"); 1800 1806 ptl->setFrameOnlyConstraintFlag(uiCode ? true : false); 1801 1807 1802 1808 READ_CODE(16, uiCode, "XXX_reserved_zero_44bits[0..15]"); 1803 1809 READ_CODE(16, uiCode, "XXX_reserved_zero_44bits[16..31]"); … … 1831 1837 } 1832 1838 } 1833 #endif 1839 #endif 1834 1840 Void TDecCavlc::parseTerminatingBit( UInt& ruiBit ) 1835 1841 { … … 1876 1882 } 1877 1883 1878 /** Parse I_PCM information. 1884 /** Parse I_PCM information. 1879 1885 * \param pcCU pointer to CU 1880 1886 * \param uiAbsPartIdx CU index … … 1882 1888 * \returns Void 1883 1889 * 1884 * If I_PCM flag indicates that the CU is I_PCM, parse its PCM alignment bits and codes. 1890 * If I_PCM flag indicates that the CU is I_PCM, parse its PCM alignment bits and codes. 1885 1891 */ 1886 1892 Void TDecCavlc::parseIPCMInfo( TComDataCU* /*pcCU*/, UInt /*uiAbsPartIdx*/, UInt /*uiDepth*/ ) … … 1890 1896 1891 1897 Void TDecCavlc::parseIntraDirLumaAng ( TComDataCU* /*pcCU*/, UInt /*uiAbsPartIdx*/, UInt /*uiDepth*/ ) 1892 { 1898 { 1893 1899 assert(0); 1894 1900 } … … 1981 1987 UInt uiLog2WeightDenomLuma, uiLog2WeightDenomChroma; 1982 1988 UInt uiTotalSignalledWeightFlags = 0; 1983 1989 1984 1990 Int iDeltaDenom; 1985 1991 // decode delta_luma_log2_weight_denom : 1986 1992 READ_UVLC( uiLog2WeightDenomLuma, "luma_log2_weight_denom" ); // ue(v): luma_log2_weight_denom 1987 1993 assert( uiLog2WeightDenomLuma <= 7 ); 1988 if( bChroma ) 1994 if( bChroma ) 1989 1995 { 1990 1996 READ_SVLC( iDeltaDenom, "delta_chroma_log2_weight_denom" ); // se(v): delta_chroma_log2_weight_denom … … 1994 2000 } 1995 2001 1996 for ( Int iNumRef=0 ; iNumRef<iNbRef ; iNumRef++ ) 2002 for ( Int iNumRef=0 ; iNumRef<iNbRef ; iNumRef++ ) 1997 2003 { 1998 2004 RefPicList eRefPicList = ( iNumRef ? REF_PIC_LIST_1 : REF_PIC_LIST_0 ); 1999 for ( Int iRefIdx=0 ; iRefIdx<pcSlice->getNumRefIdx(eRefPicList) ; iRefIdx++ ) 2005 for ( Int iRefIdx=0 ; iRefIdx<pcSlice->getNumRefIdx(eRefPicList) ; iRefIdx++ ) 2000 2006 { 2001 2007 pcSlice->getWpScaling(eRefPicList, iRefIdx, wp); … … 2010 2016 uiTotalSignalledWeightFlags += wp[0].bPresentFlag; 2011 2017 } 2012 if ( bChroma ) 2018 if ( bChroma ) 2013 2019 { 2014 2020 UInt uiCode; 2015 for ( Int iRefIdx=0 ; iRefIdx<pcSlice->getNumRefIdx(eRefPicList) ; iRefIdx++ ) 2021 for ( Int iRefIdx=0 ; iRefIdx<pcSlice->getNumRefIdx(eRefPicList) ; iRefIdx++ ) 2016 2022 { 2017 2023 pcSlice->getWpScaling(eRefPicList, iRefIdx, wp); … … 2022 2028 } 2023 2029 } 2024 for ( Int iRefIdx=0 ; iRefIdx<pcSlice->getNumRefIdx(eRefPicList) ; iRefIdx++ ) 2030 for ( Int iRefIdx=0 ; iRefIdx<pcSlice->getNumRefIdx(eRefPicList) ; iRefIdx++ ) 2025 2031 { 2026 2032 pcSlice->getWpScaling(eRefPicList, iRefIdx, wp); 2027 if ( wp[0].bPresentFlag ) 2033 if ( wp[0].bPresentFlag ) 2028 2034 { 2029 2035 Int iDeltaWeight; … … 2036 2042 assert( wp[0].iOffset <= 127 ); 2037 2043 } 2038 else 2044 else 2039 2045 { 2040 2046 wp[0].iWeight = (1 << wp[0].uiLog2WeightDenom); 2041 2047 wp[0].iOffset = 0; 2042 2048 } 2043 if ( bChroma ) 2044 { 2045 if ( wp[1].bPresentFlag ) 2046 { 2047 for ( Int j=1 ; j<3 ; j++ ) 2049 if ( bChroma ) 2050 { 2051 if ( wp[1].bPresentFlag ) 2052 { 2053 for ( Int j=1 ; j<3 ; j++ ) 2048 2054 { 2049 2055 Int iDeltaWeight; … … 2061 2067 } 2062 2068 } 2063 else 2064 { 2065 for ( Int j=1 ; j<3 ; j++ ) 2069 else 2070 { 2071 for ( Int j=1 ; j<3 ; j++ ) 2066 2072 { 2067 2073 wp[j].iWeight = (1 << wp[j].uiLog2WeightDenom); … … 2072 2078 } 2073 2079 2074 for ( Int iRefIdx=pcSlice->getNumRefIdx(eRefPicList) ; iRefIdx<MAX_NUM_REF ; iRefIdx++ ) 2080 for ( Int iRefIdx=pcSlice->getNumRefIdx(eRefPicList) ; iRefIdx<MAX_NUM_REF ; iRefIdx++ ) 2075 2081 { 2076 2082 pcSlice->getWpScaling(eRefPicList, iRefIdx, wp); … … 2148 2154 2149 2155 Bool TDecCavlc::xMoreRbspData() 2150 { 2156 { 2151 2157 Int bitsLeft = m_pcBitstream->getNumBitsLeft(); 2152 2158 -
branches/SHM-2.1-dev/source/Lib/TLibEncoder/TEncCavlc.cpp
r191 r216 726 726 #endif 727 727 #endif 728 #if JCTVC_M0203_INTERLAYER_PRED_IDC 729 for( i = 0; i < vps->getMaxLayers() - 1; i++) 730 { 731 WRITE_CODE(vps->getMaxSublayerForIlpPlus1(i), 3, "max_sublayer_for_ilp_plus1[i]" ); 732 } 733 #endif 728 734 #if VPS_EXTN_PROFILE_INFO 729 735 // Profile-tier-level signalling
Note: See TracChangeset for help on using the changeset viewer.