Changeset 1084 in SHVCSoftware for branches/SHM-dev/source
- Timestamp:
- 26 Mar 2015, 01:03:53 (10 years ago)
- Location:
- branches/SHM-dev/source
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/SHM-dev/source/App/TAppEncoder/TAppEncCfg.cpp
r1070 r1084 2038 2038 else 2039 2039 { 2040 if( layer == 0 ) 2041 { 2042 m_profileList[0] = Profile::Name(extendedProfile[0]); 2043 } 2044 2040 2045 m_profileList[layerPTLIdx] = Profile::Name(extendedProfile[layerPTLIdx]); 2041 2046 } … … 3324 3329 assert(m_levelList[0] >= m_levelList[1]); //Level IDC of VpsProfileTierLevel[ 0 ] should not be less than level IDC of VpsProfileTierLevel[ 1 ]. 3325 3330 //NOTE that this is not conformance constraint but it would be nice if our encoder can prevent inefficient level IDC assignment 3326 if (m_levelList[0] == m_levelList[1]) printf("Warning: Level0 is set the same as Level1\n"); 3331 if (m_levelList[0] == m_levelList[1]) 3332 { 3333 printf("Warning: Level0 is set the same as Level1\n"); 3334 } 3327 3335 } 3328 3336 #else -
branches/SHM-dev/source/Lib/TLibDecoder/TDecTop.cpp
r1078 r1084 1995 1995 { 1996 1996 // check for the sample prediction picture type 1997 if( m_ppcTDecTop[m_layerId]->getSamplePredEnabledFlag(pcSlice->getVPS()->getLayerIdxInVps(refLayerId)))1997 if( pcSlice->getVPS()->isSamplePredictionType( pcSlice->getVPS()->getLayerIdxInVps(m_layerId), pcSlice->getVPS()->getLayerIdxInVps(refLayerId) ) ) 1998 1998 { 1999 1999 #if O0215_PHASE_ALIGNMENT_REMOVAL … … 2144 2144 if( refPic->isILR(pcSlice->getLayerId()) ) 2145 2145 { 2146 assert( m_ppcTDecTop[m_layerId]->getMotionPredEnabledFlag(refPic->getLayerIdx() ) );2146 assert( pcSlice->getVPS()->isMotionPredictionType( pcSlice->getVPS()->getLayerIdxInVps(m_layerId), refPic->getLayerIdx() ) ); 2147 2147 } 2148 2148 } … … 2785 2785 decTop->setNumMotionPredRefLayers(0); 2786 2786 decTop->setNumDirectRefLayers(0); 2787 for(Int i = 0; i < MAX_VPS_LAYER_IDX_PLUS1; i++) 2788 { 2789 decTop->setSamplePredEnabledFlag(i, false); 2790 decTop->setMotionPredEnabledFlag(i, false); 2791 decTop->setSamplePredRefLayerId(i, 0); 2792 decTop->setMotionPredRefLayerId(i, 0); 2793 } 2787 2794 2788 for(Int j = 0; j < layerIdx; j++) 2795 2789 { … … 2800 2794 2801 2795 Int samplePredEnabledFlag = (vps->getDirectDependencyType(layerIdx, j) + 1) & 1; 2802 decTop->setSamplePredEnabledFlag(j, samplePredEnabledFlag == 1 ? true : false);2803 2796 decTop->setNumSamplePredRefLayers(decTop->getNumSamplePredRefLayers() + samplePredEnabledFlag); 2804 2797 2805 2798 Int motionPredEnabledFlag = ((vps->getDirectDependencyType(layerIdx, j) + 1) & 2) >> 1; 2806 decTop->setMotionPredEnabledFlag(j, motionPredEnabledFlag == 1 ? true : false);2807 2799 decTop->setNumMotionPredRefLayers(decTop->getNumMotionPredRefLayers() + motionPredEnabledFlag); 2808 }2809 }2810 }2811 for( Int i = 1; i < m_numLayer; i++ )2812 {2813 Int mIdx = 0, sIdx = 0;2814 TDecTop *decTop = (TDecTop *)getLayerDec(vps->getLayerIdInNuh(i));2815 for ( Int j = 0; j < i; j++ )2816 {2817 if (decTop->getMotionPredEnabledFlag(j))2818 {2819 decTop->setMotionPredRefLayerId(mIdx++, vps->getLayerIdInNuh(j));2820 }2821 if (decTop->getSamplePredEnabledFlag(j))2822 {2823 decTop->setSamplePredRefLayerId(sIdx++, vps->getLayerIdInNuh(j));2824 2800 } 2825 2801 } -
branches/SHM-dev/source/Lib/TLibDecoder/TDecTop.h
r1073 r1084 151 151 Int m_refLayerId[MAX_VPS_LAYER_IDX_PLUS1]; 152 152 Int m_numSamplePredRefLayers; 153 Int m_samplePredRefLayerId[MAX_VPS_LAYER_IDX_PLUS1];154 153 Int m_numMotionPredRefLayers; 155 Int m_motionPredRefLayerId[MAX_VPS_LAYER_IDX_PLUS1];156 Bool m_samplePredEnabledFlag[MAX_VPS_LAYER_IDX_PLUS1];157 Bool m_motionPredEnabledFlag[MAX_VPS_LAYER_IDX_PLUS1];158 154 #endif 159 155 TComPic* m_cIlpPic[MAX_NUM_REF]; ///< Inter layer Prediction picture = upsampled picture … … 273 269 Void setNumSamplePredRefLayers (Int num) { m_numSamplePredRefLayers = num; } 274 270 275 Int getSamplePredRefLayerId (Int layerIdc) { return m_samplePredRefLayerId[layerIdc]; }276 Void setSamplePredRefLayerId (Int layerIdc, Int refLayerId) { m_samplePredRefLayerId[layerIdc] = refLayerId; }277 278 271 Int getNumMotionPredRefLayers () { return m_numMotionPredRefLayers; } 279 272 Void setNumMotionPredRefLayers (Int num) { m_numMotionPredRefLayers = num; } 280 281 Int getMotionPredRefLayerId (Int layerIdc) { return m_motionPredRefLayerId[layerIdc]; }282 Void setMotionPredRefLayerId (Int layerIdc, Int refLayerId) { m_motionPredRefLayerId[layerIdc] = refLayerId; }283 284 Bool getSamplePredEnabledFlag (Int layerIdx) { return m_samplePredEnabledFlag[layerIdx]; }285 Void setSamplePredEnabledFlag (Int layerIdx, Bool flag) { m_samplePredEnabledFlag[layerIdx] = flag; }286 287 Bool getMotionPredEnabledFlag (Int layerIdx) { return m_motionPredEnabledFlag[layerIdx]; }288 Void setMotionPredEnabledFlag (Int layerIdx, Bool flag) { m_motionPredEnabledFlag[layerIdx] = flag; }289 273 290 274 Void setRefLayerParams( TComVPS* vps ); -
branches/SHM-dev/source/Lib/TLibEncoder/TEncGOP.cpp
r1082 r1084 1420 1420 { 1421 1421 // check for the sample prediction picture type 1422 if( m_ppcTEncTop[pcSlice->getVPS()->getLayerIdxInVps(m_layerId)]->getSamplePredEnabledFlag(pcSlice->getVPS()->getLayerIdxInVps(refLayerId)))1422 if( pcSlice->getVPS()->isSamplePredictionType( pcSlice->getVPS()->getLayerIdxInVps(m_layerId), pcSlice->getVPS()->getLayerIdxInVps(refLayerId) ) ) 1423 1423 { 1424 1424 #if P0312_VERT_PHASE_ADJ … … 1846 1846 for( Int i = 0; i < pcSlice->getActiveNumILRRefIdx(); i++ ) 1847 1847 { 1848 if( m_ppcTEncTop[pcSlice->getVPS()->getLayerIdxInVps(m_layerId)]->getSamplePredEnabledFlag(pcSlice->getInterLayerPredLayerIdc(i) ) )1848 if( pcSlice->getVPS()->isSamplePredictionType( pcSlice->getVPS()->getLayerIdxInVps(m_layerId), pcSlice->getInterLayerPredLayerIdc(i) ) ) 1849 1849 { 1850 1850 foundSamplePredPicture = true; … … 1974 1974 // It is a requirement of bitstream conformance when the collocated picture, used for temporal motion vector prediction, is an inter-layer reference picture, 1975 1975 // VpsInterLayerMotionPredictionEnabled[ LayerIdxInVps[ currLayerId ] ][ LayerIdxInVps[ rLId ] ] shall be equal to 1, where rLId is set equal to nuh_layer_id of the inter-layer picture. 1976 if( refPic->isILR(m_layerId) && m_ppcTEncTop[pcSlice->getVPS()->getLayerIdxInVps(m_layerId)]->getMotionPredEnabledFlag(refPic->getLayerIdx() )1976 if( refPic->isILR(m_layerId) && pcSlice->getVPS()->isMotionPredictionType( pcSlice->getVPS()->getLayerIdxInVps(m_layerId), refPic->getLayerIdx() ) 1977 1977 #if MFM_ENCCONSTRAINT 1978 1978 && pcSlice->getBaseColPic( *m_ppcTEncTop[refPic->getLayerIdx()]->getListPic() )->checkSameRefInfo() == true … … 1996 1996 // It is a requirement of bitstream conformance when the collocated picture, used for temporal motion vector prediction, is an inter-layer reference picture, 1997 1997 // VpsInterLayerMotionPredictionEnabled[ LayerIdxInVps[ currLayerId ] ][ LayerIdxInVps[ rLId ] ] shall be equal to 1, where rLId is set equal to nuh_layer_id of the inter-layer picture. 1998 if( refPic->isILR(m_layerId) && m_ppcTEncTop[pcSlice->getVPS()->getLayerIdxInVps(m_layerId)]->getMotionPredEnabledFlag(refPic->getLayerIdx() )1998 if( refPic->isILR(m_layerId) && pcSlice->getVPS()->isMotionPredictionType( pcSlice->getVPS()->getLayerIdxInVps(m_layerId), refPic->getLayerIdx() ) 1999 1999 #if MFM_ENCCONSTRAINT 2000 2000 && pcSlice->getBaseColPic( *m_ppcTEncTop[refPic->getLayerIdx()]->getListPic() )->checkSameRefInfo() == true … … 2115 2115 // It is a requirement of bitstream conformance when the collocated picture, used for temporal motion vector prediction, is an inter-layer reference picture, 2116 2116 // VpsInterLayerMotionPredictionEnabled[ LayerIdxInVps[ currLayerId ] ][ LayerIdxInVps[ rLId ] ] shall be equal to 1, where rLId is set equal to nuh_layer_id of the inter-layer picture. 2117 if( refPic->isILR(m_layerId) && ! m_ppcTEncTop[pcSlice->getVPS()->getLayerIdxInVps(m_layerId)]->getMotionPredEnabledFlag(refPic->getLayerIdx()) )2117 if( refPic->isILR(m_layerId) && !pcSlice->getVPS()->isMotionPredictionType( pcSlice->getVPS()->getLayerIdxInVps(m_layerId), refPic->getLayerIdx() ) ) 2118 2118 { 2119 2119 pcSlice->setEnableTMVPFlag(false); … … 2133 2133 TComPic* refPic = pcSlice->getRefPic(refList, refIdx); 2134 2134 2135 if( !refPic->isILR(m_layerId) || ( refPic->isILR(m_layerId) && m_ppcTEncTop[pcSlice->getVPS()->getLayerIdxInVps(m_layerId)]->getSamplePredEnabledFlag(refPic->getLayerIdx() ) ) )2135 if( !refPic->isILR(m_layerId) || ( refPic->isILR(m_layerId) && pcSlice->getVPS()->isSamplePredictionType( pcSlice->getVPS()->getLayerIdxInVps(m_layerId), refPic->getLayerIdx() ) ) ) 2136 2136 { 2137 2137 break; … … 2157 2157 TComPic* refPic = pcSlice->getRefPic(refList, refIdx); 2158 2158 2159 if( !refPic->isILR(m_layerId) || ( refPic->isILR(m_layerId) && m_ppcTEncTop[pcSlice->getVPS()->getLayerIdxInVps(m_layerId)]->getSamplePredEnabledFlag(refPic->getLayerIdx() ) ) )2159 if( !refPic->isILR(m_layerId) || ( refPic->isILR(m_layerId) && pcSlice->getVPS()->isSamplePredictionType( pcSlice->getVPS()->getLayerIdxInVps(m_layerId), refPic->getLayerIdx() ) ) ) 2160 2160 { 2161 2161 break;
Note: See TracChangeset for help on using the changeset viewer.