Changeset 588 in SHVCSoftware for trunk/source/Lib/TLibEncoder/TEncGOP.cpp
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:mergeinfo changed
/branches/SHM-5.0-dev (added) merged: 548-585,587
- Property svn:mergeinfo changed
-
trunk/source
- Property svn:mergeinfo changed
/branches/SHM-5.0-dev/source (added) merged: 549-585 /trunk/source removed
- Property svn:mergeinfo changed
-
trunk/source/Lib/TLibEncoder/TEncGOP.cpp
r547 r588 167 167 } 168 168 169 #if M0043_LAYERS_PRESENT_SEI170 SEILayers Present* TEncGOP::xCreateSEILayersPresent ()169 #if LAYERS_NOT_PRESENT_SEI 170 SEILayersNotPresent* TEncGOP::xCreateSEILayersNotPresent () 171 171 { 172 172 UInt i = 0; 173 SEILayers Present *seiLayersPresent = new SEILayersPresent();174 seiLayers Present->m_activeVpsId = m_pcCfg->getVPS()->getVPSId();175 seiLayers Present->m_vpsMaxLayers = m_pcCfg->getVPS()->getMaxLayers();176 for ( ; i < seiLayers Present->m_vpsMaxLayers; i++)177 { 178 seiLayers Present->m_layerPresentFlag[i] = true;173 SEILayersNotPresent *seiLayersNotPresent = new SEILayersNotPresent(); 174 seiLayersNotPresent->m_activeVpsId = m_pcCfg->getVPS()->getVPSId(); 175 seiLayersNotPresent->m_vpsMaxLayers = m_pcCfg->getVPS()->getMaxLayers(); 176 for ( ; i < seiLayersNotPresent->m_vpsMaxLayers; i++) 177 { 178 seiLayersNotPresent->m_layerNotPresentFlag[i] = true; 179 179 } 180 180 for ( ; i < MAX_LAYERS; i++) 181 181 { 182 seiLayers Present->m_layerPresentFlag[i] = false;183 } 184 return seiLayers Present;182 seiLayersNotPresent->m_layerNotPresentFlag[i] = false; 183 } 184 return seiLayersNotPresent; 185 185 } 186 186 #endif … … 363 363 } 364 364 365 #if M0043_LAYERS_PRESENT_SEI366 if(m_pcCfg->getLayers PresentSEIEnabled())367 { 368 SEILayers Present *sei = xCreateSEILayersPresent ();365 #if LAYERS_NOT_PRESENT_SEI 366 if(m_pcCfg->getLayersNotPresentSEIEnabled()) 367 { 368 SEILayersNotPresent *sei = xCreateSEILayersNotPresent (); 369 369 m_pcEntropyCoder->setBitstream(&nalu.m_Bitstream); 370 370 m_seiWriter.writeSEImessage(nalu.m_Bitstream, *sei, sps); … … 690 690 pcSlice->setActiveNumILRRefIdx(0); 691 691 pcSlice->setInterLayerPredEnabledFlag(false); 692 #if M0457_COL_PICTURE_SIGNALING693 692 pcSlice->setMFMEnabledFlag(false); 694 #if !REMOVE_COL_PICTURE_SIGNALING695 pcSlice->setAltColIndicationFlag(false);696 #endif697 #endif698 }699 #endif700 701 #if M0457_IL_SAMPLE_PRED_ONLY_FLAG702 pcSlice->setNumSamplePredRefLayers( m_pcEncTop->getNumSamplePredRefLayers() );703 pcSlice->setInterLayerSamplePredOnlyFlag( 0 );704 if( pcSlice->getNumSamplePredRefLayers() > 0 && pcSlice->getActiveNumILRRefIdx() > 0 )705 {706 if( m_pcEncTop->getIlSampleOnlyPred() > 0 )707 {708 pcSlice->setInterLayerSamplePredOnlyFlag( true );709 }710 693 } 711 694 #endif … … 1159 1142 if( m_layerId > 0 && pcSlice->getActiveNumILRRefIdx() ) 1160 1143 { 1161 #if RESTR_CHK1162 1144 #if POC_RESET_FLAG 1163 1145 if ( pocCurr > 0 && pcSlice->isRADL() && pcPic->getSlice(0)->getBaseColPic(pcPic->getSlice(0)->getInterLayerPredLayerIdc(0))->getSlice(0)->isRASL()) … … 1166 1148 #endif 1167 1149 { 1168 #if JCTVC_M0458_INTERLAYER_RPS_SIG1169 1150 pcSlice->setActiveNumILRRefIdx(0); 1170 1151 pcSlice->setInterLayerPredEnabledFlag(0); 1171 #else 1172 pcSlice->setNumILRRefIdx(0); 1173 #endif 1174 } 1175 #endif 1176 #if JCTVC_M0458_INTERLAYER_RPS_SIG 1152 } 1177 1153 if( pcSlice->getNalUnitType() >= NAL_UNIT_CODED_SLICE_BLA_W_LP && pcSlice->getNalUnitType() <= NAL_UNIT_CODED_SLICE_CRA ) 1178 1154 { … … 1185 1161 pcSlice->setNumRefIdx(REF_PIC_LIST_1, pcSlice->getNumRefIdx(REF_PIC_LIST_1)+pcSlice->getActiveNumILRRefIdx()); 1186 1162 } 1187 #else1188 if( pcSlice->getNalUnitType() >= NAL_UNIT_CODED_SLICE_BLA_W_LP && pcSlice->getNalUnitType() <= NAL_UNIT_CODED_SLICE_CRA )1189 {1190 pcSlice->setNumRefIdx(REF_PIC_LIST_0, pcSlice->getNumILRRefIdx());1191 pcSlice->setNumRefIdx(REF_PIC_LIST_1, pcSlice->getNumILRRefIdx());1192 }1193 else1194 {1195 pcSlice->setNumRefIdx(REF_PIC_LIST_0, pcSlice->getNumRefIdx(REF_PIC_LIST_0)+pcSlice->getNumILRRefIdx());1196 pcSlice->setNumRefIdx(REF_PIC_LIST_1, pcSlice->getNumRefIdx(REF_PIC_LIST_1)+pcSlice->getNumILRRefIdx());1197 }1198 #endif1199 1163 } 1200 1164 #endif //SVC_EXTENSION … … 1205 1169 1206 1170 #if SVC_EXTENSION 1207 #if M0457_COL_PICTURE_SIGNALING && !REMOVE_COL_PICTURE_SIGNALING1208 if ( pcSlice->getSliceType() == B_SLICE && !(pcSlice->getActiveNumILRRefIdx() > 0 && m_pcEncTop->getNumMotionPredRefLayers() > 0) )1209 #else1210 1171 if( pcSlice->getSliceType() == B_SLICE ) 1211 #endif1212 1172 { 1213 1173 pcSlice->setColFromL0Flag(1-uiColDir); … … 1224 1184 pcSlice->setILRPic( m_pcEncTop->getIlpList() ); 1225 1185 #if REF_IDX_MFM 1226 #if M0457_COL_PICTURE_SIGNALING1227 1186 if( pcSlice->getMFMEnabledFlag() ) 1228 #else1229 if( pcSlice->getSPS()->getMFMEnabledFlag() )1230 #endif1231 1187 { 1232 1188 pcSlice->setRefPOCListILP(m_pcEncTop->getIlpList(), pcSlice->getBaseColPic()); 1233 #if M0457_COL_PICTURE_SIGNALING && !REMOVE_COL_PICTURE_SIGNALING1234 pcSlice->setMotionPredIlp(getMotionPredIlp(pcSlice));1235 #endif1236 1189 } 1237 1190 #else … … 1243 1196 1244 1197 #if REF_IDX_MFM 1245 #if M0457_COL_PICTURE_SIGNALING1246 #if REMOVE_COL_PICTURE_SIGNALING1247 1198 if( pcSlice->getMFMEnabledFlag() ) 1248 #else1249 if( pcSlice->getMFMEnabledFlag() && !(pcSlice->getActiveNumILRRefIdx() > 0 && m_pcEncTop->getNumMotionPredRefLayers() > 0) )1250 #endif1251 #else1252 if( pcSlice->getSPS()->getMFMEnabledFlag() )1253 #endif1254 1199 { 1255 1200 Bool found = false; … … 1308 1253 } 1309 1254 1310 #if M0457_IL_SAMPLE_PRED_ONLY_FLAG1311 if (pcSlice->getSliceType() == B_SLICE && m_pcEncTop->getIlSampleOnlyPred() == 0)1312 #else1313 1255 if (pcSlice->getSliceType() == B_SLICE) 1314 #endif1315 1256 { 1316 1257 #if !SVC_EXTENSION … … 1617 1558 #if O0194_WEIGHTED_PREDICTION_CGS 1618 1559 // Calculate for the base layer to be used in EL as Inter layer reference 1619 m_pcSliceEncoder->estimateILWpParam( pcSlice ); 1560 if( m_pcEncTop->getInterLayerWeightedPredFlag() ) 1561 { 1562 m_pcSliceEncoder->estimateILWpParam( pcSlice ); 1563 } 1620 1564 #endif 1621 1565 #if AVC_SYNTAX … … 1756 1700 // The following code also calculates the VPS VUI offset 1757 1701 #endif 1702 #if !P0125_REVERT_VPS_EXTN_OFFSET_TO_RESERVED 1758 1703 #if VPS_EXTN_OFFSET_CALC 1759 1704 OutputNALUnit tempNalu(NAL_UNIT_VPS, 0, 0 ); // The value of nuh_layer_id of VPS NAL unit shall be equal to 0. 1760 1705 m_pcEntropyCoder->setBitstream(&tempNalu.m_Bitstream); 1761 1706 m_pcEntropyCoder->encodeVPS(m_pcEncTop->getVPS()); // Use to calculate the VPS extension offset 1707 #endif 1762 1708 #endif 1763 1709 m_pcEntropyCoder->setBitstream(&nalu.m_Bitstream); … … 2068 2014 startCUAddrSliceSegmentIdx++; 2069 2015 } 2070 #if SVC_EXTENSION && M0457_COL_PICTURE_SIGNALING2016 #if SVC_EXTENSION 2071 2017 pcSlice->setNumMotionPredRefLayers(m_pcEncTop->getNumMotionPredRefLayers()); 2072 2018 #endif … … 3111 3057 3112 3058 #if SVC_EXTENSION 3113 #if ADAPTIVE_QP_SELECTION 3114 printf("POC %4d LId: %1d TId: %1d ( %c-SLICE , nQP %d QP %d ) %10d bits",3059 #if ADAPTIVE_QP_SELECTION 3060 printf("POC %4d LId: %1d TId: %1d ( %c-SLICE %s, nQP %d QP %d ) %10d bits", 3115 3061 pcSlice->getPOC(), 3116 3062 pcSlice->getLayerId(), 3117 3063 pcSlice->getTLayer(), 3118 3064 c, 3065 NaluToStr( pcSlice->getNalUnitType() ).data(), 3119 3066 pcSlice->getSliceQpBase(), 3120 3067 pcSlice->getSliceQp(), 3121 3068 uibits ); 3122 3069 #else 3123 printf("POC %4d LId: %1d TId: %1d ( %c-SLICE , QP %d ) %10d bits",3070 printf("POC %4d LId: %1d TId: %1d ( %c-SLICE %s, QP %d ) %10d bits", 3124 3071 pcSlice->getPOC()-pcSlice->getLastIDR(), 3125 3072 pcSlice->getLayerId(), 3126 3073 pcSlice->getTLayer(), 3127 3074 c, 3075 NaluToStr( pcSlice->getNalUnitType() ).data(). 3128 3076 pcSlice->getSliceQp(), 3129 3077 uibits ); … … 3750 3698 free(rowSAD); 3751 3699 } 3752 3753 #if M0457_COL_PICTURE_SIGNALING && !REMOVE_COL_PICTURE_SIGNALING3754 TComPic* TEncGOP::getMotionPredIlp(TComSlice* pcSlice)3755 {3756 TComPic* ilpPic = NULL;3757 Int activeMotionPredReflayerIdx = 0;3758 3759 for( Int i = 0; i < pcSlice->getActiveNumILRRefIdx(); i++ )3760 {3761 UInt refLayerIdc = pcSlice->getInterLayerPredLayerIdc(i);3762 if( m_pcEncTop->getMotionPredEnabledFlag( pcSlice->getVPS()->getRefLayerId( m_layerId, refLayerIdc ) ) )3763 {3764 if (activeMotionPredReflayerIdx == pcSlice->getColRefLayerIdx())3765 {3766 ilpPic = m_pcEncTop->getIlpList()[refLayerIdc];3767 break;3768 }3769 else3770 {3771 activeMotionPredReflayerIdx++;3772 }3773 }3774 }3775 3776 assert(ilpPic != NULL);3777 3778 return ilpPic;3779 }3780 #endif3781 3782 3700 //! \}
Note: See TracChangeset for help on using the changeset viewer.