Changeset 193 in 3DVCSoftware for branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibDecoder
- Timestamp:
- 19 Nov 2012, 21:15:40 (12 years ago)
- Location:
- branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibDecoder
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibDecoder/TDecCAVLC.cpp
r166 r193 1757 1757 } 1758 1758 } 1759 #if VSP_N 1760 if( pcSPS->getViewId() ) 1761 { 1762 READ_FLAG( uiCode, "vsp_present_flag" ); 1763 pcSPS->setVspPresentFlag( (Bool)uiCode ); 1764 #if VSP_CFG 1765 if( pcSPS->getVspPresentFlag() ) 1766 { 1767 READ_FLAG( uiCode, "vsp_depth_present_flag" ); 1768 pcSPS->setVspDepthPresentFlag( (Bool)uiCode ); 1769 } 1770 #endif 1771 } 1772 #endif 1759 1773 READ_FLAG( uiCode, "sps_extension2_flag"); 1760 1774 if (uiCode) … … 1781 1795 UInt uiCode; 1782 1796 Int iCode; 1783 1797 #if VSP_CFG 1798 Int iNumOfVspRefsL0 = 0; 1799 Int iNumOfVspRefsL1 = 0; 1800 #endif 1784 1801 #if ENC_DEC_TRACE 1785 1802 xTraceSliceHeader(rpcSlice); … … 2006 2023 READ_UVLC ( uiCode, "aps_id" ); rpcSlice->setAPSId(uiCode); 2007 2024 } 2025 2026 #if VSP_SLICE_HEADER && VSP_CFG 2027 if( rpcSlice->getSPS()->getViewId()!=0 2028 && rpcSlice->getSliceType() != I_SLICE 2029 && rpcSlice->getSPS()->getVspPresentFlag() 2030 ) 2031 { 2032 if( !rpcSlice->getSPS()->isDepth() || rpcSlice->getSPS()->getVspDepthPresentFlag() ) 2033 { 2034 READ_UVLC( uiCode, "num_vsp_ref_pics"); 2035 rpcSlice->setVspFlag( uiCode > 0 ? true : false ); 2036 rpcSlice->setNumVspRefPics( uiCode ); 2037 //printf("SH:num_vsp_ref_pics(%d)\n",uiCode); 2038 for( UInt i = 0; i < rpcSlice->getNumVspRefPics(); i++ ) 2039 { 2040 READ_UVLC( uiCode, "vsp_ref_list0_pos"); 2041 rpcSlice->setVspRefPos( REF_PIC_LIST_0, i, uiCode ); 2042 //printf("SH:vsp_ref_list0_pos(%d)\n",uiCode); 2043 if( rpcSlice->getSliceType() == B_SLICE ) 2044 { 2045 READ_UVLC( uiCode, "vsp_ref_list1_pos"); 2046 rpcSlice->setVspRefPos( REF_PIC_LIST_1, i, uiCode ); 2047 //printf("SH:vsp_ref_list1_pos(%d)\n",uiCode); 2048 } 2049 } 2050 iNumOfVspRefsL0 = ( (rpcSlice->getSPS()->getViewId()==0 2051 || (!rpcSlice->getSPS()->getVspDepthPresentFlag() && rpcSlice->getSPS()->isDepth()) 2052 || !rpcSlice->getVspFlag() 2053 || rpcSlice->getVspRefPos(REF_PIC_LIST_0, 0) == 0 ) ? 0 : 1 ); 2054 iNumOfVspRefsL1 = ( (rpcSlice->getSPS()->getViewId()==0 2055 || (!rpcSlice->getSPS()->getVspDepthPresentFlag() && rpcSlice->getSPS()->isDepth()) 2056 || !rpcSlice->getVspFlag() 2057 || rpcSlice->getVspRefPos(REF_PIC_LIST_1, 0) == 0 ) ? 0 : 1 ); 2058 } 2059 } 2060 #endif 2061 2008 2062 if (!rpcSlice->isIntra()) 2009 2063 { … … 2011 2065 if (uiCode) 2012 2066 { 2013 READ_CODE (3, uiCode, "num_ref_idx_l0_active_minus1" ); rpcSlice->setNumRefIdx( REF_PIC_LIST_0, uiCode + 1 ); 2067 READ_CODE (3, uiCode, "num_ref_idx_l0_active_minus1" ); 2068 #if VSP_CFG 2069 rpcSlice->setNumRefIdx( REF_PIC_LIST_0, uiCode + 1 + iNumOfVspRefsL0 ); 2070 #else 2071 rpcSlice->setNumRefIdx( REF_PIC_LIST_0, uiCode + 1 ); 2072 #endif 2014 2073 if (rpcSlice->isInterB()) 2015 2074 { 2016 READ_CODE (3, uiCode, "num_ref_idx_l1_active_minus1" ); rpcSlice->setNumRefIdx( REF_PIC_LIST_1, uiCode + 1 ); 2075 READ_CODE (3, uiCode, "num_ref_idx_l1_active_minus1" ); 2076 #if VSP_CFG 2077 rpcSlice->setNumRefIdx( REF_PIC_LIST_1, uiCode + 1 + iNumOfVspRefsL1 ); 2078 #else 2079 rpcSlice->setNumRefIdx( REF_PIC_LIST_1, uiCode + 1 ); 2080 #endif 2017 2081 } 2018 2082 else … … 2183 2247 if(uiCode) 2184 2248 { 2185 READ_UVLC( uiCode, "num_ref_idx_lc_active_minus1" ); rpcSlice->setNumRefIdx( REF_PIC_LIST_C, uiCode + 1 ); 2249 READ_UVLC( uiCode, "num_ref_idx_lc_active_minus1" ); 2250 #if VSP_CFG 2251 rpcSlice->setNumRefIdx( REF_PIC_LIST_C, uiCode + 1 + iNumOfVspRefsL0 ); 2252 #else 2253 rpcSlice->setNumRefIdx( REF_PIC_LIST_C, uiCode + 1 ); 2254 #endif 2186 2255 2187 2256 #if H0412_REF_PIC_LIST_RESTRICTION … … 2348 2417 #endif 2349 2418 2419 #if !VSP_CFG 2350 2420 #if VSP_SLICE_HEADER 2351 2421 if( rpcSlice->getSPS()->getViewId()!=0 2352 #if VSP_TEXT_ONLY 2353 && !(rpcSlice->getSPS()->isDepth()) 2354 #endif 2422 && rpcSlice->getSPS()->getVspPresentFlag() 2355 2423 ) 2356 2424 { 2357 2425 READ_FLAG( uiCode, "vsp_flag" ); 2358 2426 rpcSlice->setVspFlag( uiCode ? true : false ); 2359 } 2427 if( rpcSlice->getVspFlag() ) 2428 { 2429 READ_FLAG( uiCode, "vsp_depth_disable_flag" ); 2430 rpcSlice->setVspDepthDisableFlag( uiCode ? true : false ); 2431 } 2432 } 2433 #endif 2360 2434 #endif 2361 2435 -
branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibDecoder/TDecCu.cpp
r166 r193 351 351 #if FORCE_REF_VSP==1 352 352 if( pcCU->isSkipped(uiAbsPartIdx) && pcCU->getSlice()->getViewId() != 0 ) 353 #if VSP_TEXT_ONLY 354 if( !pcCU->getSlice()->getSPS()->isDepth() ) 353 #if VSP_CFG 354 if( pcCU->getSlice()->getSPS()->getVspDepthPresentFlag() || !pcCU->getSlice()->getSPS()->isDepth() ) 355 #else 356 if( !pcCU->getSlice()->getVspDepthDisableFlag() || !pcCU->getSlice()->getSPS()->isDepth() ) 355 357 #endif 356 358 { … … 385 387 if( pcCU->getTextureModeDepth( uiAbsPartIdx ) == uiDepth ) 386 388 { 387 #if DEBUGLOGOUT388 PredMode eOrgPred = pcCU->getPredictionMode( uiAbsPartIdx );389 #endif390 389 TComDataCU *pcTextureCU = pcCU->getSlice()->getTexturePic()->getCU( pcCU->getAddr() ); 391 390 pcCU->copyTextureMotionDataFrom( pcTextureCU, uiDepth, pcCU->getZorderIdxInCU() + uiAbsPartIdx, uiAbsPartIdx ); 392 #if DEBUGLOGOUT393 if( eOrgPred == MODE_SKIP )394 pcCU->setPredModeSubParts( MODE_SKIP, uiAbsPartIdx, uiDepth );395 m_cDebug.DebugLogOut( pcCU, uiAbsPartIdx, uiDepth );396 #endif397 391 398 392 UInt uiCurrPartNumb = pcCU->getPic()->getNumPartInCU() >> (uiDepth << 1); … … 437 431 #endif 438 432 xFinishDecodeCU( pcCU, uiAbsPartIdx, uiDepth, ruiIsLast ); 439 #if DEBUGLOGOUT440 #if HHI_MPI441 if( pcCU->getTextureModeDepth( uiAbsPartIdx ) != uiDepth )442 #endif443 m_cDebug.DebugLogOut( pcCU, uiAbsPartIdx, uiDepth );444 #endif445 433 return; 446 434 } … … 472 460 473 461 xFinishDecodeCU( pcCU, uiAbsPartIdx, uiDepth, ruiIsLast ); 474 #if DEBUGLOGOUT475 m_cDebug.DebugLogOut( pcCU, uiAbsPartIdx, uiDepth );476 #endif477 462 return; 478 463 } … … 508 493 { 509 494 xFinishDecodeCU( pcCU, uiAbsPartIdx, uiDepth, ruiIsLast ); 510 #if DEBUGLOGOUT511 m_cDebug.DebugLogOut( pcCU, uiAbsPartIdx, uiDepth );512 #endif513 495 return; 514 496 } … … 610 592 setdQPFlag( bCodeDQP ); 611 593 xFinishDecodeCU( pcCU, uiAbsPartIdx, uiDepth, ruiIsLast ); 612 #if DEBUGLOGOUT613 m_cDebug.DebugLogOut( pcCU, uiAbsPartIdx, uiDepth );614 #endif615 594 } 616 595 … … 710 689 711 690 xCopyToPic( m_ppcCU[uiDepth], pcPic, uiAbsPartIdx, uiDepth ); 712 #if DEBUGIMGOUT713 xColsetToPicMerge( m_ppcCU[uiDepth], pcPic->getPicYuvRecDbg(), uiAbsPartIdx, uiDepth );714 #endif715 691 } 716 692 … … 724 700 // inter prediction 725 701 m_pcPrediction->motionCompensation( pcCU, m_ppcYuvReco[uiDepth] ); 702 726 703 #if HHI_MPI 727 704 if( pcCU->getTextureModeDepth( 0 ) != -1 ) -
branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibDecoder/TDecCu.h
r166 r193 46 46 #include "TLibCommon/TComPrediction.h" 47 47 #include "TDecEntropy.h" 48 #if DEBUGIMGOUT || DEBUGLOGOUT49 #include "TLibCommon/DebugLog.h"50 #endif51 48 52 49 //! \ingroup TLibDecoder … … 84 81 virtual ~TDecCu(); 85 82 86 #if DEBUGLOGOUT87 DebugLog m_cDebug;88 #endif89 90 83 /// initialize access channels 91 84 Void init ( TDecEntropy* pcEntropyDecoder, TComTrQuant* pcTrQuant, TComPrediction* pcPrediction ); … … 132 125 Void xFillPCMBuffer (TComDataCU* pCU, UInt absPartIdx, UInt depth); 133 126 #endif 134 #if DEBUGIMGOUT135 Void xColsetToPic ( TComDataCU* pcCU, TComPicYuv* pcPicYuv, UInt uiZorderIdx, UInt uiDepth );136 Void xColsetToPicMerge ( TComDataCU* pcCU, TComPicYuv* pcPicYuv, UInt uiZorderIdx, UInt uiDepth );137 #endif138 127 }; 139 128 -
branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibDecoder/TDecEntropy.cpp
r166 r193 310 310 #if VSP_MV_ZERO 311 311 Int iRefIdx = pcCU->getCUMvField( RefPicList( uiRefListIdx ) )->getRefIdx(uiSubPartIdx); 312 if( pcCU->getSlice()->getViewId() && iRefIdx >= 0 && (pcCU->getSlice()->getRefViewId( RefPicList( uiRefListIdx ), iRefIdx ) == NUM_VIEW_VSP) )312 if( pcCU->getSlice()->getViewId() && iRefIdx >= 0 && pcCU->isVspRef( RefPicList( uiRefListIdx ), iRefIdx ) ) 313 313 { 314 314 pcCU->getCUMvField( RefPicList( uiRefListIdx ) )->setAllMvd( TComMv(0, 0), pcCU->getPartitionSize( uiSubPartIdx ), uiSubPartIdx, uiDepth, uiPartIdx ); -
branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibDecoder/TDecGop.cpp
r100 r193 463 463 printf( "V%d ", pcSlice->getRefViewId( RefPicList(iRefList), iRefIndex ) ); 464 464 } 465 #if VSP_CFG 466 else if( pcSlice->getViewId() == pcSlice->getRefViewId( RefPicList(iRefList), iRefIndex ) 467 && pcSlice->getPOC() == pcSlice->getRefPOC( RefPicList(iRefList), iRefIndex ) ) 468 { 469 printf( "VS " ); 470 } 471 #endif 465 472 else 466 473 { … … 479 486 printf( "V%d ", pcSlice->getRefViewId( (RefPicList)pcSlice->getListIdFromIdxOfLC(iRefIndex), pcSlice->getRefIdxFromIdxOfLC(iRefIndex) ) ); 480 487 } 488 #if VSP_CFG 489 else if( pcSlice->getViewId() == pcSlice->getRefViewId( (RefPicList)pcSlice->getListIdFromIdxOfLC(iRefIndex), pcSlice->getRefIdxFromIdxOfLC(iRefIndex) ) 490 && pcSlice->getPOC() == pcSlice->getRefPOC( (RefPicList)pcSlice->getListIdFromIdxOfLC(iRefIndex), pcSlice->getRefIdxFromIdxOfLC(iRefIndex) ) ) 491 { 492 printf( "VS " ); 493 } 494 #endif 481 495 else 482 496 { -
branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibDecoder/TDecSbac.cpp
r166 r193 636 636 uiNumCand = pcCU->getSlice()->getMaxNumMergeCand(); 637 637 #if HHI_MPI 638 #if VSP_ TEXT_ONLY638 #if VSP_N 639 639 TComDataCU* pcTextCU = pcCU->getSlice()->getSPS()->getUseMVI() ? pcCU->getSlice()->getTexturePic()->getCU( pcCU->getAddr() ) : NULL; 640 640 Int aiRefIdxVsp[2] = { pcTextCU ? pcTextCU->getCUMvField( RefPicList(0) )->getRefIdx( uiAbsPartIdx ) : -1, 641 641 pcTextCU ? pcTextCU->getCUMvField( RefPicList(1) )->getRefIdx( uiAbsPartIdx ) : -1 }; 642 const Bool bMVIAvailable = pcCU->getSlice()->getSPS()->getUseMVI() && pcCU->getSlice()->getSliceType() != I_SLICE 643 && !( aiRefIdxVsp[0] >= 0 && pcTextCU->getSlice()->getRefViewId( RefPicList(0), aiRefIdxVsp[0] ) == NUM_VIEW_VSP ) 644 && !( aiRefIdxVsp[1] >= 0 && pcTextCU->getSlice()->getRefViewId( RefPicList(1), aiRefIdxVsp[1] ) == NUM_VIEW_VSP ); 645 #else 646 const Bool bMVIAvailable = pcCU->getSlice()->getSPS()->getUseMVI() && pcCU->getSlice()->getSliceType() != I_SLICE; 642 #if VSP_CFG 643 const Bool bMVIAvailable = (pcCU->getSlice()->getSPS()->getVspDepthPresentFlag() || pcCU->getSlice()->getViewId()==0) 644 ? pcCU->getSlice()->getSPS()->getUseMVI() && pcCU->getSlice()->getSliceType() != I_SLICE 645 : pcCU->getSlice()->getSPS()->getUseMVI() && pcCU->getSlice()->getSliceType() != I_SLICE 646 && !( aiRefIdxVsp[0] >= pcCU->getSlice()->getNumRefIdx( RefPicList(0) ) ) 647 && !( aiRefIdxVsp[1] >= pcCU->getSlice()->getNumRefIdx( RefPicList(1) ) ); 648 #else 649 const Bool bMVIAvailable = pcCU->getSlice()->getVspDepthDisableFlag() ? pcCU->getSlice()->getSPS()->getUseMVI() && pcCU->getSlice()->getSliceType() != I_SLICE 650 && !( aiRefIdxVsp[0] >= 0 && pcTextCU->isVspRef( RefPicList(0), aiRefIdxVsp[0] ) ) 651 && !( aiRefIdxVsp[1] >= 0 && pcTextCU->isVspRef( RefPicList(1), aiRefIdxVsp[1] ) ) 652 : pcCU->getSlice()->getSPS()->getUseMVI() && pcCU->getSlice()->getSliceType() != I_SLICE; 653 #endif 647 654 #endif 648 655 const UInt uiMviMergePos = bMVIAvailable ? HHI_MPI_MERGE_POS : uiNumCand; -
branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibDecoder/TDecSlice.cpp
r166 r193 102 102 rpcPic->setPicYuvResi( 0 ); 103 103 104 #if DEBUGLOGOUT105 char fname[128];106 sprintf(fname, "%sV%02d_%05d%s.csv", "DecLog", rpcPic->getSlice(0)->getViewId(), rpcPic->getPOC(), rpcPic->getSlice(0)->getIsDepth() ? "depth":"text");107 m_pcCuDecoder->m_cDebug.DebugLogFileOpen( fname );108 #endif109 104 #if ENC_DEC_TRACE 110 105 g_bJustDoIt = g_bEncDecTraceEnable; … … 444 439 #endif 445 440 } 446 #if DEBUGLOGOUT447 m_pcCuDecoder->m_cDebug.DebugLogFileClose();448 #endif449 441 450 442 } -
branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibDecoder/TDecTop.cpp
r166 r193 541 541 } 542 542 #endif 543 544 543 } 545 544 … … 986 985 m_pcPicVSP->create( m_apcSlicePilot->getSPS()->getPicWidthInLumaSamples(), m_apcSlicePilot->getSPS()->getPicHeightInLumaSamples(), g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth ); 987 986 m_pcPicVSP->setCurrSliceIdx(0); 988 m_pcPicVSP->getCurrSlice()->setViewId( NUM_VIEW_VSP );989 987 m_pcPicVSP->getCurrSlice()->setViewOrderIdx( m_apcSlicePilot->getSPS()->getViewOrderIdx() ); 990 988 m_pcPicVSP->getCurrSlice()->setSPS( m_apcSlicePilot->getSPS() ); … … 1013 1011 m_pcPicAvail->create( m_apcSlicePilot->getSPS()->getPicWidthInLumaSamples(), m_apcSlicePilot->getSPS()->getPicHeightInLumaSamples(), g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth ); 1014 1012 m_pcPicAvail->setCurrSliceIdx(0); 1015 m_pcPicAvail->getCurrSlice()->setViewId( 99 );1016 1013 m_pcPicAvail->getCurrSlice()->setViewOrderIdx( m_apcSlicePilot->getSPS()->getViewOrderIdx() ); 1017 1014 m_pcPicAvail->getCurrSlice()->setSPS( m_apcSlicePilot->getSPS() ); … … 1302 1299 #if VSP_N 1303 1300 Bool bUseVsp = (m_viewId!=0); 1304 #if VSP_TEXT_ONLY 1305 if( m_isDepth ) bUseVsp = false; 1301 #if VSP_CFG 1302 if( !pcSlice->getSPS()->getVspDepthPresentFlag() && m_isDepth ) bUseVsp = false; 1303 #else 1304 if( pcSlice->getVspDepthDisableFlag() && m_isDepth ) bUseVsp = false; 1306 1305 #endif 1307 1306 #if VSP_SLICE_HEADER … … 1312 1311 if( bUseVsp ) 1313 1312 #endif 1313 { 1314 1314 m_pcPicVSP->getCurrSlice()->setPOC( pcPic->getPOC() ); 1315 m_pcPicVSP->getCurrSlice()->setViewId( pcPic->getViewId() ); 1316 } 1315 1317 1316 1318 pcSlice->setRefPicListMvc( m_cListPic, apcInterViewRefPics, bUseVsp ? m_pcPicVSP : NULL ); … … 1423 1425 if( getTAppDecTop()->getUseDepth() ) 1424 1426 { 1425 getTAppDecTop()->storeVSPInBuffer( m_pcPicVSP, m_pcPicAvail, pcSlice->getViewId(), pcSlice->getSPS()->getViewOrderIdx(), pcSlice->getPOC(), m_isDepth ); 1427 #if VSP_CFG 1428 if( pcSlice->getSPS()->getVspDepthPresentFlag() || !m_isDepth ) 1429 #else 1430 if( !pcSlice->getVspDepthDisableFlag() || !m_isDepth ) 1431 #endif 1432 getTAppDecTop()->storeVSPInBuffer( m_pcPicVSP, m_pcPicAvail, pcSlice->getViewId(), pcSlice->getSPS()->getViewOrderIdx(), pcSlice->getPOC(), m_isDepth ); 1433 #if VSP_N_DUMP 1434 if( m_pcPicVSP && pcSlice->getViewId() != 0 && pcSlice->getNumRefIdx(REF_PIC_LIST_0)!=0){ 1435 Char acFilenameBase[1024]; 1436 ::sprintf(acFilenameBase,"ref_dec_%sv%d_%04d.yuv",(m_isDepth?"D":"T"),pcSlice->getViewId(), pcSlice->getPOC()); 1437 pcSlice->getRefPic(REF_PIC_LIST_0, pcSlice->getNumRefIdx(REF_PIC_LIST_0)-1)->getPicYuvRec()->dump(acFilenameBase,0); 1438 } 1439 #endif 1426 1440 } 1427 1441 #endif
Note: See TracChangeset for help on using the changeset viewer.