Changeset 491 in 3DVCSoftware
- Timestamp:
- 24 Jun 2013, 11:43:04 (11 years ago)
- Location:
- branches/HTM-DEV-0.3-dev0/source
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HTM-DEV-0.3-dev0/source/App/TAppEncoder/TAppEncCfg.cpp
r446 r491 732 732 cOSS<<"Frame"<<i; 733 733 opts.addOptions()( cOSS.str(), m_GOPListMvc[k][i-1], GOPEntry() ); 734 if ( i != 1 ) 735 { 736 opts.opt_list.back()->opt->opt_duplicate = true; 737 } 734 738 } 735 739 } … … 738 742 std::ostringstream cOSS1; 739 743 cOSS1<<"FrameI"<<"_l"<<k; 744 740 745 opts.addOptions()(cOSS1.str(), m_GOPListMvc[k][MAX_GOP], GOPEntry()); 746 if ( k > 1 ) 747 { 748 opts.opt_list.back()->opt->opt_duplicate = true; 749 } 750 741 751 742 752 for( Int i = 1; i < MAX_GOP + 1; i++ ) … … 745 755 cOSS2<<"Frame"<<i<<"_l"<<k; 746 756 opts.addOptions()(cOSS2.str(), m_GOPListMvc[k][i-1], GOPEntry()); 757 if ( i != 1 || k > 0 ) 758 { 759 opts.opt_list.back()->opt->opt_duplicate = true; 760 } 747 761 } 748 762 } -
branches/HTM-DEV-0.3-dev0/source/Lib/TAppCommon/program_options_lite.cpp
r324 r491 39 39 #include <map> 40 40 #include "program_options_lite.h" 41 41 #include "../TLibCommon/TypeDef.h" 42 42 using namespace std; 43 43 … … 146 146 for(Options::NamesPtrList::iterator it = opts.opt_list.begin(); it != opts.opt_list.end(); it++) 147 147 { 148 #if H_MV 149 if ( (*it)->opt->opt_duplicate ) continue; 150 #endif 148 151 ostringstream line(ios_base::out); 149 152 doHelpOpt(line, **it, pad_short); … … 161 164 for(Options::NamesPtrList::iterator it = opts.opt_list.begin(); it != opts.opt_list.end(); it++) 162 165 { 166 #if H_MV 167 if ( (*it)->opt->opt_duplicate ) continue; 168 #endif 169 163 170 ostringstream line(ios_base::out); 164 171 line << " "; -
branches/HTM-DEV-0.3-dev0/source/Lib/TAppCommon/program_options_lite.h
r446 r491 36 36 #include <list> 37 37 #include <map> 38 #include "../TLibCommon/TypeDef.h" 38 39 39 40 #if H_MV … … 41 42 #include <errno.h> 42 43 #include <cstring> 43 44 44 #ifdef WIN32 45 45 #define strdup _strdup … … 85 85 struct OptionBase 86 86 { 87 #if H_MV 88 OptionBase(const std::string& name, const std::string& desc, bool duplicate = false) 89 : opt_string(name), opt_desc(desc), opt_duplicate(duplicate) 90 #else 87 91 OptionBase(const std::string& name, const std::string& desc) 88 92 : opt_string(name), opt_desc(desc) 93 #endif 89 94 {}; 90 95 … … 98 103 std::string opt_string; 99 104 std::string opt_desc; 105 #if H_MV 106 bool opt_duplicate; 107 #endif 100 108 }; 101 109 … … 104 112 struct Option : public OptionBase 105 113 { 114 #if H_MV 115 Option(const std::string& name, T& storage, T default_val, const std::string& desc, bool duplicate = false) 116 : OptionBase(name, desc, duplicate), opt_storage(storage), opt_default_val(default_val) 117 #else 106 118 Option(const std::string& name, T& storage, T default_val, const std::string& desc) 107 119 : OptionBase(name, desc), opt_storage(storage), opt_default_val(default_val) 120 #endif 108 121 {} 109 122 … … 374 387 sprintf((char*) cDescriptionBuffer.c_str(),desc.c_str(),uiK,uiK); 375 388 376 parent.addOption(new Option<T>( cNameBuffer, (storage[uiK]), default_val, cDescriptionBuffer ));389 parent.addOption(new Option<T>( cNameBuffer, (storage[uiK]), default_val, cDescriptionBuffer, uiK != 0 )); 377 390 } 378 391 -
branches/HTM-DEV-0.3-dev0/source/Lib/TLibCommon/TComDataCU.cpp
r446 r491 3280 3280 3281 3281 // use coldir. 3282 #if H_MV 3283 TComPic *pColPic; 3284 if (getSlice()->getAltCollocatedIndicationFlag() ) 3285 { 3286 pColPic = getSlice()->getPicFromRefPicSetInterLayer( getSlice()->getActiveMotionPredRefLayerId( getSlice()->getCollocatedRefLayerIdx() )); 3287 } 3288 else 3289 { 3290 pColPic = getSlice()->getRefPic( RefPicList(getSlice()->isInterB() ? 1-getSlice()->getColFromL0Flag() : 0), getSlice()->getColRefIdx()); 3291 } 3292 #else 3282 3293 TComPic *pColPic = getSlice()->getRefPic( RefPicList(getSlice()->isInterB() ? 1-getSlice()->getColFromL0Flag() : 0), getSlice()->getColRefIdx()); 3294 #endif 3283 3295 TComDataCU *pColCU = pColPic->getCU( uiCUAddr ); 3284 3296 if(pColCU->getPic()==0||pColCU->getPartitionSize(uiPartUnitIdx)==SIZE_NONE) -
branches/HTM-DEV-0.3-dev0/source/Lib/TLibCommon/TComSlice.cpp
r490 r491 108 108 , m_enableTMVPFlag ( true ) 109 109 #if H_MV 110 , m_refPicSetInterLayer ( NULL ) 110 111 , m_layerId (0) 111 112 , m_viewId (0) … … 468 469 UInt NumPocStCurr1 = 0; 469 470 UInt NumPocLtCurr = 0; 470 #if H_MV471 Int numDirectRefLayers = getVPS()->getNumDirectRefLayers( getLayerIdInVps() );472 assert( numDirectRefLayers == refPicSetInterLayer.size() );473 #endif474 471 Int i; 475 472 for(i=0; i < m_pcRPS->getNumberOfNegativePictures(); i++) … … 519 516 TComPic* rpsCurrList0[MAX_NUM_REF+1]; 520 517 TComPic* rpsCurrList1[MAX_NUM_REF+1]; 518 521 519 #if H_MV 522 Int numPocTotalCurr = NumPocStCurr0 + NumPocStCurr1 + NumPocLtCurr + numDirectRefLayers; 520 521 Int numPocTotalCurr = NumPocStCurr0 + NumPocStCurr1 + NumPocLtCurr + getNumActiveRefLayerPics( ); 523 522 assert( numPocTotalCurr == getNumRpsCurrTempList() ); 524 523 #else … … 558 557 559 558 Int cIdx = 0; 559 #if H_MV 560 if ( getInterRefEnabledInRPLFlag() ) 561 { 562 #endif 560 563 for ( i=0; i<NumPocStCurr0; i++, cIdx++) 561 564 { … … 571 574 } 572 575 #if H_MV 573 for ( i=0; i<numDirectRefLayers; i++, cIdx++) 574 { 575 if( cIdx <= MAX_NUM_REF ) 576 { 577 rpsCurrList0[cIdx] = refPicSetInterLayer[i]; 578 } 576 } 577 for ( i=0; i < getNumActiveRefLayerPics( ); i++, cIdx++) 578 { 579 assert( cIdx < MAX_NUM_REF ); 580 rpsCurrList0[cIdx] = refPicSetInterLayer[i]; 579 581 } 580 582 #endif … … 583 585 { 584 586 cIdx = 0; 587 #if H_MV 588 if ( getInterRefEnabledInRPLFlag() ) 589 { 590 #endif 585 591 for ( i=0; i<NumPocStCurr1; i++, cIdx++) 586 592 { … … 596 602 } 597 603 #if H_MV 598 for ( i=0; i<numDirectRefLayers; i++, cIdx++) 599 { 600 if( cIdx <= MAX_NUM_REF ) 601 { 602 rpsCurrList1[cIdx] = refPicSetInterLayer[i]; 603 } 604 } 605 for ( i=0; i < getNumActiveRefLayerPics( ); i++, cIdx++) 606 { 607 assert( cIdx < MAX_NUM_REF ); 608 rpsCurrList1[cIdx] = refPicSetInterLayer[i]; 604 609 } 605 610 #endif … … 664 669 } 665 670 #if H_MV 666 numRpsCurrTempList = numRpsCurrTempList + get VPS()->getNumDirectRefLayers( getLayerIdInVps());671 numRpsCurrTempList = numRpsCurrTempList + getNumActiveRefLayerPics(); 667 672 #endif 668 673 return numRpsCurrTempList; … … 2273 2278 refPicSetInterLayer.clear(); 2274 2279 2275 for( Int i = 0; i < get VPS()->getNumDirectRefLayers( getLayerIdInVps()); i++ )2276 { 2277 Int layerIdRef = get VPS()->getRefLayerId( getLayerIdInVps(),i );2280 for( Int i = 0; i < getNumActiveRefLayerPics(); i++ ) 2281 { 2282 Int layerIdRef = getRefPicLayerId( i ); 2278 2283 TComPic* picRef = ivPicLists->getPic( layerIdRef, getPOC() ) ; 2279 2284 assert ( picRef != 0 ); … … 2283 2288 picRef->getSlice(0)->setReferenced( true ); 2284 2289 2290 // Consider to check here: 2291 // "If the current picture is a RADL picture, there shall be no entry in the RefPicSetInterLayer that is a RASL picture. " 2285 2292 refPicSetInterLayer.push_back( picRef ); 2286 2293 } … … 2361 2368 while( val > ( 1 << ceilLog2 ) ) ceilLog2++; 2362 2369 return ceilLog2; 2370 } 2371 2372 Void TComSlice::markCurrPic( TComPic* currPic ) 2373 { 2374 if ( currPic->getSlice(0)->getDiscardableFlag() ) 2375 { 2376 currPic->getSlice(0)->setReferenced( true ) ; 2377 currPic->setIsLongTerm( false ); 2378 } 2379 else 2380 { 2381 currPic->getSlice(0)->setReferenced( false ) ; 2382 } 2383 } 2384 2385 Void TComSlice::setRefPicSetInterLayer( std::vector<TComPic*>* refPicSetInterLayer ) 2386 { 2387 m_refPicSetInterLayer = refPicSetInterLayer; 2388 } 2389 2390 TComPic* TComSlice::getPicFromRefPicSetInterLayer( Int layerId ) 2391 { 2392 assert( m_refPicSetInterLayer != 0 ); 2393 assert( (*m_refPicSetInterLayer).size() == getNumActiveRefLayerPics() ); 2394 TComPic* pcPic = NULL; 2395 for ( Int i = 0; i < getNumActiveRefLayerPics(); i++ ) 2396 { 2397 if ((*m_refPicSetInterLayer)[ i ]->getLayerId() == layerId) 2398 { 2399 pcPic = (*m_refPicSetInterLayer)[ i ]; 2400 } 2401 } 2402 assert(pcPic != NULL); 2403 return pcPic; 2363 2404 } 2364 2405 -
branches/HTM-DEV-0.3-dev0/source/Lib/TLibCommon/TComSlice.h
r490 r491 1586 1586 Bool m_enableTMVPFlag; 1587 1587 #if H_MV 1588 std::vector<TComPic*>* m_refPicSetInterLayer; 1588 1589 Int m_layerId; 1589 1590 Int m_viewId; … … 1781 1782 Void createAndApplyIvReferencePictureSet( TComPicLists* ivPicLists, std::vector<TComPic*>& refPicSetInterLayer ); 1782 1783 static Void markIvRefPicsAsShortTerm ( std::vector<TComPic*> refPicSetInterLayer ); 1783 static Void markIvRefPicsAsUnused ( TComPicLists* ivPicLists, std::vector<Int> targetDecLayerIdSet, TComVPS* vps, Int curLayerId, Int curPoc ); 1784 1785 1786 Void xPrintRefPicList(); 1784 static Void markCurrPic ( TComPic* currPic );; 1785 static Void markIvRefPicsAsUnused ( TComPicLists* ivPicLists, std::vector<Int> targetDecLayerIdSet, TComVPS* vps, Int curLayerId, Int curPoc ); 1786 Void xPrintRefPicList(); 1787 1787 #endif 1788 1788 Bool isTemporalLayerSwitchingPoint( TComList<TComPic*>& rcListPic ); … … 1962 1962 return interRefEnabledInRPLFlag; 1963 1963 } 1964 #endif 1964 1965 Void setRefPicSetInterLayer( std::vector<TComPic*>* m_refPicSetInterLayer ); 1966 1967 TComPic* getPicFromRefPicSetInterLayer( Int layerId ); 1968 1969 #endif 1970 1971 1965 1972 protected: 1966 1973 TComPic* xGetRefPic (TComList<TComPic*>& rcListPic, … … 1968 1975 TComPic* xGetLongTermRefPic(TComList<TComPic*>& rcListPic, Int poc, Bool pocHasMsb); 1969 1976 #if H_MV 1970 TComPic* xGetInterLayerRefPic( std::vector<TComPic*>& rcListIlPic, Int layerId );1971 1977 Int xCeilLog2( Int val ); 1972 1978 #endif -
branches/HTM-DEV-0.3-dev0/source/Lib/TLibDecoder/TDecTop.cpp
r490 r491 518 518 #if H_MV 519 519 TComSlice::markIvRefPicsAsShortTerm( m_refPicSetInterLayer ); 520 TComSlice::markCurrPic( pcPic ); 520 521 TComSlice::markIvRefPicsAsUnused ( m_ivPicLists, targetDecLayerIdSet, m_parameterSetManagerDecoder.getActiveVPS(), m_layerId, poc ); 521 522 #endif … … 673 674 674 675 #if H_MV 676 m_apcSlicePilot->setRefPicSetInterLayer( & m_refPicSetInterLayer ); 675 677 m_apcSlicePilot->setLayerId( nalu.m_layerId ); 676 678 #endif -
branches/HTM-DEV-0.3-dev0/source/Lib/TLibEncoder/TEncGOP.cpp
r446 r491 498 498 pcSlice->setSliceIdx(0); 499 499 #if H_MV 500 pcSlice->setRefPicSetInterLayer ( &m_refPicSetInterLayer ); 500 501 pcPic ->setLayerId ( getLayerId() ); 501 502 pcPic ->setViewId ( getViewId() ); … … 2061 2062 2062 2063 pcPic->setReconMark ( true ); 2063 #if H_MV 2064 #if H_MV 2064 2065 TComSlice::markIvRefPicsAsShortTerm( m_refPicSetInterLayer ); 2065 2066 std::vector<Int> temp; 2067 TComSlice::markCurrPic( pcPic ); 2066 2068 TComSlice::markIvRefPicsAsUnused ( m_ivPicLists, temp, pcPic->getSlice(0)->getVPS(), m_layerId, pcPic->getPOC() ); 2067 2069 #endif
Note: See TracChangeset for help on using the changeset viewer.