Changeset 562 in SHVCSoftware for branches/SHM-5.0-dev/source
- Timestamp:
- 27 Jan 2014, 17:40:23 (11 years ago)
- Location:
- branches/SHM-5.0-dev/source/Lib
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/SHM-5.0-dev/source/Lib/TLibCommon/TComDataCU.cpp
r540 r562 3438 3438 3439 3439 // use coldir. 3440 #if M0457_COL_PICTURE_SIGNALING && !REMOVE_COL_PICTURE_SIGNALING3441 TComPic *pColPic;3442 if (m_layerId > 0 && getSlice()->getAltColIndicationFlag())3443 {3444 pColPic = getSlice()->getMotionPredIlp();3445 }3446 else3447 {3448 pColPic = getSlice()->getRefPic( RefPicList(getSlice()->isInterB() ? 1-getSlice()->getColFromL0Flag() : 0), getSlice()->getColRefIdx());3449 }3450 #else3451 3440 TComPic *pColPic = getSlice()->getRefPic( RefPicList(getSlice()->isInterB() ? 1-getSlice()->getColFromL0Flag() : 0), getSlice()->getColRefIdx()); 3452 #endif3453 3441 TComDataCU *pColCU = pColPic->getCU( uiCUAddr ); 3454 3442 if(pColCU->getPic()==0||pColCU->getPartitionSize(uiPartUnitIdx)==SIZE_NONE) -
branches/SHM-5.0-dev/source/Lib/TLibCommon/TComSlice.cpp
r561 r562 124 124 m_numILRRefIdx = 0; 125 125 #endif 126 #if M0457_COL_PICTURE_SIGNALING && !REMOVE_COL_PICTURE_SIGNALING127 m_altColIndicationFlag = false;128 m_colRefLayerIdx = 0;129 #endif130 126 #endif //SVC_EXTENSION 131 127 … … 453 449 { 454 450 #if REF_IDX_MFM 455 #if M0457_COL_PICTURE_SIGNALING456 451 if(!(m_eNalUnitType >= NAL_UNIT_CODED_SLICE_BLA_W_LP && m_eNalUnitType <= NAL_UNIT_CODED_SLICE_CRA) && getMFMEnabledFlag()) 457 #else458 if(!(m_eNalUnitType >= NAL_UNIT_CODED_SLICE_BLA_W_LP && m_eNalUnitType <= NAL_UNIT_CODED_SLICE_CRA) && m_pcSPS->getMFMEnabledFlag())459 #endif460 452 { 461 453 ilpPic[refLayerIdc]->copyUpsampledMvField( refLayerIdc, m_pcBaseColPic[refLayerIdc] ); -
branches/SHM-5.0-dev/source/Lib/TLibCommon/TComSlice.h
r561 r562 1324 1324 #if SVC_EXTENSION 1325 1325 UInt m_layerId; 1326 1327 #if REF_IDX_MFM1328 #if !M0457_COL_PICTURE_SIGNALING1329 Bool m_bMFMEnabledFlag;1330 #endif1331 #endif1332 1326 UInt m_numScaledRefLayerOffsets; 1333 1327 #if O0098_SCALED_REF_LAYER_ID … … 1490 1484 Void setLayerId(UInt layerId) { m_layerId = layerId; } 1491 1485 UInt getLayerId() { return m_layerId; } 1492 #if REF_IDX_MFM1493 #if !M0457_COL_PICTURE_SIGNALING1494 Void setMFMEnabledFlag(Bool flag) {m_bMFMEnabledFlag = flag;}1495 Bool getMFMEnabledFlag() {return m_bMFMEnabledFlag;}1496 #endif1497 #endif1498 1486 UInt getNumScaledRefLayerOffsets() { return m_numScaledRefLayerOffsets; } 1499 1487 Void setNumScaledRefLayerOffsets(Int x) { m_numScaledRefLayerOffsets = x; } … … 1875 1863 TComPic* m_pcBaseColPic[MAX_LAYERS]; 1876 1864 TComPicYuv* m_pcFullPelBaseRec[MAX_LAYERS]; 1877 #if M0457_COL_PICTURE_SIGNALING1878 1865 Int m_numMotionPredRefLayers; 1879 1866 #if REF_IDX_MFM … … 1882 1869 Bool m_altColIndicationFlag; 1883 1870 TComPic* m_pcIlpPic; 1884 #endif1885 1871 #endif 1886 1872 … … 2169 2155 #endif 2170 2156 2171 #if M0457_COL_PICTURE_SIGNALING2172 2157 Void setNumMotionPredRefLayers(int i) { m_numMotionPredRefLayers = i; } 2173 2158 Int getNumMotionPredRefLayers() { return m_numMotionPredRefLayers; } … … 2184 2169 #endif 2185 2170 #endif 2186 #endif2187 2171 2188 2172 TComPic* getRefPic(TComList<TComPic*>& rcListPic, Int poc) { return xGetRefPic( rcListPic, poc ); } -
branches/SHM-5.0-dev/source/Lib/TLibCommon/TypeDef.h
r561 r562 167 167 #if REF_IDX_MFM 168 168 #define REMOVE_COL_PICTURE_SIGNALING 1 ///< JCTVC-N0107: remove alternative collocated picture signalling 169 #define M0457_COL_PICTURE_SIGNALING 1170 169 #define N0139_POSITION_ROUNDING_OFFSET 1 ///< JCTVC-N0139: offset for collocated block in motion mapping 171 170 #endif -
branches/SHM-5.0-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp
r561 r562 756 756 } 757 757 READ_FLAG( uiCode, "sps_temporal_mvp_enable_flag" ); pcSPS->setTMVPFlagsPresent(uiCode); 758 #if REF_IDX_MFM759 #if !M0457_COL_PICTURE_SIGNALING760 if(pcSPS->getLayerId() > 0)761 {762 READ_FLAG( uiCode, "sps_enh_mfm_enable_flag" );763 pcSPS->setMFMEnabledFlag( uiCode ? true : false );764 }765 #endif766 #endif767 758 READ_FLAG( uiCode, "sps_strong_intra_smoothing_enable_flag" ); pcSPS->setUseStrongIntraSmoothing(uiCode); 768 759 … … 2348 2339 if ( rpcSlice->getEnableTMVPFlag() ) 2349 2340 { 2350 #if M0457_COL_PICTURE_SIGNALING2351 2341 #if REMOVE_COL_PICTURE_SIGNALING 2352 2342 rpcSlice->setMFMEnabledFlag( ( rpcSlice->getNumMotionPredRefLayers() > 0 && rpcSlice->getActiveNumILRRefIdx() ) ? true : false ); … … 2369 2359 { 2370 2360 #endif //REMOVE_COL_PICTURE_SIGNALING 2371 #endif2372 2361 if ( rpcSlice->getSliceType() == B_SLICE ) 2373 2362 { … … 2391 2380 rpcSlice->setColRefIdx(0); 2392 2381 } 2393 #if M0457_COL_PICTURE_SIGNALING && !REMOVE_COL_PICTURE_SIGNALING2394 }2395 #endif2396 2382 } 2397 2383 if ( (pps->getUseWP() && rpcSlice->getSliceType()==P_SLICE) || (pps->getWPBiPred() && rpcSlice->getSliceType()==B_SLICE) ) -
branches/SHM-5.0-dev/source/Lib/TLibDecoder/TDecTop.cpp
r560 r562 848 848 setRefLayerParams(m_apcSlicePilot->getVPS()); 849 849 #endif 850 #if M0457_COL_PICTURE_SIGNALING851 850 m_apcSlicePilot->setNumMotionPredRefLayers(m_numMotionPredRefLayers); 852 #endif853 851 #endif 854 852 m_cEntropyDecoder.decodeSliceHeader (m_apcSlicePilot, &m_parameterSetManagerDecoder); … … 1475 1473 1476 1474 #if REF_IDX_MFM 1477 #if M0457_COL_PICTURE_SIGNALING1478 1475 if( pcSlice->getMFMEnabledFlag() ) 1479 #else1480 if( pcSlice->getSPS()->getMFMEnabledFlag() )1481 #endif1482 1476 { 1483 1477 pcSlice->setRefPOCListILP(m_ppcTDecTop[m_layerId]->m_cIlpPic, pcSlice->getBaseColPic()); 1484 #if M0457_COL_PICTURE_SIGNALING && !REMOVE_COL_PICTURE_SIGNALING1485 pcSlice->setMotionPredIlp(getMotionPredIlp(pcSlice));1486 #endif1487 1478 } 1488 1479 pcSlice->setRefPicList( m_cListPic, false, m_cIlpPic); … … 2017 2008 #endif 2018 2009 2019 #if M0457_COL_PICTURE_SIGNALING && !REMOVE_COL_PICTURE_SIGNALING2020 TComPic* TDecTop::getMotionPredIlp(TComSlice* pcSlice)2021 {2022 TComPic* ilpPic = NULL;2023 Int activeMotionPredReflayerIdx = 0;2024 2025 for( Int i = 0; i < pcSlice->getActiveNumILRRefIdx(); i++ )2026 {2027 UInt refLayerIdc = pcSlice->getInterLayerPredLayerIdc(i);2028 if( getMotionPredEnabledFlag( pcSlice->getVPS()->getRefLayerId( m_layerId, refLayerIdc ) ) )2029 {2030 if (activeMotionPredReflayerIdx == pcSlice->getColRefLayerIdx())2031 {2032 ilpPic = m_cIlpPic[refLayerIdc];2033 break;2034 }2035 else2036 {2037 activeMotionPredReflayerIdx++;2038 }2039 }2040 }2041 2042 assert(ilpPic != NULL);2043 2044 return ilpPic;2045 }2046 #endif2047 2010 #if OUTPUT_LAYER_SET_INDEX 2048 2011 Void TDecTop::checkValueOfOutputLayerSetIdx(TComVPS *vps) -
branches/SHM-5.0-dev/source/Lib/TLibDecoder/TDecTop.h
r560 r562 242 242 Void xDecodePPS(); 243 243 Void xDecodeSEI( TComInputBitstream* bs, const NalUnitType nalUnitType ); 244 #if M0457_COL_PICTURE_SIGNALING && !REMOVE_COL_PICTURE_SIGNALING245 TComPic* getMotionPredIlp(TComSlice* pcSlice);246 #endif247 244 248 245 #if NO_CLRAS_OUTPUT_FLAG -
branches/SHM-5.0-dev/source/Lib/TLibEncoder/TEncCavlc.cpp
r561 r562 579 579 } 580 580 WRITE_FLAG( pcSPS->getTMVPFlagsPresent() ? 1 : 0, "sps_temporal_mvp_enable_flag" ); 581 #if REF_IDX_MFM582 #if !M0457_COL_PICTURE_SIGNALING583 if( pcSPS->getLayerId() > 0 )584 {585 WRITE_FLAG( pcSPS->getMFMEnabledFlag() ? 1 : 0, "sps_enh_mfm_enable_flag" );586 }587 #endif588 #endif589 581 WRITE_FLAG( pcSPS->getUseStrongIntraSmoothing(), "sps_strong_intra_smoothing_enable_flag" ); 590 582 … … 1767 1759 if ( pcSlice->getEnableTMVPFlag() ) 1768 1760 { 1769 #if SVC_EXTENSION && M0457_COL_PICTURE_SIGNALING && !REMOVE_COL_PICTURE_SIGNALING1770 if ( !pcSlice->getIdrPicFlag() && pcSlice->getLayerId() > 0 && pcSlice->getActiveNumILRRefIdx() > 0 && pcSlice->getNumMotionPredRefLayers() > 0 )1771 {1772 WRITE_FLAG( pcSlice->getAltColIndicationFlag() ? 1 : 0, "alt_collocated_indication_flag" );1773 if (pcSlice->getAltColIndicationFlag() && pcSlice->getNumMotionPredRefLayers() > 1)1774 {1775 WRITE_UVLC(0, "collocated_ref_layer_idx");1776 }1777 }1778 else1779 {1780 #endif1781 1761 if ( pcSlice->getSliceType() == B_SLICE ) 1782 1762 { … … 1790 1770 WRITE_UVLC( pcSlice->getColRefIdx(), "collocated_ref_idx" ); 1791 1771 } 1792 #if SVC_EXTENSION && M0457_COL_PICTURE_SIGNALING && !REMOVE_COL_PICTURE_SIGNALING1793 }1794 #endif1795 1772 } 1796 1773 if ( (pcSlice->getPPS()->getUseWP() && pcSlice->getSliceType()==P_SLICE) || (pcSlice->getPPS()->getWPBiPred() && pcSlice->getSliceType()==B_SLICE) ) -
branches/SHM-5.0-dev/source/Lib/TLibEncoder/TEncGOP.cpp
r559 r562 690 690 pcSlice->setActiveNumILRRefIdx(0); 691 691 pcSlice->setInterLayerPredEnabledFlag(false); 692 #if M0457_COL_PICTURE_SIGNALING693 692 pcSlice->setMFMEnabledFlag(false); 694 693 #if !REMOVE_COL_PICTURE_SIGNALING 695 694 pcSlice->setAltColIndicationFlag(false); 696 #endif697 695 #endif 698 696 } … … 1191 1189 1192 1190 #if SVC_EXTENSION 1193 #if M0457_COL_PICTURE_SIGNALING && !REMOVE_COL_PICTURE_SIGNALING1194 if ( pcSlice->getSliceType() == B_SLICE && !(pcSlice->getActiveNumILRRefIdx() > 0 && m_pcEncTop->getNumMotionPredRefLayers() > 0) )1195 #else1196 1191 if( pcSlice->getSliceType() == B_SLICE ) 1197 #endif1198 1192 { 1199 1193 pcSlice->setColFromL0Flag(1-uiColDir); … … 1210 1204 pcSlice->setILRPic( m_pcEncTop->getIlpList() ); 1211 1205 #if REF_IDX_MFM 1212 #if M0457_COL_PICTURE_SIGNALING1213 1206 if( pcSlice->getMFMEnabledFlag() ) 1214 #else1215 if( pcSlice->getSPS()->getMFMEnabledFlag() )1216 #endif1217 1207 { 1218 1208 pcSlice->setRefPOCListILP(m_pcEncTop->getIlpList(), pcSlice->getBaseColPic()); 1219 #if M0457_COL_PICTURE_SIGNALING && !REMOVE_COL_PICTURE_SIGNALING1220 pcSlice->setMotionPredIlp(getMotionPredIlp(pcSlice));1221 #endif1222 1209 } 1223 1210 #else … … 1229 1216 1230 1217 #if REF_IDX_MFM 1231 #if M0457_COL_PICTURE_SIGNALING1232 1218 #if REMOVE_COL_PICTURE_SIGNALING 1233 1219 if( pcSlice->getMFMEnabledFlag() ) 1234 1220 #else 1235 1221 if( pcSlice->getMFMEnabledFlag() && !(pcSlice->getActiveNumILRRefIdx() > 0 && m_pcEncTop->getNumMotionPredRefLayers() > 0) ) 1236 #endif1237 #else1238 if( pcSlice->getSPS()->getMFMEnabledFlag() )1239 1222 #endif 1240 1223 { … … 2050 2033 startCUAddrSliceSegmentIdx++; 2051 2034 } 2052 #if SVC_EXTENSION && M0457_COL_PICTURE_SIGNALING2035 #if SVC_EXTENSION 2053 2036 pcSlice->setNumMotionPredRefLayers(m_pcEncTop->getNumMotionPredRefLayers()); 2054 2037 #endif … … 3734 3717 free(rowSAD); 3735 3718 } 3736 3737 #if M0457_COL_PICTURE_SIGNALING && !REMOVE_COL_PICTURE_SIGNALING3738 TComPic* TEncGOP::getMotionPredIlp(TComSlice* pcSlice)3739 {3740 TComPic* ilpPic = NULL;3741 Int activeMotionPredReflayerIdx = 0;3742 3743 for( Int i = 0; i < pcSlice->getActiveNumILRRefIdx(); i++ )3744 {3745 UInt refLayerIdc = pcSlice->getInterLayerPredLayerIdc(i);3746 if( m_pcEncTop->getMotionPredEnabledFlag( pcSlice->getVPS()->getRefLayerId( m_layerId, refLayerIdc ) ) )3747 {3748 if (activeMotionPredReflayerIdx == pcSlice->getColRefLayerIdx())3749 {3750 ilpPic = m_pcEncTop->getIlpList()[refLayerIdc];3751 break;3752 }3753 else3754 {3755 activeMotionPredReflayerIdx++;3756 }3757 }3758 }3759 3760 assert(ilpPic != NULL);3761 3762 return ilpPic;3763 }3764 #endif3765 3766 3719 //! \} -
branches/SHM-5.0-dev/source/Lib/TLibEncoder/TEncGOP.h
r442 r562 210 210 #endif 211 211 Void dblMetric( TComPic* pcPic, UInt uiNumSlices ); 212 #if M0457_COL_PICTURE_SIGNALING && !REMOVE_COL_PICTURE_SIGNALING213 TComPic* getMotionPredIlp(TComSlice* pcSlice);214 #endif215 212 };// END CLASS DEFINITION TEncGOP 216 213 -
branches/SHM-5.0-dev/source/Lib/TLibEncoder/TEncSlice.cpp
r540 r562 536 536 rpcSlice->setNumILRRefIdx( rpcSlice->getVPS()->getNumDirectRefLayers( layerId ) ); 537 537 #endif 538 #if M0457_COL_PICTURE_SIGNALING539 538 rpcSlice->setMFMEnabledFlag(m_ppcTEncTop[layerId]->getMFMEnabledFlag()); 540 539 #if !REMOVE_COL_PICTURE_SIGNALING 541 540 rpcSlice->setAltColIndicationFlag(rpcSlice->getMFMEnabledFlag()); 542 #endif543 541 #endif 544 542 } -
branches/SHM-5.0-dev/source/Lib/TLibEncoder/TEncTop.cpp
r549 r562 934 934 #if SVC_EXTENSION 935 935 m_cSPS.setLayerId(m_layerId); 936 #if REF_IDX_MFM937 #if !M0457_COL_PICTURE_SIGNALING938 m_cSPS.setMFMEnabledFlag(m_bMFMEnabledFlag);939 #endif940 #endif941 936 m_cSPS.setNumScaledRefLayerOffsets(m_numScaledRefLayerOffsets); 942 937 for(Int i = 0; i < m_cSPS.getNumScaledRefLayerOffsets(); i++)
Note: See TracChangeset for help on using the changeset viewer.