Changeset 194 in 3DVCSoftware for branches/HTM-5.0-Qualcomm/source/Lib/TLibEncoder/TEncGOP.cpp
- Timestamp:
- 26 Nov 2012, 18:35:20 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HTM-5.0-Qualcomm/source/Lib/TLibEncoder/TEncGOP.cpp
r189 r194 246 246 247 247 std::vector<TComAPS>& vAPS = m_pcEncTop->getAPS(); 248 #if VIDYO_VPS_INTEGRATION 248 #if VIDYO_VPS_INTEGRATION|MVHEVC 249 249 m_pcSliceEncoder->initEncSlice ( pcPic, iPOCLast, uiPOCCurr, iNumPicRcvd, iGOPid, pcSlice, m_pcEncTop->getEncTop()->getVPS(), m_pcEncTop->getSPS(), m_pcEncTop->getPPS() ); 250 250 #else … … 298 298 if( pcSlice->getSliceType() == B_SLICE ) 299 299 { 300 if( m_pcCfg->getGOPEntry( (getNalUnitType(uiPOCCurr) == NAL_UNIT_CODED_SLICE_IDV) ? MAX_GOP : iGOPid ).m_sliceType == 'P' ) { pcSlice->setSliceType( P_SLICE ); } 301 } 300 #if QC_REM_IDV 301 if( m_pcCfg->getGOPEntry(pcSlice->getSPS()->getViewId() && ((getNalUnitType(uiPOCCurr) == NAL_UNIT_CODED_SLICE_IDR) || (getNalUnitType(uiPOCCurr) == NAL_UNIT_CODED_SLICE_CRA))? MAX_GOP : iGOPid ).m_sliceType == 'P' ) { pcSlice->setSliceType( P_SLICE ); } 302 #else 303 if( m_pcCfg->getGOPEntry( (getNalUnitType(uiPOCCurr) == NAL_UNIT_CODED_SLICE_IDV) ? MAX_GOP : iGOPid ).m_sliceType == 'P' ) { pcSlice->setSliceType( P_SLICE ); } 304 #endif 305 } 302 306 303 307 // Set the nal unit type … … 332 336 #endif 333 337 338 #if !QC_REM_IDV 334 339 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()) ) ); 335 340 pcSlice->setNumRefIdx( REF_PIC_LIST_1, min( m_pcCfg->getGOPEntry( (getNalUnitType(uiPOCCurr) == NAL_UNIT_CODED_SLICE_IDV) ? MAX_GOP : iGOPid ).m_numRefPicsActive, (pcSlice->getRPS()->getNumberOfPictures() + pcSlice->getSPS()->getNumberOfUsableInterViewRefs()) ) ); 336 337 TComRefPicListModification* refPicListModification = pcSlice->getRefPicListModification(); 338 refPicListModification->setRefPicListModificationFlagL0( false ); 341 #else 342 343 Bool bNalRAP = ((getNalUnitType(uiPOCCurr) == NAL_UNIT_CODED_SLICE_CRA) || (getNalUnitType(uiPOCCurr) == NAL_UNIT_CODED_SLICE_IDR)) && (pcSlice->getSPS()->getViewId()) ? 1: 0; 344 pcSlice->setNumRefIdx( REF_PIC_LIST_0, min( m_pcCfg->getGOPEntry( bNalRAP ? MAX_GOP : iGOPid ).m_numRefPicsActive, (pcSlice->getRPS()->getNumberOfPictures() + pcSlice->getSPS()->getNumberOfUsableInterViewRefs()) ) ); 345 pcSlice->setNumRefIdx( REF_PIC_LIST_1, min( m_pcCfg->getGOPEntry( bNalRAP ? MAX_GOP : iGOPid ).m_numRefPicsActive, (pcSlice->getRPS()->getNumberOfPictures() + pcSlice->getSPS()->getNumberOfUsableInterViewRefs()) ) ); 346 #endif 347 TComRefPicListModification* refPicListModification = pcSlice->getRefPicListModification(); 348 refPicListModification->setRefPicListModificationFlagL0( false ); 339 349 #if !H0137_0138_LIST_MODIFICATION 340 350 refPicListModification->setNumberOfRefPicListModificationsL0(0); … … 363 373 if( pcSlice->getSliceType() == B_SLICE ) 364 374 { 375 #if !QC_REM_IDV 365 376 if( m_pcCfg->getGOPEntry( (getNalUnitType(uiPOCCurr) == NAL_UNIT_CODED_SLICE_IDV) ? MAX_GOP : iGOPid ).m_sliceType == 'P' ) { pcSlice->setSliceType( P_SLICE ); } 377 #else 378 Bool bRAP = ((getNalUnitType(uiPOCCurr) == NAL_UNIT_CODED_SLICE_CRA) || (getNalUnitType(uiPOCCurr) == NAL_UNIT_CODED_SLICE_IDR)) && (pcSlice->getSPS()->getViewId()) ? 1: 0; 379 if( m_pcCfg->getGOPEntry( bRAP ? MAX_GOP : iGOPid ).m_sliceType == 'P' ) { pcSlice->setSliceType( P_SLICE ); } 380 #endif 366 381 } 367 382 … … 830 845 if ( m_bSeqFirst ) 831 846 { 832 #if VIDYO_VPS_INTEGRATION 847 #if MVHEVC 848 if(!m_pcEncTop->getLayerId()) 849 { 850 #endif 851 #if VIDYO_VPS_INTEGRATION|MVHEVC 833 852 { 834 853 OutputNALUnit nalu(NAL_UNIT_VPS, true, m_pcEncTop->getLayerId()); … … 840 859 #endif 841 860 #if NAL_REF_FLAG 842 #if VIDYO_VPS_INTEGRATION 861 #if VIDYO_VPS_INTEGRATION|MVHEVC 843 862 OutputNALUnit nalu(NAL_UNIT_SPS, true, m_pcEncTop->getLayerId()); 844 863 #else … … 861 880 862 881 #if NAL_REF_FLAG 863 #if VIDYO_VPS_INTEGRATION 882 #if VIDYO_VPS_INTEGRATION|MVHEVC 883 #if MVHEVC 864 884 nalu = NALUnit(NAL_UNIT_PPS, true, m_pcEncTop->getLayerId()); 885 #else 886 nalu = NALUnit(NAL_UNIT_PPS, true, m_pcEncTop->getLayerId()); 887 #endif 865 888 #else 866 889 nalu = NALUnit(NAL_UNIT_PPS, true, m_pcEncTop->getViewId(), m_pcEncTop->getIsDepth()); … … 873 896 writeRBSPTrailingBits(nalu.m_Bitstream); 874 897 accessUnit.push_back(new NALUnitEBSP(nalu)); 875 876 m_bSeqFirst = false; 877 } 898 #if MVHEVC 899 } 900 #endif 901 m_bSeqFirst = false; 902 } 878 903 879 904 /* use the main bitstream buffer for storing the marshalled picture */ … … 993 1018 #if NAL_REF_FLAG 994 1019 OutputNALUnit nalu( pcSlice->getNalUnitType(), pcSlice->isReferenced(), 995 #if !VIDYO_VPS_INTEGRATION 1020 #if !VIDYO_VPS_INTEGRATION &!MVHEVC 996 1021 m_pcEncTop->getViewId(), m_pcEncTop->getIsDepth(), pcSlice->getTLayer() ); 997 1022 #else … … 1469 1494 { 1470 1495 #if NAL_REF_FLAG 1471 #if VIDYO_VPS_INTEGRATION 1496 #if VIDYO_VPS_INTEGRATION | MVHEVC 1472 1497 OutputNALUnit nalu(NAL_UNIT_APS, true, m_pcEncTop->getLayerId()); 1473 1498 #else … … 1535 1560 1536 1561 #if NAL_REF_FLAG 1537 #if VIDYO_VPS_INTEGRATION 1562 #if VIDYO_VPS_INTEGRATION | MVHEVC 1538 1563 OutputNALUnit nalu(NAL_UNIT_SEI, false, m_pcEncTop->getLayerId()); 1539 1564 #else … … 1973 1998 case NAL_UNIT_CODED_SLICE: return "SLICE"; 1974 1999 #if H0566_TLA 2000 #if !QC_REM_IDV 1975 2001 case NAL_UNIT_CODED_SLICE_IDV: return "IDV"; 2002 #endif 1976 2003 case NAL_UNIT_CODED_SLICE_CRA: return "CRA"; 1977 2004 case NAL_UNIT_CODED_SLICE_TLA: return "TLA"; … … 2188 2215 if( bInterViewOnlySlice ) 2189 2216 { 2217 #if !QC_REM_IDV 2190 2218 return NAL_UNIT_CODED_SLICE_IDV; 2219 #else 2220 return NAL_UNIT_CODED_SLICE_IDR; 2221 #endif 2191 2222 } 2192 2223 else … … 2201 2232 if( bInterViewOnlySlice ) 2202 2233 { 2234 #if !QC_REM_IDV 2203 2235 return NAL_UNIT_CODED_SLICE_IDV; 2236 #else 2237 return NAL_UNIT_CODED_SLICE_CRA; 2238 #endif 2204 2239 } 2205 2240 else … … 2216 2251 if( bInterViewOnlySlice ) 2217 2252 { 2253 #if !QC_REM_IDV 2218 2254 return NAL_UNIT_CODED_SLICE_IDV; 2255 #else 2256 return NAL_UNIT_CODED_SLICE_IDR; 2257 #endif 2219 2258 } 2220 2259 else … … 2454 2493 2455 2494 // analyze inter-view modifications 2495 #if !QC_REM_IDV 2456 2496 GOPEntryMvc gem = m_pcCfg->getGOPEntry( (getNalUnitType(uiPOCCurr) == NAL_UNIT_CODED_SLICE_IDV) ? MAX_GOP : iGOPid ); 2497 #else 2498 Bool bRAP = ((getNalUnitType(uiPOCCurr) == NAL_UNIT_CODED_SLICE_IDR) || (getNalUnitType(uiPOCCurr) == NAL_UNIT_CODED_SLICE_CRA)) && (pcSlice->getSPS()->getViewId()) ? 1:0; 2499 GOPEntryMvc gem = m_pcCfg->getGOPEntry( bRAP ? MAX_GOP : iGOPid ); 2500 #endif 2457 2501 Int numL0Modifications = 0; 2458 2502 Int numL1Modifications = 0;
Note: See TracChangeset for help on using the changeset viewer.