Changeset 193 in 3DVCSoftware for branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibEncoder/TEncGOP.cpp
- Timestamp:
- 19 Nov 2012, 21:15:40 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibEncoder/TEncGOP.cpp
r166 r193 332 332 #endif 333 333 334 #if VSP_SLICE_HEADER && VSP_CFG 335 pcSlice->setNumVspRefPics( m_pcCfg->getGOPEntry( (getNalUnitType(uiPOCCurr) == NAL_UNIT_CODED_SLICE_IDV) ? MAX_GOP : iGOPid ).m_numVSPRefPics ); 336 pcSlice->setVspFlag( m_pcEncTop->getUseVSP() && pcSlice->getNumVspRefPics() > 0 ); 337 for( UInt i = 0; i < pcSlice->getNumVspRefPics(); i++ ) 338 { 339 pcSlice->setVspRefPos( REF_PIC_LIST_0, i, m_pcCfg->getGOPEntry( (getNalUnitType(uiPOCCurr) == NAL_UNIT_CODED_SLICE_IDV) ? MAX_GOP : iGOPid ).m_VSPRefPosL0[i] ); 340 if( pcSlice->getSliceType() == B_SLICE ) 341 { 342 pcSlice->setVspRefPos( REF_PIC_LIST_1, i, m_pcCfg->getGOPEntry( (getNalUnitType(uiPOCCurr) == NAL_UNIT_CODED_SLICE_IDV) ? MAX_GOP : iGOPid ).m_VSPRefPosL1[i] ); 343 } 344 } 345 #endif 346 334 347 #if VSP_N 348 #if VSP_CFG 349 Int NumberOfVspRefsL0 = ( ( pcPic->getViewId()==0 350 || (m_pcEncTop->getVSPDepthDisable() && m_pcEncTop->getIsDepth()) 351 #if VSP_SLICE_HEADER 352 || !pcSlice->getVspFlag() 353 #endif 354 || pcSlice->getVspRefPos( REF_PIC_LIST_0, 0 ) == 0 355 ) ? 0 : 1 ); 356 Int NumberOfVspRefsL1 = ( ( pcPic->getViewId()==0 357 || (m_pcEncTop->getVSPDepthDisable() && m_pcEncTop->getIsDepth()) 358 #if VSP_SLICE_HEADER 359 || !pcSlice->getVspFlag() 360 #endif 361 || pcSlice->getVspRefPos( REF_PIC_LIST_1, 0 ) == 0 362 ) ? 0 : 1 ); 363 pcSlice->setNumRefIdx( REF_PIC_LIST_0, min( m_pcCfg->getGOPEntry( (getNalUnitType(uiPOCCurr) == NAL_UNIT_CODED_SLICE_IDV) ? MAX_GOP : iGOPid ).m_numRefPicsActive + NumberOfVspRefsL0, (pcSlice->getRPS()->getNumberOfPictures() + pcSlice->getSPS()->getNumberOfUsableInterViewRefs() + NumberOfVspRefsL0) ) ); 364 pcSlice->setNumRefIdx( REF_PIC_LIST_1, min( m_pcCfg->getGOPEntry( (getNalUnitType(uiPOCCurr) == NAL_UNIT_CODED_SLICE_IDV) ? MAX_GOP : iGOPid ).m_numRefPicsActive + NumberOfVspRefsL1, (pcSlice->getRPS()->getNumberOfPictures() + pcSlice->getSPS()->getNumberOfUsableInterViewRefs() + NumberOfVspRefsL1) ) ); 365 #else 335 366 Int NumberOfVspRefs = ( ( pcPic->getViewId()==0 336 #if VSP_TEXT_ONLY 337 || m_pcEncTop->getIsDepth() 338 #endif 367 || (m_pcEncTop->getVSPDepthDisable() && m_pcEncTop->getIsDepth()) 339 368 #if VSP_SLICE_HEADER 340 || ! m_pcEncTop->getUseVSP()369 || !pcSlice->getVspFlag() 341 370 #endif 342 371 ) ? 0 : 1 ); 343 372 pcSlice->setNumRefIdx( REF_PIC_LIST_0, min( m_pcCfg->getGOPEntry( (getNalUnitType(uiPOCCurr) == NAL_UNIT_CODED_SLICE_IDV) ? MAX_GOP : iGOPid ).m_numRefPicsActive + NumberOfVspRefs, (pcSlice->getRPS()->getNumberOfPictures() + pcSlice->getSPS()->getNumberOfUsableInterViewRefs() + NumberOfVspRefs) ) ); 344 373 pcSlice->setNumRefIdx( REF_PIC_LIST_1, min( m_pcCfg->getGOPEntry( (getNalUnitType(uiPOCCurr) == NAL_UNIT_CODED_SLICE_IDV) ? MAX_GOP : iGOPid ).m_numRefPicsActive + NumberOfVspRefs, (pcSlice->getRPS()->getNumberOfPictures() + pcSlice->getSPS()->getNumberOfUsableInterViewRefs() + NumberOfVspRefs) ) ); 374 #endif 345 375 #else 346 376 pcSlice->setNumRefIdx( REF_PIC_LIST_0, min( m_pcCfg->getGOPEntry( (getNalUnitType(uiPOCCurr) == NAL_UNIT_CODED_SLICE_IDV) ? MAX_GOP : iGOPid ).m_numRefPicsActive, (pcSlice->getRPS()->getNumberOfPictures() + pcSlice->getSPS()->getNumberOfUsableInterViewRefs()) ) ); … … 373 403 #if VSP_N 374 404 Bool bUseVsp = (pcPic->getViewId()!=0); 375 #if VSP_TEXT_ONLY 376 if( m_pcEncTop->getIsDepth() ) bUseVsp = false; 377 #endif 405 if( m_pcEncTop->getVSPDepthDisable() && m_pcEncTop->getIsDepth() ) bUseVsp = false; 378 406 #if VSP_SLICE_HEADER 407 #if VSP_CFG 408 if( !pcSlice->getVspFlag() ) bUseVsp = false; 409 #else 379 410 if( !m_pcEncTop->getUseVSP() ) bUseVsp = false; 380 411 #endif 412 #endif 413 414 #if VSP_SLICE_HEADER 415 if( bUseVsp ) 416 #endif 417 { 418 m_pcEncTop->getVSPBuf()->getCurrSlice()->setPOC( pcPic->getPOC() ); 419 m_pcEncTop->getVSPBuf()->getCurrSlice()->setViewId( pcPic->getViewId() ); 420 } 421 381 422 pcSlice->setRefPicListMvc( rcListPic, apcInterViewRefPics, bUseVsp ? m_pcEncTop->getVSPBuf() : NULL ); 382 423 #else 383 424 pcSlice->setRefPicListMvc( rcListPic, apcInterViewRefPics ); 384 425 #endif 426 427 #if !VSP_CFG 385 428 #if VSP_SLICE_HEADER 386 pcSlice->setVspFlag( bUseVsp ); 429 pcSlice->setVspFlag( m_pcEncTop->getUseVSP() ); 430 pcSlice->setVspDepthDisableFlag( m_pcEncTop->getVSPDepthDisable() ); 431 #endif 387 432 #endif 388 433 … … 471 516 Int iVSOMode = m_pcEncTop->getVSOMode(); 472 517 m_pcRdCost->setVSOMode( iVSOMode ); 518 473 519 #if HHI_VSO_DIST_INT 474 520 m_pcRdCost->setAllowNegDist( m_pcEncTop->getAllowNegDist() ); … … 491 537 m_pcRdCost->setDepthPicYuv ( m_pcEncTop->getEncTop()->getPicYuvFromView( pcSlice->getViewId(), pcSlice->getPOC(), true, false ) ); 492 538 #endif 493 539 #if LGE_WVSO_A0119 540 Bool bUseWVSO = m_pcEncTop->getUseWVSO(); 541 m_pcRdCost->setUseWVSO( bUseWVSO ); 542 #endif 494 543 495 544 } … … 1157 1206 m_pcSbacCoder->load( &pcSbacCoders[0] ); 1158 1207 1159 #if DEBUGLOGOUT1160 char fname[128];1161 sprintf(fname, "%sV%02d_%05d%s.csv", "Log", pcSlice->getViewId(), uiPOCCurr, pcSlice->getIsDepth() ? "depth":"text");1162 getSliceEncoder()->getCUEncoder()->m_cDebug.DebugLogFileOpen( fname );1163 #endif1164 1165 1208 pcSlice->setTileOffstForMultES( uiOneBitstreamPerSliceLength ); 1166 1209 if (!bEntropySlice) 1167 1210 { 1211 #if OL_DEPTHLIMIT_A0044 //start dumping partition information 1212 m_pcSliceEncoder->setPartDumpFlag(1); 1213 #endif 1168 1214 pcSlice->setTileLocationCount ( 0 ); 1169 1215 m_pcSliceEncoder->encodeSlice(pcPic, pcBitstreamRedirect, pcSubstreamsOut); // redirect is only used for CAVLC tile position info. 1216 #if OL_DEPTHLIMIT_A0044 //stop dumping partition information 1217 m_pcSliceEncoder->setPartDumpFlag(0); 1218 #endif 1170 1219 } 1171 1220 else 1172 1221 { 1222 #if OL_DEPTHLIMIT_A0044 //start dumping partition information 1223 m_pcSliceEncoder->setPartDumpFlag(1); 1224 #endif 1173 1225 m_pcSliceEncoder->encodeSlice(pcPic, &nalu.m_Bitstream, pcSubstreamsOut); // nalu.m_Bitstream is only used for CAVLC tile position info. 1174 } 1175 1176 #if DEBUGLOGOUT 1177 getSliceEncoder()->getCUEncoder()->m_cDebug.DebugLogFileClose(); 1178 #endif 1226 #if OL_DEPTHLIMIT_A0044 //stop dumping partition information 1227 m_pcSliceEncoder->setPartDumpFlag(0); 1228 #endif 1229 } 1179 1230 1180 1231 { … … 2187 2238 printf( "V%d ", pcSlice->getRefViewId( RefPicList(iRefList), iRefIndex ) ); 2188 2239 } 2240 #if VSP_CFG 2241 else if( pcSlice->getViewId() == pcSlice->getRefViewId( RefPicList(iRefList), iRefIndex ) 2242 && pcSlice->getPOC() == pcSlice->getRefPOC( RefPicList(iRefList), iRefIndex ) ) 2243 { 2244 printf( "VS " ); 2245 } 2246 #endif 2189 2247 else 2190 2248 { … … 2203 2261 printf( "V%d ", pcSlice->getRefViewId( (RefPicList)pcSlice->getListIdFromIdxOfLC(iRefIndex), pcSlice->getRefIdxFromIdxOfLC(iRefIndex) ) ); 2204 2262 } 2263 #if VSP_CFG 2264 else if( pcSlice->getViewId() == pcSlice->getRefViewId( (RefPicList)pcSlice->getListIdFromIdxOfLC(iRefIndex), pcSlice->getRefIdxFromIdxOfLC(iRefIndex) ) 2265 && pcSlice->getPOC() == pcSlice->getRefPOC( (RefPicList)pcSlice->getListIdFromIdxOfLC(iRefIndex), pcSlice->getRefIdxFromIdxOfLC(iRefIndex) ) ) 2266 { 2267 printf( "VS " ); 2268 } 2269 #endif 2205 2270 else 2206 2271 {
Note: See TracChangeset for help on using the changeset viewer.